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 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1723 // this condition in the future as we move renderer changes out of layout an
d into style changes. | 1723 // this condition in the future as we move renderer changes out of layout an
d into style changes. |
1724 if (doesNotNeedLayoutOrPaintInvalidation) | 1724 if (doesNotNeedLayoutOrPaintInvalidation) |
1725 return; | 1725 return; |
1726 | 1726 |
1727 // Now that the layer (if any) has been updated, we need to adjust the diff
again, | 1727 // Now that the layer (if any) has been updated, we need to adjust the diff
again, |
1728 // check whether we should layout now, and decide if we need to invalidate p
aints. | 1728 // check whether we should layout now, and decide if we need to invalidate p
aints. |
1729 StyleDifference updatedDiff = adjustStyleDifference(diff); | 1729 StyleDifference updatedDiff = adjustStyleDifference(diff); |
1730 | 1730 |
1731 if (!diff.needsFullLayout()) { | 1731 if (!diff.needsFullLayout()) { |
1732 if (updatedDiff.needsFullLayout()) | 1732 if (updatedDiff.needsFullLayout()) |
1733 setNeedsLayoutAndPrefWidthsRecalc(); | 1733 setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::StyleCha
nge); |
1734 else if (updatedDiff.needsPositionedMovementLayout()) | 1734 else if (updatedDiff.needsPositionedMovementLayout()) |
1735 setNeedsPositionedMovementLayout(); | 1735 setNeedsPositionedMovementLayout(); |
1736 } | 1736 } |
1737 | 1737 |
1738 if (diff.transformChanged() && !needsLayout()) { | 1738 if (diff.transformChanged() && !needsLayout()) { |
1739 if (LayoutBlock* container = containingBlock()) | 1739 if (LayoutBlock* container = containingBlock()) |
1740 container->setNeedsOverflowRecalcAfterStyleChange(); | 1740 container->setNeedsOverflowRecalcAfterStyleChange(); |
1741 } | 1741 } |
1742 | 1742 |
1743 if (updatedDiff.needsPaintInvalidationLayer()) | 1743 if (updatedDiff.needsPaintInvalidationLayer()) |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1871 // directly affect the containing block of this object is a change to | 1871 // directly affect the containing block of this object is a change to |
1872 // the position style. | 1872 // the position style. |
1873 if (needsLayout() && oldStyle->position() != m_style->position()) | 1873 if (needsLayout() && oldStyle->position() != m_style->position()) |
1874 markContainerChainForLayout(); | 1874 markContainerChainForLayout(); |
1875 | 1875 |
1876 // Ditto. | 1876 // Ditto. |
1877 if (needsOverflowRecalcAfterStyleChange() && oldStyle->position() != m_s
tyle->position()) | 1877 if (needsOverflowRecalcAfterStyleChange() && oldStyle->position() != m_s
tyle->position()) |
1878 markContainingBlocksForOverflowRecalc(); | 1878 markContainingBlocksForOverflowRecalc(); |
1879 | 1879 |
1880 if (diff.needsFullLayout()) | 1880 if (diff.needsFullLayout()) |
1881 setNeedsLayoutAndPrefWidthsRecalc(); | 1881 setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::StyleCha
nge); |
1882 } else if (diff.needsPositionedMovementLayout()) { | 1882 } else if (diff.needsPositionedMovementLayout()) { |
1883 setNeedsPositionedMovementLayout(); | 1883 setNeedsPositionedMovementLayout(); |
1884 } | 1884 } |
1885 | 1885 |
1886 // Don't check for paint invalidation here; we need to wait until the layer
has been | 1886 // Don't check for paint invalidation here; we need to wait until the layer
has been |
1887 // updated by subclasses before we know if we have to invalidate paints (in
setStyle()). | 1887 // updated by subclasses before we know if we have to invalidate paints (in
setStyle()). |
1888 | 1888 |
1889 if (oldStyle && !areCursorsEqual(oldStyle, style())) { | 1889 if (oldStyle && !areCursorsEqual(oldStyle, style())) { |
1890 if (LocalFrame* frame = this->frame()) | 1890 if (LocalFrame* frame = this->frame()) |
1891 frame->eventHandler().scheduleCursorUpdate(); | 1891 frame->eventHandler().scheduleCursorUpdate(); |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3245 { | 3245 { |
3246 if (object1) { | 3246 if (object1) { |
3247 const blink::LayoutObject* root = object1; | 3247 const blink::LayoutObject* root = object1; |
3248 while (root->parent()) | 3248 while (root->parent()) |
3249 root = root->parent(); | 3249 root = root->parent(); |
3250 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3250 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3251 } | 3251 } |
3252 } | 3252 } |
3253 | 3253 |
3254 #endif | 3254 #endif |
OLD | NEW |