Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(953)

Side by Side Diff: Source/core/rendering/svg/RenderSVGText.cpp

Issue 23447021: Add toSVGRootInlineBox(), and use it as much as we can (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlockLineLayout.cpp ('k') | Source/core/rendering/svg/SVGRenderTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698