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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2669003002: Optimize outline paint invalidation (Closed)
Patch Set: - Created 3 years, 11 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/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 6eb9de45a6f9a9740fe28b4b458f4785af035b87..4c1731d9683f3a284a9d4dc477c8be9e377048b3 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -4813,7 +4813,7 @@ void LayoutBox::addVisualEffectOverflow() {
addSelfVisualOverflow(visualEffectOverflow);
}
-LayoutRectOutsets LayoutBox::computeVisualEffectOverflowOutsets() const {
+LayoutRectOutsets LayoutBox::computeVisualEffectOverflowOutsets() {
ASSERT(style()->hasVisualOverflowingEffect());
LayoutUnit top;
@@ -4849,6 +4849,8 @@ LayoutRectOutsets LayoutBox::computeVisualEffectOverflowOutsets() const {
addOutlineRects(outlineRects, LayoutPoint(),
outlineRectsShouldIncludeBlockVisualOverflow());
LayoutRect rect = unionRectEvenIfEmpty(outlineRects);
+ setOutlineMayBeAffectedByDescendants(rect.size() != size());
+
int outlineOutset = style()->outlineOutsetExtent();
top = std::max(top, -rect.y() + outlineOutset);
right = std::max(right, rect.maxX() - size().width() + outlineOutset);

Powered by Google App Engine
This is Rietveld 408576698