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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 1504923010: Before finalizing scroll dimensions, check again whether we need scrollbars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tentative better fix Created 5 years 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 | « no previous file | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 if (gDelayUpdateScrollInfo == 0) { 857 if (gDelayUpdateScrollInfo == 0) {
858 ASSERT(gDelayedUpdateScrollInfoMap); 858 ASSERT(gDelayedUpdateScrollInfoMap);
859 859
860 OwnPtr<DelayedUpdateScrollInfoMap> infoMap(adoptPtr(gDelayedUpdateScroll InfoMap)); 860 OwnPtr<DelayedUpdateScrollInfoMap> infoMap(adoptPtr(gDelayedUpdateScroll InfoMap));
861 gDelayedUpdateScrollInfoMap = nullptr; 861 gDelayedUpdateScrollInfoMap = nullptr;
862 862
863 for (auto block : *infoMap) { 863 for (auto block : *infoMap) {
864 if (block.key->hasOverflowClip()) { 864 if (block.key->hasOverflowClip()) {
865 PaintLayerScrollableArea* scrollableArea = block.key->layer()->s crollableArea(); 865 PaintLayerScrollableArea* scrollableArea = block.key->layer()->s crollableArea();
866 ScrollInfo& scrollInfo = block.value; 866 ScrollInfo& scrollInfo = block.value;
867 scrollableArea->finalizeScrollDimensions(scrollInfo.scrollOffset , scrollInfo.autoHorizontalScrollBarChanged, scrollInfo.autoVerticalScrollBarCha nged); 867 bool autoHorizontalScrollBarChanged, autoVerticalScrollBarChange d;
szager1 2015/12/15 21:43:30 I don't think you want new bool's here. Instead:
868 scrollableArea->updateScrollDimensions(scrollInfo.scrollOffset, autoHorizontalScrollBarChanged, autoVerticalScrollBarChanged);
869 scrollableArea->finalizeScrollDimensions(scrollInfo.scrollOffset , autoHorizontalScrollBarChanged || scrollInfo.autoHorizontalScrollBarChanged, a utoVerticalScrollBarChanged || scrollInfo.autoVerticalScrollBarChanged);
868 } 870 }
869 } 871 }
870 } 872 }
871 } 873 }
872 874
873 void LayoutBlock::updateScrollInfoAfterLayout() 875 void LayoutBlock::updateScrollInfoAfterLayout()
874 { 876 {
875 if (hasOverflowClip()) { 877 if (hasOverflowClip()) {
876 if (style()->isFlippedBlocksWritingMode()) { 878 if (style()->isFlippedBlocksWritingMode()) {
877 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937 879 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 2913 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
2912 { 2914 {
2913 showLayoutObject(); 2915 showLayoutObject();
2914 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2916 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2915 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2917 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2916 } 2918 }
2917 2919
2918 #endif 2920 #endif
2919 2921
2920 } // namespace blink 2922 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698