| 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 3216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3227 { | 3227 { |
| 3228 const LayoutObject* layoutObject = this; | 3228 const LayoutObject* layoutObject = this; |
| 3229 while (!layoutObject->node()) | 3229 while (!layoutObject->node()) |
| 3230 layoutObject = layoutObject->parent(); | 3230 layoutObject = layoutObject->parent(); |
| 3231 return layoutObject->node()->isInert(); | 3231 return layoutObject->node()->isInert(); |
| 3232 } | 3232 } |
| 3233 | 3233 |
| 3234 void LayoutObject::imageChanged(ImageResource* image, const IntRect* rect) | 3234 void LayoutObject::imageChanged(ImageResource* image, const IntRect* rect) |
| 3235 { | 3235 { |
| 3236 ASSERT(m_node); | 3236 ASSERT(m_node); |
| 3237 |
| 3238 // Image change notifications should not be received during paint because |
| 3239 // the resulting invalidations will be cleared following paint. This can als
o |
| 3240 // lead to modifying the tree out from under paint(), see: crbug.com/616700. |
| 3241 DCHECK(document().lifecycle().state() != DocumentLifecycle::LifecycleState::
InPaint); |
| 3242 |
| 3237 imageChanged(static_cast<WrappedImagePtr>(image), rect); | 3243 imageChanged(static_cast<WrappedImagePtr>(image), rect); |
| 3238 } | 3244 } |
| 3239 | 3245 |
| 3240 Element* LayoutObject::offsetParent() const | 3246 Element* LayoutObject::offsetParent() const |
| 3241 { | 3247 { |
| 3242 if (isDocumentElement() || isBody()) | 3248 if (isDocumentElement() || isBody()) |
| 3243 return nullptr; | 3249 return nullptr; |
| 3244 | 3250 |
| 3245 if (isOutOfFlowPositioned() && style()->position() == FixedPosition) | 3251 if (isOutOfFlowPositioned() && style()->position() == FixedPosition) |
| 3246 return nullptr; | 3252 return nullptr; |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3701 const blink::LayoutObject* root = object1; | 3707 const blink::LayoutObject* root = object1; |
| 3702 while (root->parent()) | 3708 while (root->parent()) |
| 3703 root = root->parent(); | 3709 root = root->parent(); |
| 3704 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3710 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3705 } else { | 3711 } else { |
| 3706 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3712 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3707 } | 3713 } |
| 3708 } | 3714 } |
| 3709 | 3715 |
| 3710 #endif | 3716 #endif |
| OLD | NEW |