Bug 39832 - Web Inspector: [CRASH] Get CSS rule offsets lazily.
Summary: Web Inspector: [CRASH] Get CSS rule offsets lazily.
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: Pavel Feldman
URL:
Keywords:
: 39870 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-27 05:57 PDT by Pavel Feldman
Modified: 2010-05-30 23:46 PDT (History)
9 users (show)

See Also:


Attachments
[PATCH] Proposed fix. (4.44 KB, patch)
2010-05-27 06:04 PDT, Pavel Feldman
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2010-05-27 05:57:16 PDT
There is no need to re-parse CSS and get rule offsets unless we start editing.

Also: when getting the offsets, create dummy stylesheet with proper owner node - otherwise urls are not resolved and parsing crashes.
Comment 1 Pavel Feldman 2010-05-27 06:04:13 PDT
Created attachment 57230 [details]
[PATCH] Proposed fix.
Comment 2 Yury Semikhatsky 2010-05-27 06:07:52 PDT
Comment on attachment 57230 [details]
[PATCH] Proposed fix.

WebCore/inspector/InspectorCSSStore.cpp:@
 +  SourceRange InspectorCSSStore::getStartEndOffsets(CSSStyleRule* rule)
Consider removing unused method.
Comment 3 Pavel Feldman 2010-05-27 06:12:57 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	D	LayoutTests/inspector/styles-source-offsets-expected.txt
	D	LayoutTests/inspector/styles-source-offsets.html
	M	WebCore/ChangeLog
	M	WebCore/inspector/InspectorCSSStore.cpp
	M	WebCore/inspector/InspectorDOMAgent.cpp
Committed r60297
Comment 4 Pavel Feldman 2010-05-30 23:46:28 PDT
*** Bug 39870 has been marked as a duplicate of this bug. ***