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)); |
+ |
+ if (diff.needsPaintInvalidation()) { |
+ setShouldDoFullPaintInvalidation(); |
+ if (isLayoutBlockFlow()) |
+ toLayoutBlockFlow(this)->invalidateDisplayItemClientsOfFirstLine(); |
rune
2015/11/27 09:27:11
How about FIRST_LINE_INHERITED. firstLineStyleDidC
Xianzhu
2015/11/30 18:15:53
For FIRST_LINE_INHERITED, we'll use the normal pai
|
} |
+ if (diff.needsLayout()) |
+ setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::StyleChange); |
} |
void LayoutObject::markContainingBlocksForOverflowRecalc() |