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. | 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 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2497 if (skipInfo) { | 2497 if (skipInfo) { |
2498 // We jumped directly from the spanner to the multicol container. Need to | 2498 // We jumped directly from the spanner to the multicol container. Need to |
2499 // check if we skipped |ancestor| or filter/reflection on the way. | 2499 // check if we skipped |ancestor| or filter/reflection on the way. |
2500 for (LayoutObject* walker = parent(); | 2500 for (LayoutObject* walker = parent(); |
2501 walker && walker != multicolContainer; walker = walker->parent()) | 2501 walker && walker != multicolContainer; walker = walker->parent()) |
2502 skipInfo->update(*walker); | 2502 skipInfo->update(*walker); |
2503 } | 2503 } |
2504 return multicolContainer; | 2504 return multicolContainer; |
2505 } | 2505 } |
2506 | 2506 |
2507 if (isFloating()) | 2507 if (isFloating()) { |
2508 return containingBlock(skipInfo); | 2508 // Skip non-atomic inline ancestors, but nothing else. We want to stop at |
| 2509 // e.g. LayoutMedia objects, since they act as containing blocks but do not |
| 2510 // inherit from LayoutBlock (so we cannot just use containingBlock() here). |
| 2511 for (LayoutObject* walker = parent(); walker; walker = walker->parent()) { |
| 2512 if (!walker->isLayoutInline()) |
| 2513 return walker; |
| 2514 if (skipInfo) |
| 2515 skipInfo->update(*walker); |
| 2516 } |
| 2517 } |
2509 | 2518 |
2510 return parent(); | 2519 return parent(); |
2511 } | 2520 } |
2512 | 2521 |
2513 inline LayoutObject* LayoutObject::paintInvalidationParent() const { | 2522 inline LayoutObject* LayoutObject::paintInvalidationParent() const { |
2514 if (isLayoutView()) | 2523 if (isLayoutView()) |
2515 return LayoutAPIShim::layoutObjectFrom(frame()->ownerLayoutItem()); | 2524 return LayoutAPIShim::layoutObjectFrom(frame()->ownerLayoutItem()); |
2516 return parent(); | 2525 return parent(); |
2517 } | 2526 } |
2518 | 2527 |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3497 const blink::LayoutObject* root = object1; | 3506 const blink::LayoutObject* root = object1; |
3498 while (root->parent()) | 3507 while (root->parent()) |
3499 root = root->parent(); | 3508 root = root->parent(); |
3500 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3509 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3501 } else { | 3510 } else { |
3502 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3511 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3503 } | 3512 } |
3504 } | 3513 } |
3505 | 3514 |
3506 #endif | 3515 #endif |
OLD | NEW |