WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
40069
Web Inspector: Eliminate direct dependency of StylesSidebarPane on InspectorBackend
https://bugs.webkit.org/show_bug.cgi?id=40069
Summary
Web Inspector: Eliminate direct dependency of StylesSidebarPane on InspectorB...
Alexander Pavlov (apavlov)
Reported
2010-06-02 10:45:03 PDT
As soon as a CSS differ is introduced, the styles handling will become much more complex, to accommodate CSS source patching in the Resources panel.
Attachments
[PATCH] Suggested solution
(22.97 KB, patch)
2010-06-03 09:29 PDT
,
Alexander Pavlov (apavlov)
no flags
Details
Formatted Diff
Diff
[PATCH] Comments addressed
(18.29 KB, patch)
2010-06-04 03:56 PDT
,
Alexander Pavlov (apavlov)
pfeldman
: review-
Details
Formatted Diff
Diff
[PATCH] pfeldman's comments addressed
(17.27 KB, patch)
2010-06-04 07:02 PDT
,
Alexander Pavlov (apavlov)
pfeldman
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Alexander Pavlov (apavlov)
Comment 1
2010-06-03 09:29:48 PDT
Created
attachment 57778
[details]
[PATCH] Suggested solution
Yury Semikhatsky
Comment 2
2010-06-04 02:10:37 PDT
Comment on
attachment 57778
[details]
[PATCH] Suggested solution WebCore/inspector/front-end/ElementsPanel.js:35 + this.model = new WebInspector.CSSStyleModel(); should be this.styleMode or cssStyleModel WebCore/inspector/front-end/ElementsPanel.js:180 + this.model = new WebInspector.CSSStyleModel(); I'd rather change the model into a singleton as it doesn't depend on the ElementsPanel.
Alexander Pavlov (apavlov)
Comment 3
2010-06-04 03:56:20 PDT
Created
attachment 57863
[details]
[PATCH] Comments addressed
Yury Semikhatsky
Comment 4
2010-06-04 04:54:38 PDT
Comment on
attachment 57863
[details]
[PATCH] Comments addressed WebCore/inspector/front-end/StylesSidebarPane.js:951 + WebInspector.styleModel.addRule(this.pane.node.id, newContent, callback, this.editingSelectorCancelled.bind(this)); callback -> successCallback ?
Pavel Feldman
Comment 5
2010-06-04 06:12:20 PDT
Comment on
attachment 57863
[details]
[PATCH] Comments addressed Overall great first step. Few nits below: WebCore/inspector/front-end/CSSStyleModel.js:36 + styles: function(nodeId, authOnly, userCallback) getStylesAsync WebCore/inspector/front-end/CSSStyleModel.js:48 + computedStyle: function(nodeId, userCallback) getComputedStyleAsync WebCore/inspector/front-end/CSSStyleModel.js:39 + function callback(styles) why wrapping it? WebCore/inspector/front-end/CSSStyleModel.js:50 + function callback(style) ditto WebCore/inspector/front-end/CSSStyleModel.js:95 + toggleStyleEnablement: function(styleId, propertyName, disabled, userCallback) toggleStyleEnabled WebCore/inspector/front-end/CSSStyleModel.js:117 + function callback(success) no need to wrap WebCore/inspector/front-end/CSSStyleModel.js:115 + setStyleText: function(styleId, cssText, userCallback) setCSSText WebCore/inspector/front-end/CSSStyleModel.js:140 + InspectorBackend.applyStyleText(WebInspector.Callback.wrap(callback), styleId, styleText, propertyName); callback.bind(this) WebCore/inspector/front-end/CSSStyleModel.js:127 + var self = this; no 'this' here WebCore/inspector/front-end/StylesSidebarPane.js:1567 + WebInspector.styleModel.applyStyleText(this.style.id, styleText, this.name, successCallback, failureCallback); cssModel
Alexander Pavlov (apavlov)
Comment 6
2010-06-04 07:02:14 PDT
Created
attachment 57870
[details]
[PATCH] pfeldman's comments addressed
Alexander Pavlov (apavlov)
Comment 7
2010-06-04 08:14:13 PDT
Committing to
http://svn.webkit.org/repository/webkit/trunk
... M WebCore/ChangeLog A WebCore/inspector/front-end/CSSStyleModel.js M WebCore/inspector/front-end/StylesSidebarPane.js M WebCore/inspector/front-end/inspector.html M WebCore/inspector/front-end/inspector.js Committed
r60680
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug