[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: =?utf-8?q?=5Bkdelibs=5D_khtml/ecma=3A_Make_sure_that_setting_the?=
From: Maks Orlovich <maksim () kde ! org>
Date: 2011-06-22 21:42:28
Message-ID: 20110622214228.BC083A60B9 () git ! kde ! org
[Download RAW message or body]
Git commit 11f9b5f4b44053f7088ebd429280e97bc184169d by Maks Orlovich.
Committed on 22/06/2011 at 23:33.
Pushed by orlovich into branch 'master'.
Make sure that setting the hash to empty sets it #, as per HTML5 2.6
Fixes reload loop on the correlate googlelab (reported on IRC)
M +9 -2 khtml/ecma/kjs_window.cpp
http://commits.kde.org/kdelibs/11f9b5f4b44053f7088ebd429280e97bc184169d
diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp
index 5b363f4..6f32cce 100644
--- a/khtml/ecma/kjs_window.cpp
+++ b/khtml/ecma/kjs_window.cpp
@@ -2723,8 +2723,15 @@ void Location::put(ExecState *exec, const Identifier &p, JSValue *v, int attr)
str = str.mid(1);
// Note that we want to do gotoAnchor even when the hash is already set, so we
- // scroll the destination into view
- url.setRef(str);
+ // scroll the destination into view.
+
+ // Setting this must always provide a ref, even if just ; see
+ // HTML5 2.6.
+ if (str.isEmpty()) {
+ url.setHTMLRef("");
+ } else {
+ url.setRef(str);
+ }
break;
case Host: {
QString host = str.left(str.indexOf(":"));
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic