| Differences between
and this patch
- WebCore/ChangeLog +31 lines
Lines 1-3 WebCore/ChangeLog_sec1
1
2010-03-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Guard Geolocation files with ENABLE_GEOLOCATION
6
        https://bugs.webkit.org/show_bug.cgi?id=25756
7
8
        The intent is to guard the Geolocation implementation files 
9
        and minimize the impact on on clients/call sites.
10
11
        * DerivedSources.make:
12
        * WebCore.Geolocation.exp: Added. Exported interfaces if GEOLOCATION
13
        is enabled.
14
        * WebCore.base.exp:
15
        * bindings/js/JSCustomPositionCallback.cpp:
16
        * bindings/js/JSCustomPositionErrorCallback.cpp:
17
        * bindings/js/JSGeolocationCustom.cpp:
18
        * page/Geolocation.cpp:
19
        (WebCore::Geolocation::disconnectFrame): Stub implementation if
20
        GEOLOCATION is turned off.
21
        (WebCore::Geolocation::Geolocation): Ditto.
22
        (WebCore::Geolocation::~Geolocation): Ditto.
23
        (WebCore::Geolocation::setIsAllowed): Ditto.
24
        * page/Geolocation.h: 
25
        * page/Geolocation.idl:
26
        * page/GeolocationPositionCache.cpp:
27
        * page/Geoposition.idl:
28
        * page/PositionError.idl:
29
        * platform/GeolocationService.cpp:
30
        * platform/mock/GeolocationServiceMock.cpp:
31
1
2010-03-28  Alexey Proskuryakov  <ap@apple.com>
32
2010-03-28  Alexey Proskuryakov  <ap@apple.com>
2
33
3
        Reviewed by Sam Weinig.
34
        Reviewed by Sam Weinig.
- WebCore/DerivedSources.make +4 lines
Lines 872-877 ifeq ($(findstring ENABLE_CLIENT_BASED_G WebCore/DerivedSources.make_sec1
872
    WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.ClientBasedGeolocation.exp
872
    WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.ClientBasedGeolocation.exp
873
endif
873
endif
874
874
875
ifeq ($(findstring ENABLE_GEOLOCATION,$(FEATURE_DEFINES)), ENABLE_GEOLOCATION)
876
    WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Geolocation.exp
877
endif
878
875
WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES)
879
WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES)
876
	cat $^ > $@
880
	cat $^ > $@
877
881
- WebCore/WebCore.Geolocation.exp +2 lines
Line 0 WebCore/WebCore.Geolocation.exp_sec1
1
__ZN7WebCore22GeolocationServiceMock11setPositionEN3WTF10PassRefPtrINS_11GeopositionEEE
2
__ZN7WebCore22GeolocationServiceMock8setErrorEN3WTF10PassRefPtrINS_13PositionErrorEEE
- WebCore/WebCore.base.exp -2 lines
Lines 446-453 __ZN7WebCore21findEventWithKeyStateEPNS_ WebCore/WebCore.base.exp_sec1
446
__ZN7WebCore21isBackForwardLoadTypeENS_13FrameLoadTypeE
446
__ZN7WebCore21isBackForwardLoadTypeENS_13FrameLoadTypeE
447
__ZN7WebCore21mainThreadNormalWorldEv
447
__ZN7WebCore21mainThreadNormalWorldEv
448
__ZN7WebCore21reportThreadViolationEPKcNS_20ThreadViolationRoundE
448
__ZN7WebCore21reportThreadViolationEPKcNS_20ThreadViolationRoundE
449
__ZN7WebCore22GeolocationServiceMock11setPositionEN3WTF10PassRefPtrINS_11GeopositionEEE
450
__ZN7WebCore22GeolocationServiceMock8setErrorEN3WTF10PassRefPtrINS_13PositionErrorEEE
451
__ZN7WebCore22ScriptExecutionContext26canSuspendActiveDOMObjectsEv
449
__ZN7WebCore22ScriptExecutionContext26canSuspendActiveDOMObjectsEv
452
__ZN7WebCore22applicationIsAppleMailEv
450
__ZN7WebCore22applicationIsAppleMailEv
453
__ZN7WebCore22counterValueForElementEPNS_7ElementE
451
__ZN7WebCore22counterValueForElementEPNS_7ElementE
- WebCore/bindings/js/JSCustomPositionCallback.cpp +4 lines
Lines 26-31 WebCore/bindings/js/JSCustomPositionCallback.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "JSCustomPositionCallback.h"
27
#include "JSCustomPositionCallback.h"
28
28
29
#if ENABLE(GEOLOCATION)
30
29
#include "Frame.h"
31
#include "Frame.h"
30
#include "JSGeoposition.h"
32
#include "JSGeoposition.h"
31
#include "ScriptController.h"
33
#include "ScriptController.h"
Lines 52-54 void JSCustomPositionCallback::handleEve WebCore/bindings/js/JSCustomPositionCallback.cpp_sec2
52
}
54
}
53
55
54
} // namespace WebCore
56
} // namespace WebCore
57
58
#endif // ENABLE(GEOLOCATION)
- WebCore/bindings/js/JSCustomPositionErrorCallback.cpp +4 lines
Lines 26-31 WebCore/bindings/js/JSCustomPositionErrorCallback.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "JSCustomPositionErrorCallback.h"
27
#include "JSCustomPositionErrorCallback.h"
28
28
29
#if ENABLE(GEOLOCATION)
30
29
#include "Frame.h"
31
#include "Frame.h"
30
#include "JSPositionError.h"
32
#include "JSPositionError.h"
31
#include "ScriptController.h"
33
#include "ScriptController.h"
Lines 53-55 void JSCustomPositionErrorCallback::hand WebCore/bindings/js/JSCustomPositionErrorCallback.cpp_sec2
53
}
55
}
54
    
