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 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 bool oldStyleSlowScroll = m_style && (m_style->position() == FixedPositi
on || m_style->hasFixedBackgroundImage()); | 1594 bool oldStyleSlowScroll = m_style && (m_style->position() == FixedPositi
on || m_style->hasFixedBackgroundImage()); |
1595 if (oldStyleSlowScroll != newStyleSlowScroll) { | 1595 if (oldStyleSlowScroll != newStyleSlowScroll) { |
1596 if (oldStyleSlowScroll) | 1596 if (oldStyleSlowScroll) |
1597 view()->frameView()->removeSlowRepaintObject(); | 1597 view()->frameView()->removeSlowRepaintObject(); |
1598 if (newStyleSlowScroll) | 1598 if (newStyleSlowScroll) |
1599 view()->frameView()->addSlowRepaintObject(); | 1599 view()->frameView()->addSlowRepaintObject(); |
1600 } | 1600 } |
1601 } | 1601 } |
1602 } | 1602 } |
1603 | 1603 |
1604 void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle*) | 1604 void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle* oldSt
yle) |
1605 { | 1605 { |
1606 if (s_affectsParentBlock) | 1606 if (s_affectsParentBlock) |
1607 handleDynamicFloatPositionChange(); | 1607 handleDynamicFloatPositionChange(); |
1608 | 1608 |
1609 if (!m_parent) | 1609 if (!m_parent) |
1610 return; | 1610 return; |
1611 | 1611 |
1612 if (diff == StyleDifferenceLayout) | 1612 if (diff == StyleDifferenceLayout) { |
| 1613 RenderCounter::rendererStyleChanged(this, oldStyle, m_style.get()); |
1613 | 1614 |
1614 // If the object already needs layout, then setNeedsLayout won't do | 1615 // If the object already needs layout, then setNeedsLayout won't do |
1615 // any work. But if the containing block has changed, then we may need | 1616 // any work. But if the containing block has changed, then we may need |
1616 // to make the new containing blocks for layout. The change that can | 1617 // to make the new containing blocks for layout. The change that can |
1617 // directly affect the containing block of this object is a change to | 1618 // directly affect the containing block of this object is a change to |
1618 // the position style. | 1619 // the position style. |
1619 if (m_needsLayout && oldStyle->position() != m_style->position()) | 1620 if (m_needsLayout && oldStyle->position() != m_style->position()) |
1620 markContainingBlocksForLayout(); | 1621 markContainingBlocksForLayout(); |
1621 | 1622 |
1622 setNeedsLayoutAndPrefWidthsRecalc(); | 1623 setNeedsLayoutAndPrefWidthsRecalc(); |
1623 else if (diff == StyleDifferenceLayoutPositionedMovementOnly) | 1624 } else if (diff == StyleDifferenceLayoutPositionedMovementOnly) |
1624 setNeedsPositionedMovementLayout(); | 1625 setNeedsPositionedMovementLayout(); |
1625 | 1626 |
1626 // Don't check for repaint here; we need to wait until the layer has been | 1627 // Don't check for repaint here; we need to wait until the layer has been |
1627 // updated by subclasses before we know if we have to repaint (in setStyle()
). | 1628 // updated by subclasses before we know if we have to repaint (in setStyle()
). |
1628 } | 1629 } |
1629 | 1630 |
1630 void RenderObject::updateFillImages(const FillLayer* oldLayers, const FillLayer*
newLayers) | 1631 void RenderObject::updateFillImages(const FillLayer* oldLayers, const FillLayer*
newLayers) |
1631 { | 1632 { |
1632 // Optimize the common case | 1633 // Optimize the common case |
1633 if (oldLayers && !oldLayers->next() && newLayers && !newLayers->next() && (o
ldLayers->image() == newLayers->image())) | 1634 if (oldLayers && !oldLayers->next() && newLayers && !newLayers->next() && (o
ldLayers->image() == newLayers->image())) |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2473 | 2474 |
2474 #ifndef NDEBUG | 2475 #ifndef NDEBUG |
2475 | 2476 |
2476 void showTree(const WebCore::RenderObject* ro) | 2477 void showTree(const WebCore::RenderObject* ro) |
2477 { | 2478 { |
2478 if (ro) | 2479 if (ro) |
2479 ro->showTreeForThis(); | 2480 ro->showTreeForThis(); |
2480 } | 2481 } |
2481 | 2482 |
2482 #endif | 2483 #endif |
OLD | NEW |