| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> |
| 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. | 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. |
| 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 10 * | 10 * |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 return; | 1155 return; |
| 1156 | 1156 |
| 1157 // Apply transformation and get the bounding rect | 1157 // Apply transformation and get the bounding rect |
| 1158 Path transformedPath = path; | 1158 Path transformedPath = path; |
| 1159 transformedPath.transform(state().transform()); | 1159 transformedPath.transform(state().transform()); |
| 1160 FloatRect boundingRect = transformedPath.boundingRect(); | 1160 FloatRect boundingRect = transformedPath.boundingRect(); |
| 1161 | 1161 |
| 1162 // Offset by the canvas rect | 1162 // Offset by the canvas rect |
| 1163 LayoutRect pathRect(boundingRect); | 1163 LayoutRect pathRect(boundingRect); |
| 1164 IntRect canvasRect = layoutBox->absoluteContentBox(); | 1164 IntRect canvasRect = layoutBox->absoluteContentBox(); |
| 1165 pathRect.move(canvasRect.x(), canvasRect.y()); | 1165 pathRect.moveBy(canvasRect.location()); |
| 1166 | 1166 |
| 1167 renderer->scrollRectToVisible( | 1167 renderer->scrollRectToVisible( |
| 1168 pathRect, ScrollAlignment::alignCenterAlways, ScrollAlignment::alignTopA
lways); | 1168 pathRect, ScrollAlignment::alignCenterAlways, ScrollAlignment::alignTopA
lways); |
| 1169 | 1169 |
| 1170 // TODO: should implement "inform the user" that the caret and/or | 1170 // TODO: should implement "inform the user" that the caret and/or |
| 1171 // selection the specified rectangle of the canvas. See http://crbug.com/357
987 | 1171 // selection the specified rectangle of the canvas. See http://crbug.com/357
987 |
| 1172 } | 1172 } |
| 1173 | 1173 |
| 1174 void CanvasRenderingContext2D::clearRect(double x, double y, double width, doubl
e height) | 1174 void CanvasRenderingContext2D::clearRect(double x, double y, double width, doubl
e height) |
| 1175 { | 1175 { |
| (...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2326 if (imageType == CanvasRenderingContext2DState::NonOpaqueImage) | 2326 if (imageType == CanvasRenderingContext2DState::NonOpaqueImage) |
| 2327 return; | 2327 return; |
| 2328 if (alpha < 0xFF) | 2328 if (alpha < 0xFF) |
| 2329 return; | 2329 return; |
| 2330 } | 2330 } |
| 2331 | 2331 |
| 2332 canvas()->buffer()->willOverwriteCanvas(); | 2332 canvas()->buffer()->willOverwriteCanvas(); |
| 2333 } | 2333 } |
| 2334 | 2334 |
| 2335 } // namespace blink | 2335 } // namespace blink |
| OLD | NEW |