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

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

Issue 261773008: [SVG2] css 'outline' property should apply to svg elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use Ahem instead Created 6 years, 7 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 { 465 {
466 quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed )); 466 quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed ));
467 } 467 }
468 468
469 void RenderSVGText::paint(PaintInfo& paintInfo, const LayoutPoint&) 469 void RenderSVGText::paint(PaintInfo& paintInfo, const LayoutPoint&)
470 { 470 {
471 if (paintInfo.context->paintingDisabled()) 471 if (paintInfo.context->paintingDisabled())
472 return; 472 return;
473 473
474 if (paintInfo.phase != PaintPhaseForeground 474 if (paintInfo.phase != PaintPhaseForeground
475 && paintInfo.phase != PaintPhaseSelfOutline
476 && paintInfo.phase != PaintPhaseSelection) 475 && paintInfo.phase != PaintPhaseSelection)
477 return; 476 return;
478 477
479 PaintInfo blockInfo(paintInfo); 478 PaintInfo blockInfo(paintInfo);
480 GraphicsContextStateSaver stateSaver(*blockInfo.context, false); 479 GraphicsContextStateSaver stateSaver(*blockInfo.context, false);
481 const AffineTransform& localTransform = localToParentTransform(); 480 const AffineTransform& localTransform = localToParentTransform();
482 if (!localTransform.isIdentity()) { 481 if (!localTransform.isIdentity()) {
483 stateSaver.save(); 482 stateSaver.save();
484 blockInfo.applyTransform(localTransform, false); 483 blockInfo.applyTransform(localTransform, false);
485 } 484 }
486 RenderBlock::paint(blockInfo, LayoutPoint()); 485 RenderBlock::paint(blockInfo, LayoutPoint());
486
487 // Paint the outlines, if any
488 if (paintInfo.phase == PaintPhaseForeground) {
489 blockInfo.phase = PaintPhaseSelfOutline;
490 RenderBlock::paint(blockInfo, LayoutPoint());
491 }
487 } 492 }
488 493
489 FloatRect RenderSVGText::strokeBoundingBox() const 494 FloatRect RenderSVGText::strokeBoundingBox() const
490 { 495 {
491 FloatRect strokeBoundaries = objectBoundingBox(); 496 FloatRect strokeBoundaries = objectBoundingBox();
492 const SVGRenderStyle* svgStyle = style()->svgStyle(); 497 const SVGRenderStyle* svgStyle = style()->svgStyle();
493 if (!svgStyle->hasStroke()) 498 if (!svgStyle->hasStroke())
494 return strokeBoundaries; 499 return strokeBoundaries;
495 500
496 ASSERT(node()); 501 ASSERT(node());
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 return 0; 542 return 0;
538 } 543 }
539 544
540 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl e 545 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl e
541 // in a SVG text element context. 546 // in a SVG text element context.
542 void RenderSVGText::updateFirstLetter() 547 void RenderSVGText::updateFirstLetter()
543 { 548 {
544 } 549 }
545 550
546 } 551 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGShape.cpp ('k') | Source/core/rendering/svg/SVGInlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698