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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp

Issue 2604073002: Apply offset from the correct graphics layer; simplify code for link highlights. (Closed)
Patch Set: Created 3 years, 11 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
343 return closestBox->getLineLayoutItem().positionForPoint( 343 return closestBox->getLineLayoutItem().positionForPoint(
344 LayoutPoint(clippedPointInContents.x(), closestBox->y())); 344 LayoutPoint(clippedPointInContents.x(), closestBox->y()));
345 } 345 }
346 346
347 void LayoutSVGText::absoluteQuads(Vector<FloatQuad>& quads) const { 347 void LayoutSVGText::absoluteQuads(Vector<FloatQuad>& quads,
348 quads.append(localToAbsoluteQuad(strokeBoundingBox())); 348 MapCoordinatesFlags mode) const {
349 quads.append(localToAbsoluteQuad(strokeBoundingBox(), mode));
349 } 350 }
350 351
351 void LayoutSVGText::paint(const PaintInfo& paintInfo, 352 void LayoutSVGText::paint(const PaintInfo& paintInfo,
352 const LayoutPoint&) const { 353 const LayoutPoint&) const {
353 SVGTextPainter(*this).paint(paintInfo); 354 SVGTextPainter(*this).paint(paintInfo);
354 } 355 }
355 356
356 FloatRect LayoutSVGText::objectBoundingBox() const { 357 FloatRect LayoutSVGText::objectBoundingBox() const {
357 if (const RootInlineBox* box = firstRootBox()) 358 if (const RootInlineBox* box = firstRootBox())
358 return FloatRect(box->frameRect()); 359 return FloatRect(box->frameRect());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 411
411 void LayoutSVGText::invalidateTreeIfNeeded( 412 void LayoutSVGText::invalidateTreeIfNeeded(
412 const PaintInvalidationState& paintInvalidationState) { 413 const PaintInvalidationState& paintInvalidationState) {
413 // TODO(wangxianzhu): Verify if the inherited 414 // TODO(wangxianzhu): Verify if the inherited
414 // LayoutBoxModelObject::invalidateTreeIfNeeded() 415 // LayoutBoxModelObject::invalidateTreeIfNeeded()
415 // is applicable here. If yes, remove this overriding method. 416 // is applicable here. If yes, remove this overriding method.
416 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); 417 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState);
417 } 418 }
418 419
419 } // namespace blink 420 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698