| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 // If the box is decorated or is overflowing, extend it to include the borde
r-box and overflow. | 377 // If the box is decorated or is overflowing, extend it to include the borde
r-box and overflow. |
| 378 if (m_hasBoxDecorations || hasRenderOverflow()) { | 378 if (m_hasBoxDecorations || hasRenderOverflow()) { |
| 379 // The selectionRect can project outside of the overflowRect, so take th
eir union | 379 // The selectionRect can project outside of the overflowRect, so take th
eir union |
| 380 // for repainting to avoid selection painting glitches. | 380 // for repainting to avoid selection painting glitches. |
| 381 LayoutRect decoratedRepaintRect = unionRect(localSelectionRect(false), v
isualOverflowRect()); | 381 LayoutRect decoratedRepaintRect = unionRect(localSelectionRect(false), v
isualOverflowRect()); |
| 382 repaintRect.unite(decoratedRepaintRect); | 382 repaintRect.unite(decoratedRepaintRect); |
| 383 } | 383 } |
| 384 | 384 |
| 385 // Compute the repaint rect in the parent coordinate space. | 385 // Compute the repaint rect in the parent coordinate space. |
| 386 LayoutRect rect = enclosingIntRect(repaintRect); | 386 LayoutRect rect = enclosingIntRect(repaintRect); |
| 387 RenderReplaced::computeRectForRepaint(repaintContainer, rect); | 387 RenderReplaced::mapRectToRepaintBacking(repaintContainer, rect); |
| 388 return rect; | 388 return rect; |
| 389 } | 389 } |
| 390 | 390 |
| 391 void RenderSVGRoot::computeFloatRectForRepaint(const RenderLayerModelObject* rep
aintContainer, FloatRect& repaintRect, bool fixed) const | 391 void RenderSVGRoot::computeFloatRectForRepaint(const RenderLayerModelObject* rep
aintContainer, FloatRect& repaintRect, bool fixed) const |
| 392 { | 392 { |
| 393 // Apply our local transforms (except for x/y translation), then our shadow, | 393 // Apply our local transforms (except for x/y translation), then our shadow, |
| 394 // and then call RenderBox's method to handle all the normal CSS Box model b
its | 394 // and then call RenderBox's method to handle all the normal CSS Box model b
its |
| 395 repaintRect = m_localToBorderBoxTransform.mapRect(repaintRect); | 395 repaintRect = m_localToBorderBoxTransform.mapRect(repaintRect); |
| 396 | 396 |
| 397 // Apply initial viewport clip | 397 // Apply initial viewport clip |
| 398 if (shouldApplyViewportClip()) | 398 if (shouldApplyViewportClip()) |
| 399 repaintRect.intersect(pixelSnappedBorderBoxRect()); | 399 repaintRect.intersect(pixelSnappedBorderBoxRect()); |
| 400 | 400 |
| 401 LayoutRect rect = enclosingIntRect(repaintRect); | 401 LayoutRect rect = enclosingIntRect(repaintRect); |
| 402 RenderReplaced::computeRectForRepaint(repaintContainer, rect, fixed); | 402 RenderReplaced::mapRectToRepaintBacking(repaintContainer, rect, fixed); |
| 403 repaintRect = rect; | 403 repaintRect = rect; |
| 404 } | 404 } |
| 405 | 405 |
| 406 // This method expects local CSS box coordinates. | 406 // This method expects local CSS box coordinates. |
| 407 // Callers with local SVG viewport coordinates should first apply the localToBor
derBoxTransform | 407 // Callers with local SVG viewport coordinates should first apply the localToBor
derBoxTransform |
| 408 // to convert from SVG viewport coordinates to local CSS box coordinates. | 408 // to convert from SVG viewport coordinates to local CSS box coordinates. |
| 409 void RenderSVGRoot::mapLocalToContainer(const RenderLayerModelObject* repaintCon
tainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed
) const | 409 void RenderSVGRoot::mapLocalToContainer(const RenderLayerModelObject* repaintCon
tainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed
) const |
| 410 { | 410 { |
| 411 ASSERT(mode & ~IsFixed); // We should have no fixed content in the SVG rende
ring tree. | 411 ASSERT(mode & ~IsFixed); // We should have no fixed content in the SVG rende
ring tree. |
| 412 // We used to have this ASSERT here, but we removed it when enabling layer s
quashing. | 412 // We used to have this ASSERT here, but we removed it when enabling layer s
quashing. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 updateHitTestResult(result, pointInBorderBox); | 458 updateHitTestResult(result, pointInBorderBox); |
| 459 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn
Container, boundsRect)) | 459 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn
Container, boundsRect)) |
| 460 return true; | 460 return true; |
| 461 } | 461 } |
| 462 } | 462 } |
| 463 | 463 |
| 464 return false; | 464 return false; |
| 465 } | 465 } |
| 466 | 466 |
| 467 } | 467 } |
| OLD | NEW |