OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@gmail.com> | 9 * Christian Biesinger <cbiesinger@gmail.com> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
675 // Force an update since we know the scrollbars have changed things. | 675 // Force an update since we know the scrollbars have changed things. |
676 if (box().document().hasAnnotatedRegions()) | 676 if (box().document().hasAnnotatedRegions()) |
677 box().document().setAnnotatedRegionsDirty(true); | 677 box().document().setAnnotatedRegionsDirty(true); |
678 | 678 |
679 // Our proprietary overflow: overlay value doesn't trigger a layout. | 679 // Our proprietary overflow: overlay value doesn't trigger a layout. |
680 if ((horizontalScrollBarChanged && box().style()->overflowX() != Overflo wOverlay) || (verticalScrollBarChanged && box().style()->overflowY() != Overflow Overlay)) { | 680 if ((horizontalScrollBarChanged && box().style()->overflowX() != Overflo wOverlay) || (verticalScrollBarChanged && box().style()->overflowY() != Overflow Overlay)) { |
681 if (!m_inOverflowRelayout) { | 681 if (!m_inOverflowRelayout) { |
682 m_inOverflowRelayout = true; | 682 m_inOverflowRelayout = true; |
683 if (delayedLayoutScope) { | 683 if (delayedLayoutScope) { |
684 delayedLayoutScope->setNeedsLayout(&box(), LayoutInvalidatio nReason::ScrollbarChanged); | 684 delayedLayoutScope->setNeedsLayout(&box(), LayoutInvalidatio nReason::ScrollbarChanged); |
685 // Since we can't pass true to layoutBlock to force relaying out the children, mark them explicitly. | |
686 // They do have to be laid out again because their available width has now changed. | |
687 for (LayoutObject* child = box().slowFirstChild(); child; ch ild = child->nextSibling()) | |
688 delayedLayoutScope->setNeedsLayout(child, LayoutInvalida tionReason::ScrollbarChanged); | |
mstensho (USE GERRIT)
2016/03/17 19:57:06
Aren't you going to miss marking out-of-flow posit
cbiesinger
2016/03/17 20:03:03
Um, good question. I'm not familiar with that part
mstensho (USE GERRIT)
2016/03/17 20:24:07
Maybe this (based on the test already in this CL)?
| |
685 didMarkForDelayedLayout = true; | 689 didMarkForDelayedLayout = true; |
686 } else { | 690 } else { |
687 SubtreeLayoutScope layoutScope(box()); | 691 SubtreeLayoutScope layoutScope(box()); |
688 layoutScope.setNeedsLayout(&box(), LayoutInvalidationReason: :ScrollbarChanged); | 692 layoutScope.setNeedsLayout(&box(), LayoutInvalidationReason: :ScrollbarChanged); |
689 if (box().isLayoutBlock()) { | 693 if (box().isLayoutBlock()) { |
690 LayoutBlock& block = toLayoutBlock(box()); | 694 LayoutBlock& block = toLayoutBlock(box()); |
691 block.scrollbarsChanged(horizontalScrollBarChanged, vert icalScrollBarChanged); | 695 block.scrollbarsChanged(horizontalScrollBarChanged, vert icalScrollBarChanged); |
692 block.layoutBlock(true); | 696 block.layoutBlock(true); |
693 } else { | 697 } else { |
694 box().layout(); | 698 box().layout(); |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1583 } | 1587 } |
1584 | 1588 |
1585 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 1589 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) |
1586 { | 1590 { |
1587 visitor->trace(m_scrollableArea); | 1591 visitor->trace(m_scrollableArea); |
1588 visitor->trace(m_hBar); | 1592 visitor->trace(m_hBar); |
1589 visitor->trace(m_vBar); | 1593 visitor->trace(m_vBar); |
1590 } | 1594 } |
1591 | 1595 |
1592 } // namespace blink | 1596 } // namespace blink |
OLD | NEW |