Changeset 35041 in webkit
- Timestamp:
- Jul 7, 2008 2:29:56 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r35040 r35041 1 2008-07-07 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Geoffrey Garen. 4 5 Fix for https://bugs.webkit.org/show_bug.cgi?id=19928 6 querySelectorAll should throw an exception if a NSResolver is passed in. 7 8 * fast/dom/SelectorAPI/not-supported-NSResolver-expected.txt: Added. 9 * fast/dom/SelectorAPI/not-supported-NSResolver.html: Added. 10 1 11 2008-07-07 Brady Eidson <beidson@apple.com> 2 12 -
trunk/WebCore/ChangeLog
r35040 r35041 1 2008-07-07 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Geoffrey Garen. 4 5 Fix for https://bugs.webkit.org/show_bug.cgi?id=19928 6 querySelectorAll should throw an exception if a NSResolver is passed in. 7 8 - Throw an NOT_SUPPORTED_ERR if a non-null or undefined parameter is passed 9 as the second argument to querySelector or querySelectorAll. 10 11 Test: fast/dom/SelectorAPI/not-supported-NSResolver.html 12 13 * bindings/js/JSDocumentCustom.cpp: 14 (WebCore::JSDocument::querySelector): 15 (WebCore::JSDocument::querySelectorAll): 16 * bindings/js/JSElementCustom.cpp: 17 (WebCore::JSElement::querySelector): 18 (WebCore::JSElement::querySelectorAll): 19 * dom/Document.idl: 20 * dom/Element.idl: 21 1 22 2008-07-07 Brady Eidson <beidson@apple.com> 2 23 -
trunk/WebCore/bindings/js/JSDocumentCustom.cpp
r34659 r35041 22 22 23 23 #include "DOMWindow.h" 24 #include "ExceptionCode.h" 24 25 #include "Frame.h" 25 26 #include "FrameLoader.h" … … 28 29 #include "JSHTMLDocument.h" 29 30 #include "JSLocation.h" 31 #include "JSNodeList.h" 30 32 #include "Location.h" 33 #include "NodeList.h" 31 34 #include "ScriptController.h" 32 35 … … 73 76 } 74 77 78 JSValue* JSDocument::querySelector(ExecState* exec, const ArgList& args) 79 { 80 if (!args[1]->isUndefinedOrNull()) { 81 setDOMException(exec, NOT_SUPPORTED_ERR); 82 return jsUndefined(); 83 } 84 85 Document* imp = impl(); 86 ExceptionCode ec = 0; 87 JSValue* result = toJS(exec, imp->querySelector(valueToStringWithUndefinedOrNullCheck(exec, args[0]), ec)); 88 setDOMException(exec, ec); 89 return result; 90 } 91 92 JSValue* JSDocument::querySelectorAll(ExecState* exec, const ArgList& args) 93 { 94 if (!args[1]->isUndefinedOrNull()) { 95 setDOMException(exec, NOT_SUPPORTED_ERR); 96 return jsUndefined(); 97 } 98 99 Document* imp = impl(); 100 ExceptionCode ec = 0; 101 JSValue* result = toJS(exec, imp->querySelectorAll(valueToStringWithUndefinedOrNullCheck(exec, args[0]), ec)); 102 setDOMException(exec, ec); 103 return result; 104 } 105 75 106 JSValue* toJS(ExecState* exec, Document* doc) 76 107 { -
trunk/WebCore/bindings/js/JSElementCustom.cpp
r34659 r35041 37 37 #include "JSAttr.h" 38 38 #include "JSHTMLElementWrapperFactory.h" 39 #include "JSNodeList.h" 40 #include "NodeList.h" 39 41 40 42 #if ENABLE(SVG) … … 126 128 } 127 129 128 130 JSValue* JSElement::querySelector(ExecState* exec, const ArgList& args) 131 { 132 if (!args[1]->isUndefinedOrNull()) { 133 setDOMException(exec, NOT_SUPPORTED_ERR); 134 return jsUndefined(); 135 } 136 137 Element* imp = impl(); 138 ExceptionCode ec = 0; 139 JSValue* result = toJS(exec, imp->querySelector(valueToStringWithUndefinedOrNullCheck(exec, args[0]), ec)); 140 setDOMException(exec, ec); 141 return result; 142 } 143 144 JSValue* JSElement::querySelectorAll(ExecState* exec, const ArgList& args) 145 { 146 if (!args[1]->isUndefinedOrNull()) { 147 setDOMException(exec, NOT_SUPPORTED_ERR); 148 return jsUndefined(); 149 } 150 151 Element* imp = impl(); 152 ExceptionCode ec = 0; 153 JSValue* result = toJS(exec, imp->querySelectorAll(valueToStringWithUndefinedOrNullCheck(exec, args[0]), ec)); 154 setDOMException(exec, ec); 155 return result; 156 } 157 129 158 JSValue* toJSNewlyCreated(ExecState* exec, Element* element) 130 159 { -
trunk/WebCore/dom/Document.idl
r34741 r35041 234 234 235 235 // HTML 5 236 NodeList 237 238 // DocumentSelector - Selector API239 ElementquerySelector(in [ConvertUndefinedOrNullToNullString] DOMString selectors)240 raises(DOMException); 241 NodeListquerySelectorAll(in [ConvertUndefinedOrNullToNullString] DOMString selectors)236 NodeList getElementsByClassName(in DOMString tagname); 237 238 // NodeSelector - Selector API 239 [Custom] Element querySelector(in [ConvertUndefinedOrNullToNullString] DOMString selectors) 240 raises(DOMException); 241 [Custom] NodeList querySelectorAll(in [ConvertUndefinedOrNullToNullString] DOMString selectors) 242 242 raises(DOMException); 243 243 }; -
trunk/WebCore/dom/Element.idl
r34543 r35041 104 104 NodeList getElementsByClassName(in DOMString name); 105 105 106 // ElementSelector - Selector API107 ElementquerySelector(in [ConvertUndefinedOrNullToNullString] DOMString selectors)106 // NodeSelector - Selector API 107 [Custom] Element querySelector(in [ConvertUndefinedOrNullToNullString] DOMString selectors) 108 108 raises(DOMException); 109 NodeListquerySelectorAll(in [ConvertUndefinedOrNullToNullString] DOMString selectors)109 [Custom] NodeList querySelectorAll(in [ConvertUndefinedOrNullToNullString] DOMString selectors) 110 110 raises(DOMException); 111 111
Note: See TracChangeset
for help on using the changeset viewer.