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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include "core/layout/HitTestResult.h" | 51 #include "core/layout/HitTestResult.h" |
52 #include "core/layout/Layer.h" | 52 #include "core/layout/Layer.h" |
53 #include "core/layout/LayoutCounter.h" | 53 #include "core/layout/LayoutCounter.h" |
54 #include "core/layout/LayoutFlowThread.h" | 54 #include "core/layout/LayoutFlowThread.h" |
55 #include "core/layout/LayoutGeometryMap.h" | 55 #include "core/layout/LayoutGeometryMap.h" |
56 #include "core/layout/LayoutImage.h" | 56 #include "core/layout/LayoutImage.h" |
57 #include "core/layout/LayoutImageResourceStyleImage.h" | 57 #include "core/layout/LayoutImageResourceStyleImage.h" |
58 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 58 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
59 #include "core/layout/LayoutObjectInlines.h" | 59 #include "core/layout/LayoutObjectInlines.h" |
60 #include "core/layout/LayoutPart.h" | 60 #include "core/layout/LayoutPart.h" |
| 61 #include "core/layout/LayoutScrollbarPart.h" |
61 #include "core/layout/LayoutTableCaption.h" | 62 #include "core/layout/LayoutTableCaption.h" |
62 #include "core/layout/LayoutTableCell.h" | 63 #include "core/layout/LayoutTableCell.h" |
63 #include "core/layout/LayoutTableCol.h" | 64 #include "core/layout/LayoutTableCol.h" |
64 #include "core/layout/LayoutTableRow.h" | 65 #include "core/layout/LayoutTableRow.h" |
65 #include "core/layout/LayoutTheme.h" | 66 #include "core/layout/LayoutTheme.h" |
66 #include "core/layout/compositing/CompositedLayerMapping.h" | 67 #include "core/layout/compositing/CompositedLayerMapping.h" |
67 #include "core/layout/compositing/LayerCompositor.h" | 68 #include "core/layout/compositing/LayerCompositor.h" |
68 #include "core/layout/style/ContentData.h" | 69 #include "core/layout/style/ContentData.h" |
69 #include "core/layout/style/ShadowList.h" | 70 #include "core/layout/style/ShadowList.h" |
70 #include "core/page/AutoscrollController.h" | 71 #include "core/page/AutoscrollController.h" |
71 #include "core/page/EventHandler.h" | 72 #include "core/page/EventHandler.h" |
72 #include "core/page/Page.h" | 73 #include "core/page/Page.h" |
73 #include "core/paint/ObjectPainter.h" | 74 #include "core/paint/ObjectPainter.h" |
74 #include "core/rendering/RenderDeprecatedFlexibleBox.h" | 75 #include "core/rendering/RenderDeprecatedFlexibleBox.h" |
75 #include "core/rendering/RenderFlexibleBox.h" | 76 #include "core/rendering/RenderFlexibleBox.h" |
76 #include "core/rendering/RenderGrid.h" | 77 #include "core/rendering/RenderGrid.h" |
77 #include "core/rendering/RenderInline.h" | 78 #include "core/rendering/RenderInline.h" |
78 #include "core/rendering/RenderListItem.h" | 79 #include "core/rendering/RenderListItem.h" |
79 #include "core/rendering/RenderScrollbarPart.h" | |
80 #include "core/rendering/RenderView.h" | 80 #include "core/rendering/RenderView.h" |
81 #include "platform/JSONValues.h" | 81 #include "platform/JSONValues.h" |
82 #include "platform/Partitions.h" | 82 #include "platform/Partitions.h" |
83 #include "platform/RuntimeEnabledFeatures.h" | 83 #include "platform/RuntimeEnabledFeatures.h" |
84 #include "platform/TraceEvent.h" | 84 #include "platform/TraceEvent.h" |
85 #include "platform/TracedValue.h" | 85 #include "platform/TracedValue.h" |
86 #include "platform/geometry/TransformState.h" | 86 #include "platform/geometry/TransformState.h" |
87 #include "platform/graphics/GraphicsContext.h" | 87 #include "platform/graphics/GraphicsContext.h" |
88 #include "platform/graphics/paint/DisplayItemList.h" | 88 #include "platform/graphics/paint/DisplayItemList.h" |
89 #include "wtf/RefCountedLeakCounter.h" | 89 #include "wtf/RefCountedLeakCounter.h" |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 *paintInvalidationContainerSkipped = true; | 790 *paintInvalidationContainerSkipped = true; |
791 } | 791 } |
792 | 792 |
793 ASSERT(!ancestor || !ancestor->isAnonymousBlock()); | 793 ASSERT(!ancestor || !ancestor->isAnonymousBlock()); |
794 return toRenderBlock(ancestor); | 794 return toRenderBlock(ancestor); |
795 } | 795 } |
796 | 796 |
797 RenderBlock* LayoutObject::containingBlock() const | 797 RenderBlock* LayoutObject::containingBlock() const |
798 { | 798 { |
799 LayoutObject* o = parent(); | 799 LayoutObject* o = parent(); |
800 if (!o && isRenderScrollbarPart()) | 800 if (!o && isLayoutScrollbarPart()) |
801 o = toRenderScrollbarPart(this)->rendererOwningScrollbar(); | 801 o = toLayoutScrollbarPart(this)->rendererOwningScrollbar(); |
802 if (!isText() && m_style->position() == FixedPosition) | 802 if (!isText() && m_style->position() == FixedPosition) |
803 return containerForFixedPosition(); | 803 return containerForFixedPosition(); |
804 if (!isText() && m_style->position() == AbsolutePosition) { | 804 if (!isText() && m_style->position() == AbsolutePosition) { |
805 while (o) { | 805 while (o) { |
806 // For relpositioned inlines, we return the nearest non-anonymous en
closing block. We don't try | 806 // For relpositioned inlines, we return the nearest non-anonymous en
closing block. We don't try |
807 // to return the inline itself. This allows us to avoid having a po
sitioned objects | 807 // to return the inline itself. This allows us to avoid having a po
sitioned objects |
808 // list in all RenderInlines and lets us return a strongly-typed Ren
derBlock* result | 808 // list in all RenderInlines and lets us return a strongly-typed Ren
derBlock* result |
809 // from this method. The container() method can actually be used to
obtain the | 809 // from this method. The container() method can actually be used to
obtain the |
810 // inline directly. | 810 // inline directly. |
811 if (o->style()->position() != StaticPosition && (!o->isInline() || o
->isReplaced())) | 811 if (o->style()->position() != StaticPosition && (!o->isInline() || o
->isReplaced())) |
(...skipping 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3189 { | 3189 { |
3190 if (object1) { | 3190 if (object1) { |
3191 const blink::LayoutObject* root = object1; | 3191 const blink::LayoutObject* root = object1; |
3192 while (root->parent()) | 3192 while (root->parent()) |
3193 root = root->parent(); | 3193 root = root->parent(); |
3194 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3194 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3195 } | 3195 } |
3196 } | 3196 } |
3197 | 3197 |
3198 #endif | 3198 #endif |
OLD | NEW |