Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
index 836c7e887028a725525e433a47fcb509e6a220ec..3051edbcb1f1bf03e78b364e5e285fe6b3628f7e 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
@@ -572,6 +572,8 @@ void LayoutBox::scrollRectToVisible(const LayoutRect& rect, const ScrollAlignmen |
// Don't scroll to reveal an overflow layer that is restricted by the -webkit-line-clamp property. |
// This will prevent us from revealing text hidden by the slider in Safari RSS. |
newRect = getScrollableArea()->scrollIntoView(rect, alignX, alignY, scrollType); |
+ if (newRect.isEmpty()) |
+ return; |
} else if (!parentBox && canBeProgramaticallyScrolled()) { |
if (FrameView* frameView = this->frameView()) { |
HTMLFrameOwnerElement* ownerElement = document().localOwner(); |