Changeset 109702 in webkit
- Timestamp:
- Mar 4, 2012 8:09:39 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109699 r109702 1 2012-03-04 MORITA Hajime <morrita@google.com> 2 3 WebKit needs toHTMLUnknownElement() and isUnknown() for sanity check. 4 https://bugs.webkit.org/show_bug.cgi?id=80229 5 6 Reviewed by Kent Tamura. 7 8 The code generator has naked static_cast<> which could be unsafe. 9 We can turn it into toHTMLUnknownElement() and the like. 10 11 No new tests. Just added a sanity check. 12 13 * dom/make_names.pl: 14 (printWrapperFactoryCppFile): 15 * html/HTMLElement.h: 16 (HTMLElement): 17 (WebCore::HTMLElement::isHTMLUnknownElement): 18 * html/HTMLUnknownElement.h: 19 (HTMLUnknownElement): 20 (WebCore::toHTMLUnknownElement): 21 (WebCore): 22 * mathml/MathMLElement.h: 23 (toMathMLElement): 24 * svg/SVGElement.h: 25 (WebCore::toSVGElement): 26 (WebCore): 27 1 28 2012-03-04 Luke Macpherson <macpherson@chromium.org> 2 29 -
trunk/Source/WebCore/dom/make_names.pl
r108832 r109702 1162 1162 print F <<END 1163 1163 return createWrapperFunction(element); 1164 return V8$parameters{fallbackInterfaceName}::wrap( static_cast<$parameters{fallbackInterfaceName}*>(element), forceNewObject);1164 return V8$parameters{fallbackInterfaceName}::wrap(to$parameters{fallbackInterfaceName}(element), forceNewObject); 1165 1165 END 1166 1166 ; -
trunk/Source/WebCore/html/HTMLElement.h
r109149 r109702 98 98 #endif 99 99 100 #ifndef NDEBUG 101 virtual bool isHTMLUnknownElement() const { return false; } 102 #endif 103 100 104 protected: 101 105 HTMLElement(const QualifiedName& tagName, Document*); -
trunk/Source/WebCore/html/HTMLUnknownElement.h
r95901 r109702 42 42 } 43 43 44 #ifndef NDEBUG 45 virtual bool isHTMLUnknownElement() const OVERRIDE { return true; } 46 #endif 47 44 48 private: 45 49 HTMLUnknownElement(const QualifiedName& tagName, Document* document) … … 49 53 }; 50 54 55 inline HTMLUnknownElement* toHTMLUnknownElement(HTMLElement* element) 56 { 57 ASSERT(!element || element->isHTMLUnknownElement()); 58 return static_cast<HTMLUnknownElement*>(element); 59 } 60 51 61 } // namespace 52 62 -
trunk/Source/WebCore/mathml/MathMLElement.h
r109149 r109702 49 49 } 50 50 51 inline MathMLElement* toMathMLElement(Element* element) 52 { 53 ASSERT(!element || element->isMathMLElement()); 54 return static_cast<MathMLElement*>(element); 55 } 56 51 57 #endif // ENABLE(MATHML) 52 58 #endif // MathMLElement_h -
trunk/Source/WebCore/svg/SVGElement.h
r109342 r109702 149 149 }; 150 150 151 inline SVGElement* toSVGElement(Element* element) 152 { 153 ASSERT(!element || element->isSVGElement()); 154 return static_cast<SVGElement*>(element); 155 } 156 151 157 } 152 158
Note: See TracChangeset
for help on using the changeset viewer.