56
    
55
} // namespace WebCore
57
} // namespace WebCore
58
59
#endif // ENABLE(GEOLOCATION)
- WebCore/bindings/js/JSGeolocationCustom.cpp +4 lines
Lines 26-31 WebCore/bindings/js/JSGeolocationCustom.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "JSGeolocation.h"
27
#include "JSGeolocation.h"
28
28
29
#if ENABLE(GEOLOCATION)
30
29
#include "DOMWindow.h"
31
#include "DOMWindow.h"
30
#include "ExceptionCode.h"
32
#include "ExceptionCode.h"
31
#include "Geolocation.h"
33
#include "Geolocation.h"
Lines 178-180 JSValue JSGeolocation::watchPosition(Exe WebCore/bindings/js/JSGeolocationCustom.cpp_sec2
178
}
180
}
179
181
180
} // namespace WebCore
182
} // namespace WebCore
183
184
#endif // ENABLE(GEOLOCATION)
- WebCore/page/Geolocation.cpp +18 lines
Lines 28-33 WebCore/page/Geolocation.cpp_sec1
28
#include "config.h"
28
#include "config.h"
29
#include "Geolocation.h"
29
#include "Geolocation.h"
30
30
31
#if ENABLE(GEOLOCATION)
32
31
#include "Chrome.h"
33
#include "Chrome.h"
32
#include "Frame.h"
34
#include "Frame.h"
33
#include "Page.h"
35
#include "Page.h"
Lines 641-643 void Geolocation::stopUpdating() WebCore/page/Geolocation.cpp_sec2
641
}
643
}
642
644
643
} // namespace WebCore
645
} // namespace WebCore
646
647
#else
648
649
namespace WebCore {
650
651
void Geolocation::disconnectFrame() {}
652
653
Geolocation::Geolocation(Frame*) {}
654
655
Geolocation::~Geolocation() {}
656
657
void Geolocation::setIsAllowed(bool) {}
658
659
}
660
                                                        
661
#endif // ENABLE(GEOLOCATION)
- WebCore/page/Geolocation.h -2 / +4 lines
Lines 46-52 class GeolocationError; WebCore/page/Geolocation.h_sec1
46
#endif
46
#endif
47
47
48
class Geolocation : public RefCounted<Geolocation>
48
class Geolocation : public RefCounted<Geolocation>
49
#if !ENABLE(CLIENT_BASED_GEOLOCATION)
49
#if !ENABLE(CLIENT_BASED_GEOLOCATION) && ENABLE(GEOLOCATION)
50
    , public GeolocationServiceClient
50
    , public GeolocationServiceClient
