| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> | 3 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> |
| 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 4 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
| 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 5 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 6 * Copyright (C) 2008 Rob Buis <buis@kde.org> | 6 * Copyright (C) 2008 Rob Buis <buis@kde.org> |
| 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. |
| 9 * Copyright (C) 2012 Google Inc. | 9 * Copyright (C) 2012 Google Inc. |
| 10 * | 10 * |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 return false; | 320 return false; |
| 321 } | 321 } |
| 322 | 322 |
| 323 PositionWithAffinity LayoutSVGText::positionForPoint( | 323 PositionWithAffinity LayoutSVGText::positionForPoint( |
| 324 const LayoutPoint& pointInContents) { | 324 const LayoutPoint& pointInContents) { |
| 325 RootInlineBox* rootBox = firstRootBox(); | 325 RootInlineBox* rootBox = firstRootBox(); |
| 326 if (!rootBox) | 326 if (!rootBox) |
| 327 return createPositionWithAffinity(0); | 327 return createPositionWithAffinity(0); |
| 328 | 328 |
| 329 LayoutPoint clippedPointInContents(pointInContents); | 329 LayoutPoint clippedPointInContents(pointInContents); |
| 330 clippedPointInContents.moveBy(-rootBox->topLeft()); | 330 clippedPointInContents.moveBy(-rootBox->location()); |
| 331 clippedPointInContents.clampNegativeToZero(); | 331 clippedPointInContents.clampNegativeToZero(); |
| 332 clippedPointInContents.moveBy(rootBox->topLeft()); | 332 clippedPointInContents.moveBy(rootBox->location()); |
| 333 | 333 |
| 334 ASSERT(!rootBox->nextRootBox()); | 334 ASSERT(!rootBox->nextRootBox()); |
| 335 ASSERT(childrenInline()); | 335 ASSERT(childrenInline()); |
| 336 | 336 |
| 337 InlineBox* closestBox = | 337 InlineBox* closestBox = |
| 338 toSVGRootInlineBox(rootBox)->closestLeafChildForPosition( | 338 toSVGRootInlineBox(rootBox)->closestLeafChildForPosition( |
| 339 clippedPointInContents); | 339 clippedPointInContents); |
| 340 if (!closestBox) | 340 if (!closestBox) |
| 341 return createPositionWithAffinity(0); | 341 return createPositionWithAffinity(0); |
| 342 | 342 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 | 410 |
| 411 void LayoutSVGText::invalidateTreeIfNeeded( | 411 void LayoutSVGText::invalidateTreeIfNeeded( |
| 412 const PaintInvalidationState& paintInvalidationState) { | 412 const PaintInvalidationState& paintInvalidationState) { |
| 413 // TODO(wangxianzhu): Verify if the inherited | 413 // TODO(wangxianzhu): Verify if the inherited |
| 414 // LayoutBoxModelObject::invalidateTreeIfNeeded() | 414 // LayoutBoxModelObject::invalidateTreeIfNeeded() |
| 415 // is applicable here. If yes, remove this overriding method. | 415 // is applicable here. If yes, remove this overriding method. |
| 416 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); | 416 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); |
| 417 } | 417 } |
| 418 | 418 |
| 419 } // namespace blink | 419 } // namespace blink |
| OLD | NEW |