RESOLVED FIXED 46963
Add helper methods to cast between renderers & SVGTextContent/PositioningElement
https://bugs.webkit.org/show_bug.cgi?id=46963
Summary Add helper methods to cast between renderers & SVGTextContent/PositioningElement
Nikolas Zimmermann
Reported 2010-10-01 00:02:18 PDT
The new text layout engine needs a simple way to cast a inlineTextBox->renderer() to either SVGTextContentElement or SVGTextPositioningElement. Add static helper methods doing that.
Attachments
Patch (3.94 KB, patch)
2010-10-01 00:04 PDT, Nikolas Zimmermann
krit: review+
Nikolas Zimmermann
Comment 1 2010-10-01 00:04:11 PDT
Dirk Schulze
Comment 2 2010-10-01 00:15:22 PDT
Comment on attachment 69428 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=69428&action=review The patch itself looks good to me. r=me with the fixes. > WebCore/svg/SVGTextContentElement.cpp:219 > +SVGTextContentElement* SVGTextContentElement::fromRenderer(RenderObject* renderer) Another name for 'fromRenderer' is maybe more self-explanatory. Niko suggested elementFromRenderer. > WebCore/svg/SVGTextContentElement.cpp:238 > + if (!node->hasTagName(SVGNames::textTag) > + && !node->hasTagName(SVGNames::tspanTag) > +#if ENABLE(SVG_FONTS) > + && !node->hasTagName(SVGNames::altGlyphTag) > +#endif > + && !node->hasTagName(SVGNames::trefTag) > + && !node->hasTagName(SVGNames::textPathTag)) > + return 0; The indention is wrong. > WebCore/svg/SVGTextPositioningElement.cpp:164 > + if (!node->hasTagName(SVGNames::textTag) > + && !node->hasTagName(SVGNames::tspanTag) > +#if ENABLE(SVG_FONTS) > + && !node->hasTagName(SVGNames::altGlyphTag) > +#endif > + && !node->hasTagName(SVGNames::trefTag)) > + return 0; wrong indention.
Nikolas Zimmermann
Comment 3 2010-10-01 00:37:21 PDT
Landed in r68867.
Note You need to log in before you can comment on or make changes to this bug.