Changeset 121312 in webkit
- Timestamp:
- Jun 26, 2012 7:11:13 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r121311 r121312 1 2012-06-26 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 Change return type in bandwidth attribute of network information API 4 https://bugs.webkit.org/show_bug.cgi?id=89959 5 6 Reviewed by Adam Barth. 7 8 According to network information API spec, bandwidth attribute should return double type. 9 But, existing implementation has used *long* and *unsigned int* types. 10 11 No new tests. Covered by existing tests. 12 13 * Modules/networkinfo/NetworkInfo.cpp: 14 (WebCore::NetworkInfo::NetworkInfo): 15 * Modules/networkinfo/NetworkInfo.h: 16 (WebCore::NetworkInfo::create): 17 (WebCore::NetworkInfo::bandwidth): 18 (NetworkInfo): 19 * Modules/networkinfo/NetworkInfoClient.h: 20 (NetworkInfoClient): 21 * Modules/networkinfo/NetworkInfoConnection.cpp: 22 (WebCore::NetworkInfoConnection::bandwidth): 23 * Modules/networkinfo/NetworkInfoConnection.h: 24 (NetworkInfoConnection): 25 * testing/Internals.cpp: 26 (WebCore::Internals::setNetworkInformation): 27 * testing/Internals.h: 28 (Internals): 29 * testing/Internals.idl: 30 1 31 2012-06-26 Luke Macpherson <macpherson@chromium.org> 2 32 -
trunk/Source/WebCore/Modules/networkinfo/NetworkInfo.cpp
r112815 r121312 33 33 namespace WebCore { 34 34 35 NetworkInfo::NetworkInfo( longbandwidth, bool metered)35 NetworkInfo::NetworkInfo(double bandwidth, bool metered) 36 36 : m_bandwidth(bandwidth) 37 37 , m_metered(metered) -
trunk/Source/WebCore/Modules/networkinfo/NetworkInfo.h
r112815 r121312 39 39 class NetworkInfo : public RefCounted<NetworkInfo> { 40 40 public: 41 static PassRefPtr<NetworkInfo> create( longbandwidth, bool metered) { return adoptRef(new NetworkInfo(bandwidth, metered)); }41 static PassRefPtr<NetworkInfo> create(double bandwidth, bool metered) { return adoptRef(new NetworkInfo(bandwidth, metered)); } 42 42 43 longbandwidth() const { return m_bandwidth; }43 double bandwidth() const { return m_bandwidth; } 44 44 bool metered() const { return m_metered; } 45 45 46 46 private: 47 NetworkInfo( longbandwidth, bool metered);47 NetworkInfo(double bandwidth, bool metered); 48 48 49 longm_bandwidth;49 double m_bandwidth; 50 50 bool m_metered; 51 51 }; -
trunk/Source/WebCore/Modules/networkinfo/NetworkInfoClient.h
r117515 r121312 41 41 virtual ~NetworkInfoClient() { } 42 42 43 virtual unsigned intbandwidth() const = 0;43 virtual double bandwidth() const = 0; 44 44 virtual bool metered() const = 0; 45 45 -
trunk/Source/WebCore/Modules/networkinfo/NetworkInfoConnection.cpp
r112815 r121312 56 56 } 57 57 58 unsigned intNetworkInfoConnection::bandwidth() const58 double NetworkInfoConnection::bandwidth() const 59 59 { 60 60 if (m_networkInfo) -
trunk/Source/WebCore/Modules/networkinfo/NetworkInfoConnection.h
r112815 r121312 52 52 ~NetworkInfoConnection(); 53 53 54 unsigned intbandwidth() const;54 double bandwidth() const; 55 55 bool metered() const; 56 56 -
trunk/Source/WebCore/testing/Internals.cpp
r121299 r121312 1006 1006 } 1007 1007 1008 void Internals::setNetworkInformation(Document* document, const String& eventType, longbandwidth, bool metered, ExceptionCode& ec)1008 void Internals::setNetworkInformation(Document* document, const String& eventType, double bandwidth, bool metered, ExceptionCode& ec) 1009 1009 { 1010 1010 if (!document || !document->page()) { -
trunk/Source/WebCore/testing/Internals.h
r121299 r121312 171 171 void setBatteryStatus(Document*, const String& eventType, bool charging, double chargingTime, double dischargingTime, double level, ExceptionCode&); 172 172 173 void setNetworkInformation(Document*, const String& eventType, longbandwidth, bool metered, ExceptionCode&);173 void setNetworkInformation(Document*, const String& eventType, double bandwidth, bool metered, ExceptionCode&); 174 174 175 175 void suspendAnimations(Document*, ExceptionCode&) const; -
trunk/Source/WebCore/testing/Internals.idl
r121299 r121312 151 151 152 152 #if defined(ENABLE_NETWORK_INFO) && ENABLE_NETWORK_INFO 153 void setNetworkInformation(in Document document, in DOMString eventType, in longbandwidth, in boolean metered) raises (DOMException);153 void setNetworkInformation(in Document document, in DOMString eventType, in double bandwidth, in boolean metered) raises (DOMException); 154 154 #endif 155 155 -
trunk/Source/WebKit/efl/ChangeLog
r121170 r121312 1 2012-06-26 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 3 Change return type in bandwidth attribute of network information API 4 https://bugs.webkit.org/show_bug.cgi?id=89959 5 6 Reviewed by Adam Barth. 7 8 According to network information API spec, bandwidth attribute should return double type. 9 But, existing implementation has used *long* and *unsigned int* types. 10 11 * WebCoreSupport/NetworkInfoClientEfl.cpp: 12 (WebCore::NetworkInfoClientEfl::bandwidth): 13 * WebCoreSupport/NetworkInfoClientEfl.h: 14 (NetworkInfoClientEfl): 15 1 16 2012-06-25 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 17 -
trunk/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.cpp
r121170 r121312 66 66 } 67 67 68 unsigned intNetworkInfoClientEfl::bandwidth() const68 double NetworkInfoClientEfl::bandwidth() const 69 69 { 70 70 // FIXME : This function should consider cellular network as well. For example, 2G, 3G and 4G. … … 83 83 return 0; // If network is offline, return 0. 84 84 85 unsigned intbandwidth;85 double bandwidth; 86 86 const char* attribute = eeze_net_attribute_get(ethNet, "speed"); 87 87 if (attribute) { … … 89 89 bandwidth = String::fromUTF8(attribute).toUIntStrict(&ok); 90 90 } else 91 bandwidth = UINT_MAX; // If bandwidth is unknown, return infinity value.92 91 bandwidth = std::numeric_limits<double>::infinity(); // If bandwidth is unknown, return infinity value. 92 93 93 eeze_net_free(ethNet); 94 94 -
trunk/Source/WebKit/efl/WebCoreSupport/NetworkInfoClientEfl.h
r121170 r121312 42 42 virtual void stopUpdating(); 43 43 44 virtual unsigned intbandwidth() const;44 virtual double bandwidth() const; 45 45 virtual bool metered() const; 46 46
Note: See TracChangeset
for help on using the changeset viewer.