| Summary: | Add toHTMLTableSectionElement() functions, and use it | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Gyuyoung Kim <gyuyoung.kim> | ||||||||||
| Component: | DOM | Assignee: | Gyuyoung Kim <gyuyoung.kim> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | commit-queue, esprehn+autocc, gyuyoung.kim, kling | ||||||||||
| Priority: | P2 | ||||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Gyuyoung Kim
2014-01-02 22:37:30 PST
Created attachment 220280 [details]
Patch
CC'ing Kling. Comment on attachment 220280 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220280&action=review > Source/WebCore/ChangeLog:3 > + Generate toHTMLTableElement(), and use it This patch seems to be about toHTMLTableSectionElement(), not toHTMLTableElement(). > Source/WebCore/html/HTMLTagNames.in:121 > -tbody interfaceName=HTMLTableSectionElement > +tbody interfaceName=HTMLTableSectionElement, generateTypeHelpers HTMLTableSectionElement can have one of three tags: <thead>, <tbody> or <tfoot>. This would generate an isHTMLTableSectionElement() that only returns true for <tbody>. Comment on attachment 220280 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220280&action=review >> Source/WebCore/ChangeLog:3 >> + Generate toHTMLTableElement(), and use it > > This patch seems to be about toHTMLTableSectionElement(), not toHTMLTableElement(). Oops. my mistake. >> Source/WebCore/html/HTMLTagNames.in:121 >> +tbody interfaceName=HTMLTableSectionElement, generateTypeHelpers > > HTMLTableSectionElement can have one of three tags: <thead>, <tbody> or <tfoot>. > This would generate an isHTMLTableSectionElement() that only returns true for <tbody>. Ah, right. I forget it. I'm sorry. If so, how about adding manual toHTMLTableSectionElement() for HTMLTableSectionElement ? Created attachment 220293 [details]
Patch
Created attachment 220294 [details]
Patch
kling, how about this latest one ? Comment on attachment 220294 [details] Patch Clearing flags on attachment: 220294 Committed r161401: <http://trac.webkit.org/changeset/161401> All reviewed patches have been landed. Closing bug. This broke dozens of tests, which crash now. http://build.webkit.org/results/Apple%20Mavericks%20Debug%20WK1%20(Tests)/r161401%20(1535)/results.html Reverted r161401 for reason: REGRESSION(r161401): Break layout test on mac-wk1(Debug) Committed r161408: <http://trac.webkit.org/changeset/161408> Comment on attachment 220294 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220294&action=review Can't this just use NODE_TYPE_CASTS instead? SVGSMILElement does something similar. > Source/WebCore/html/HTMLTableSectionElement.h:66 > + return node.hasTagName(HTMLNames::trTag) || node.hasTagName(HTMLNames::tfootTag) || node.hasTagName(HTMLNames::tbodyTag); trTag should be theadTag here. > Source/WebCore/html/HTMLTableSectionElement.h:94 > +inline HTMLTableSectionElement* toHTMLTableSectionElement(Node* node) > +{ > + ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTableSectionElement(*node)); > + return static_cast<HTMLTableSectionElement*>(node); > +} > + > +inline const HTMLTableSectionElement* toHTMLTableSectionElement(const Node* node) > +{ > + ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTableSectionElement(*node)); > + return static_cast<const HTMLTableSectionElement*>(node); > +} > + > +inline HTMLTableSectionElement& toHTMLTableSectionElement(Node& node) > +{ > + ASSERT_WITH_SECURITY_IMPLICATION(isHTMLTableSectionElement(node)); > + return static_cast<HTMLTableSectionElement&>(node); > +} > + > +inline const HTMLTableSectionElement& toHTMLTableSectionElement(const Node& node) > +{ > + ASSERT_WITH_SECURITY_IMPLICATION(isHTMLTableSectionElement(node)); > + return static_cast<const HTMLTableSectionElement&>(node); > +} > + > +void toHTMLTableSectionElement(const HTMLTableSectionElement*); > +void toHTMLTableSectionElement(const HTMLTableSectionElement&); Can't Created attachment 220504 [details]
Patch
(In reply to comment #12) > (From update of attachment 220294 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=220294&action=review > > Can't this just use NODE_TYPE_CASTS instead? SVGSMILElement does something similar. There were many faults. I updated this patch according to your suggestion. Thanks. Comment on attachment 220504 [details] Patch Clearing flags on attachment: 220504 Committed r161420: <http://trac.webkit.org/changeset/161420> All reviewed patches have been landed. Closing bug. |