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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 ASSERT_NOT_REACHED(); | 461 ASSERT_NOT_REACHED(); |
462 return false; | 462 return false; |
463 } | 463 } |
464 | 464 |
465 PositionWithAffinity RenderSVGText::positionForPoint(const LayoutPoint& pointInC
ontents) | 465 PositionWithAffinity RenderSVGText::positionForPoint(const LayoutPoint& pointInC
ontents) |
466 { | 466 { |
467 RootInlineBox* rootBox = firstRootBox(); | 467 RootInlineBox* rootBox = firstRootBox(); |
468 if (!rootBox) | 468 if (!rootBox) |
469 return createPositionWithAffinity(0, DOWNSTREAM); | 469 return createPositionWithAffinity(0, DOWNSTREAM); |
470 | 470 |
471 ASSERT_WITH_SECURITY_IMPLICATION(rootBox->isSVGRootInlineBox()); | |
472 ASSERT(!rootBox->nextRootBox()); | 471 ASSERT(!rootBox->nextRootBox()); |
473 ASSERT(childrenInline()); | 472 ASSERT(childrenInline()); |
474 | 473 |
475 InlineBox* closestBox = static_cast<SVGRootInlineBox*>(rootBox)->closestLeaf
ChildForPosition(pointInContents); | 474 InlineBox* closestBox = toSVGRootInlineBox(rootBox)->closestLeafChildForPosi
tion(pointInContents); |
476 if (!closestBox) | 475 if (!closestBox) |
477 return createPositionWithAffinity(0, DOWNSTREAM); | 476 return createPositionWithAffinity(0, DOWNSTREAM); |
478 | 477 |
479 return closestBox->renderer()->positionForPoint(LayoutPoint(pointInContents.
x(), closestBox->y())); | 478 return closestBox->renderer()->positionForPoint(LayoutPoint(pointInContents.
x(), closestBox->y())); |
480 } | 479 } |
481 | 480 |
482 void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) cons
t | 481 void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) cons
t |
483 { | 482 { |
484 quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed
)); | 483 quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed
)); |
485 } | 484 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 return 0; | 550 return 0; |
552 } | 551 } |
553 | 552 |
554 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl
e | 553 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl
e |
555 // in a SVG text element context. | 554 // in a SVG text element context. |
556 void RenderSVGText::updateFirstLetter() | 555 void RenderSVGText::updateFirstLetter() |
557 { | 556 { |
558 } | 557 } |
559 | 558 |
560 } | 559 } |
OLD | NEW |