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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBR.h

Issue 1837533002: LayoutObject::localOverflowRectForPaintInvalidation() and localSelectionRect() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pi0
Patch Set: Rebase Created 4 years, 9 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: third_party/WebKit/Source/core/layout/LayoutBR.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBR.h b/third_party/WebKit/Source/core/layout/LayoutBR.h
index 84b8bb09cc38422f1d216815221170f747766a65..524b455df8daf5601c0b80dbb2d21b5a989dd11b 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBR.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBR.h
@@ -36,7 +36,9 @@ public:
const char* name() const override { return "LayoutBR"; }
- LayoutRect selectionRectForPaintInvalidation(const LayoutBoxModelObject* /* paintInvalidationContainer */) const override;
+ // Although line breaks contain no actual text, if we're selected we need
+ // to return a rect that includes space to illustrate a newline.
+ using LayoutText::localSelectionRect;
float width(unsigned /* from */, unsigned /* len */, const Font&, LayoutUnit /* xpos */, TextDirection, HashSet<const SimpleFontData*>* = nullptr /* fallbackFonts */ , FloatRect* /* glyphBounds */ = nullptr) const override { return 0; }
float width(unsigned /* from */, unsigned /* len */, LayoutUnit /* xpos */, TextDirection, bool = false /* firstLine */, HashSet<const SimpleFontData*>* = nullptr /* fallbackFonts */, FloatRect* /* glyphBounds */ = nullptr) const override { return 0; }

Powered by Google App Engine
This is Rietveld 408576698