51
#endif
51
#endif
52
{
52
{
Lines 137-143 private: WebCore/page/Geolocation.h_sec2
137
    bool startUpdating(GeoNotifier*);
137
    bool startUpdating(GeoNotifier*);
138
    void stopUpdating();
138
    void stopUpdating();
139
139
140
#if !ENABLE(CLIENT_BASED_GEOLOCATION)
140
#if !ENABLE(CLIENT_BASED_GEOLOCATION) && ENABLE(GEOLOCATION)
141
    // GeolocationServiceClient
141
    // GeolocationServiceClient
142
    virtual void geolocationServicePositionChanged(GeolocationService*);
142
    virtual void geolocationServicePositionChanged(GeolocationService*);
143
    virtual void geolocationServiceErrorOccurred(GeolocationService*);
143
    virtual void geolocationServiceErrorOccurred(GeolocationService*);
Lines 172-178 private: WebCore/page/Geolocation.h_sec3
172
    } m_allowGeolocation;
172
    } m_allowGeolocation;
173
    bool m_shouldClearCache;
173
    bool m_shouldClearCache;
174
174
175
#if ENABLE(GEOLOCATION)
175
    OwnPtr<GeolocationPositionCache> m_positionCache;
176
    OwnPtr<GeolocationPositionCache> m_positionCache;
177
#endif
176
    GeoNotifierSet m_requestsAwaitingCachedPosition;
178
    GeoNotifierSet m_requestsAwaitingCachedPosition;
177
};
179
};
178
    
180
    
- WebCore/page/Geolocation.idl -1 / +1 lines
Lines 25-31 WebCore/page/Geolocation.idl_sec1
25
25
26
module core {
26
module core {
27
27
28
    interface [OmitConstructor] Geolocation {
28
    interface [Conditional=GEOLOCATION, OmitConstructor] Geolocation {
29
        [Custom] void getCurrentPosition(in PositionCallback successCallback, in PositionErrorCallback errorCallback, in PositionOptions options);
29
        [Custom] void getCurrentPosition(in PositionCallback successCallback, in PositionErrorCallback errorCallback, in PositionOptions options);
30
30
31
        [Custom] long watchPosition(in PositionCallback successCallback, in PositionErrorCallback errorCallback, in PositionOptions options);
31
        [Custom] long watchPosition(in PositionCallback successCallback, in PositionErrorCallback errorCallback, in PositionOptions options);
- WebCore/page/GeolocationPositionCache.cpp +4 lines
Lines 26-31 WebCore/page/GeolocationPositionCache.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "GeolocationPositionCache.h"
27
#include "GeolocationPositionCache.h"
28
28
29
#if ENABLE(GEOLOCATION)
30
29
#include "Geoposition.h"
31
#include "Geoposition.h"
30
#include "SQLValue.h"
32
#include "SQLValue.h"
31
#include "SQLiteDatabase.h"
33
#include "SQLiteDatabase.h"
Lines 172-174 void GeolocationPositionCache::writeToDB WebCore/page/GeolocationPositionCache.cpp_sec2
172
}
174
}
173
175
174
} // namespace WebCore
176
} // namespace WebCore
177
178
#endif // ENABLE(GEOLOCATION)
- WebCore/page/Geoposition.idl -1 / +1 lines
Lines 25-31 WebCore/page/Geoposition.idl_sec1
25
25
26
module core {
26
module core {
27
27
28
    interface [OmitConstructor] Geoposition {
28
    interface [Conditional=GEOLOCATION, OmitConstructor] Geoposition {
29
        readonly attribute Coordinates coords;
29
        readonly attribute Coordinates coords;
30
        readonly attribute DOMTimeStamp timestamp;
30
        readonly attribute DOMTimeStamp timestamp;
31
    };
31
    };
- WebCore/page/PositionError.idl -1 / +1 lines
Lines 25-31 WebCore/page/PositionError.idl_sec1
25
25
26
module core {
26
module core {
27
27
28
    interface PositionError {
28
    interface [Conditional=GEOLOCATION] PositionError {
29
        readonly attribute unsigned short code;
29
        readonly attribute unsigned short code;
30
        readonly attribute DOMString message;
30
        readonly attribute DOMString message;
31
31
- WebCore/platform/GeolocationService.cpp +3 lines
Lines 49-54 GeolocationService* GeolocationService:: WebCore/platform/GeolocationService.cpp_sec1
49
    return (*s_factoryFunction)(client);
49
    return (*s_factoryFunction)(client);
50
}
50
}
51
51
52
#if ENABLE(GEOLOCATION)
52
void GeolocationService::useMock()
53
void GeolocationService::useMock()
53
{
54
{
54
    s_factoryFunction = &GeolocationServiceMock::create;
55
    s_factoryFunction = &GeolocationServiceMock::create;
Lines 70-73 void GeolocationService::errorOccurred() WebCore/platform/GeolocationService.cpp_sec2
70
    m_geolocationServiceClient->geolocationServiceErrorOccurred(this);
71
    m_geolocationServiceClient->geolocationServiceErrorOccurred(this);
71
}
72
}
72
73
74
#endif
75
73
} // namespace WebCore
76
} // namespace WebCore
- WebCore/platform/mock/GeolocationServiceMock.cpp +4 lines
Lines 26-31 WebCore/platform/mock/GeolocationServiceMock.cpp_sec1
26
#include "config.h"
26
#include "config.h"
27
#include "GeolocationServiceMock.h"
27
#include "GeolocationServiceMock.h"
28
28
29
#if ENABLE(GEOLOCATION)
30
29
#include "Logging.h"
31
#include "Logging.h"
30
#include "Geolocation.h"
32
#include "Geolocation.h"
31
#include "Geoposition.h"
33
#include "Geoposition.h"
Lines 134-136 void GeolocationServiceMock::cleanUpStat WebCore/platform/mock/GeolocationServiceMock.cpp_sec2
134
}
136
}
135
137
136
} // namespace WebCore
138
} // namespace WebCore
139
140
#endif
- WebKit/mac/ChangeLog +12 lines
Lines 1-3 WebKit/mac/ChangeLog_sec1
1
2010-03-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Explicit guards for ENABLE_GEOLOCATION
6
        https://bugs.webkit.org/show_bug.cgi?id=25756
