Bug 73323 - Web Inspector: [refactoring] do not clone nodes that contain linkified URLs
Summary: Web Inspector: [refactoring] do not clone nodes that contain linkified URLs
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: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 07:54 PST by Andrey Kosyakov
Modified: 2011-11-30 08:02 PST (History)
10 users (show)

See Also:


Attachments
Patch (7.08 KB, patch)
2011-11-29 07:56 PST, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Patch (7.08 KB, patch)
2011-11-29 08:06 PST, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Patch (8.00 KB, patch)
2011-11-29 08:46 PST, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Patch (9.53 KB, patch)
2011-11-30 07:03 PST, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Patch (9.41 KB, patch)
2011-11-30 07:14 PST, Andrey Kosyakov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2011-11-29 07:54:03 PST
Avoid cloning nodes containing linkified URLs in StylesSidebatrPane. This is an intermediate step to use JS properties instead of "preferred_panel" and "line_number" attributes on linkified URLs.
Comment 1 Andrey Kosyakov 2011-11-29 07:56:31 PST
Created attachment 116970 [details]
Patch
Comment 2 Alexander Pavlov (apavlov) 2011-11-29 08:04:53 PST
Comment on attachment 116970 [details]
Patch

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

Looks good

> Source/WebCore/inspector/front-end/StylesSidebarPane.js:1132
> +        this.identifier = identifier

; at the end lost
Comment 3 Andrey Kosyakov 2011-11-29 08:06:32 PST
Created attachment 116971 [details]
Patch
Comment 4 Pavel Feldman 2011-11-29 08:09:33 PST
Comment on attachment 116970 [details]
Patch

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

> Source/WebCore/inspector/front-end/StylesSidebarPane.js:-925
> -    function linkifyUncopyable(url, line)

Lets fix linkify uncopyable first.
Comment 5 Andrey Kosyakov 2011-11-29 08:46:30 PST
Created attachment 116977 [details]
Patch
Comment 6 Pavel Feldman 2011-11-29 11:57:33 PST
Comment on attachment 116970 [details]
Patch

Cleaning r? that I have set accidentally.
Comment 7 Pavel Feldman 2011-11-30 01:52:25 PST
Comment on attachment 116977 [details]
Patch

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

> Source/WebCore/inspector/front-end/StylesSidebarPane.js:-935
> -    if (this.styleRule.sourceURL)

Is there a reason behind the change of behavior?

> Source/WebCore/inspector/front-end/StylesSidebarPane.js:1124
> +    _updateRuleOrigin: function(text)

You don't need to update the origin. Extracting a method that would create a DOM elements link for given section is sufficient for getting rid of the clone.
Comment 8 Andrey Kosyakov 2011-11-30 07:03:59 PST
Created attachment 117186 [details]
Patch
Comment 9 Andrey Kosyakov 2011-11-30 07:14:12 PST
Created attachment 117188 [details]
Patch
Comment 10 Andrey Kosyakov 2011-11-30 07:15:56 PST
- dropped StylePropertiesSection.identifier
- dropped updateOrigintText()
- dropped url extraction from styleRule.rule
Comment 11 Andrey Kosyakov 2011-11-30 08:02:51 PST
Committed r101518: <http://trac.webkit.org/changeset/101518>