| 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 // Not in the middle of layout so have to find the thread the slow way. | 609 // Not in the middle of layout so have to find the thread the slow way. |
| 610 RenderObject* curr = const_cast<RenderObject*>(this); | 610 RenderObject* curr = const_cast<RenderObject*>(this); |
| 611 while (curr) { | 611 while (curr) { |
| 612 if (curr->isRenderFlowThread()) | 612 if (curr->isRenderFlowThread()) |
| 613 return toRenderFlowThread(curr); | 613 return toRenderFlowThread(curr); |
| 614 curr = curr->containingBlock(); | 614 curr = curr->containingBlock(); |
| 615 } | 615 } |
| 616 return 0; | 616 return 0; |
| 617 } | 617 } |
| 618 | 618 |
| 619 bool RenderObject::skipInvalidationWhenLaidOutChildren() const |
| 620 { |
| 621 if (!neededLayoutBecauseOfChildren()) |
| 622 return false; |
| 623 |
| 624 // SVG renderers need to be invalidated when their children are laid out. |
| 625 // RenderBlocks with line boxes are responsible to invalidate them so we can
't ignore them. |
| 626 if (isSVG() || (isRenderBlock() && toRenderBlock(this)->firstLineBox())) |
| 627 return false; |
| 628 |
| 629 return rendererHasNoBoxEffect(); |
| 630 } |
| 631 |
| 619 RenderBlock* RenderObject::firstLineBlock() const | 632 RenderBlock* RenderObject::firstLineBlock() const |
| 620 { | 633 { |
| 621 return 0; | 634 return 0; |
| 622 } | 635 } |
| 623 | 636 |
| 624 static inline bool objectIsRelayoutBoundary(const RenderObject* object) | 637 static inline bool objectIsRelayoutBoundary(const RenderObject* object) |
| 625 { | 638 { |
| 626 // FIXME: In future it may be possible to broaden these conditions in order
to improve performance. | 639 // FIXME: In future it may be possible to broaden these conditions in order
to improve performance. |
| 627 if (object->isTextControl()) | 640 if (object->isTextControl()) |
| 628 return true; | 641 return true; |
| (...skipping 2868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3497 bool RenderObject::isRelayoutBoundaryForInspector() const | 3510 bool RenderObject::isRelayoutBoundaryForInspector() const |
| 3498 { | 3511 { |
| 3499 return objectIsRelayoutBoundary(this); | 3512 return objectIsRelayoutBoundary(this); |
| 3500 } | 3513 } |
| 3501 | 3514 |
| 3502 void RenderObject::clearPaintInvalidationState() | 3515 void RenderObject::clearPaintInvalidationState() |
| 3503 { | 3516 { |
| 3504 setShouldDoFullPaintInvalidationAfterLayout(false); | 3517 setShouldDoFullPaintInvalidationAfterLayout(false); |
| 3505 setShouldDoFullPaintInvalidationIfSelfPaintingLayer(false); | 3518 setShouldDoFullPaintInvalidationIfSelfPaintingLayer(false); |
| 3506 setOnlyNeededPositionedMovementLayout(false); | 3519 setOnlyNeededPositionedMovementLayout(false); |
| 3520 setNeededLayoutBecauseOfChildren(false); |
| 3507 setShouldInvalidateOverflowForPaint(false); | 3521 setShouldInvalidateOverflowForPaint(false); |
| 3508 setLayoutDidGetCalled(false); | 3522 setLayoutDidGetCalled(false); |
| 3509 setMayNeedPaintInvalidation(false); | 3523 setMayNeedPaintInvalidation(false); |
| 3510 } | 3524 } |
| 3511 | 3525 |
| 3512 bool RenderObject::isAllowedToModifyRenderTreeStructure(Document& document) | 3526 bool RenderObject::isAllowedToModifyRenderTreeStructure(Document& document) |
| 3513 { | 3527 { |
| 3514 return DeprecatedDisableModifyRenderTreeStructureAsserts::canModifyRenderTre
eStateInAnyState() | 3528 return DeprecatedDisableModifyRenderTreeStructureAsserts::canModifyRenderTre
eStateInAnyState() |
| 3515 || document.lifecycle().stateAllowsRenderTreeMutations(); | 3529 || document.lifecycle().stateAllowsRenderTreeMutations(); |
| 3516 } | 3530 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3550 { | 3564 { |
| 3551 if (object1) { | 3565 if (object1) { |
| 3552 const WebCore::RenderObject* root = object1; | 3566 const WebCore::RenderObject* root = object1; |
| 3553 while (root->parent()) | 3567 while (root->parent()) |
| 3554 root = root->parent(); | 3568 root = root->parent(); |
| 3555 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3569 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3556 } | 3570 } |
| 3557 } | 3571 } |
| 3558 | 3572 |
| 3559 #endif | 3573 #endif |
| OLD | NEW |