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

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

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Created 4 years, 2 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 392
393 // It's safe to check for control clip here, since controls can never be table cells. 393 // It's safe to check for control clip here, since controls can never be table cells.
394 // If we have a lightweight clip, there can never be any overflow from childre n. 394 // If we have a lightweight clip, there can never be any overflow from childre n.
395 if (hasControlClip() && m_overflow) 395 if (hasControlClip() && m_overflow)
396 clearLayoutOverflow(); 396 clearLayoutOverflow();
397 397
398 invalidateBackgroundObscurationStatus(); 398 invalidateBackgroundObscurationStatus();
399 399
400 // If clamping is delayed, we will restore in PaintLayerScrollableArea::clampS crollPositionsAfterLayout. 400 // If clamping is delayed, we will restore in PaintLayerScrollableArea::clampS crollPositionsAfterLayout.
401 // Restoring during the intermediate layout may clamp the scroller to the wron g bounds. 401 // Restoring during the intermediate layout may clamp the scroller to the wron g bounds.
402 bool clampingDelayed = PaintLayerScrollableArea:: 402 bool clampingDelayed = PaintLayerScrollableArea::DelayScrollOffsetClampScope::
403 DelayScrollPositionClampScope::clampingIsDelayed(); 403 clampingIsDelayed();
404 if (needsScrollAnchoring && !clampingDelayed) 404 if (needsScrollAnchoring && !clampingDelayed)
405 getScrollableArea()->scrollAnchor()->restore(); 405 getScrollableArea()->scrollAnchor()->restore();
406 406
407 m_heightAvailableToChildrenChanged = false; 407 m_heightAvailableToChildrenChanged = false;
408 } 408 }
409 409
410 bool LayoutBlock::widthAvailableToChildrenHasChanged() { 410 bool LayoutBlock::widthAvailableToChildrenHasChanged() {
411 // TODO(robhogan): Does m_widthAvailableToChildrenChanged always get reset whe n it needs to? 411 // TODO(robhogan): Does m_widthAvailableToChildrenChanged always get reset whe n it needs to?
412 bool widthAvailableToChildrenHasChanged = m_widthAvailableToChildrenChanged; 412 bool widthAvailableToChildrenHasChanged = m_widthAvailableToChildrenChanged;
413 m_widthAvailableToChildrenChanged = false; 413 m_widthAvailableToChildrenChanged = false;
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 } 2135 }
2136 2136
2137 return availableHeight; 2137 return availableHeight;
2138 } 2138 }
2139 2139
2140 bool LayoutBlock::hasDefiniteLogicalHeight() const { 2140 bool LayoutBlock::hasDefiniteLogicalHeight() const {
2141 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); 2141 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1);
2142 } 2142 }
2143 2143
2144 } // namespace blink 2144 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698