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 3226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3237 ObjectPaintProperties& LayoutObject::ensureObjectPaintProperties() | 3237 ObjectPaintProperties& LayoutObject::ensureObjectPaintProperties() |
3238 { | 3238 { |
3239 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); | 3239 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()); |
3240 auto addResult = objectPaintPropertiesMap().add(this, nullptr); | 3240 auto addResult = objectPaintPropertiesMap().add(this, nullptr); |
3241 if (addResult.isNewEntry) | 3241 if (addResult.isNewEntry) |
3242 addResult.storedValue->value = ObjectPaintProperties::create(); | 3242 addResult.storedValue->value = ObjectPaintProperties::create(); |
3243 | 3243 |
3244 return *addResult.storedValue->value; | 3244 return *addResult.storedValue->value; |
3245 } | 3245 } |
3246 | 3246 |
| 3247 LayoutRect LayoutObject::debugRect() const |
| 3248 { |
| 3249 LayoutRect rect; |
| 3250 LayoutBlock* block = containingBlock(); |
| 3251 if (block) |
| 3252 block->adjustChildDebugRect(rect); |
| 3253 |
| 3254 return rect; |
| 3255 } |
| 3256 |
3247 } // namespace blink | 3257 } // namespace blink |
3248 | 3258 |
3249 #ifndef NDEBUG | 3259 #ifndef NDEBUG |
3250 | 3260 |
3251 void showTree(const blink::LayoutObject* object) | 3261 void showTree(const blink::LayoutObject* object) |
3252 { | 3262 { |
3253 if (object) | 3263 if (object) |
3254 object->showTreeForThis(); | 3264 object->showTreeForThis(); |
3255 else | 3265 else |
3256 WTFLogAlways("%s", "Cannot showTree. Root is (nil)"); | 3266 WTFLogAlways("%s", "Cannot showTree. Root is (nil)"); |
(...skipping 18 matching lines...) Expand all Loading... |
3275 const blink::LayoutObject* root = object1; | 3285 const blink::LayoutObject* root = object1; |
3276 while (root->parent()) | 3286 while (root->parent()) |
3277 root = root->parent(); | 3287 root = root->parent(); |
3278 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3288 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3279 } else { | 3289 } else { |
3280 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3290 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3281 } | 3291 } |
3282 } | 3292 } |
3283 | 3293 |
3284 #endif | 3294 #endif |
OLD | NEW |