7
8
        * WebCoreSupport/WebGeolocationMock.mm:
9
        (-[WebGeolocationMock setError:code:]): Make the body conditional on 
10
        ENABLE(GEOLOCATION)
11
        (-[WebGeolocationMock setPosition:]): Ditto.
12
1
2010-03-27  Darin Adler  <darin@apple.com>
13
2010-03-27  Darin Adler  <darin@apple.com>
2
14
3
        * Misc/WebNSFileManagerExtras.m:
15
        * Misc/WebNSFileManagerExtras.m:
- WebKit/mac/WebCoreSupport/WebGeolocationMock.mm +4 lines
Lines 38-43 using namespace WTF; WebKit/mac/WebCoreSupport/WebGeolocationMock.mm_sec1
38
38
39
+ (void)setPosition:(double)latitude:(double)longitude:(double)accuracy
39
+ (void)setPosition:(double)latitude:(double)longitude:(double)accuracy
40
{
40
{
41
#if ENABLE(GEOLOCATION)
41
    RefPtr<Coordinates> coordinates = Coordinates::create(latitude,
42
    RefPtr<Coordinates> coordinates = Coordinates::create(latitude,
42
                                                          longitude,
43
                                                          longitude,
43
                                                          false, 0.0,  // altitude
44
                                                          false, 0.0,  // altitude
Lines 47-59 + (void)setPosition:(double)latitude:(do WebKit/mac/WebCoreSupport/WebGeolocationMock.mm_sec2
47
                                                          false, 0.0);  // speed
48
                                                          false, 0.0);  // speed
48
    RefPtr<Geoposition> position = Geoposition::create(coordinates.release(), currentTime() * 1000.0);
49
    RefPtr<Geoposition> position = Geoposition::create(coordinates.release(), currentTime() * 1000.0);
49
    GeolocationServiceMock::setPosition(position.release());
50
    GeolocationServiceMock::setPosition(position.release());
51
#endif
50
}
52
}
51
53
52
+ (void)setError:(int)code:(NSString *)message
54
+ (void)setError:(int)code:(NSString *)message
53
{
55
{
56
#if ENABLE(GEOLOCATION)
54
    PositionError::ErrorCode codeEnum = static_cast<PositionError::ErrorCode>(code);
57
    PositionError::ErrorCode codeEnum = static_cast<PositionError::ErrorCode>(code);
55
    RefPtr<PositionError> error = PositionError::create(codeEnum, message);
58
    RefPtr<PositionError> error = PositionError::create(codeEnum, message);
56
    GeolocationServiceMock::setError(error.release());
59
    GeolocationServiceMock::setError(error.release());
60
#endif
57
}
61
}
58
62
59
@end
63
@end

Return to Bug 25756