Changeset 161556 in webkit
- Timestamp:
- Jan 9, 2014 9:19:34 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 10 deleted
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r161550 r161556 1 2014-01-09 Seokju Kwon <seokju@webkit.org> 2 3 Web Inspector: Remove unused overriding protocols. 4 https://bugs.webkit.org/show_bug.cgi?id=126630 5 6 Reviewed by Timothy Hatcher. 7 8 * http/tests/inspector/extensions-useragent-expected.txt: Removed. 9 * http/tests/inspector/extensions-useragent.html: Removed. 10 * inspector/device-orientation-success-expected.txt: Removed. 11 * inspector/device-orientation-success.html: Removed. 12 * inspector/geolocation-error-expected.txt: Removed. 13 * inspector/geolocation-error.html: Removed. 14 * inspector/geolocation-success-expected.txt: Removed. 15 * inspector/geolocation-success.html: Removed. 16 * inspector/geolocation-watchPosition-expected.txt: Removed. 17 * inspector/geolocation-watchPosition.html: Removed. 18 1 19 2014-01-09 Zan Dobersek <zdobersek@igalia.com> 2 20 -
trunk/Source/WebCore/ChangeLog
r161553 r161556 1 2014-01-09 Seokju Kwon <seokju@webkit.org> 2 3 Web Inspector: Remove unused overriding protocols. 4 https://bugs.webkit.org/show_bug.cgi?id=126630 5 6 Reviewed by Timothy Hatcher. 7 8 No new tests, No change in behavior. 9 10 Remove unused overriding protocols as these are not used anymore in Frontned. 11 -Page.setGeolocationOverride 12 -Page.clearGeolocationOverride 13 -Page.canOverrideGeolocation 14 -Page.setDeviceOrientationOverride 15 -Page.clearDeviceOrientationOverride 16 -Page.canOverrideGeolocation 17 -Network.setUserAgentOverride 18 19 * Modules/geolocation/GeolocationController.cpp: 20 (WebCore::GeolocationController::GeolocationController): 21 (WebCore::GeolocationController::create): 22 (WebCore::GeolocationController::positionChanged): 23 (WebCore::provideGeolocationTo): 24 * Modules/geolocation/GeolocationController.h: 25 * dom/DeviceOrientationController.cpp: 26 (WebCore::DeviceOrientationController::DeviceOrientationController): 27 (WebCore::DeviceOrientationController::create): 28 (WebCore::DeviceOrientationController::didChangeDeviceOrientation): 29 (WebCore::provideDeviceOrientationTo): 30 * dom/DeviceOrientationController.h: 31 * inspector/InspectorInstrumentation.cpp: 32 * inspector/InspectorInstrumentation.h: 33 * inspector/InspectorPageAgent.cpp: 34 (WebCore::InspectorPageAgent::InspectorPageAgent): 35 * inspector/InspectorPageAgent.h: 36 * inspector/InspectorResourceAgent.cpp: 37 (WebCore::InspectorResourceAgent::disable): 38 * inspector/InspectorResourceAgent.h: 39 * inspector/protocol/Network.json: 40 * inspector/protocol/Page.json: 41 * loader/FrameLoader.cpp: 42 (WebCore::FrameLoader::userAgent): 43 1 44 2014-01-09 Andrei Bucur <abucur@adobe.com> 2 45 -
trunk/Source/WebCore/Modules/geolocation/GeolocationController.cpp
r157653 r161556 32 32 #include "GeolocationError.h" 33 33 #include "GeolocationPosition.h" 34 #include "InspectorInstrumentation.h"35 34 36 35 namespace WebCore { 37 36 38 GeolocationController::GeolocationController( Page* page,GeolocationClient* client)37 GeolocationController::GeolocationController(GeolocationClient* client) 39 38 : m_client(client) 40 , m_page(page)41 39 { 42 40 } … … 50 48 } 51 49 52 PassOwnPtr<GeolocationController> GeolocationController::create( Page* page,GeolocationClient* client)50 PassOwnPtr<GeolocationController> GeolocationController::create(GeolocationClient* client) 53 51 { 54 return adoptPtr(new GeolocationController( page,client));52 return adoptPtr(new GeolocationController(client)); 55 53 } 56 54 … … 102 100 void GeolocationController::positionChanged(GeolocationPosition* position) 103 101 { 104 position = InspectorInstrumentation::overrideGeolocationPosition(m_page, position);105 if (!position) {106 errorOccurred(GeolocationError::create(GeolocationError::PositionUnavailable, ASCIILiteral("PositionUnavailable")).get());107 return;108 }109 102 m_lastPosition = position; 110 103 Vector<RefPtr<Geolocation>> observersVector; … … 140 133 void provideGeolocationTo(Page* page, GeolocationClient* client) 141 134 { 142 Supplement<Page>::provideTo(page, GeolocationController::supplementName(), GeolocationController::create( page,client));135 Supplement<Page>::provideTo(page, GeolocationController::supplementName(), GeolocationController::create(client)); 143 136 } 144 137 -
trunk/Source/WebCore/Modules/geolocation/GeolocationController.h
r157653 r161556 47 47 ~GeolocationController(); 48 48 49 static PassOwnPtr<GeolocationController> create( Page*,GeolocationClient*);49 static PassOwnPtr<GeolocationController> create(GeolocationClient*); 50 50 51 51 void addObserver(Geolocation*, bool enableHighAccuracy); … … 66 66 67 67 private: 68 GeolocationController( Page*,GeolocationClient*);68 GeolocationController(GeolocationClient*); 69 69 70 70 GeolocationClient* m_client; 71 Page* m_page;72 71 73 72 RefPtr<GeolocationPosition> m_lastPosition; -
trunk/Source/WebCore/dom/DeviceOrientationController.cpp
r160679 r161556 31 31 #include "DeviceOrientationData.h" 32 32 #include "DeviceOrientationEvent.h" 33 #include " InspectorInstrumentation.h"33 #include "Page.h" 34 34 35 35 namespace WebCore { 36 36 37 DeviceOrientationController::DeviceOrientationController( Page* page,DeviceOrientationClient* client)37 DeviceOrientationController::DeviceOrientationController(DeviceOrientationClient* client) 38 38 : DeviceController(client) 39 , m_page(page)40 39 { 41 40 #if PLATFORM(IOS) … … 51 50 } 52 51 53 PassOwnPtr<DeviceOrientationController> DeviceOrientationController::create( Page* page,DeviceOrientationClient* client)52 PassOwnPtr<DeviceOrientationController> DeviceOrientationController::create(DeviceOrientationClient* client) 54 53 { 55 return adoptPtr(new DeviceOrientationController( page,client));54 return adoptPtr(new DeviceOrientationController(client)); 56 55 } 57 56 58 57 void DeviceOrientationController::didChangeDeviceOrientation(DeviceOrientationData* orientation) 59 58 { 60 orientation = InspectorInstrumentation::overrideDeviceOrientation(m_page, orientation);61 59 dispatchDeviceEvent(DeviceOrientationEvent::create(eventNames().deviceorientationEvent, orientation)); 62 60 } … … 112 110 void provideDeviceOrientationTo(Page* page, DeviceOrientationClient* client) 113 111 { 114 DeviceOrientationController::provideTo(page, DeviceOrientationController::supplementName(), DeviceOrientationController::create( page,client));112 DeviceOrientationController::provideTo(page, DeviceOrientationController::supplementName(), DeviceOrientationController::create(client)); 115 113 } 116 114 -
trunk/Source/WebCore/dom/DeviceOrientationController.h
r160679 r161556 36 36 class DeviceOrientationClient; 37 37 class DeviceOrientationData; 38 class Page; 38 39 39 40 class DeviceOrientationController : public DeviceController { … … 42 43 ~DeviceOrientationController() { }; 43 44 44 static PassOwnPtr<DeviceOrientationController> create( Page*,DeviceOrientationClient*);45 static PassOwnPtr<DeviceOrientationController> create(DeviceOrientationClient*); 45 46 46 47 void didChangeDeviceOrientation(DeviceOrientationData*); … … 62 63 63 64 private: 64 DeviceOrientationController(Page*, DeviceOrientationClient*); 65 66 Page* m_page; 65 DeviceOrientationController(DeviceOrientationClient*); 67 66 }; 68 67 -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r161477 r161556 42 42 #include "DOMWrapperWorld.h" 43 43 #include "Database.h" 44 #include "DeviceOrientationData.h"45 44 #include "DocumentLoader.h" 46 45 #include "Event.h" … … 620 619 } 621 620 622 void InspectorInstrumentation::applyUserAgentOverrideImpl(InstrumentingAgents* instrumentingAgents, String* userAgent)623 {624 if (InspectorResourceAgent* resourceAgent = instrumentingAgents->inspectorResourceAgent())625 resourceAgent->applyUserAgentOverride(userAgent);626 }627 628 621 void InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents* instrumentingAgents, String* media) 629 622 { … … 1299 1292 } 1300 1293 1301 #if ENABLE(GEOLOCATION)1302 GeolocationPosition* InspectorInstrumentation::overrideGeolocationPositionImpl(InstrumentingAgents* instrumentingAgents, GeolocationPosition* position)1303 {1304 if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())1305 position = pageAgent->overrideGeolocationPosition(position);1306 return position;1307 }1308 #endif1309 1310 DeviceOrientationData* InspectorInstrumentation::overrideDeviceOrientationImpl(InstrumentingAgents* instrumentingAgents, DeviceOrientationData* deviceOrientation)1311 {1312 if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())1313 deviceOrientation = pageAgent->overrideDeviceOrientation(deviceOrientation);1314 return deviceOrientation;1315 }1316 1317 1294 #if USE(ACCELERATED_COMPOSITING) 1318 1295 void InspectorInstrumentation::layerTreeDidChangeImpl(InstrumentingAgents* instrumentingAgents) -
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
r161477 r161556 62 62 class DocumentLoader; 63 63 class DocumentStyleSheetCollection; 64 class DeviceOrientationData;65 class GeolocationPosition;66 64 class GraphicsContext; 67 65 class HTTPHeaderMap; … … 186 184 static void didProcessRule(const InspectorInstrumentationCookie&); 187 185 188 static void applyUserAgentOverride(Frame*, String*);189 186 static void applyEmulatedMedia(Frame*, String*); 190 187 static void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse); … … 299 296 #endif 300 297 301 #if ENABLE(GEOLOCATION)302 static GeolocationPosition* overrideGeolocationPosition(Page*, GeolocationPosition*);303 #endif304 305 298 static void registerInstrumentingAgents(InstrumentingAgents*); 306 299 static void unregisterInstrumentingAgents(InstrumentingAgents*); 307 308 static DeviceOrientationData* overrideDeviceOrientation(Page*, DeviceOrientationData*);309 300 310 301 #if USE(ACCELERATED_COMPOSITING) … … 383 374 static void didProcessRuleImpl(const InspectorInstrumentationCookie&); 384 375 385 static void applyUserAgentOverrideImpl(InstrumentingAgents*, String*);386 376 static void applyEmulatedMediaImpl(InstrumentingAgents*, String*); 387 377 static void willSendRequestImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse); … … 486 476 static InspectorTimelineAgent* retrieveTimelineAgent(const InspectorInstrumentationCookie&); 487 477 488 #if ENABLE(GEOLOCATION)489 static GeolocationPosition* overrideGeolocationPositionImpl(InstrumentingAgents*, GeolocationPosition*);490 #endif491 492 static DeviceOrientationData* overrideDeviceOrientationImpl(InstrumentingAgents*, DeviceOrientationData*);493 494 478 #if USE(ACCELERATED_COMPOSITING) 495 479 static void layerTreeDidChangeImpl(InstrumentingAgents*); … … 1259 1243 #else 1260 1244 UNUSED_PARAM(cookie); 1261 #endif1262 }1263 1264 inline void InspectorInstrumentation::applyUserAgentOverride(Frame* frame, String* userAgent)1265 {1266 #if ENABLE(INSPECTOR)1267 FAST_RETURN_IF_NO_FRONTENDS(void());1268 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))1269 applyUserAgentOverrideImpl(instrumentingAgents, userAgent);1270 #else1271 UNUSED_PARAM(frame);1272 UNUSED_PARAM(userAgent);1273 1245 #endif 1274 1246 } … … 1956 1928 } 1957 1929 1958 #if ENABLE(GEOLOCATION)1959 inline GeolocationPosition* InspectorInstrumentation::overrideGeolocationPosition(Page* page, GeolocationPosition* position)1960 {1961 #if ENABLE(INSPECTOR)1962 FAST_RETURN_IF_NO_FRONTENDS(position);1963 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))1964 return overrideGeolocationPositionImpl(instrumentingAgents, position);1965 #else1966 UNUSED_PARAM(page);1967 #endif1968 return position;1969 }1970 #endif1971 1972 inline DeviceOrientationData* InspectorInstrumentation::overrideDeviceOrientation(Page* page, DeviceOrientationData* deviceOrientation)1973 {1974 #if ENABLE(INSPECTOR)1975 FAST_RETURN_IF_NO_FRONTENDS(deviceOrientation);1976 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))1977 return overrideDeviceOrientationImpl(instrumentingAgents, deviceOrientation);1978 #else1979 UNUSED_PARAM(page);1980 #endif1981 return deviceOrientation;1982 }1983 1984 1930 #if USE(ACCELERATED_COMPOSITING) 1985 1931 inline void InspectorInstrumentation::layerTreeDidChange(Page* page) -
trunk/Source/WebCore/inspector/InspectorPageAgent.cpp
r161477 r161556 47 47 #include "DOMPatchSupport.h" 48 48 #include "DOMWrapperWorld.h" 49 #include "DeviceOrientationController.h"50 49 #include "Document.h" 51 50 #include "DocumentLoader.h" … … 54 53 #include "FrameSnapshotting.h" 55 54 #include "FrameView.h" 56 #include "GeolocationController.h"57 #include "GeolocationError.h"58 55 #include "HTMLFrameOwnerElement.h" 59 56 #include "HTMLNames.h" … … 364 361 , m_isFirstLayoutAfterOnLoad(false) 365 362 , m_originalScriptExecutionDisabled(false) 366 , m_geolocationOverridden(false)367 363 , m_ignoreScriptsEnabledNotification(false) 368 364 , m_showPaintRects(false) … … 1033 1029 #endif 1034 1030 1035 void InspectorPageAgent::setGeolocationOverride(ErrorString* error, const double* latitude, const double* longitude, const double* accuracy)1036 {1037 #if ENABLE (GEOLOCATION)1038 GeolocationController* controller = GeolocationController::from(m_page);1039 GeolocationPosition* position = 0;1040 if (!controller) {1041 *error = "Internal error: unable to override geolocation";1042 return;1043 }1044 position = controller->lastPosition();1045 if (!m_geolocationOverridden && position)1046 m_platformGeolocationPosition = position;1047 1048 m_geolocationOverridden = true;1049 if (latitude && longitude && accuracy)1050 m_geolocationPosition = GeolocationPosition::create(currentTimeMS(), *latitude, *longitude, *accuracy);1051 else1052 m_geolocationPosition.clear();1053 1054 controller->positionChanged(0); // Kick location update.1055 #else1056 *error = "Geolocation is not available";1057 UNUSED_PARAM(latitude);1058 UNUSED_PARAM(longitude);1059 UNUSED_PARAM(accuracy);1060 #endif1061 }1062 1063 void InspectorPageAgent::clearGeolocationOverride(ErrorString* error)1064 {1065 if (!m_geolocationOverridden)1066 return;1067 #if ENABLE(GEOLOCATION)1068 UNUSED_PARAM(error);1069 m_geolocationOverridden = false;1070 m_geolocationPosition.clear();1071 1072 GeolocationController* controller = GeolocationController::from(m_page);1073 if (controller && m_platformGeolocationPosition.get())1074 controller->positionChanged(m_platformGeolocationPosition.get());1075 #else1076 *error = "Geolocation is not available";1077 #endif1078 }1079 1080 void InspectorPageAgent::canOverrideGeolocation(ErrorString*, bool* out_param)1081 {1082 #if ENABLE(GEOLOCATION)1083 *out_param = true;1084 #else1085 *out_param = false;1086 #endif1087 }1088 1089 GeolocationPosition* InspectorPageAgent::overrideGeolocationPosition(GeolocationPosition* position)1090 {1091 if (m_geolocationOverridden) {1092 if (position)1093 m_platformGeolocationPosition = position;1094 return m_geolocationPosition.get();1095 }1096 return position;1097 }1098 1099 void InspectorPageAgent::setDeviceOrientationOverride(ErrorString* error, double alpha, double beta, double gamma)1100 {1101 DeviceOrientationController* controller = DeviceOrientationController::from(m_page);1102 if (!controller) {1103 *error = "Internal error: unable to override device orientation";1104 return;1105 }1106 1107 ErrorString clearError;1108 clearDeviceOrientationOverride(&clearError);1109 1110 m_deviceOrientation = DeviceOrientationData::create(true, alpha, true, beta, true, gamma);1111 controller->didChangeDeviceOrientation(m_deviceOrientation.get());1112 }1113 1114 void InspectorPageAgent::clearDeviceOrientationOverride(ErrorString*)1115 {1116 m_deviceOrientation.clear();1117 }1118 1119 void InspectorPageAgent::canOverrideDeviceOrientation(ErrorString*, bool* outParam)1120 {1121 #if ENABLE(DEVICE_ORIENTATION)1122 *outParam = true;1123 #else1124 *outParam = false;1125 #endif1126 }1127 1128 DeviceOrientationData* InspectorPageAgent::overrideDeviceOrientation(DeviceOrientationData* deviceOrientation)1129 {1130 if (m_deviceOrientation)1131 deviceOrientation = m_deviceOrientation.get();1132 return deviceOrientation;1133 }1134 1135 1031 void InspectorPageAgent::setTouchEmulationEnabled(ErrorString* error, bool enabled) 1136 1032 { -
trunk/Source/WebCore/inspector/InspectorPageAgent.h
r161477 r161556 34 34 #if ENABLE(INSPECTOR) 35 35 36 #include "DeviceOrientationData.h"37 #include "GeolocationPosition.h"38 36 #include "InspectorWebAgentBase.h" 39 37 #include "InspectorWebBackendDispatchers.h" … … 122 120 virtual void getScriptExecutionStatus(ErrorString*, Inspector::InspectorPageBackendDispatcherHandler::Result::Enum*); 123 121 virtual void setScriptExecutionDisabled(ErrorString*, bool); 124 virtual void setGeolocationOverride(ErrorString*, const double*, const double*, const double*);125 virtual void clearGeolocationOverride(ErrorString*);126 virtual void canOverrideGeolocation(ErrorString*, bool* out_param);127 virtual void setDeviceOrientationOverride(ErrorString*, double, double, double);128 virtual void clearDeviceOrientationOverride(ErrorString*);129 virtual void canOverrideDeviceOrientation(ErrorString*, bool*);130 122 virtual void setTouchEmulationEnabled(ErrorString*, bool); 131 123 virtual void setEmulatedMedia(ErrorString*, const String&); … … 136 128 virtual void handleJavaScriptDialog(ErrorString*, bool accept, const String* promptText); 137 129 virtual void archive(ErrorString*, String* data); 138 139 // Geolocation override helpers.140 GeolocationPosition* overrideGeolocationPosition(GeolocationPosition*);141 142 // DeviceOrientation helper143 DeviceOrientationData* overrideDeviceOrientation(DeviceOrientationData*);144 130 145 131 // InspectorInstrumentation API … … 209 195 bool m_isFirstLayoutAfterOnLoad; 210 196 bool m_originalScriptExecutionDisabled; 211 bool m_geolocationOverridden;212 197 bool m_ignoreScriptsEnabledNotification; 213 198 bool m_showPaintRects; 214 199 String m_emulatedMedia; 215 200 RefPtr<Inspector::InspectorObject> m_scriptsToEvaluateOnLoad; 216 RefPtr<GeolocationPosition> m_geolocationPosition;217 RefPtr<GeolocationPosition> m_platformGeolocationPosition;218 RefPtr<DeviceOrientationData> m_deviceOrientation;219 201 }; 220 202 -
trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp
r160557 r161556 419 419 } 420 420 421 void InspectorResourceAgent::applyUserAgentOverride(String* userAgent)422 {423 if (!m_userAgentOverride.isNull())424 *userAgent = m_userAgentOverride;425 }426 427 421 void InspectorResourceAgent::willRecalculateStyle() 428 422 { … … 543 537 { 544 538 m_enabled = false; 545 m_userAgentOverride = String();546 539 m_instrumentingAgents->setInspectorResourceAgent(0); 547 540 m_resourcesData->clear(); 548 541 m_extraRequestHeaders.clear(); 549 }550 551 void InspectorResourceAgent::setUserAgentOverride(ErrorString*, const String& userAgent)552 {553 m_userAgentOverride = userAgent;554 542 } 555 543 -
trunk/Source/WebCore/inspector/InspectorResourceAgent.h
r160557 r161556 109 109 void willDestroyCachedResource(CachedResource*); 110 110 111 void applyUserAgentOverride(String* userAgent);112 113 111 // FIXME: InspectorResourceAgent should now be aware of style recalculation. 114 112 void willRecalculateStyle(); … … 134 132 virtual void enable(ErrorString*); 135 133 virtual void disable(ErrorString*); 136 virtual void setUserAgentOverride(ErrorString*, const String& userAgent);137 134 virtual void setExtraHTTPHeaders(ErrorString*, const RefPtr<Inspector::InspectorObject>&); 138 135 virtual void getResponseBody(ErrorString*, const String& requestId, String* content, bool* base64Encoded); … … 155 152 std::unique_ptr<Inspector::InspectorNetworkFrontendDispatcher> m_frontendDispatcher; 156 153 RefPtr<Inspector::InspectorNetworkBackendDispatcher> m_backendDispatcher; 157 String m_userAgentOverride;158 154 OwnPtr<NetworkResourcesData> m_resourcesData; 159 155 bool m_enabled; -
trunk/Source/WebCore/inspector/protocol/Network.json
r159233 r161556 139 139 }, 140 140 { 141 "name": "setUserAgentOverride",142 "description": "Allows overriding user agent with the given string.",143 "parameters": [144 { "name": "userAgent", "type": "string", "description": "User agent to use." }145 ]146 },147 {148 141 "name": "setExtraHTTPHeaders", 149 142 "description": "Specifies whether to always send extra HTTP headers with the requests from this page.", -
trunk/Source/WebCore/inspector/protocol/Page.json
r161402 r161556 256 256 }, 257 257 { 258 "name": "setGeolocationOverride",259 "description": "Overrides the Geolocation Position or Error.",260 "parameters": [261 { "name": "latitude", "type": "number", "optional": true, "description": "Mock latitude"},262 { "name": "longitude", "type": "number", "optional": true, "description": "Mock longitude"},263 { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}264 ]265 },266 {267 "name": "clearGeolocationOverride",268 "description": "Clears the overriden Geolocation Position and Error."269 },270 {271 "name": "canOverrideGeolocation",272 "description": "Checks if Geolocation can be overridden.",273 "returns": [274 { "name": "result", "type": "boolean", "description": "True if browser can ovrride Geolocation." }275 ]276 },277 {278 "name": "setDeviceOrientationOverride",279 "description": "Overrides the Device Orientation.",280 "parameters": [281 { "name": "alpha", "type": "number", "description": "Mock alpha"},282 { "name": "beta", "type": "number", "description": "Mock beta"},283 { "name": "gamma", "type": "number", "description": "Mock gamma"}284 ]285 },286 {287 "name": "clearDeviceOrientationOverride",288 "description": "Clears the overridden Device Orientation."289 },290 {291 "name": "canOverrideDeviceOrientation",292 "description": "Check the backend if Web Inspector can override the device orientation.",293 "returns": [294 { "name": "result", "type": "boolean", "description": "If true, <code>setDeviceOrientationOverride</code> can safely be invoked on the agent." }295 ]296 },297 {298 258 "name": "setTouchEmulationEnabled", 299 259 "parameters": [ -
trunk/Source/WebCore/loader/FrameLoader.cpp
r161127 r161556 2488 2488 String FrameLoader::userAgent(const URL& url) const 2489 2489 { 2490 String userAgent = m_client.userAgent(url); 2491 InspectorInstrumentation::applyUserAgentOverride(&m_frame, &userAgent); 2492 return userAgent; 2490 return m_client.userAgent(url); 2493 2491 } 2494 2492 -
trunk/Source/WebInspectorUI/ChangeLog
r161460 r161556 1 2014-01-09 Seokju Kwon <seokju@webkit.org> 2 3 Web Inspector: Remove unused overriding protocols. 4 https://bugs.webkit.org/show_bug.cgi?id=126630 5 6 Reviewed by Timothy Hatcher. 7 8 Update InspectorWebBackendCommands.js after removing unused overriding protocols. 9 10 * UserInterface/InspectorWebBackendCommands.js: 11 * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: 12 * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: 13 * Versions/Inspector-iOS-6.0.json: 14 * Versions/Inspector-iOS-7.0.json: 15 1 16 2014-01-07 Joseph Pecoraro <pecoraro@apple.com> 2 17 -
trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js
r161402 r161556 223 223 InspectorBackend.registerCommand("Network.enable", [], []); 224 224 InspectorBackend.registerCommand("Network.disable", [], []); 225 InspectorBackend.registerCommand("Network.setUserAgentOverride", [{"name": "userAgent", "type": "string", "optional": false}], []);226 225 InspectorBackend.registerCommand("Network.setExtraHTTPHeaders", [{"name": "headers", "type": "object", "optional": false}], []); 227 226 InspectorBackend.registerCommand("Network.getResponseBody", [{"name": "requestId", "type": "string", "optional": false}], ["body", "base64Encoded"]); … … 270 269 InspectorBackend.registerCommand("Page.getScriptExecutionStatus", [], ["result"]); 271 270 InspectorBackend.registerCommand("Page.setScriptExecutionDisabled", [{"name": "value", "type": "boolean", "optional": false}], []); 272 InspectorBackend.registerCommand("Page.setGeolocationOverride", [{"name": "latitude", "type": "number", "optional": true}, {"name": "longitude", "type": "number", "optional": true}, {"name": "accuracy", "type": "number", "optional": true}], []);273 InspectorBackend.registerCommand("Page.clearGeolocationOverride", [], []);274 InspectorBackend.registerCommand("Page.canOverrideGeolocation", [], ["result"]);275 InspectorBackend.registerCommand("Page.setDeviceOrientationOverride", [{"name": "alpha", "type": "number", "optional": false}, {"name": "beta", "type": "number", "optional": false}, {"name": "gamma", "type": "number", "optional": false}], []);276 InspectorBackend.registerCommand("Page.clearDeviceOrientationOverride", [], []);277 InspectorBackend.registerCommand("Page.canOverrideDeviceOrientation", [], ["result"]);278 271 InspectorBackend.registerCommand("Page.setTouchEmulationEnabled", [{"name": "enabled", "type": "boolean", "optional": false}], []); 279 272 InspectorBackend.registerCommand("Page.setEmulatedMedia", [{"name": "media", "type": "string", "optional": false}], []); -
trunk/Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorWebBackendCommands.js
r161402 r161556 89 89 InspectorBackend.registerCommand("Network.enable", [], []); 90 90 InspectorBackend.registerCommand("Network.disable", [], []); 91 InspectorBackend.registerCommand("Network.setUserAgentOverride", [{"name": "userAgent", "type": "string", "optional": false}], []);92 91 InspectorBackend.registerCommand("Network.setExtraHTTPHeaders", [{"name": "headers", "type": "object", "optional": false}], []); 93 92 InspectorBackend.registerCommand("Network.getResponseBody", [{"name": "requestId", "type": "string", "optional": false}], ["body", "base64Encoded"]); -
trunk/Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorWebBackendCommands.js
r161402 r161556 56 56 InspectorBackend.registerCommand("Page.getScriptExecutionStatus", [], ["result"]); 57 57 InspectorBackend.registerCommand("Page.setScriptExecutionDisabled", [{"name": "value", "type": "boolean", "optional": false}], []); 58 InspectorBackend.registerCommand("Page.setGeolocationOverride", [{"name": "latitude", "type": "number", "optional": true}, {"name": "longitude", "type": "number", "optional": true}, {"name": "accuracy", "type": "number", "optional": true}], []);59 InspectorBackend.registerCommand("Page.clearGeolocationOverride", [], []);60 InspectorBackend.registerCommand("Page.canOverrideGeolocation", [], ["result"]);61 InspectorBackend.registerCommand("Page.setDeviceOrientationOverride", [{"name": "alpha", "type": "number", "optional": false}, {"name": "beta", "type": "number", "optional": false}, {"name": "gamma", "type": "number", "optional": false}], []);62 InspectorBackend.registerCommand("Page.clearDeviceOrientationOverride", [], []);63 InspectorBackend.registerCommand("Page.canOverrideDeviceOrientation", [], ["result"]);64 58 InspectorBackend.registerCommand("Page.setTouchEmulationEnabled", [{"name": "enabled", "type": "boolean", "optional": false}], []); 65 59 InspectorBackend.registerCommand("Page.setEmulatedMedia", [{"name": "media", "type": "string", "optional": false}], []); … … 120 114 InspectorBackend.registerCommand("Network.enable", [], []); 121 115 InspectorBackend.registerCommand("Network.disable", [], []); 122 InspectorBackend.registerCommand("Network.setUserAgentOverride", [{"name": "userAgent", "type": "string", "optional": false}], []);123 116 InspectorBackend.registerCommand("Network.setExtraHTTPHeaders", [{"name": "headers", "type": "object", "optional": false}], []); 124 117 InspectorBackend.registerCommand("Network.getResponseBody", [{"name": "requestId", "type": "string", "optional": false}], ["body", "base64Encoded"]); -
trunk/Source/WebInspectorUI/Versions/Inspector-iOS-6.0.json
r161402 r161556 714 714 "name": "disable", 715 715 "description": "Disables network tracking, prevents network events from being sent to the client." 716 },717 {718 "name": "setUserAgentOverride",719 "description": "Allows overriding user agent with the given string.",720 "parameters": [721 { "name": "userAgent", "type": "string", "description": "User agent to use." }722 ]723 716 }, 724 717 { -
trunk/Source/WebInspectorUI/Versions/Inspector-iOS-7.0.json
r161402 r161556 327 327 }, 328 328 { 329 "name": "setGeolocationOverride",330 "description": "Overrides the Geolocation Position or Error.",331 "parameters": [332 { "name": "latitude", "type": "number", "optional": true, "description": "Mock longitude"},333 { "name": "longitude", "type": "number", "optional": true, "description": "Mock latitude"},334 { "name": "accuracy", "type": "number", "optional": true, "description": "Mock accuracy"}335 ]336 },337 {338 "name": "clearGeolocationOverride",339 "description": "Clears the overriden Geolocation Position and Error."340 },341 {342 "name": "canOverrideGeolocation",343 "description": "Checks if Geolocation can be overridden.",344 "returns": [345 { "name": "result", "type": "boolean", "description": "True if browser can ovrride Geolocation." }346 ]347 },348 {349 "name": "setDeviceOrientationOverride",350 "description": "Overrides the Device Orientation.",351 "parameters": [352 { "name": "alpha", "type": "number", "description": "Mock alpha"},353 { "name": "beta", "type": "number", "description": "Mock beta"},354 { "name": "gamma", "type": "number", "description": "Mock gamma"}355 ]356 },357 {358 "name": "clearDeviceOrientationOverride",359 "description": "Clears the overridden Device Orientation."360 },361 {362 "name": "canOverrideDeviceOrientation",363 "description": "Check the backend if Web Inspector can override the device orientation.",364 "returns": [365 { "name": "result", "type": "boolean", "description": "If true, <code>setDeviceOrientationOverride</code> can safely be invoked on the agent." }366 ]367 },368 {369 329 "name": "setTouchEmulationEnabled", 370 330 "parameters": [ … … 917 877 "name": "disable", 918 878 "description": "Disables network tracking, prevents network events from being sent to the client." 919 },920 {921 "name": "setUserAgentOverride",922 "description": "Allows overriding user agent with the given string.",923 "parameters": [924 { "name": "userAgent", "type": "string", "description": "User agent to use." }925 ]926 879 }, 927 880 {
Note: See TracChangeset
for help on using the changeset viewer.