Chromium Code Reviews| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 LayoutRect decoratedPaintInvalidationRect = unionRect(localSelectionRect (false), visualOverflowRect()); | 321 LayoutRect decoratedPaintInvalidationRect = unionRect(localSelectionRect (false), visualOverflowRect()); |
| 322 paintInvalidationRect.unite(decoratedPaintInvalidationRect); | 322 paintInvalidationRect.unite(decoratedPaintInvalidationRect); |
| 323 } | 323 } |
| 324 | 324 |
| 325 // Compute the paint invalidation rect in the parent coordinate space. | 325 // Compute the paint invalidation rect in the parent coordinate space. |
| 326 LayoutRect rect = enclosingIntRect(paintInvalidationRect); | 326 LayoutRect rect = enclosingIntRect(paintInvalidationRect); |
| 327 RenderReplaced::mapRectToPaintInvalidationBacking(paintInvalidationContainer , rect, paintInvalidationState); | 327 RenderReplaced::mapRectToPaintInvalidationBacking(paintInvalidationContainer , rect, paintInvalidationState); |
| 328 return rect; | 328 return rect; |
| 329 } | 329 } |
| 330 | 330 |
| 331 void RenderSVGRoot::computeFloatRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, FloatRect& paintInvalidationRect, const Paint InvalidationState* paintInvalidationState) const | 331 void RenderSVGRoot::mapRectToPaintInvalidationBacking(const RenderLayerModelObje ct* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const |
| 332 { | 332 { |
| 333 // Apply our local transforms (except for x/y translation), then our shadow, | 333 // Note that we don't apply the border-box transform here - it's assumed |
| 334 // and then call RenderBox's method to handle all the normal CSS Box model b its | 334 // that whoever called us has done that already. |
| 335 paintInvalidationRect = m_localToBorderBoxTransform.mapRect(paintInvalidatio nRect); | |
| 336 | 335 |
| 337 // Apply initial viewport clip | 336 // Apply initial viewport clip |
| 338 if (shouldApplyViewportClip()) | 337 if (shouldApplyViewportClip()) |
| 339 paintInvalidationRect.intersect(pixelSnappedBorderBoxRect()); | 338 rect.intersect(pixelSnappedBorderBoxRect()); |
|
pdr.
2014/11/21 08:32:05
PaintInvalidationState's ctor has something that l
pdr.
2014/11/21 08:32:05
PaintInvalidationState's ctor has something that l
fs
2014/11/21 11:23:15
They are the same thing, but in different coordina
| |
| 340 | 339 |
| 341 LayoutRect rect = enclosingIntRect(paintInvalidationRect); | |
| 342 RenderReplaced::mapRectToPaintInvalidationBacking(paintInvalidationContainer , rect, paintInvalidationState); | 340 RenderReplaced::mapRectToPaintInvalidationBacking(paintInvalidationContainer , rect, paintInvalidationState); |
| 343 paintInvalidationRect = rect; | |
| 344 } | 341 } |
| 345 | 342 |
| 346 // This method expects local CSS box coordinates. | 343 // This method expects local CSS box coordinates. |
| 347 // Callers with local SVG viewport coordinates should first apply the localToBor derBoxTransform | 344 // Callers with local SVG viewport coordinates should first apply the localToBor derBoxTransform |
| 348 // to convert from SVG viewport coordinates to local CSS box coordinates. | 345 // to convert from SVG viewport coordinates to local CSS box coordinates. |
| 349 void RenderSVGRoot::mapLocalToContainer(const RenderLayerModelObject* paintInval idationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool * wasFixed, const PaintInvalidationState* paintInvalidationState) const | 346 void RenderSVGRoot::mapLocalToContainer(const RenderLayerModelObject* paintInval idationContainer, TransformState& transformState, MapCoordinatesFlags mode, bool * wasFixed, const PaintInvalidationState* paintInvalidationState) const |
| 350 { | 347 { |
| 351 ASSERT(mode & ~IsFixed); // We should have no fixed content in the SVG rende ring tree. | 348 ASSERT(mode & ~IsFixed); // We should have no fixed content in the SVG rende ring tree. |
| 352 // We used to have this ASSERT here, but we removed it when enabling layer s quashing. | 349 // We used to have this ASSERT here, but we removed it when enabling layer s quashing. |
| 353 // See http://crbug.com/364901 | 350 // See http://crbug.com/364901 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 402 updateHitTestResult(result, pointInBorderBox); | 399 updateHitTestResult(result, pointInBorderBox); |
| 403 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn Container, boundsRect)) | 400 if (!result.addNodeToRectBasedTestResult(node(), request, locationIn Container, boundsRect)) |
| 404 return true; | 401 return true; |
| 405 } | 402 } |
| 406 } | 403 } |
| 407 | 404 |
| 408 return false; | 405 return false; |
| 409 } | 406 } |
| 410 | 407 |
| 411 } | 408 } |
| OLD | NEW |