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

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

Issue 2220133002: Don't restore in LayoutBlock::layout if clamping is delayed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp » ('j') | 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 // layoutBlock(). 373 // layoutBlock().
374 layoutBlock(false); 374 layoutBlock(false);
375 375
376 // It's safe to check for control clip here, since controls can never be tab le cells. 376 // It's safe to check for control clip here, since controls can never be tab le cells.
377 // If we have a lightweight clip, there can never be any overflow from child ren. 377 // If we have a lightweight clip, there can never be any overflow from child ren.
378 if (hasControlClip() && m_overflow) 378 if (hasControlClip() && m_overflow)
379 clearLayoutOverflow(); 379 clearLayoutOverflow();
380 380
381 invalidateBackgroundObscurationStatus(); 381 invalidateBackgroundObscurationStatus();
382 382
383 if (needsScrollAnchoring) 383 // If clamping is delayed, we will restore in PaintLayerScrollableArea::clam pScrollPositionsAfterLayout.
384 // Restoring during the intermediate layout may clamp the scroller to the wr ong bounds.
385 bool clampingDelayed = PaintLayerScrollableArea::DelayScrollPositionClampSco pe::clampingIsDelayed();
386 if (needsScrollAnchoring && !clampingDelayed)
384 getScrollableArea()->scrollAnchor().restore(); 387 getScrollableArea()->scrollAnchor().restore();
385 388
386 m_heightAvailableToChildrenChanged = false; 389 m_heightAvailableToChildrenChanged = false;
387 } 390 }
388 391
389 bool LayoutBlock::widthAvailableToChildrenHasChanged() 392 bool LayoutBlock::widthAvailableToChildrenHasChanged()
390 { 393 {
391 // TODO(robhogan): Does m_widthAvailableToChildrenChanged always get reset w hen it needs to? 394 // TODO(robhogan): Does m_widthAvailableToChildrenChanged always get reset w hen it needs to?
392 bool widthAvailableToChildrenHasChanged = m_widthAvailableToChildrenChanged; 395 bool widthAvailableToChildrenHasChanged = m_widthAvailableToChildrenChanged;
393 m_widthAvailableToChildrenChanged = false; 396 m_widthAvailableToChildrenChanged = false;
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) { 1870 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) {
1868 LayoutBox* currBox = *it; 1871 LayoutBox* currBox = *it;
1869 ASSERT(!currBox->needsLayout()); 1872 ASSERT(!currBox->needsLayout());
1870 } 1873 }
1871 } 1874 }
1872 } 1875 }
1873 1876
1874 #endif 1877 #endif
1875 1878
1876 } // namespace blink 1879 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698