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 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2487 toImageContentData(m_style->contentData())->image()->removeClient(th
is); | 2487 toImageContentData(m_style->contentData())->image()->removeClient(th
is); |
2488 | 2488 |
2489 if (m_style->boxReflect() && m_style->boxReflect()->mask().image()) | 2489 if (m_style->boxReflect() && m_style->boxReflect()->mask().image()) |
2490 m_style->boxReflect()->mask().image()->removeClient(this); | 2490 m_style->boxReflect()->mask().image()->removeClient(this); |
2491 | 2491 |
2492 removeShapeImageClient(m_style->shapeOutside()); | 2492 removeShapeImageClient(m_style->shapeOutside()); |
2493 } | 2493 } |
2494 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeLayout
Object(this); | 2494 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeLayout
Object(this); |
2495 | 2495 |
2496 if (frameView()) | 2496 if (frameView()) |
2497 setIsSlowRepaintObject(false); | 2497 setIsBackgroundAttachmentFixedObject(false); |
2498 } | 2498 } |
2499 | 2499 |
2500 void LayoutObject::insertedIntoTree() | 2500 void LayoutObject::insertedIntoTree() |
2501 { | 2501 { |
2502 // FIXME: We should ASSERT(isRooted()) here but generated content makes some
out-of-order insertion. | 2502 // FIXME: We should ASSERT(isRooted()) here but generated content makes some
out-of-order insertion. |
2503 | 2503 |
2504 // Keep our layer hierarchy updated. Optimize for the common case where we d
on't have any children | 2504 // Keep our layer hierarchy updated. Optimize for the common case where we d
on't have any children |
2505 // and don't have a layer attached to ourselves. | 2505 // and don't have a layer attached to ourselves. |
2506 PaintLayer* layer = nullptr; | 2506 PaintLayer* layer = nullptr; |
2507 if (slowFirstChild() || hasLayer()) { | 2507 if (slowFirstChild() || hasLayer()) { |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3389 | 3389 |
3390 void LayoutObject::invalidatePaintIncludingNonSelfPaintingLayerDescendants(const
LayoutBoxModelObject& paintInvalidationContainer) | 3390 void LayoutObject::invalidatePaintIncludingNonSelfPaintingLayerDescendants(const
LayoutBoxModelObject& paintInvalidationContainer) |
3391 { | 3391 { |
3392 invalidatePaintOfPreviousPaintInvalidationRect(paintInvalidationContainer, P
aintInvalidationLayer); | 3392 invalidatePaintOfPreviousPaintInvalidationRect(paintInvalidationContainer, P
aintInvalidationLayer); |
3393 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { | 3393 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { |
3394 if (!child->hasLayer() || !toLayoutBoxModelObject(child)->layer()->isSel
fPaintingLayer()) | 3394 if (!child->hasLayer() || !toLayoutBoxModelObject(child)->layer()->isSel
fPaintingLayer()) |
3395 child->invalidatePaintIncludingNonSelfPaintingLayerDescendants(paint
InvalidationContainer); | 3395 child->invalidatePaintIncludingNonSelfPaintingLayerDescendants(paint
InvalidationContainer); |
3396 } | 3396 } |
3397 } | 3397 } |
3398 | 3398 |
3399 void LayoutObject::setIsSlowRepaintObject(bool isSlowRepaintObject) | 3399 void LayoutObject::setIsBackgroundAttachmentFixedObject(bool isBackgroundAttachm
entFixedObject) |
3400 { | 3400 { |
3401 ASSERT(frameView()); | 3401 ASSERT(frameView()); |
3402 if (m_bitfields.isSlowRepaintObject() == isSlowRepaintObject) | 3402 if (m_bitfields.isBackgroundAttachmentFixedObject() == isBackgroundAttachmen
tFixedObject) |
3403 return; | 3403 return; |
3404 m_bitfields.setIsSlowRepaintObject(isSlowRepaintObject); | 3404 m_bitfields.setIsBackgroundAttachmentFixedObject(isBackgroundAttachmentFixed
Object); |
3405 if (isSlowRepaintObject) | 3405 if (isBackgroundAttachmentFixedObject) |
3406 frameView()->addSlowRepaintObject(); | 3406 frameView()->addBackgroundAttachmentFixedObject(this); |
3407 else | 3407 else |
3408 frameView()->removeSlowRepaintObject(); | 3408 frameView()->removeBackgroundAttachmentFixedObject(this); |
3409 } | 3409 } |
3410 | 3410 |
3411 } // namespace blink | 3411 } // namespace blink |
3412 | 3412 |
3413 #ifndef NDEBUG | 3413 #ifndef NDEBUG |
3414 | 3414 |
3415 void showTree(const blink::LayoutObject* object) | 3415 void showTree(const blink::LayoutObject* object) |
3416 { | 3416 { |
3417 if (object) | 3417 if (object) |
3418 object->showTreeForThis(); | 3418 object->showTreeForThis(); |
(...skipping 20 matching lines...) Expand all Loading... |
3439 const blink::LayoutObject* root = object1; | 3439 const blink::LayoutObject* root = object1; |
3440 while (root->parent()) | 3440 while (root->parent()) |
3441 root = root->parent(); | 3441 root = root->parent(); |
3442 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3442 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3443 } else { | 3443 } else { |
3444 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3444 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3445 } | 3445 } |
3446 } | 3446 } |
3447 | 3447 |
3448 #endif | 3448 #endif |
OLD | NEW |