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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 150733002: Place inner frame scrollbars on the left side, if indicated by the frame-level text direction. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@issue_312435
Patch Set: Place inner frame scrollbars on the left side, if indicated by the frame-level text direction. Created 6 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 unified diff | Download patch
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 } 1376 }
1377 if (heightChanged) { 1377 if (heightChanged) {
1378 if (style->height().isFixed() && (style->top().isAuto() || style->bo ttom().isAuto())) 1378 if (style->height().isFixed() && (style->top().isAuto() || style->bo ttom().isAuto()))
1379 renderer->setNeedsPositionedMovementLayout(); 1379 renderer->setNeedsPositionedMovementLayout();
1380 else 1380 else
1381 renderer->setNeedsLayout(); 1381 renderer->setNeedsLayout();
1382 } 1382 }
1383 } 1383 }
1384 } 1384 }
1385 1385
1386 bool FrameView::shouldPlaceVerticalScrollbarOnLeft() const
1387 {
1388 // FIXME: Mainframe scrollbar placement should respect the embedding applica tion RTL UI policy.
1389 // See crbug.com/249860.
1390 if (isMainFrame())
1391 return false;
1392
1393 Document* document = m_frame->document();
1394 if (!document)
1395 return false;
1396
1397 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
1398 return false;
1399
1400 // Use the <body> text direction to dictate the frame scrollbar placement.
1401 return document->body()->renderer()->style()->shouldPlaceBlockDirectionScrol lbarOnLogicalLeft();
Julien - ping for review 2014/03/12 23:19:10 shouldPlaceBlockDirectionScrollbarOnLogicalLeft is
1402 }
1403
1386 IntSize FrameView::scrollOffsetForFixedPosition() const 1404 IntSize FrameView::scrollOffsetForFixedPosition() const
1387 { 1405 {
1388 return toIntSize(clampScrollPosition(scrollPosition())); 1406 return toIntSize(clampScrollPosition(scrollPosition()));
1389 } 1407 }
1390 1408
1391 IntPoint FrameView::lastKnownMousePosition() const 1409 IntPoint FrameView::lastKnownMousePosition() const
1392 { 1410 {
1393 return m_frame->eventHandler().lastKnownMousePosition(); 1411 return m_frame->eventHandler().lastKnownMousePosition();
1394 } 1412 }
1395 1413
(...skipping 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after
3203 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3221 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3204 { 3222 {
3205 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3223 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3206 if (AXObjectCache* cache = axObjectCache()) { 3224 if (AXObjectCache* cache = axObjectCache()) {
3207 cache->remove(scrollbar); 3225 cache->remove(scrollbar);
3208 cache->handleScrollbarUpdate(this); 3226 cache->handleScrollbarUpdate(this);
3209 } 3227 }
3210 } 3228 }
3211 3229
3212 } // namespace WebCore 3230 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698