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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 LayoutRect paintInvalidationRect = enclosingLayoutRect(contentPaintInvalidat
ionRect); | 342 LayoutRect paintInvalidationRect = enclosingLayoutRect(contentPaintInvalidat
ionRect); |
343 // If the box is decorated or is overflowing, extend it to include the borde
r-box and overflow. | 343 // If the box is decorated or is overflowing, extend it to include the borde
r-box and overflow. |
344 if (m_hasBoxDecorationBackground || hasOverflowModel()) { | 344 if (m_hasBoxDecorationBackground || hasOverflowModel()) { |
345 // The selectionRect can project outside of the overflowRect, so take th
eir union | 345 // The selectionRect can project outside of the overflowRect, so take th
eir union |
346 // for paint invalidation to avoid selection painting glitches. | 346 // for paint invalidation to avoid selection painting glitches. |
347 LayoutRect decoratedPaintInvalidationRect = unionRect(localSelectionRect
(false), visualOverflowRect()); | 347 LayoutRect decoratedPaintInvalidationRect = unionRect(localSelectionRect
(false), visualOverflowRect()); |
348 paintInvalidationRect.unite(decoratedPaintInvalidationRect); | 348 paintInvalidationRect.unite(decoratedPaintInvalidationRect); |
349 } | 349 } |
350 | 350 |
351 // Compute the paint invalidation rect in the parent coordinate space. | 351 // Compute the paint invalidation rect in the parent coordinate space. |
352 LayoutRect rect = enclosingIntRect(paintInvalidationRect); | 352 LayoutRect rect(enclosingIntRect(paintInvalidationRect)); |
353 LayoutReplaced::mapRectToPaintInvalidationBacking(paintInvalidationContainer
, rect, paintInvalidationState); | 353 LayoutReplaced::mapRectToPaintInvalidationBacking(paintInvalidationContainer
, rect, paintInvalidationState); |
354 return rect; | 354 return rect; |
355 } | 355 } |
356 | 356 |
357 void LayoutSVGRoot::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject
* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* pa
intInvalidationState) const | 357 void LayoutSVGRoot::mapRectToPaintInvalidationBacking(const LayoutBoxModelObject
* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* pa
intInvalidationState) const |
358 { | 358 { |
359 // Note that we don't apply the border-box transform here - it's assumed | 359 // Note that we don't apply the border-box transform here - it's assumed |
360 // that whoever called us has done that already. | 360 // that whoever called us has done that already. |
361 | 361 |
362 // Apply initial viewport clip | 362 // Apply initial viewport clip |
363 if (shouldApplyViewportClip()) | 363 if (shouldApplyViewportClip()) |
364 rect.intersect(pixelSnappedBorderBoxRect()); | 364 rect.intersect(LayoutRect(pixelSnappedBorderBoxRect())); |
365 | 365 |
366 LayoutReplaced::mapRectToPaintInvalidationBacking(paintInvalidationContainer
, rect, paintInvalidationState); | 366 LayoutReplaced::mapRectToPaintInvalidationBacking(paintInvalidationContainer
, rect, paintInvalidationState); |
367 } | 367 } |
368 | 368 |
369 // This method expects local CSS box coordinates. | 369 // This method expects local CSS box coordinates. |
370 // Callers with local SVG viewport coordinates should first apply the localToBor
derBoxTransform | 370 // Callers with local SVG viewport coordinates should first apply the localToBor
derBoxTransform |
371 // to convert from SVG viewport coordinates to local CSS box coordinates. | 371 // to convert from SVG viewport coordinates to local CSS box coordinates. |
372 void LayoutSVGRoot::mapLocalToContainer(const LayoutBoxModelObject* paintInvalid
ationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool*
wasFixed, const PaintInvalidationState* paintInvalidationState) const | 372 void LayoutSVGRoot::mapLocalToContainer(const LayoutBoxModelObject* paintInvalid
ationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool*
wasFixed, const PaintInvalidationState* paintInvalidationState) const |
373 { | 373 { |
374 ASSERT(mode & ~IsFixed); // We should have no fixed content in the SVG rende
ring tree. | 374 ASSERT(mode & ~IsFixed); // We should have no fixed content in the SVG rende
ring tree. |
(...skipping 50 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 |