Skip to content

Commit

Permalink
Revert "Repaint when bgcolor animation is triggered"
Browse files Browse the repository at this point in the history
This reverts commit bbf753e.

Reason for revert: Too much flakiness in blink_web_tests on Linux*

Recent failures:
- https://ci.chromium.org/p/chromium/builders/ci/Linux%20Tests/98274
- https://ci.chromium.org/p/chromium/builders/ci/linux-bfcache-rel/15065
- https://ci.chromium.org/p/chromium/builders/ci/linux-trusty-rel/21522

Original change's description:
> Repaint when bgcolor animation is triggered
>
> Right now when a bgcolor animation/transition is triggered, such
> as hovering over an element, we do not request a repaint of the
> element and thus we cannot composite the bgcolor animation.
>
> This CL fixes the problem by triggering a full repaint.
>
> Bug: 1177320
> Change-Id: I87dff5c11d109fc97f41c9b49e13b81613004281
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2698847
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Reviewed-by: Robert Flack <flackr@chromium.org>
> Commit-Queue: Xida Chen <xidachen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#857877}

Bug: 1177320
Change-Id: Ifabf8f703af522a6ea25aeac3e76926478a01610
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2719692
Reviewed-by: Jiewei Qian  <qjw@chromium.org>
Auto-Submit: Jiewei Qian  <qjw@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#857947}
  • Loading branch information
wacky6 authored and Chromium LUCI CQ committed Feb 26, 2021
1 parent 0dbda88 commit b5111e9
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 70 deletions.
4 changes: 0 additions & 4 deletions third_party/blink/renderer/core/layout/layout_object.cc
Expand Up @@ -2455,10 +2455,6 @@ void LayoutObject::SetStyle(scoped_refptr<const ComputedStyle> style,
diff.CompositingReasonsChanged())) {
SetNeedsPaintPropertyUpdate();
}

if (!IsText() && diff.CompositablePaintEffectChanged()) {
SetShouldDoFullPaintInvalidationWithoutGeometryChange();
}
}

void LayoutObject::UpdateImageObservers(const ComputedStyle* old_style,
Expand Down
5 changes: 0 additions & 5 deletions third_party/blink/renderer/core/style/computed_style.cc
Expand Up @@ -959,11 +959,6 @@ void ComputedStyle::UpdatePropertySpecificDifferences(
PotentialCompositingReasonsFor3DTransformChanged(other)) {
diff.SetCompositingReasonsChanged();
}

if (HasCurrentBackgroundColorAnimation() !=
other.HasCurrentBackgroundColorAnimation()) {
diff.SetCompositablePaintEffectChanged();
}
}

void ComputedStyle::AddPaintImage(StyleImage* image) {
Expand Down
16 changes: 2 additions & 14 deletions third_party/blink/renderer/core/style/style_difference.h
Expand Up @@ -43,8 +43,7 @@ class StyleDifference {
visual_rect_update_(false),
property_specific_differences_(0),
scroll_anchor_disabling_property_changed_(false),
compositing_reasons_changed_(false),
compositable_paint_effect_changed_(false) {}
compositing_reasons_changed_(false) {}

void Merge(StyleDifference other) {
needs_paint_invalidation_ |= other.needs_paint_invalidation_;
Expand All @@ -56,15 +55,13 @@ class StyleDifference {
scroll_anchor_disabling_property_changed_ |=
other.scroll_anchor_disabling_property_changed_;
compositing_reasons_changed_ |= other.compositing_reasons_changed_;
compositable_paint_effect_changed_ |=
other.compositable_paint_effect_changed_;
}

bool HasDifference() const {
return needs_paint_invalidation_ || layout_type_ || needs_reshape_ ||
property_specific_differences_ || recompute_visual_overflow_ ||
visual_rect_update_ || scroll_anchor_disabling_property_changed_ ||
compositing_reasons_changed_ || compositable_paint_effect_changed_;
compositing_reasons_changed_;
}

bool HasAtMostPropertySpecificDifferences(
Expand Down Expand Up @@ -170,12 +167,6 @@ class StyleDifference {
return compositing_reasons_changed_;
}
void SetCompositingReasonsChanged() { compositing_reasons_changed_ = true; }
bool CompositablePaintEffectChanged() const {
return compositable_paint_effect_changed_;
}
void SetCompositablePaintEffectChanged() {
compositable_paint_effect_changed_ = true;
}

private:
static constexpr int kPropertyDifferenceCount = 9;
Expand All @@ -193,9 +184,6 @@ class StyleDifference {
unsigned property_specific_differences_ : kPropertyDifferenceCount;
unsigned scroll_anchor_disabling_property_changed_ : 1;
unsigned compositing_reasons_changed_ : 1;
// Designed for the effects such as background-color, whose animation can be
// composited using paint worklet infra.
unsigned compositable_paint_effect_changed_ : 1;
};

CORE_EXPORT std::ostream& operator<<(std::ostream&, const StyleDifference&);
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit b5111e9

Please sign in to comment.