summaryrefslogtreecommitdiffstats
path: root/WebKit/android
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-01-15 16:12:09 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-01-15 16:12:09 -0800
commit7a355dabbffb876b2e08cf63ac4fc28a39c19c6a (patch)
tree9e94e34b23ead3c0e7f052ee2d3785404d349981 /WebKit/android
parente933faefa1e899dbd5bf371f499cc682aff46c83 (diff)
downloadexternal_webkit-7a355dabbffb876b2e08cf63ac4fc28a39c19c6a.zip
external_webkit-7a355dabbffb876b2e08cf63ac4fc28a39c19c6a.tar.gz
external_webkit-7a355dabbffb876b2e08cf63ac4fc28a39c19c6a.tar.bz2
auto import from //branches/cupcake/...@126645
Diffstat (limited to 'WebKit/android')
-rw-r--r--WebKit/android/AndroidLog.h37
-rw-r--r--WebKit/android/ChromeClientAndroid.cpp42
-rw-r--r--WebKit/android/ChromeClientAndroid.h45
-rw-r--r--WebKit/android/DragClientAndroid.cpp42
-rw-r--r--WebKit/android/DragClientAndroid.h46
-rw-r--r--WebKit/android/EditorClientAndroid.cpp42
-rw-r--r--WebKit/android/EditorClientAndroid.h44
-rw-r--r--WebKit/android/FrameLoaderClientAndroid.cpp103
-rw-r--r--WebKit/android/FrameLoaderClientAndroid.h64
-rw-r--r--WebKit/android/InspectorClientAndroid.h44
-rw-r--r--WebKit/android/JavaVM/jni.h40
-rw-r--r--WebKit/android/RenderSkinAndroid.cpp40
-rw-r--r--WebKit/android/RenderSkinAndroid.h40
-rw-r--r--WebKit/android/RenderSkinButton.cpp31
-rw-r--r--WebKit/android/RenderSkinButton.h40
-rw-r--r--WebKit/android/RenderSkinCombo.cpp40
-rw-r--r--WebKit/android/RenderSkinCombo.h40
-rw-r--r--WebKit/android/RenderSkinRadio.cpp40
-rw-r--r--WebKit/android/RenderSkinRadio.h40
-rw-r--r--WebKit/android/TimeCounter.cpp116
-rw-r--r--WebKit/android/TimeCounter.h84
-rw-r--r--WebKit/android/TimerClient.h42
-rw-r--r--WebKit/android/jni/JavaBridge.cpp73
-rw-r--r--WebKit/android/jni/JavaSharedClient.cpp43
-rw-r--r--WebKit/android/jni/JavaSharedClient.h42
-rw-r--r--WebKit/android/jni/PictureSet.cpp29
-rw-r--r--WebKit/android/jni/PictureSet.h29
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.cpp173
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.h39
-rw-r--r--WebKit/android/jni/WebCoreJni.cpp40
-rw-r--r--WebKit/android/jni/WebCoreJni.h29
-rw-r--r--WebKit/android/jni/WebCoreRefObject.h40
-rw-r--r--WebKit/android/jni/WebCoreResourceLoader.cpp87
-rw-r--r--WebKit/android/jni/WebCoreResourceLoader.h40
-rw-r--r--WebKit/android/jni/WebCoreViewBridge.h40
-rw-r--r--WebKit/android/jni/WebFrameView.cpp30
-rw-r--r--WebKit/android/jni/WebFrameView.h30
-rw-r--r--WebKit/android/jni/WebHistory.cpp40
-rw-r--r--WebKit/android/jni/WebHistory.h29
-rw-r--r--WebKit/android/jni/WebIconDatabase.cpp39
-rw-r--r--WebKit/android/jni/WebIconDatabase.h40
-rw-r--r--WebKit/android/jni/WebSettings.cpp40
-rw-r--r--WebKit/android/jni/WebViewCore.cpp157
-rw-r--r--WebKit/android/jni/WebViewCore.h32
-rw-r--r--WebKit/android/nav/CacheBuilder.cpp114
-rw-r--r--WebKit/android/nav/CacheBuilder.h85
-rw-r--r--WebKit/android/nav/CachedDebug.h37
-rw-r--r--WebKit/android/nav/CachedFrame.cpp37
-rw-r--r--WebKit/android/nav/CachedFrame.h39
-rw-r--r--WebKit/android/nav/CachedHistory.cpp37
-rw-r--r--WebKit/android/nav/CachedHistory.h39
-rw-r--r--WebKit/android/nav/CachedNode.cpp30
-rw-r--r--WebKit/android/nav/CachedNode.h39
-rw-r--r--WebKit/android/nav/CachedNodeType.h37
-rw-r--r--WebKit/android/nav/CachedPrefix.h37
-rw-r--r--WebKit/android/nav/CachedRoot.cpp29
-rw-r--r--WebKit/android/nav/CachedRoot.h39
-rw-r--r--WebKit/android/nav/FindCanvas.cpp29
-rw-r--r--WebKit/android/nav/FindCanvas.h29
-rw-r--r--WebKit/android/nav/SelectText.cpp29
-rw-r--r--WebKit/android/nav/SelectText.h30
-rw-r--r--WebKit/android/nav/WebView.cpp31
-rw-r--r--WebKit/android/plugins/ANPCanvasInterface.cpp31
-rw-r--r--WebKit/android/plugins/ANPKeyCodes.h31
-rw-r--r--WebKit/android/plugins/ANPLogInterface.cpp31
-rw-r--r--WebKit/android/plugins/ANPPaintInterface.cpp31
-rw-r--r--WebKit/android/plugins/ANPSoundInterface.cpp31
-rw-r--r--WebKit/android/plugins/ANPTypefaceInterface.cpp31
-rw-r--r--WebKit/android/plugins/ANPWindowInterface.cpp31
-rw-r--r--WebKit/android/plugins/PluginDataAndroid.cpp72
-rw-r--r--WebKit/android/plugins/PluginDebugAndroid.h46
-rw-r--r--WebKit/android/plugins/PluginPackageAndroid.cpp580
-rw-r--r--WebKit/android/plugins/PluginTimer.cpp1
-rw-r--r--WebKit/android/plugins/PluginTimer.h1
-rw-r--r--WebKit/android/plugins/PluginViewAndroid.cpp568
-rw-r--r--WebKit/android/plugins/PluginViewBridgeAndroid.cpp31
-rw-r--r--WebKit/android/plugins/PluginViewBridgeAndroid.h1
-rw-r--r--WebKit/android/plugins/PluginWidgetAndroid.cpp31
-rw-r--r--WebKit/android/plugins/PluginWidgetAndroid.h31
-rw-r--r--WebKit/android/plugins/SkANP.cpp31
-rw-r--r--WebKit/android/plugins/SkANP.h31
-rw-r--r--WebKit/android/plugins/android_npapi.h31
-rw-r--r--WebKit/android/plugins/sample/Android.mk29
-rw-r--r--WebKit/android/plugins/sample/main.cpp31
-rw-r--r--WebKit/android/plugins/sample/main.h31
-rw-r--r--WebKit/android/plugins/sample/pluginGraphics.cpp31
-rw-r--r--WebKit/android/plugins/sample/pluginGraphics.h31
-rw-r--r--WebKit/android/sort.cpp40
-rw-r--r--WebKit/android/stl/concept_checks.h1
-rw-r--r--WebKit/android/stl/heap.h1
-rw-r--r--WebKit/android/stl/iostream.h1
-rw-r--r--WebKit/android/stl/limits40
-rw-r--r--WebKit/android/stl/new.h40
-rw-r--r--WebKit/android/stl/stl_config.h1
-rw-r--r--WebKit/android/stl/stl_heap.h1
-rw-r--r--WebKit/android/stl/stl_iterator_base.h1
-rw-r--r--WebKit/android/stl/strings.h40
-rw-r--r--WebKit/android/wds/Command.cpp29
-rw-r--r--WebKit/android/wds/Command.h29
-rw-r--r--WebKit/android/wds/Connection.cpp29
-rw-r--r--WebKit/android/wds/Connection.h29
-rw-r--r--WebKit/android/wds/DebugServer.cpp29
-rw-r--r--WebKit/android/wds/DebugServer.h29
-rw-r--r--WebKit/android/wds/client/AdbConnection.cpp29
-rw-r--r--WebKit/android/wds/client/AdbConnection.h29
-rw-r--r--WebKit/android/wds/client/Android.mk29
-rw-r--r--WebKit/android/wds/client/ClientUtils.cpp29
-rw-r--r--WebKit/android/wds/client/ClientUtils.h29
-rw-r--r--WebKit/android/wds/client/Device.cpp29
-rw-r--r--WebKit/android/wds/client/Device.h29
-rw-r--r--WebKit/android/wds/client/DeviceList.h29
-rw-r--r--WebKit/android/wds/client/main.cpp29
112 files changed, 2572 insertions, 2844 deletions
diff --git a/WebKit/android/AndroidLog.h b/WebKit/android/AndroidLog.h
index e5cd7dd..e62153b 100644
--- a/WebKit/android/AndroidLog.h
+++ b/WebKit/android/AndroidLog.h
@@ -1,18 +1,27 @@
/*
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2008, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 ANDROIDLOG_H_
#define ANDROIDLOG_H_
diff --git a/WebKit/android/ChromeClientAndroid.cpp b/WebKit/android/ChromeClientAndroid.cpp
index 32e3f77..abc6a32 100644
--- a/WebKit/android/ChromeClientAndroid.cpp
+++ b/WebKit/android/ChromeClientAndroid.cpp
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "WebCore"
@@ -36,7 +44,7 @@
#include "WindowFeatures.h"
#include "Settings.h"
-namespace WebCore {
+namespace android {
void ChromeClientAndroid::setWebFrame(android::WebFrame* webframe)
{
diff --git a/WebKit/android/ChromeClientAndroid.h b/WebKit/android/ChromeClientAndroid.h
index 7f32485..60b3a8f 100644
--- a/WebKit/android/ChromeClientAndroid.h
+++ b/WebKit/android/ChromeClientAndroid.h
@@ -1,30 +1,37 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 ChromeClientAndroid_h
#define ChromeClientAndroid_h
#include "ChromeClient.h"
+using namespace WebCore;
+
namespace android {
class WebFrame;
-}
-
-namespace WebCore {
class ChromeClientAndroid : public ChromeClient {
public:
diff --git a/WebKit/android/DragClientAndroid.cpp b/WebKit/android/DragClientAndroid.cpp
index fa6b42c..64406e7 100644
--- a/WebKit/android/DragClientAndroid.cpp
+++ b/WebKit/android/DragClientAndroid.cpp
@@ -1,26 +1,34 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "WebCore"
#include "config.h"
#include "DragClientAndroid.h"
#include "NotImplemented.h"
-namespace WebCore {
+namespace android {
void DragClientAndroid::dragControllerDestroyed() { notImplemented(); delete this; }
diff --git a/WebKit/android/DragClientAndroid.h b/WebKit/android/DragClientAndroid.h
index fd699e0..5f0548f 100644
--- a/WebKit/android/DragClientAndroid.h
+++ b/WebKit/android/DragClientAndroid.h
@@ -1,28 +1,38 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 DragClientAndroid_h
#define DragClientAndroid_h
#include "DragClient.h"
-namespace WebCore {
+using namespace WebCore;
- class DragClientAndroid : public WebCore::DragClient {
+namespace android {
+
+ class DragClientAndroid : public DragClient {
public:
virtual void willPerformDragDestinationAction(DragDestinationAction, DragData*);
virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*);
diff --git a/WebKit/android/EditorClientAndroid.cpp b/WebKit/android/EditorClientAndroid.cpp
index 2c87310..fb71fa2 100644
--- a/WebKit/android/EditorClientAndroid.cpp
+++ b/WebKit/android/EditorClientAndroid.cpp
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "WebCore"
#include "config.h"
@@ -29,7 +37,7 @@
#include "PlatformKeyboardEvent.h"
#include "PlatformString.h"
-namespace WebCore {
+namespace android {
void EditorClientAndroid::pageDestroyed() {
delete this;
diff --git a/WebKit/android/EditorClientAndroid.h b/WebKit/android/EditorClientAndroid.h
index 792600e..fc35761 100644
--- a/WebKit/android/EditorClientAndroid.h
+++ b/WebKit/android/EditorClientAndroid.h
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 EditorClientAndroid_h
#define EditorClientAndroid_h
@@ -21,7 +29,9 @@
#include "EditorClient.h"
#include "Page.h"
-namespace WebCore {
+using namespace WebCore;
+
+namespace android {
class EditorClientAndroid : public EditorClient {
public:
diff --git a/WebKit/android/FrameLoaderClientAndroid.cpp b/WebKit/android/FrameLoaderClientAndroid.cpp
index 9983b78..93dcdf4 100644
--- a/WebKit/android/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/FrameLoaderClientAndroid.cpp
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "WebCore"
#include "config.h"
@@ -65,30 +73,35 @@
extern android::AssetManager* globalAssetManager();
-namespace WebCore {
+namespace android {
static const int EXTRA_LAYOUT_DELAY = 1000;
// FIXME: Need some data for how big this should be.
#define MAX_SESSION_HISTORY 50
-static Vector<KURL> gSessionHistory;
+static WTF::Vector<KURL> gSessionHistory;
bool historyContains(const UChar* chars, unsigned len) {
const KURL url(String(chars, len));
- Vector<KURL>::const_iterator end = gSessionHistory.end();
- for (Vector<KURL>::const_iterator i = gSessionHistory.begin(); i != end; ++i) {
+ WTF::Vector<KURL>::const_iterator end = gSessionHistory.end();
+ for (WTF::Vector<KURL>::const_iterator i = gSessionHistory.begin(); i != end; ++i) {
if (equalIgnoringRef(url, *i))
return true;
}
return false;
}
-FrameLoaderClientAndroid::FrameLoaderClientAndroid(android::WebFrame* webframe)
+FrameLoaderClientAndroid::FrameLoaderClientAndroid(WebFrame* webframe)
: m_frame(NULL)
, m_webFrame(webframe) {
Retain(m_webFrame);
}
+FrameLoaderClientAndroid* FrameLoaderClientAndroid::get(const WebCore::Frame* frame)
+{
+ return static_cast<FrameLoaderClientAndroid*> (frame->loader()->client());
+}
+
void FrameLoaderClientAndroid::frameLoaderDestroyed() {
registerForIconNotification(false);
m_frame = 0;
@@ -273,14 +286,14 @@ void FrameLoaderClientAndroid::dispatchDidReceiveTitle(const String& title) {
void FrameLoaderClientAndroid::dispatchDidCommitLoad() {
ASSERT(m_frame);
- android::WebViewCore::getWebViewCore(m_frame->view())->updateFrameGeneration(m_frame);
+ WebViewCore::getWebViewCore(m_frame->view())->updateFrameGeneration(m_frame);
}
static void loadDataIntoFrame(Frame* frame, const String& url,
const String& data) {
ResourceRequest request(url);
CString cstr = data.utf8();
- RefPtr<SharedBuffer> buf = SharedBuffer::create(cstr.data(), cstr.length());
+ RefPtr<WebCore::SharedBuffer> buf = WebCore::SharedBuffer::create(cstr.data(), cstr.length());
SubstituteData subData(buf, String("text/html"), String("utf-8"),
request.url());
frame->loader()->load(request, subData);
@@ -299,29 +312,29 @@ void FrameLoaderClientAndroid::dispatchDidFailProvisionalLoad(const ResourceErro
return;
}
- android::AssetManager* am = globalAssetManager();
+ AssetManager* am = globalAssetManager();
// Check to see if the error code was not generated internally
- android::WebFrame::RAW_RES_ID id = android::WebFrame::NODOMAIN;
+ WebFrame::RAW_RES_ID id = WebFrame::NODOMAIN;
if ((error.errorCode() == ErrorFile ||
error.errorCode() == ErrorFileNotFound) &&
(!error.localizedDescription().isEmpty())) {
- id = android::WebFrame::LOADERROR;
+ id = WebFrame::LOADERROR;
}
String filename = m_webFrame->getRawResourceFilename(id);
if (filename.isEmpty())
return;
// Grab the error page from the asset manager
- android::Asset* a = am->openNonAsset(
- filename.utf8().data(), android::Asset::ACCESS_BUFFER);
+ Asset* a = am->openNonAsset(
+ filename.utf8().data(), Asset::ACCESS_BUFFER);
if (!a)
return;
// Take the failing url and encode html entities so javascript urls are not
// executed.
CString failingUrl = error.failingURL().utf8();
- Vector<char> url;
+ WTF::Vector<char> url;
int len = failingUrl.length();
const char* data = failingUrl.data();
for (int i = 0; i < len; i++) {
@@ -373,7 +386,7 @@ void FrameLoaderClientAndroid::dispatchDidFirstLayout() {
// see WebViewCore::didLayout
if (!m_frame->tree()->parent()) {
// Only need to notify Java side for the top frame
- android::WebViewCore::getWebViewCore(m_frame->view())->didFirstLayout();
+ WebViewCore::getWebViewCore(m_frame->view())->didFirstLayout();
}
}
@@ -548,7 +561,7 @@ void FrameLoaderClientAndroid::postProgressEstimateChangedNotification() {
void FrameLoaderClientAndroid::postProgressFinishedNotification() {
if (!m_frame->tree()->parent()) {
// only need to notify Java for the top frame
- android::WebViewCore::getWebViewCore(m_frame->view())->notifyProgressFinished();
+ WebViewCore::getWebViewCore(m_frame->view())->notifyProgressFinished();
}
}
@@ -726,11 +739,11 @@ void FrameLoaderClientAndroid::saveViewStateToItem(HistoryItem* item) {
ASSERT(item);
// We should have added a bridge when the child item was added to its
// parent.
- android::WebHistoryItem* bridge = item->bridge();
+ WebHistoryItem* bridge = item->bridge();
ASSERT(bridge);
// store the current scale (only) for the top frame
if (!m_frame->tree()->parent()) {
- bridge->setScale(android::WebViewCore::getWebViewCore(m_frame->view())->scale());
+ bridge->setScale(WebViewCore::getWebViewCore(m_frame->view())->scale());
}
WebCore::notifyHistoryItemChanged(item);
@@ -739,7 +752,7 @@ void FrameLoaderClientAndroid::saveViewStateToItem(HistoryItem* item) {
void FrameLoaderClientAndroid::restoreViewState() {
#ifdef ANDROID_HISTORY_CLIENT
- android::WebViewCore* webViewCore = android::WebViewCore::getWebViewCore(m_frame->view());
+ WebViewCore* webViewCore = WebViewCore::getWebViewCore(m_frame->view());
HistoryItem* item = m_frame->loader()->currentHistoryItem();
// restore the scale (only) for the top frame
if (!m_frame->tree()->parent()) {
@@ -805,7 +818,7 @@ bool FrameLoaderClientAndroid::canCachePage() const {
void FrameLoaderClientAndroid::download(ResourceHandle* handle, const ResourceRequest&,
const ResourceRequest&, const ResourceResponse&) {
// Get the C++ side of the load listener and tell it to handle the download
- android::WebCoreResourceLoader* loader = handle->getInternal()->m_loader;
+ WebCoreResourceLoader* loader = handle->getInternal()->m_loader;
loader->downloadFile();
}
@@ -824,8 +837,8 @@ WTF::PassRefPtr<WebCore::Frame> FrameLoaderClientAndroid::createFrame(const KURL
newFrame->tree()->setName(name);
// Create a new FrameView and WebFrameView for the child frame to draw into.
FrameView* frameView = new WebCore::FrameView(newFrame);
- android::WebFrameView* webFrameView = new android::WebFrameView(frameView,
- android::WebViewCore::getWebViewCore(parent->view()));
+ WebFrameView* webFrameView = new WebFrameView(frameView,
+ WebViewCore::getWebViewCore(parent->view()));
// frameView Retains webFrameView, so call Release for webFrameView
Release(webFrameView);
// Attach the frameView to the newFrame.
@@ -906,9 +919,9 @@ Widget* FrameLoaderClientAndroid::createPlugin(
break;
}
}
- android::AssetManager* am = globalAssetManager();
- android::Asset* a = am->open("webkit/youtube.html",
- android::Asset::ACCESS_BUFFER);
+ AssetManager* am = globalAssetManager();
+ Asset* a = am->open("webkit/youtube.html",
+ Asset::ACCESS_BUFFER);
if (!a)
return NULL;
String s = String((const char*)a->getBuffer(false), a->getLength());
@@ -940,8 +953,8 @@ void FrameLoaderClientAndroid::redirectDataToPlugin(Widget* pluginWidget) {
}
Widget* FrameLoaderClientAndroid::createJavaAppletWidget(const IntSize&, Element*,
- const KURL& baseURL, const Vector<String>& paramNames,
- const Vector<String>& paramValues) {
+ const KURL& baseURL, const WTF::Vector<String>& paramNames,
+ const WTF::Vector<String>& paramValues) {
// don't support widget yet
notImplemented();
return 0;
@@ -1015,9 +1028,9 @@ void FrameLoaderClientAndroid::didPerformFirstNavigation() const {
void FrameLoaderClientAndroid::registerForIconNotification(bool listen) {
if (listen)
- android::WebIconDatabase::RegisterForIconNotification(this);
+ WebIconDatabase::RegisterForIconNotification(this);
else
- android::WebIconDatabase::UnregisterForIconNotification(this);
+ WebIconDatabase::UnregisterForIconNotification(this);
}
// This is the WebIconDatabaseClient method for receiving a notification when we
@@ -1057,7 +1070,7 @@ void FrameLoaderClientAndroid::transitionToCommittedForNewPage() {
}
// Remember the old WebFrameView
- android::WebFrameView* webFrameView = static_cast<android::WebFrameView*> (
+ WebFrameView* webFrameView = static_cast<WebFrameView*> (
m_frame->view()->platformWidget());
Retain(webFrameView);
diff --git a/WebKit/android/FrameLoaderClientAndroid.h b/WebKit/android/FrameLoaderClientAndroid.h
index 0900863..58b296e 100644
--- a/WebKit/android/FrameLoaderClientAndroid.h
+++ b/WebKit/android/FrameLoaderClientAndroid.h
@@ -1,40 +1,51 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 FrameLoaderClientAndroid_h
#define FrameLoaderClientAndroid_h
+#include "CacheBuilder.h"
#include "FrameLoaderClient.h"
#include "ResourceResponse.h"
#include "WebIconDatabase.h"
+using namespace WebCore;
+
namespace android {
class WebFrame;
-}
-
-namespace WebCore {
class FrameLoaderClientAndroid : public FrameLoaderClient,
- android::WebIconDatabaseClient {
+ WebIconDatabaseClient {
public:
- FrameLoaderClientAndroid(android::WebFrame* webframe);
+ FrameLoaderClientAndroid(WebFrame* webframe);
+
+ Frame* getFrame() { return m_frame; }
+ static FrameLoaderClientAndroid* get(const Frame* frame);
void setFrame(Frame* frame) { m_frame = frame; }
- android::WebFrame* webFrame() const { return m_webFrame; }
+ WebFrame* webFrame() const { return m_webFrame; }
virtual void frameLoaderDestroyed();
@@ -164,7 +175,7 @@ namespace WebCore {
virtual bool canCachePage() const;
virtual void download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&);
- virtual WTF::PassRefPtr<WebCore::Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
+ virtual WTF::PassRefPtr<Frame> createFrame(const KURL& url, const String& name, HTMLFrameOwnerElement* ownerElement,
const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight);
virtual Widget* createPlugin(const IntSize&, Element*, const KURL&,
const WTF::Vector<WebCore::String, 0u>&, const WTF::Vector<String, 0u>&,
@@ -187,9 +198,13 @@ namespace WebCore {
// WebIconDatabaseClient api
virtual void didAddIconForPageUrl(const String& pageUrl);
+
+ // FIXME: this doesn't really go here, but it's better than Frame
+ CacheBuilder& getCacheBuilder() { return m_cacheBuilder; }
private:
+ CacheBuilder m_cacheBuilder;
Frame* m_frame;
- android::WebFrame* m_webFrame;
+ WebFrame* m_webFrame;
enum ResourceErrors {
InternalErrorCancelled = -99,
@@ -219,6 +234,7 @@ namespace WebCore {
ErrorFileNotFound = -14,
ErrorTooManyRequests = -15
};
+ friend class CacheBuilder;
};
}
diff --git a/WebKit/android/InspectorClientAndroid.h b/WebKit/android/InspectorClientAndroid.h
index eef2e04..9eb85e5 100644
--- a/WebKit/android/InspectorClientAndroid.h
+++ b/WebKit/android/InspectorClientAndroid.h
@@ -1,32 +1,40 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 InspectorClientAndroid_h
#define InspectorClientAndroid_h
#include "InspectorClient.h"
-namespace WebCore {
+namespace android {
class InspectorClientAndroid : public InspectorClient {
public:
virtual ~InspectorClientAndroid() { }
- virtual void inspectorDestroyed() {}
+ virtual void inspectorDestroyed() { delete this; }
virtual Page* createPage() { return NULL; }
diff --git a/WebKit/android/JavaVM/jni.h b/WebKit/android/JavaVM/jni.h
index 429dbc3..93c73f3 100644
--- a/WebKit/android/JavaVM/jni.h
+++ b/WebKit/android/JavaVM/jni.h
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 _JNI_COVER_H_
#define _JNI_COVER_H_
diff --git a/WebKit/android/RenderSkinAndroid.cpp b/WebKit/android/RenderSkinAndroid.cpp
index 56f62ef..a261b27 100644
--- a/WebKit/android/RenderSkinAndroid.cpp
+++ b/WebKit/android/RenderSkinAndroid.cpp
@@ -1,19 +1,27 @@
-/* libs/WebKitLib/WebKit/WebCore/rendering/RenderSkinAndroid.cpp
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "WebCore"
#include "config.h"
diff --git a/WebKit/android/RenderSkinAndroid.h b/WebKit/android/RenderSkinAndroid.h
index 65a88f7..c693dd1 100644
--- a/WebKit/android/RenderSkinAndroid.h
+++ b/WebKit/android/RenderSkinAndroid.h
@@ -1,19 +1,27 @@
-/* libs/WebKitLib/WebKit/WebCore/rendering/RenderSkinAndroid.h
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 RenderSkinAndroid_h
#define RenderSkinAndroid_h
diff --git a/WebKit/android/RenderSkinButton.cpp b/WebKit/android/RenderSkinButton.cpp
index 3e3dae1..c878cb9 100644
--- a/WebKit/android/RenderSkinButton.cpp
+++ b/WebKit/android/RenderSkinButton.cpp
@@ -1,17 +1,26 @@
-/*
+/*
* Copyright 2006, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "WebCore"
diff --git a/WebKit/android/RenderSkinButton.h b/WebKit/android/RenderSkinButton.h
index 3089a0b..55eb2da 100644
--- a/WebKit/android/RenderSkinButton.h
+++ b/WebKit/android/RenderSkinButton.h
@@ -1,19 +1,27 @@
-/* libs/WebKitLib/WebKit/WebCore/platform/android/RenderSkinButton.h
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 RenderSkinButton_h
#define RenderSkinButton_h
diff --git a/WebKit/android/RenderSkinCombo.cpp b/WebKit/android/RenderSkinCombo.cpp
index 527cb10..4fed8d8 100644
--- a/WebKit/android/RenderSkinCombo.cpp
+++ b/WebKit/android/RenderSkinCombo.cpp
@@ -1,19 +1,27 @@
-/* libs/WebKitLib/WebKit/WebCore/platform/android/RenderSkinCombo.cpp
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#include "config.h"
#include "Document.h"
diff --git a/WebKit/android/RenderSkinCombo.h b/WebKit/android/RenderSkinCombo.h
index f962fcc..aeea6a0 100644
--- a/WebKit/android/RenderSkinCombo.h
+++ b/WebKit/android/RenderSkinCombo.h
@@ -1,19 +1,27 @@
-/* libs/WebKitLib/WebKit/WebCore/platform/android/RenderSkinCombo.h
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 RenderSkinCombo_h
#define RenderSkinCombo_h
diff --git a/WebKit/android/RenderSkinRadio.cpp b/WebKit/android/RenderSkinRadio.cpp
index d610fa7..847de03 100644
--- a/WebKit/android/RenderSkinRadio.cpp
+++ b/WebKit/android/RenderSkinRadio.cpp
@@ -1,19 +1,27 @@
-/* libs/WebKitLib/WebKit/WebCore/platform/android/RenderSkinRadio.cpp
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#include "config.h"
#include "Document.h"
diff --git a/WebKit/android/RenderSkinRadio.h b/WebKit/android/RenderSkinRadio.h
index 918cdf5..a1ca999 100644
--- a/WebKit/android/RenderSkinRadio.h
+++ b/WebKit/android/RenderSkinRadio.h
@@ -1,19 +1,27 @@
-/* libs/WebKitLib/WebKit/WebCore/platform/android/RenderSkinRadio.h
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 RenderSkinRadio_h
#define RenderSkinRadio_h
diff --git a/WebKit/android/TimeCounter.cpp b/WebKit/android/TimeCounter.cpp
new file mode 100644
index 0000000..0c8fe3b
--- /dev/null
+++ b/WebKit/android/TimeCounter.cpp
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2009, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
+
+#define LOG_TAG "WebCore"
+
+#include "config.h"
+#include "TimeCounter.h"
+
+#include "CString.h"
+#include "Cache.h"
+#include "KURL.h"
+#include "SystemTime.h"
+#include <runtime/JSGlobalObject.h>
+#include <utils/Log.h>
+
+using namespace WebCore;
+
+namespace android {
+
+#ifdef ANDROID_INSTRUMENT
+
+static double sStartTotalTime;
+static uint32_t sStartThreadTime;
+
+uint32_t TimeCounter::sTotalTimeUsed[TimeCounter::TotalTimeCounterCount];
+uint32_t TimeCounter::sCounter[TimeCounter::TotalTimeCounterCount];
+uint32_t TimeCounter::sStartTime[TimeCounter::TotalTimeCounterCount];
+
+static const char* timeCounterNames[] = {
+ "calculate style",
+ "css parsing",
+ "Java callback (frame bridge)",
+ "layout",
+ "native 1 (frame bridge)",
+ // "paint",
+ "parsing (may include calcStyle or Java callback)",
+ "native 3 (resource load)",
+ "native 2 (shared timer)",
+ "native 4 (webview core)"
+};
+
+void TimeCounter::record(enum Type type, const char* functionName)
+{
+ recordNoCounter(type, functionName);
+ sCounter[type]++;
+}
+
+void TimeCounter::recordNoCounter(enum Type type, const char* functionName)
+{
+ uint32_t elapsed = get_thread_msec() - sStartTime[type];
+ sTotalTimeUsed[type] += elapsed;
+ if (elapsed > 1000)
+ LOGW("***** %s() used %d ms\n", functionName, elapsed);
+}
+
+void TimeCounter::report(const KURL& url, int live, int dead)
+{
+ String urlString = url;
+ int totalTime = static_cast<int>((currentTime() - sStartTotalTime) * 1000);
+ int threadTime = get_thread_msec() - sStartThreadTime;
+ LOGD("*-* Total load time: %d ms, thread time: %d ms for %s\n",
+ totalTime, threadTime, urlString.utf8().data());
+// FIXME: JSGlobalObject no longer records time
+// JSC::JSGlobalObject::reportTimeCounter();
+ for (Type type = (Type) 0; type < TotalTimeCounterCount; type = (Type) (type + 1)) {
+ char scratch[256];
+ int index = sprintf(scratch, "*-* Total %s time: %d ms",
+ timeCounterNames[type], sTotalTimeUsed[type]);
+ if (sCounter[type] > 0)
+ sprintf(&scratch[index], " called %d times", sCounter[type]);
+ LOGD("%s", scratch);
+ }
+ LOGD("Current cache has %d bytes live and %d bytes dead", live, dead);
+}
+
+void TimeCounter::reset() {
+// FIXME: JSGlobalObject no longer records time
+// JSC::JSGlobalObject::resetTimeCounter();
+ bzero(sTotalTimeUsed, sizeof(sTotalTimeUsed));
+ bzero(sCounter, sizeof(sCounter));
+ LOGD("*-* Start browser instrument\n");
+ sStartTotalTime = currentTime();
+ sStartThreadTime = get_thread_msec();
+}
+
+void TimeCounter::start(enum Type type)
+{
+ sStartTime[type] = get_thread_msec();
+}
+
+
+#endif
+
+}
diff --git a/WebKit/android/TimeCounter.h b/WebKit/android/TimeCounter.h
new file mode 100644
index 0000000..369eb4e
--- /dev/null
+++ b/WebKit/android/TimeCounter.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2009, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 TIME_COUNTER_H
+#define TIME_COUNTER_H
+
+#ifdef ANDROID_INSTRUMENT
+
+#include "SystemTime.h"
+
+namespace WebCore {
+
+class KURL;
+
+}
+
+namespace android {
+
+class TimeCounter {
+public:
+ enum Type {
+ CalculateStyleTimeCounter,
+ CSSTimeCounter,
+ JavaCallbackTimeCounter,
+ LayoutTimeCounter,
+ NativeCallbackTimeCounter,
+ // PaintTimeCounter, // FIXME: WebCore no longer records draw time
+ ParsingTimeCounter,
+ ResourceTimeCounter,
+ SharedTimerTimeCounter,
+ WebViewCoreTimeCounter,
+ TotalTimeCounterCount
+ };
+
+ static void record(enum Type type, const char* functionName);
+ static void recordNoCounter(enum Type type, const char* functionName);
+ static void report(const WebCore::KURL& , int live, int dead);
+ static void reset();
+ static void start(enum Type type);
+private:
+ static uint32_t sTotalTimeUsed[TotalTimeCounterCount];
+ static uint32_t sCounter[TotalTimeCounterCount];
+ static uint32_t sStartTime[TotalTimeCounterCount];
+ friend class TimeCounterAuto;
+};
+
+class TimeCounterAuto {
+public:
+ TimeCounterAuto(TimeCounter::Type type) :
+ m_type(type), m_startTime(WebCore::get_thread_msec()) {}
+ ~TimeCounterAuto() {
+ TimeCounter::sTotalTimeUsed[m_type] += WebCore::get_thread_msec() - m_startTime;
+ }
+private:
+ TimeCounter::Type m_type;
+ uint32_t m_startTime;
+};
+
+}
+#endif
+
+#endif
diff --git a/WebKit/android/TimerClient.h b/WebKit/android/TimerClient.h
index e4f36a0..09f9fc0 100644
--- a/WebKit/android/TimerClient.h
+++ b/WebKit/android/TimerClient.h
@@ -1,24 +1,32 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 TIMER_CLIENT_H
#define TIMER_CLIENT_H
-namespace WebCore {
+namespace android {
class TimerClient
{
diff --git a/WebKit/android/jni/JavaBridge.cpp b/WebKit/android/jni/JavaBridge.cpp
index bd73b0a..37bb5d2 100644
--- a/WebKit/android/jni/JavaBridge.cpp
+++ b/WebKit/android/jni/JavaBridge.cpp
@@ -1,18 +1,27 @@
/*
-** Copyright 2006-2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "webcoreglue"
@@ -30,8 +39,7 @@
#include "WebCoreJni.h"
#ifdef ANDROID_INSTRUMENT
-#include "Frame.h"
-#include "SystemTime.h"
+#include "TimeCounter.h"
#endif
#include <jni.h>
@@ -44,23 +52,6 @@
// (not including big images using ashmem)
#define IMAGE_POOL_BUDGET (512 * 1024)
-#ifdef ANDROID_INSTRUMENT
-static uint32_t sTotalTimeUsed = 0;
-
-namespace WebCore {
-void Frame::resetSharedTimerTimeCounter()
-{
- sTotalTimeUsed = 0;
-}
-
-void Frame::reportSharedTimerTimeCounter()
-{
- LOG(LOG_DEBUG, "WebCore", "*-* Total native 2 (shared timer) time: %d ms\n",
- sTotalTimeUsed);
-}
-}
-#endif
-
namespace android {
// ----------------------------------------------------------------------------
@@ -69,7 +60,7 @@ static jfieldID gJavaBridge_ObjectID;
// ----------------------------------------------------------------------------
-class JavaBridge : public WebCore::TimerClient, public WebCore::CookieClient
+class JavaBridge : public TimerClient, public CookieClient
{
public:
JavaBridge(JNIEnv* env, jobject obj);
@@ -135,8 +126,8 @@ JavaBridge::JavaBridge(JNIEnv* env, jobject obj)
LOG_ASSERT(mCookies, "Could not find method cookies");
LOG_ASSERT(mCookiesEnabled, "Could not find method cookiesEnabled");
- WebCore::JavaSharedClient::SetTimerClient(this);
- WebCore::JavaSharedClient::SetCookieClient(this);
+ JavaSharedClient::SetTimerClient(this);
+ JavaSharedClient::SetCookieClient(this);
gJavaBridge = this;
}
@@ -148,8 +139,8 @@ JavaBridge::~JavaBridge()
mJavaObject = 0;
}
- WebCore::JavaSharedClient::SetTimerClient(NULL);
- WebCore::JavaSharedClient::SetCookieClient(NULL);
+ JavaSharedClient::SetTimerClient(NULL);
+ JavaSharedClient::SetCookieClient(NULL);
}
void
@@ -262,12 +253,12 @@ void JavaBridge::SharedTimerFired(JNIEnv* env, jobject)
if (sSharedTimerFiredCallback)
{
#ifdef ANDROID_INSTRUMENT
- uint32_t startTime = WebCore::get_thread_msec();
+ TimeCounter::start(TimeCounter::SharedTimerTimeCounter);
#endif
SkAutoMemoryUsageProbe mup("JavaBridge::sharedTimerFired");
sSharedTimerFiredCallback();
#ifdef ANDROID_INSTRUMENT
- sTotalTimeUsed += WebCore::get_thread_msec() - startTime;
+ TimeCounter::record(TimeCounter::SharedTimerTimeCounter, __FUNCTION__);
#endif
}
}
@@ -291,7 +282,7 @@ void JavaBridge::SetDeferringTimers(JNIEnv* env, jobject obj, jboolean defer)
void JavaBridge::ServiceFuncPtrQueue(JNIEnv*)
{
- WebCore::JavaSharedClient::ServiceFunctionPtrQueue();
+ JavaSharedClient::ServiceFunctionPtrQueue();
}
// ----------------------------------------------------------------------------
diff --git a/WebKit/android/jni/JavaSharedClient.cpp b/WebKit/android/jni/JavaSharedClient.cpp
index aaefd72..f115f62 100644
--- a/WebKit/android/jni/JavaSharedClient.cpp
+++ b/WebKit/android/jni/JavaSharedClient.cpp
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#include "config.h"
#include "JavaSharedClient.h"
@@ -24,9 +32,6 @@
namespace android {
void AndroidSignalServiceFuncPtrQueue();
-}
-
-namespace WebCore {
TimerClient* JavaSharedClient::GetTimerClient()
{
diff --git a/WebKit/android/jni/JavaSharedClient.h b/WebKit/android/jni/JavaSharedClient.h
index 470c4dd..05788e1 100644
--- a/WebKit/android/jni/JavaSharedClient.h
+++ b/WebKit/android/jni/JavaSharedClient.h
@@ -1,24 +1,32 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 JAVA_SHARED_CLIENT_H
#define JAVA_SHARED_CLIENT_H
-namespace WebCore {
+namespace android {
class TimerClient;
class CookieClient;
diff --git a/WebKit/android/jni/PictureSet.cpp b/WebKit/android/jni/PictureSet.cpp
index e02e96a..6f57c67 100644
--- a/WebKit/android/jni/PictureSet.cpp
+++ b/WebKit/android/jni/PictureSet.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_NDEBUG 0
diff --git a/WebKit/android/jni/PictureSet.h b/WebKit/android/jni/PictureSet.h
index 5ff003f..17a7b25 100644
--- a/WebKit/android/jni/PictureSet.h
+++ b/WebKit/android/jni/PictureSet.h
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 PICTURESET_H
diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp
index a173305..8cf9cbe 100644
--- a/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -1,18 +1,27 @@
/*
-** Copyright 2006-2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "webcoreglue"
@@ -86,50 +95,11 @@
#include <android_runtime/android_util_AssetManager.h>
#ifdef ANDROID_INSTRUMENT
-#include "SystemTime.h"
-
-static uint32_t sTotalJavaTimeUsed = 0;
-static uint32_t sTotalNativeTimeUsed = 0;
-
-namespace WebCore {
-void Frame::resetFramebridgeTimeCounter()
-{
- sTotalJavaTimeUsed = 0;
- sTotalNativeTimeUsed = 0;
-}
-
-void Frame::reportFramebridgeTimeCounter()
-{
- LOG(LOG_DEBUG, "WebCore", "*-* Total Java callback (frame bridge) time: %d ms\n",
- sTotalJavaTimeUsed);
- LOG(LOG_DEBUG, "WebCore", "*-* Total native 1 (frame bridge) time: %d ms\n",
- sTotalNativeTimeUsed);
-}
-}
+#include "TimeCounter.h"
#endif
namespace android {
-#ifdef ANDROID_INSTRUMENT
-class TimeCounterFB {
-public:
- TimeCounterFB(bool native = false) {
- mNative = native;
- mStartTime = WebCore::get_thread_msec();
- }
-
- ~TimeCounterFB() {
- if (mNative)
- sTotalNativeTimeUsed += WebCore::get_thread_msec() - mStartTime;
- else
- sTotalJavaTimeUsed += WebCore::get_thread_msec() - mStartTime;
- }
-private:
- bool mNative;
- uint32_t mStartTime;
-};
-#endif
-
// ----------------------------------------------------------------------------
#define WEBCORE_MEMORY_CAP 15 * 1024 * 1024
@@ -246,8 +216,8 @@ WebFrame::~WebFrame()
WebFrame* WebFrame::getWebFrame(const WebCore::Frame* frame)
{
- WebCore::FrameLoaderClientAndroid* client =
- static_cast<WebCore::FrameLoaderClientAndroid*> (frame->loader()->client());
+ FrameLoaderClientAndroid* client =
+ static_cast<FrameLoaderClientAndroid*> (frame->loader()->client());
return client->webFrame();
}
@@ -286,7 +256,7 @@ WebFrame::startLoadingResource(WebCore::ResourceHandle* loader,
bool isHighPriority, bool synchronous)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
LOGV("::WebCore:: startLoadingResource(%p, %s)",
loader, request.url().string().ascii().data());
@@ -389,7 +359,7 @@ WebFrame::reportError(int errorCode, const WebCore::String& description,
const WebCore::String& failingUrl)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
LOGV("::WebCore:: reportError(%d, %s)", errorCode, description.ascii().data());
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
@@ -405,7 +375,7 @@ void
WebFrame::loadStarted(WebCore::Frame* frame)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
const WebCore::KURL& url = frame->loader()->activeDocumentLoader()->url();
if (url.isEmpty())
@@ -446,7 +416,7 @@ void
WebFrame::transitionToCommitted(WebCore::Frame* frame)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
WebCore::FrameLoadType loadType = frame->loader()->loadType();
@@ -460,7 +430,7 @@ void
WebFrame::didFinishLoad(WebCore::Frame* frame)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
WebCore::FrameLoader* loader = frame->loader();
@@ -483,7 +453,7 @@ void
WebFrame::addHistoryItem(WebCore::HistoryItem* item)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
LOGV("::WebCore:: addHistoryItem");
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
@@ -494,7 +464,7 @@ void
WebFrame::removeHistoryItem(int index)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
LOGV("::WebCore:: removeHistoryItem at %d", index);
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
@@ -505,7 +475,7 @@ void
WebFrame::updateHistoryIndex(int newIndex)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
LOGV("::WebCore:: updateHistoryIndex to %d", newIndex);
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
@@ -516,7 +486,7 @@ void
WebFrame::setTitle(const WebCore::String& title)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
#ifndef NDEBUG
LOGV("setTitle(%s)", title.ascii().data());
@@ -534,7 +504,7 @@ void
WebFrame::windowObjectCleared(WebCore::Frame* frame)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
LOGV("::WebCore:: windowObjectCleared");
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
@@ -547,7 +517,7 @@ void
WebFrame::setProgress(float newProgress)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
int progress = (int) (100 * newProgress);
@@ -565,7 +535,7 @@ void
WebFrame::didReceiveIcon(WebCore::Image* icon)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
LOG_ASSERT(icon, "DidReceiveIcon called without an image!");
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
@@ -582,7 +552,7 @@ void
WebFrame::updateVisitedHistory(const WebCore::KURL& url, bool reload)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
WebCore::String urlStr(url.string());
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
@@ -596,7 +566,7 @@ bool
WebFrame::canHandleRequest(const WebCore::ResourceRequest& request)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
// Internal loads are ok but any request that is due to a user hitting a key
// should be checked.
@@ -604,6 +574,9 @@ WebFrame::canHandleRequest(const WebCore::ResourceRequest& request)
#ifdef ANDROID_USER_GESTURE
userGesture = request.userGesture();
#endif
+ // always handle "POST" in place
+ if (equalIgnoringCase(request.httpMethod(), "POST"))
+ return true;
WebCore::KURL requestUrl = request.url();
if (!mUserInitiatedClick && !userGesture &&
(requestUrl.protocolIs("http") || requestUrl.protocolIs("https") ||
@@ -628,7 +601,7 @@ WebCore::Frame*
WebFrame::createWindow(bool dialog, bool userGesture)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
jobject obj = env->CallObjectMethod(mJavaFrame->frame(env).get(),
@@ -644,7 +617,7 @@ void
WebFrame::requestFocus() const
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
env->CallVoidMethod(mJavaFrame->frame(env).get(), mJavaFrame->mRequestFocus);
@@ -655,7 +628,7 @@ void
WebFrame::closeWindow(WebViewCore* webViewCore)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
assert(webViewCore);
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
@@ -671,7 +644,7 @@ void
WebFrame::decidePolicyForFormResubmission(WebCore::FramePolicyFunction func)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter;
+ TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
#endif
JNIEnv* env = javavm_to_jnienv(mJavaFrame->mJVM);
PolicyFunctionWrapper* p = new PolicyFunctionWrapper;
@@ -693,7 +666,7 @@ WebFrame::getRawResourceFilename(RAW_RES_ID id) const
static void CallPolicyFunction(JNIEnv* env, jobject obj, jint func, jint decision)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeCallPolicyFunction must take a valid frame pointer!");
@@ -707,13 +680,13 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss
{
JSC::initializeThreading();
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
- WebCore::ChromeClientAndroid* chromeC = new WebCore::ChromeClientAndroid;
- WebCore::EditorClientAndroid* editorC = new WebCore::EditorClientAndroid;
- WebCore::ContextMenuClient* contextMenuC = new WebCore::ContextMenuClientAndroid;
- WebCore::DragClient* dragC = new WebCore::DragClientAndroid;
- WebCore::InspectorClientAndroid* inspectorC = new WebCore::InspectorClientAndroid;
+ ChromeClientAndroid* chromeC = new ChromeClientAndroid;
+ EditorClientAndroid* editorC = new EditorClientAndroid;
+ WebCore::ContextMenuClient* contextMenuC = new ContextMenuClientAndroid;
+ WebCore::DragClient* dragC = new DragClientAndroid;
+ InspectorClientAndroid* inspectorC = new InspectorClientAndroid;
// Create a new page
WebCore::Page* page = new WebCore::Page(chromeC, contextMenuC, editorC, dragC, inspectorC);
/* TODO: Don't turn on PageCache until we can restore the ScrollView State.
@@ -733,7 +706,7 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss
chromeC->setWebFrame(webFrame);
Release(webFrame);
- WebCore::FrameLoaderClientAndroid* loaderC = new WebCore::FrameLoaderClientAndroid(webFrame);
+ FrameLoaderClientAndroid* loaderC = new FrameLoaderClientAndroid(webFrame);
// Create a Frame and the page holds its reference
WebCore::Frame* frame = WebCore::Frame::create(page, NULL, loaderC).get();
loaderC->setFrame(frame);
@@ -778,7 +751,7 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss
static void DestroyFrame(JNIEnv* env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeDestroyFrame must take a valid frame pointer!");
@@ -805,7 +778,7 @@ static void DestroyFrame(JNIEnv* env, jobject obj)
static void LoadUrl(JNIEnv *env, jobject obj, jstring url)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeLoadUrl must take a valid frame pointer!");
@@ -821,7 +794,7 @@ static void LoadData(JNIEnv *env, jobject obj, jstring baseUrl, jstring data,
jstring mimeType, jstring encoding, jstring failUrl)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeLoadData must take a valid frame pointer!");
@@ -848,7 +821,7 @@ static void LoadData(JNIEnv *env, jobject obj, jstring baseUrl, jstring data,
static void StopLoading(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeStopLoading must take a valid frame pointer!");
@@ -861,7 +834,7 @@ static void StopLoading(JNIEnv *env, jobject obj)
static jstring ExternalRepresentation(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "android_webcore_nativeExternalRepresentation must take a valid frame pointer!");
@@ -877,7 +850,7 @@ static jstring ExternalRepresentation(JNIEnv *env, jobject obj)
static jstring DocumentAsText(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "android_webcore_nativeDocumentAsText must take a valid frame pointer!");
@@ -896,7 +869,7 @@ static jstring DocumentAsText(JNIEnv *env, jobject obj)
static void Reload(JNIEnv *env, jobject obj, jboolean allowStale)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeReload must take a valid frame pointer!");
@@ -911,7 +884,7 @@ static void Reload(JNIEnv *env, jobject obj, jboolean allowStale)
static void GoBackOrForward(JNIEnv *env, jobject obj, jint pos)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeGoBackOrForward must take a valid frame pointer!");
@@ -927,7 +900,7 @@ static void GoBackOrForward(JNIEnv *env, jobject obj, jint pos)
static jobject StringByEvaluatingJavaScriptFromString(JNIEnv *env, jobject obj, jstring script)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "stringByEvaluatingJavaScriptFromString must take a valid frame pointer!");
@@ -951,7 +924,7 @@ static void AddJavascriptInterface(JNIEnv *env, jobject obj, jint nativeFramePoi
jobject javascriptObj, jstring interfaceName)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = (WebCore::Frame*)nativeFramePointer;
LOG_ASSERT(pFrame, "nativeAddJavascriptInterface must take a valid frame pointer!");
@@ -981,7 +954,7 @@ static void AddJavascriptInterface(JNIEnv *env, jobject obj, jint nativeFramePoi
static void SetCacheDisabled(JNIEnv *env, jobject obj, jboolean disabled)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::cache()->setDisabled(disabled);
}
@@ -989,7 +962,7 @@ static void SetCacheDisabled(JNIEnv *env, jobject obj, jboolean disabled)
static jboolean CacheDisabled(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
return WebCore::cache()->disabled();
}
@@ -997,7 +970,7 @@ static jboolean CacheDisabled(JNIEnv *env, jobject obj)
static void ClearCache(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
if (!WebCore::cache()->disabled()) {
// Disabling the cache will remove all resources from the cache. They may
@@ -1014,7 +987,7 @@ static void ClearCache(JNIEnv *env, jobject obj)
static jboolean DocumentHasImages(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "DocumentHasImages must take a valid frame pointer!");
@@ -1025,7 +998,7 @@ static jboolean DocumentHasImages(JNIEnv *env, jobject obj)
static jboolean HasPasswordField(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "HasPasswordField must take a valid frame pointer!");
@@ -1053,7 +1026,7 @@ static jboolean HasPasswordField(JNIEnv *env, jobject obj)
static jobjectArray GetUsernamePassword(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "GetUsernamePassword must take a valid frame pointer!");
@@ -1098,7 +1071,7 @@ static void SetUsernamePassword(JNIEnv *env, jobject obj,
jstring username, jstring password)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "SetUsernamePassword must take a valid frame pointer!");
@@ -1137,7 +1110,7 @@ static void SetUsernamePassword(JNIEnv *env, jobject obj,
static jobject GetFormTextData(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterFB counter(true);
+ TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "GetFormTextData must take a valid frame pointer!");
diff --git a/WebKit/android/jni/WebCoreFrameBridge.h b/WebKit/android/jni/WebCoreFrameBridge.h
index 6dcae0f..3793042 100644
--- a/WebKit/android/jni/WebCoreFrameBridge.h
+++ b/WebKit/android/jni/WebCoreFrameBridge.h
@@ -1,18 +1,27 @@
/*
-** Copyright 2006-2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
// TODO: change name to WebFrame.h
@@ -112,7 +121,7 @@ class WebFrame : public WebCoreRefObject {
WebCore::Page* page() const { return mPage; }
- private:
+private:
struct JavaBrowserFrame;
JavaBrowserFrame* mJavaFrame;
WebCore::Page* mPage;
diff --git a/WebKit/android/jni/WebCoreJni.cpp b/WebKit/android/jni/WebCoreJni.cpp
index 85fa720..e4634d0 100644
--- a/WebKit/android/jni/WebCoreJni.cpp
+++ b/WebKit/android/jni/WebCoreJni.cpp
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "webcoreglue"
#include "config.h"
diff --git a/WebKit/android/jni/WebCoreJni.h b/WebKit/android/jni/WebCoreJni.h
index 9acc2f4..6e7ea43 100644
--- a/WebKit/android/jni/WebCoreJni.h
+++ b/WebKit/android/jni/WebCoreJni.h
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 ANDROID_WEBKIT_WEBCOREJNI_H
diff --git a/WebKit/android/jni/WebCoreRefObject.h b/WebKit/android/jni/WebCoreRefObject.h
index 7e96191..3e9f840 100644
--- a/WebKit/android/jni/WebCoreRefObject.h
+++ b/WebKit/android/jni/WebCoreRefObject.h
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WEBCORE_FOUNDATION_h
#define WEBCORE_FOUNDATION_h
diff --git a/WebKit/android/jni/WebCoreResourceLoader.cpp b/WebKit/android/jni/WebCoreResourceLoader.cpp
index 2e349e8..b335b49 100644
--- a/WebKit/android/jni/WebCoreResourceLoader.cpp
+++ b/WebKit/android/jni/WebCoreResourceLoader.cpp
@@ -1,18 +1,27 @@
/*
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "webcoreglue"
@@ -32,8 +41,7 @@
#include "WebCoreJni.h"
#ifdef ANDROID_INSTRUMENT
-#include "Frame.h"
-#include "SystemTime.h"
+#include "TimeCounter.h"
#endif
#include <utils/misc.h>
@@ -41,41 +49,8 @@
#include <SkTypes.h>
#include <stdlib.h>
-#ifdef ANDROID_INSTRUMENT
-static uint32_t sTotalTimeUsed = 0;
-
-namespace WebCore {
-void Frame::resetResourceLoadTimeCounter()
-{
- sTotalTimeUsed = 0;
-}
-
-void Frame::reportResourceLoadTimeCounter()
-{
- LOG(LOG_DEBUG, "WebCore", "*-* Total native 3 (resource load) time: %d ms\n",
- sTotalTimeUsed);
-}
-}
-#endif
-
namespace android {
-#ifdef ANDROID_INSTRUMENT
-class TimeCounterRC {
-public:
- TimeCounterRC() {
- mStartTime = WebCore::get_thread_msec();
- }
-
- ~TimeCounterRC() {
- sTotalTimeUsed += WebCore::get_thread_msec() - mStartTime;
- }
-
-private:
- uint32_t mStartTime;
-};
-#endif
-
// ----------------------------------------------------------------------------
static struct resourceloader_t {
@@ -144,7 +119,7 @@ bool WebCoreResourceLoader::willLoadFromCache(const WebCore::KURL& url)
void WebCoreResourceLoader::SetResponseHeader(JNIEnv* env, jobject obj, jint nativeResponse, jstring key, jstring val)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterRC counter;
+ TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
#endif
WebCore::ResourceResponse* response = (WebCore::ResourceResponse*)nativeResponse;
@@ -163,7 +138,7 @@ jint WebCoreResourceLoader::CreateResponse(JNIEnv* env, jobject obj, jstring url
jstring encoding, jlong expireTime)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterRC counter;
+ TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
#endif
LOG_ASSERT(url, "Must have a url in the response!");
WebCore::KURL kurl(to_string(env, url));
@@ -196,7 +171,7 @@ jint WebCoreResourceLoader::CreateResponse(JNIEnv* env, jobject obj, jstring url
void WebCoreResourceLoader::ReceivedResponse(JNIEnv* env, jobject obj, jint nativeResponse)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterRC counter;
+ TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
#endif
WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj);
LOG_ASSERT(handle, "nativeReceivedResponse must take a valid handle!");
@@ -214,7 +189,7 @@ void WebCoreResourceLoader::ReceivedResponse(JNIEnv* env, jobject obj, jint nati
void WebCoreResourceLoader::AddData(JNIEnv* env, jobject obj, jbyteArray dataArray, jint length)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterRC counter;
+ TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
#endif
LOGV("webcore_resourceloader data(%d)", length);
@@ -237,7 +212,7 @@ void WebCoreResourceLoader::AddData(JNIEnv* env, jobject obj, jbyteArray dataArr
void WebCoreResourceLoader::Finished(JNIEnv* env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterRC counter;
+ TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
#endif
LOGV("webcore_resourceloader finished");
WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj);
@@ -254,7 +229,7 @@ jstring WebCoreResourceLoader::RedirectedToUrl(JNIEnv* env, jobject obj,
jstring baseUrl, jstring redirectTo, jint nativeResponse)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterRC counter;
+ TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
#endif
LOGV("webcore_resourceloader redirectedToUrl");
WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj);
@@ -290,7 +265,7 @@ void WebCoreResourceLoader::Error(JNIEnv* env, jobject obj, jint id, jstring des
jstring failingUrl)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterRC counter;
+ TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
#endif
LOGV("webcore_resourceloader error");
WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj);
diff --git a/WebKit/android/jni/WebCoreResourceLoader.h b/WebKit/android/jni/WebCoreResourceLoader.h
index e3b3cc7..0b0de59 100644
--- a/WebKit/android/jni/WebCoreResourceLoader.h
+++ b/WebKit/android/jni/WebCoreResourceLoader.h
@@ -1,19 +1,27 @@
-/* //device/libs/android_runtime/android_webcore_resource_loader.h
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 ANDROID_WEBKIT_RESOURCELOADLISTENER_H
#define ANDROID_WEBKIT_RESOURCELOADLISTENER_H
diff --git a/WebKit/android/jni/WebCoreViewBridge.h b/WebKit/android/jni/WebCoreViewBridge.h
index 361e9c4..db79a37 100644
--- a/WebKit/android/jni/WebCoreViewBridge.h
+++ b/WebKit/android/jni/WebCoreViewBridge.h
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WEBCORE_VIEW_BRIDGE_H
#define WEBCORE_VIEW_BRIDGE_H
diff --git a/WebKit/android/jni/WebFrameView.cpp b/WebKit/android/jni/WebFrameView.cpp
index 3310c51..f9a9a5b 100644
--- a/WebKit/android/jni/WebFrameView.cpp
+++ b/WebKit/android/jni/WebFrameView.cpp
@@ -1,18 +1,26 @@
/*
- *
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "webcoreglue"
diff --git a/WebKit/android/jni/WebFrameView.h b/WebKit/android/jni/WebFrameView.h
index 350a301..2347071 100644
--- a/WebKit/android/jni/WebFrameView.h
+++ b/WebKit/android/jni/WebFrameView.h
@@ -1,18 +1,26 @@
/*
- *
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WEB_FRAMEVIEW_H
diff --git a/WebKit/android/jni/WebHistory.cpp b/WebKit/android/jni/WebHistory.cpp
index 203869e..5555ff1 100644
--- a/WebKit/android/jni/WebHistory.cpp
+++ b/WebKit/android/jni/WebHistory.cpp
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "webhistory"
diff --git a/WebKit/android/jni/WebHistory.h b/WebKit/android/jni/WebHistory.h
index 7d9ff2a..6b6b61d 100644
--- a/WebKit/android/jni/WebHistory.h
+++ b/WebKit/android/jni/WebHistory.h
@@ -1,17 +1,26 @@
/*
* Copyright 2006, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 ANDROID_WEBKIT_WEBHISTORY_H
diff --git a/WebKit/android/jni/WebIconDatabase.cpp b/WebKit/android/jni/WebIconDatabase.cpp
index 7bc0ae5..c982c78 100644
--- a/WebKit/android/jni/WebIconDatabase.cpp
+++ b/WebKit/android/jni/WebIconDatabase.cpp
@@ -1,18 +1,27 @@
/*
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "favicons"
@@ -82,7 +91,7 @@ void WebIconDatabase::dispatchDidAddIconForPageURL(const WebCore::String& pageUR
if (!mDeliveryRequested) {
if (threadIsAttached) {
mDeliveryRequested = true;
- WebCore::JavaSharedClient::EnqueueFunctionPtr(DeliverNotifications, this);
+ JavaSharedClient::EnqueueFunctionPtr(DeliverNotifications, this);
}
}
mNotificationsMutex.unlock();
diff --git a/WebKit/android/jni/WebIconDatabase.h b/WebKit/android/jni/WebIconDatabase.h
index eefe1f6..c88842c 100644
--- a/WebKit/android/jni/WebIconDatabase.h
+++ b/WebKit/android/jni/WebIconDatabase.h
@@ -1,19 +1,27 @@
-/* //device/libs/WebKitLib/WebKit/WebCore/platform/android/jni/android_webkit_webicondatabase.h
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 ANDROID_WEBKIT_WEBICONDATABASE_H
#define ANDROID_WEBKIT_WEBICONDATABASE_H
diff --git a/WebKit/android/jni/WebSettings.cpp b/WebKit/android/jni/WebSettings.cpp
index eb34fb8..9860996 100644
--- a/WebKit/android/jni/WebSettings.cpp
+++ b/WebKit/android/jni/WebSettings.cpp
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#define LOG_TAG "websettings"
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 42a0043..9967b78 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2006, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "webcoreglue"
@@ -31,6 +40,7 @@
#include "EventNames.h"
#include "Font.h"
#include "FrameLoader.h"
+#include "FrameLoaderClientAndroid.h"
#include "FrameTree.h"
#include "FrameView.h"
#include "GraphicsContext.h"
@@ -99,56 +109,13 @@ FILE* gRenderTreeFile = 0;
#endif
#ifdef ANDROID_INSTRUMENT
-static uint32_t sTotalTimeUsed = 0;
-static uint32_t sTotalPaintTimeUsed = 0;
-static uint32_t sCounter = 0;
-
-namespace WebCore {
-void Frame::resetWebViewCoreTimeCounter()
-{
- sTotalTimeUsed = 0;
-}
-
-void Frame::reportWebViewCoreTimeCounter()
-{
- LOG(LOG_DEBUG, "WebCore", "*-* Total native 4 (webview core) time: %d ms\n",
- sTotalTimeUsed);
-}
-// This should be in Frame.cpp, but android LOG is conflict with webcore LOG
-void Frame::resetPaintTimeCounter()
-{
- sTotalPaintTimeUsed = 0;
- sCounter = 0;
-}
-
-void Frame::reportPaintTimeCounter()
-{
- LOG(LOG_DEBUG, "WebCore", "*-* Total draw time: %d ms called %d times\n",
- sTotalPaintTimeUsed, sCounter);
-}
-}
+#include "TimeCounter.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////
namespace android {
-#ifdef ANDROID_INSTRUMENT
-class TimeCounterWV {
-public:
- TimeCounterWV() {
- m_startTime = WebCore::get_thread_msec();
- }
-
- ~TimeCounterWV() {
- sTotalTimeUsed += WebCore::get_thread_msec() - m_startTime;
- }
-
-private:
- uint32_t m_startTime;
-};
-#endif
-
// ----------------------------------------------------------------------------
#define GET_NATIVE_VIEW(env, obj) ((WebViewCore*)env->GetIntField(obj, gWebViewCoreFields.m_nativeClass))
@@ -411,7 +378,7 @@ void WebViewCore::recordPictureSet(PictureSet* content)
// and check to see if any already split pieces need to be redrawn.
if (content->build())
rebuildPictureSet(content);
- WebCore::CacheBuilder& builder = m_mainFrame->getCacheBuilder();
+ CacheBuilder& builder = FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder();
WebCore::Node* oldFocusNode = builder.currentFocus();
m_frameCacheOutOfDate = true;
WebCore::IntRect oldBounds = oldFocusNode ?
@@ -753,24 +720,24 @@ void WebViewCore::notifyProgressFinished()
sendNotifyProgressFinished();
}
-void WebViewCore::doMaxScroll(WebCore::CacheBuilder::Direction dir)
+void WebViewCore::doMaxScroll(CacheBuilder::Direction dir)
{
int dx = 0, dy = 0;
switch (dir) {
- case WebCore::CacheBuilder::LEFT:
+ case CacheBuilder::LEFT:
dx = -m_maxXScroll;
break;
- case WebCore::CacheBuilder::UP:
+ case CacheBuilder::UP:
dy = -m_maxYScroll;
break;
- case WebCore::CacheBuilder::RIGHT:
+ case CacheBuilder::RIGHT:
dx = m_maxXScroll;
break;
- case WebCore::CacheBuilder::DOWN:
+ case CacheBuilder::DOWN:
dy = m_maxYScroll;
break;
- case WebCore::CacheBuilder::UNINITIALIZED:
+ case CacheBuilder::UNINITIALIZED:
default:
LOG_ASSERT(0, "unexpected focus selector");
}
@@ -864,13 +831,13 @@ void WebViewCore::dumpRenderTree(bool useFile)
void WebViewCore::dumpNavTree()
{
#if DUMP_NAV_CACHE
- m_mainFrame->getCacheBuilder().mDebug.print();
+ FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder().mDebug.print();
#endif
}
WebCore::String WebViewCore::retrieveHref(WebCore::Frame* frame, WebCore::Node* node)
{
- WebCore::CacheBuilder& builder = m_mainFrame->getCacheBuilder();
+ CacheBuilder& builder = FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder();
if (!builder.validNode(frame, node))
return WebCore::String();
if (!node->hasTagName(WebCore::HTMLNames::aTag))
@@ -893,7 +860,7 @@ bool WebViewCore::prepareFrameCache()
m_temp = new CachedRoot();
m_temp->init(m_mainFrame, &m_history);
m_temp->setGeneration(++m_buildGeneration);
- WebCore::CacheBuilder& builder = m_mainFrame->getCacheBuilder();
+ CacheBuilder& builder = FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder();
WebCore::Settings* settings = m_mainFrame->page()->settings();
builder.allowAllTextDetection();
#ifdef ANDROID_META_SUPPORT
@@ -1101,7 +1068,7 @@ bool WebViewCore::commonKitFocus(int generation, int buildGeneration,
}
// if the nav cache has been rebuilt since this focus request was generated,
// send a request back to the UI side to recompute the kit-side focus
- if (m_buildGeneration > buildGeneration || (node && !m_mainFrame->getCacheBuilder().validNode(frame, node))) {
+ if (m_buildGeneration > buildGeneration || (node && !FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder().validNode(frame, node))) {
DBG_NAV_LOGD("m_buildGeneration=%d > buildGeneration=%d",
m_buildGeneration, buildGeneration);
gRecomputeFocusMutex.lock();
@@ -1125,7 +1092,7 @@ bool WebViewCore::finalKitFocus(WebCore::Frame* frame, WebCore::Node* node,
{
if (!frame)
frame = m_mainFrame;
- WebCore::CacheBuilder& builder = m_mainFrame->getCacheBuilder();
+ CacheBuilder& builder = FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder();
WebCore::Node* oldFocusNode = builder.currentFocus();
// mouse event expects the position in the window coordinate
m_mousePos = WebCore::IntPoint(x - m_scrollOffsetX, y - m_scrollOffsetY);
@@ -1182,7 +1149,7 @@ static WebCore::Frame* FocusedFrame(WebCore::Frame* frame)
{
if (!frame)
return 0;
- WebCore::Node* focusNode = frame->getCacheBuilder().currentFocus();
+ WebCore::Node* focusNode = FrameLoaderClientAndroid::get(frame)->getCacheBuilder().currentFocus();
if (!focusNode)
return 0;
WebCore::Document* doc = focusNode->document();
@@ -1193,7 +1160,7 @@ static WebCore::Frame* FocusedFrame(WebCore::Frame* frame)
static WebCore::RenderTextControl* FocusedTextControl(WebCore::Frame* frame)
{
- WebCore::Node* focusNode = frame->getCacheBuilder().currentFocus();
+ WebCore::Node* focusNode = FrameLoaderClientAndroid::get(frame)->getCacheBuilder().currentFocus();
WebCore::RenderObject* renderer = focusNode->renderer();
if (renderer && (renderer->isTextField() || renderer->isTextArea())) {
return static_cast<WebCore::RenderTextControl*>(renderer);
@@ -1206,7 +1173,7 @@ WebCore::Frame* WebViewCore::changedKitFocus(WebCore::Frame* frame,
{
if (!frame || !node)
return m_mainFrame;
- WebCore::Node* current = m_mainFrame->getCacheBuilder().currentFocus();
+ WebCore::Node* current = FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder().currentFocus();
if (current == node)
return frame;
return finalKitFocus(frame, node, x, y) ? frame : m_mainFrame;
@@ -1227,7 +1194,7 @@ static int findTextBoxIndex(WebCore::Node* node, const WebCore::IntPoint& pt)
renderText->absolutePosition(renderX, renderY);
WebCore::InlineTextBox *textBox = renderText->firstTextBox();
int globalX, globalY;
- WebCore::CacheBuilder::GetGlobalOffset(node, &globalX, &globalY);
+ CacheBuilder::GetGlobalOffset(node, &globalX, &globalY);
int x = pt.x() - globalX;
int y = pt.y() - globalY;
do {
@@ -1352,7 +1319,7 @@ WebCore::String WebViewCore::getSelection(SkRegion* selRgn)
#if DUMP_NAV_CACHE
{
char buffer[256];
- WebCore::CacheBuilder::Debug debug;
+ CacheBuilder::Debug debug;
debug.init(buffer, sizeof(buffer));
debug.print("copy: ");
debug.wideString(result);
@@ -1450,7 +1417,7 @@ void WebViewCore::passToJs(WebCore::Frame* frame, WebCore::Node* node, int x, in
m_blockTextfieldUpdates = false;
m_textGeneration = generation;
- WebCore::Node* currentFocus = m_mainFrame->getCacheBuilder().currentFocus();
+ WebCore::Node* currentFocus = FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder().currentFocus();
// Make sure we have the same focus and it is a text field.
if (node == currentFocus && currentFocus) {
WebCore::RenderObject* renderer = currentFocus->renderer();
@@ -1505,7 +1472,7 @@ public:
virtual void replyInt(int index)
{
// If the select element no longer exists, do to a page change, etc, silently return.
- if (!m_select || !m_viewImpl->m_mainFrame->getCacheBuilder().validNode(m_frame, m_select))
+ if (!m_select || !FrameLoaderClientAndroid::get(m_viewImpl->m_mainFrame)->getCacheBuilder().validNode(m_frame, m_select))
return;
if (-1 == index) {
if (m_select->selectedIndex() != -1) {
@@ -1531,7 +1498,7 @@ public:
virtual void replyIntArray(const int* array, int count)
{
// If the select element no longer exists, do to a page change, etc, silently return.
- if (!m_select || !m_viewImpl->m_mainFrame->getCacheBuilder().validNode(m_frame, m_select))
+ if (!m_select || !FrameLoaderClientAndroid::get(m_viewImpl->m_mainFrame)->getCacheBuilder().validNode(m_frame, m_select))
return;
#ifdef ANDROID_DESELECT_SELECT
m_select->deselectItems();
@@ -1626,7 +1593,7 @@ bool WebViewCore::key(int keyCode, UChar32 unichar, int repeatCount, bool isShif
DBG_NAV_LOGD("key: keyCode=%d", keyCode);
WebCore::EventHandler* eventHandler = m_mainFrame->eventHandler();
- WebCore::Node* focusNode = m_mainFrame->getCacheBuilder().currentFocus();
+ WebCore::Node* focusNode = FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder().currentFocus();
if (focusNode) {
eventHandler = focusNode->document()->frame()->eventHandler();
}
@@ -1646,7 +1613,7 @@ bool WebViewCore::key(int keyCode, UChar32 unichar, int repeatCount, bool isShif
bool WebViewCore::click() {
bool keyHandled = false;
- WebCore::Node* focusNode = m_mainFrame->getCacheBuilder().currentFocus();
+ WebCore::Node* focusNode = FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder().currentFocus();
if (focusNode) {
WebFrame::getWebFrame(m_mainFrame)->setUserInitiatedClick(true);
keyHandled = handleMouseClick(focusNode->document()->frame(), focusNode);
@@ -1708,7 +1675,7 @@ void WebViewCore::touchUp(int touchGeneration, int buildGeneration,
if (frame) {
frame->loader()->resetMultipleFormSubmissionProtection();
}
- WebCore::EditorClientAndroid* client = static_cast<WebCore::EditorClientAndroid*>(m_mainFrame->editor()->client());
+ EditorClientAndroid* client = static_cast<EditorClientAndroid*>(m_mainFrame->editor()->client());
client->setFromClick(true);
DBG_NAV_LOGD("touchGeneration=%d handleMouseClick frame=%p node=%p"
" x=%d y=%d", touchGeneration, frame, node, x, y);
@@ -1718,7 +1685,7 @@ void WebViewCore::touchUp(int touchGeneration, int buildGeneration,
bool WebViewCore::handleMouseClick(WebCore::Frame* framePtr, WebCore::Node* nodePtr)
{
- if (framePtr && !m_mainFrame->getCacheBuilder().validNode(framePtr, nodePtr))
+ if (framePtr && !FrameLoaderClientAndroid::get(m_mainFrame)->getCacheBuilder().validNode(framePtr, nodePtr))
return false;
WebFrame* webFrame = WebFrame::getWebFrame(m_mainFrame);
// Need to special case area tags because an image map could have an area element in the middle
@@ -1948,7 +1915,7 @@ static void SetSize(JNIEnv *env, jobject obj, jint width, jint height,
jint screenWidth, jfloat scale)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOGV("webviewcore::nativeSetSize(%u %u)\n viewImpl: %p", (unsigned)width, (unsigned)height, viewImpl);
@@ -1965,7 +1932,7 @@ static void SetSize(JNIEnv *env, jobject obj, jint width, jint height,
static void SetScrollOffset(JNIEnv *env, jobject obj, jint dx, jint dy)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "need viewImpl");
@@ -1986,7 +1953,7 @@ static jboolean Key(JNIEnv *env, jobject obj, jint keyCode, jint unichar,
jint repeatCount, jboolean isShift, jboolean isAlt, jboolean isDown)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in Key");
@@ -1997,7 +1964,7 @@ static jboolean Key(JNIEnv *env, jobject obj, jint keyCode, jint unichar,
static jboolean Click(JNIEnv *env, jobject obj)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in Click");
@@ -2009,7 +1976,7 @@ static void DeleteSelection(JNIEnv *env, jobject obj,
jint frame, jint node, jint x, jint y, jint start, jint end)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
LOGV("webviewcore::nativeDeleteSelection()\n");
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
@@ -2022,7 +1989,7 @@ static void SetSelection(JNIEnv *env, jobject obj,
jint frame, jint node, jint x, jint y, jint start, jint end)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
LOGV("webviewcore::nativeSetSelection()\n");
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
@@ -2037,7 +2004,7 @@ static void ReplaceTextfieldText(JNIEnv *env, jobject obj,
jstring replace, jint start, jint end)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
LOGV("webviewcore::nativeReplaceTextfieldText()\n");
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
@@ -2051,7 +2018,7 @@ static void PassToJs(JNIEnv *env, jobject obj, jint frame, jint node,
jint keyValue, jboolean down, jboolean cap, jboolean fn, jboolean sym)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
LOGV("webviewcore::nativePassToJs()\n");
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
@@ -2063,7 +2030,7 @@ static void PassToJs(JNIEnv *env, jobject obj, jint frame, jint node,
static void SaveDocumentState(JNIEnv *env, jobject obj, jint frame, jint node, jint x, jint y)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
LOGV("webviewcore::nativeSaveDocumentState()\n");
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
@@ -2074,7 +2041,7 @@ static void SaveDocumentState(JNIEnv *env, jobject obj, jint frame, jint node, j
static bool RecordContent(JNIEnv *env, jobject obj, jobject region, jobject pt)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
SkRegion* nativeRegion = GraphicsJNI::getNativeRegion(env, region);
@@ -2093,7 +2060,7 @@ static void SplitContent(JNIEnv *env, jobject obj)
static void SendListBoxChoice(JNIEnv* env, jobject obj, jint choice)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in nativeSendListBoxChoice");
@@ -2110,7 +2077,7 @@ static void SendListBoxChoices(JNIEnv* env, jobject obj, jbooleanArray jArray,
jint size)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in nativeSendListBoxChoices");
@@ -2136,8 +2103,8 @@ static jstring FindAddress(JNIEnv *env, jobject obj, jstring addr)
return 0;
const jchar* addrChars = env->GetStringChars(addr, 0);
int start, end;
- bool success = WebCore::CacheBuilder::FindAddress(addrChars, length,
- &start, &end) == WebCore::CacheBuilder::FOUND_COMPLETE;
+ bool success = CacheBuilder::FindAddress(addrChars, length,
+ &start, &end) == CacheBuilder::FOUND_COMPLETE;
jstring ret = 0;
if (success) {
ret = env->NewString((jchar*) addrChars + start, end - start);
@@ -2159,7 +2126,7 @@ static void TouchUp(JNIEnv *env, jobject obj, jint touchGeneration,
jboolean isClick, jboolean retry)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
@@ -2183,7 +2150,7 @@ static void SetFinalFocus(JNIEnv *env, jobject obj, jint frame, jint node,
jint x, jint y, jboolean block)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
@@ -2196,7 +2163,7 @@ static void SetKitFocus(JNIEnv *env, jobject obj, jint moveGeneration,
jboolean ignoreNullFocus)
{
#ifdef ANDROID_INSTRUMENT
- TimeCounterWV counter;
+ TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h
index a6c44f8..fcd5574 100644
--- a/WebKit/android/jni/WebViewCore.h
+++ b/WebKit/android/jni/WebViewCore.h
@@ -1,18 +1,26 @@
/*
- *
* Copyright 2006, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WEBVIEWCORE_H
@@ -386,7 +394,7 @@ namespace android {
WebCore::Frame* frame, WebCore::Node* node, int x, int y,
bool ignoreNullFocus);
bool finalKitFocus(WebCore::Frame* frame, WebCore::Node* node, int x, int y);
- void doMaxScroll(WebCore::CacheBuilder::Direction dir);
+ void doMaxScroll(CacheBuilder::Direction dir);
SkPicture* rebuildPicture(const SkIRect& inval);
void rebuildPictureSet(PictureSet* );
void sendMarkNodeInvalid(WebCore::Node* );
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp
index 69d0a06..1323581 100644
--- a/WebKit/android/nav/CacheBuilder.cpp
+++ b/WebKit/android/nav/CacheBuilder.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2006, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.max
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "CachedPrefix.h"
@@ -21,6 +30,8 @@
#include "EventNames.h"
#include "EventTargetNode.h"
#include "Frame.h"
+#include "FrameLoader.h"
+#include "FrameLoaderClientAndroid.h"
#include "FrameTree.h"
#include "FrameView.h"
//#include "GraphicsContext.h"
@@ -59,18 +70,22 @@
#define MINIMUM_FOCUSABLE_HEIGHT 3
#define MAXIMUM_FOCUS_RING_COUNT 32
-namespace WebCore {
+namespace android {
CacheBuilder* CacheBuilder::Builder(Frame* frame) {
- return &frame->m_cacheBuilder;
+ return &((FrameLoaderClientAndroid*) frame->loader()->client())->getCacheBuilder();
}
Frame* CacheBuilder::FrameAnd(CacheBuilder* cacheBuilder) {
- return (Frame*) ((char*) cacheBuilder - OFFSETOF(Frame, m_cacheBuilder));
+ FrameLoaderClientAndroid* loader = (FrameLoaderClientAndroid*)
+ ((char*) cacheBuilder - OFFSETOF(FrameLoaderClientAndroid, m_cacheBuilder));
+ return loader->getFrame();
}
Frame* CacheBuilder::FrameAnd(const CacheBuilder* cacheBuilder) {
- return (Frame*) ((char*) cacheBuilder - OFFSETOF(Frame, m_cacheBuilder));
+ FrameLoaderClientAndroid* loader = (FrameLoaderClientAndroid*)
+ ((char*) cacheBuilder - OFFSETOF(FrameLoaderClientAndroid, m_cacheBuilder));
+ return loader->getFrame();
}
#if DUMP_NAV_CACHE
@@ -795,14 +810,14 @@ void CacheBuilder::Debug::wideString(const String& str) {
CacheBuilder::CacheBuilder()
{
mLastKnownFocus = NULL;
- mAllowableTypes = android::ALL_CACHEDNODETYPES;
+ mAllowableTypes = ALL_CACHEDNODETYPES;
#ifdef DUMP_NAV_CACHE_USING_PRINTF
gNavCacheLogFile = NULL;
#endif
}
void CacheBuilder::adjustForColumns(const ClipColumnTracker& track,
- android::CachedNode* node, IntRect* bounds)
+ CachedNode* node, IntRect* bounds)
{
int x = 0;
int y = 0;
@@ -868,13 +883,14 @@ bool CacheBuilder::AnyIsClick(Node* node)
return AnyChildIsClick(node);
}
-void CacheBuilder::buildCache(android::CachedRoot* root)
+void CacheBuilder::buildCache(CachedRoot* root)
{
Frame* frame = FrameAnd(this);
mLastKnownFocus = NULL;
- BuildFrame(frame, frame, root, (android::CachedFrame*) root);
+ m_areaBoundsMap.clear();
+ BuildFrame(frame, frame, root, (CachedFrame*) root);
root->finishInit(); // set up frame parent pointers, child pointers
- setData((android::CachedFrame*) root);
+ setData((CachedFrame*) root);
}
static Node* OneAfter(Node* node)
@@ -916,7 +932,7 @@ static bool checkForPluginViewThatWantsFocus(RenderObject* renderer) {
// keep nodes that are focusable
void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
- android::CachedRoot* cachedRoot, android::CachedFrame* cachedFrame)
+ CachedRoot* cachedRoot, CachedFrame* cachedFrame)
{
WTF::Vector<Tracker> tracker(1);
{
@@ -939,7 +955,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
NodeWalk walk;
Document* doc = frame->document();
Node* parent = doc;
- android::CachedNode cachedParentNode;
+ CachedNode cachedParentNode;
cachedParentNode.init(parent);
#if DUMP_NAV_CACHE
cachedParentNode.mDebug.mNodeIndex = nodeIndex;
@@ -974,14 +990,14 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
clipTracker.removeLast();
} while (true);
Frame* child = HasFrame(node);
- android::CachedNode cachedNode;
+ CachedNode cachedNode;
if (child != NULL) {
if (child->document() == NULL)
continue;
RenderObject* nodeRenderer = node->renderer();
if (nodeRenderer != NULL && nodeRenderer->style()->visibility() == HIDDEN)
continue;
- android::CachedFrame cachedChild;
+ CachedFrame cachedChild;
cachedChild.init(cachedRoot, cacheIndex, child);
int childFrameIndex = cachedFrame->childCount();
cachedFrame->addFrame(cachedChild);
@@ -994,7 +1010,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
node, nodeIndex, NULL);
#endif
cachedFrame->add(cachedNode);
- android::CachedFrame* childPtr = cachedFrame->lastChild();
+ CachedFrame* childPtr = cachedFrame->lastChild();
BuildFrame(root, child, cachedRoot, childPtr);
continue;
}
@@ -1047,7 +1063,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
TextDirection direction = LTR;
String name;
String exported;
- android::CachedNodeType type = android::NORMAL_CACHEDNODETYPE;
+ CachedNodeType type = NORMAL_CACHEDNODETYPE;
IntRect bounds;
IntRect absBounds;
Node* lastChild = node->lastChild();
@@ -1102,10 +1118,10 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
clip.mBounds.move(oRect.x(), oRect.y());
}
}
- if (node->isTextNode() && mAllowableTypes != android::NORMAL_CACHEDNODETYPE) {
+ if (node->isTextNode() && mAllowableTypes != NORMAL_CACHEDNODETYPE) {
if (last->mSomeParentTakesFocus) // don't look at text inside focusable node
continue;
- android::CachedNodeType checkType;
+ CachedNodeType checkType;
if (isFocusableText(&walk, more, node, &checkType,
&exported) == false)
continue;
@@ -1118,7 +1134,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
DUMP_NAV_LOGD("%s\n", buffer);
}
#endif
- type = (android::CachedNodeType) checkType;
+ type = (CachedNodeType) checkType;
// !!! test ! is the following line correctly needed for frames to work?
cachedNode.init(node);
const ClipColumnTracker& clipTrack = clipTracker.last();
@@ -1158,6 +1174,8 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
if (anchorNode->isFocusable() == false)
continue;
EventTargetNode* target = (EventTargetNode*) node;
+ if (target->disabled())
+ continue;
hasMouseOver = target->getEventListener(eventNames().mouseoverEvent);
isAnchor = true;
KURL href = anchorNode->href();
@@ -1284,7 +1302,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
{
int lastIndex = cachedFrame->size() - 1;
if (node == focused) {
- android::CachedNode* cachedNodePtr = cachedFrame->getIndex(lastIndex);
+ CachedNode* cachedNodePtr = cachedFrame->getIndex(lastIndex);
cachedRoot->setCachedFocus(cachedFrame, cachedNodePtr);
}
if (lastChild != NULL) {
@@ -1310,7 +1328,7 @@ tryNextNode:
}
}
-bool CacheBuilder::CleanUpContainedNodes(android::CachedFrame* cachedFrame,
+bool CacheBuilder::CleanUpContainedNodes(CachedFrame* cachedFrame,
const Tracker* last, int lastChildIndex)
{
// if outer is body, disable outer
@@ -1320,7 +1338,7 @@ bool CacheBuilder::CleanUpContainedNodes(android::CachedFrame* cachedFrame,
int childCount = lastChildIndex - last->mCachedNodeIndex;
if (childCount == 0)
return false;
- android::CachedNode* lastCached = cachedFrame->getIndex(last->mCachedNodeIndex);
+ CachedNode* lastCached = cachedFrame->getIndex(last->mCachedNodeIndex);
Node* lastNode = (Node*) lastCached->nodePointer();
if ((childCount > 1 && lastNode->hasTagName(HTMLNames::selectTag) == false) ||
lastNode->hasTagName(HTMLNames::bodyTag) ||
@@ -1330,7 +1348,7 @@ bool CacheBuilder::CleanUpContainedNodes(android::CachedFrame* cachedFrame,
lastCached->setNavableRects();
return false;
}
- android::CachedNode* onlyChildCached = cachedFrame->lastNode();
+ CachedNode* onlyChildCached = cachedFrame->lastNode();
Node* onlyChild = (Node*) onlyChildCached->nodePointer();
bool outerIsMouseMoveOnly =
lastNode->isKeyboardFocusable(NULL) == false &&
@@ -2507,7 +2525,7 @@ Node* CacheBuilder::findByCenter(int x, int y) const
}
bool CacheBuilder::isFocusableText(NodeWalk* walk, bool more, Node* node,
- android::CachedNodeType* type, String* exported) const
+ CachedNodeType* type, String* exported) const
{
Text* textNode = static_cast<Text*>(node);
StringImpl* string = textNode->string();
@@ -2539,9 +2557,9 @@ bool CacheBuilder::isFocusableText(NodeWalk* walk, bool more, Node* node,
int baseStart, firstStart = start;
saveInline = baseInline;
baseStart = start;
- for (android::CachedNodeType checkType = android::ADDRESS_CACHEDNODETYPE;
- checkType <= android::PHONE_CACHEDNODETYPE;
- checkType = (android::CachedNodeType) (checkType << 1))
+ for (CachedNodeType checkType = ADDRESS_CACHEDNODETYPE;
+ checkType <= PHONE_CACHEDNODETYPE;
+ checkType = (CachedNodeType) (checkType << 1))
{
if ((checkType & mAllowableTypes) == 0)
continue;
@@ -2549,7 +2567,7 @@ bool CacheBuilder::isFocusableText(NodeWalk* walk, bool more, Node* node,
FindState findState;
FindReset(&findState);
start = baseStart;
- if (checkType == android::ADDRESS_CACHEDNODETYPE) {
+ if (checkType == ADDRESS_CACHEDNODETYPE) {
findState.mBases[0] = baseChars;
findState.mWords[0] = baseChars + start;
findState.mStarts[0] = baseChars + start;
@@ -2566,13 +2584,13 @@ bool CacheBuilder::isFocusableText(NodeWalk* walk, bool more, Node* node,
inlineTextBox->end() - start + 1;
bool wasInitialized = findState.mInitialized;
switch (checkType) {
- case android::ADDRESS_CACHEDNODETYPE:
+ case ADDRESS_CACHEDNODETYPE:
state = FindPartialAddress(baseChars, chars, length, &findState);
break;
- case android::EMAIL_CACHEDNODETYPE:
+ case EMAIL_CACHEDNODETYPE:
state = FindPartialEMail(chars, length, &findState);
break;
- case android::PHONE_CACHEDNODETYPE:
+ case PHONE_CACHEDNODETYPE:
state = FindPartialNumber(chars, length, &findState);
break;
default:
@@ -2605,7 +2623,7 @@ bool CacheBuilder::isFocusableText(NodeWalk* walk, bool more, Node* node,
walk->mLastInline = lastPartialInline;
}
*type = checkType;
- if (checkType == android::PHONE_CACHEDNODETYPE) {
+ if (checkType == PHONE_CACHEDNODETYPE) {
const UChar* store = findState.mStore;
*exported = String(store);
} else {
@@ -2658,7 +2676,7 @@ bool CacheBuilder::isFocusableText(NodeWalk* walk, bool more, Node* node,
node = node->traverseNextNode();
if (node == NULL || node->hasTagName(HTMLNames::aTag)) {
if (state == FOUND_PARTIAL &&
- checkType == android::ADDRESS_CACHEDNODETYPE &&
+ checkType == ADDRESS_CACHEDNODETYPE &&
findState.mProgress == ZIP_CODE &&
findState.mNumberCount == 0) {
baseChars = NULL;
@@ -2689,9 +2707,9 @@ tryNextCheckType:
baseChars = string->characters();
}
if (foundBetter) {
- android::CachedNodeType temp = *type;
+ CachedNodeType temp = *type;
switch (temp) {
- case android::ADDRESS_CACHEDNODETYPE: {
+ case ADDRESS_CACHEDNODETYPE: {
static const char geoString[] = "geo:0,0?q=";
exported->insert(String(geoString), 0);
int index = sizeof(geoString) - 1;
@@ -2699,10 +2717,10 @@ tryNextCheckType:
while ((index = exported->find(',', index)) >= 0)
exported->replace(index, 1, escapedComma);
} break;
- case android::EMAIL_CACHEDNODETYPE:
+ case EMAIL_CACHEDNODETYPE:
exported->insert(WebCore::String("mailto:"), 0);
break;
- case android::PHONE_CACHEDNODETYPE:
+ case PHONE_CACHEDNODETYPE:
exported->insert(WebCore::String("tel:"), 0);
break;
default:
@@ -2747,7 +2765,7 @@ void CacheBuilder::setLastFocus(Node* node)
mLastKnownFocusBounds = node->getRect();
}
-bool CacheBuilder::setData(android::CachedFrame* cachedFrame)
+bool CacheBuilder::setData(CachedFrame* cachedFrame)
{
Frame* frame = FrameAnd(this);
Document* doc = frame->document();
@@ -2772,7 +2790,7 @@ bool CacheBuilder::setData(android::CachedFrame* cachedFrame)
cachedFrame->setContentsSize(layer->width(), layer->height());
if (cachedFrame->childCount() == 0)
return true;
- android::CachedFrame* lastCachedFrame = cachedFrame->lastChild();
+ CachedFrame* lastCachedFrame = cachedFrame->lastChild();
cachedFrame = cachedFrame->firstChild();
do {
CacheBuilder* cacheBuilder = Builder((Frame* )cachedFrame->framePointer());
diff --git a/WebKit/android/nav/CacheBuilder.h b/WebKit/android/nav/CacheBuilder.h
index 4a424a9..7d5404d 100644
--- a/WebKit/android/nav/CacheBuilder.h
+++ b/WebKit/android/nav/CacheBuilder.h
@@ -1,19 +1,27 @@
-/* libs/WebKitLib/WebKit/platform/bridge/android/CacheBuilder.h
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 CacheBuilder_H
#define CacheBuilder_H
@@ -23,15 +31,12 @@
#include "IntRect.h"
#include "PlatformString.h"
#include "TextDirection.h"
+#include "wtf/HashMap.h"
#include "wtf/Vector.h"
#define NAVIGATION_MAX_PHONE_LENGTH 14
-namespace android {
- class CachedFrame;
- class CachedNode;
- class CachedRoot;
-}
+using namespace WebCore;
namespace WebCore {
@@ -47,6 +52,14 @@ class RenderObject;
class RenderLayer;
class Text;
+}
+
+namespace android {
+
+class CachedFrame;
+class CachedNode;
+class CachedRoot;
+
class CacheBuilder {
public:
enum Direction {
@@ -65,17 +78,17 @@ public:
FOUND_COMPLETE
};
CacheBuilder();
- void allowAllTextDetection() { mAllowableTypes = android::ALL_CACHEDNODETYPES; }
- void buildCache(android::CachedRoot* root);
+ void allowAllTextDetection() { mAllowableTypes = ALL_CACHEDNODETYPES; }
+ void buildCache(CachedRoot* root);
static bool ConstructPartRects(Node* node, const IntRect& bounds,
IntRect* focusBounds, int x, int y, WTF::Vector<IntRect>* result);
Node* currentFocus() const;
- void disallowAddressDetection() { mAllowableTypes = (android::CachedNodeType) (
- mAllowableTypes & ~android::ADDRESS_CACHEDNODETYPE); }
- void disallowEmailDetection() { mAllowableTypes = (android::CachedNodeType) (
- mAllowableTypes & ~android::EMAIL_CACHEDNODETYPE); }
- void disallowPhoneDetection() { mAllowableTypes = (android::CachedNodeType) (
- mAllowableTypes & ~android::PHONE_CACHEDNODETYPE); }
+ void disallowAddressDetection() { mAllowableTypes = (CachedNodeType) (
+ mAllowableTypes & ~ADDRESS_CACHEDNODETYPE); }
+ void disallowEmailDetection() { mAllowableTypes = (CachedNodeType) (
+ mAllowableTypes & ~EMAIL_CACHEDNODETYPE); }
+ void disallowPhoneDetection() { mAllowableTypes = (CachedNodeType) (
+ mAllowableTypes & ~PHONE_CACHEDNODETYPE); }
static FoundState FindAddress(const UChar* , unsigned length, int* start, int* end);
Node* findByCenter(int x, int y) const;
static void GetGlobalOffset(Frame* , int* x, int * y);
@@ -116,7 +129,7 @@ private:
BoundsPart mPart;
WTF::Vector<BoundsPart> mParts;
char mStore[NAVIGATION_MAX_PHONE_LENGTH + 1];
- android::CachedNodeType mStoreType;
+ CachedNodeType mStoreType;
int mPartIndex;
Node* mNode;
Node* mFinalNode;
@@ -171,14 +184,14 @@ private:
bool mSomeParentTakesFocus;
};
void adjustForColumns(const ClipColumnTracker& track,
- android::CachedNode* node, IntRect* bounds);
+ CachedNode* node, IntRect* bounds);
static bool AddPartRect(IntRect& bounds, int x, int y,
WTF::Vector<IntRect>* result, IntRect* focusBounds);
static bool AnyIsClick(Node* node);
static bool AnyChildIsClick(Node* node);
void BuildFrame(Frame* root, Frame* frame,
- android::CachedRoot* cachedRoot, android::CachedFrame* cachedFrame);
- bool CleanUpContainedNodes(android::CachedFrame* cachedFrame,
+ CachedRoot* cachedRoot, CachedFrame* cachedFrame);
+ bool CleanUpContainedNodes(CachedFrame* cachedFrame,
const Tracker* last, int lastChildIndex);
static bool ConstructTextRect(Text* textNode,
InlineTextBox* textBox, int start, int relEnd, int x, int y,
@@ -200,17 +213,17 @@ private:
static bool HasOverOrOut(Node* );
static bool HasTriggerEvent(Node* );
static bool IsDomainChar(UChar ch);
- bool isFocusableText(NodeWalk* , bool oldMore, Node* , android::CachedNodeType* type,
+ bool isFocusableText(NodeWalk* , bool oldMore, Node* , CachedNodeType* type,
String* exported) const; //returns true if it is focusable
static bool IsMailboxChar(UChar ch);
static bool IsRealNode(Frame* , Node* );
int overlap(int left, int right); // returns distance scale factor as 16.16 scalar
- bool setData(android::CachedFrame* );
+ bool setData(CachedFrame* );
Node* tryFocus(Direction direction);
Node* trySegment(Direction direction, int mainStart, int mainEnd);
Node* mLastKnownFocus;
IntRect mLastKnownFocusBounds;
- android::CachedNodeType mAllowableTypes;
+ CachedNodeType mAllowableTypes;
WTF::HashMap<const HTMLAreaElement* , RenderImage* > m_areaBoundsMap;
#if DUMP_NAV_CACHE
public:
diff --git a/WebKit/android/nav/CachedDebug.h b/WebKit/android/nav/CachedDebug.h
index 5205a22..42c6363 100644
--- a/WebKit/android/nav/CachedDebug.h
+++ b/WebKit/android/nav/CachedDebug.h
@@ -1,18 +1,27 @@
/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 CachedDebug_H
#define CachedDebug_H
diff --git a/WebKit/android/nav/CachedFrame.cpp b/WebKit/android/nav/CachedFrame.cpp
index bd52806..9365d06 100644
--- a/WebKit/android/nav/CachedFrame.cpp
+++ b/WebKit/android/nav/CachedFrame.cpp
@@ -1,18 +1,27 @@
/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#include "CachedPrefix.h"
#include "CachedHistory.h"
diff --git a/WebKit/android/nav/CachedFrame.h b/WebKit/android/nav/CachedFrame.h
index 3462721..1347f62 100644
--- a/WebKit/android/nav/CachedFrame.h
+++ b/WebKit/android/nav/CachedFrame.h
@@ -1,18 +1,27 @@
-/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 CachedFrame_H
#define CachedFrame_H
diff --git a/WebKit/android/nav/CachedHistory.cpp b/WebKit/android/nav/CachedHistory.cpp
index 589b64a..ba94c72 100644
--- a/WebKit/android/nav/CachedHistory.cpp
+++ b/WebKit/android/nav/CachedHistory.cpp
@@ -1,18 +1,27 @@
/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#include "CachedPrefix.h"
#include "CachedFrame.h"
diff --git a/WebKit/android/nav/CachedHistory.h b/WebKit/android/nav/CachedHistory.h
index 818115e..490ed67 100644
--- a/WebKit/android/nav/CachedHistory.h
+++ b/WebKit/android/nav/CachedHistory.h
@@ -1,18 +1,27 @@
-/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 CachedHistory_H
#define CachedHistory_H
diff --git a/WebKit/android/nav/CachedNode.cpp b/WebKit/android/nav/CachedNode.cpp
index 381e700..e6ade3e 100644
--- a/WebKit/android/nav/CachedNode.cpp
+++ b/WebKit/android/nav/CachedNode.cpp
@@ -1,18 +1,26 @@
/*
- *
* Copyright 2007, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "CachedPrefix.h"
diff --git a/WebKit/android/nav/CachedNode.h b/WebKit/android/nav/CachedNode.h
index d10f710..6cb1ca3 100644
--- a/WebKit/android/nav/CachedNode.h
+++ b/WebKit/android/nav/CachedNode.h
@@ -1,18 +1,27 @@
-/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 CachedNode_H
#define CachedNode_H
diff --git a/WebKit/android/nav/CachedNodeType.h b/WebKit/android/nav/CachedNodeType.h
index 93f4345..07346ac 100644
--- a/WebKit/android/nav/CachedNodeType.h
+++ b/WebKit/android/nav/CachedNodeType.h
@@ -1,18 +1,27 @@
/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 CachedNodeType_H
#define CachedNodeType_H
diff --git a/WebKit/android/nav/CachedPrefix.h b/WebKit/android/nav/CachedPrefix.h
index 0d0695b..b466771 100644
--- a/WebKit/android/nav/CachedPrefix.h
+++ b/WebKit/android/nav/CachedPrefix.h
@@ -1,18 +1,27 @@
/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 CachedPrefix_H
#define CachedPrefix_H
diff --git a/WebKit/android/nav/CachedRoot.cpp b/WebKit/android/nav/CachedRoot.cpp
index 38f1477..8e0833d 100644
--- a/WebKit/android/nav/CachedRoot.cpp
+++ b/WebKit/android/nav/CachedRoot.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2007, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "CachedPrefix.h"
diff --git a/WebKit/android/nav/CachedRoot.h b/WebKit/android/nav/CachedRoot.h
index a242129..85ddf95 100644
--- a/WebKit/android/nav/CachedRoot.h
+++ b/WebKit/android/nav/CachedRoot.h
@@ -1,18 +1,27 @@
-/*
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 CachedRoot_H
#define CachedRoot_H
diff --git a/WebKit/android/nav/FindCanvas.cpp b/WebKit/android/nav/FindCanvas.cpp
index 60a7486..61bb07e 100644
--- a/WebKit/android/nav/FindCanvas.cpp
+++ b/WebKit/android/nav/FindCanvas.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "config.h"
diff --git a/WebKit/android/nav/FindCanvas.h b/WebKit/android/nav/FindCanvas.h
index 5558c8b..4ecbf37 100644
--- a/WebKit/android/nav/FindCanvas.h
+++ b/WebKit/android/nav/FindCanvas.h
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 Find_Canvas_h
diff --git a/WebKit/android/nav/SelectText.cpp b/WebKit/android/nav/SelectText.cpp
index aaf0b61..7bdbf14 100644
--- a/WebKit/android/nav/SelectText.cpp
+++ b/WebKit/android/nav/SelectText.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "webcoreglue"
diff --git a/WebKit/android/nav/SelectText.h b/WebKit/android/nav/SelectText.h
index ba0b089..b991198 100644
--- a/WebKit/android/nav/SelectText.h
+++ b/WebKit/android/nav/SelectText.h
@@ -1,18 +1,26 @@
/*
- *
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 SELECT_TEXT_H
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp
index 63c6aeb..2a11490 100644
--- a/WebKit/android/nav/WebView.cpp
+++ b/WebKit/android/nav/WebView.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2007 The Android Open Source Project
+ * Copyright 2007, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "webviewglue"
diff --git a/WebKit/android/plugins/ANPCanvasInterface.cpp b/WebKit/android/plugins/ANPCanvasInterface.cpp
index fe7981a..96498ef 100644
--- a/WebKit/android/plugins/ANPCanvasInterface.cpp
+++ b/WebKit/android/plugins/ANPCanvasInterface.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
// must include config.h first for webkit to fiddle with new/delete
diff --git a/WebKit/android/plugins/ANPKeyCodes.h b/WebKit/android/plugins/ANPKeyCodes.h
index 0e58ef6..5213f57 100644
--- a/WebKit/android/plugins/ANPKeyCodes.h
+++ b/WebKit/android/plugins/ANPKeyCodes.h
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 ANPKeyCodes_DEFINED
diff --git a/WebKit/android/plugins/ANPLogInterface.cpp b/WebKit/android/plugins/ANPLogInterface.cpp
index 7604b5c..6ccca0a 100644
--- a/WebKit/android/plugins/ANPLogInterface.cpp
+++ b/WebKit/android/plugins/ANPLogInterface.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "plugin"
diff --git a/WebKit/android/plugins/ANPPaintInterface.cpp b/WebKit/android/plugins/ANPPaintInterface.cpp
index a539d4a..2a74b7f 100644
--- a/WebKit/android/plugins/ANPPaintInterface.cpp
+++ b/WebKit/android/plugins/ANPPaintInterface.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
// must include config.h first for webkit to fiddle with new/delete
diff --git a/WebKit/android/plugins/ANPSoundInterface.cpp b/WebKit/android/plugins/ANPSoundInterface.cpp
index 74735f8..9b7d8d0 100644
--- a/WebKit/android/plugins/ANPSoundInterface.cpp
+++ b/WebKit/android/plugins/ANPSoundInterface.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
// must include config.h first for webkit to fiddle with new/delete
diff --git a/WebKit/android/plugins/ANPTypefaceInterface.cpp b/WebKit/android/plugins/ANPTypefaceInterface.cpp
index b95ad58..5878f3f 100644
--- a/WebKit/android/plugins/ANPTypefaceInterface.cpp
+++ b/WebKit/android/plugins/ANPTypefaceInterface.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
// must include config.h first for webkit to fiddle with new/delete
diff --git a/WebKit/android/plugins/ANPWindowInterface.cpp b/WebKit/android/plugins/ANPWindowInterface.cpp
index d83d9db..4aa862b 100644
--- a/WebKit/android/plugins/ANPWindowInterface.cpp
+++ b/WebKit/android/plugins/ANPWindowInterface.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
// must include config.h first for webkit to fiddle with new/delete
diff --git a/WebKit/android/plugins/PluginDataAndroid.cpp b/WebKit/android/plugins/PluginDataAndroid.cpp
deleted file mode 100644
index c3f3f3a..0000000
--- a/WebKit/android/plugins/PluginDataAndroid.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- Copyright (C) 2008 Trolltech ASA
- Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "config.h"
-#include "PluginData.h"
-
-#include "PluginDatabase.h"
-#include "PluginPackage.h"
-
-namespace WebCore {
-
-void PluginData::initPlugins()
-{
- PluginDatabase *db = PluginDatabase::installedPlugins();
- const Vector<PluginPackage*> &plugins = db->plugins();
-
- for (unsigned int i = 0; i < plugins.size(); ++i) {
- PluginInfo* info = new PluginInfo;
- PluginPackage* package = plugins[i];
-
- info->name = package->name();
- info->file = package->fileName();
- info->desc = package->description();
-
- const MIMEToDescriptionsMap& mimeToDescriptions = package->mimeToDescriptions();
- MIMEToDescriptionsMap::const_iterator end = mimeToDescriptions.end();
- for (MIMEToDescriptionsMap::const_iterator it = mimeToDescriptions.begin(); it != end; ++it) {
- MimeClassInfo* mime = new MimeClassInfo;
- info->mimes.append(mime);
-
- mime->type = it->first;
- mime->desc = it->second;
- mime->plugin = info;
-
- Vector<String> extensions = package->mimeToExtensions().get(mime->type);
-
- for (unsigned i = 0; i < extensions.size(); i++) {
- if (i > 0)
- mime->suffixes += ",";
-
- mime->suffixes += extensions[i];
- }
- }
-
- m_plugins.append(info);
- }
-}
-
-void PluginData::refresh()
-{
- PluginDatabase *db = PluginDatabase::installedPlugins();
- db->refresh();
-}
-
-};
diff --git a/WebKit/android/plugins/PluginDebugAndroid.h b/WebKit/android/plugins/PluginDebugAndroid.h
index 4bbe7a9..992e953 100644
--- a/WebKit/android/plugins/PluginDebugAndroid.h
+++ b/WebKit/android/plugins/PluginDebugAndroid.h
@@ -1,25 +1,33 @@
-#ifdef ANDROID_PLUGINS
-
/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+ * Copyright 2008, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 PLUGIN_DEBUG_ANDROID_H__
#define PLUGIN_DEBUG_ANDROID_H__
+#ifdef ANDROID_PLUGINS
+
// Define PLUGIN_DEBUG_LOCAL in an individual C++ file to enable for
// that file only.
@@ -33,6 +41,6 @@
# define PLUGIN_LOG(A, B...) do { } while(0)
#endif
-#endif // defined(PLUGIN_DEBUG_ANDROID_H__)
-
#endif
+
+#endif // defined(PLUGIN_DEBUG_ANDROID_H__)
diff --git a/WebKit/android/plugins/PluginPackageAndroid.cpp b/WebKit/android/plugins/PluginPackageAndroid.cpp
deleted file mode 100644
index 5df7945..0000000
--- a/WebKit/android/plugins/PluginPackageAndroid.cpp
+++ /dev/null
@@ -1,580 +0,0 @@
-#ifdef ANDROID_PLUGINS
-
-/*
- * Copyright (C) 2006, 2007 Apple 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.
- */
-#define LOG_TAG "WebKit"
-
-#include "config.h"
-#include "PluginDatabase.h"
-#include "PluginPackage.h"
-
-#include "Timer.h"
-#include "PlatformString.h"
-#include "PluginMainThreadScheduler.h"
-#include "CString.h"
-#include "jni_utility.h"
-#include "npruntime_impl.h"
-#include "npfunctions.h"
-#include <dlfcn.h>
-#include <errno.h>
-
-#include "PluginDebug.h"
-#include "PluginDebugAndroid.h"
-
-namespace WebCore {
-
-// Simple class which calls dlclose() on a dynamic library when going
-// out of scope. Call ok() if the handle should stay open.
-class DynamicLibraryCloser
-{
- public:
- DynamicLibraryCloser(PlatformModule *module) : m_module(module) { }
- ~DynamicLibraryCloser()
- {
- // Close the library if non-NULL reference and open.
- if (m_module && *m_module)
- {
- dlclose(*m_module);
- *m_module = 0;
- }
- }
- void ok() { m_module = NULL; }
-
- private:
- PlatformModule *m_module;
-};
-
-// A container for a dummy npp instance. This is used to allow
-// NPN_PluginThreadAsyncCall() to be used with NULL passed as the npp
-// instance. This is substituted instead, and is shared between all
-// plugins which behave in this way. This will be lazily created in
-// the first call to NPN_PluginThreadAsyncCall().
-class DummyNpp {
- public:
- DummyNpp() {
- m_npp = new NPP_t();
- m_npp->pdata = NULL;
- m_npp->ndata = NULL;
- PluginMainThreadScheduler::scheduler().registerPlugin(m_npp);
- }
- ~DummyNpp() {
- PluginMainThreadScheduler::scheduler().unregisterPlugin(m_npp);
- delete m_npp;
- }
- NPP_t *getInstance() { return m_npp; }
-
- private:
- NPP_t *m_npp;
-};
-
-static bool getEntryPoint(PlatformModule module,
- const char *name,
- void **entry_point)
-{
- dlerror();
- *entry_point = dlsym(module, name);
- const char *error = dlerror();
- if(error == NULL && *entry_point != NULL) {
- return true;
- } else {
- PLUGIN_LOG("Couldn't get entry point \"%s\": %s\n",
- name, error);
- return false;
- }
-}
-
-int PluginPackage::compareFileVersion(
- const PlatformModuleVersion& compareVersion) const
-{
- // return -1, 0, or 1 if plug-in version is less than, equal to,
- // or greater than the passed version
- if (m_moduleVersion != compareVersion)
- return m_moduleVersion > compareVersion ? 1 : -1;
- else
- return 0;
-}
-
-bool PluginPackage::isPluginBlacklisted()
-{
- // No blacklisted Android plugins... yet!
- return false;
-}
-
-void PluginPackage::determineQuirks(const String& mimeType)
-{
- // The Gears implementation relies on it being loaded *all the time*,
- // so check to see if this package represents the Gears plugin and
- // load it.
- if (mimeType == "application/x-googlegears") {
- m_quirks.add(PluginQuirkDontUnloadPlugin);
- }
-}
-
-static void Android_NPN_PluginThreadAsyncCall(NPP instance,
- void (*func) (void *),
- void *userData)
-{
- // Translate all instance == NULL to a dummy actual npp.
- static DummyNpp dummyNpp;
- if (instance == NULL) {
- instance = dummyNpp.getInstance();
- }
- // Call through to the wrapped function.
- NPN_PluginThreadAsyncCall(instance, func, userData);
-}
-
-static void initializeBrowserFuncs(NPNetscapeFuncs *funcs)
-{
- // Initialize the NPN function pointers that we hand over to the
- // plugin.
- memset(funcs, 0, sizeof(*funcs));
-
- funcs->size = sizeof(*funcs);
- funcs->version = NP_VERSION_MINOR;
- funcs->geturl = NPN_GetURL;
- funcs->posturl = NPN_PostURL;
- funcs->requestread = NPN_RequestRead;
- funcs->newstream = NPN_NewStream;
- funcs->write = NPN_Write;
- funcs->destroystream = NPN_DestroyStream;
- funcs->status = NPN_Status;
- funcs->uagent = NPN_UserAgent;
- funcs->memalloc = NPN_MemAlloc;
- funcs->memfree = NPN_MemFree;
- funcs->memflush = NPN_MemFlush;
- funcs->reloadplugins = NPN_ReloadPlugins;
- funcs->geturlnotify = NPN_GetURLNotify;
- funcs->posturlnotify = NPN_PostURLNotify;
- funcs->getvalue = NPN_GetValue;
- funcs->setvalue = NPN_SetValue;
- funcs->invalidaterect = NPN_InvalidateRect;
- funcs->invalidateregion = NPN_InvalidateRegion;
- funcs->forceredraw = NPN_ForceRedraw;
- funcs->getJavaEnv = NPN_GetJavaEnv;
- funcs->getJavaPeer = NPN_GetJavaPeer;
- funcs->pushpopupsenabledstate = NPN_PushPopupsEnabledState;
- funcs->poppopupsenabledstate = NPN_PopPopupsEnabledState;
- funcs->pluginthreadasynccall = Android_NPN_PluginThreadAsyncCall;
- funcs->scheduletimer = NPN_ScheduleTimer;
- funcs->unscheduletimer = NPN_UnscheduleTimer;
-
- funcs->releasevariantvalue = _NPN_ReleaseVariantValue;
- funcs->getstringidentifier = _NPN_GetStringIdentifier;
- funcs->getstringidentifiers = _NPN_GetStringIdentifiers;
- funcs->getintidentifier = _NPN_GetIntIdentifier;
- funcs->identifierisstring = _NPN_IdentifierIsString;
- funcs->utf8fromidentifier = _NPN_UTF8FromIdentifier;
- funcs->intfromidentifier = _NPN_IntFromIdentifier;
- funcs->createobject = _NPN_CreateObject;
- funcs->retainobject = _NPN_RetainObject;
- funcs->releaseobject = _NPN_ReleaseObject;
- funcs->invoke = _NPN_Invoke;
- funcs->invokeDefault = _NPN_InvokeDefault;
- funcs->evaluate = _NPN_Evaluate;
- funcs->getproperty = _NPN_GetProperty;
- funcs->setproperty = _NPN_SetProperty;
- funcs->removeproperty = _NPN_RemoveProperty;
- funcs->hasproperty = _NPN_HasProperty;
- funcs->hasmethod = _NPN_HasMethod;
- funcs->setexception = _NPN_SetException;
- funcs->enumerate = _NPN_Enumerate;
-}
-
-static jobject createPluginObject(const char *name,
- const char *path,
- const char *fileName,
- const char *description)
-{
- JNIEnv *env = JSC::Bindings::getJNIEnv();
- // Create a Java "class Plugin" object instance
- jclass pluginClass = env->FindClass("android/webkit/Plugin");
- if(!pluginClass) {
- PLUGIN_LOG("Couldn't find class android.webkit.Plugin\n");
- return 0;
- }
- // Get Plugin(String, String, String, String, Context)
- jmethodID pluginConstructor = env->GetMethodID(
- pluginClass,
- "<init>",
- "(Ljava/lang/String;"
- "Ljava/lang/String;"
- "Ljava/lang/String;"
- "Ljava/lang/String;)V");
- if(!pluginConstructor) {
- PLUGIN_LOG("Couldn't get android.webkit.Plugin constructor\n");
- return 0;
- }
- // Make Java strings of name, path, fileName, description
- jstring javaName = env->NewStringUTF(name);
- jstring javaPath = env->NewStringUTF(path);
- jstring javaFileName = env->NewStringUTF(fileName);
- jstring javaDescription = env->NewStringUTF(description);
- // Make a plugin instance
- jobject pluginObject = env->NewObject(pluginClass,
- pluginConstructor,
- javaName,
- javaPath,
- javaFileName,
- javaDescription);
- return pluginObject;
-}
-
-static jobject getPluginListObject()
-{
- JNIEnv *env = JSC::Bindings::getJNIEnv();
- // Get WebView.getPluginList()
- jclass webViewClass = env->FindClass("android/webkit/WebView");
- if(!webViewClass) {
- PLUGIN_LOG("Couldn't find class android.webkit.WebView\n");
- return 0;
- }
- jmethodID getPluginList = env->GetStaticMethodID(
- webViewClass,
- "getPluginList",
- "()Landroid/webkit/PluginList;");
- if(!getPluginList) {
- PLUGIN_LOG("Couldn't find android.webkit.WebView.getPluginList()\n");
- return 0;
- }
- // Get the PluginList instance
- jobject pluginListObject = env->CallStaticObjectMethod(webViewClass,
- getPluginList);
- if(!pluginListObject) {
- PLUGIN_LOG("Couldn't get PluginList object\n");
- return 0;
- }
- return pluginListObject;
-}
-
-static bool addPluginObjectToList(jobject pluginList, jobject plugin)
-{
- // Add the Plugin object
- JNIEnv *env = JSC::Bindings::getJNIEnv();
- jclass pluginListClass = env->FindClass("android/webkit/PluginList");
- if(!pluginListClass) {
- PLUGIN_LOG("Couldn't find class android.webkit.PluginList\n");
- return false;
- }
- jmethodID addPlugin = env->GetMethodID(
- pluginListClass,
- "addPlugin",
- "(Landroid/webkit/Plugin;)V");
- if(!addPlugin) {
- PLUGIN_LOG("Couldn't find android.webkit.PluginList.addPlugin()\n");
- return false;
- }
- env->CallVoidMethod(pluginList, addPlugin, plugin);
- return true;
-}
-
-static void removePluginObjectFromList(jobject pluginList, jobject plugin)
-{
- // Remove the Plugin object
- JNIEnv *env = JSC::Bindings::getJNIEnv();
- jclass pluginListClass = env->FindClass("android/webkit/PluginList");
- if(!pluginListClass) {
- PLUGIN_LOG("Couldn't find class android.webkit.PluginList\n");
- return;
- }
- jmethodID removePlugin = env->GetMethodID(
- pluginListClass,
- "removePlugin",
- "(Landroid/webkit/Plugin;)V");
- if(!removePlugin) {
- PLUGIN_LOG("Couldn't find android.webkit.PluginList.removePlugin()\n");
- return;
- }
- env->CallVoidMethod(pluginList, removePlugin, plugin);
-}
-
-bool PluginPackage::load()
-{
- PLUGIN_LOG("tid:%d isActive:%d isLoaded:%d loadCount:%d\n",
- gettid(),
- m_freeLibraryTimer.isActive(),
- m_isLoaded,
- m_loadCount);
- if (m_freeLibraryTimer.isActive()) {
- ASSERT(m_module);
- m_freeLibraryTimer.stop();
- } else if (m_isLoaded) {
- if (m_quirks.contains(PluginQuirkDontAllowMultipleInstances))
- return false;
- m_loadCount++;
- PLUGIN_LOG("Already loaded, count now %d\n", m_loadCount);
- return true;
- }
- ASSERT(m_loadCount == 0);
- ASSERT(m_module == NULL);
-
- PLUGIN_LOG("Loading \"%s\"\n", m_path.utf8().data());
-
- // Open the library
- void *handle = dlopen(m_path.utf8().data(), RTLD_NOW);
- if(!handle) {
- PLUGIN_LOG("Couldn't load plugin library \"%s\": %s\n",
- m_path.utf8().data(), dlerror());
- return false;
- }
- m_module = handle;
- PLUGIN_LOG("Fetch Info Loaded %p\n", m_module);
- // This object will call dlclose() and set m_module to NULL
- // when going out of scope.
- DynamicLibraryCloser dlCloser(&m_module);
-
-
- NP_InitializeFuncPtr NP_Initialize;
- if(!getEntryPoint(m_module, "NP_Initialize", (void **) &NP_Initialize) ||
- !getEntryPoint(handle, "NP_Shutdown", (void **) &m_NPP_Shutdown)) {
- PLUGIN_LOG("Couldn't find Initialize function\n");
- return false;
- }
-
- // Provide the plugin with our browser function table and grab its
- // plugin table. Provide the Java environment and the Plugin which
- // can be used to override the defaults if the plugin wants.
- initializeBrowserFuncs(&m_browserFuncs);
- memset(&m_pluginFuncs, 0, sizeof(m_pluginFuncs));
- m_pluginFuncs.size = sizeof(m_pluginFuncs);
- if(NP_Initialize(&m_browserFuncs,
- &m_pluginFuncs,
- JSC::Bindings::getJNIEnv(),
- m_pluginObject) != NPERR_NO_ERROR) {
- PLUGIN_LOG("Couldn't initialize plugin\n");
- return false;
- }
-
- // Don't close the library - loaded OK.
- dlCloser.ok();
- // Retain the handle so we can close it in the future.
- m_module = handle;
- m_isLoaded = true;
- ++m_loadCount;
- PLUGIN_LOG("Initial load ok, count now %d\n", m_loadCount);
- return true;
-}
-
-void PluginPackage::unregisterPluginObject()
-{
- PLUGIN_LOG("unregisterPluginObject\n");
- // Called by unloadWithoutShutdown(). Remove the plugin from the
- // PluginList
- if(m_pluginObject) {
- jobject pluginListObject = getPluginListObject();
- if(pluginListObject) {
- removePluginObjectFromList(pluginListObject, m_pluginObject);
- }
- // Remove a reference to the Plugin object so it can
- // garbage collect.
- JSC::Bindings::getJNIEnv()->DeleteGlobalRef(m_pluginObject);
- m_pluginObject = 0;
- }
-}
-
-bool PluginPackage::fetchInfo()
-{
- PLUGIN_LOG("Fetch Info Loading \"%s\"\n", m_path.utf8().data());
-
- // Open the library
- void *handle = dlopen(m_path.utf8().data(), RTLD_NOW);
- if(!handle) {
- PLUGIN_LOG("Couldn't load plugin library \"%s\": %s\n",
- m_path.utf8().data(), dlerror());
- return false;
- }
- PLUGIN_LOG("Fetch Info Loaded %p\n", handle);
-
- // This object will call dlclose() and set m_module to NULL
- // when going out of scope.
- DynamicLibraryCloser dlCloser(&handle);
-
- // Get the three entry points we need for Linux Netscape Plug-ins
- NP_GetMIMEDescriptionFuncPtr NP_GetMIMEDescription;
- NPP_GetValueProcPtr NP_GetValue;
- if(!getEntryPoint(handle, "NP_GetMIMEDescription",
- (void **) &NP_GetMIMEDescription) ||
- !getEntryPoint(handle, "NP_GetValue", (void **) &NP_GetValue)) {
- // If any of those failed to resolve, fail the entire load
- return false;
- }
-
- // Get the plugin name and description using NP_GetValue
- const char *name;
- const char *description;
- if(NP_GetValue(NULL, NPPVpluginNameString, &name) != NPERR_NO_ERROR ||
- NP_GetValue(NULL, NPPVpluginDescriptionString, &description) !=
- NPERR_NO_ERROR) {
- PLUGIN_LOG("Couldn't get name/description using NP_GetValue\n");
- return false;
- }
-
- PLUGIN_LOG("Plugin name: \"%s\"\n", name);
- PLUGIN_LOG("Plugin description: \"%s\"\n", description);
- m_name = name;
- m_description = description;
-
- // fileName is just the trailing part of the path
- int last_slash = m_path.reverseFind('/');
- if(last_slash < 0)
- m_fileName = m_path;
- else
- m_fileName = m_path.substring(last_slash + 1);
-
- // Grab the MIME description. This is in the format, e.g:
- // application/x-somescriptformat:ssf:Some Script Format
- String mimeDescription(NP_GetMIMEDescription());
- PLUGIN_LOG("MIME description: \"%s\"\n", mimeDescription.utf8().data());
- // Clear out the current mappings.
- m_mimeToDescriptions.clear();
- m_mimeToExtensions.clear();
- // Split the description into its component entries, separated by
- // semicolons.
- Vector<String> mimeEntries;
- mimeDescription.split(';', true, mimeEntries);
- // Iterate through the entries, adding them to the MIME mappings.
- for(Vector<String>::const_iterator it = mimeEntries.begin();
- it != mimeEntries.end(); ++it) {
- // Each part is split into 3 fields separated by colons
- // Field 1 is the MIME type (e.g "application/x-shockwave-flash").
- // Field 2 is a comma separated list of file extensions.
- // Field 3 is a human readable short description.
- const String &mimeEntry = *it;
- Vector<String> fields;
- mimeEntry.split(':', true, fields);
- if(fields.size() != 3) {
- PLUGIN_LOG("Bad MIME entry \"%s\"\n", mimeEntry.utf8().data());
- return false;
- }
-
- const String& mimeType = fields[0];
- Vector<String> extensions;
- fields[1].split(',', true, extensions);
- const String& description = fields[2];
-
- determineQuirks(mimeType);
-
- PLUGIN_LOG("mime_type: \"%s\"\n", mimeType.utf8().data());
- PLUGIN_LOG("extensions: \"%s\"\n", fields[1].utf8().data());
- PLUGIN_LOG("description: \"%s\"\n", description.utf8().data());
-
- // Map the mime type to the vector of extensions and the description
- if(!extensions.isEmpty())
- m_mimeToExtensions.set(mimeType, extensions);
- if(!description.isEmpty())
- m_mimeToDescriptions.set(mimeType, description);
- }
-
- // Create a new Java Plugin object, this object is an instance of
- // android.os.WebView.Plugin
- CString path = m_path.utf8();
- CString filename = m_fileName.utf8();
- jobject pluginObject = createPluginObject(name,
- path.data(),
- filename.data(),
- description);
- if(!pluginObject) {
- PLUGIN_LOG("Couldn't create Java Plugin\n");
- return false;
- }
-
- // Add the Plugin to the PluginList. This list is used to show the
- // user the list of plugins installed in the webkit.
-
- // The list of plugins are also available from the global static
- // function PluginDatabase::installedPlugins(). However, the method
- // on WebView to get the plugin list is a static method, and runs in the
- // UI thread. We can not easily drop all the GlobalRefs this implementation
- // has and switch to just calling through JNI to aforementioned API as
- // WebKit runs in another thread and the WebView call would need to change
- // to being async.
- jobject pluginListObject = getPluginListObject();
- if(!pluginListObject) {
- PLUGIN_LOG("Couldn't get PluginList object\n");
- return false;
- }
- if(!addPluginObjectToList(pluginListObject, pluginObject)) {
- PLUGIN_LOG("Couldn't add Plugin to PluginList\n");
- m_NPP_Shutdown();
- return false;
- }
-
- // Retain the Java Plugin object
- m_pluginObject = JSC::Bindings::getJNIEnv()->NewGlobalRef(pluginObject);
-
- PLUGIN_LOG("Fetch Info Loaded plugin details ok \"%s\"\n",
- m_path.utf8().data());
-
- // If this plugin needs to be kept in memory, unload the module now
- // and load it permanently.
- if (m_quirks.contains(PluginQuirkDontUnloadPlugin)) {
- dlCloser.ok();
- dlclose(handle);
- load();
- }
-
- // dlCloser will unload the plugin if required.
- return true;
-}
-
-unsigned PluginPackage::hash() const
-{
- const unsigned hashCodes[] = {
- m_name.impl()->hash(),
- m_description.impl()->hash(),
- m_mimeToExtensions.size(),
- };
-
- return StringImpl::computeHash(reinterpret_cast<const UChar*>(hashCodes),
- sizeof(hashCodes) / sizeof(UChar));
-}
-
-bool PluginPackage::equal(const PluginPackage& a, const PluginPackage& b)
-{
- if (a.m_name != b.m_name)
- return false;
-
- if (a.m_description != b.m_description)
- return false;
-
- if (a.m_mimeToExtensions.size() != b.m_mimeToExtensions.size())
- return false;
-
- MIMEToExtensionsMap::const_iterator::Keys end =
- a.m_mimeToExtensions.end().keys();
- for (MIMEToExtensionsMap::const_iterator::Keys it =
- a.m_mimeToExtensions.begin().keys();
- it != end;
- ++it) {
- if (!b.m_mimeToExtensions.contains(*it)) {
- return false;
- }
- }
-
- return true;
-}
-
-} // namespace WebCore
-
-#endif
diff --git a/WebKit/android/plugins/PluginTimer.cpp b/WebKit/android/plugins/PluginTimer.cpp
index ca24de0..1097330 100644
--- a/WebKit/android/plugins/PluginTimer.cpp
+++ b/WebKit/android/plugins/PluginTimer.cpp
@@ -1,4 +1,5 @@
/*
+ * Copyright 2009, The Android Open Source Project
* Copyright (C) 2008 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/WebKit/android/plugins/PluginTimer.h b/WebKit/android/plugins/PluginTimer.h
index 8570913..ccb49da 100644
--- a/WebKit/android/plugins/PluginTimer.h
+++ b/WebKit/android/plugins/PluginTimer.h
@@ -1,4 +1,5 @@
/*
+ * Copyright 2009, The Android Open Source Project
* Copyright (C) 2008 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/WebKit/android/plugins/PluginViewAndroid.cpp b/WebKit/android/plugins/PluginViewAndroid.cpp
deleted file mode 100644
index c20c0d8..0000000
--- a/WebKit/android/plugins/PluginViewAndroid.cpp
+++ /dev/null
@@ -1,568 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Apple 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.
- */
-#define LOG_TAG "WebCore"
-
-#include "config.h"
-#include "PluginView.h"
-
-#include "Document.h"
-#include "Element.h"
-#include "EventNames.h"
-#include "FrameLoader.h"
-#include "FrameLoadRequest.h"
-#include "FrameTree.h"
-#include "Frame.h"
-#include "FrameView.h"
-#include "GraphicsContext.h"
-#include "HTMLNames.h"
-#include "HTMLPlugInElement.h"
-#include "Image.h"
-#include "KeyboardEvent.h"
-#include "MIMETypeRegistry.h"
-#include "MouseEvent.h"
-#include "NotImplemented.h"
-#include "Page.h"
-#include "PlatformGraphicsContext.h"
-#include "PlatformKeyboardEvent.h"
-#include "PluginMainThreadScheduler.h"
-#include "PluginPackage.h"
-// #include "kjs_binding.h"
-// #include "kjs_proxy.h"
-#include "android_graphics.h"
-#include "SkCanvas.h"
-#include "npruntime_impl.h"
-#include "runtime_root.h"
-#include "utils/SystemClock.h"
-#include "ScriptController.h"
-#include "Settings.h"
-#include <runtime/JSLock.h>
-// #include <kjs/value.h>
-#include <wtf/ASCIICType.h>
-#include "runtime.h"
-#include "WebViewCore.h"
-
-#include "PluginDebug.h"
-#include "PluginDebugAndroid.h"
-#include "PluginViewBridgeAndroid.h"
-#include "PluginWidgetAndroid.h"
-
-#include "android_npapi.h"
-#include "SkANP.h"
-#include "SkFlipPixelRef.h"
-
-///////////////////////////////////////////////////////////////////////////////
-
-extern void ANPAudioTrackInterfaceV0_Init(ANPInterface* value);
-extern void ANPCanvasInterfaceV0_Init(ANPInterface* value);
-extern void ANPLogInterfaceV0_Init(ANPInterface* value);
-extern void ANPOffscreenInterfaceV0_Init(ANPInterface* value);
-extern void ANPPaintInterfaceV0_Init(ANPInterface* value);
-extern void ANPTypefaceInterfaceV0_Init(ANPInterface* value);
-extern void ANPWindowInterfaceV0_Init(ANPInterface* value);
-
-struct VarProcPair {
- int enumValue;
- size_t size;
- void (*proc)(ANPInterface*);
-};
-
-#define VARPROCLINE(name) \
- k##name##_ANPGetValue, sizeof(ANP##name), ANP##name##_Init
-
-static const VarProcPair gVarProcs[] = {
- { VARPROCLINE(AudioTrackInterfaceV0) },
- { VARPROCLINE(LogInterfaceV0) },
- { VARPROCLINE(CanvasInterfaceV0) },
- { VARPROCLINE(PaintInterfaceV0) },
- { VARPROCLINE(TypefaceInterfaceV0) },
- { VARPROCLINE(WindowInterfaceV0) },
-};
-
-/* return true if var was an interface request (error will be set accordingly)
- return false if var is not a recognized interface (and ignore error param)
- */
-static bool anp_getInterface(NPNVariable var, void* value, NPError* error) {
- const VarProcPair* iter = gVarProcs;
- const VarProcPair* stop = gVarProcs + SK_ARRAY_COUNT(gVarProcs);
- while (iter < stop) {
- if (iter->enumValue == var) {
- ANPInterface* i = reinterpret_cast<ANPInterface*>(value);
- if (i->inSize < iter->size) {
- SkDebugf("------- interface %d, expected size %d, allocated %d\n",
- var, iter->size, i->inSize);
- *error = NPERR_INCOMPATIBLE_VERSION_ERROR;
- } else {
- iter->proc(i);
- *error = NPERR_NO_ERROR;
- }
- return true;
- }
- iter += 1;
- }
- SkDebugf("------ unknown NPNVariable %d\n", var);
- return false;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-using JSC::ExecState;
-using JSC::Interpreter;
-using JSC::JSLock;
-using JSC::JSObject;
-using JSC::JSValue;
-using JSC::UString;
-
-using std::min;
-
-using namespace WTF;
-
-namespace WebCore {
-
-using namespace HTMLNames;
-
-void PluginView::platformInit()
-{
- setPlatformWidget(new PluginViewBridgeAndroid());
-
- m_isWindowed = false; // we don't support windowed yet
-
- m_window = new PluginWidgetAndroid(this);
-
- m_npWindow.type = NPWindowTypeDrawable;
- m_npWindow.window = 0;
-}
-
-PluginView::~PluginView()
-{
- stop();
-
- deleteAllValues(m_requests);
-
- freeStringArray(m_paramNames, m_paramCount);
- freeStringArray(m_paramValues, m_paramCount);
-
- m_parentFrame->script()->cleanupScriptObjectsForPlugin(this);
-
-// Since we have no legacy plugins to check, we ignore the quirks check
-// if (m_plugin && !m_plugin->quirks().contains(PluginQuirkDontUnloadPlugin))
- if (m_plugin) {
- m_plugin->unload();
- }
- delete m_window;
-}
-
-void PluginView::init()
-{
- if (m_haveInitialized)
- return;
- m_haveInitialized = true;
-
- android::WebViewCore* c = android::WebViewCore::getWebViewCore(this->parent());
- m_window->init(c);
-
- if (!m_plugin) {
- ASSERT(m_status == PluginStatusCanNotFindPlugin);
- return;
- }
-
- if (!m_plugin->load()) {
- m_plugin = 0;
- m_status = PluginStatusCanNotLoadPlugin;
- return;
- }
-
- if (!start()) {
- m_status = PluginStatusCanNotLoadPlugin;
- return;
- }
-
- m_status = PluginStatusLoadedSuccessfully;
-}
-
-void PluginView::handleMouseEvent(MouseEvent* event)
-{
- const AtomicString& type = event->type();
- bool isDown = (eventNames().mousedownEvent == type);
- bool isUp = (eventNames().mouseupEvent == type);
- if (!isDown && !isUp) {
- return;
- }
-
- ANPEvent evt;
- SkANP::InitEvent(&evt, kTouch_ANPEventType);
-
- evt.data.touch.action = isDown ? kDown_ANPTouchAction : kUp_ANPTouchAction;
- evt.data.touch.modifiers = 0; // todo
- // these are relative to plugin
- evt.data.touch.x = event->pageX() - m_npWindow.x;
- evt.data.touch.y = event->pageY() - m_npWindow.y;
- if (m_plugin->pluginFuncs()->event(m_instance, &evt)) {
- event->setDefaultHandled();
- }
-}
-
-static ANPKeyModifier make_modifiers(bool shift, bool alt) {
- ANPKeyModifier mod = 0;
- if (shift) {
- mod |= kShift_ANPKeyModifier;
- }
- if (alt) {
- mod |= kAlt_ANPKeyModifier;
- }
- return mod;
-}
-
-void PluginView::handleKeyboardEvent(KeyboardEvent* event)
-{
- const PlatformKeyboardEvent* pke = event->keyEvent();
- if (NULL == pke) {
- return;
- }
-
- ANPEvent evt;
- SkANP::InitEvent(&evt, kKey_ANPEventType);
-
- switch (pke->type()) {
- case PlatformKeyboardEvent::KeyDown:
-#ifdef TRACE_KEY_EVENTS
- SkDebugf("--------- KeyDown, ignore\n");
-#endif
- return;
- case PlatformKeyboardEvent::RawKeyDown:
- evt.data.key.action = kDown_ANPKeyAction;
- break;
- case PlatformKeyboardEvent::Char:
-#ifdef TRACE_KEY_EVENTS
- SkDebugf("--------- Char, ignore\n");
-#endif
- return;
- case PlatformKeyboardEvent::KeyUp:
- evt.data.key.action = kUp_ANPKeyAction;
- break;
- default:
-#ifdef TRACE_KEY_EVENTS
- SkDebugf("------ unexpected keyevent type %d\n", pke->type());
-#endif
- return;
- }
- evt.data.key.nativeCode = pke->nativeVirtualKeyCode();
- evt.data.key.virtualCode = pke->windowsVirtualKeyCode();
- evt.data.key.repeatCount = pke->repeatCount();
- evt.data.key.modifiers = make_modifiers(pke->shiftKey(), pke->altKey());
- evt.data.key.unichar = pke->unichar();
-
- if (m_plugin->pluginFuncs()->event(m_instance, &evt)) {
- event->setDefaultHandled();
- }
-}
-
-NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32 len, const char* buf)
-{
- notImplemented();
- return NPERR_GENERIC_ERROR;
-}
-
-NPError PluginView::getValueStatic(NPNVariable variable, void* value)
-{
- // our interface query is valid with no NPP instance
- NPError error = NPERR_GENERIC_ERROR;
- (void)anp_getInterface(variable, value, &error);
- return error;
-}
-
-void PluginView::setParent(ScrollView* parent)
-{
- Widget::setParent(parent);
-
- if (parent)
- init();
-}
-
-void PluginView::setNPWindowRect(const IntRect& rect)
-{
- if (!m_isStarted)
- return;
-
- const int width = rect.width();
- const int height = rect.height();
-
- IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(rect.location());
- m_npWindow.x = p.x();
- m_npWindow.y = p.y();
-
- m_npWindow.width = width;
- m_npWindow.height = height;
-
- m_npWindow.clipRect.left = 0;
- m_npWindow.clipRect.top = 0;
- m_npWindow.clipRect.right = width;
- m_npWindow.clipRect.bottom = height;
-
- if (m_plugin->pluginFuncs()->setwindow) {
- JSC::JSLock::DropAllLocks dropAllLocks(false);
- setCallingPlugin(true);
- m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow);
- setCallingPlugin(false);
- }
-
- m_window->setWindow(m_npWindow.x, m_npWindow.y, width, height,
- m_isTransparent);
-}
-
-void PluginView::stop()
-{
- if (!m_isStarted)
- return;
-
- HashSet<RefPtr<PluginStream> > streams = m_streams;
- HashSet<RefPtr<PluginStream> >::iterator end = streams.end();
- for (HashSet<RefPtr<PluginStream> >::iterator it = streams.begin(); it != end; ++it) {
- (*it)->stop();
- disconnectStream((*it).get());
- }
-
- ASSERT(m_streams.isEmpty());
-
- m_isStarted = false;
-
- JSC::JSLock::DropAllLocks dropAllLocks(false);
-
- PluginMainThreadScheduler::scheduler().unregisterPlugin(m_instance);
-
- // Destroy the plugin
- NPSavedData* savedData = 0;
- setCallingPlugin(true);
- NPError npErr = m_plugin->pluginFuncs()->destroy(m_instance, &savedData);
- setCallingPlugin(false);
- LOG_NPERROR(npErr);
-
- if (savedData) {
- if (savedData->buf)
- NPN_MemFree(savedData->buf);
- NPN_MemFree(savedData);
- }
-
- m_instance->pdata = 0;
-}
-
-const char* PluginView::userAgentStatic()
-{
- return 0;
-}
-
-const char* PluginView::userAgent()
-{
- if (m_userAgent.isNull())
- m_userAgent = m_parentFrame->loader()->userAgent(m_url).utf8();
- return m_userAgent.data();
-}
-
-NPError PluginView::getValue(NPNVariable variable, void* value)
-{
- switch (variable) {
- case NPNVWindowNPObject: {
- NPObject* windowScriptObject =
- m_parentFrame->script()->windowScriptNPObject();
-
- // Return value is expected to be retained, as described
- // here:
- // <http://www.mozilla.org/projects/plugin/npruntime.html>
- if (windowScriptObject)
- _NPN_RetainObject(windowScriptObject);
-
- void** v = (void**)value;
- *v = windowScriptObject;
-
- return NPERR_NO_ERROR;
- }
-
- case NPNVPluginElementNPObject: {
- NPObject* pluginScriptObject = 0;
-
- if (m_element->hasTagName(appletTag) ||
- m_element->hasTagName(embedTag) ||
- m_element->hasTagName(objectTag)) {
- HTMLPlugInElement* pluginElement =
- static_cast<HTMLPlugInElement*>(m_element);
- pluginScriptObject = pluginElement->getNPObject();
- }
-
- // Return value is expected to be retained, as described
- // here:
- // <http://www.mozilla.org/projects/plugin/npruntime.html>
- if (pluginScriptObject)
- _NPN_RetainObject(pluginScriptObject);
-
- void** v = (void**)value;
- *v = pluginScriptObject;
-
- return NPERR_NO_ERROR;
- }
-
- case NPNVnetscapeWindow: {
- // Return the top level WebView Java object associated
- // with this instance.
- jobject *retObject = static_cast<jobject*>(value);
- *retObject = android::WebViewCore::getWebViewCore(parent())->getWebViewJavaObject();
- return NPERR_NO_ERROR;
- }
-
- case kSupportedDrawingModel_ANPGetValue: {
- uint32_t* bits = reinterpret_cast<uint32_t*>(value);
- *bits = (1 << kBitmap_ANPDrawingModel);
- return NPERR_NO_ERROR;
- }
-
- default: {
- NPError error = NPERR_GENERIC_ERROR;
- (void)anp_getInterface(variable, value, &error);
- return error;
- }
- }
-}
-
-NPError PluginView::platformSetValue(NPPVariable variable, void* value)
-{
- NPError error = NPERR_GENERIC_ERROR;
-
- switch (variable) {
- case kRequestDrawingModel_ANPSetValue: {
- ANPDrawingModel model = reinterpret_cast<ANPDrawingModel>(value);
- switch (model) {
- case kBitmap_ANPDrawingModel:
- m_window->setDrawingModel(model);
- error = NPERR_NO_ERROR;
- break;
- default:
- break;
- }
- }
- default:
- break;
- }
- return error;
-}
-
-void PluginView::invalidateRect(const IntRect& r)
-{
- m_window->inval(r, true);
-}
-
-void PluginView::invalidateRect(NPRect* rect)
-{
- IntRect r;
-
- if (rect) {
- r = IntRect(rect->left, rect->top,
- rect->right - rect->left, rect->bottom - rect->top);
- } else {
- r = IntRect(0, 0, m_npWindow.width, m_npWindow.height);
- }
-
- m_window->inval(r, true);
-// android::WebViewCore::getWebViewCore(parent())->contentInvalidate(r);
-}
-
-void PluginView::invalidateRegion(NPRegion region)
-{
- // we don't support/define regions (yet), so do nothing
-}
-
-void PluginView::forceRedraw()
-{
- this->invalidateRect(0);
-}
-
-void PluginView::setFocus()
-{
- Widget::setFocus();
-// SkDebugf("------------- setFocus %p\n", this);
-}
-
-void PluginView::show()
-{
- setSelfVisible(true);
- Widget::show();
-}
-
-void PluginView::hide()
-{
- setSelfVisible(false);
- Widget::hide();
-}
-
-void PluginView::paintMissingPluginIcon(GraphicsContext* context,
- const IntRect& rect)
-{
- static RefPtr<Image> gNullPluginImage;
- if (!gNullPluginImage) {
- gNullPluginImage = Image::loadPlatformResource("nullplugin");
- }
- Image* image = gNullPluginImage.get();
-
- IntRect imageRect(frameRect().x(), frameRect().y(),
- image->width(), image->height());
-
- int xOffset = (frameRect().width() - imageRect.width()) / 2;
- int yOffset = (frameRect().height() - imageRect.height()) / 2;
-
- imageRect.move(xOffset, yOffset);
-
- if (!rect.intersects(imageRect))
- return;
-
- context->drawImage(image, imageRect.location());
-}
-
-void PluginView::paint(GraphicsContext* context, const IntRect& rect)
-{
- if (!m_isStarted) {
- // Draw the "missing plugin" image
- paintMissingPluginIcon(context, rect);
- return;
- }
-
- IntRect frame = frameRect();
- if (!frame.width() || !frame.height()) {
- return;
- }
-
- m_window->inval(rect, false);
- m_window->draw(android_gc2canvas(context));
-}
-
-// new as of SVN 38068, Nov 5 2008
-void PluginView::updatePluginWidget() const
-{
- notImplemented();
-}
-
-// new as of SVN 38068, Nov 5 2008
-void PluginView::setParentVisible(bool) {
- notImplemented();
-}
-
-} // namespace WebCore
-
diff --git a/WebKit/android/plugins/PluginViewBridgeAndroid.cpp b/WebKit/android/plugins/PluginViewBridgeAndroid.cpp
index ba500da..945115a 100644
--- a/WebKit/android/plugins/PluginViewBridgeAndroid.cpp
+++ b/WebKit/android/plugins/PluginViewBridgeAndroid.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "config.h"
diff --git a/WebKit/android/plugins/PluginViewBridgeAndroid.h b/WebKit/android/plugins/PluginViewBridgeAndroid.h
index 6a5a46a..e17a2dc 100644
--- a/WebKit/android/plugins/PluginViewBridgeAndroid.h
+++ b/WebKit/android/plugins/PluginViewBridgeAndroid.h
@@ -1,4 +1,5 @@
/*
+ * Copyright 2009, The Android Open Source Project
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 Collabora Ltd. All rights reserved.
*
diff --git a/WebKit/android/plugins/PluginWidgetAndroid.cpp b/WebKit/android/plugins/PluginWidgetAndroid.cpp
index 9e28756..ea13a0c 100644
--- a/WebKit/android/plugins/PluginWidgetAndroid.cpp
+++ b/WebKit/android/plugins/PluginWidgetAndroid.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "config.h"
diff --git a/WebKit/android/plugins/PluginWidgetAndroid.h b/WebKit/android/plugins/PluginWidgetAndroid.h
index 237b1ae..f5e9363 100644
--- a/WebKit/android/plugins/PluginWidgetAndroid.h
+++ b/WebKit/android/plugins/PluginWidgetAndroid.h
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 PluginWidgetAndroid_H
diff --git a/WebKit/android/plugins/SkANP.cpp b/WebKit/android/plugins/SkANP.cpp
index e39d3eb..276dd8d 100644
--- a/WebKit/android/plugins/SkANP.cpp
+++ b/WebKit/android/plugins/SkANP.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
// must include config.h first for webkit to fiddle with new/delete
diff --git a/WebKit/android/plugins/SkANP.h b/WebKit/android/plugins/SkANP.h
index 0594c45..2389f0d 100644
--- a/WebKit/android/plugins/SkANP.h
+++ b/WebKit/android/plugins/SkANP.h
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 SkANP_DEFINED
diff --git a/WebKit/android/plugins/android_npapi.h b/WebKit/android/plugins/android_npapi.h
index 1640168..8b05d0a 100644
--- a/WebKit/android/plugins/android_npapi.h
+++ b/WebKit/android/plugins/android_npapi.h
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
/* Defines the android-specific types and functions as part of npapi
diff --git a/WebKit/android/plugins/sample/Android.mk b/WebKit/android/plugins/sample/Android.mk
index a2f7747..328ddc5 100644
--- a/WebKit/android/plugins/sample/Android.mk
+++ b/WebKit/android/plugins/sample/Android.mk
@@ -2,17 +2,26 @@
##
## Copyright 2008, The Android Open Source Project
##
-## Licensed under the Apache License, Version 2.0 (the "License");
-## you may not use this file except in compliance with the License.
-## You may obtain a copy of the License at
+## 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.
##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
##
LOCAL_PATH:= $(call my-dir)
diff --git a/WebKit/android/plugins/sample/main.cpp b/WebKit/android/plugins/sample/main.cpp
index 5bb8ea0..e34cee6 100644
--- a/WebKit/android/plugins/sample/main.cpp
+++ b/WebKit/android/plugins/sample/main.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include <stdlib.h>
diff --git a/WebKit/android/plugins/sample/main.h b/WebKit/android/plugins/sample/main.h
index 5add14d..8bf520e 100644
--- a/WebKit/android/plugins/sample/main.h
+++ b/WebKit/android/plugins/sample/main.h
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include <npapi.h>
diff --git a/WebKit/android/plugins/sample/pluginGraphics.cpp b/WebKit/android/plugins/sample/pluginGraphics.cpp
index 0ea6efe..4c0e6f8 100644
--- a/WebKit/android/plugins/sample/pluginGraphics.cpp
+++ b/WebKit/android/plugins/sample/pluginGraphics.cpp
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "pluginGraphics.h"
diff --git a/WebKit/android/plugins/sample/pluginGraphics.h b/WebKit/android/plugins/sample/pluginGraphics.h
index 6dd74ff..4dceb26 100644
--- a/WebKit/android/plugins/sample/pluginGraphics.h
+++ b/WebKit/android/plugins/sample/pluginGraphics.h
@@ -1,17 +1,26 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "main.h" // for NPAPI definitions
diff --git a/WebKit/android/sort.cpp b/WebKit/android/sort.cpp
index 76201af..de7aa6c 100644
--- a/WebKit/android/sort.cpp
+++ b/WebKit/android/sort.cpp
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
#include "config.h"
diff --git a/WebKit/android/stl/concept_checks.h b/WebKit/android/stl/concept_checks.h
index 36df283..72cc138 100644
--- a/WebKit/android/stl/concept_checks.h
+++ b/WebKit/android/stl/concept_checks.h
@@ -1,4 +1,5 @@
/*
+ * Copyright 2009, The Android Open Source Project
* Copyright (c) 1999
* Silicon Graphics Computer Systems, Inc.
*
diff --git a/WebKit/android/stl/heap.h b/WebKit/android/stl/heap.h
index d1fb319..70d2249 100644
--- a/WebKit/android/stl/heap.h
+++ b/WebKit/android/stl/heap.h
@@ -1,5 +1,6 @@
/*
*
+ * Copyright 2009, The Android Open Source Project
* Copyright (c) 1994
* Hewlett-Packard Company
*
diff --git a/WebKit/android/stl/iostream.h b/WebKit/android/stl/iostream.h
deleted file mode 100644
index 2b7d968..0000000
--- a/WebKit/android/stl/iostream.h
+++ /dev/null
@@ -1 +0,0 @@
-// this file intentionally left blank
diff --git a/WebKit/android/stl/limits b/WebKit/android/stl/limits
index d4d7960..672e605 100644
--- a/WebKit/android/stl/limits
+++ b/WebKit/android/stl/limits
@@ -1,19 +1,27 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 __ANDROID_LIMITS
#define __ANDROID_LIMITS
diff --git a/WebKit/android/stl/new.h b/WebKit/android/stl/new.h
index 13d6d4e..599a890 100644
--- a/WebKit/android/stl/new.h
+++ b/WebKit/android/stl/new.h
@@ -1,17 +1,25 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
diff --git a/WebKit/android/stl/stl_config.h b/WebKit/android/stl/stl_config.h
index 8c107c1..448babc 100644
--- a/WebKit/android/stl/stl_config.h
+++ b/WebKit/android/stl/stl_config.h
@@ -1,5 +1,6 @@
/*
*
+ * Copyright 2009, The Android Open Source Project
* Copyright (c) 1994
* Hewlett-Packard Company
*
diff --git a/WebKit/android/stl/stl_heap.h b/WebKit/android/stl/stl_heap.h
index 651d21a..9e3cf13 100644
--- a/WebKit/android/stl/stl_heap.h
+++ b/WebKit/android/stl/stl_heap.h
@@ -1,5 +1,6 @@
/*
*
+ * Copyright 2009, The Android Open Source Project
* Copyright (c) 1994
* Hewlett-Packard Company
*
diff --git a/WebKit/android/stl/stl_iterator_base.h b/WebKit/android/stl/stl_iterator_base.h
index d03332b..746d1d4 100644
--- a/WebKit/android/stl/stl_iterator_base.h
+++ b/WebKit/android/stl/stl_iterator_base.h
@@ -1,5 +1,6 @@
/*
*
+ * Copyright 2009, The Android Open Source Project
* Copyright (c) 1994
* Hewlett-Packard Company
*
diff --git a/WebKit/android/stl/strings.h b/WebKit/android/stl/strings.h
index 13d6d4e..599a890 100644
--- a/WebKit/android/stl/strings.h
+++ b/WebKit/android/stl/strings.h
@@ -1,17 +1,25 @@
-/*
-**
-** Copyright 2007, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
+/*
+ * Copyright 2007, The Android Open Source Project
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
+ */
diff --git a/WebKit/android/wds/Command.cpp b/WebKit/android/wds/Command.cpp
index 132b8e5..e150d4f 100644
--- a/WebKit/android/wds/Command.cpp
+++ b/WebKit/android/wds/Command.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "wds"
diff --git a/WebKit/android/wds/Command.h b/WebKit/android/wds/Command.h
index df45b2b..753486d 100644
--- a/WebKit/android/wds/Command.h
+++ b/WebKit/android/wds/Command.h
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WDS_COMMAND_H
diff --git a/WebKit/android/wds/Connection.cpp b/WebKit/android/wds/Connection.cpp
index b6ebd75..1afd00c 100644
--- a/WebKit/android/wds/Connection.cpp
+++ b/WebKit/android/wds/Connection.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "wds"
diff --git a/WebKit/android/wds/Connection.h b/WebKit/android/wds/Connection.h
index f7fa21b..ce88316 100644
--- a/WebKit/android/wds/Connection.h
+++ b/WebKit/android/wds/Connection.h
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WDS_CONNECTION_H
diff --git a/WebKit/android/wds/DebugServer.cpp b/WebKit/android/wds/DebugServer.cpp
index 8581680..0990452 100644
--- a/WebKit/android/wds/DebugServer.cpp
+++ b/WebKit/android/wds/DebugServer.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "wds"
diff --git a/WebKit/android/wds/DebugServer.h b/WebKit/android/wds/DebugServer.h
index 64db031..a0a2aa8 100644
--- a/WebKit/android/wds/DebugServer.h
+++ b/WebKit/android/wds/DebugServer.h
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 DEBUGSERVER_H
diff --git a/WebKit/android/wds/client/AdbConnection.cpp b/WebKit/android/wds/client/AdbConnection.cpp
index 79b49d7..f83ad2f 100644
--- a/WebKit/android/wds/client/AdbConnection.cpp
+++ b/WebKit/android/wds/client/AdbConnection.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2009, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "wdsclient"
diff --git a/WebKit/android/wds/client/AdbConnection.h b/WebKit/android/wds/client/AdbConnection.h
index 0b5419f..433d7ea 100644
--- a/WebKit/android/wds/client/AdbConnection.h
+++ b/WebKit/android/wds/client/AdbConnection.h
@@ -1,17 +1,26 @@
/*
* Copyright 2009, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WDS_ADB_CONNECTION_H
diff --git a/WebKit/android/wds/client/Android.mk b/WebKit/android/wds/client/Android.mk
index 5d07a31..e6bf7cf 100644
--- a/WebKit/android/wds/client/Android.mk
+++ b/WebKit/android/wds/client/Android.mk
@@ -2,17 +2,26 @@
##
## Copyright 2008, The Android Open Source Project
##
-## Licensed under the Apache License, Version 2.0 (the "License");
-## you may not use this file except in compliance with the License.
-## You may obtain a copy of the License at
+## 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.
##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
##
LOCAL_PATH:= $(call my-dir)
diff --git a/WebKit/android/wds/client/ClientUtils.cpp b/WebKit/android/wds/client/ClientUtils.cpp
index 067775e..03514f6 100644
--- a/WebKit/android/wds/client/ClientUtils.cpp
+++ b/WebKit/android/wds/client/ClientUtils.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2009, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "ClientUtils.h"
diff --git a/WebKit/android/wds/client/ClientUtils.h b/WebKit/android/wds/client/ClientUtils.h
index dc8b23f..0aa068e 100644
--- a/WebKit/android/wds/client/ClientUtils.h
+++ b/WebKit/android/wds/client/ClientUtils.h
@@ -1,17 +1,26 @@
/*
* Copyright 2009, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WDS_CLIENT_UTILS_H
diff --git a/WebKit/android/wds/client/Device.cpp b/WebKit/android/wds/client/Device.cpp
index 03b4507..6c36979 100644
--- a/WebKit/android/wds/client/Device.cpp
+++ b/WebKit/android/wds/client/Device.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2009, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#include "AdbConnection.h"
diff --git a/WebKit/android/wds/client/Device.h b/WebKit/android/wds/client/Device.h
index c6d77f3..df076cb 100644
--- a/WebKit/android/wds/client/Device.h
+++ b/WebKit/android/wds/client/Device.h
@@ -1,17 +1,26 @@
/*
* Copyright 2009, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WDS_DEVICE_H
diff --git a/WebKit/android/wds/client/DeviceList.h b/WebKit/android/wds/client/DeviceList.h
index 9139238..0b278d2 100644
--- a/WebKit/android/wds/client/DeviceList.h
+++ b/WebKit/android/wds/client/DeviceList.h
@@ -1,17 +1,26 @@
/*
* Copyright 2009, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 WDS_DEVICE_LIST_H
diff --git a/WebKit/android/wds/client/main.cpp b/WebKit/android/wds/client/main.cpp
index 5899b16..bc8df86 100644
--- a/WebKit/android/wds/client/main.cpp
+++ b/WebKit/android/wds/client/main.cpp
@@ -1,17 +1,26 @@
/*
* Copyright 2008, The Android Open Source Project
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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.
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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.
*/
#define LOG_TAG "wdsclient"