Changeset 108428 in webkit


Ignore:
Timestamp:
Feb 21, 2012 6:22:15 PM (12 years ago)
Author:
abarth@webkit.org
Message:

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:
Location:
trunk/Source
Files:
4 added
40 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r108404 r108428  
    11SET(WebCore_INCLUDE_DIRECTORIES
    22    "${WEBCORE_DIR}"
     3    "${WEBCORE_DIR}/Modules/geolocation"
    34    "${WEBCORE_DIR}/accessibility"
    45    "${WEBCORE_DIR}/bindings"
     
    8889
    8990SET(WebCore_IDL_INCLUDES
     91    Modules/geolocation
    9092    bindings/generic
    9193    css
     
    106108
    107109SET(WebCore_IDL_FILES
     110    Modules/geolocation/NavigatorGeolocation.idl
     111
    108112    css/Counter.idl
    109113    css/CSSCharsetRule.idl
     
    401405
    402406SET(WebCore_SOURCES
     407    Modules/geolocation/NavigatorGeolocation.cpp
     408
    403409    accessibility/AXObjectCache.cpp
    404410    accessibility/AccessibilityARIAGrid.cpp
  • trunk/Source/WebCore/ChangeLog

    r108426 r108428  
     12012-02-21  Adam Barth  <abarth@webkit.org>
     2
     3        Frame and Navigator shouldn't need to worry about Geolocation
     4        https://bugs.webkit.org/show_bug.cgi?id=78860
     5
     6        Reviewed by Eric Seidel.
     7
     8        This patch removes some Geolocation-specific code from Frame and
     9        Navigator in favor of our new supplemental module mechanism.  We're
     10        still refining the module system, but we seem to be converging on a
     11        simple Observer/Supplement design.
     12
     13        In a future patch, I'll move the remaining Geolocation-related files in
     14        WebCore into Modules/geolocation.  This patch appears to be the first
     15        patch that introduces a module used by all the various build systems,
     16        which is why there's a bit more build system overhead than usual.
     17
     18        * Modules/geolocation: Added.
     19        * Modules/geolocation/NavigatorGeolocation.cpp: Added.
     20        (WebCore):
     21        (WebCore::NavigatorGeolocation::NavigatorGeolocation):
     22        (WebCore::NavigatorGeolocation::~NavigatorGeolocation):
     23        (WebCore::NavigatorGeolocation::pageDestroyed):
     24        (WebCore::NavigatorGeolocation::from):
     25        (WebCore::NavigatorGeolocation::geolocation):
     26        * Modules/geolocation/NavigatorGeolocation.h: Added.
     27        (WebCore):
     28        (NavigatorGeolocation):
     29        * Modules/geolocation/NavigatorGeolocation.idl: Added.
     30            - I've temporarily disabled this API for GObject because it generates
     31              a strange compile error.  Once I land this patch, I'll spend some
     32              more time fixing the compile error.
     33        * page/DOMWindow.cpp:
     34        (WebCore):
     35        * page/DOMWindow.h:
     36        (DOMWindow):
     37        * page/Frame.cpp:
     38        (WebCore::Frame::pageDestroyed):
     39        (WebCore::Frame::transferChildFrameToNewDocument):
     40        * page/FrameDestructionObserver.cpp:
     41        (WebCore::FrameDestructionObserver::pageDestroyed):
     42        (WebCore):
     43        * page/FrameDestructionObserver.h:
     44        (FrameDestructionObserver):
     45        * page/Navigator.cpp:
     46        (WebCore):
     47        * page/Navigator.h:
     48        (WebCore):
     49        (Navigator):
     50        * page/Navigator.idl:
     51
    1522012-02-21  Shawn Singh  <shawnsingh@chromium.org>
    253
  • trunk/Source/WebCore/DerivedSources.make

    r108404 r108428  
    2929VPATH = \
    3030    $(WebCore) \
     31    $(WebCore)/Modules/geolocation \
    3132    $(WebCore)/bindings/generic \
    3233    $(WebCore)/bindings/js \
     
    5455
    5556BINDING_IDLS = \
     57    $(WebCore)/Modules/geolocation/NavigatorGeolocation.idl \
    5658    $(WebCore)/css/CSSCharsetRule.idl \
    5759    $(WebCore)/css/CSSFontFaceRule.idl \
  • trunk/Source/WebCore/DerivedSources.pri

    r108404 r108428  
    8787
    8888IDL_BINDINGS += \
     89    $$PWD/Modules/geolocation/NavigatorGeolocation.idl \
    8990    $$PWD/css/Counter.idl \
    9091    $$PWD/css/CSSCharsetRule.idl \
     
    685686                            --defines \"$${FEATURE_DEFINES_JAVASCRIPT}\" \
    686687                            --generator $$generator \
     688                            --include $$PWD/Modules/geolocation \
    687689                            --include $$PWD/dom \
    688690                            --include $$PWD/fileapi \
  • trunk/Source/WebCore/GNUmakefile.am

    r108404 r108428  
    1212        -I$(srcdir)/Source/ThirdParty/ANGLE/include/GLSLANG \
    1313        -I$(srcdir)/Source/WebCore \
     14        -I$(srcdir)/Source/WebCore/Modules/geolocation \
    1415        -I$(srcdir)/Source/WebCore/accessibility \
    1516        -I$(srcdir)/Source/WebCore/bindings \
     
    759760
    760761IDL_PATH := \
     762    $(WebCore)/Modules/geolocation \
    761763    $(WebCore)/bindings/js \
    762764    $(WebCore)/css \
  • trunk/Source/WebCore/GNUmakefile.list.am

    r108423 r108428  
    651651
    652652dom_binding_idls += \
     653        $(WebCore)/Modules/geolocation/NavigatorGeolocation.idl \
    653654        $(WebCore)/css/CSSCharsetRule.idl \
    654655        $(WebCore)/css/CSSFontFaceRule.idl \
     
    952953
    953954webcore_sources += \
     955        Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp \
     956        Source/WebCore/Modules/geolocation/NavigatorGeolocation.h \
    954957        Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp \
    955958        Source/WebCore/accessibility/AccessibilityARIAGridCell.h \
  • trunk/Source/WebCore/Target.pri

    r108402 r108428  
    3535
    3636SOURCES += \
     37    Modules/geolocation/NavigatorGeolocation.cpp \
     38    \
    3739    accessibility/AccessibilityImageMapLink.cpp \
    3840    accessibility/AccessibilityMediaControls.cpp \
  • trunk/Source/WebCore/WebCore.exp.in

    r108409 r108428  
    673673__ZN7WebCore24FrameDestructionObserver12observeFrameEPNS_5FrameE
    674674__ZN7WebCore24FrameDestructionObserver14frameDestroyedEv
     675__ZN7WebCore24FrameDestructionObserver14willDetachPageEv
    675676__ZN7WebCore24keyIdentifierForKeyEventEP7NSEvent
    676677__ZN7WebCore24notifyHistoryItemChangedE
  • trunk/Source/WebCore/WebCore.gyp/WebCore.gyp

    r108322 r108428  
    5353      '../..',
    5454      '../Modules/gamepad',
     55      '../Modules/geolocation',
    5556      '../Modules/intents',
    5657      '../Modules/indexeddb',
  • trunk/Source/WebCore/WebCore.gypi

    r108402 r108428  
    721721            'Modules/gamepad/GamepadList.idl',
    722722            'Modules/gamepad/NavigatorGamepad.idl',
     723            'Modules/geolocation/NavigatorGeolocation.idl',
    723724            'Modules/indexeddb/DOMWindowIndexedDatabase.idl',
    724725            'Modules/intents/DOMWindowIntents.idl',
     
    12781279            'Modules/gamepad/NavigatorGamepad.cpp',
    12791280            'Modules/gamepad/NavigatorGamepad.h',
     1281            'Modules/geolocation/NavigatorGeolocation.cpp',
     1282            'Modules/geolocation/NavigatorGeolocation.h',
    12801283            'Modules/indexeddb/DOMWindowIndexedDatabase.cpp',
    12811284            'Modules/indexeddb/DOMWindowIndexedDatabase.h',
  • trunk/Source/WebCore/WebCore.pri

    r108140 r108428  
    1919INCLUDEPATH += \
    2020    $$SOURCE_DIR \
     21    $$SOURCE_DIR/Modules/geolocation \
    2122    $$SOURCE_DIR/accessibility \
    2223    $$SOURCE_DIR/bindings \
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r108423 r108428  
    2405224052                </Filter>
    2405324053                <Filter
     24054                        Name="Modules"
     24055                        >
     24056                        <Filter
     24057                                Name="geolocation"
     24058                                >
     24059                                <File
     24060                                        RelativePath="..\Modules\geolocation\NavigatorGeolocation.cpp"
     24061                                        >
     24062                                </File>
     24063                                <File
     24064                                        RelativePath="..\Modules\geolocation\NavigatorGeolocation.h"
     24065                                        >
     24066                                </File>
     24067                        </Filter>
     24068                </Filter>
     24069                <Filter
    2405424070                        Name="accessibility"
    2405524071                        >
  • trunk/Source/WebCore/WebCore.vcproj/WebCoreCommon.vsprops

    r108140 r108428  
    88        <Tool
    99                Name="VCCLCompilerTool"
    10                 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;"
     10                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;"
    1111                PreprocessorDefinitions="__WIN32__;DISABLE_3D_RENDERING;WEBCORE_CONTEXT_MENUS"
    1212                UsePrecompiledHeader="2"
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r108423 r108428  
    33263326                970B728A144FFAC600F00A37 /* EventInterfaces.h in Headers */ = {isa = PBXBuildFile; fileRef = 970B7289144FFAC600F00A37 /* EventInterfaces.h */; settings = {ATTRIBUTES = (Private, ); }; };
    33273327                970B72A6145008EB00F00A37 /* EventHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 970B72A5145008EB00F00A37 /* EventHeaders.h */; };
     3328                9711460314EF009A00674FD9 /* NavigatorGeolocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9711460014EF009A00674FD9 /* NavigatorGeolocation.cpp */; };
     3329                9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9711460114EF009A00674FD9 /* NavigatorGeolocation.h */; };
    33283330                97205AAF123928CA00B17380 /* FTPDirectoryDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97205AAD123928CA00B17380 /* FTPDirectoryDocument.cpp */; };
    33293331                97205AB0123928CA00B17380 /* FTPDirectoryDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 97205AAE123928CA00B17380 /* FTPDirectoryDocument.h */; };
     
    1018910191                970B7289144FFAC600F00A37 /* EventInterfaces.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventInterfaces.h; sourceTree = "<group>"; };
    1019010192                970B72A5145008EB00F00A37 /* EventHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventHeaders.h; sourceTree = "<group>"; };
     10193                9711460014EF009A00674FD9 /* NavigatorGeolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NavigatorGeolocation.cpp; path = Modules/geolocation/NavigatorGeolocation.cpp; sourceTree = "<group>"; };
     10194                9711460114EF009A00674FD9 /* NavigatorGeolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NavigatorGeolocation.h; path = Modules/geolocation/NavigatorGeolocation.h; sourceTree = "<group>"; };
     10195                9711460214EF009A00674FD9 /* NavigatorGeolocation.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = NavigatorGeolocation.idl; path = Modules/geolocation/NavigatorGeolocation.idl; sourceTree = "<group>"; };
    1019110196                97205AAD123928CA00B17380 /* FTPDirectoryDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FTPDirectoryDocument.cpp; sourceTree = "<group>"; };
    1019210197                97205AAE123928CA00B17380 /* FTPDirectoryDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTPDirectoryDocument.h; sourceTree = "<group>"; };
     
    1346313468                                9307061309E0CA8200B17FE4 /* DerivedSources.make */,
    1346413469                                93F19B1908245E59001E9ABC /* Info.plist */,
     13470                                971145FE14EF006E00674FD9 /* Modules */,
    1346513471                                29A812040FBB9B4100510293 /* accessibility */,
    1346613472                                BC1A3790097C6F970019F3D8 /* bindings */,
     
    1708017086                        tabWidth = 4;
    1708117087                        usesTabs = 0;
     17088                };
     17089                971145FE14EF006E00674FD9 /* Modules */ = {
     17090                        isa = PBXGroup;
     17091                        children = (
     17092                                971145FF14EF007900674FD9 /* geolocation */,
     17093                        );
     17094                        name = Modules;
     17095                        sourceTree = "<group>";
     17096                };
     17097                971145FF14EF007900674FD9 /* geolocation */ = {
     17098                        isa = PBXGroup;
     17099                        children = (
     17100                                9711460014EF009A00674FD9 /* NavigatorGeolocation.cpp */,
     17101                                9711460114EF009A00674FD9 /* NavigatorGeolocation.h */,
     17102                                9711460214EF009A00674FD9 /* NavigatorGeolocation.idl */,
     17103                        );
     17104                        name = geolocation;
     17105                        sourceTree = "<group>";
    1708217106                };
    1708317107                976D6C57122B8A18001FD1F7 /* fileapi */ = {
     
    2328923313                                A9C6E5A60D746458006442E9 /* Navigator.h in Headers */,
    2329023314                                E12719C70EEEC16800F61213 /* NavigatorBase.h in Headers */,
     23315                                9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */,
    2329123316                                97CC3AE314E8E4A200894988 /* NavigatorSupplement.h in Headers */,
    2329223317                                8A309C9F123950BE00CB9204 /* NestingLevelIncrementer.h in Headers */,
     
    2644426469                                A9C6E5A50D746458006442E9 /* Navigator.cpp in Sources */,
    2644526470                                E12719CA0EEEC21300F61213 /* NavigatorBase.cpp in Sources */,
     26471                                9711460314EF009A00674FD9 /* NavigatorGeolocation.cpp in Sources */,
    2644626472                                97CC3AE214E8E4A200894988 /* NavigatorSupplement.cpp in Sources */,
    2644726473                                5D874F130D161D3200796C3B /* NetscapePlugInStreamLoader.cpp in Sources */,
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r107396 r108428  
    419419        $done = 1;
    420420    } elsif ($gtype eq "object") {
    421         push(@txtGetProps, "        RefPtr<WebCore::${propType}> ptr = coreSelf->${getPropNameFunction}(" . (@{$attribute->getterExceptions} ? "ec" : "") . ");\n");
     421        push(@txtGetProps, "        RefPtr<WebCore::${propType}> ptr = ${getterFunctionName}(" . join(", ", @getterArguments) . ");\n");
    422422        push(@txtGetProps, "        g_value_set_object(value, WebKit::kit(ptr.get()));\n");
    423423        $done = 1;
  • trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.cpp

    r108275 r108428  
    2626
    2727#include "KURL.h"
     28#include "Node.h"
    2829#include "TestInterface.h"
    2930#include "TestSupplemental.h"
     31#include "WebDOMNode.h"
    3032#include "WebDOMString.h"
    3133#include "WebExceptionHandler.h"
     
    107109
    108110#endif
     111#if ENABLE(Condition11) || ENABLE(Condition12)
     112WebDOMNode WebDOMTestInterface::supplementalNode() const
     113{
     114    if (!impl())
     115        return WebDOMNode();
     116
     117    return toWebKit(WTF::getPtr(TestSupplemental::supplementalNode(impl())));
     118}
     119
     120void WebDOMTestInterface::setSupplementalNode(const WebDOMNode& newSupplementalNode)
     121{
     122    if (!impl())
     123        return;
     124
     125    TestSupplemental::setSupplementalNode(impl(), toWebCore(newSupplementalNode));
     126}
     127
     128#endif
    109129
    110130#if ENABLE(Condition11) || ENABLE(Condition12)
  • trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.h

    r108275 r108428  
    3333};
    3434
     35class WebDOMNode;
    3536
    3637class WebDOMTestInterface : public WebDOMObject {
     
    5960    void setSupplementalStr2(const WebDOMString&);
    6061#endif
     62#if ENABLE(Condition11) || ENABLE(Condition12)
     63    WebDOMNode supplementalNode() const;
     64    void setSupplementalNode(const WebDOMNode&);
     65#endif
    6166
    6267    void supplementalMethod1();
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp

    r104643 r108428  
    2929#include "ExceptionCode.h"
    3030#include "JSMainThreadExecState.h"
     31#include "Node.h"
    3132#include "TestInterface.h"
    3233#include "TestObj.h"
     
    3435#include "WebKitDOMBinding.h"
    3536#include "gobject/ConvertToUTF8String.h"
     37#include "webkit/WebKitDOMNode.h"
     38#include "webkit/WebKitDOMNodePrivate.h"
    3639#include "webkit/WebKitDOMTestInterface.h"
    3740#include "webkit/WebKitDOMTestInterfacePrivate.h"
     
    136139}
    137140
     141WebKitDOMNode*
     142webkit_dom_test_interface_get_supplemental_node(WebKitDOMTestInterface* self)
     143{
     144#if ENABLE(Condition11) || ENABLE(Condition12)
     145    g_return_val_if_fail(self, 0);
     146    WebCore::JSMainThreadNullState state;
     147    WebCore::TestInterface * item = WebKit::core(self);
     148    PassRefPtr<WebCore::Node> g_res = WTF::getPtr(TestSupplemental::supplementalNode(item));
     149    WebKitDOMNode* res = WebKit::kit(g_res.get());
     150    return res;
     151#else
     152    return NULL;
     153#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     154}
     155
     156void
     157webkit_dom_test_interface_set_supplemental_node(WebKitDOMTestInterface* self, WebKitDOMNode* value)
     158{
     159#if ENABLE(Condition11) || ENABLE(Condition12)
     160    g_return_if_fail(self);
     161    WebCore::JSMainThreadNullState state;
     162    WebCore::TestInterface * item = WebKit::core(self);
     163    g_return_if_fail(value);
     164    WebCore::Node * converted_value = NULL;
     165    if (value != NULL) {
     166        converted_value = WebKit::core(value);
     167        g_return_if_fail(converted_value);
     168    }
     169    TestSupplemental::setSupplementalNode(item, converted_value);
     170#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     171}
     172
    138173
    139174G_DEFINE_TYPE(WebKitDOMTestInterface, webkit_dom_test_interface, WEBKIT_TYPE_DOM_OBJECT)
     
    159194#if ENABLE(Condition11) || ENABLE(Condition12)
    160195    PROP_SUPPLEMENTAL_STR2,
     196#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     197#if ENABLE(Condition11) || ENABLE(Condition12)
     198    PROP_SUPPLEMENTAL_NODE,
    161199#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    162200};
     
    216254    {
    217255        g_value_take_string(value, convertToUTF8String(TestSupplemental::supplementalStr2(coreSelf)));
     256        break;
     257    }
     258#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     259#if ENABLE(Condition11) || ENABLE(Condition12)
     260    case PROP_SUPPLEMENTAL_NODE:
     261    {
     262        RefPtr<WebCore::Node> ptr = TestSupplemental::supplementalNode(coreSelf);
     263        g_value_set_object(value, WebKit::kit(ptr.get()));
    218264        break;
    219265    }
     
    259305                                                           WEBKIT_PARAM_READWRITE));
    260306#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
     307#if ENABLE(Condition11) || ENABLE(Condition12)
     308    g_object_class_install_property(gobjectClass,
     309                                    PROP_SUPPLEMENTAL_NODE,
     310                                    g_param_spec_object("supplemental-node", /* name */
     311                                                           "test_interface_supplemental-node", /* short description */
     312                                                           "read-write  WebKitDOMNode* TestInterface.supplemental-node", /* longer - could do with some extra doc stuff here */
     313                                                           WEBKIT_TYPE_DOM_NODE, /* gobject type */
     314                                                           WEBKIT_PARAM_READWRITE));
     315#endif /* ENABLE(Condition11) || ENABLE(Condition12) */
    261316
    262317
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestInterface.h

    r104643 r108428  
    101101webkit_dom_test_interface_set_supplemental_str2(WebKitDOMTestInterface* self, const gchar* value);
    102102
     103/**
     104 * webkit_dom_test_interface_get_supplemental_node:
     105 * @self: A #WebKitDOMTestInterface
     106 *
     107 * Returns: (transfer none):
     108 *
     109**/
     110WEBKIT_API WebKitDOMNode*
     111webkit_dom_test_interface_get_supplemental_node(WebKitDOMTestInterface* self);
     112
     113/**
     114 * webkit_dom_test_interface_set_supplemental_node:
     115 * @self: A #WebKitDOMTestInterface
     116 * @value: A #WebKitDOMNode
     117 *
     118 * Returns: (transfer none):
     119 *
     120**/
     121WEBKIT_API void
     122webkit_dom_test_interface_set_supplemental_node(WebKitDOMTestInterface* self, WebKitDOMNode* value);
     123
    103124G_END_DECLS
    104125
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r108028 r108428  
    3636
    3737#if ENABLE(Condition11) || ENABLE(Condition12)
     38#include "JSNode.h"
    3839#include "KURL.h"
    3940#include <runtime/JSString.h>
    4041#endif
    4142
     43#if ENABLE(Condition11) || ENABLE(Condition12)
     44#include "Node.h"
     45#endif
     46
    4247using namespace JSC;
    4348
     
    5762#if ENABLE(Condition11) || ENABLE(Condition12)
    5863    { "supplementalStr3", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceSupplementalStr3), (intptr_t)setJSTestInterfaceSupplementalStr3, NoIntrinsic },
     64#endif
     65#if ENABLE(Condition11) || ENABLE(Condition12)
     66    { "supplementalNode", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceSupplementalNode), (intptr_t)setJSTestInterfaceSupplementalNode, NoIntrinsic },
    5967#endif
    6068    { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceConstructor), (intptr_t)0, NoIntrinsic },
     
    6270};
    6371
    64 static const HashTable JSTestInterfaceTable = { 9, 7, JSTestInterfaceTableValues, 0 };
     72static const HashTable JSTestInterfaceTable = { 16, 15, JSTestInterfaceTableValues, 0 };
    6573/* Hash table for constructor */
    6674
     
    258266#endif
    259267
     268#if ENABLE(Condition11) || ENABLE(Condition12)
     269JSValue jsTestInterfaceSupplementalNode(ExecState* exec, JSValue slotBase, const Identifier&)
     270{
     271    JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
     272    UNUSED_PARAM(exec);
     273    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
     274    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalNode(impl)));
     275    return result;
     276}
     277
     278#endif
     279
    260280JSValue jsTestInterfaceConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
    261281{
     
    287307{
    288308    static_cast<JSTestInterface*>(thisObject)->setSupplementalStr3(exec, value);
     309}
     310
     311#endif
     312
     313#if ENABLE(Condition11) || ENABLE(Condition12)
     314void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* thisObject, JSValue value)
     315{
     316    JSTestInterface* castedThis = static_cast<JSTestInterface*>(thisObject);
     317    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
     318    TestSupplemental::setSupplementalNode(impl, toNode(value));
    289319}
    290320
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h

    r107520 r108428  
    160160JSC::JSValue jsTestInterfaceSupplementalStr3(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
    161161void setJSTestInterfaceSupplementalStr3(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
     162JSC::JSValue jsTestInterfaceSupplementalNode(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
     163void setJSTestInterfaceSupplementalNode(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
    162164JSC::JSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
    163165// Constants
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.h

    r106140 r108428  
    2929#if WEBKIT_VERSION_MAX_ALLOWED >= WEBKIT_VERSION_LATEST
    3030
     31@class DOMNode;
    3132@class DOMTestObj;
    3233@class NSString;
     
    5455- (void)setSupplementalStr3:(NSString *)newSupplementalStr3;
    5556#endif
     57#if ENABLE(Condition11) || ENABLE(Condition12)
     58- (DOMNode *)supplementalNode;
     59- (void)setSupplementalNode:(DOMNode *)newSupplementalNode;
     60#endif
    5661- (void)supplementalMethod1;
    5762- (DOMTestObj *)supplementalMethod2:(NSString *)strArg objArg:(DOMTestObj *)objArg;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm

    r104767 r108428  
    4444#import "JSMainThreadExecState.h"
    4545#import "KURL.h"
     46#import "Node.h"
    4647#import "TestInterface.h"
    4748#import "TestObj.h"
     
    109110#endif
    110111
     112#if ENABLE(Condition11) || ENABLE(Condition12)
     113- (DOMNode *)supplementalNode
     114{
     115    WebCore::JSMainThreadNullState state;
     116    return kit(WTF::getPtr(TestSupplemental::supplementalNode(IMPL)));
     117}
     118
     119- (void)setSupplementalNode:(DOMNode *)newSupplementalNode
     120{
     121    WebCore::JSMainThreadNullState state;
     122    ASSERT(newSupplementalNode);
     123
     124    TestSupplemental::setSupplementalNode(IMPL, core(newSupplementalNode));
     125}
     126#endif
     127
    111128
    112129#if ENABLE(Condition11) || ENABLE(Condition12)
  • trunk/Source/WebCore/bindings/scripts/test/TestSupplemental.idl

    r106140 r108428  
    3737        attribute DOMString supplementalStr2;
    3838        attribute [CustomGetter, CustomSetter] DOMString supplementalStr3;
     39        attribute Node supplementalNode;
    3940
    4041        void supplementalMethod1();
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp

    r107304 r108428  
    3232#include "V8DOMWrapper.h"
    3333#include "V8IsolatedContext.h"
     34#include "V8Node.h"
    3435#include "V8Proxy.h"
    3536#include "V8TestObj.h"
     
    7778    STRING_TO_V8PARAMETER_EXCEPTION_BLOCK_VOID(V8Parameter<>, v, value);
    7879    TestSupplemental::setSupplementalStr2(imp, v);
     80    return;
     81}
     82
     83#endif // ENABLE(Condition11) || ENABLE(Condition12)
     84
     85#if ENABLE(Condition11) || ENABLE(Condition12)
     86
     87static v8::Handle<v8::Value> supplementalNodeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
     88{
     89    INC_STATS("DOM.TestInterface.supplementalNode._get");
     90    TestInterface* imp = V8TestInterface::toNative(info.Holder());
     91    return toV8(TestSupplemental::supplementalNode(imp));
     92}
     93
     94#endif // ENABLE(Condition11) || ENABLE(Condition12)
     95
     96#if ENABLE(Condition11) || ENABLE(Condition12)
     97
     98static void supplementalNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
     99{
     100    INC_STATS("DOM.TestInterface.supplementalNode._set");
     101    TestInterface* imp = V8TestInterface::toNative(info.Holder());
     102    Node* v = V8Node::HasInstance(value) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
     103    TestSupplemental::setSupplementalNode(imp, WTF::getPtr(v));
    79104    return;
    80105}
     
    136161    {"supplementalStr3", V8TestInterface::supplementalStr3AccessorGetter, V8TestInterface::supplementalStr3AccessorSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
    137162#endif // ENABLE(Condition11) || ENABLE(Condition12)
     163#if ENABLE(Condition11) || ENABLE(Condition12)
     164    // Attribute 'supplementalNode' (Type: 'attribute' ExtAttr: 'Conditional ImplementedBy')
     165    {"supplementalNode", TestInterfaceInternal::supplementalNodeAttrGetter, TestInterfaceInternal::supplementalNodeAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     166#endif // ENABLE(Condition11) || ENABLE(Condition12)
    138167};
    139168
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r107023 r108428  
    24402440    if (child->ownerElement() && child->page())
    24412441        child->page()->decrementFrameCount();
    2442     // FIXME: The page isn't being destroyed, so it's not right to call a function named pageDestroyed().
    2443     child->pageDestroyed();
     2442    child->detachFromPage();
    24442443
    24452444    m_frame->tree()->removeChild(child);
     
    25192518    } else {
    25202519        m_frame->setView(0);
    2521         // FIXME: The page isn't being destroyed, so it's not right to call a function named pageDestroyed().
    2522         m_frame->pageDestroyed();
     2520        m_frame->detachFromPage();
    25232521    }
    25242522}
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r107799 r108428  
    481481}
    482482
     483void DOMWindow::willDetachPage()
     484{
     485    InspectorInstrumentation::frameWindowDiscarded(m_frame, this);
     486
     487#if ENABLE(NOTIFICATIONS)
     488    // Clearing Notifications requests involves accessing the client so it must be done
     489    // before the frame is detached.
     490    resetNotifications();
     491#endif
     492
     493    HashSet<DOMWindowProperty*>::iterator stop = m_properties.end();
     494    for (HashSet<DOMWindowProperty*>::iterator it = m_properties.begin(); it != stop; ++it)
     495        (*it)->willDetachPage();
     496}
     497
    483498void DOMWindow::registerProperty(DOMWindowProperty* property)
    484499{
     
    731746}
    732747#endif
    733 
    734 void DOMWindow::pageDestroyed()
    735 {
    736     InspectorInstrumentation::frameWindowDiscarded(m_frame, this);
    737 #if ENABLE(NOTIFICATIONS)
    738     // Clearing Notifications requests involves accessing the client so it must be done
    739     // before the frame is detached.
    740     resetNotifications();
    741 #endif
    742 }
    743 
    744 void DOMWindow::resetGeolocation()
    745 {
    746     // Geolocation should cancel activities and permission requests when the page is detached.
    747     if (m_navigator)
    748         m_navigator->resetGeolocation();
    749 }
    750748
    751749#if ENABLE(INDEXED_DATABASE)
  • trunk/Source/WebCore/page/DOMWindow.h

    r107082 r108428  
    9393        virtual DOMWindow* toDOMWindow();
    9494
    95         virtual void frameDestroyed() OVERRIDE;
    96 
    9795        void registerProperty(DOMWindowProperty*);
    9896        void unregisterProperty(DOMWindowProperty*);
     
    231229        void printErrorMessage(const String&);
    232230        String crossDomainAccessErrorMessage(DOMWindow* activeWindow);
    233 
    234         void pageDestroyed();
    235         void resetGeolocation();
    236231
    237232        void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, const String& targetOrigin, DOMWindow* source, ExceptionCode&);
     
    420415        explicit DOMWindow(Frame*);
    421416
     417        virtual void frameDestroyed() OVERRIDE;
     418        virtual void willDetachPage() OVERRIDE;
     419
    422420        virtual void refEventTarget() { ref(); }
    423421        virtual void derefEventTarget() { deref(); }
  • trunk/Source/WebCore/page/DOMWindowProperty.cpp

    r104380 r108428  
    5050}
    5151
     52void DOMWindowProperty::willDetachPage()
     53{
     54    // Subclasses should override this function to handle this notification.
    5255}
     56
     57}
  • trunk/Source/WebCore/page/DOMWindowProperty.h

    r104380 r108428  
    3434public:
    3535    explicit DOMWindowProperty(Frame*);
     36
    3637    virtual void disconnectFrame();
     38    virtual void willDetachPage();
    3739
    3840    Frame* frame() const { return m_frame; }
  • trunk/Source/WebCore/page/Frame.cpp

    r107832 r108428  
    661661}
    662662
    663 void Frame::pageDestroyed()
    664 {
    665     // FIXME: Rename this function, since it's called not only from Page destructor, but in several other cases.
    666     // This cleanup is needed whenever we remove a frame from page.
    667 
     663void Frame::willDetachPage()
     664{
    668665    if (Frame* parent = tree()->parent())
    669666        parent->loader()->checkLoadComplete();
    670667
    671     if (m_domWindow) {
    672         m_domWindow->resetGeolocation();
    673668#if ENABLE(NOTIFICATIONS)
     669    if (m_domWindow)
    674670        m_domWindow->resetNotifications();
    675671#endif
    676         m_domWindow->pageDestroyed();
    677     }
     672
     673    HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.end();
     674    for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObservers.begin(); it != stop; ++it)
     675        (*it)->willDetachPage();
    678676
    679677    // FIXME: It's unclear as to why this is called more than once, but it is,
     
    684682    script()->clearScriptObjects();
    685683    script()->updatePlatformScriptObjects();
    686 
    687     detachFromPage();
    688684}
    689685
     
    719715        }
    720716
    721         // FIXME: We should ideally allow existing Geolocation activities to continue
    722         // when the Geolocation's iframe is reparented.
    723         // See https://bugs.webkit.org/show_bug.cgi?id=55577
    724         // and https://bugs.webkit.org/show_bug.cgi?id=52877
    725717        if (m_domWindow) {
    726             m_domWindow->resetGeolocation();
    727718#if ENABLE(NOTIFICATIONS)
    728719            m_domWindow->resetNotifications();
    729720#endif
    730721        }
     722
     723        HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.end();
     724        for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObservers.begin(); it != stop; ++it)
     725            (*it)->willDetachPage();
    731726
    732727        m_page = newPage;
  • trunk/Source/WebCore/page/Frame.h

    r107832 r108428  
    9090        void removeDestructionObserver(FrameDestructionObserver*);
    9191
     92        void willDetachPage();
    9293        void detachFromPage();
    93         void pageDestroyed();
    9494        void disconnectOwnerElement();
    9595
     
    349349    inline void Frame::detachFromPage()
    350350    {
     351        willDetachPage();
    351352        m_page = 0;
    352353    }
  • trunk/Source/WebCore/page/FrameDestructionObserver.cpp

    r105245 r108428  
    5959}
    6060
     61void FrameDestructionObserver::willDetachPage()
     62{
     63    // Subclasses should override this function to handle this notification.
    6164}
     65
     66}
  • trunk/Source/WebCore/page/FrameDestructionObserver.h

    r105245 r108428  
    3434public:
    3535    explicit FrameDestructionObserver(Frame*);
     36
    3637    virtual void frameDestroyed();
     38    virtual void willDetachPage();
     39
    3740    Frame* frame() const { return m_frame; }
    3841
  • trunk/Source/WebCore/page/Navigator.cpp

    r107541 r108428  
    6868}
    6969
    70 void Navigator::resetGeolocation()
    71 {
    72     if (m_geolocation)
    73         m_geolocation->reset();
    74 }
    75 
    7670// If this function returns true, we need to hide the substring "4." that would otherwise
    7771// appear in the appVersion string. This is to avoid problems with old versions of a
     
    150144
    151145    return m_frame->settings()->isJavaEnabled();
    152 }
    153 
    154 Geolocation* Navigator::geolocation() const
    155 {
    156     if (!m_geolocation)
    157         m_geolocation = Geolocation::create(m_frame);
    158     return m_geolocation.get();
    159146}
    160147
  • trunk/Source/WebCore/page/Navigator.h

    r107541 r108428  
    3535class DOMPluginArray;
    3636class Frame;
    37 class Geolocation;
    3837class PointerLock;
    3938class PluginData;
     
    4645    virtual ~Navigator();
    4746
    48     void resetGeolocation();
    49 
    5047    String appVersion() const;
    5148    String language() const;
     
    5653
    5754    virtual String userAgent() const;
    58 
    59     Geolocation* geolocation() const;
    6055
    6156#if ENABLE(POINTER_LOCK)
     
    8176    mutable RefPtr<DOMPluginArray> m_plugins;
    8277    mutable RefPtr<DOMMimeTypeArray> m_mimeTypes;
    83     mutable RefPtr<Geolocation> m_geolocation;
    8478#if ENABLE(POINTER_LOCK)
    8579    mutable RefPtr<PointerLock> m_pointer;
  • trunk/Source/WebCore/page/Navigator.idl

    r107541 r108428  
    4141        readonly attribute boolean onLine;
    4242
    43 #if defined(ENABLE_GEOLOCATION) && ENABLE_GEOLOCATION
    44         readonly attribute [V8EnabledAtRuntime] Geolocation geolocation;
    45 #endif
    46 
    4743#if defined(ENABLE_POINTER_LOCK) && ENABLE_POINTER_LOCK
    4844        readonly attribute [V8EnabledAtRuntime] PointerLock webkitPointer;
  • trunk/Source/WebCore/page/Page.cpp

    r108140 r108428  
    201201   
    202202    for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
    203         frame->pageDestroyed();
     203        frame->detachFromPage();
    204204
    205205    m_editorClient->pageDestroyed();
  • trunk/Source/WebKit2/win/WebKit2.def

    r108119 r108428  
    202202        ?userPreferredLanguages@WebCore@@YA?AV?$Vector@VString@WTF@@$0A@@WTF@@XZ
    203203        ?view@Document@WebCore@@QBEPAVFrameView@2@XZ
     204        ?willDetachPage@FrameDestructionObserver@WebCore@@UAEXXZ
  • trunk/Source/autotools/symbols.filter

    r108053 r108428  
    9797_ZN7WebCore24FrameDestructionObserver12observeFrameEPNS_5FrameE;
    9898_ZN7WebCore24FrameDestructionObserver14frameDestroyedEv;
     99_ZN7WebCore24FrameDestructionObserver14willDetachPageEv;
    99100_ZN7WebCore22RuntimeEnabledFeatures31isMultipleShadowSubtreesEnabledE;
    100101local:
Note: See TracChangeset for help on using the changeset viewer.