| 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 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 // TODO(rune@opera.com): We should use the diff to determine whether a r
epaint vs. layout | 1755 // TODO(rune@opera.com): We should use the diff to determine whether a r
epaint vs. layout |
| 1756 // is needed, but for now just assume a layout will be required. The dif
f code | 1756 // is needed, but for now just assume a layout will be required. The dif
f code |
| 1757 // in LayoutObject::setStyle would need to be factored out so that it co
uld be reused. | 1757 // in LayoutObject::setStyle would need to be factored out so that it co
uld be reused. |
| 1758 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalida
tionReason::StyleChange); | 1758 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalida
tionReason::StyleChange); |
| 1759 } | 1759 } |
| 1760 } | 1760 } |
| 1761 | 1761 |
| 1762 void LayoutObject::markContainingBlocksForOverflowRecalc() | 1762 void LayoutObject::markContainingBlocksForOverflowRecalc() |
| 1763 { | 1763 { |
| 1764 for (LayoutBlock* container = containingBlock(); container && !container->ch
ildNeedsOverflowRecalcAfterStyleChange(); container = container->containingBlock
()) | 1764 for (LayoutBlock* container = containingBlock(); container && !container->ch
ildNeedsOverflowRecalcAfterStyleChange(); container = container->containingBlock
()) |
| 1765 container->setChildNeedsOverflowRecalcAfterStyleChange(true); | 1765 container->setChildNeedsOverflowRecalcAfterStyleChange(); |
| 1766 } | 1766 } |
| 1767 | 1767 |
| 1768 void LayoutObject::setNeedsOverflowRecalcAfterStyleChange() | 1768 void LayoutObject::setNeedsOverflowRecalcAfterStyleChange() |
| 1769 { | 1769 { |
| 1770 bool neededRecalc = needsOverflowRecalcAfterStyleChange(); | 1770 bool neededRecalc = needsOverflowRecalcAfterStyleChange(); |
| 1771 setSelfNeedsOverflowRecalcAfterStyleChange(true); | 1771 setSelfNeedsOverflowRecalcAfterStyleChange(); |
| 1772 if (!neededRecalc) | 1772 if (!neededRecalc) |
| 1773 markContainingBlocksForOverflowRecalc(); | 1773 markContainingBlocksForOverflowRecalc(); |
| 1774 } | 1774 } |
| 1775 | 1775 |
| 1776 void LayoutObject::setStyle(PassRefPtr<ComputedStyle> style) | 1776 void LayoutObject::setStyle(PassRefPtr<ComputedStyle> style) |
| 1777 { | 1777 { |
| 1778 ASSERT(style); | 1778 ASSERT(style); |
| 1779 | 1779 |
| 1780 if (m_style == style) { | 1780 if (m_style == style) { |
| 1781 // We need to run through adjustStyleDifference() for iframes, plugins,
and canvas so | 1781 // We need to run through adjustStyleDifference() for iframes, plugins,
and canvas so |
| (...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3384 const blink::LayoutObject* root = object1; | 3384 const blink::LayoutObject* root = object1; |
| 3385 while (root->parent()) | 3385 while (root->parent()) |
| 3386 root = root->parent(); | 3386 root = root->parent(); |
| 3387 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3387 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3388 } else { | 3388 } else { |
| 3389 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3389 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3390 } | 3390 } |
| 3391 } | 3391 } |
| 3392 | 3392 |
| 3393 #endif | 3393 #endif |
| OLD | NEW |