OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 #include "core/layout/LayoutAnalyzer.h" | 22 #include "core/layout/LayoutAnalyzer.h" |
23 #include "core/layout/svg/SVGLayoutSupport.h" | 23 #include "core/layout/svg/SVGLayoutSupport.h" |
24 | 24 |
25 namespace blink { | 25 namespace blink { |
26 | 26 |
27 LayoutSVGHiddenContainer::LayoutSVGHiddenContainer(SVGElement* element) | 27 LayoutSVGHiddenContainer::LayoutSVGHiddenContainer(SVGElement* element) |
28 : LayoutSVGContainer(element) {} | 28 : LayoutSVGContainer(element) {} |
29 | 29 |
30 void LayoutSVGHiddenContainer::layout() { | 30 void LayoutSVGHiddenContainer::layout() { |
31 ASSERT(needsLayout()); | 31 DCHECK(needsLayout()); |
32 LayoutAnalyzer::Scope analyzer(*this); | 32 LayoutAnalyzer::Scope analyzer(*this); |
33 | 33 |
34 // When hasRelativeLengths() is false, no descendants have relative lengths | 34 // When hasRelativeLengths() is false, no descendants have relative lengths |
35 // (hence no one is interested in viewport size changes). | 35 // (hence no one is interested in viewport size changes). |
36 bool layoutSizeChanged = | 36 bool layoutSizeChanged = |
37 element()->hasRelativeLengths() && | 37 element()->hasRelativeLengths() && |
38 SVGLayoutSupport::layoutSizeOfNearestViewportChanged(this); | 38 SVGLayoutSupport::layoutSizeOfNearestViewportChanged(this); |
39 | 39 |
40 SVGLayoutSupport::layoutChildren(firstChild(), selfNeedsLayout(), false, | 40 SVGLayoutSupport::layoutChildren(firstChild(), selfNeedsLayout(), false, |
41 layoutSizeChanged); | 41 layoutSizeChanged); |
42 updateCachedBoundaries(); | 42 updateCachedBoundaries(); |
43 clearNeedsLayout(); | 43 clearNeedsLayout(); |
44 } | 44 } |
45 | 45 |
46 bool LayoutSVGHiddenContainer::nodeAtFloatPoint(HitTestResult&, | 46 bool LayoutSVGHiddenContainer::nodeAtFloatPoint(HitTestResult&, |
47 const FloatPoint&, | 47 const FloatPoint&, |
48 HitTestAction) { | 48 HitTestAction) { |
49 return false; | 49 return false; |
50 } | 50 } |
51 | 51 |
52 } // namespace blink | 52 } // namespace blink |
OLD | NEW |