OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * Copyright (C) 2009 Google, Inc. | 3 * Copyright (C) 2009 Google, Inc. |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "core/layout/HitTestResult.h" | 26 #include "core/layout/HitTestResult.h" |
27 #include "core/layout/svg/SVGLayoutSupport.h" | 27 #include "core/layout/svg/SVGLayoutSupport.h" |
28 #include "core/layout/svg/SVGResourcesCache.h" | 28 #include "core/layout/svg/SVGResourcesCache.h" |
29 #include "core/paint/SVGForeignObjectPainter.h" | 29 #include "core/paint/SVGForeignObjectPainter.h" |
30 #include "core/rendering/RenderView.h" | 30 #include "core/rendering/RenderView.h" |
31 #include "core/svg/SVGForeignObjectElement.h" | 31 #include "core/svg/SVGForeignObjectElement.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
34 | 34 |
35 LayoutSVGForeignObject::LayoutSVGForeignObject(SVGForeignObjectElement* node) | 35 LayoutSVGForeignObject::LayoutSVGForeignObject(SVGForeignObjectElement* node) |
36 : RenderSVGBlock(node) | 36 : LayoutSVGBlock(node) |
37 , m_needsTransformUpdate(true) | 37 , m_needsTransformUpdate(true) |
38 { | 38 { |
39 } | 39 } |
40 | 40 |
41 LayoutSVGForeignObject::~LayoutSVGForeignObject() | 41 LayoutSVGForeignObject::~LayoutSVGForeignObject() |
42 { | 42 { |
43 } | 43 } |
44 | 44 |
45 bool LayoutSVGForeignObject::isChildAllowed(LayoutObject* child, const LayoutSty
le& style) const | 45 bool LayoutSVGForeignObject::isChildAllowed(LayoutObject* child, const LayoutSty
le& style) const |
46 { | 46 { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 // FIXME: Investigate in location rounding issues - only affects LayoutSVGFo
reignObject & LayoutSVGText | 105 // FIXME: Investigate in location rounding issues - only affects LayoutSVGFo
reignObject & LayoutSVGText |
106 setLocation(roundedIntPoint(viewportLocation)); | 106 setLocation(roundedIntPoint(viewportLocation)); |
107 | 107 |
108 bool layoutChanged = everHadLayout() && selfNeedsLayout(); | 108 bool layoutChanged = everHadLayout() && selfNeedsLayout(); |
109 RenderBlock::layout(); | 109 RenderBlock::layout(); |
110 ASSERT(!needsLayout()); | 110 ASSERT(!needsLayout()); |
111 | 111 |
112 // If our bounds changed, notify the parents. | 112 // If our bounds changed, notify the parents. |
113 if (updateCachedBoundariesInParents) | 113 if (updateCachedBoundariesInParents) |
114 RenderSVGBlock::setNeedsBoundariesUpdate(); | 114 LayoutSVGBlock::setNeedsBoundariesUpdate(); |
115 | 115 |
116 // Invalidate all resources of this client if our layout changed. | 116 // Invalidate all resources of this client if our layout changed. |
117 if (layoutChanged) | 117 if (layoutChanged) |
118 SVGResourcesCache::clientLayoutChanged(this); | 118 SVGResourcesCache::clientLayoutChanged(this); |
119 } | 119 } |
120 | 120 |
121 bool LayoutSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit
TestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction
) | 121 bool LayoutSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit
TestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction
) |
122 { | 122 { |
123 // Embedded content is drawn in the foreground phase. | 123 // Embedded content is drawn in the foreground phase. |
124 if (hitTestAction != HitTestForeground) | 124 if (hitTestAction != HitTestForeground) |
(...skipping 10 matching lines...) Expand all Loading... |
135 return false; | 135 return false; |
136 | 136 |
137 // FOs establish a stacking context, so we need to hit-test all layers. | 137 // FOs establish a stacking context, so we need to hit-test all layers. |
138 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); | 138 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); |
139 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestForeground) | 139 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestForeground) |
140 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestFloat) | 140 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestFloat) |
141 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestChildBlockBackgrounds); | 141 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestChildBlockBackgrounds); |
142 } | 142 } |
143 | 143 |
144 } | 144 } |
OLD | NEW |