Chromium Code Reviews| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 { | 63 { |
| 64 } | 64 } |
| 65 | 65 |
| 66 RenderSVGText::~RenderSVGText() | 66 RenderSVGText::~RenderSVGText() |
| 67 { | 67 { |
| 68 ASSERT(m_layoutAttributes.isEmpty()); | 68 ASSERT(m_layoutAttributes.isEmpty()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool RenderSVGText::isChildAllowed(RenderObject* child, RenderStyle*) const | 71 bool RenderSVGText::isChildAllowed(RenderObject* child, RenderStyle*) const |
| 72 { | 72 { |
| 73 return child->isSVGInline() || (child->isText() && !SVGRenderSupport::isEmpt ySVGInlineText(child)); | 73 return (child->isText() && SVGRenderSupport::isRenderableTextNode(child)) || child->isSVGInline(); |
|
Stephen Chennney
2014/02/03 16:01:15
Slightly more efficient to order the || clause the
| |
| 74 } | 74 } |
| 75 | 75 |
| 76 RenderSVGText* RenderSVGText::locateRenderSVGTextAncestor(RenderObject* start) | 76 RenderSVGText* RenderSVGText::locateRenderSVGTextAncestor(RenderObject* start) |
| 77 { | 77 { |
| 78 ASSERT(start); | 78 ASSERT(start); |
| 79 while (start && !start->isSVGText()) | 79 while (start && !start->isSVGText()) |
| 80 start = start->parent(); | 80 start = start->parent(); |
| 81 if (!start || !start->isSVGText()) | 81 if (!start || !start->isSVGText()) |
| 82 return 0; | 82 return 0; |
| 83 return toRenderSVGText(start); | 83 return toRenderSVGText(start); |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 537 return 0; | 537 return 0; |
| 538 } | 538 } |
| 539 | 539 |
| 540 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl e | 540 // Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Styl e |
| 541 // in a SVG text element context. | 541 // in a SVG text element context. |
| 542 void RenderSVGText::updateFirstLetter() | 542 void RenderSVGText::updateFirstLetter() |
| 543 { | 543 { |
| 544 } | 544 } |
| 545 | 545 |
| 546 } | 546 } |
| OLD | NEW |