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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |