Bug 46963

Summary: Add helper methods to cast between renderers & SVGTextContent/PositioningElement
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: SVGAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: mdelaney7, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch krit: review+

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.