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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 LayoutReplaced::insertedIntoTree(); | 286 LayoutReplaced::insertedIntoTree(); |
287 SVGResourcesCache::clientWasAddedToTree(this, styleRef()); | 287 SVGResourcesCache::clientWasAddedToTree(this, styleRef()); |
288 } | 288 } |
289 | 289 |
290 void LayoutSVGRoot::willBeRemovedFromTree() | 290 void LayoutSVGRoot::willBeRemovedFromTree() |
291 { | 291 { |
292 SVGResourcesCache::clientWillBeRemovedFromTree(this); | 292 SVGResourcesCache::clientWillBeRemovedFromTree(this); |
293 LayoutReplaced::willBeRemovedFromTree(); | 293 LayoutReplaced::willBeRemovedFromTree(); |
294 } | 294 } |
295 | 295 |
296 // RenderBox methods will expect coordinates w/o any transforms in coordinates | 296 // LayoutBox methods will expect coordinates w/o any transforms in coordinates |
297 // relative to our borderBox origin. This method gives us exactly that. | 297 // relative to our borderBox origin. This method gives us exactly that. |
298 void LayoutSVGRoot::buildLocalToBorderBoxTransform() | 298 void LayoutSVGRoot::buildLocalToBorderBoxTransform() |
299 { | 299 { |
300 SVGSVGElement* svg = toSVGSVGElement(node()); | 300 SVGSVGElement* svg = toSVGSVGElement(node()); |
301 ASSERT(svg); | 301 ASSERT(svg); |
302 float scale = style()->effectiveZoom(); | 302 float scale = style()->effectiveZoom(); |
303 FloatPoint translate = svg->currentTranslate(); | 303 FloatPoint translate = svg->currentTranslate(); |
304 LayoutSize borderAndPadding(borderLeft() + paddingLeft(), borderTop() + padd
ingTop()); | 304 LayoutSize borderAndPadding(borderLeft() + paddingLeft(), borderTop() + padd
ingTop()); |
305 m_localToBorderBoxTransform = svg->viewBoxToViewTransform(contentWidth() / s
cale, contentHeight() / scale); | 305 m_localToBorderBoxTransform = svg->viewBoxToViewTransform(contentWidth() / s
cale, contentHeight() / scale); |
306 AffineTransform viewToBorderBoxTransform(scale, 0, 0, scale, borderAndPaddin
g.width() + translate.x(), borderAndPadding.height() + translate.y()); | 306 AffineTransform viewToBorderBoxTransform(scale, 0, 0, scale, borderAndPaddin
g.width() + translate.x(), borderAndPadding.height() + translate.y()); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 updateHitTestResult(result, pointInBorderBox); | 425 updateHitTestResult(result, pointInBorderBox); |
426 if (!result.addNodeToListBasedTestResult(node(), request, locationIn
Container, boundsRect)) | 426 if (!result.addNodeToListBasedTestResult(node(), request, locationIn
Container, boundsRect)) |
427 return true; | 427 return true; |
428 } | 428 } |
429 } | 429 } |
430 | 430 |
431 return false; | 431 return false; |
432 } | 432 } |
433 | 433 |
434 } | 434 } |
OLD | NEW |