[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:32:17 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 3d442a6a4f4c4f6119ff2a7133564fa5b97870ed
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Aug 17 03:02:01 2002 +0000
Step 2 in adding user agent API to WebKit and WebFoundation.
In this step, I change WebCore so that it the KWQKHTMLPartImpl
is responsible for fetching the user agent. Later it will
get the user agent from WebKit via the bridge.
* khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty):
Get the user agent from the part, not KProtocolManager.
* khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::initScript):
Get the user agent from the part, not KProtocolManager.
* kwq/KWQKHTMLPartImpl.h: Add userAgent member function.
* kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::userAgent): Added.
* WebCore.pbproj/project.pbxproj: Removed KWQKProtocolManager.mm.
* kwq/KWQKProtocolManager.mm: Removed.
* kwq/kio/kprotocolmanager.h: Made empty.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index b3c6a5f..3c2db37 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,22 @@
+2002-08-16 Darin Adler <darin at apple.com>
+
+ Step 2 in adding user agent API to WebKit and WebFoundation.
+ In this step, I change WebCore so that it the KWQKHTMLPartImpl
+ is responsible for fetching the user agent. Later it will
+ get the user agent from WebKit via the bridge.
+
+ * khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty):
+ Get the user agent from the part, not KProtocolManager.
+ * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::initScript):
+ Get the user agent from the part, not KProtocolManager.
+
+ * kwq/KWQKHTMLPartImpl.h: Add userAgent member function.
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::userAgent): Added.
+
+ * WebCore.pbproj/project.pbxproj: Removed KWQKProtocolManager.mm.
+ * kwq/KWQKProtocolManager.mm: Removed.
+ * kwq/kio/kprotocolmanager.h: Made empty.
+
2002-08-16 Maciej Stachowiak <mjs at apple.com>
* force-clean-timestamp: Need to rebuild for JavaScriptCore changes.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index b3c6a5f..3c2db37 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,22 @@
+2002-08-16 Darin Adler <darin at apple.com>
+
+ Step 2 in adding user agent API to WebKit and WebFoundation.
+ In this step, I change WebCore so that it the KWQKHTMLPartImpl
+ is responsible for fetching the user agent. Later it will
+ get the user agent from WebKit via the bridge.
+
+ * khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty):
+ Get the user agent from the part, not KProtocolManager.
+ * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::initScript):
+ Get the user agent from the part, not KProtocolManager.
+
+ * kwq/KWQKHTMLPartImpl.h: Add userAgent member function.
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::userAgent): Added.
+
+ * WebCore.pbproj/project.pbxproj: Removed KWQKProtocolManager.mm.
+ * kwq/KWQKProtocolManager.mm: Removed.
+ * kwq/kio/kprotocolmanager.h: Made empty.
+
2002-08-16 Maciej Stachowiak <mjs at apple.com>
* force-clean-timestamp: Need to rebuild for JavaScriptCore changes.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index b3c6a5f..3c2db37 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2002-08-16 Darin Adler <darin at apple.com>
+
+ Step 2 in adding user agent API to WebKit and WebFoundation.
+ In this step, I change WebCore so that it the KWQKHTMLPartImpl
+ is responsible for fetching the user agent. Later it will
+ get the user agent from WebKit via the bridge.
+
+ * khtml/ecma/kjs_navigator.cpp: (Navigator::getValueProperty):
+ Get the user agent from the part, not KProtocolManager.
+ * khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::initScript):
+ Get the user agent from the part, not KProtocolManager.
+
+ * kwq/KWQKHTMLPartImpl.h: Add userAgent member function.
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::userAgent): Added.
+
+ * WebCore.pbproj/project.pbxproj: Removed KWQKProtocolManager.mm.
+ * kwq/KWQKProtocolManager.mm: Removed.
+ * kwq/kio/kprotocolmanager.h: Made empty.
+
2002-08-16 Maciej Stachowiak <mjs at apple.com>
* force-clean-timestamp: Need to rebuild for JavaScriptCore changes.
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index af9022c..e93f172 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -564,7 +564,6 @@
F587859802DE375901EA4122,
F587859902DE375901EA4122,
F587859A02DE375901EA4122,
- F587859C02DE375901EA4122,
F587859D02DE375901EA4122,
F587859E02DE375901EA4122,
F587859F02DE375901EA4122,
@@ -4109,11 +4108,6 @@
path = KWQKPartsEvent.mm;
refType = 4;
};
- F587850A02DE375901EA4122 = {
- isa = PBXFileReference;
- path = KWQKProtocolManager.mm;
- refType = 4;
- };
F587850B02DE375901EA4122 = {
isa = PBXFileReference;
path = KWQKSimpleConfig.mm;
@@ -4905,12 +4899,6 @@
settings = {
};
};
- F587859C02DE375901EA4122 = {
- fileRef = F587850A02DE375901EA4122;
- isa = PBXBuildFile;
- settings = {
- };
- };
F587859D02DE375901EA4122 = {
fileRef = F587850B02DE375901EA4122;
isa = PBXBuildFile;
@@ -6201,7 +6189,6 @@
F587850602DE375901EA4122,
F587864F02DE3A9A01EA4122,
F587865002DE3A9A01EA4122,
- F587850A02DE375901EA4122,
F587865102DE3A9A01EA4122,
F587865202DE3A9A01EA4122,
F587850702DE375901EA4122,
diff --git a/WebCore/khtml/ecma/kjs_navigator.cpp b/WebCore/khtml/ecma/kjs_navigator.cpp
index 8fbb398..057c5d9 100644
--- a/WebCore/khtml/ecma/kjs_navigator.cpp
+++ b/WebCore/khtml/ecma/kjs_navigator.cpp
@@ -176,8 +176,12 @@ Value Navigator::get(ExecState *exec, const UString &propertyName) const
Value Navigator::getValueProperty(ExecState *exec, int token) const
{
+#if APPLE_CHANGES
+ QString userAgent = m_part->impl->userAgent();
+#else
KURL url = m_part->url();
QString userAgent = KProtocolManager::userAgentForHost(url.host());
+#endif
switch (token) {
case AppCodeName:
return String("Mozilla");
diff --git a/WebCore/khtml/ecma/kjs_proxy.cpp b/WebCore/khtml/ecma/kjs_proxy.cpp
index 20d3038..6fa38e3 100644
--- a/WebCore/khtml/ecma/kjs_proxy.cpp
+++ b/WebCore/khtml/ecma/kjs_proxy.cpp
@@ -274,7 +274,11 @@ void KJSProxyImpl::initScript()
globalObject.put(m_script->globalExec(),
"debug", Value(new TestFunctionImp()), Internal);
+#if APPLE_CHANGES
+ QString userAgent = m_part->impl->userAgent();
+#else
QString userAgent = KProtocolManager::userAgentForHost(m_part->url().host());
+#endif
if (userAgent.find(QString::fromLatin1("Microsoft")) >= 0 ||
userAgent.find(QString::fromLatin1("MSIE")) >= 0)
m_script->setCompatMode(Interpreter::IECompat);
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index fb8ecd0..40ab633 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -96,6 +96,8 @@ public:
void layout();
+ QString userAgent() const;
+
// Incoming calls, used by the bridge.
DOM::DocumentImpl *getDocument();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 0723d77..f4d9a8e 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -536,3 +536,10 @@ RenderObject *KWQKHTMLPartImpl::getRenderer()
DocumentImpl *doc = part->xmlDocImpl();
return doc ? doc->renderer() : 0;
}
+
+QString KWQKHTMLPartImpl::userAgent() const
+{
+ // FIXME: Should get this from WebFoundation so that we don't have two copies of the
+ // user agent string that we need to keep in sync.
+ return "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.0) Gecko/20020715";
+}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index fb8ecd0..40ab633 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -96,6 +96,8 @@ public:
void layout();
+ QString userAgent() const;
+
// Incoming calls, used by the bridge.
DOM::DocumentImpl *getDocument();
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 0723d77..f4d9a8e 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -536,3 +536,10 @@ RenderObject *KWQKHTMLPartImpl::getRenderer()
DocumentImpl *doc = part->xmlDocImpl();
return doc ? doc->renderer() : 0;
}
+
+QString KWQKHTMLPartImpl::userAgent() const
+{
+ // FIXME: Should get this from WebFoundation so that we don't have two copies of the
+ // user agent string that we need to keep in sync.
+ return "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.0) Gecko/20020715";
+}
diff --git a/WebCore/kwq/KWQKProtocolManager.mm b/WebCore/kwq/KWQKProtocolManager.mm
deleted file mode 100644
index 15e3835..0000000
--- a/WebCore/kwq/KWQKProtocolManager.mm
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 Apple Computer, 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:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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.
- */
-
-#import <kprotocolmanager.h>
-
-#import <qstring.h>
-
-QString KProtocolManager::userAgentForHost(const QString &)
-{
- // FIXME: Should get this from WebFoundation so that we don't have two copies of the
- // user agent string that we need to keep in sync.
- return "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.0) Gecko/20020715";
-}
diff --git a/WebCore/kwq/kio/kprotocolmanager.h b/WebCore/kwq/kio/kprotocolmanager.h
index 1b4b35f..e69de29 100644
--- a/WebCore/kwq/kio/kprotocolmanager.h
+++ b/WebCore/kwq/kio/kprotocolmanager.h
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 Apple Computer, 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:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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.
- */
-
-#ifndef KPROTOCOLMANAGER_H_
-#define KPROTOCOLMANAGER_H_
-
-class QString;
-
-class KProtocolManager {
-public:
- static QString userAgentForHost( const QString& );
-};
-
-#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list