| 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 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 if (isImage() || isQuote()) { | 1700 if (isImage() || isQuote()) { |
| 1701 RefPtr<ComputedStyle> style = ComputedStyle::create(); | 1701 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
| 1702 style->inheritFrom(*pseudoStyle); | 1702 style->inheritFrom(*pseudoStyle); |
| 1703 setStyle(style.release()); | 1703 setStyle(style.release()); |
| 1704 return; | 1704 return; |
| 1705 } | 1705 } |
| 1706 | 1706 |
| 1707 setStyle(pseudoStyle); | 1707 setStyle(pseudoStyle); |
| 1708 } | 1708 } |
| 1709 | 1709 |
| 1710 void LayoutObject::firstLineStyleDidChange(const ComputedStyle& oldStyle, const
ComputedStyle& newStyle) |
| 1711 { |
| 1712 StyleDifference diff = oldStyle.visualInvalidationDiff(newStyle); |
| 1713 if (diff.hasDifference()) { |
| 1714 // TODO(rune@opera.com): We should use the diff to determine whether a r
epaint vs. layout |
| 1715 // is needed, but for now just assume a layout will be required. The dif
f code |
| 1716 // in LayoutObject::setStyle would need to be factored out so that it co
uld be reused. |
| 1717 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalida
tionReason::StyleChange); |
| 1718 } |
| 1719 } |
| 1720 |
| 1710 void LayoutObject::markContainingBlocksForOverflowRecalc() | 1721 void LayoutObject::markContainingBlocksForOverflowRecalc() |
| 1711 { | 1722 { |
| 1712 for (LayoutBlock* container = containingBlock(); container && !container->ch
ildNeedsOverflowRecalcAfterStyleChange(); container = container->containingBlock
()) | 1723 for (LayoutBlock* container = containingBlock(); container && !container->ch
ildNeedsOverflowRecalcAfterStyleChange(); container = container->containingBlock
()) |
| 1713 container->setChildNeedsOverflowRecalcAfterStyleChange(true); | 1724 container->setChildNeedsOverflowRecalcAfterStyleChange(true); |
| 1714 } | 1725 } |
| 1715 | 1726 |
| 1716 void LayoutObject::setNeedsOverflowRecalcAfterStyleChange() | 1727 void LayoutObject::setNeedsOverflowRecalcAfterStyleChange() |
| 1717 { | 1728 { |
| 1718 bool neededRecalc = needsOverflowRecalcAfterStyleChange(); | 1729 bool neededRecalc = needsOverflowRecalcAfterStyleChange(); |
| 1719 setSelfNeedsOverflowRecalcAfterStyleChange(true); | 1730 setSelfNeedsOverflowRecalcAfterStyleChange(true); |
| (...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3254 const blink::LayoutObject* root = object1; | 3265 const blink::LayoutObject* root = object1; |
| 3255 while (root->parent()) | 3266 while (root->parent()) |
| 3256 root = root->parent(); | 3267 root = root->parent(); |
| 3257 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3268 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3258 } else { | 3269 } else { |
| 3259 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3270 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3260 } | 3271 } |
| 3261 } | 3272 } |
| 3262 | 3273 |
| 3263 #endif | 3274 #endif |
| OLD | NEW |