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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 // A positioned object has no effect on the min/max width of its con
taining block ever. | 752 // A positioned object has no effect on the min/max width of its con
taining block ever. |
753 // We can optimize this case and not go up any further. | 753 // We can optimize this case and not go up any further. |
754 break; | 754 break; |
755 o = container; | 755 o = container; |
756 } | 756 } |
757 } | 757 } |
758 | 758 |
759 void RenderObject::setLayerNeedsFullRepaint() | 759 void RenderObject::setLayerNeedsFullRepaint() |
760 { | 760 { |
761 ASSERT(hasLayer()); | 761 ASSERT(hasLayer()); |
762 toRenderLayerModelObject(this)->layer()->repainter().setRepaintStatus(NeedsF
ullRepaint); | 762 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 763 setShouldDoFullRepaintAfterLayout(true); |
| 764 else |
| 765 toRenderLayerModelObject(this)->layer()->repainter().setRepaintStatus(Ne
edsFullRepaint); |
763 } | 766 } |
764 | 767 |
765 void RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout() | 768 void RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout() |
766 { | 769 { |
767 ASSERT(hasLayer()); | 770 ASSERT(hasLayer()); |
768 toRenderLayerModelObject(this)->layer()->repainter().setRepaintStatus(NeedsF
ullRepaintForPositionedMovementLayout); | 771 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 772 setShouldDoFullRepaintAfterLayout(true); |
| 773 else |
| 774 toRenderLayerModelObject(this)->layer()->repainter().setRepaintStatus(Ne
edsFullRepaintForPositionedMovementLayout); |
769 } | 775 } |
770 | 776 |
771 RenderBlock* RenderObject::containerForFixedPosition(const RenderLayerModelObjec
t* repaintContainer, bool* repaintContainerSkipped) const | 777 RenderBlock* RenderObject::containerForFixedPosition(const RenderLayerModelObjec
t* repaintContainer, bool* repaintContainerSkipped) const |
772 { | 778 { |
773 ASSERT(!repaintContainerSkipped || !*repaintContainerSkipped); | 779 ASSERT(!repaintContainerSkipped || !*repaintContainerSkipped); |
774 ASSERT(!isText()); | 780 ASSERT(!isText()); |
775 ASSERT(style()->position() == FixedPosition); | 781 ASSERT(style()->position() == FixedPosition); |
776 | 782 |
777 RenderObject* ancestor = parent(); | 783 RenderObject* ancestor = parent(); |
778 for (; ancestor && !ancestor->canContainFixedPositionObjects(); ancestor = a
ncestor->parent()) { | 784 for (; ancestor && !ancestor->canContainFixedPositionObjects(); ancestor = a
ncestor->parent()) { |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 } | 1603 } |
1598 return false; | 1604 return false; |
1599 } | 1605 } |
1600 | 1606 |
1601 void RenderObject::repaintOverflow() | 1607 void RenderObject::repaintOverflow() |
1602 { | 1608 { |
1603 } | 1609 } |
1604 | 1610 |
1605 bool RenderObject::checkForRepaint() const | 1611 bool RenderObject::checkForRepaint() const |
1606 { | 1612 { |
1607 return !document().view()->needsFullRepaint() && !hasLayer() && everHadLayou
t(); | 1613 return !document().view()->needsFullRepaint() && everHadLayout(); |
1608 } | 1614 } |
1609 | 1615 |
1610 bool RenderObject::checkForRepaintDuringLayout() const | 1616 bool RenderObject::checkForRepaintDuringLayout() const |
1611 { | 1617 { |
1612 return !RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && checkForRepai
nt(); | 1618 return !RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && checkForRepai
nt(); |
1613 } | 1619 } |
1614 | 1620 |
1615 LayoutRect RenderObject::rectWithOutlineForRepaint(const RenderLayerModelObject*
repaintContainer, LayoutUnit outlineWidth) const | 1621 LayoutRect RenderObject::rectWithOutlineForRepaint(const RenderLayerModelObject*
repaintContainer, LayoutUnit outlineWidth) const |
1616 { | 1622 { |
1617 LayoutRect r(clippedOverflowRectForRepaint(repaintContainer)); | 1623 LayoutRect r(clippedOverflowRectForRepaint(repaintContainer)); |
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3368 { | 3374 { |
3369 if (object1) { | 3375 if (object1) { |
3370 const WebCore::RenderObject* root = object1; | 3376 const WebCore::RenderObject* root = object1; |
3371 while (root->parent()) | 3377 while (root->parent()) |
3372 root = root->parent(); | 3378 root = root->parent(); |
3373 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3379 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3374 } | 3380 } |
3375 } | 3381 } |
3376 | 3382 |
3377 #endif | 3383 #endif |
OLD | NEW |