SET(WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}"
+ "${WEBCORE_DIR}/Modules/geolocation"
"${WEBCORE_DIR}/accessibility"
"${WEBCORE_DIR}/bindings"
"${WEBCORE_DIR}/bindings/generic"
)
SET(WebCore_IDL_INCLUDES
+ Modules/geolocation
bindings/generic
css
dom
)
SET(WebCore_IDL_FILES
+ Modules/geolocation/NavigatorGeolocation.idl
+
css/Counter.idl
css/CSSCharsetRule.idl
css/CSSFontFaceRule.idl
)
SET(WebCore_SOURCES
+ Modules/geolocation/NavigatorGeolocation.cpp
+
accessibility/AXObjectCache.cpp
accessibility/AccessibilityARIAGrid.cpp
accessibility/AccessibilityARIAGridCell.cpp
+2012-02-21 Adam Barth <abarth@webkit.org>
+
+ Frame and Navigator shouldn't need to worry about Geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=78860
+
+ Reviewed by Eric Seidel.
+
+ This patch removes some Geolocation-specific code from Frame and
+ Navigator in favor of our new supplemental module mechanism. We're
+ still refining the module system, but we seem to be converging on a
+ simple Observer/Supplement design.
+
+ In a future patch, I'll move the remaining Geolocation-related files in
+ WebCore into Modules/geolocation. This patch appears to be the first
+ patch that introduces a module used by all the various build systems,
+ which is why there's a bit more build system overhead than usual.
+
+ * Modules/geolocation: Added.
+ * Modules/geolocation/NavigatorGeolocation.cpp: Added.
+ (WebCore):
+ (WebCore::NavigatorGeolocation::NavigatorGeolocation):
+ (WebCore::NavigatorGeolocation::~NavigatorGeolocation):
+ (WebCore::NavigatorGeolocation::pageDestroyed):
+ (WebCore::NavigatorGeolocation::from):
+ (WebCore::NavigatorGeolocation::geolocation):
+ * Modules/geolocation/NavigatorGeolocation.h: Added.
+ (WebCore):
+ (NavigatorGeolocation):
+ * Modules/geolocation/NavigatorGeolocation.idl: Added.
+ - I've temporarily disabled this API for GObject because it generates
+ a strange compile error. Once I land this patch, I'll spend some
+ more time fixing the compile error.
+ * page/DOMWindow.cpp:
+ (WebCore):
+ * page/DOMWindow.h:
+ (DOMWindow):
+ * page/Frame.cpp:
+ (WebCore::Frame::pageDestroyed):
+ (WebCore::Frame::transferChildFrameToNewDocument):
+ * page/FrameDestructionObserver.cpp:
+ (WebCore::FrameDestructionObserver::pageDestroyed):
+ (WebCore):
+ * page/FrameDestructionObserver.h:
+ (FrameDestructionObserver):
+ * page/Navigator.cpp:
+ (WebCore):
+ * page/Navigator.h:
+ (WebCore):
+ (Navigator):
+ * page/Navigator.idl:
+
2012-02-21 Shawn Singh <shawnsingh@chromium.org>
[chromium] Refactor CCLayerTreeHostCommon: merge scattered setTargetRenderSurface logic
VPATH = \
$(WebCore) \
+ $(WebCore)/Modules/geolocation \
$(WebCore)/bindings/generic \
$(WebCore)/bindings/js \
$(WebCore)/bindings/objc \
#
BINDING_IDLS = \
+ $(WebCore)/Modules/geolocation/NavigatorGeolocation.idl \
$(WebCore)/css/CSSCharsetRule.idl \
$(WebCore)/css/CSSFontFaceRule.idl \
$(WebCore)/css/CSSImportRule.idl \
$$PWD/css/mobileThemeQt.css
IDL_BINDINGS += \
+ $$PWD/Modules/geolocation/NavigatorGeolocation.idl \
$$PWD/css/Counter.idl \
$$PWD/css/CSSCharsetRule.idl \
$$PWD/css/CSSFontFaceRule.idl \
generateBindings.commands = perl -I$$PWD/bindings/scripts $$generateBindings.script \
--defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" \
--generator $$generator \
+ --include $$PWD/Modules/geolocation \
--include $$PWD/dom \
--include $$PWD/fileapi \
--include $$PWD/html \
-I$(srcdir)/Source/ThirdParty/ANGLE/include \
-I$(srcdir)/Source/ThirdParty/ANGLE/include/GLSLANG \
-I$(srcdir)/Source/WebCore \
+ -I$(srcdir)/Source/WebCore/Modules/geolocation \
-I$(srcdir)/Source/WebCore/accessibility \
-I$(srcdir)/Source/WebCore/bindings \
-I$(srcdir)/Source/WebCore/bindings/generic \
DerivedSources/ANGLE/glslang_tab.h: DerivedSources/ANGLE/glslang_tab.cpp
IDL_PATH := \
+ $(WebCore)/Modules/geolocation \
$(WebCore)/bindings/js \
$(WebCore)/css \
$(WebCore)/dom \
DerivedSources/WebCore/XPathGrammar.h
dom_binding_idls += \
+ $(WebCore)/Modules/geolocation/NavigatorGeolocation.idl \
$(WebCore)/css/CSSCharsetRule.idl \
$(WebCore)/css/CSSFontFaceRule.idl \
$(WebCore)/css/CSSImportRule.idl \
$(WebCore)/xml/XSLTProcessor.idl
webcore_sources += \
+ Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp \
+ Source/WebCore/Modules/geolocation/NavigatorGeolocation.h \
Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp \
Source/WebCore/accessibility/AccessibilityARIAGridCell.h \
Source/WebCore/accessibility/AccessibilityARIAGrid.cpp \
--- /dev/null
+/*
+ * Copyright (C) 2012, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 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 "NavigatorGeolocation.h"
+
+#include "Geolocation.h"
+#include "Navigator.h"
+
+namespace WebCore {
+
+NavigatorGeolocation::NavigatorGeolocation(Frame* frame)
+ : DOMWindowProperty(frame)
+{
+}
+
+NavigatorGeolocation::~NavigatorGeolocation()
+{
+}
+
+void NavigatorGeolocation::willDetachPage()
+{
+ // FIXME: We should ideally allow existing Geolocation activities to continue
+ // when the Geolocation's iframe is reparented. (Assuming we continue to
+ // support reparenting iframes.)
+ // See https://bugs.webkit.org/show_bug.cgi?id=55577
+ // and https://bugs.webkit.org/show_bug.cgi?id=52877
+ if (m_geolocation)
+ m_geolocation->reset();
+}
+
+NavigatorGeolocation* NavigatorGeolocation::from(Navigator* navigator)
+{
+ DEFINE_STATIC_LOCAL(AtomicString, name, ("NavigatorGeolocation"));
+ NavigatorGeolocation* supplement = static_cast<NavigatorGeolocation*>(NavigatorSupplement::from(navigator, name));
+ if (!supplement) {
+ supplement = new NavigatorGeolocation(navigator->frame());
+ provideTo(navigator, name, adoptPtr(supplement));
+ }
+ return supplement;
+}
+
+Geolocation* NavigatorGeolocation::geolocation(Navigator* navigator)
+{
+ return NavigatorGeolocation::from(navigator)->geolocation();
+}
+
+Geolocation* NavigatorGeolocation::geolocation() const
+{
+ if (!m_geolocation)
+ m_geolocation = Geolocation::create(frame());
+ return m_geolocation.get();
+}
+
+} // namespace WebCore
--- /dev/null
+/*
+ * Copyright (C) 2011, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 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 NavigatorGeolocation_h
+#define NavigatorGeolocation_h
+
+#include "DOMWindowProperty.h"
+#include "NavigatorSupplement.h"
+
+namespace WebCore {
+
+class Frame;
+class Geolocation;
+class Navigator;
+
+class NavigatorGeolocation : public NavigatorSupplement, public DOMWindowProperty {
+public:
+ virtual ~NavigatorGeolocation();
+ static NavigatorGeolocation* from(Navigator*);
+
+ static Geolocation* geolocation(Navigator*);
+ Geolocation* geolocation() const;
+
+private:
+ NavigatorGeolocation(Frame*);
+
+ virtual void willDetachPage() OVERRIDE;
+
+ mutable RefPtr<Geolocation> m_geolocation;
+};
+
+} // namespace WebCore
+
+#endif // NavigatorGeolocation_h
--- /dev/null
+/*
+ * Copyright (C) 2012 Google 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.
+ */
+
+module window {
+
+ interface [
+ Conditional=GEOLOCATION,
+ Supplemental=Navigator
+ ] NavigatorGeolocation {
+#if !defined(LANGUAGE_GOBJECT) || !LANGUAGE_GOBJECT
+ // FIXME: Enable this interface for GOBJECT.
+ readonly attribute [V8EnabledAtRuntime] Geolocation geolocation;
+#endif
+ };
+
+}
}
SOURCES += \
+ Modules/geolocation/NavigatorGeolocation.cpp \
+ \
accessibility/AccessibilityImageMapLink.cpp \
accessibility/AccessibilityMediaControls.cpp \
accessibility/AccessibilityMenuList.cpp \
__ZN7WebCore24FrameDestructionObserverC2EPNS_5FrameE
__ZN7WebCore24FrameDestructionObserver12observeFrameEPNS_5FrameE
__ZN7WebCore24FrameDestructionObserver14frameDestroyedEv
+__ZN7WebCore24FrameDestructionObserver14willDetachPageEv
__ZN7WebCore24keyIdentifierForKeyEventEP7NSEvent
__ZN7WebCore24notifyHistoryItemChangedE
__ZN7WebCore25HistoryPropertyListWriter11releaseDataEv
'../',
'../..',
'../Modules/gamepad',
+ '../Modules/geolocation',
'../Modules/intents',
'../Modules/indexeddb',
'../accessibility',
'Modules/gamepad/Gamepad.idl',
'Modules/gamepad/GamepadList.idl',
'Modules/gamepad/NavigatorGamepad.idl',
+ 'Modules/geolocation/NavigatorGeolocation.idl',
'Modules/indexeddb/DOMWindowIndexedDatabase.idl',
'Modules/intents/DOMWindowIntents.idl',
'Modules/intents/Intent.idl',
'Modules/gamepad/GamepadList.h',
'Modules/gamepad/NavigatorGamepad.cpp',
'Modules/gamepad/NavigatorGamepad.h',
+ 'Modules/geolocation/NavigatorGeolocation.cpp',
+ 'Modules/geolocation/NavigatorGeolocation.h',
'Modules/indexeddb/DOMWindowIndexedDatabase.cpp',
'Modules/indexeddb/DOMWindowIndexedDatabase.h',
'Modules/intents/Intent.cpp',
INCLUDEPATH += \
$$SOURCE_DIR \
+ $$SOURCE_DIR/Modules/geolocation \
$$SOURCE_DIR/accessibility \
$$SOURCE_DIR/bindings \
$$SOURCE_DIR/bindings/generic \
</File>
</Filter>
<Filter
+ Name="Modules"
+ >
+ <Filter
+ Name="geolocation"
+ >
+ <File
+ RelativePath="..\Modules\geolocation\NavigatorGeolocation.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\Modules\geolocation\NavigatorGeolocation.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
Name="accessibility"
>
<File
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(ProjectDir)..";"$(ProjectDir)..\accessibility";"$(ProjectDir)..\accessibility\win";"$(ProjectDir)..\bridge";"$(ProjectDir)..\bridge\c";"$(ProjectDir)..\bridge\jsc";"$(ProjectDir)..\css";"$(ProjectDir)..\editing";"$(ProjectDir)..\fileapi";"$(ProjectDir)..\rendering";"$(ProjectDir)..\rendering\mathml";"$(ProjectDir)..\rendering\style";"$(ProjectDir)..\rendering\svg";"$(ProjectDir)..\bindings";"$(ProjectDir)..\bindings\generic";"$(ProjectDir)..\bindings\js";"$(ProjectDir)..\bindings\js\specialization";"$(ProjectDir)..\dom";"$(ProjectDir)..\dom\default";"$(ProjectDir)..\history";"$(ProjectDir)..\html";"$(ProjectDir)..\html\canvas";"$(ProjectDir)..\html\parser";"$(ProjectDir)..\html\shadow";"$(ProjectDir)..\inspector";"$(ProjectDir)..\loader";"$(ProjectDir)..\loader\appcache";"$(ProjectDir)..\loader\archive";"$(ProjectDir)..\loader\archive\cf";"$(ProjectDir)..\loader\cache";"$(ProjectDir)..\loader\icon";"$(ProjectDir)..\mathml";"$(ProjectDir)..\notifications";"$(ProjectDir)..\page";"$(ProjectDir)..\page\animation";"$(ProjectDir)..\page\scrolling";"$(ProjectDir)..\page\win";"$(ProjectDir)..\platform";"$(ProjectDir)..\platform\animation";"$(ProjectDir)..\platform\mock";"$(ProjectDir)..\platform\sql";"$(ProjectDir)..\platform\win";"$(ProjectDir)..\platform\network";"$(ProjectDir)..\platform\network\win";"$(ProjectDir)..\platform\cf";"$(ProjectDir)..\platform\graphics";"$(ProjectDir)..\platform\graphics\ca";"$(ProjectDir)..\platform\graphics\filters";"$(ProjectDir)..\platform\graphics\filters\arm";"$(ProjectDir)..\platform\graphics\opentype";"$(ProjectDir)..\platform\graphics\transforms";"$(ProjectDir)..\platform\text";"$(ProjectDir)..\platform\text\transcoder";"$(ProjectDir)..\platform\graphics\win";"$(ProjectDir)..\xml";"$(ProjectDir)..\xml\parser";"$(ConfigurationBuildDir)\obj\WebCore\DerivedSources";"$(ProjectDir)..\plugins";"$(ProjectDir)..\plugins\win";"$(ProjectDir)..\svg\animation";"$(ProjectDir)..\svg\graphics";"$(ProjectDir)..\svg\properties";"$(ProjectDir)..\svg\graphics\filters";"$(ProjectDir)..\svg";"$(ProjectDir)..\testing";"$(ProjectDir)..\wml";"$(ProjectDir)..\storage";"$(ProjectDir)..\websockets";"$(ProjectDir)..\workers";"$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\private";"$(ConfigurationBuildDir)\include\JavaScriptCore";"$(ConfigurationBuildDir)\include\private\JavaScriptCore";"$(ProjectDir)..\ForwardingHeaders";"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\private";"$(WebKitLibrariesDir)\include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitLibrariesDir)\include\sqlite";"$(WebKitLibrariesDir)\include\JavaScriptCore";"$(WebKitLibrariesDir)\include\zlib""
+ AdditionalIncludeDirectories=""$(ProjectDir)..";"$(ProjectDir)..\Modules\geolocation";"$(ProjectDir)..\accessibility";"$(ProjectDir)..\accessibility\win";"$(ProjectDir)..\bridge";"$(ProjectDir)..\bridge\c";"$(ProjectDir)..\bridge\jsc";"$(ProjectDir)..\css";"$(ProjectDir)..\editing";"$(ProjectDir)..\fileapi";"$(ProjectDir)..\rendering";"$(ProjectDir)..\rendering\mathml";"$(ProjectDir)..\rendering\style";"$(ProjectDir)..\rendering\svg";"$(ProjectDir)..\bindings";"$(ProjectDir)..\bindings\generic";"$(ProjectDir)..\bindings\js";"$(ProjectDir)..\bindings\js\specialization";"$(ProjectDir)..\dom";"$(ProjectDir)..\dom\default";"$(ProjectDir)..\history";"$(ProjectDir)..\html";"$(ProjectDir)..\html\canvas";"$(ProjectDir)..\html\parser";"$(ProjectDir)..\html\shadow";"$(ProjectDir)..\inspector";"$(ProjectDir)..\loader";"$(ProjectDir)..\loader\appcache";"$(ProjectDir)..\loader\archive";"$(ProjectDir)..\loader\archive\cf";"$(ProjectDir)..\loader\cache";"$(ProjectDir)..\loader\icon";"$(ProjectDir)..\mathml";"$(ProjectDir)..\notifications";"$(ProjectDir)..\page";"$(ProjectDir)..\page\animation";"$(ProjectDir)..\page\scrolling";"$(ProjectDir)..\page\win";"$(ProjectDir)..\platform";"$(ProjectDir)..\platform\animation";"$(ProjectDir)..\platform\mock";"$(ProjectDir)..\platform\sql";"$(ProjectDir)..\platform\win";"$(ProjectDir)..\platform\network";"$(ProjectDir)..\platform\network\win";"$(ProjectDir)..\platform\cf";"$(ProjectDir)..\platform\graphics";"$(ProjectDir)..\platform\graphics\ca";"$(ProjectDir)..\platform\graphics\filters";"$(ProjectDir)..\platform\graphics\filters\arm";"$(ProjectDir)..\platform\graphics\opentype";"$(ProjectDir)..\platform\graphics\transforms";"$(ProjectDir)..\platform\text";"$(ProjectDir)..\platform\text\transcoder";"$(ProjectDir)..\platform\graphics\win";"$(ProjectDir)..\xml";"$(ProjectDir)..\xml\parser";"$(ConfigurationBuildDir)\obj\WebCore\DerivedSources";"$(ProjectDir)..\plugins";"$(ProjectDir)..\plugins\win";"$(ProjectDir)..\svg\animation";"$(ProjectDir)..\svg\graphics";"$(ProjectDir)..\svg\properties";"$(ProjectDir)..\svg\graphics\filters";"$(ProjectDir)..\svg";"$(ProjectDir)..\testing";"$(ProjectDir)..\wml";"$(ProjectDir)..\storage";"$(ProjectDir)..\websockets";"$(ProjectDir)..\workers";"$(ConfigurationBuildDir)\include";"$(ConfigurationBuildDir)\include\private";"$(ConfigurationBuildDir)\include\JavaScriptCore";"$(ConfigurationBuildDir)\include\private\JavaScriptCore";"$(ProjectDir)..\ForwardingHeaders";"$(WebKitLibrariesDir)\include";"$(WebKitLibrariesDir)\include\private";"$(WebKitLibrariesDir)\include\private\JavaScriptCore";"$(WebKitLibrariesDir)\include\pthreads";"$(WebKitLibrariesDir)\include\sqlite";"$(WebKitLibrariesDir)\include\JavaScriptCore";"$(WebKitLibrariesDir)\include\zlib""
PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebCorePrefix.h"
9705997A107D975200A50A7C /* PolicyChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 97059976107D975200A50A7C /* PolicyChecker.h */; settings = {ATTRIBUTES = (Private, ); }; };
970B728A144FFAC600F00A37 /* EventInterfaces.h in Headers */ = {isa = PBXBuildFile; fileRef = 970B7289144FFAC600F00A37 /* EventInterfaces.h */; settings = {ATTRIBUTES = (Private, ); }; };
970B72A6145008EB00F00A37 /* EventHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 970B72A5145008EB00F00A37 /* EventHeaders.h */; };
+ 9711460314EF009A00674FD9 /* NavigatorGeolocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9711460014EF009A00674FD9 /* NavigatorGeolocation.cpp */; };
+ 9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9711460114EF009A00674FD9 /* NavigatorGeolocation.h */; };
97205AAF123928CA00B17380 /* FTPDirectoryDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97205AAD123928CA00B17380 /* FTPDirectoryDocument.cpp */; };
97205AB0123928CA00B17380 /* FTPDirectoryDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 97205AAE123928CA00B17380 /* FTPDirectoryDocument.h */; };
97205AB51239291000B17380 /* ImageDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97205AB11239291000B17380 /* ImageDocument.cpp */; };
97059976107D975200A50A7C /* PolicyChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolicyChecker.h; sourceTree = "<group>"; };
970B7289144FFAC600F00A37 /* EventInterfaces.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventInterfaces.h; sourceTree = "<group>"; };
970B72A5145008EB00F00A37 /* EventHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventHeaders.h; sourceTree = "<group>"; };
+ 9711460014EF009A00674FD9 /* NavigatorGeolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NavigatorGeolocation.cpp; path = Modules/geolocation/NavigatorGeolocation.cpp; sourceTree = "<group>"; };
+ 9711460114EF009A00674FD9 /* NavigatorGeolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NavigatorGeolocation.h; path = Modules/geolocation/NavigatorGeolocation.h; sourceTree = "<group>"; };
+ 9711460214EF009A00674FD9 /* NavigatorGeolocation.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = NavigatorGeolocation.idl; path = Modules/geolocation/NavigatorGeolocation.idl; sourceTree = "<group>"; };
97205AAD123928CA00B17380 /* FTPDirectoryDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FTPDirectoryDocument.cpp; sourceTree = "<group>"; };
97205AAE123928CA00B17380 /* FTPDirectoryDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTPDirectoryDocument.h; sourceTree = "<group>"; };
97205AB11239291000B17380 /* ImageDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageDocument.cpp; sourceTree = "<group>"; };
EDEC98020AED7E170059137F /* WebCorePrefix.h */,
9307061309E0CA8200B17FE4 /* DerivedSources.make */,
93F19B1908245E59001E9ABC /* Info.plist */,
+ 971145FE14EF006E00674FD9 /* Modules */,
29A812040FBB9B4100510293 /* accessibility */,
BC1A3790097C6F970019F3D8 /* bindings */,
1A569CC40D7E2B60007C3983 /* bridge */,
tabWidth = 4;
usesTabs = 0;
};
+ 971145FE14EF006E00674FD9 /* Modules */ = {
+ isa = PBXGroup;
+ children = (
+ 971145FF14EF007900674FD9 /* geolocation */,
+ );
+ name = Modules;
+ sourceTree = "<group>";
+ };
+ 971145FF14EF007900674FD9 /* geolocation */ = {
+ isa = PBXGroup;
+ children = (
+ 9711460014EF009A00674FD9 /* NavigatorGeolocation.cpp */,
+ 9711460114EF009A00674FD9 /* NavigatorGeolocation.h */,
+ 9711460214EF009A00674FD9 /* NavigatorGeolocation.idl */,
+ );
+ name = geolocation;
+ sourceTree = "<group>";
+ };
976D6C57122B8A18001FD1F7 /* fileapi */ = {
isa = PBXGroup;
children = (
979F43D41075E44A0000F83B /* NavigationScheduler.h in Headers */,
A9C6E5A60D746458006442E9 /* Navigator.h in Headers */,
E12719C70EEEC16800F61213 /* NavigatorBase.h in Headers */,
+ 9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */,
97CC3AE314E8E4A200894988 /* NavigatorSupplement.h in Headers */,
8A309C9F123950BE00CB9204 /* NestingLevelIncrementer.h in Headers */,
656D37430ADBA5DE00A4554D /* NetscapePlugInStreamLoader.h in Headers */,
979F43D31075E44A0000F83B /* NavigationScheduler.cpp in Sources */,
A9C6E5A50D746458006442E9 /* Navigator.cpp in Sources */,
E12719CA0EEEC21300F61213 /* NavigatorBase.cpp in Sources */,
+ 9711460314EF009A00674FD9 /* NavigatorGeolocation.cpp in Sources */,
97CC3AE214E8E4A200894988 /* NavigatorSupplement.cpp in Sources */,
5D874F130D161D3200796C3B /* NetscapePlugInStreamLoader.cpp in Sources */,
59C27F05138D28C10079B7E2 /* NetworkResourcesData.cpp in Sources */,
push(@txtGetProps, " g_value_take_string(value, convertToUTF8String(${getterFunctionName}(" . join(", ", @getterArguments) . ")));\n");
$done = 1;
} elsif ($gtype eq "object") {
- push(@txtGetProps, " RefPtr<WebCore::${propType}> ptr = coreSelf->${getPropNameFunction}(" . (@{$attribute->getterExceptions} ? "ec" : "") . ");\n");
+ push(@txtGetProps, " RefPtr<WebCore::${propType}> ptr = ${getterFunctionName}(" . join(", ", @getterArguments) . ");\n");
push(@txtGetProps, " g_value_set_object(value, WebKit::kit(ptr.get()));\n");
$done = 1;
}
#include "WebDOMTestInterface.h"
#include "KURL.h"
+#include "Node.h"
#include "TestInterface.h"
#include "TestSupplemental.h"
+#include "WebDOMNode.h"
#include "WebDOMString.h"
#include "WebExceptionHandler.h"
#include "wtf/text/AtomicString.h"
}
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+WebDOMNode WebDOMTestInterface::supplementalNode() const
+{
+ if (!impl())
+ return WebDOMNode();
+
+ return toWebKit(WTF::getPtr(TestSupplemental::supplementalNode(impl())));
+}
+
+void WebDOMTestInterface::setSupplementalNode(const WebDOMNode& newSupplementalNode)
+{
+ if (!impl())
+ return;
+
+ TestSupplemental::setSupplementalNode(impl(), toWebCore(newSupplementalNode));
+}
+
+#endif
#if ENABLE(Condition11) || ENABLE(Condition12)
void WebDOMTestInterface::supplementalMethod1()
class TestInterface;
};
+class WebDOMNode;
class WebDOMTestInterface : public WebDOMObject {
public:
WebDOMString supplementalStr2() const;
void setSupplementalStr2(const WebDOMString&);
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ WebDOMNode supplementalNode() const;
+ void setSupplementalNode(const WebDOMNode&);
+#endif
void supplementalMethod1();
#include "DOMObjectCache.h"
#include "ExceptionCode.h"
#include "JSMainThreadExecState.h"
+#include "Node.h"
#include "TestInterface.h"
#include "TestObj.h"
#include "TestSupplemental.h"
#include "WebKitDOMBinding.h"
#include "gobject/ConvertToUTF8String.h"
+#include "webkit/WebKitDOMNode.h"
+#include "webkit/WebKitDOMNodePrivate.h"
#include "webkit/WebKitDOMTestInterface.h"
#include "webkit/WebKitDOMTestInterfacePrivate.h"
#include "webkit/WebKitDOMTestObj.h"
#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
}
+WebKitDOMNode*
+webkit_dom_test_interface_get_supplemental_node(WebKitDOMTestInterface* self)
+{
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ g_return_val_if_fail(self, 0);
+ WebCore::JSMainThreadNullState state;
+ WebCore::TestInterface * item = WebKit::core(self);
+ PassRefPtr<WebCore::Node> g_res = WTF::getPtr(TestSupplemental::supplementalNode(item));
+ WebKitDOMNode* res = WebKit::kit(g_res.get());
+ return res;
+#else
+ return NULL;
+#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
+}
+
+void
+webkit_dom_test_interface_set_supplemental_node(WebKitDOMTestInterface* self, WebKitDOMNode* value)
+{
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ g_return_if_fail(self);
+ WebCore::JSMainThreadNullState state;
+ WebCore::TestInterface * item = WebKit::core(self);
+ g_return_if_fail(value);
+ WebCore::Node * converted_value = NULL;
+ if (value != NULL) {
+ converted_value = WebKit::core(value);
+ g_return_if_fail(converted_value);
+ }
+ TestSupplemental::setSupplementalNode(item, converted_value);
+#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
+}
+
G_DEFINE_TYPE(WebKitDOMTestInterface, webkit_dom_test_interface, WEBKIT_TYPE_DOM_OBJECT)
#if ENABLE(Condition11) || ENABLE(Condition12)
PROP_SUPPLEMENTAL_STR2,
#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ PROP_SUPPLEMENTAL_NODE,
+#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
};
break;
}
#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ case PROP_SUPPLEMENTAL_NODE:
+ {
+ RefPtr<WebCore::Node> ptr = TestSupplemental::supplementalNode(coreSelf);
+ g_value_set_object(value, WebKit::kit(ptr.get()));
+ break;
+ }
+#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
"", /* default */
WEBKIT_PARAM_READWRITE));
#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ g_object_class_install_property(gobjectClass,
+ PROP_SUPPLEMENTAL_NODE,
+ g_param_spec_object("supplemental-node", /* name */
+ "test_interface_supplemental-node", /* short description */
+ "read-write WebKitDOMNode* TestInterface.supplemental-node", /* longer - could do with some extra doc stuff here */
+ WEBKIT_TYPE_DOM_NODE, /* gobject type */
+ WEBKIT_PARAM_READWRITE));
+#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
}
WEBKIT_API void
webkit_dom_test_interface_set_supplemental_str2(WebKitDOMTestInterface* self, const gchar* value);
+/**
+ * webkit_dom_test_interface_get_supplemental_node:
+ * @self: A #WebKitDOMTestInterface
+ *
+ * Returns: (transfer none):
+ *
+**/
+WEBKIT_API WebKitDOMNode*
+webkit_dom_test_interface_get_supplemental_node(WebKitDOMTestInterface* self);
+
+/**
+ * webkit_dom_test_interface_set_supplemental_node:
+ * @self: A #WebKitDOMTestInterface
+ * @value: A #WebKitDOMNode
+ *
+ * Returns: (transfer none):
+ *
+**/
+WEBKIT_API void
+webkit_dom_test_interface_set_supplemental_node(WebKitDOMTestInterface* self, WebKitDOMNode* value);
+
G_END_DECLS
#endif /* WebKitDOMTestInterface_h */
#include <wtf/GetPtr.h>
#if ENABLE(Condition11) || ENABLE(Condition12)
+#include "JSNode.h"
#include "KURL.h"
#include <runtime/JSString.h>
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+#include "Node.h"
+#endif
+
using namespace JSC;
namespace WebCore {
#if ENABLE(Condition11) || ENABLE(Condition12)
{ "supplementalStr3", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceSupplementalStr3), (intptr_t)setJSTestInterfaceSupplementalStr3, NoIntrinsic },
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ { "supplementalNode", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceSupplementalNode), (intptr_t)setJSTestInterfaceSupplementalNode, NoIntrinsic },
+#endif
{ "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceConstructor), (intptr_t)0, NoIntrinsic },
{ 0, 0, 0, 0, NoIntrinsic }
};
-static const HashTable JSTestInterfaceTable = { 9, 7, JSTestInterfaceTableValues, 0 };
+static const HashTable JSTestInterfaceTable = { 16, 15, JSTestInterfaceTableValues, 0 };
/* Hash table for constructor */
static const HashTableValue JSTestInterfaceConstructorTableValues[] =
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+JSValue jsTestInterfaceSupplementalNode(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+ JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
+ UNUSED_PARAM(exec);
+ TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+ JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalNode(impl)));
+ return result;
+}
+
+#endif
+
JSValue jsTestInterfaceConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSTestInterface* domObject = static_cast<JSTestInterface*>(asObject(slotBase));
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+ JSTestInterface* castedThis = static_cast<JSTestInterface*>(thisObject);
+ TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+ TestSupplemental::setSupplementalNode(impl, toNode(value));
+}
+
+#endif
+
JSValue JSTestInterface::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
{
return getDOMConstructor<JSTestInterfaceConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
void setJSTestInterfaceSupplementalStr2(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsTestInterfaceSupplementalStr3(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSTestInterfaceSupplementalStr3(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestInterfaceSupplementalNode(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestInterfaceSupplementalNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
// Constants
#if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
+@class DOMNode;
@class DOMTestObj;
@class NSString;
- (NSString *)supplementalStr3;
- (void)setSupplementalStr3:(NSString *)newSupplementalStr3;
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+- (DOMNode *)supplementalNode;
+- (void)setSupplementalNode:(DOMNode *)newSupplementalNode;
+#endif
- (void)supplementalMethod1;
- (DOMTestObj *)supplementalMethod2:(NSString *)strArg objArg:(DOMTestObj *)objArg;
- (void)supplementalMethod3;
#import "ExceptionHandlers.h"
#import "JSMainThreadExecState.h"
#import "KURL.h"
+#import "Node.h"
#import "TestInterface.h"
#import "TestObj.h"
#import "TestSupplemental.h"
}
#endif
+#if ENABLE(Condition11) || ENABLE(Condition12)
+- (DOMNode *)supplementalNode
+{
+ WebCore::JSMainThreadNullState state;
+ return kit(WTF::getPtr(TestSupplemental::supplementalNode(IMPL)));
+}
+
+- (void)setSupplementalNode:(DOMNode *)newSupplementalNode
+{
+ WebCore::JSMainThreadNullState state;
+ ASSERT(newSupplementalNode);
+
+ TestSupplemental::setSupplementalNode(IMPL, core(newSupplementalNode));
+}
+#endif
+
#if ENABLE(Condition11) || ENABLE(Condition12)
- (void)supplementalMethod1
readonly attribute DOMString supplementalStr1;
attribute DOMString supplementalStr2;
attribute [CustomGetter, CustomSetter] DOMString supplementalStr3;
+ attribute Node supplementalNode;
void supplementalMethod1();
[CallWith=ScriptExecutionContext] TestObj supplementalMethod2(in DOMString strArg, in TestObj objArg) raises(DOMException);
#include "V8BindingState.h"
#include "V8DOMWrapper.h"
#include "V8IsolatedContext.h"
+#include "V8Node.h"
#include "V8Proxy.h"
#include "V8TestObj.h"
#include <wtf/GetPtr.h>
#if ENABLE(Condition11) || ENABLE(Condition12)
+static v8::Handle<v8::Value> supplementalNodeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestInterface.supplementalNode._get");
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ return toV8(TestSupplemental::supplementalNode(imp));
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
+static void supplementalNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+ INC_STATS("DOM.TestInterface.supplementalNode._set");
+ TestInterface* imp = V8TestInterface::toNative(info.Holder());
+ Node* v = V8Node::HasInstance(value) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
+ TestSupplemental::setSupplementalNode(imp, WTF::getPtr(v));
+ return;
+}
+
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
+
+#if ENABLE(Condition11) || ENABLE(Condition12)
+
static v8::Handle<v8::Value> supplementalMethod1Callback(const v8::Arguments& args)
{
INC_STATS("DOM.TestInterface.supplementalMethod1");
// Attribute 'supplementalStr3' (Type: 'attribute' ExtAttr: 'CustomSetter CustomGetter Conditional ImplementedBy')
{"supplementalStr3", V8TestInterface::supplementalStr3AccessorGetter, V8TestInterface::supplementalStr3AccessorSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
#endif // ENABLE(Condition11) || ENABLE(Condition12)
+#if ENABLE(Condition11) || ENABLE(Condition12)
+ // Attribute 'supplementalNode' (Type: 'attribute' ExtAttr: 'Conditional ImplementedBy')
+ {"supplementalNode", TestInterfaceInternal::supplementalNodeAttrGetter, TestInterfaceInternal::supplementalNodeAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+#endif // ENABLE(Condition11) || ENABLE(Condition12)
};
static const BatchedCallback TestInterfaceCallbacks[] = {
child->setView(0);
if (child->ownerElement() && child->page())
child->page()->decrementFrameCount();
- // FIXME: The page isn't being destroyed, so it's not right to call a function named pageDestroyed().
- child->pageDestroyed();
+ child->detachFromPage();
m_frame->tree()->removeChild(child);
}
parent->loader()->scheduleCheckCompleted();
} else {
m_frame->setView(0);
- // FIXME: The page isn't being destroyed, so it's not right to call a function named pageDestroyed().
- m_frame->pageDestroyed();
+ m_frame->detachFromPage();
}
}
clear();
}
+void DOMWindow::willDetachPage()
+{
+ InspectorInstrumentation::frameWindowDiscarded(m_frame, this);
+
+#if ENABLE(NOTIFICATIONS)
+ // Clearing Notifications requests involves accessing the client so it must be done
+ // before the frame is detached.
+ resetNotifications();
+#endif
+
+ HashSet<DOMWindowProperty*>::iterator stop = m_properties.end();
+ for (HashSet<DOMWindowProperty*>::iterator it = m_properties.begin(); it != stop; ++it)
+ (*it)->willDetachPage();
+}
+
void DOMWindow::registerProperty(DOMWindowProperty* property)
{
m_properties.add(property);
}
#endif
-void DOMWindow::pageDestroyed()
-{
- InspectorInstrumentation::frameWindowDiscarded(m_frame, this);
-#if ENABLE(NOTIFICATIONS)
- // Clearing Notifications requests involves accessing the client so it must be done
- // before the frame is detached.
- resetNotifications();
-#endif
-}
-
-void DOMWindow::resetGeolocation()
-{
- // Geolocation should cancel activities and permission requests when the page is detached.
- if (m_navigator)
- m_navigator->resetGeolocation();
-}
-
#if ENABLE(INDEXED_DATABASE)
void DOMWindow::setIDBFactory(PassRefPtr<IDBFactory> idbFactory)
{
virtual DOMWindow* toDOMWindow();
- virtual void frameDestroyed() OVERRIDE;
-
void registerProperty(DOMWindowProperty*);
void unregisterProperty(DOMWindowProperty*);
void printErrorMessage(const String&);
String crossDomainAccessErrorMessage(DOMWindow* activeWindow);
- void pageDestroyed();
- void resetGeolocation();
-
void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, const String& targetOrigin, DOMWindow* source, ExceptionCode&);
// FIXME: remove this when we update the ObjC bindings (bug #28774).
void postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort*, const String& targetOrigin, DOMWindow* source, ExceptionCode&);
private:
explicit DOMWindow(Frame*);
+ virtual void frameDestroyed() OVERRIDE;
+ virtual void willDetachPage() OVERRIDE;
+
virtual void refEventTarget() { ref(); }
virtual void derefEventTarget() { deref(); }
virtual EventTargetData* eventTargetData();
m_frame = 0;
}
+void DOMWindowProperty::willDetachPage()
+{
+ // Subclasses should override this function to handle this notification.
+}
+
}
class DOMWindowProperty {
public:
explicit DOMWindowProperty(Frame*);
+
virtual void disconnectFrame();
+ virtual void willDetachPage();
Frame* frame() const { return m_frame; }
return m_domWindow.get();
}
-void Frame::pageDestroyed()
+void Frame::willDetachPage()
{
- // FIXME: Rename this function, since it's called not only from Page destructor, but in several other cases.
- // This cleanup is needed whenever we remove a frame from page.
-
if (Frame* parent = tree()->parent())
parent->loader()->checkLoadComplete();
- if (m_domWindow) {
- m_domWindow->resetGeolocation();
#if ENABLE(NOTIFICATIONS)
+ if (m_domWindow)
m_domWindow->resetNotifications();
#endif
- m_domWindow->pageDestroyed();
- }
+
+ HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.end();
+ for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObservers.begin(); it != stop; ++it)
+ (*it)->willDetachPage();
// FIXME: It's unclear as to why this is called more than once, but it is,
// so page() could be NULL.
script()->clearScriptObjects();
script()->updatePlatformScriptObjects();
-
- detachFromPage();
}
void Frame::disconnectOwnerElement()
m_page->decrementFrameCount();
}
- // FIXME: We should ideally allow existing Geolocation activities to continue
- // when the Geolocation's iframe is reparented.
- // See https://bugs.webkit.org/show_bug.cgi?id=55577
- // and https://bugs.webkit.org/show_bug.cgi?id=52877
if (m_domWindow) {
- m_domWindow->resetGeolocation();
#if ENABLE(NOTIFICATIONS)
m_domWindow->resetNotifications();
#endif
}
+ HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.end();
+ for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObservers.begin(); it != stop; ++it)
+ (*it)->willDetachPage();
+
m_page = newPage;
if (newPage)
void addDestructionObserver(FrameDestructionObserver*);
void removeDestructionObserver(FrameDestructionObserver*);
+ void willDetachPage();
void detachFromPage();
- void pageDestroyed();
void disconnectOwnerElement();
Page* page() const;
inline void Frame::detachFromPage()
{
+ willDetachPage();
m_page = 0;
}
m_frame = 0;
}
+void FrameDestructionObserver::willDetachPage()
+{
+ // Subclasses should override this function to handle this notification.
+}
+
}
class FrameDestructionObserver {
public:
explicit FrameDestructionObserver(Frame*);
+
virtual void frameDestroyed();
+ virtual void willDetachPage();
+
Frame* frame() const { return m_frame; }
protected:
return m_suppliments.get(name.impl());
}
-void Navigator::resetGeolocation()
-{
- if (m_geolocation)
- m_geolocation->reset();
-}
-
// If this function returns true, we need to hide the substring "4." that would otherwise
// appear in the appVersion string. This is to avoid problems with old versions of a
// library called OpenCube QuickMenu, which as of this writing is still being used on
return m_frame->settings()->isJavaEnabled();
}
-Geolocation* Navigator::geolocation() const
-{
- if (!m_geolocation)
- m_geolocation = Geolocation::create(m_frame);
- return m_geolocation.get();
-}
-
#if ENABLE(POINTER_LOCK)
PointerLock* Navigator::webkitPointer() const
{
class DOMMimeTypeArray;
class DOMPluginArray;
class Frame;
-class Geolocation;
class PointerLock;
class PluginData;
static PassRefPtr<Navigator> create(Frame* frame) { return adoptRef(new Navigator(frame)); }
virtual ~Navigator();
- void resetGeolocation();
-
String appVersion() const;
String language() const;
DOMPluginArray* plugins() const;
virtual String userAgent() const;
- Geolocation* geolocation() const;
-
#if ENABLE(POINTER_LOCK)
PointerLock* webkitPointer() const;
#endif
mutable RefPtr<DOMPluginArray> m_plugins;
mutable RefPtr<DOMMimeTypeArray> m_mimeTypes;
- mutable RefPtr<Geolocation> m_geolocation;
#if ENABLE(POINTER_LOCK)
mutable RefPtr<PointerLock> m_pointer;
#endif
readonly attribute boolean onLine;
-#if defined(ENABLE_GEOLOCATION) && ENABLE_GEOLOCATION
- readonly attribute [V8EnabledAtRuntime] Geolocation geolocation;
-#endif
-
#if defined(ENABLE_POINTER_LOCK) && ENABLE_POINTER_LOCK
readonly attribute [V8EnabledAtRuntime] PointerLock webkitPointer;
#endif
allPages->remove(this);
for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
- frame->pageDestroyed();
+ frame->detachFromPage();
m_editorClient->pageDestroyed();
?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QAEXXZ
?userPreferredLanguages@WebCore@@YA?AV?$Vector@VString@WTF@@$0A@@WTF@@XZ
?view@Document@WebCore@@QBEPAVFrameView@2@XZ
+ ?willDetachPage@FrameDestructionObserver@WebCore@@UAEXXZ
_ZN7WebCore24FrameDestructionObserverC2EPNS_5FrameE;
_ZN7WebCore24FrameDestructionObserver12observeFrameEPNS_5FrameE;
_ZN7WebCore24FrameDestructionObserver14frameDestroyedEv;
+_ZN7WebCore24FrameDestructionObserver14willDetachPageEv;
_ZN7WebCore22RuntimeEnabledFeatures31isMultipleShadowSubtreesEnabledE;
local:
_Z*;