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

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: comments 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 3124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3135 return 0; 3135 return 0;
3136 } 3136 }
3137 3137
3138 bool LayoutObject::isInert() const { 3138 bool LayoutObject::isInert() const {
3139 const LayoutObject* layoutObject = this; 3139 const LayoutObject* layoutObject = this;
3140 while (!layoutObject->node()) 3140 while (!layoutObject->node())
3141 layoutObject = layoutObject->parent(); 3141 layoutObject = layoutObject->parent();
3142 return layoutObject->node()->isInert(); 3142 return layoutObject->node()->isInert();
3143 } 3143 }
3144 3144
3145 void LayoutObject::imageChanged(ImageResource* image, const IntRect* rect) { 3145 void LayoutObject::imageChanged(ImageResourceContent* image,
3146 const IntRect* rect) {
3146 ASSERT(m_node); 3147 ASSERT(m_node);
3147 3148
3148 // Image change notifications should not be received during paint because 3149 // Image change notifications should not be received during paint because
3149 // the resulting invalidations will be cleared following paint. This can also 3150 // the resulting invalidations will be cleared following paint. This can also
3150 // lead to modifying the tree out from under paint(), see: crbug.com/616700. 3151 // lead to modifying the tree out from under paint(), see: crbug.com/616700.
3151 DCHECK(document().lifecycle().state() != 3152 DCHECK(document().lifecycle().state() !=
3152 DocumentLifecycle::LifecycleState::InPaint); 3153 DocumentLifecycle::LifecycleState::InPaint);
3153 3154
3154 imageChanged(static_cast<WrappedImagePtr>(image), rect); 3155 imageChanged(static_cast<WrappedImagePtr>(image), rect);
3155 } 3156 }
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
3502 const blink::LayoutObject* root = object1; 3503 const blink::LayoutObject* root = object1;
3503 while (root->parent()) 3504 while (root->parent())
3504 root = root->parent(); 3505 root = root->parent();
3505 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3506 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3506 } else { 3507 } else {
3507 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3508 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3508 } 3509 }
3509 } 3510 }
3510 3511
3511 #endif 3512 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698