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

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

Issue 1350973003: Invalidate line break selection rects when selected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Preserve prior LayoutBR selection rect behavior when REF is off. Created 5 years, 3 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: Source/core/layout/LayoutBR.cpp
diff --git a/Source/core/layout/LayoutBR.cpp b/Source/core/layout/LayoutBR.cpp
index 7ddd1277d1311dfba5bf9c31b24f1d073132a336..5c007c41a7eac9980f41e0344f48415df70400c6 100644
--- a/Source/core/layout/LayoutBR.cpp
+++ b/Source/core/layout/LayoutBR.cpp
@@ -44,6 +44,17 @@ LayoutBR::~LayoutBR()
{
}
+LayoutRect LayoutBR::selectionRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer) const
+{
+ if (!RuntimeEnabledFeatures::selectionPaintingWithoutSelectionGapsEnabled())
+ return LayoutRect();
+
+ // When selected we need to return a rect that includes the space
+ // highlighted to illustrate a newline.
+ return (selectionState() == SelectionNone) ? LayoutRect()
chrishtr 2015/09/18 21:08:03 Return LayoutText::selectionRectForPaintInvalidati
wkorman 2015/09/18 21:26:57 Done.
+ : LayoutText::selectionRectForPaintInvalidation(paintInvalidationContainer);
+}
+
int LayoutBR::lineHeight(bool firstLine) const
{
const ComputedStyle& style = styleRef(firstLine && document().styleEngine().usesFirstLineRules());

Powered by Google App Engine
This is Rietveld 408576698