| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Google, Inc. | 5 * Copyright (C) 2009 Google, Inc. |
| 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // When we're embedded through SVGImage (border-image/background-image/<html
:img>/...) we're forced to resize to a specific size. | 115 // When we're embedded through SVGImage (border-image/background-image/<html
:img>/...) we're forced to resize to a specific size. |
| 116 if (!m_containerSize.isEmpty()) | 116 if (!m_containerSize.isEmpty()) |
| 117 return LayoutUnit(m_containerSize.width()); | 117 return LayoutUnit(m_containerSize.width()); |
| 118 | 118 |
| 119 if (isEmbeddedThroughFrameContainingSVGDocument()) | 119 if (isEmbeddedThroughFrameContainingSVGDocument()) |
| 120 return containingBlock()->availableLogicalWidth(); | 120 return containingBlock()->availableLogicalWidth(); |
| 121 | 121 |
| 122 return LayoutReplaced::computeReplacedLogicalWidth(shouldComputePreferred); | 122 return LayoutReplaced::computeReplacedLogicalWidth(shouldComputePreferred); |
| 123 } | 123 } |
| 124 | 124 |
| 125 LayoutUnit LayoutSVGRoot::computeReplacedLogicalHeight() const | 125 LayoutUnit LayoutSVGRoot::computeReplacedLogicalHeight(LayoutUnit estimatedUsedW
idth) const |
| 126 { | 126 { |
| 127 // When we're embedded through SVGImage (border-image/background-image/<html
:img>/...) we're forced to resize to a specific size. | 127 // When we're embedded through SVGImage (border-image/background-image/<html
:img>/...) we're forced to resize to a specific size. |
| 128 if (!m_containerSize.isEmpty()) | 128 if (!m_containerSize.isEmpty()) |
| 129 return LayoutUnit(m_containerSize.height()); | 129 return LayoutUnit(m_containerSize.height()); |
| 130 | 130 |
| 131 if (isEmbeddedThroughFrameContainingSVGDocument()) | 131 if (isEmbeddedThroughFrameContainingSVGDocument()) |
| 132 return containingBlock()->availableLogicalHeight(IncludeMarginBorderPadd
ing); | 132 return containingBlock()->availableLogicalHeight(IncludeMarginBorderPadd
ing); |
| 133 | 133 |
| 134 return LayoutReplaced::computeReplacedLogicalHeight(); | 134 return LayoutReplaced::computeReplacedLogicalHeight(estimatedUsedWidth); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void LayoutSVGRoot::layout() | 137 void LayoutSVGRoot::layout() |
| 138 { | 138 { |
| 139 ASSERT(needsLayout()); | 139 ASSERT(needsLayout()); |
| 140 LayoutAnalyzer::Scope analyzer(*this); | 140 LayoutAnalyzer::Scope analyzer(*this); |
| 141 | 141 |
| 142 bool needsLayout = selfNeedsLayout(); | 142 bool needsLayout = selfNeedsLayout(); |
| 143 | 143 |
| 144 LayoutSize oldSize = size(); | 144 LayoutSize oldSize = size(); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 updateHitTestResult(result, pointInBorderBox); | 404 updateHitTestResult(result, pointInBorderBox); |
| 405 if (result.addNodeToListBasedTestResult(node(), locationInContainer,
boundsRect) == StopHitTesting) | 405 if (result.addNodeToListBasedTestResult(node(), locationInContainer,
boundsRect) == StopHitTesting) |
| 406 return true; | 406 return true; |
| 407 } | 407 } |
| 408 } | 408 } |
| 409 | 409 |
| 410 return false; | 410 return false; |
| 411 } | 411 } |
| 412 | 412 |
| 413 } // namespace blink | 413 } // namespace blink |
| OLD | NEW |