Changeset 55319 in webkit
- Timestamp:
- Feb 26, 2010 3:18:11 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r55318 r55319 1 2010-02-12 Brett Wilson <brettw@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Update the Google-URL version of KURL and the V8 bindings to the new 6 behavior of KURL.IsStandard. 7 8 https://bugs.webkit.org/show_bug.cgi?id=34859 9 10 This is covered by fast/dom/Window/invalid-protocol.html 11 12 * bindings/v8/custom/V8LocationCustom.cpp: 13 (WebCore::V8Location::protocolAccessorSetter): 14 * platform/KURLGoogle.cpp: 15 (WebCore::KURL::setProtocol): 16 (WebCore::KURL::isHierarchical): 17 18 2010-02-26 Gavin Barraclough <barraclough@apple.com> 19 20 Reviewed by NOBODY (Build fix following r55312). 21 22 * bridge/qt/qt_pixmapruntime.cpp: 23 (JSC::Bindings::QtPixmapInstance::invokeMethod): 24 1 25 2010-02-26 Yaar Schnitman <yaar@chromium.org> 2 26 … … 3422 3446 * html/HTMLOptionElement.h: 3423 3447 3424 2010-02-12 Brett Wilson <brettw@chromium.org>3425 3426 Reviewed by Adam Barth.3427 3428 Update the Google-URL version of KURL and the V8 bindings to the new3429 behavior of KURL.IsStandard.3430 3431 https://bugs.webkit.org/show_bug.cgi?id=348593432 3433 This is covered by fast/dom/Window/invalid-protocol.html3434 3435 * bindings/v8/custom/V8LocationCustom.cpp:3436 (WebCore::V8Location::protocolAccessorSetter):3437 * platform/KURLGoogle.cpp:3438 (WebCore::KURL::setProtocol):3439 (WebCore::KURL::isHierarchical):3440 3441 3448 2010-02-18 Simon Fraser <simon.fraser@apple.com> 3442 3449 … … 3809 3816 (WebCore::V8DOMWrapper::instantiateV8Object): Merge instantiateV8Object paths. 3810 3817 * bindings/v8/V8DOMWrapper.h: 3818 3819 2010-02-12 Brett Wilson <brettw@chromium.org> 3820 3821 Reviewed by Adam Barth. 3822 3823 Update the Google-URL version of KURL and the V8 bindings to the new 3824 behavior of KURL.IsStandard. 3825 3826 https://bugs.webkit.org/show_bug.cgi?id=34859 3827 3828 This is covered by fast/dom/Window/invalid-protocol.html 3829 3830 * bindings/v8/custom/V8LocationCustom.cpp: 3831 (WebCore::V8Location::protocolAccessorSetter): 3832 * platform/KURLGoogle.cpp: 3833 (WebCore::KURL::setProtocol): 3834 (WebCore::KURL::isHierarchical): 3811 3835 3812 3836 2010-02-18 Xan Lopez <xlopez@igalia.com> -
trunk/WebCore/bindings/v8/custom/V8LocationCustom.cpp
r55285 r55319 191 191 192 192 KURL url = frame->loader()->url(); 193 url.setProtocol(protocol); 193 if (!url.setProtocol(protocol)) { 194 throwError("Can't set protocol", V8Proxy::SyntaxError); 195 return; 196 } 194 197 195 198 navigateIfAllowed(frame, url, false, false); -
trunk/WebCore/platform/KURLGoogle.cpp
r55011 r55319 573 573 bool KURL::setProtocol(const String& protocol) 574 574 { 575 // Firefox and IE remove everything after the first ':'. 576 int separatorPosition = protocol.find(':'); 577 String newProtocol = protocol.substring(0, separatorPosition); 578 579 // If KURL is given an invalid scheme, it returns failure without modifying 580 // the URL at all. This is in contrast to most other setters which modify 581 // the URL and set "m_isValid." 582 url_canon::RawCanonOutputT<char> canonProtocol; 583 url_parse::Component protocolComponent; 584 if (!url_canon::CanonicalizeScheme(newProtocol.characters(), 585 url_parse::Component(0, newProtocol.length()), 586 &canonProtocol, &protocolComponent) 587 || !protocolComponent.is_nonempty()) 588 return false; 589 575 590 KURLGooglePrivate::Replacements replacements; 576 replacements.SetScheme(CharactersOrEmpty( protocol),577 url_parse::Component(0, protocol.length()));591 replacements.SetScheme(CharactersOrEmpty(newProtocol), 592 url_parse::Component(0, newProtocol.length())); 578 593 m_url.replaceComponents(replacements); 594 595 // isValid could be false but we still return true here. This is because 596 // WebCore or JS scripts can build up a URL by setting individual 597 // components, and a JS exception is based on the return value of this 598 // function. We want to throw the exception and stop the script only when 599 // its trying to set a bad protocol, and not when it maybe just hasn't 600 // finished building up its final scheme. 579 601 return true; 580 602 }
Note: See TracChangeset
for help on using the changeset viewer.