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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 // this condition in the future as we move renderer changes out of layout an
d into style changes. | 1704 // this condition in the future as we move renderer changes out of layout an
d into style changes. |
1705 if (doesNotNeedLayoutOrPaintInvalidation) | 1705 if (doesNotNeedLayoutOrPaintInvalidation) |
1706 return; | 1706 return; |
1707 | 1707 |
1708 // Now that the layer (if any) has been updated, we need to adjust the diff
again, | 1708 // Now that the layer (if any) has been updated, we need to adjust the diff
again, |
1709 // check whether we should layout now, and decide if we need to invalidate p
aints. | 1709 // check whether we should layout now, and decide if we need to invalidate p
aints. |
1710 StyleDifference updatedDiff = adjustStyleDifference(diff); | 1710 StyleDifference updatedDiff = adjustStyleDifference(diff); |
1711 | 1711 |
1712 if (!diff.needsFullLayout()) { | 1712 if (!diff.needsFullLayout()) { |
1713 if (updatedDiff.needsFullLayout()) | 1713 if (updatedDiff.needsFullLayout()) |
1714 setNeedsLayoutAndPrefWidthsRecalc(); | 1714 setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::StyleCha
nge); |
1715 else if (updatedDiff.needsPositionedMovementLayout()) | 1715 else if (updatedDiff.needsPositionedMovementLayout()) |
1716 setNeedsPositionedMovementLayout(); | 1716 setNeedsPositionedMovementLayout(); |
1717 } | 1717 } |
1718 | 1718 |
1719 if (diff.transformChanged() && !needsLayout()) { | 1719 if (diff.transformChanged() && !needsLayout()) { |
1720 if (LayoutBlock* container = containingBlock()) | 1720 if (LayoutBlock* container = containingBlock()) |
1721 container->setNeedsOverflowRecalcAfterStyleChange(); | 1721 container->setNeedsOverflowRecalcAfterStyleChange(); |
1722 } | 1722 } |
1723 | 1723 |
1724 if (updatedDiff.needsPaintInvalidationLayer()) | 1724 if (updatedDiff.needsPaintInvalidationLayer()) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1852 // directly affect the containing block of this object is a change to | 1852 // directly affect the containing block of this object is a change to |
1853 // the position style. | 1853 // the position style. |
1854 if (needsLayout() && oldStyle->position() != m_style->position()) | 1854 if (needsLayout() && oldStyle->position() != m_style->position()) |
1855 markContainerChainForLayout(); | 1855 markContainerChainForLayout(); |
1856 | 1856 |
1857 // Ditto. | 1857 // Ditto. |
1858 if (needsOverflowRecalcAfterStyleChange() && oldStyle->position() != m_s
tyle->position()) | 1858 if (needsOverflowRecalcAfterStyleChange() && oldStyle->position() != m_s
tyle->position()) |
1859 markContainingBlocksForOverflowRecalc(); | 1859 markContainingBlocksForOverflowRecalc(); |
1860 | 1860 |
1861 if (diff.needsFullLayout()) | 1861 if (diff.needsFullLayout()) |
1862 setNeedsLayoutAndPrefWidthsRecalc(); | 1862 setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::StyleCha
nge); |
1863 } else if (diff.needsPositionedMovementLayout()) { | 1863 } else if (diff.needsPositionedMovementLayout()) { |
1864 setNeedsPositionedMovementLayout(); | 1864 setNeedsPositionedMovementLayout(); |
1865 } | 1865 } |
1866 | 1866 |
1867 // Don't check for paint invalidation here; we need to wait until the layer
has been | 1867 // Don't check for paint invalidation here; we need to wait until the layer
has been |
1868 // updated by subclasses before we know if we have to invalidate paints (in
setStyle()). | 1868 // updated by subclasses before we know if we have to invalidate paints (in
setStyle()). |
1869 | 1869 |
1870 if (oldStyle && !areCursorsEqual(oldStyle, style())) { | 1870 if (oldStyle && !areCursorsEqual(oldStyle, style())) { |
1871 if (LocalFrame* frame = this->frame()) | 1871 if (LocalFrame* frame = this->frame()) |
1872 frame->eventHandler().scheduleCursorUpdate(); | 1872 frame->eventHandler().scheduleCursorUpdate(); |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3226 { | 3226 { |
3227 if (object1) { | 3227 if (object1) { |
3228 const blink::LayoutObject* root = object1; | 3228 const blink::LayoutObject* root = object1; |
3229 while (root->parent()) | 3229 while (root->parent()) |
3230 root = root->parent(); | 3230 root = root->parent(); |
3231 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3231 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3232 } | 3232 } |
3233 } | 3233 } |
3234 | 3234 |
3235 #endif | 3235 #endif |
OLD | NEW |