Chromium Code Reviews| Index: Source/core/frame/FrameView.cpp |
| diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
| index 99b2e7368871438fa3af58c19e8cf1e0cb84e63c..17041fc15f470a3c75a122e5754d82725f3d47f2 100644 |
| --- a/Source/core/frame/FrameView.cpp |
| +++ b/Source/core/frame/FrameView.cpp |
| @@ -1383,6 +1383,24 @@ void FrameView::viewportConstrainedVisibleContentSizeChanged(bool widthChanged, |
| } |
| } |
| +bool FrameView::shouldPlaceVerticalScrollbarOnLeft() const |
| +{ |
| + // FIXME: Mainframe scrollbar placement should respect the embedding application RTL UI policy. |
| + // See crbug.com/249860. |
| + if (isMainFrame()) |
| + return false; |
| + |
| + Document* document = m_frame->document(); |
| + if (!document) |
| + return false; |
| + |
| + if (!document->body() || !document->body()->renderer()) |
|
Julien - ping for review
2014/03/12 23:19:10
I would put a comment that 'direction' is inherite
|
| + return false; |
| + |
| + // Use the <body> text direction to dictate the frame scrollbar placement. |
| + return document->body()->renderer()->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft(); |
|
Julien - ping for review
2014/03/12 23:19:10
shouldPlaceBlockDirectionScrollbarOnLogicalLeft is
|
| +} |
| + |
| IntSize FrameView::scrollOffsetForFixedPosition() const |
| { |
| return toIntSize(clampScrollPosition(scrollPosition())); |