[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

atwilson at chromium.org atwilson at chromium.org
Thu Apr 8 00:17:28 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 64087593b20baeba43bd3f7efd4bbc31340278d7
Author: atwilson at chromium.org <atwilson at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 4 06:40:56 2009 +0000

    New History changes do not compile for Chromium/V8
    https://bugs.webkit.org/show_bug.cgi?id=32148
    
    Reviewed by Adam Barth.
    
    Existing tests suffice (just trying to get code to compile).
    
    * WebCore.gypi:
    Added V8HistoryCustom.cpp and other missing files.
    * bindings/v8/custom/V8CustomBinding.h:
    Added custom handlers for History.pushState()/replaceState().
    * bindings/v8/custom/V8HistoryCustom.cpp: Added.
    Added custom handlers for History.pushState()/replaceState().
    * history/BackForwardListChromium.cpp:
    (WebCore::BackForwardList::pushStateItem):
    Stubbed out this routine for now - will implement in the future.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51681 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2b3587e..2972fd4 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2009-12-03  Drew Wilson  <atwilson at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        New History changes do not compile for Chromium/V8
+        https://bugs.webkit.org/show_bug.cgi?id=32148
+
+        Existing tests suffice (just trying to get code to compile).
+
+        * WebCore.gypi:
+        Added V8HistoryCustom.cpp and other missing files.
+        * bindings/v8/custom/V8CustomBinding.h:
+        Added custom handlers for History.pushState()/replaceState().
+        * bindings/v8/custom/V8HistoryCustom.cpp: Added.
+        Added custom handlers for History.pushState()/replaceState().
+        * history/BackForwardListChromium.cpp:
+        (WebCore::BackForwardList::pushStateItem):
+        Stubbed out this routine for now - will implement in the future.
+
 2009-12-03  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index af25f4e..c88f81e 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -66,6 +66,7 @@
             'dom/Notation.idl',
             'dom/OverflowEvent.idl',
             'dom/PageTransitionEvent.idl',
+            'dom/PopStateEvent.idl',
             'dom/ProcessingInstruction.idl',
             'dom/ProgressEvent.idl',
             'dom/Range.idl',
@@ -685,6 +686,7 @@
             'bindings/v8/custom/V8EventCustom.cpp',
             'bindings/v8/custom/V8FileListCustom.cpp',
             'bindings/v8/custom/V8GeolocationCustom.cpp',
+            'bindings/v8/custom/V8HistoryCustom.cpp',
             'bindings/v8/custom/V8HTMLAudioElementConstructor.cpp',
             'bindings/v8/custom/V8HTMLAudioElementConstructor.h',
             'bindings/v8/custom/V8HTMLAllCollectionCustom.cpp',
@@ -1098,6 +1100,8 @@
             'dom/OptionGroupElement.h',
             'dom/OverflowEvent.cpp',
             'dom/OverflowEvent.h',
+            'dom/PopStateEvent.cpp',
+            'dom/PopStateEvent.h',
             'dom/PageTransitionEvent.cpp',
             'dom/PageTransitionEvent.h',
             'dom/Position.cpp',
@@ -1859,7 +1863,6 @@
             'platform/chromium/FramelessScrollView.cpp',
             'platform/chromium/FramelessScrollView.h',
             'platform/chromium/FramelessScrollViewClient.h',
-            'platform/chromium/GeolocationServiceChromium.cpp',
             'platform/chromium/KeyCodeConversion.h',
             'platform/chromium/KeyCodeConversionGtk.cpp',
             'platform/chromium/KeyboardCodesPosix.h',
diff --git a/WebCore/bindings/v8/custom/V8CustomBinding.h b/WebCore/bindings/v8/custom/V8CustomBinding.h
index 5e3fe66..d2735bd 100644
--- a/WebCore/bindings/v8/custom/V8CustomBinding.h
+++ b/WebCore/bindings/v8/custom/V8CustomBinding.h
@@ -417,6 +417,9 @@ namespace WebCore {
         DECLARE_CALLBACK(ElementSetAttributeNS);
         DECLARE_CALLBACK(ElementSetAttributeNodeNS);
 
+        DECLARE_CALLBACK(HistoryPushState);
+        DECLARE_CALLBACK(HistoryReplaceState);
+
         DECLARE_PROPERTY_ACCESSOR_SETTER(LocationProtocol);
         DECLARE_PROPERTY_ACCESSOR_SETTER(LocationHost);
         DECLARE_PROPERTY_ACCESSOR_SETTER(LocationHostname);
@@ -433,7 +436,6 @@ namespace WebCore {
         DECLARE_CALLBACK(LocationReload);
         DECLARE_CALLBACK(LocationToString);
         DECLARE_CALLBACK(LocationValueOf);
-
         DECLARE_CALLBACK(NodeAddEventListener);
         DECLARE_CALLBACK(NodeRemoveEventListener);
         DECLARE_CALLBACK(NodeInsertBefore);
diff --git a/WebCore/bindings/v8/custom/V8HistoryCustom.cpp b/WebCore/bindings/v8/custom/V8HistoryCustom.cpp
new file mode 100644
index 0000000..c884d15
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8HistoryCustom.cpp
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "History.h"
+
+#include "ExceptionCode.h"
+#include "SerializedScriptValue.h"
+#include "V8Binding.h"
+#include "V8CustomBinding.h"
+#include "V8Proxy.h"
+
+namespace WebCore {
+CALLBACK_FUNC_DECL(HistoryPushState)
+{
+    RefPtr<SerializedScriptValue> historyState = SerializedScriptValue::create(toWebCoreString(args[0]));
+
+    v8::TryCatch tryCatch;
+    String title = toWebCoreStringWithNullOrUndefinedCheck(args[1]);
+    if (tryCatch.HasCaught())
+        return v8::Undefined();
+    String url;
+    if (args.Length() > 2) {
+        url = toWebCoreStringWithNullOrUndefinedCheck(args[2]);
+        if (tryCatch.HasCaught())
+            return v8::Undefined();
+    }
+
+    ExceptionCode ec = 0;
+    History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, args.Holder());
+    history->stateObjectAdded(historyState.release(), title, url, History::StateObjectPush, ec);
+    return throwError(ec);
+}
+
+CALLBACK_FUNC_DECL(HistoryReplaceState)
+{
+    RefPtr<SerializedScriptValue> historyState = SerializedScriptValue::create(toWebCoreString(args[0]));
+
+    v8::TryCatch tryCatch;
+    String title = toWebCoreStringWithNullOrUndefinedCheck(args[1]);
+    if (tryCatch.HasCaught())
+        return v8::Undefined();
+    String url;
+    if (args.Length() > 2) {
+        url = toWebCoreStringWithNullOrUndefinedCheck(args[2]);
+        if (tryCatch.HasCaught())
+            return v8::Undefined();
+    }
+
+    ExceptionCode ec = 0;
+    History* history = V8DOMWrapper::convertToNativeObject<History>(V8ClassIndex::HISTORY, args.Holder());
+    history->stateObjectAdded(historyState.release(), title, url, History::StateObjectReplace, ec);
+    return throwError(ec);
+}
+
+} // namespace WebCore
diff --git a/WebCore/history/BackForwardListChromium.cpp b/WebCore/history/BackForwardListChromium.cpp
index 34f294c..f539e80 100644
--- a/WebCore/history/BackForwardListChromium.cpp
+++ b/WebCore/history/BackForwardListChromium.cpp
@@ -121,6 +121,11 @@ HistoryItem* BackForwardList::itemAtIndex(int index)
     return m_client->itemAtIndex(index);
 }
 
+void BackForwardList::pushStateItem(PassRefPtr<HistoryItem> newItem)
+{
+  // FIXME: Need to implement state support for chromium.
+}
+
 HistoryItemVector& BackForwardList::entries()
 {
     static HistoryItemVector noEntries;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list