Remove autostart hashing code from WebCore
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2013 01:02:53 +0000 (01:02 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2013 01:02:53 +0000 (01:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113242

Reviewed by Tim Horton.

Remove PlugInOriginHash and all the related build entries.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLPlugInImageElement.cpp:
* plugins/PlugInOriginHash.cpp: Removed.
* plugins/PlugInOriginHash.h: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146833 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/plugins/PlugInOriginHash.cpp [deleted file]
Source/WebCore/plugins/PlugInOriginHash.h [deleted file]

index 06917f8..1bd4edf 100644 (file)
@@ -2122,7 +2122,6 @@ set(WebCore_SOURCES
     plugins/DOMMimeType.cpp
     plugins/DOMPluginArray.cpp
     plugins/DOMPlugin.cpp
-    plugins/PlugInOriginHash.cpp
     plugins/PluginData.cpp
     plugins/PluginMainThreadScheduler.cpp
 
index f7f0497..a1d045b 100644 (file)
@@ -1,3 +1,24 @@
+2013-03-25  Dean Jackson  <dino@apple.com>
+
+        Remove autostart hashing code from WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=113242
+
+        Reviewed by Tim Horton.
+
+        Remove PlugInOriginHash and all the related build entries.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLPlugInImageElement.cpp:
+        * plugins/PlugInOriginHash.cpp: Removed.
+        * plugins/PlugInOriginHash.h: Removed.
+
 2013-03-25  Roger Fong  <roger_fong@apple.com>
 
         Unreviewed. Wrong place to enable RuntimeEnabledFeature for Windows.
index db61e9c..4226022 100644 (file)
@@ -4353,8 +4353,6 @@ webcore_sources += \
        Source/WebCore/plugins/DOMPlugin.h \
        Source/WebCore/plugins/npapi.cpp \
        Source/WebCore/plugins/npfunctions.h \
-       Source/WebCore/plugins/PlugInOriginHash.cpp \
-       Source/WebCore/plugins/PlugInOriginHash.h \
        Source/WebCore/plugins/PluginDatabase.cpp \
        Source/WebCore/plugins/PluginDatabase.h \
        Source/WebCore/plugins/PluginData.cpp \
index fb095bf..abcfb08 100644 (file)
@@ -975,7 +975,6 @@ SOURCES += \
     plugins/PluginMainThreadScheduler.cpp \
     plugins/DOMMimeType.cpp \
     plugins/DOMMimeTypeArray.cpp \
-    plugins/PlugInOriginHash.cpp \
     platform/animation/Animation.cpp \
     platform/animation/AnimationList.cpp \
     platform/Arena.cpp \
@@ -2449,7 +2448,6 @@ HEADERS += \
     plugins/PluginDebug.h \
     plugins/DOMPlugin.h \
     plugins/IFrameShimSupport.h \
-    plugins/PlugInOriginHash.h \
     plugins/PluginMainThreadScheduler.h \
     plugins/PluginPackage.h \
     plugins/PluginStream.h \
index 6e525ff..c625a10 100644 (file)
             'plugins/DOMPluginArray.h',
             'plugins/IFrameShimSupport.cpp',
             'plugins/IFrameShimSupport.h',
-            'plugins/PlugInOriginHash.cpp',
-            'plugins/PlugInOriginHash.h',
             'plugins/PluginData.cpp',
             'plugins/PluginDataNone.cpp',
             'plugins/PluginDatabase.cpp',
index 18c839c..7661e13 100755 (executable)
                                >
                        </File>
                        <File
-                               RelativePath="..\plugins\PlugInOriginHash.cpp"
-                               >
-                       </File>
-                       <File
-                               RelativePath="..\plugins\PlugInOriginHash.h"
-                               >
-                       </File>
-                       <File
                                RelativePath="..\plugins\PluginPackage.cpp"
                                >
                        </File>
index a73cc01..765668f 100644 (file)
     <ClCompile Include="..\plugins\PluginDatabase.cpp" />
     <ClCompile Include="..\plugins\PluginDebug.cpp" />
     <ClCompile Include="..\plugins\PluginMainThreadScheduler.cpp" />
-    <ClCompile Include="..\plugins\PlugInOriginHash.cpp" />
     <ClCompile Include="..\plugins\PluginPackage.cpp" />
     <ClCompile Include="..\plugins\PluginStream.cpp" />
     <ClCompile Include="..\plugins\PluginView.cpp" />
     <ClInclude Include="..\plugins\PluginDatabase.h" />
     <ClInclude Include="..\plugins\PluginDebug.h" />
     <ClInclude Include="..\plugins\PluginMainThreadScheduler.h" />
-    <ClInclude Include="..\plugins\PlugInOriginHash.h" />
     <ClInclude Include="..\plugins\PluginPackage.h" />
     <ClInclude Include="..\plugins\PluginQuirkSet.h" />
     <ClInclude Include="..\plugins\PluginStrategy.h" />
index 2934e47..eb97cff 100644 (file)
     <ClCompile Include="..\plugins\PluginMainThreadScheduler.cpp">
       <Filter>plugins</Filter>
     </ClCompile>
-    <ClCompile Include="..\plugins\PlugInOriginHash.cpp">
-      <Filter>plugins</Filter>
-    </ClCompile>
     <ClCompile Include="..\plugins\PluginPackage.cpp">
       <Filter>plugins</Filter>
     </ClCompile>
     <ClInclude Include="..\plugins\PluginMainThreadScheduler.h">
       <Filter>plugins</Filter>
     </ClInclude>
-    <ClInclude Include="..\plugins\PlugInOriginHash.h">
-      <Filter>plugins</Filter>
-    </ClInclude>
     <ClInclude Include="..\plugins\PluginPackage.h">
       <Filter>plugins</Filter>
     </ClInclude>
index ac9b1c9..9866803 100644 (file)
                31C0FF4D0E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF470E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm */; };
                31C0FF4E0E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */; };
                31D591B316697A6C00E6BF02 /* PlugInClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31D591B116697A6C00E6BF02 /* PlugInClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               31D591BB166C2E6C00E6BF02 /* PlugInOriginHash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31D591B9166C2E6C00E6BF02 /* PlugInOriginHash.cpp */; };
