Bug 45759

Summary: Web Inspector: small refactoring for monitoringXHR flag.
Product: WebKit Reporter: Ilya Tikhonovsky <loislo>
Component: Web Inspector (Deprecated)Assignee: Ilya Tikhonovsky <loislo>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 45308    
Attachments:
Description Flags
[patch] initial version.
none
[patch] initial version. text version :). yurys: review+

Description Ilya Tikhonovsky 2010-09-14 09:22:17 PDT
Our Inspector API is quite big and can be simplified a bit.
        As example for single backend property like monitoringXHR we
        have 4 functions in the API. Two functions for frontend
        enableMonitoringXHR/disableMonitoringXHR and
        two functions for backend monitoringXHRWasEnabled and
        monitoringXHRWasDisabled. These functions can be replaced by
        one setMonitoringXHR with one 'in' and one 'out' argument.
        The initial state of the flag can be gathered from backend
        with help of getSettings call where additional section was
        added for backend state information.
Comment 1 Ilya Tikhonovsky 2010-09-14 09:52:24 PDT
Created attachment 67568 [details]
[patch] initial version.
Comment 2 Yury Semikhatsky 2010-09-14 09:57:34 PDT
The diff is corrupted.
Comment 3 Ilya Tikhonovsky 2010-09-14 09:59:39 PDT
Created attachment 67570 [details]
[patch] initial version. text version :).
Comment 4 Yury Semikhatsky 2010-09-14 10:17:35 PDT
Comment on attachment 67570 [details]
[patch] initial version. text version :).

View in context: https://bugs.webkit.org/attachment.cgi?id=67570&action=prettypatch

> WebCore/inspector/InspectorController.cpp:-130
> -static const char* const monitoringXHRSettingName = "xhrMonitor";
Please make sure that it won't break existing clients.

> WebCore/inspector/InspectorController.cpp:251
> +String InspectorController::getBackendState()
The name sounds too general.
Comment 5 Ilya Tikhonovsky 2010-09-15 04:21:36 PDT
Comments addressed.

Committed r67547
	M	WebCore/ChangeLog
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/Inspector.idl
	M	WebCore/inspector/front-end/ConsoleView.js
	M	WebCore/inspector/front-end/Settings.js
	M	WebCore/inspector/front-end/inspector.js
	M	WebCore/inspector/InspectorController.h
	M	LayoutTests/http/tests/inspector/console-xhr-logging.html
	M	LayoutTests/inspector/report-API-errors.html
	M	LayoutTests/ChangeLog
r67547 = 28831a1ed2fb529f442aa99d1ddbb5a1f5e0423f (refs/remotes/trunk)