Changeset 203849 in webkit
- Timestamp:
- Jul 28, 2016 4:29:37 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r203848 r203849 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 window.open.length should be 0 4 https://bugs.webkit.org/show_bug.cgi?id=160323 5 6 Reviewed by Darin Adler. 7 8 Update existing test to reflect behavior change. 9 10 * js/dom/function-length-expected.txt: 11 * js/dom/function-length.html: 12 1 13 2016-07-28 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/ChangeLog
r203848 r203849 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 window.open.length should be 0 4 https://bugs.webkit.org/show_bug.cgi?id=160323 5 6 Reviewed by Darin Adler. 7 8 Rebaseline W3C test now that one more check is passing. 9 10 * web-platform-tests/html/dom/interfaces-expected.txt: 11 1 12 2016-07-28 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r203848 r203849 5182 5182 PASS Window interface: attribute parent 5183 5183 PASS Window interface: attribute frameElement 5184 FAIL Window interface: operation open(DOMString,DOMString,DOMString,boolean) assert_equals: property has wrong .length expected 0 but got 2 5184 PASS Window interface: operation open(DOMString,DOMString,DOMString,boolean) 5185 5185 PASS Window interface: attribute navigator 5186 5186 FAIL Window interface: attribute external assert_own_property: The global object must have a property "external" expected property "external" missing -
trunk/LayoutTests/js/dom/function-length-expected.txt
r156066 r203849 5 5 6 6 PASS window.confirm.length is 0 7 PASS window.open.length is 27 PASS window.open.length is 0 8 8 PASS window.showModalDialog.length is 1 9 9 PASS window.setTimeout.length is 1 -
trunk/LayoutTests/js/dom/function-length.html
r156066 r203849 9 9 10 10 shouldBe('window.confirm.length', '0'); 11 shouldBe('window.open.length', ' 2');11 shouldBe('window.open.length', '0'); 12 12 shouldBe('window.showModalDialog.length', '1'); 13 13 shouldBe('window.setTimeout.length', '1'); -
trunk/Source/WebCore/ChangeLog
r203848 r203849 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 window.open.length should be 0 4 https://bugs.webkit.org/show_bug.cgi?id=160323 5 6 Reviewed by Darin Adler. 7 8 window.open.length should be 0 as all its parameters are optional: 9 - https://html.spec.whatwg.org/multipage/browsers.html#the-window-object 10 11 It is 2 in WebKit. Firefox and Chrome agree with the specification and return 0. 12 13 No new tests, rebaselined existing test. 14 15 * bindings/js/JSDOMWindowCustom.cpp: 16 (WebCore::JSDOMWindow::open): 17 Minor code optimization. 18 19 * page/DOMWindow.idl: 20 Update IDL to match the specification and our custom implementation. 21 This makes us return the right "length" value. 22 1 23 2016-07-28 Chris Dumez <cdumez@apple.com> 2 24 -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r203846 r203849 445 445 if (state.hadException()) 446 446 return jsUndefined(); 447 AtomicString frameName = state.argument(1).isUndefinedOrNull() ? "_blank" : state.argument(1).toString(&state)->value(&state); 447 JSValue targetValue = state.argument(1); 448 AtomicString target = targetValue.isUndefinedOrNull() ? AtomicString("_blank", AtomicString::ConstructFromLiteral) : targetValue.toString(&state)->toAtomicString(&state); 448 449 if (state.hadException()) 449 450 return jsUndefined(); … … 452 453 return jsUndefined(); 453 454 454 RefPtr<DOMWindow> openedWindow = wrapped().open(urlString, frameName, windowFeaturesString, activeDOMWindow(&state), firstDOMWindow(&state));455 RefPtr<DOMWindow> openedWindow = wrapped().open(urlString, target, windowFeaturesString, activeDOMWindow(&state), firstDOMWindow(&state)); 455 456 if (!openedWindow) 456 457 return jsUndefined(); -
trunk/Source/WebCore/page/DOMWindow.idl
r203623 r203849 66 66 void stop(); 67 67 68 [Custom] DOMWindow open(DOMString url, 69 DOMString name, 70 optional DOMString options); 68 [Custom] DOMWindow open(optional DOMString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = ""); 71 69 72 70 [Custom] any showModalDialog(DOMString url,
Note: See TracChangeset
for help on using the changeset viewer.