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

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

Issue 1775293002: Revert of Reland "Fully (?) fix overflow: auto with delayed scroll updates (patchset #5 id:80001 of https://c… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 void LayoutBlock::startDelayUpdateScrollInfo() 874 void LayoutBlock::startDelayUpdateScrollInfo()
875 { 875 {
876 if (gDelayUpdateScrollInfo == 0) { 876 if (gDelayUpdateScrollInfo == 0) {
877 ASSERT(!gDelayedUpdateScrollInfoSet); 877 ASSERT(!gDelayedUpdateScrollInfoSet);
878 gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet; 878 gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet;
879 } 879 }
880 ASSERT(gDelayedUpdateScrollInfoSet); 880 ASSERT(gDelayedUpdateScrollInfoSet);
881 ++gDelayUpdateScrollInfo; 881 ++gDelayUpdateScrollInfo;
882 } 882 }
883 883
884 bool LayoutBlock::finishDelayUpdateScrollInfo(SubtreeLayoutScope* layoutScope) 884 void LayoutBlock::finishDelayUpdateScrollInfo()
885 { 885 {
886 bool childrenMarkedForRelayout = false;
887
888 --gDelayUpdateScrollInfo; 886 --gDelayUpdateScrollInfo;
889 ASSERT(gDelayUpdateScrollInfo >= 0); 887 ASSERT(gDelayUpdateScrollInfo >= 0);
890 if (gDelayUpdateScrollInfo == 0) { 888 if (gDelayUpdateScrollInfo == 0) {
891 ASSERT(gDelayedUpdateScrollInfoSet); 889 ASSERT(gDelayedUpdateScrollInfoSet);
892 890
893 OwnPtr<DelayedUpdateScrollInfoSet> infoSet(adoptPtr(gDelayedUpdateScroll InfoSet)); 891 OwnPtr<DelayedUpdateScrollInfoSet> infoSet(adoptPtr(gDelayedUpdateScroll InfoSet));
894 gDelayedUpdateScrollInfoSet = nullptr; 892 gDelayedUpdateScrollInfoSet = nullptr;
895 893
896 for (auto* block : *infoSet) { 894 for (auto* block : *infoSet) {
897 if (block->hasOverflowClip()) { 895 if (block->hasOverflowClip()) {
898 childrenMarkedForRelayout |= block->layer()->scrollableArea()->u pdateAfterLayout(layoutScope); 896 block->layer()->scrollableArea()->updateAfterLayout();
899 } 897 }
900 } 898 }
901 } 899 }
902 return childrenMarkedForRelayout;
903 } 900 }
904 901
905 void LayoutBlock::updateScrollInfoAfterLayout() 902 void LayoutBlock::updateScrollInfoAfterLayout()
906 { 903 {
907 if (hasOverflowClip()) { 904 if (hasOverflowClip()) {
908 if (style()->isFlippedBlocksWritingMode()) { 905 if (style()->isFlippedBlocksWritingMode()) {
909 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937 906 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937
910 // Workaround for now. We cannot delay the scroll info for overflow 907 // Workaround for now. We cannot delay the scroll info for overflow
911 // for items with opposite writing directions, as the contents needs 908 // for items with opposite writing directions, as the contents needs
912 // to overflow in that direction 909 // to overflow in that direction
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2909 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 2906 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
2910 { 2907 {
2911 showLayoutObject(); 2908 showLayoutObject();
2912 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2909 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2913 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2910 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2914 } 2911 }
2915 2912
2916 #endif 2913 #endif
2917 2914
2918 } // namespace blink 2915 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698