-               31D591BC166C2E6C00E6BF02 /* PlugInOriginHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 31D591BA166C2E6C00E6BF02 /* PlugInOriginHash.h */; settings = {ATTRIBUTES = (); }; };
                31EC1E2814FF60EE00C94662 /* JSNotificationPermissionCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31EC1E2614FF60EE00C94662 /* JSNotificationPermissionCallback.cpp */; };
                31EC1E2914FF60EE00C94662 /* JSNotificationPermissionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 31EC1E2714FF60EE00C94662 /* JSNotificationPermissionCallback.h */; };
                31FB1A57120A5D0600DC02A0 /* DeviceMotionClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31FB1A4F120A5D0600DC02A0 /* DeviceMotionClient.h */; };
                31C0FF470E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWebKitTransitionEvent.mm; sourceTree = "<group>"; };
                31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitTransitionEventInternal.h; sourceTree = "<group>"; };
                31D591B116697A6C00E6BF02 /* PlugInClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlugInClient.h; sourceTree = "<group>"; };
-               31D591B9166C2E6C00E6BF02 /* PlugInOriginHash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlugInOriginHash.cpp; sourceTree = "<group>"; };
-               31D591BA166C2E6C00E6BF02 /* PlugInOriginHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlugInOriginHash.h; sourceTree = "<group>"; };
                31E8D8BA160BC94B004CE8F5 /* RenderSnapshottedPlugIn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSnapshottedPlugIn.cpp; sourceTree = "<group>"; };
                31E8D8BB160BC94C004CE8F5 /* RenderSnapshottedPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSnapshottedPlugIn.h; sourceTree = "<group>"; };
                31EC1D5014FEFD0800C94662 /* NotificationPermissionCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = NotificationPermissionCallback.idl; path = Modules/notifications/NotificationPermissionCallback.idl; sourceTree = "<group>"; };
                                A9C6E4F20D745E48006442E9 /* PluginData.h */,
                                1ADA140E0E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp */,
                                1ADA140F0E1AE5D900023EE5 /* PluginMainThreadScheduler.h */,
-                               31D591B9166C2E6C00E6BF02 /* PlugInOriginHash.cpp */,
-                               31D591BA166C2E6C00E6BF02 /* PlugInOriginHash.h */,
                                1AA8798F11CBE846003C664F /* PluginStrategy.h */,
                                0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */,
                                76FF17E211235673001D61B5 /* PluginViewNone.cpp */,
                                A9C6E4F40D745E48006442E9 /* PluginData.h in Headers */,
                                97205ABC1239292700B17380 /* PluginDocument.h in Headers */,
                                1ADA14110E1AE5D900023EE5 /* PluginMainThreadScheduler.h in Headers */,
