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

Unified Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 561303002: Style changes to visual overflow do not require a layout (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/style/BorderData.h ('k') | Source/core/rendering/style/StyleDifference.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/RenderStyle.cpp
diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
index b28acc9e5e761b018b9edd720c32b41aa2c3e093..4f875ad5ca4190c0011198add9e4d02855d1d57d 100644
--- a/Source/core/rendering/style/RenderStyle.cpp
+++ b/Source/core/rendering/style/RenderStyle.cpp
@@ -469,10 +469,6 @@ bool RenderStyle::diffNeedsFullLayoutAndPaintInvalidation(const RenderStyle& oth
&& *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;
@@ -588,11 +584,6 @@ bool RenderStyle::diffNeedsFullLayoutAndPaintInvalidation(const RenderStyle& oth
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;
- }
-
// Movement of non-static-positioned object is special cased in RenderStyle::visualInvalidationDiff().
return false;
@@ -656,6 +647,9 @@ bool RenderStyle::diffNeedsPaintInvalidationLayer(const RenderStyle& other) cons
bool RenderStyle::diffNeedsPaintInvalidationObject(const RenderStyle& 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
@@ -674,6 +668,7 @@ bool RenderStyle::diffNeedsPaintInvalidationObject(const RenderStyle& other) con
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())
|| !dataEquivalent(rareNonInheritedData->m_shapeOutside, other.rareNonInheritedData->m_shapeOutside)
|| !dataEquivalent(rareNonInheritedData->m_clipPath, other.rareNonInheritedData->m_clipPath))
return true;
@@ -697,8 +692,14 @@ void RenderStyle::updatePropertySpecificDifferences(const RenderStyle& other, St
if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filter)
diff.setFilterChanged();
+
+ if (!rareNonInheritedData->shadowDataEquivalent(*other.rareNonInheritedData.get()))
+ diff.setVisualOverflowChanged();
}
+ if (!m_background->outline().visuallyEqual(other.m_background->outline()) || !surround->border.visualOverflowEqual(other.surround->border))
+ diff.setVisualOverflowChanged();
+
if (!diff.needsPaintInvalidation()) {
if (inherited->color != other.inherited->color
|| inherited_flags.m_textUnderline != other.inherited_flags.m_textUnderline
« no previous file with comments | « Source/core/rendering/style/BorderData.h ('k') | Source/core/rendering/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698