| OLD | NEW |
| 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 } else { | 890 } else { |
| 891 layer()->scrollableArea()->updateAfterLayout(); | 891 layer()->scrollableArea()->updateAfterLayout(); |
| 892 } | 892 } |
| 893 } | 893 } |
| 894 } | 894 } |
| 895 | 895 |
| 896 void LayoutBlock::layout() | 896 void LayoutBlock::layout() |
| 897 { | 897 { |
| 898 LayoutAnalyzer::Scope analyzer(*this); | 898 LayoutAnalyzer::Scope analyzer(*this); |
| 899 | 899 |
| 900 bool needsScrollAnchoring = RuntimeEnabledFeatures::scrollAnchoringEnabled()
&& hasOverflowClip(); |
| 901 if (needsScrollAnchoring) |
| 902 scrollableArea()->scrollAnchor().save(); |
| 903 |
| 900 // Table cells call layoutBlock directly, so don't add any logic here. Put
code into | 904 // Table cells call layoutBlock directly, so don't add any logic here. Put
code into |
| 901 // layoutBlock(). | 905 // layoutBlock(). |
| 902 layoutBlock(false); | 906 layoutBlock(false); |
| 903 | 907 |
| 904 // It's safe to check for control clip here, since controls can never be tab
le cells. | 908 // It's safe to check for control clip here, since controls can never be tab
le cells. |
| 905 // If we have a lightweight clip, there can never be any overflow from child
ren. | 909 // If we have a lightweight clip, there can never be any overflow from child
ren. |
| 906 if (hasControlClip() && m_overflow) | 910 if (hasControlClip() && m_overflow) |
| 907 clearLayoutOverflow(); | 911 clearLayoutOverflow(); |
| 908 | 912 |
| 909 invalidateBackgroundObscurationStatus(); | 913 invalidateBackgroundObscurationStatus(); |
| 914 |
| 915 if (needsScrollAnchoring) |
| 916 scrollableArea()->scrollAnchor().restore(); |
| 910 } | 917 } |
| 911 | 918 |
| 912 bool LayoutBlock::widthAvailableToChildrenHasChanged() | 919 bool LayoutBlock::widthAvailableToChildrenHasChanged() |
| 913 { | 920 { |
| 914 bool widthAvailableToChildrenHasChanged = m_widthAvailableToChildrenChanged; | 921 bool widthAvailableToChildrenHasChanged = m_widthAvailableToChildrenChanged; |
| 915 m_widthAvailableToChildrenChanged = false; | 922 m_widthAvailableToChildrenChanged = false; |
| 916 | 923 |
| 917 // If we use border-box sizing, have percentage padding, and our parent has
changed width then the width available to our children has changed even | 924 // If we use border-box sizing, have percentage padding, and our parent has
changed width then the width available to our children has changed even |
| 918 // though our own width has remained the same. | 925 // though our own width has remained the same. |
| 919 widthAvailableToChildrenHasChanged |= style()->boxSizing() == BORDER_BOX &&
needsPreferredWidthsRecalculation() && view()->layoutState()->containingBlockLog
icalWidthChanged(); | 926 widthAvailableToChildrenHasChanged |= style()->boxSizing() == BORDER_BOX &&
needsPreferredWidthsRecalculation() && view()->layoutState()->containingBlockLog
icalWidthChanged(); |
| (...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2858 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const | 2865 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout
Object* obj) const |
| 2859 { | 2866 { |
| 2860 showLayoutObject(); | 2867 showLayoutObject(); |
| 2861 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2868 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 2862 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2869 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 2863 } | 2870 } |
| 2864 | 2871 |
| 2865 #endif | 2872 #endif |
| 2866 | 2873 |
| 2867 } // namespace blink | 2874 } // namespace blink |
| OLD | NEW |