Bug 118284

Summary: Simplify SVGTextContentElement::elementFromRenderer()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: SVGAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, d-r, fmalita, krit, laszlo.gombos, pdr, rwlbuis, schenney, thorton, zimmermann
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2013-07-01 23:30:59 PDT
Simplify SVGTextContentElement::elementFromRenderer() by leveraging SVGElement::isTextContent() methods instead of explicitly checking for tag names. Corresponding Blink revision: https://src.chromium.org/viewvc/blink?revision=153348&view=revision
Attachments
Patch (1.87 KB, patch)
2013-07-02 00:11 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2013-07-02 00:11:49 PDT
WebKit Commit Bot
Comment 2 2013-07-02 04:51:06 PDT
Comment on attachment 205874 [details] Patch Clearing flags on attachment: 205874 Committed r152284: <http://trac.webkit.org/changeset/152284>
WebKit Commit Bot
Comment 3 2013-07-02 04:51:09 PDT
All reviewed patches have been landed. Closing bug.
Dirk Schulze
Comment 4 2013-07-02 12:24:17 PDT
Comment on attachment 205874 [details] Patch I assume we had these lines for <tref>. But am not entirely sure. Even if it landed, can you elaborate in the history so that we don't miss anything?
Chris Dumez
Comment 5 2013-07-02 13:16:25 PDT
(In reply to comment #4) > (From update of attachment 205874 [details]) > I assume we had these lines for <tref>. But am not entirely sure. Even if it landed, can you elaborate in the history so that we don't miss anything? For tref? Why does tref need special handling? SVGTRefElement inherits SVGTextContentElement so SVGTRefElement::isTextContent() will return true as expected. This function is supported to return a SVGTextContentElement from a Node so it seems logical to use isTextContent() / toSVGTextContentElement() instead of checking manually for all tags that correspond to SVGTextContentElement subclasses. AFAICT, there is no behavior change with this patch as the checks do the same in the end. Please let me know if I overlooked something.
Note You need to log in before you can comment on or make changes to this bug.