Changeset 127751 in webkit
- Timestamp:
- Sep 6, 2012, 10:11:32 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r127744 r127751 1 2012-09-06 Dan Bernstein <mitz@apple.com> 2 3 REGRESSION(r127712): It broke http/tests/xmlhttprequest/basic-auth.html on JSC platforms 4 https://bugs.webkit.org/show_bug.cgi?id=95972 5 6 Removed the failing test from the skipped list. 7 8 * platform/qt/Skipped: 9 1 10 2012-09-06 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> 2 11 -
trunk/LayoutTests/platform/qt/Skipped
r127728 r127751 2803 2803 fast/viewport/viewport-limits-adjusted-for-no-user-scale-control.html 2804 2804 fast/viewport/viewport-limits-adjusted-for-no-user-scale.html 2805 2806 # REGRESSION(r127712): It broke http/tests/xmlhttprequest/basic-auth.html on JSC platforms2807 # https://bugs.webkit.org/show_bug.cgi?id=959722808 http/tests/xmlhttprequest/basic-auth.html -
trunk/Source/WebCore/ChangeLog
r127748 r127751 1 2012-09-06 Dan Bernstein <mitz@apple.com> 2 3 REGRESSION(r127712): It broke http/tests/xmlhttprequest/basic-auth.html on JSC platforms 4 https://bugs.webkit.org/show_bug.cgi?id=95972 5 6 Reverted r127712, because it was based on the false premise that “[Optional] works the way 7 XMLHttpRequest expects”. 8 9 * bindings/js/JSXMLHttpRequestCustom.cpp: 10 (WebCore::JSXMLHttpRequest::open): 11 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: 12 (WebCore::V8XMLHttpRequest::openCallback): 13 (WebCore): 14 * xml/XMLHttpRequest.cpp: 15 (WebCore::XMLHttpRequest::open): 16 (WebCore): 17 * xml/XMLHttpRequest.h: 18 (XMLHttpRequest): 19 * xml/XMLHttpRequest.idl: 20 1 21 2012-09-06 Keishi Hattori <keishi@webkit.org> 2 22 -
trunk/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
r127712 r127751 80 80 81 81 // Custom functions 82 JSValue JSXMLHttpRequest::open(ExecState* exec) 83 { 84 if (exec->argumentCount() < 2) 85 return throwError(exec, createNotEnoughArgumentsError(exec)); 86 87 const KURL& url = impl()->scriptExecutionContext()->completeURL(exec->argument(1).toString(exec)->value(exec)); 88 String method = exec->argument(0).toString(exec)->value(exec); 89 90 ExceptionCode ec = 0; 91 if (exec->argumentCount() >= 3) { 92 bool async = exec->argument(2).toBoolean(exec); 93 94 if (exec->argumentCount() >= 4 && !exec->argument(3).isUndefined()) { 95 String user = valueToStringWithNullCheck(exec, exec->argument(3)); 96 97 if (exec->argumentCount() >= 5 && !exec->argument(4).isUndefined()) { 98 String password = valueToStringWithNullCheck(exec, exec->argument(4)); 99 impl()->open(method, url, async, user, password, ec); 100 } else 101 impl()->open(method, url, async, user, ec); 102 } else 103 impl()->open(method, url, async, ec); 104 } else 105 impl()->open(method, url, ec); 106 107 setDOMException(exec, ec); 108 return jsUndefined(); 109 } 82 110 83 111 JSValue JSXMLHttpRequest::send(ExecState* exec) -
trunk/Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
r127712 r127751 102 102 } 103 103 104 v8::Handle<v8::Value> V8XMLHttpRequest::openCallback(const v8::Arguments& args) 105 { 106 INC_STATS("DOM.XMLHttpRequest.open()"); 107 // Four cases: 108 // open(method, url) 109 // open(method, url, async) 110 // open(method, url, async, user) 111 // open(method, url, async, user, passwd) 112 113 if (args.Length() < 2) 114 return throwNotEnoughArgumentsError(args.GetIsolate()); 115 116 XMLHttpRequest* xmlHttpRequest = V8XMLHttpRequest::toNative(args.Holder()); 117 118 String method = toWebCoreString(args[0]); 119 String urlstring = toWebCoreString(args[1]); 120 ScriptExecutionContext* context = getScriptExecutionContext(); 121 if (!context) 122 return v8::Undefined(); 123 124 KURL url = context->completeURL(urlstring); 125 126 ExceptionCode ec = 0; 127 128 if (args.Length() >= 3) { 129 bool async = args[2]->BooleanValue(); 130 131 if (args.Length() >= 4 && !args[3]->IsUndefined()) { 132 String user = toWebCoreStringWithNullCheck(args[3]); 133 134 if (args.Length() >= 5 && !args[4]->IsUndefined()) { 135 String passwd = toWebCoreStringWithNullCheck(args[4]); 136 xmlHttpRequest->open(method, url, async, user, passwd, ec); 137 } else 138 xmlHttpRequest->open(method, url, async, user, ec); 139 } else 140 xmlHttpRequest->open(method, url, async, ec); 141 } else 142 xmlHttpRequest->open(method, url, ec); 143 144 if (ec) 145 return setDOMException(ec, args.GetIsolate()); 146 147 return v8::Undefined(); 148 } 149 104 150 static bool isDocumentType(v8::Handle<v8::Value> value) 105 151 { -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r127712 r127751 446 446 } 447 447 448 void XMLHttpRequest::open(const String& method, const String& url, ExceptionCode& ec) 449 { 450 internalOpen(method, scriptExecutionContext()->completeURL(url), true, ec); 451 } 452 453 void XMLHttpRequest::open(const String& method, const String& url, bool async, ExceptionCode& ec) 454 { 455 internalOpen(method, scriptExecutionContext()->completeURL(url), async, ec); 456 } 457 458 void XMLHttpRequest::open(const String& method, const String& url, bool async, const String& user, ExceptionCode& ec) 459 { 460 KURL urlWithCredentials(scriptExecutionContext()->completeURL(url)); 461 urlWithCredentials.setUser(user); 462 463 internalOpen(method, urlWithCredentials, async, ec); 464 } 465 466 void XMLHttpRequest::open(const String& method, const String& url, bool async, const String& user, const String& password, ExceptionCode& ec) 467 { 468 KURL urlWithCredentials(scriptExecutionContext()->completeURL(url)); 469 urlWithCredentials.setUser(user); 470 urlWithCredentials.setPass(password); 471 472 internalOpen(method, urlWithCredentials, async, ec); 473 } 474 475 void XMLHttpRequest::internalOpen(const String& method, const KURL& url, bool async, ExceptionCode& ec) 448 void XMLHttpRequest::open(const String& method, const KURL& url, ExceptionCode& ec) 449 { 450 open(method, url, true, ec); 451 } 452 453 void XMLHttpRequest::open(const String& method, const KURL& url, bool async, ExceptionCode& ec) 476 454 { 477 455 internalAbort(); … … 535 513 else 536 514 m_state = OPENED; 515 } 516 517 void XMLHttpRequest::open(const String& method, const KURL& url, bool async, const String& user, ExceptionCode& ec) 518 { 519 KURL urlWithCredentials(url); 520 urlWithCredentials.setUser(user); 521 522 open(method, urlWithCredentials, async, ec); 523 } 524 525 void XMLHttpRequest::open(const String& method, const KURL& url, bool async, const String& user, const String& password, ExceptionCode& ec) 526 { 527 KURL urlWithCredentials(url); 528 urlWithCredentials.setUser(user); 529 urlWithCredentials.setPass(password); 530 531 open(method, urlWithCredentials, async, ec); 537 532 } 538 533 -
trunk/Source/WebCore/xml/XMLHttpRequest.h
r127712 r127751 84 84 bool withCredentials() const { return m_includeCredentials; } 85 85 void setWithCredentials(bool, ExceptionCode&); 86 void open(const String& method, const String& url, ExceptionCode&);87 void open(const String& method, const String& url, bool async, ExceptionCode&);88 void open(const String& method, const String& url, bool async, const String& user, ExceptionCode&);89 void open(const String& method, const String& url, bool async, const String& user, const String& password, ExceptionCode&);86 void open(const String& method, const KURL&, ExceptionCode&); 87 void open(const String& method, const KURL&, bool async, ExceptionCode&); 88 void open(const String& method, const KURL&, bool async, const String& user, ExceptionCode&); 89 void open(const String& method, const KURL&, bool async, const String& user, const String& password, ExceptionCode&); 90 90 void send(ExceptionCode&); 91 91 void send(Document*, ExceptionCode&); … … 139 139 XMLHttpRequest(ScriptExecutionContext*, PassRefPtr<SecurityOrigin>); 140 140 141 void internalOpen(const String& method, const KURL&, bool async, ExceptionCode&);142 143 141 virtual void refEventTarget() { ref(); } 144 142 virtual void derefEventTarget() { deref(); } -
trunk/Source/WebCore/xml/XMLHttpRequest.idl
r127712 r127751 62 62 setter raises(DOMException); 63 63 64 void open(in DOMString method, in DOMString url, in [Optional] boolean async, in [Optional] DOMString user, in [Optional] DOMString password)64 [Custom] void open(in DOMString method, in DOMString url, in [Optional] boolean async, in [Optional] DOMString user, in [Optional] DOMString password) 65 65 raises(DOMException); 66 66
Note:
See TracChangeset
for help on using the changeset viewer.