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

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

Issue 1473363003: Invalidate first line display item clients when first line style changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 2a8d96148b2551660a4739d5e892cbc991cb3fc0..d5425ccf47fe32858fd7c0366dfdb2b3ee5abf9a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1844,13 +1844,15 @@ void LayoutObject::setPseudoStyle(PassRefPtr<ComputedStyle> pseudoStyle)
void LayoutObject::firstLineStyleDidChange(const ComputedStyle& oldStyle, const ComputedStyle& newStyle)
{
- StyleDifference diff = oldStyle.visualInvalidationDiff(newStyle);
- if (diff.hasDifference()) {
- // TODO(rune@opera.com): We should use the diff to determine whether a repaint vs. layout
- // is needed, but for now just assume a layout will be required. The diff code
- // in LayoutObject::setStyle would need to be factored out so that it could be reused.
- setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::StyleChange);
+ StyleDifference diff = adjustStyleDifference(oldStyle.visualInvalidationDiff(newStyle));
chrishtr 2015/11/24 23:21:56 Is the change in this file strictly necessary?
Xianzhu 2015/11/24 23:26:58 I think yes. The above line ensures that StyleDif
+
+ if (diff.needsPaintInvalidation()) {
+ setShouldDoFullPaintInvalidation();
+ if (isLayoutBlockFlow())
+ toLayoutBlockFlow(this)->invalidateDisplayItemClientsOfFirstLine();
}
+ if (diff.needsLayout())
+ setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::StyleChange);
}
void LayoutObject::markContainingBlocksForOverflowRecalc()
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698