WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED LATER
105258
Web Inspector: Implement the "disabled" attribute toggling for CSS stylesheets
https://bugs.webkit.org/show_bug.cgi?id=105258
Summary
Web Inspector: Implement the "disabled" attribute toggling for CSS stylesheets
Alexander Pavlov (apavlov)
Reported
2012-12-17 23:40:57 PST
Upstreaming
https://code.google.com/p/chromium/issues/detail?id=155476
. Patch to follow.
Attachments
Patch
(29.44 KB, patch)
2012-12-18 01:19 PST
,
Alexander Pavlov (apavlov)
no flags
Details
Formatted Diff
Diff
Patch
(39.88 KB, patch)
2012-12-28 03:59 PST
,
Alexander Pavlov (apavlov)
pfeldman
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alexander Pavlov (apavlov)
Comment 1
2012-12-18 01:19:01 PST
Created
attachment 179899
[details]
Patch
Build Bot
Comment 2
2012-12-18 13:16:55 PST
Comment on
attachment 179899
[details]
Patch
Attachment 179899
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/15402334
New failing tests: http/tests/inspector/resource-har-pages.html
Alexander Pavlov (apavlov)
Comment 3
2012-12-28 03:59:15 PST
Created
attachment 180861
[details]
Patch
Pavel Feldman
Comment 4
2012-12-28 04:49:56 PST
Comment on
attachment 180861
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180861&action=review
> Source/WebCore/inspector/CodeGeneratorInspector.py:1071 > + return "%s%s" % (helper.full_name_prefix_for_use, fixed_type_name.class_name)
Why did this change? What is the diff between the old generated and new generated code?
> Source/WebCore/inspector/Inspector.json:2364 > + { "name": "header", "$ref": "CSSStyleSheetHeader", "description": "Updated stylesheet header." }
Why do we need this?
> Source/WebCore/inspector/Inspector.json:2482 > + "name": "activeStyleSheetsUpdated",
I think you should have styleSheetAdded / styleSheetRemoved notifications instead.
> Source/WebCore/inspector/InspectorCSSAgent.cpp:360 > + SetStyleSheetDisabledAction(InspectorStyleSheet* styleSheet, bool disabled)
I think you should split stylesheet disable and stylesheet tracking changes.
> Source/WebCore/inspector/InspectorCSSAgent.cpp:618 > + if (m_styleSheetHeadersRequested && m_state->getBoolean(CSSAgentState::cssAgentEnabled)) {
m_styleSheetHeadersRequested can't be true without m_state->getBoolean(CSSAgentState::cssAgentEnabled) being true.
> Source/WebCore/inspector/InspectorCSSAgent.cpp:724 > + removedSheets.remove(newCSSSheet);
i.e. just dispatch them here.
> Source/WebCore/inspector/front-end/CSSStyleModel.js:377 > + this._resourceBinding._styleSheetIdToHeader[styleSheetId] = newHeader;
just patch it here.
> Source/WebCore/inspector/front-end/StylesSourceMapping.js:242 > + setText.call(this);
You should not make content setting asynchronous.
Alexander Pavlov (apavlov)
Comment 5
2012-12-28 05:18:44 PST
Comment on
attachment 180861
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=180861&action=review
>> Source/WebCore/inspector/CodeGeneratorInspector.py:1071 >> + return "%s%s" % (helper.full_name_prefix_for_use, fixed_type_name.class_name) > > Why did this change? What is the diff between the old generated and new generated code?
< void activeStyleSheetsUpdated(PassRefPtr<TypeBuilder::Array<const TypeBuilder::CSS::StyleSheetId&> > removed, PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSStyleSheetHeader> > added); ---
> void activeStyleSheetsUpdated(PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::StyleSheetId> > removed, PassRefPtr<TypeBuilder::Array<TypeBuilder::CSS::CSSStyleSheetHeader> > added);
The former is clearly wrong.
>> Source/WebCore/inspector/Inspector.json:2364 >> + { "name": "header", "$ref": "CSSStyleSheetHeader", "description": "Updated stylesheet header." } > > Why do we need this?
Will move into the styleSheetChanged event data
>> Source/WebCore/inspector/Inspector.json:2482 >> + "name": "activeStyleSheetsUpdated", > > I think you should have styleSheetAdded / styleSheetRemoved notifications instead.
OK
>> Source/WebCore/inspector/InspectorCSSAgent.cpp:360 >> + SetStyleSheetDisabledAction(InspectorStyleSheet* styleSheet, bool disabled) > > I think you should split stylesheet disable and stylesheet tracking changes.
OK
>> Source/WebCore/inspector/InspectorCSSAgent.cpp:618 >> + if (m_styleSheetHeadersRequested && m_state->getBoolean(CSSAgentState::cssAgentEnabled)) { > > m_styleSheetHeadersRequested can't be true without m_state->getBoolean(CSSAgentState::cssAgentEnabled) being true.
Agreed on sending styleSheetAdded() for all active stylesheets in enable()
>> Source/WebCore/inspector/InspectorCSSAgent.cpp:724 >> + removedSheets.remove(newCSSSheet); > > i.e. just dispatch them here.
OK
>> Source/WebCore/inspector/front-end/CSSStyleModel.js:377 >> + this._resourceBinding._styleSheetIdToHeader[styleSheetId] = newHeader; > > just patch it here.
We'll patch it on styleSheetChanged, which will provide us with a CSSStyleSheetHeader
>> Source/WebCore/inspector/front-end/StylesSourceMapping.js:242 >> + setText.call(this); > > You should not make content setting asynchronous.
OK
Brian Burg
Comment 6
2014-04-10 07:50:14 PDT
Not sure we want this feature, closing for now.
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