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

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

Issue 184023003: Make InlineBox::renderer() and related subclass methods return reference. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: No reference reassignment. Created 6 years, 9 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // If our bounds changed, notify the parents. 412 // If our bounds changed, notify the parents.
413 if (updateCachedBoundariesInParents) 413 if (updateCachedBoundariesInParents)
414 RenderSVGBlock::setNeedsBoundariesUpdate(); 414 RenderSVGBlock::setNeedsBoundariesUpdate();
415 415
416 repainter.repaintAfterLayout(); 416 repainter.repaintAfterLayout();
417 clearNeedsLayout(); 417 clearNeedsLayout();
418 } 418 }
419 419
420 RootInlineBox* RenderSVGText::createRootInlineBox() 420 RootInlineBox* RenderSVGText::createRootInlineBox()
421 { 421 {
422 RootInlineBox* box = new SVGRootInlineBox(this); 422 RootInlineBox* box = new SVGRootInlineBox(*this);
423 box->setHasVirtualLogicalHeight(); 423 box->setHasVirtualLogicalHeight();
424 return box; 424 return box;
425 } 425 }
426 426
427 bool RenderSVGText::nodeAtFloatPoint(const HitTestRequest& request, HitTestResul t& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) 427 bool RenderSVGText::nodeAtFloatPoint(const HitTestRequest& request, HitTestResul t& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
428 { 428 {
429 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, r equest, style()->pointerEvents()); 429 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, r equest, style()->pointerEvents());
430 bool isVisible = (style()->visibility() == VISIBLE); 430 bool isVisible = (style()->visibility() == VISIBLE);
431 if (isVisible || !hitRules.requireVisible) { 431 if (isVisible || !hitRules.requireVisible) {
432 if ((hitRules.canHitBoundingBox && !objectBoundingBox().isEmpty()) 432 if ((hitRules.canHitBoundingBox && !objectBoundingBox().isEmpty())
(...skipping 20 matching lines...) Expand all
453 if (!rootBox) 453 if (!rootBox)
454 return createPositionWithAffinity(0, DOWNSTREAM); 454 return createPositionWithAffinity(0, DOWNSTREAM);
455 455
456 ASSERT(!rootBox->nextRootBox()); 456 ASSERT(!rootBox->nextRootBox());
457 ASSERT(childrenInline()); 457 ASSERT(childrenInline());
458 458
459 InlineBox* closestBox = toSVGRootInlineBox(rootBox)->closestLeafChildForPosi tion(pointInContents); 459 InlineBox* closestBox = toSVGRootInlineBox(rootBox)->closestLeafChildForPosi tion(pointInContents);
460 if (!closestBox) 460 if (!closestBox)
461 return createPositionWithAffinity(0, DOWNSTREAM); 461 return createPositionWithAffinity(0, DOWNSTREAM);
462 462
463 return closestBox->renderer()->positionForPoint(LayoutPoint(pointInContents. x(), closestBox->y())); 463 return closestBox->renderer().positionForPoint(LayoutPoint(pointInContents.x (), closestBox->y()));
464 } 464 }
465 465
466 void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) cons t 466 void RenderSVGText::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) cons t
467 { 467 {
468 quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed )); 468 quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed ));
469 } 469 }
470 470
471 void RenderSVGText::paint(PaintInfo& paintInfo, const LayoutPoint&) 471 void RenderSVGText::paint(PaintInfo& paintInfo, const LayoutPoint&)
472 { 472 {
473 if (paintInfo.context->paintingDisabled()) 473 if (paintInfo.context->paintingDisabled())
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 return 0; 539 return 0;
540 } 540 }
541 541
542 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl e 542 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl e
543 // in a SVG text element context. 543 // in a SVG text element context.
544 void RenderSVGText::updateFirstLetter() 544 void RenderSVGText::updateFirstLetter()
545 { 545 {
546 } 546 }
547 547
548 } 548 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGInlineText.cpp ('k') | Source/core/rendering/svg/SVGInlineFlowBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698