LEFT | RIGHT |
(no file at all) | |
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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 FloatRect contentRepaintRect = m_localToBorderBoxTransform.mapRect(repaintRe
ctInLocalCoordinates()); | 335 FloatRect contentRepaintRect = m_localToBorderBoxTransform.mapRect(repaintRe
ctInLocalCoordinates()); |
336 contentRepaintRect.intersect(snappedIntRect(borderBoxRect())); | 336 contentRepaintRect.intersect(snappedIntRect(borderBoxRect())); |
337 | 337 |
338 LayoutRect repaintRect = enclosingLayoutRect(contentRepaintRect); | 338 LayoutRect repaintRect = enclosingLayoutRect(contentRepaintRect); |
339 if (m_hasBoxDecorations || hasRenderOverflow()) | 339 if (m_hasBoxDecorations || hasRenderOverflow()) |
340 repaintRect.unite(unionRect(localSelectionRect(false), visualOverflowRec
t())); | 340 repaintRect.unite(unionRect(localSelectionRect(false), visualOverflowRec
t())); |
341 | 341 |
342 return RenderReplaced::computeRectForRepaint(enclosingIntRect(repaintRect),
repaintContainer); | 342 return RenderReplaced::computeRectForRepaint(enclosingIntRect(repaintRect),
repaintContainer); |
343 } | 343 } |
344 | 344 |
345 FloatRect RenderSVGRoot::computeFloatRectForRepaint(const FloatRect& repaintRect
, const RenderLayerModelObject* repaintContainer, bool fixed) const | 345 FloatRect RenderSVGRoot::computeFloatRectForRepaint(const FloatRect& repaintRect
, const RenderLayerModelObject* repaintContainer, bool fixed, bool useInclusiveI
ntersection, bool* intersects) const |
346 { | 346 { |
347 // Apply our local transforms (except for x/y translation), then our shadow,······· | 347 // Apply our local transforms (except for x/y translation), then our shadow,······· |
348 // and then call RenderBox's method to handle all the normal CSS Box model b
its | 348 // and then call RenderBox's method to handle all the normal CSS Box model b
its |
349 FloatRect adjustedRect = m_localToBorderBoxTransform.mapRect(repaintRect); | 349 FloatRect adjustedRect = m_localToBorderBoxTransform.mapRect(repaintRect); |
350 | 350 |
351 const SVGRenderStyle& svgStyle = style().svgStyle(); | 351 const SVGRenderStyle& svgStyle = style().svgStyle(); |
352 if (const ShadowData* shadow = svgStyle.shadow()) | 352 if (const ShadowData* shadow = svgStyle.shadow()) |
353 shadow->adjustRectForShadow(adjustedRect); | 353 shadow->adjustRectForShadow(adjustedRect); |
354 | 354 |
355 // Apply initial viewport clip | 355 // Apply initial viewport clip |
356 if (shouldApplyViewportClip()) | 356 if (shouldApplyViewportClip()) |
357 adjustedRect.intersect(snappedIntRect(borderBoxRect())); | 357 adjustedRect.intersect(snappedIntRect(borderBoxRect())); |
358 | 358 |
359 if (m_hasBoxDecorations || hasRenderOverflow()) { | 359 if (m_hasBoxDecorations || hasRenderOverflow()) { |
360 // The selectionRect can project outside of the overflowRect, so take th
eir union | 360 // The selectionRect can project outside of the overflowRect, so take th
eir union |
361 // for repainting to avoid selection painting glitches. | 361 // for repainting to avoid selection painting glitches. |
362 LayoutRect decoratedRepaintRect = unionRect(localSelectionRect(false), v
isualOverflowRect()); | 362 LayoutRect decoratedRepaintRect = unionRect(localSelectionRect(false), v
isualOverflowRect()); |
363 adjustedRect.unite(decoratedRepaintRect); | 363 adjustedRect.unite(decoratedRepaintRect); |
364 } | 364 } |
365 return RenderReplaced::computeRectForRepaint(enclosingIntRect(adjustedRect),
repaintContainer, {fixed, false}); | 365 return RenderReplaced::computeRectForRepaint(enclosingIntRect(adjustedRect),
repaintContainer, {fixed, false, useInclusiveIntersection, intersects}); |
366 } | 366 } |
367 | 367 |
368 // This method expects local CSS box coordinates. | 368 // This method expects local CSS box coordinates. |
369 // Callers with local SVG viewport coordinates should first apply the localToBor
derBoxTransform | 369 // Callers with local SVG viewport coordinates should first apply the localToBor
derBoxTransform |
370 // to convert from SVG viewport coordinates to local CSS box coordinates. | 370 // to convert from SVG viewport coordinates to local CSS box coordinates. |
371 void RenderSVGRoot::mapLocalToContainer(const RenderLayerModelObject* repaintCon
tainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed
) const | 371 void RenderSVGRoot::mapLocalToContainer(const RenderLayerModelObject* repaintCon
tainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed
) const |
372 { | 372 { |
373 ASSERT(mode & ~IsFixed); // We should have no fixed content in the SVG rende
ring tree. | 373 ASSERT(mode & ~IsFixed); // We should have no fixed content in the SVG rende
ring tree. |
374 ASSERT(mode & UseTransforms); // mapping a point through SVG w/o respecting
trasnforms is useless. | 374 ASSERT(mode & UseTransforms); // mapping a point through SVG w/o respecting
trasnforms is useless. |
375 | 375 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 435 |
436 void RenderSVGRoot::addResourceForClientInvalidation(RenderSVGResourceContainer*
resource) | 436 void RenderSVGRoot::addResourceForClientInvalidation(RenderSVGResourceContainer*
resource) |
437 { | 437 { |
438 RenderSVGRoot* svgRoot = SVGRenderSupport::findTreeRootObject(*resource); | 438 RenderSVGRoot* svgRoot = SVGRenderSupport::findTreeRootObject(*resource); |
439 if (!svgRoot) | 439 if (!svgRoot) |
440 return; | 440 return; |
441 svgRoot->m_resourcesNeedingToInvalidateClients.add(resource); | 441 svgRoot->m_resourcesNeedingToInvalidateClients.add(resource); |
442 } | 442 } |
443 | 443 |
444 } | 444 } |
LEFT | RIGHT |