Bug 138474 - Stop special-casing wbr elements in HTMLElement::createElementRenderer()
Summary: Stop special-casing wbr elements in HTMLElement::createElementRenderer()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-06 13:29 PST by Chris Dumez
Modified: 2014-11-07 15:43 PST (History)
5 users (show)

See Also:


Attachments
Patch (16.03 KB, patch)
2014-11-06 13:32 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 :)