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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #include "core/rendering/RenderDeprecatedFlexibleBox.h" | 57 #include "core/rendering/RenderDeprecatedFlexibleBox.h" |
58 #include "core/rendering/RenderFlexibleBox.h" | 58 #include "core/rendering/RenderFlexibleBox.h" |
59 #include "core/rendering/RenderFlowThread.h" | 59 #include "core/rendering/RenderFlowThread.h" |
60 #include "core/rendering/RenderGeometryMap.h" | 60 #include "core/rendering/RenderGeometryMap.h" |
61 #include "core/rendering/RenderGrid.h" | 61 #include "core/rendering/RenderGrid.h" |
62 #include "core/rendering/RenderImage.h" | 62 #include "core/rendering/RenderImage.h" |
63 #include "core/rendering/RenderImageResourceStyleImage.h" | 63 #include "core/rendering/RenderImageResourceStyleImage.h" |
64 #include "core/rendering/RenderInline.h" | 64 #include "core/rendering/RenderInline.h" |
65 #include "core/rendering/RenderLayer.h" | 65 #include "core/rendering/RenderLayer.h" |
66 #include "core/rendering/RenderListItem.h" | 66 #include "core/rendering/RenderListItem.h" |
| 67 #include "core/rendering/RenderMultiColumnSpannerPlaceholder.h" |
67 #include "core/rendering/RenderObjectInlines.h" | 68 #include "core/rendering/RenderObjectInlines.h" |
68 #include "core/rendering/RenderPart.h" | 69 #include "core/rendering/RenderPart.h" |
69 #include "core/rendering/RenderScrollbarPart.h" | 70 #include "core/rendering/RenderScrollbarPart.h" |
70 #include "core/rendering/RenderTableCaption.h" | 71 #include "core/rendering/RenderTableCaption.h" |
71 #include "core/rendering/RenderTableCell.h" | 72 #include "core/rendering/RenderTableCell.h" |
72 #include "core/rendering/RenderTableCol.h" | 73 #include "core/rendering/RenderTableCol.h" |
73 #include "core/rendering/RenderTableRow.h" | 74 #include "core/rendering/RenderTableRow.h" |
74 #include "core/rendering/RenderTheme.h" | 75 #include "core/rendering/RenderTheme.h" |
75 #include "core/rendering/RenderView.h" | 76 #include "core/rendering/RenderView.h" |
76 #include "core/rendering/compositing/CompositedLayerMapping.h" | 77 #include "core/rendering/compositing/CompositedLayerMapping.h" |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 } | 829 } |
829 | 830 |
830 o = o->parent(); | 831 o = o->parent(); |
831 } | 832 } |
832 | 833 |
833 if (o && !o->isRenderBlock()) | 834 if (o && !o->isRenderBlock()) |
834 o = o->containingBlock(); | 835 o = o->containingBlock(); |
835 | 836 |
836 while (o && o->isAnonymousBlock()) | 837 while (o && o->isAnonymousBlock()) |
837 o = o->containingBlock(); | 838 o = o->containingBlock(); |
| 839 } else if (isColumnSpanAll()) { |
| 840 o = spannerPlaceholder()->containingBlock(); |
838 } else { | 841 } else { |
839 while (o && ((o->isInline() && !o->isReplaced()) || !o->isRenderBlock())
) | 842 while (o && ((o->isInline() && !o->isReplaced()) || !o->isRenderBlock())
) |
840 o = o->parent(); | 843 o = o->parent(); |
841 } | 844 } |
842 | 845 |
843 if (!o || !o->isRenderBlock()) | 846 if (!o || !o->isRenderBlock()) |
844 return 0; // This can still happen in case of an orphaned tree | 847 return 0; // This can still happen in case of an orphaned tree |
845 | 848 |
846 return toRenderBlock(o); | 849 return toRenderBlock(o); |
847 } | 850 } |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2224 break; | 2227 break; |
2225 | 2228 |
2226 if (o->canContainFixedPositionObjects()) | 2229 if (o->canContainFixedPositionObjects()) |
2227 break; | 2230 break; |
2228 | 2231 |
2229 if (paintInvalidationContainerSkipped && o == paintInvalidationConta
iner) | 2232 if (paintInvalidationContainerSkipped && o == paintInvalidationConta
iner) |
2230 *paintInvalidationContainerSkipped = true; | 2233 *paintInvalidationContainerSkipped = true; |
2231 | 2234 |
2232 o = o->parent(); | 2235 o = o->parent(); |
2233 } | 2236 } |
| 2237 } else if (isColumnSpanAll()) { |
| 2238 RenderObject* multicolContainer = spannerPlaceholder()->container(); |
| 2239 if (paintInvalidationContainerSkipped && paintInvalidationContainer) { |
| 2240 // We jumped directly from the spanner to the multicol container. Ne
ed to check if |
| 2241 // we skipped |paintInvalidationContainer| on the way. |
| 2242 for (RenderObject* walker = parent(); walker && walker != multicolCo
ntainer; walker = walker->parent()) { |
| 2243 if (walker == paintInvalidationContainer) { |
| 2244 *paintInvalidationContainerSkipped = true; |
| 2245 break; |
| 2246 } |
| 2247 } |
| 2248 } |
| 2249 return multicolContainer; |
2234 } | 2250 } |
2235 | 2251 |
2236 return o; | 2252 return o; |
2237 } | 2253 } |
2238 | 2254 |
2239 bool RenderObject::isSelectionBorder() const | 2255 bool RenderObject::isSelectionBorder() const |
2240 { | 2256 { |
2241 SelectionState st = selectionState(); | 2257 SelectionState st = selectionState(); |
2242 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth; | 2258 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth; |
2243 } | 2259 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2377 // Pass in the flow thread so that we don't have to look it up for all the c
hildren. | 2393 // Pass in the flow thread so that we don't have to look it up for all the c
hildren. |
2378 removeFromRenderFlowThreadRecursive(flowThreadContainingBlock()); | 2394 removeFromRenderFlowThreadRecursive(flowThreadContainingBlock()); |
2379 } | 2395 } |
2380 | 2396 |
2381 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF
lowThread) | 2397 void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF
lowThread) |
2382 { | 2398 { |
2383 if (const RenderObjectChildList* children = virtualChildren()) { | 2399 if (const RenderObjectChildList* children = virtualChildren()) { |
2384 for (RenderObject* child = children->firstChild(); child; child = child-
>nextSibling()) | 2400 for (RenderObject* child = children->firstChild(); child; child = child-
>nextSibling()) |
2385 child->removeFromRenderFlowThreadRecursive(renderFlowThread); | 2401 child->removeFromRenderFlowThreadRecursive(renderFlowThread); |
2386 } | 2402 } |
| 2403 |
| 2404 if (renderFlowThread && renderFlowThread != this) |
| 2405 renderFlowThread->flowThreadDescendantWillBeRemoved(this); |
2387 setFlowThreadState(NotInsideFlowThread); | 2406 setFlowThreadState(NotInsideFlowThread); |
2388 } | 2407 } |
2389 | 2408 |
2390 void RenderObject::destroyAndCleanupAnonymousWrappers() | 2409 void RenderObject::destroyAndCleanupAnonymousWrappers() |
2391 { | 2410 { |
2392 // If the tree is destroyed, there is no need for a clean-up phase. | 2411 // If the tree is destroyed, there is no need for a clean-up phase. |
2393 if (documentBeingDestroyed()) { | 2412 if (documentBeingDestroyed()) { |
2394 destroy(); | 2413 destroy(); |
2395 return; | 2414 return; |
2396 } | 2415 } |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3120 { | 3139 { |
3121 if (object1) { | 3140 if (object1) { |
3122 const blink::RenderObject* root = object1; | 3141 const blink::RenderObject* root = object1; |
3123 while (root->parent()) | 3142 while (root->parent()) |
3124 root = root->parent(); | 3143 root = root->parent(); |
3125 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3144 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3126 } | 3145 } |
3127 } | 3146 } |
3128 | 3147 |
3129 #endif | 3148 #endif |
OLD | NEW |