Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2469873002: [ImageResource 4] Split ImageResource into Resource and Image parts (Closed)
Patch Set: fix Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 3121 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 return 0; 3132 return 0;
3133 } 3133 }
3134 3134
3135 bool LayoutObject::isInert() const { 3135 bool LayoutObject::isInert() const {
3136 const LayoutObject* layoutObject = this; 3136 const LayoutObject* layoutObject = this;
3137 while (!layoutObject->node()) 3137 while (!layoutObject->node())
3138 layoutObject = layoutObject->parent(); 3138 layoutObject = layoutObject->parent();
3139 return layoutObject->node()->isInert(); 3139 return layoutObject->node()->isInert();
3140 } 3140 }
3141 3141
3142 void LayoutObject::imageChanged(ImageResource* image, const IntRect* rect) { 3142 void LayoutObject::imageChanged(ImageResourceContent* image,
3143 const IntRect* rect) {
3143 ASSERT(m_node); 3144 ASSERT(m_node);
3144 3145
3145 // Image change notifications should not be received during paint because 3146 // Image change notifications should not be received during paint because
3146 // the resulting invalidations will be cleared following paint. This can also 3147 // the resulting invalidations will be cleared following paint. This can also
3147 // lead to modifying the tree out from under paint(), see: crbug.com/616700. 3148 // lead to modifying the tree out from under paint(), see: crbug.com/616700.
3148 DCHECK(document().lifecycle().state() != 3149 DCHECK(document().lifecycle().state() !=
3149 DocumentLifecycle::LifecycleState::InPaint); 3150 DocumentLifecycle::LifecycleState::InPaint);
3150 3151
3151 imageChanged(static_cast<WrappedImagePtr>(image), rect); 3152 imageChanged(static_cast<WrappedImagePtr>(image), rect);
3152 } 3153 }
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
3501 const blink::LayoutObject* root = object1; 3502 const blink::LayoutObject* root = object1;
3502 while (root->parent()) 3503 while (root->parent())
3503 root = root->parent(); 3504 root = root->parent();
3504 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3505 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3505 } else { 3506 } else {
3506 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3507 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3507 } 3508 }
3508 } 3509 }
3509 3510
3510 #endif 3511 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698