| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 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 16 matching lines...) Expand all Loading... |
| 27 #include "core/layout/svg/SVGResourcesCache.h" | 27 #include "core/layout/svg/SVGResourcesCache.h" |
| 28 #include "core/style/ShadowList.h" | 28 #include "core/style/ShadowList.h" |
| 29 #include "core/svg/SVGElement.h" | 29 #include "core/svg/SVGElement.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 LayoutSVGBlock::LayoutSVGBlock(SVGElement* element) | 33 LayoutSVGBlock::LayoutSVGBlock(SVGElement* element) |
| 34 : LayoutBlockFlow(element) {} | 34 : LayoutBlockFlow(element) {} |
| 35 | 35 |
| 36 bool LayoutSVGBlock::allowsOverflowClip() const { | 36 bool LayoutSVGBlock::allowsOverflowClip() const { |
| 37 // LayoutSVGBlock, used by Layout(SVGText|ForeignObject), is not allowed to ha
ve overflow clip. | 37 // LayoutSVGBlock, used by Layout(SVGText|ForeignObject), is not allowed to |
| 38 // LayoutBlock assumes a layer to be present when the overflow clip functional
ity is requested. Both | 38 // have overflow clip. |
| 39 // Layout(SVGText|ForeignObject) return 'NoPaintLayer' on 'layerTypeRequired'.
Fine for LayoutSVGText. | 39 // LayoutBlock assumes a layer to be present when the overflow clip |
| 40 // functionality is requested. Both Layout(SVGText|ForeignObject) return |
| 41 // 'NoPaintLayer' on 'layerTypeRequired'. |
| 42 // Fine for LayoutSVGText. |
| 40 // | 43 // |
| 41 // If we want to support overflow rules for <foreignObject> we can choose betw
een two solutions: | 44 // If we want to support overflow rules for <foreignObject> we can choose |
| 45 // between two solutions: |
| 42 // a) make LayoutSVGForeignObject require layers and SVG layer aware | 46 // a) make LayoutSVGForeignObject require layers and SVG layer aware |
| 43 // b) refactor overflow logic out of Layer (as suggested by dhyatt), which is
a large task | 47 // b) refactor overflow logic out of Layer (as suggested by dhyatt), which is |
| 48 // a large task |
| 44 // | 49 // |
| 45 // Until this is resolved, disable overflow support. Opera/FF don't support it
as well at the moment (Feb 2010). | 50 // Until this is resolved, disable overflow support. Opera/FF don't support it |
| 51 // as well at the moment (Feb 2010). |
| 46 // | 52 // |
| 47 // Note: This does NOT affect overflow handling on outer/inner <svg> elements
- this is handled | 53 // Note: This does NOT affect overflow handling on outer/inner <svg> elements |
| 48 // manually by LayoutSVGRoot - which owns the documents enclosing root layer a
nd thus works fine. | 54 // - this is handled |
| 55 // manually by LayoutSVGRoot - which owns the documents enclosing root layer |
| 56 // and thus works fine. |
| 49 return false; | 57 return false; |
| 50 } | 58 } |
| 51 | 59 |
| 52 void LayoutSVGBlock::absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { | 60 void LayoutSVGBlock::absoluteRects(Vector<IntRect>&, const LayoutPoint&) const { |
| 53 // This code path should never be taken for SVG, as we're assuming useTransfor
ms=true everywhere, absoluteQuads should be used. | 61 // This code path should never be taken for SVG, as we're assuming |
| 62 // useTransforms=true everywhere, absoluteQuads should be used. |
| 54 ASSERT_NOT_REACHED(); | 63 ASSERT_NOT_REACHED(); |
| 55 } | 64 } |
| 56 | 65 |
| 57 void LayoutSVGBlock::willBeDestroyed() { | 66 void LayoutSVGBlock::willBeDestroyed() { |
| 58 SVGResourcesCache::clientDestroyed(this); | 67 SVGResourcesCache::clientDestroyed(this); |
| 59 LayoutBlockFlow::willBeDestroyed(); | 68 LayoutBlockFlow::willBeDestroyed(); |
| 60 } | 69 } |
| 61 | 70 |
| 62 void LayoutSVGBlock::styleDidChange(StyleDifference diff, | 71 void LayoutSVGBlock::styleDidChange(StyleDifference diff, |
| 63 const ComputedStyle* oldStyle) { | 72 const ComputedStyle* oldStyle) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 125 |
| 117 bool LayoutSVGBlock::nodeAtPoint(HitTestResult&, | 126 bool LayoutSVGBlock::nodeAtPoint(HitTestResult&, |
| 118 const HitTestLocation&, | 127 const HitTestLocation&, |
| 119 const LayoutPoint&, | 128 const LayoutPoint&, |
| 120 HitTestAction) { | 129 HitTestAction) { |
| 121 ASSERT_NOT_REACHED(); | 130 ASSERT_NOT_REACHED(); |
| 122 return false; | 131 return false; |
| 123 } | 132 } |
| 124 | 133 |
| 125 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |