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

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

Issue 408143007: Revert r169180 (https://codereview.chromium.org/150733002) in M36.1985 branch, due to layout proble… (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1985/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« 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 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 } 1313 }
1314 if (heightChanged) { 1314 if (heightChanged) {
1315 if (style->height().isFixed() && (style->top().isAuto() || style->bo ttom().isAuto())) 1315 if (style->height().isFixed() && (style->top().isAuto() || style->bo ttom().isAuto()))
1316 renderer->setNeedsPositionedMovementLayout(); 1316 renderer->setNeedsPositionedMovementLayout();
1317 else 1317 else
1318 renderer->setNeedsLayout(); 1318 renderer->setNeedsLayout();
1319 } 1319 }
1320 } 1320 }
1321 } 1321 }
1322 1322
1323 bool FrameView::shouldPlaceVerticalScrollbarOnLeft() const
1324 {
1325 // FIXME: Mainframe scrollbar placement should respect the embedding applica tion RTL UI policy.
1326 // See crbug.com/249860.
1327 if (m_frame->isMainFrame())
1328 return false;
1329
1330 Document* document = m_frame->document();
1331 if (!document)
1332 return false;
1333
1334 // <body> inherits 'direction' from <html>, so it can safaly be used
1335 // to dictate the frame vertical scrollbar placement.
1336 if (!document->body() || !document->body()->renderer())
1337 return false;
1338
1339 return document->body()->renderer()->style()->shouldPlaceBlockDirectionScrol lbarOnLogicalLeft();
1340 }
1341
1342 IntSize FrameView::scrollOffsetForFixedPosition() const 1323 IntSize FrameView::scrollOffsetForFixedPosition() const
1343 { 1324 {
1344 return toIntSize(clampScrollPosition(scrollPosition())); 1325 return toIntSize(clampScrollPosition(scrollPosition()));
1345 } 1326 }
1346 1327
1347 IntPoint FrameView::lastKnownMousePosition() const 1328 IntPoint FrameView::lastKnownMousePosition() const
1348 { 1329 {
1349 return m_frame->eventHandler().lastKnownMousePosition(); 1330 return m_frame->eventHandler().lastKnownMousePosition();
1350 } 1331 }
1351 1332
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
3285 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation) 3266 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o rientation)
3286 { 3267 {
3287 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); 3268 ScrollableArea::willRemoveScrollbar(scrollbar, orientation);
3288 if (AXObjectCache* cache = axObjectCache()) { 3269 if (AXObjectCache* cache = axObjectCache()) {
3289 cache->remove(scrollbar); 3270 cache->remove(scrollbar);
3290 cache->handleScrollbarUpdate(this); 3271 cache->handleScrollbarUpdate(this);
3291 } 3272 }
3292 } 3273 }
3293 3274
3294 } // namespace WebCore 3275 } // 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