Commit 047b877c authored by abarth@webkit.org's avatar 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:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2f2c38e7
SET(WebCore_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}"
"${WEBCORE_DIR}/Modules/geolocation"
"${WEBCORE_DIR}/accessibility"
"${WEBCORE_DIR}/bindings"
"${WEBCORE_DIR}/bindings/generic"
......@@ -87,6 +88,7 @@ SET(WebCore_INCLUDE_DIRECTORIES
)
SET(WebCore_IDL_INCLUDES
Modules/geolocation
bindings/generic
css
dom
......@@ -105,6 +107,8 @@ SET(WebCore_IDL_INCLUDES
)
SET(WebCore_IDL_FILES
Modules/geolocation/NavigatorGeolocation.idl
css/Counter.idl
css/CSSCharsetRule.idl
css/CSSFontFaceRule.idl
......@@ -400,6 +404,8 @@ SET(WebCore_IDL_FILES
)
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
......@@ -28,6 +28,7 @@
VPATH = \
$(WebCore) \
$(WebCore)/Modules/geolocation \
$(WebCore)/bindings/generic \
$(WebCore)/bindings/js \
$(WebCore)/bindings/objc \
......@@ -53,6 +54,7 @@ VPATH = \
#
BINDING_IDLS = \
$(WebCore)/Modules/geolocation/NavigatorGeolocation.idl \
$(WebCore)/css/CSSCharsetRule.idl \
$(WebCore)/css/CSSFontFaceRule.idl \
$(WebCore)/css/CSSImportRule.idl \
......
......@@ -86,6 +86,7 @@ STYLESHEETS_EMBED = \
$$PWD/css/mobileThemeQt.css
IDL_BINDINGS += \
$$PWD/Modules/geolocation/NavigatorGeolocation.idl \
$$PWD/css/Counter.idl \
$$PWD/css/CSSCharsetRule.idl \
$$PWD/css/CSSFontFaceRule.idl \
......@@ -684,6 +685,7 @@ else: generator = JS
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 \
......
......@@ -11,6 +11,7 @@ webcore_cppflags += \
-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 \
......@@ -758,6 +759,7 @@ DerivedSources/ANGLE/glslang_tab.cpp: Source/ThirdParty/ANGLE/src/compiler/glsla
DerivedSources/ANGLE/glslang_tab.h: DerivedSources/ANGLE/glslang_tab.cpp
IDL_PATH := \
$(WebCore)/Modules/geolocation \
$(WebCore)/bindings/js \
$(WebCore)/css \
$(WebCore)/dom \
......
......@@ -650,6 +650,7 @@ webcore_built_sources += \
DerivedSources/WebCore/XPathGrammar.h
dom_binding_idls += \
$(WebCore)/Modules/geolocation/NavigatorGeolocation.idl \
$(WebCore)/css/CSSCharsetRule.idl \
$(WebCore)/css/CSSFontFaceRule.idl \
$(WebCore)/css/CSSImportRule.idl \
......@@ -951,6 +952,8 @@ dom_binding_idls += \
$(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 \
......
/*
* 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
/*
* 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
/*
* 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
};
}
......@@ -34,6 +34,8 @@ include_webinspector {
}
SOURCES += \
Modules/geolocation/NavigatorGeolocation.cpp \
\
accessibility/AccessibilityImageMapLink.cpp \
accessibility/AccessibilityMediaControls.cpp \
accessibility/AccessibilityMenuList.cpp \
......
......@@ -672,6 +672,7 @@ __ZN7WebCore24FrameDestructionObserverD2Ev
__ZN7WebCore24FrameDestructionObserverC2EPNS_5FrameE
__ZN7WebCore24FrameDestructionObserver12observeFrameEPNS_5FrameE
__ZN7WebCore24FrameDestructionObserver14frameDestroyedEv
__ZN7WebCore24FrameDestructionObserver14willDetachPageEv
__ZN7WebCore24keyIdentifierForKeyEventEP7NSEvent
__ZN7WebCore24notifyHistoryItemChangedE
__ZN7WebCore25HistoryPropertyListWriter11releaseDataEv
......
......@@ -52,6 +52,7 @@
'../',
'../..',
'../Modules/gamepad',
'../Modules/geolocation',
'../Modules/intents',
'../Modules/indexeddb',
'../accessibility',
......
......@@ -720,6 +720,7 @@
'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',
......@@ -1277,6 +1278,8 @@
'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',
......
......@@ -18,6 +18,7 @@ WEBCORE_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/WebCore/$${GENERATED_S
INCLUDEPATH += \
$$SOURCE_DIR \
$$SOURCE_DIR/Modules/geolocation \
$$SOURCE_DIR/accessibility \
$$SOURCE_DIR/bindings \
$$SOURCE_DIR/bindings/generic \
......
......@@ -24050,6 +24050,22 @@
>
</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"
>
......@@ -7,7 +7,7 @@
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\bridge\jsc&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\fileapi&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\mathml&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\rendering\svg&quot;;&quot;$(ProjectDir)..\bindings&quot;;&quot;$(ProjectDir)..\bindings\generic&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\bindings\js\specialization&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\html\parser&quot;;&quot;$(ProjectDir)..\html\shadow&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\cache&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\mathml&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\scrolling&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\ca&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\filters\arm&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\text\transcoder&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(ProjectDir)..\xml\parser&quot;;&quot;$(ConfigurationBuildDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\animation&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\properties&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\testing&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(ConfigurationBuildDir)\include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\zlib&quot;"
AdditionalIncludeDirectories="&quot;$(ProjectDir)..&quot;;&quot;$(ProjectDir)..\Modules\geolocation&quot;;&quot;$(ProjectDir)..\accessibility&quot;;&quot;$(ProjectDir)..\accessibility\win&quot;;&quot;$(ProjectDir)..\bridge&quot;;&quot;$(ProjectDir)..\bridge\c&quot;;&quot;$(ProjectDir)..\bridge\jsc&quot;;&quot;$(ProjectDir)..\css&quot;;&quot;$(ProjectDir)..\editing&quot;;&quot;$(ProjectDir)..\fileapi&quot;;&quot;$(ProjectDir)..\rendering&quot;;&quot;$(ProjectDir)..\rendering\mathml&quot;;&quot;$(ProjectDir)..\rendering\style&quot;;&quot;$(ProjectDir)..\rendering\svg&quot;;&quot;$(ProjectDir)..\bindings&quot;;&quot;$(ProjectDir)..\bindings\generic&quot;;&quot;$(ProjectDir)..\bindings\js&quot;;&quot;$(ProjectDir)..\bindings\js\specialization&quot;;&quot;$(ProjectDir)..\dom&quot;;&quot;$(ProjectDir)..\dom\default&quot;;&quot;$(ProjectDir)..\history&quot;;&quot;$(ProjectDir)..\html&quot;;&quot;$(ProjectDir)..\html\canvas&quot;;&quot;$(ProjectDir)..\html\parser&quot;;&quot;$(ProjectDir)..\html\shadow&quot;;&quot;$(ProjectDir)..\inspector&quot;;&quot;$(ProjectDir)..\loader&quot;;&quot;$(ProjectDir)..\loader\appcache&quot;;&quot;$(ProjectDir)..\loader\archive&quot;;&quot;$(ProjectDir)..\loader\archive\cf&quot;;&quot;$(ProjectDir)..\loader\cache&quot;;&quot;$(ProjectDir)..\loader\icon&quot;;&quot;$(ProjectDir)..\mathml&quot;;&quot;$(ProjectDir)..\notifications&quot;;&quot;$(ProjectDir)..\page&quot;;&quot;$(ProjectDir)..\page\animation&quot;;&quot;$(ProjectDir)..\page\scrolling&quot;;&quot;$(ProjectDir)..\page\win&quot;;&quot;$(ProjectDir)..\platform&quot;;&quot;$(ProjectDir)..\platform\animation&quot;;&quot;$(ProjectDir)..\platform\mock&quot;;&quot;$(ProjectDir)..\platform\sql&quot;;&quot;$(ProjectDir)..\platform\win&quot;;&quot;$(ProjectDir)..\platform\network&quot;;&quot;$(ProjectDir)..\platform\network\win&quot;;&quot;$(ProjectDir)..\platform\cf&quot;;&quot;$(ProjectDir)..\platform\graphics&quot;;&quot;$(ProjectDir)..\platform\graphics\ca&quot;;&quot;$(ProjectDir)..\platform\graphics\filters&quot;;&quot;$(ProjectDir)..\platform\graphics\filters\arm&quot;;&quot;$(ProjectDir)..\platform\graphics\opentype&quot;;&quot;$(ProjectDir)..\platform\graphics\transforms&quot;;&quot;$(ProjectDir)..\platform\text&quot;;&quot;$(ProjectDir)..\platform\text\transcoder&quot;;&quot;$(ProjectDir)..\platform\graphics\win&quot;;&quot;$(ProjectDir)..\xml&quot;;&quot;$(ProjectDir)..\xml\parser&quot;;&quot;$(ConfigurationBuildDir)\obj\WebCore\DerivedSources&quot;;&quot;$(ProjectDir)..\plugins&quot;;&quot;$(ProjectDir)..\plugins\win&quot;;&quot;$(ProjectDir)..\svg\animation&quot;;&quot;$(ProjectDir)..\svg\graphics&quot;;&quot;$(ProjectDir)..\svg\properties&quot;;&quot;$(ProjectDir)..\svg\graphics\filters&quot;;&quot;$(ProjectDir)..\svg&quot;;&quot;$(ProjectDir)..\testing&quot;;&quot;$(ProjectDir)..\wml&quot;;&quot;$(ProjectDir)..\storage&quot;;&quot;$(ProjectDir)..\websockets&quot;;&quot;$(ProjectDir)..\workers&quot;;&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(ConfigurationBuildDir)\include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\include\private\JavaScriptCore&quot;;&quot;$(ProjectDir)..\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;;&quot;$(WebKitLibrariesDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(WebKitLibrariesDir)\include\sqlite&quot;;&quot;$(WebKitLibrariesDir)\include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include\zlib&quot;"
PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="WebCorePrefix.h"
......
......@@ -3325,6 +3325,8 @@
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 */; };
......@@ -10188,6 +10190,9 @@
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>"; };
......@@ -13462,6 +13467,7 @@
EDEC98020AED7E170059137F /* WebCorePrefix.h */,
9307061309E0CA8200B17FE4 /* DerivedSources.make */,
93F19B1908245E59001E9ABC /* Info.plist */,
971145FE14EF006E00674FD9 /* Modules */,
29A812040FBB9B4100510293 /* accessibility */,
BC1A3790097C6F970019F3D8 /* bindings */,
1A569CC40D7E2B60007C3983 /* bridge */,
......@@ -17080,6 +17086,24 @@
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 = (
......@@ -23288,6 +23312,7 @@
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 */,
......@@ -26443,6 +26468,7 @@
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 */,
......@@ -418,7 +418,7 @@ sub GenerateProperty {
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;
}
......
......@@ -25,8 +25,10 @@
#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"
......@@ -105,6 +107,24 @@ void WebDOMTestInterface::setSupplementalStr2(const WebDOMString& newSupplementa
TestSupplemental::setSupplementalStr2(impl(), newSupplementalStr2);
}
#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)
......
......@@ -32,6 +32,7 @@ namespace WebCore {
class TestInterface;
};
class WebDOMNode;
class WebDOMTestInterface : public WebDOMObject {
public:
......@@ -58,6 +59,10 @@ public:
WebDOMString supplementalStr2() const;
void setSupplementalStr2(const WebDOMString&);
#endif
#if ENABLE(Condition11) || ENABLE(Condition12)
WebDOMNode supplementalNode() const;
void setSupplementalNode(const WebDOMNode&);
#endif
void supplementalMethod1();
......
......@@ -28,11 +28,14 @@
#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"
......@@ -135,6 +138,38 @@ webkit_dom_test_interface_set_supplemental_str2(WebKitDOMTestInterface* self, co
#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)
......@@ -159,6 +194,9 @@ enum {
#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) */
};
......@@ -217,6 +255,14 @@ static void webkit_dom_test_interface_get_property(GObject* object, guint prop_i
g_value_take_string(value, convertToUTF8String(TestSupplemental::supplementalStr2(coreSelf)));
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);
......@@ -258,6 +304,15 @@ static void webkit_dom_test_interface_class_init(WebKitDOMTestInterfaceClass* re
"", /* 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) */
}
......
......@@ -100,6 +100,27 @@ webkit_dom_test_interface_get_supplemental_str2(WebKitDOMTestInterface* self);
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 */
......@@ -35,10 +35,15 @@
#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 {
......@@ -56,12 +61,15 @@ static const HashTableValue JSTestInterfaceTableValues[] =
#endif
#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 };