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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutText.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: New method 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
Index: third_party/WebKit/Source/core/layout/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index 929cf221dc89a10f06698cbfebe1efc9cfcae7a7..e51ae3ace89d44cc4aae1fdeb7207d47c901bc18 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -1888,4 +1888,17 @@ void LayoutText::invalidateDisplayItemClients(const LayoutBoxModelObject& paintI
}
}
+void LayoutText::invalidateDisplayItemClientsOfFirstLine()
+{
+ for (InlineTextBox* box = firstTextBox(); box; box = box->nextTextBox()) {
+ if (!box->isFirstLineStyle())
+ break;
+ invalidateDisplayItemClient(*box);
+ if (box->truncation() != cNoTruncation) {
+ if (EllipsisBox* ellipsisBox = box->root().ellipsisBox())
+ invalidateDisplayItemClient(*ellipsisBox);
+ }
+ }
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698