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

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

Issue 1209253006: Need to update first-line when font finish loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review issue fix and virtual suite rebaseline. Created 5 years, 6 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/layout/LayoutObject.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index abd4d61201124cc82585b605cd753adc344d9950..dd8196f6431d8f97f0899ba661e2d853398328ff 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -1707,6 +1707,17 @@ void LayoutObject::setPseudoStyle(PassRefPtr<ComputedStyle> pseudoStyle)
setStyle(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);
+ }
+}
+
void LayoutObject::markContainingBlocksForOverflowRecalc()
{
for (LayoutBlock* container = containingBlock(); container && !container->childNeedsOverflowRecalcAfterStyleChange(); container = container->containingBlock())
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698