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 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1596 return "invalidate paint rectangle"; | 1596 return "invalidate paint rectangle"; |
1597 } | 1597 } |
1598 ASSERT_NOT_REACHED(); | 1598 ASSERT_NOT_REACHED(); |
1599 return ""; | 1599 return ""; |
1600 } | 1600 } |
1601 | 1601 |
1602 void RenderObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
alidationState) | 1602 void RenderObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
alidationState) |
1603 { | 1603 { |
1604 // If we didn't need paint invalidation then our children don't need as well
. | 1604 // If we didn't need paint invalidation then our children don't need as well
. |
1605 // Skip walking down the tree as everything should be fine below us. | 1605 // Skip walking down the tree as everything should be fine below us. |
1606 if (!shouldCheckForPaintInvalidation()) | 1606 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) |
1607 return; | 1607 return; |
1608 | 1608 |
1609 clearPaintInvalidationState(); | 1609 clearPaintInvalidationState(paintInvalidationState); |
1610 | 1610 |
1611 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { | 1611 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { |
1612 if (!child->isOutOfFlowPositioned()) | 1612 if (!child->isOutOfFlowPositioned()) |
1613 child->invalidateTreeIfNeeded(paintInvalidationState); | 1613 child->invalidateTreeIfNeeded(paintInvalidationState); |
1614 } | 1614 } |
1615 } | 1615 } |
1616 | 1616 |
1617 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe
cts(const LayoutRect& oldRect, const LayoutRect& newRect) | 1617 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe
cts(const LayoutRect& oldRect, const LayoutRect& newRect) |
1618 { | 1618 { |
1619 TracedValue value; | 1619 TracedValue value; |
(...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3391 { | 3391 { |
3392 ASSERT_NOT_REACHED(); | 3392 ASSERT_NOT_REACHED(); |
3393 return false; | 3393 return false; |
3394 } | 3394 } |
3395 | 3395 |
3396 bool RenderObject::isRelayoutBoundaryForInspector() const | 3396 bool RenderObject::isRelayoutBoundaryForInspector() const |
3397 { | 3397 { |
3398 return objectIsRelayoutBoundary(this); | 3398 return objectIsRelayoutBoundary(this); |
3399 } | 3399 } |
3400 | 3400 |
3401 void RenderObject::clearPaintInvalidationState() | 3401 void RenderObject::clearPaintInvalidationState(const PaintInvalidationState& pai
ntInvalidationState) |
3402 { | 3402 { |
3403 // paintInvalidationStateIsDirty should be kept in sync with the | 3403 // paintInvalidationStateIsDirty should be kept in sync with the |
3404 // booleans that are cleared below. | 3404 // booleans that are cleared below. |
3405 ASSERT(paintInvalidationStateIsDirty()); | 3405 ASSERT(paintInvalidationState.forceCheckForPaintInvalidation() || paintInval
idationStateIsDirty()); |
3406 setShouldDoFullPaintInvalidation(false); | 3406 setShouldDoFullPaintInvalidation(false); |
3407 setShouldDoFullPaintInvalidationIfSelfPaintingLayer(false); | 3407 setShouldDoFullPaintInvalidationIfSelfPaintingLayer(false); |
3408 setOnlyNeededPositionedMovementLayout(false); | 3408 setOnlyNeededPositionedMovementLayout(false); |
3409 setNeededLayoutBecauseOfChildren(false); | 3409 setNeededLayoutBecauseOfChildren(false); |
3410 setShouldInvalidateOverflowForPaint(false); | 3410 setShouldInvalidateOverflowForPaint(false); |
3411 setLayoutDidGetCalled(false); | 3411 setLayoutDidGetCalled(false); |
3412 setMayNeedPaintInvalidation(false); | 3412 setMayNeedPaintInvalidation(false); |
3413 } | 3413 } |
3414 | 3414 |
3415 bool RenderObject::isAllowedToModifyRenderTreeStructure(Document& document) | 3415 bool RenderObject::isAllowedToModifyRenderTreeStructure(Document& document) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3453 { | 3453 { |
3454 if (object1) { | 3454 if (object1) { |
3455 const blink::RenderObject* root = object1; | 3455 const blink::RenderObject* root = object1; |
3456 while (root->parent()) | 3456 while (root->parent()) |
3457 root = root->parent(); | 3457 root = root->parent(); |
3458 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3458 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3459 } | 3459 } |
3460 } | 3460 } |
3461 | 3461 |
3462 #endif | 3462 #endif |
OLD | NEW |