Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (113810 => 113811)
--- trunk/Source/WebCore/CMakeLists.txt 2012-04-11 02:19:47 UTC (rev 113810)
+++ trunk/Source/WebCore/CMakeLists.txt 2012-04-11 02:27:01 UTC (rev 113811)
@@ -960,6 +960,7 @@
loader/DocumentLoader.cpp
loader/DocumentThreadableLoader.cpp
loader/DocumentWriter.cpp
+ loader/EmptyClients.cpp
loader/FTPDirectoryParser.cpp
loader/FormState.cpp
loader/FormSubmission.cpp
Modified: trunk/Source/WebCore/ChangeLog (113810 => 113811)
--- trunk/Source/WebCore/ChangeLog 2012-04-11 02:19:47 UTC (rev 113810)
+++ trunk/Source/WebCore/ChangeLog 2012-04-11 02:27:01 UTC (rev 113811)
@@ -1,3 +1,25 @@
+2012-04-10 Kent Tamura <tk...@chromium.org>
+
+ Add a function to set empty clients to a PageClients
+ https://bugs.webkit.org/show_bug.cgi?id=83555
+
+ Reviewed by Adam Barth.
+
+ No new tests because of no behavior change.
+
+ * CMakeLists.txt: Add EmptyClients.cpp.
+ * GNUmakefile.list.am: ditto.
+ * Target.pri: ditto.
+ * WebCore.gypi: ditto.
+ * WebCore.vcproj/WebCore.vcproj: ditto.
+ * WebCore.xcodeproj/project.pbxproj: ditto.
+
+ * loader/EmptyClients.cpp: Added.
+ (WebCore::fillWithEmptyClients): Some code was moved from SVGImage::dataChanged().
+ * loader/EmptyClients.h: Add the declaration of fillWithEmptyClients().
+ * svg/graphics/SVGImage.cpp:
+ (WebCore::SVGImage::dataChanged): Moved some code to fillWithEmptyClients().
+
2012-04-10 James Robinson <jam...@chromium.org>
[chromium] Fold LayerChromium::updateCompositorResources into main update
Modified: trunk/Source/WebCore/GNUmakefile.list.am (113810 => 113811)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-04-11 02:19:47 UTC (rev 113810)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-04-11 02:27:01 UTC (rev 113811)
@@ -2773,6 +2773,7 @@
Source/WebCore/loader/DocumentThreadableLoaderClient.h \
Source/WebCore/loader/DocumentWriter.cpp \
Source/WebCore/loader/DocumentWriter.h \
+ Source/WebCore/loader/EmptyClients.cpp \
Source/WebCore/loader/EmptyClients.h \
Source/WebCore/loader/FormState.cpp \
Source/WebCore/loader/FormState.h \
Modified: trunk/Source/WebCore/Target.pri (113810 => 113811)
--- trunk/Source/WebCore/Target.pri 2012-04-11 02:19:47 UTC (rev 113810)
+++ trunk/Source/WebCore/Target.pri 2012-04-11 02:27:01 UTC (rev 113811)
@@ -952,6 +952,7 @@
loader/DocumentLoader.cpp \
loader/DocumentThreadableLoader.cpp \
loader/DocumentWriter.cpp \
+ loader/EmptyClients.cpp \
loader/FormState.cpp \
loader/FormSubmission.cpp \
loader/FrameLoader.cpp \
Modified: trunk/Source/WebCore/WebCore.gypi (113810 => 113811)
--- trunk/Source/WebCore/WebCore.gypi 2012-04-11 02:19:47 UTC (rev 113810)
+++ trunk/Source/WebCore/WebCore.gypi 2012-04-11 02:27:01 UTC (rev 113811)
@@ -2802,6 +2802,7 @@
'loader/DocumentThreadableLoader.h',
'loader/DocumentThreadableLoaderClient.h',
'loader/DocumentWriter.cpp',
+ 'loader/EmptyClients.cpp',
'loader/EmptyClients.h',
'loader/FTPDirectoryParser.cpp',
'loader/FTPDirectoryParser.h',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (113810 => 113811)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-04-11 02:19:47 UTC (rev 113810)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-04-11 02:27:01 UTC (rev 113811)
@@ -26646,6 +26646,10 @@
>
</File>
<File
+ RelativePath="..\loader\EmptyClients.cpp"
+ >
+ </File>
+ <File
RelativePath="..\loader\EmptyClients.h"
>
</File>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (113810 => 113811)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-04-11 02:19:47 UTC (rev 113810)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-04-11 02:27:01 UTC (rev 113811)
@@ -6053,6 +6053,7 @@
F4EAF4AE10C742B1009100D3 /* OpenTypeSanitizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F4EAF4AC10C742B1009100D3 /* OpenTypeSanitizer.cpp */; };
F4EAF4AF10C742B1009100D3 /* OpenTypeSanitizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F4EAF4AD10C742B1009100D3 /* OpenTypeSanitizer.h */; };
F5142C69123F12B000F5BD4C /* LocalizedNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = F5142C68123F12B000F5BD4C /* LocalizedNumber.h */; };
+ F52AD5E41534245F0059FBE6 /* EmptyClients.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F52AD5E31534245F0059FBE6 /* EmptyClients.cpp */; };
F55B3DAD1251F12D003EF269 /* BaseTextInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55B3D791251F12D003EF269 /* BaseTextInputType.cpp */; };
F55B3DAE1251F12D003EF269 /* BaseTextInputType.h in Headers */ = {isa = PBXBuildFile; fileRef = F55B3D7A1251F12D003EF269 /* BaseTextInputType.h */; };
F55B3DAF1251F12D003EF269 /* ButtonInputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F55B3D7B1251F12D003EF269 /* ButtonInputType.cpp */; };
@@ -13215,6 +13216,7 @@
F523D27902DE43D7018635CA /* TextResourceDecoder.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = TextResourceDecoder.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F523D30302DE4476018635CA /* Range.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Range.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F523D30402DE4476018635CA /* Range.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = Range.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+ F52AD5E31534245F0059FBE6 /* EmptyClients.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmptyClients.cpp; sourceTree = "<group>"; };
F55B3D791251F12D003EF269 /* BaseTextInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BaseTextInputType.cpp; sourceTree = "<group>"; };
F55B3D7A1251F12D003EF269 /* BaseTextInputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseTextInputType.h; sourceTree = "<group>"; };
F55B3D7B1251F12D003EF269 /* ButtonInputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ButtonInputType.cpp; sourceTree = "<group>"; };
@@ -20008,6 +20010,7 @@
0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */,
9738899E116EA9DC00ADF313 /* DocumentWriter.cpp */,
9738899F116EA9DC00ADF313 /* DocumentWriter.h */,
+ F52AD5E31534245F0059FBE6 /* EmptyClients.cpp */,
B255990D0D00D8B900BB825C /* EmptyClients.h */,
656D37230ADBA5DE00A4554D /* FormState.cpp */,
656D37220ADBA5DE00A4554D /* FormState.h */,
@@ -25743,6 +25746,7 @@
2CF6878814D32EB500340F39 /* ElementAttributeData.cpp in Sources */,
A8CFF6CB0A1561CD000A4234 /* EllipsisBox.cpp in Sources */,
F55B3DBB1251F12D003EF269 /* EmailInputType.cpp in Sources */,
+ F52AD5E41534245F0059FBE6 /* EmptyClients.cpp in Sources */,
A8EA7EC10A1945D000A8EF5F /* EntityReference.cpp in Sources */,
8987855B122CA064003AABDA /* Entry.cpp in Sources */,
8987855D122CA064003AABDA /* EntryArray.cpp in Sources */,
Added: trunk/Source/WebCore/loader/EmptyClients.cpp (0 => 113811)
--- trunk/Source/WebCore/loader/EmptyClients.cpp (rev 0)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp 2012-04-11 02:27:01 UTC (rev 113811)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2006 Eric Seidel <e...@webkit.org>
+ * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2011. 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. ``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
+ * 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 "EmptyClients.h"
+
+#if ENABLE(SVG) || ENABLE(PAGE_POPUP)
+#include "FileChooser.h"
+#include "FormState.h"
+#include "HTMLFormElement.h"
+
+namespace WebCore {
+
+void fillWithEmptyClients(Page::PageClients& pageClients)
+{
+#if ENABLE(CONTEXT_MENUS)
+ static ContextMenuClient* dummyContextMenuClient = adoptPtr(new EmptyContextMenuClient).leakPtr();
+ pageClients.contextMenuClient = dummyContextMenuClient;
+#endif
+
+#if ENABLE(DRAG_SUPPORT)
+ static DragClient* dummyDragClient = adoptPtr(new EmptyDragClient).leakPtr();
+ pageClients.dragClient = dummyDragClient;
+#endif
+
+ static EditorClient* dummyEditorClient = adoptPtr(new EmptyEditorClient).leakPtr();
+ pageClients.editorClient = dummyEditorClient;
+
+ static InspectorClient* dummyInspectorClient = adoptPtr(new EmptyInspectorClient).leakPtr();
+ pageClients.inspectorClient = dummyInspectorClient;
+}
+
+}
+#endif
Modified: trunk/Source/WebCore/loader/EmptyClients.h (113810 => 113811)
--- trunk/Source/WebCore/loader/EmptyClients.h 2012-04-11 02:19:47 UTC (rev 113810)
+++ trunk/Source/WebCore/loader/EmptyClients.h 2012-04-11 02:27:01 UTC (rev 113811)
@@ -42,6 +42,7 @@
#include "FrameLoaderClient.h"
#include "FrameNetworkingContext.h"
#include "InspectorClient.h"
+#include "Page.h"
#include "PopupMenu.h"
#include "ResourceError.h"
#include "SearchPopupMenu.h"
@@ -615,6 +616,8 @@
virtual void deviceOrientationControllerDestroyed() { }
};
+void fillWithEmptyClients(Page::PageClients&);
+
}
#endif // EmptyClients_h
Modified: trunk/Source/WebCore/svg/graphics/SVGImage.cpp (113810 => 113811)
--- trunk/Source/WebCore/svg/graphics/SVGImage.cpp 2012-04-11 02:19:47 UTC (rev 113810)
+++ trunk/Source/WebCore/svg/graphics/SVGImage.cpp 2012-04-11 02:27:01 UTC (rev 113811)
@@ -326,20 +326,9 @@
static FrameLoaderClient* dummyFrameLoaderClient = new EmptyFrameLoaderClient;
Page::PageClients pageClients;
+ fillWithEmptyClients(pageClients);
m_chromeClient = adoptPtr(new SVGImageChromeClient(this));
pageClients.chromeClient = m_chromeClient.get();
-#if ENABLE(CONTEXT_MENUS)
- static ContextMenuClient* dummyContextMenuClient = new EmptyContextMenuClient;
- pageClients.contextMenuClient = dummyContextMenuClient;
-#endif
- static EditorClient* dummyEditorClient = new EmptyEditorClient;
- pageClients.editorClient = dummyEditorClient;
-#if ENABLE(DRAG_SUPPORT)
- static DragClient* dummyDragClient = new EmptyDragClient;
- pageClients.dragClient = dummyDragClient;
-#endif
- static InspectorClient* dummyInspectorClient = new EmptyInspectorClient;
- pageClients.inspectorClient = dummyInspectorClient;
// FIXME: If this SVG ends up loading itself, we might leak the world.
// The Cache code does not know about CachedImages holding Frames and