Bug 138474

Summary: Stop special-casing wbr elements in HTMLElement::createElementRenderer()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, darin, kling, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2014-11-06 13:29:48 PST
Stop special-casing wbr elements in HTMLElement::createElementRenderer() and move the code to a HTMLWBRElement subclasses instead, that is overriding createElementRenderer(). This function is already virtual.
Comment 1 Chris Dumez 2014-11-06 13:32:39 PST
Created attachment 241128 [details]
Patch
Comment 2 WebKit Commit Bot 2014-11-06 15:17:27 PST
Comment on attachment 241128 [details]
Patch

Clearing flags on attachment: 241128

Committed r175720: <http://trac.webkit.org/changeset/175720>
Comment 3 WebKit Commit Bot 2014-11-06 15:17:31 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Darin Adler 2014-11-07 15:40:13 PST
Comment on attachment 241128 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241128&action=review

> Source/WebCore/rendering/RenderLineBreak.cpp:47
> +    , m_isWBR(is<HTMLWBRElement>(element))

How does this work? I don’t see code (macro invocation?) specializing the is function template for this class.
Comment 5 Chris Dumez 2014-11-07 15:43:15 PST
(In reply to comment #4)
> Comment on attachment 241128 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=241128&action=review
> 
> > Source/WebCore/rendering/RenderLineBreak.cpp:47
> > +    , m_isWBR(is<HTMLWBRElement>(element))
> 
> How does this work? I don’t see code (macro invocation?) specializing the is
> function template for this class.

The typing template specializations get generated automatically for all HTML/SVG/MathML elements unless we tell the script not to:
http://trac.webkit.org/changeset/174050

You even reviewed that change :)