Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 1809643008: Adding or changing any of box-shadow, outline, or border-image-outset does not need a layout.. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 05085ff6575c24ccdd330a0de42bbcec9a0097ed..f1f26471f33d4eab5c6e9dcd5a0c5bce22aa2edd 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -535,10 +535,6 @@ bool ComputedStyle::diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle&
&& *rareNonInheritedData->m_flexibleBox.get() != *other.rareNonInheritedData->m_flexibleBox.get())
return true;
- // FIXME: We should add an optimized form of layout that just recomputes visual overflow.
- if (!rareNonInheritedData->shadowDataEquivalent(*other.rareNonInheritedData.get()))
- return true;
-
if (!rareNonInheritedData->reflectionDataEquivalent(*other.rareNonInheritedData.get()))
return true;
@@ -659,11 +655,6 @@ bool ComputedStyle::diffNeedsFullLayoutAndPaintInvalidation(const ComputedStyle&
if ((visibility() == COLLAPSE) != (other.visibility() == COLLAPSE))
return true;
- if (!m_background->outline().visuallyEqual(other.m_background->outline())) {
- // FIXME: We only really need to recompute the overflow but we don't have an optimized layout for it.
- return true;
- }
-
if (hasPseudoStyle(PseudoIdScrollbar) != other.hasPseudoStyle(PseudoIdScrollbar))
return true;
@@ -732,6 +723,9 @@ bool ComputedStyle::diffNeedsPaintInvalidationLayer(const ComputedStyle& other)
bool ComputedStyle::diffNeedsPaintInvalidationObject(const ComputedStyle& other) const
{
+ if (!m_background->outline().visuallyEqual(other.m_background->outline()))
+ return true;
+
if (inherited_flags._visibility != other.inherited_flags._visibility
|| inherited_flags.m_printColorAdjust != other.inherited_flags.m_printColorAdjust
|| inherited_flags._insideLink != other.inherited_flags._insideLink
@@ -750,6 +744,7 @@ bool ComputedStyle::diffNeedsPaintInvalidationObject(const ComputedStyle& other)
if (rareNonInheritedData->userDrag != other.rareNonInheritedData->userDrag
|| rareNonInheritedData->m_objectFit != other.rareNonInheritedData->m_objectFit
|| rareNonInheritedData->m_objectPosition != other.rareNonInheritedData->m_objectPosition
+ || !rareNonInheritedData->shadowDataEquivalent(*other.rareNonInheritedData.get())
|| !rareNonInheritedData->shapeOutsideDataEquivalent(*other.rareNonInheritedData.get())
|| !rareNonInheritedData->clipPathDataEquivalent(*other.rareNonInheritedData.get())
|| (visitedLinkBorderLeftColor() != other.visitedLinkBorderLeftColor() && borderLeftWidth())
@@ -783,6 +778,9 @@ void ComputedStyle::updatePropertySpecificDifferences(const ComputedStyle& other
if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filter)
diff.setFilterChanged();
+ if (!rareNonInheritedData->shadowDataEquivalent(*other.rareNonInheritedData.get()))
+ diff.setNeedsRecomputeOverflow();
+
if (rareNonInheritedData->m_backdropFilter != other.rareNonInheritedData->m_backdropFilter)
diff.setBackdropFilterChanged();
@@ -790,6 +788,9 @@ void ComputedStyle::updatePropertySpecificDifferences(const ComputedStyle& other
diff.setFilterChanged();
}
+ if (!m_background->outline().visuallyEqual(other.m_background->outline()) || !surround->border.visualOverflowEqual(other.surround->border))
+ diff.setNeedsRecomputeOverflow();
+
if (!diff.needsPaintInvalidation()) {
if (inherited->color != other.inherited->color
|| inherited->visitedLinkColor != other.inherited->visitedLinkColor
« no previous file with comments | « third_party/WebKit/Source/core/style/BorderData.h ('k') | third_party/WebKit/Source/core/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698