Bug 39833 - Web Inspector: Implement retrieval of CSS stylesheets for source editing
Summary: Web Inspector: Implement retrieval of CSS stylesheets for source editing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on:
Blocks: 38578
  Show dependency treegraph
 
Reported: 2010-05-27 06:16 PDT by Alexander Pavlov (apavlov)
Modified: 2010-05-31 09:48 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Suggested solution (32.83 KB, patch)
2010-05-28 06:26 PDT, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Altered patch as discussed offline with pfeldman (29.96 KB, patch)
2010-05-31 06:27 PDT, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2010-05-27 06:16:22 PDT
Web Inspector needs stylesheets with source ranges of rule bodies to implement CSS editing
Comment 1 Alexander Pavlov (apavlov) 2010-05-28 06:26:49 PDT
Created attachment 57322 [details]
[PATCH] Suggested solution
Comment 2 Alexander Pavlov (apavlov) 2010-05-31 06:27:01 PDT
Created attachment 57458 [details]
[PATCH] Altered patch as discussed offline with pfeldman

Introduced explicit retrieval of rule ranges instead of adding them to the rules in the styleSheet.cssRules property
Comment 3 Pavel Feldman 2010-05-31 07:55:36 PDT
Comment on attachment 57458 [details]
[PATCH] Altered patch as discussed offline with pfeldman

WebCore/css/CSSParser.cpp:234
 +  void CSSParser::parseSheet(CSSStyleSheet* sheet, const String& string, HashMap<CSSStyleRule*, std::pair<unsigned, unsigned> >* ruleRangeMap)
You might want to introduce a typedef for this. Something like StyleRulePositions.
Comment 4 Alexander Pavlov (apavlov) 2010-05-31 09:48:05 PDT
Landed with the suggested typedef

Committing to http://svn.webkit.org/repository/webkit/trunk ...
        M       LayoutTests/ChangeLog
        A       LayoutTests/inspector/styles-source-offsets-expected.txt
        A       LayoutTests/inspector/styles-source-offsets.html
        M       WebCore/ChangeLog
        M       WebCore/css/CSSParser.cpp
        M       WebCore/css/CSSParser.h
        M       WebCore/inspector/InspectorBackend.cpp
        M       WebCore/inspector/InspectorBackend.h
        M       WebCore/inspector/InspectorBackend.idl
        M       WebCore/inspector/InspectorCSSStore.cpp
        M       WebCore/inspector/InspectorCSSStore.h
        M       WebCore/inspector/InspectorDOMAgent.cpp
        M       WebCore/inspector/InspectorDOMAgent.h
        M       WebCore/inspector/InspectorFrontend.cpp
        M       WebCore/inspector/InspectorFrontend.h
        M       WebCore/inspector/front-end/DOMAgent.js
Committed r60443