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

Unified Diff: third_party/WebKit/Source/core/paint/BoxClipper.cpp

Issue 1817463004: Always apply parent clips to selection rects when painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/selection/text-selection-newline-clipped-by-overflow-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/BoxClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxClipper.cpp b/third_party/WebKit/Source/core/paint/BoxClipper.cpp
index 0e767d59c74b41f12b0b04d54f06f25efcfc1dba..d8697eacc8087fb242e63e63e8c95fde16327f0f 100644
--- a/third_party/WebKit/Source/core/paint/BoxClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxClipper.cpp
@@ -48,7 +48,9 @@ BoxClipper::BoxClipper(const LayoutBox& box, const PaintInfo& paintInfo, const L
if (hasBorderRadius)
clipRoundedRect = m_box.style()->getRoundedInnerBorderFor(LayoutRect(accumulatedOffset, m_box.size()));
- if (contentsClipBehavior == SkipContentsClipIfPossible) {
+ // Selection does not affect visual overflow, so this optimization is invalid if selection
+ // is present.
+ if (contentsClipBehavior == SkipContentsClipIfPossible && box.getSelectionState() == SelectionNone) {
LayoutRect contentsVisualOverflow = m_box.contentsVisualOverflowRect();
if (contentsVisualOverflow.isEmpty())
return;
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/selection/text-selection-newline-clipped-by-overflow-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698