| 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;
|
|
|