-                               31D591BC166C2E6C00E6BF02 /* PlugInOriginHash.h in Headers */,
                                1AA8799011CBE846003C664F /* PluginStrategy.h in Headers */,
                                0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */,
                                BCBB8AB813F1AFB000734DF0 /* PODArena.h in Headers */,
                                A9C6E4F30D745E48006442E9 /* PluginData.cpp in Sources */,
                                97205ABB1239292700B17380 /* PluginDocument.cpp in Sources */,
                                1ADA14100E1AE5D900023EE5 /* PluginMainThreadScheduler.cpp in Sources */,
-                               31D591BB166C2E6C00E6BF02 /* PlugInOriginHash.cpp in Sources */,
                                76FF17E311235673001D61B5 /* PluginViewNone.cpp in Sources */,
                                B2B1F7160D00CAA8004AEA64 /* PointerEventsHitRules.cpp in Sources */,
                                A1E1154613015C4E0054AC8C /* PointLightSource.cpp in Sources */,
index 95e4667..59205b1 100644 (file)
@@ -38,7 +38,6 @@
 #include "NodeRenderingContext.h"
 #include "Page.h"
 #include "PlugInClient.h"
-#include "PlugInOriginHash.h"
 #include "PluginViewBase.h"
 #include "RenderEmbeddedObject.h"
 #include "RenderImage.h"
diff --git a/Source/WebCore/plugins/PlugInOriginHash.cpp b/Source/WebCore/plugins/PlugInOriginHash.cpp
deleted file mode 100644 (file)
index cd5b0db..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2012 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 INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS 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 "PlugInOriginHash.h"
-
-#include "Document.h"
-#include "Frame.h"
-#include "HTMLPlugInImageElement.h"
-#include "KURL.h"
-#include "Logging.h"
-#include "MIMETypeRegistry.h"
-#include "Page.h"
-#include <wtf/text/StringHash.h>
-
-namespace WebCore {
-
-static inline void addCaseFoldedCharacters(StringHasher& hasher, const String& string)
-{
-    if (string.isEmpty())
-        return;
-    if (string.is8Bit())
-        return hasher.addCharacters<LChar, CaseFoldingHash::foldCase<LChar> >(string.characters8(), string.length());
-    return hasher.addCharacters<UChar, CaseFoldingHash::foldCase<UChar> >(string.characters16(), string.length());
-}
-
-unsigned PlugInOriginHash::hash(HTMLPlugInImageElement* plugInElement, const KURL& plugInURL)
-{
-    ASSERT(plugInElement->document()->page());
-
-    String mimeType = plugInElement->serviceType();
-    if (mimeType.isEmpty())
-        mimeType = mimeTypeFromURL(plugInURL);
-
-    // We want to avoid concatenating the strings and then taking the hash, since that could lead to an expensive conversion.
-    // We also want to avoid using the hash() function in StringImpl or CaseFoldingHash because that masks out bits for the use of flags.
-    StringHasher hasher;
-    addCaseFoldedCharacters(hasher, plugInElement->document()->page()->mainFrame()->document()->baseURL().host());
-    hasher.addCharacter(0);
-    addCaseFoldedCharacters(hasher, plugInURL.host());
-    hasher.addCharacter(0);
-    addCaseFoldedCharacters(hasher, mimeType);
-    LOG(Plugins, "Hash: %s %s %s", plugInElement->document()->page()->mainFrame()->document()->baseURL().host().utf8().data(), plugInURL.host().utf8().data(), mimeType.utf8().data());
-    return hasher.hash();
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/plugins/PlugInOriginHash.h b/Source/WebCore/plugins/PlugInOriginHash.h
deleted file mode 100644 (file)
index 9e108ed..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2012 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 INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS 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 PlugInOriginHash_h
-#define PlugInOriginHash_h
-
-namespace WebCore {
-
-class HTMLPlugInImageElement;
-class KURL;
-
-struct PlugInOriginHash {
-    static unsigned hash(HTMLPlugInImageElement*, const KURL&);
-};
-
-} // namespace WebCore
-
-#endif /* PlugInOriginHash_h */