[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
brettw at chromium.org
brettw at chromium.org
Wed Mar 17 18:03:48 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit a123320c8512986febd63b1f0d62e09b1c246496
Author: brettw at chromium.org <brettw at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 26 23:18:11 2010 +0000
2010-02-12 Brett Wilson <brettw at chromium.org>
Reviewed by Adam Barth.
Update the Google-URL version of KURL and the V8 bindings to the new
behavior of KURL.IsStandard.
https://bugs.webkit.org/show_bug.cgi?id=34859
This is covered by fast/dom/Window/invalid-protocol.html
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::V8Location::protocolAccessorSetter):
* platform/KURLGoogle.cpp:
(WebCore::KURL::setProtocol):
(WebCore::KURL::isHierarchical):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d82ae15..4b87f79 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-02-12 Brett Wilson <brettw at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Update the Google-URL version of KURL and the V8 bindings to the new
+ behavior of KURL.IsStandard.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34859
+
+ This is covered by fast/dom/Window/invalid-protocol.html
+
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::V8Location::protocolAccessorSetter):
+ * platform/KURLGoogle.cpp:
+ (WebCore::KURL::setProtocol):
+ (WebCore::KURL::isHierarchical):
+
+2010-02-26 Gavin Barraclough <barraclough at apple.com>
+
+ Reviewed by NOBODY (Build fix following r55312).
+
+ * bridge/qt/qt_pixmapruntime.cpp:
+ (JSC::Bindings::QtPixmapInstance::invokeMethod):
+
2010-02-26 Yaar Schnitman <yaar at chromium.org>
Reviewed by Dimitri Glazkov.
@@ -3421,23 +3445,6 @@
(WebCore::HTMLOptionElement::insertedIntoTree):
* html/HTMLOptionElement.h:
-2010-02-12 Brett Wilson <brettw at chromium.org>
-
- Reviewed by Adam Barth.
-
- Update the Google-URL version of KURL and the V8 bindings to the new
- behavior of KURL.IsStandard.
-
- https://bugs.webkit.org/show_bug.cgi?id=34859
-
- This is covered by fast/dom/Window/invalid-protocol.html
-
- * bindings/v8/custom/V8LocationCustom.cpp:
- (WebCore::V8Location::protocolAccessorSetter):
- * platform/KURLGoogle.cpp:
- (WebCore::KURL::setProtocol):
- (WebCore::KURL::isHierarchical):
-
2010-02-18 Simon Fraser <simon.fraser at apple.com>
No Review.
@@ -3809,6 +3816,23 @@
(WebCore::V8DOMWrapper::instantiateV8Object): Merge instantiateV8Object paths.
* bindings/v8/V8DOMWrapper.h:
+2010-02-12 Brett Wilson <brettw at chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Update the Google-URL version of KURL and the V8 bindings to the new
+ behavior of KURL.IsStandard.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34859
+
+ This is covered by fast/dom/Window/invalid-protocol.html
+
+ * bindings/v8/custom/V8LocationCustom.cpp:
+ (WebCore::V8Location::protocolAccessorSetter):
+ * platform/KURLGoogle.cpp:
+ (WebCore::KURL::setProtocol):
+ (WebCore::KURL::isHierarchical):
+
2010-02-18 Xan Lopez <xlopez at igalia.com>
Reviewed by Gustavo Noronha.
diff --git a/WebCore/bindings/v8/custom/V8LocationCustom.cpp b/WebCore/bindings/v8/custom/V8LocationCustom.cpp
index 8ea8bfa..b255537 100644
--- a/WebCore/bindings/v8/custom/V8LocationCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8LocationCustom.cpp
@@ -190,7 +190,10 @@ void V8Location::protocolAccessorSetter(v8::Local<v8::String> name, v8::Local<v8
return;
KURL url = frame->loader()->url();
- url.setProtocol(protocol);
+ if (!url.setProtocol(protocol)) {
+ throwError("Can't set protocol", V8Proxy::SyntaxError);
+ return;
+ }
navigateIfAllowed(frame, url, false, false);
}
diff --git a/WebCore/platform/KURLGoogle.cpp b/WebCore/platform/KURLGoogle.cpp
index 65ca346..c239ca5 100644
--- a/WebCore/platform/KURLGoogle.cpp
+++ b/WebCore/platform/KURLGoogle.cpp
@@ -572,10 +572,32 @@ String KURL::path() const
bool KURL::setProtocol(const String& protocol)
{
+ // Firefox and IE remove everything after the first ':'.
+ int separatorPosition = protocol.find(':');
+ String newProtocol = protocol.substring(0, separatorPosition);
+
+ // If KURL is given an invalid scheme, it returns failure without modifying
+ // the URL at all. This is in contrast to most other setters which modify
+ // the URL and set "m_isValid."
+ url_canon::RawCanonOutputT<char> canonProtocol;
+ url_parse::Component protocolComponent;
+ if (!url_canon::CanonicalizeScheme(newProtocol.characters(),
+ url_parse::Component(0, newProtocol.length()),
+ &canonProtocol, &protocolComponent)
+ || !protocolComponent.is_nonempty())
+ return false;
+
KURLGooglePrivate::Replacements replacements;
- replacements.SetScheme(CharactersOrEmpty(protocol),
- url_parse::Component(0, protocol.length()));
+ replacements.SetScheme(CharactersOrEmpty(newProtocol),
+ url_parse::Component(0, newProtocol.length()));
m_url.replaceComponents(replacements);
+
+ // isValid could be false but we still return true here. This is because
+ // WebCore or JS scripts can build up a URL by setting individual
+ // components, and a JS exception is based on the return value of this
+ // function. We want to throw the exception and stop the script only when
+ // its trying to set a bad protocol, and not when it maybe just hasn't
+ // finished building up its final scheme.
return true;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list