Bug 145399

Summary: Web Inspector: Highlighting a CSS section does not deselect previously highlighted CSS sections
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Severity: Minor CC: commit-queue, graouts, hi, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Patch none

Description Devin Rousso 2015-05-26 18:31:58 PDT
In Elements > Styles > Rules, it is possible to highlight one section (such as the CSS applied to the "body") and then highlight another section (such as a specific div element) without de-highlighting the first section.  In a section with highlighted content, the only way to de-highlight that content is to click again within that section.  Clicking outside that section will not effect the highlighted content in any way.  It should instead be that clicking outside of one section will de-highlight all content in any other content so that only one piece of content is highlighted/selected at any given time.
Comment 1 Radar WebKit Bug Importer 2015-05-26 18:32:38 PDT
Comment 2 Devin Rousso 2015-06-02 14:14:30 PDT
Created attachment 254102 [details]
Comment 3 Timothy Hatcher 2015-06-05 11:16:59 PDT
Comment on attachment 254102 [details]

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

> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationSection.js:287
> +        this._delegate.editorFocused(this);

This should check for existence of the auction before calling it. This would also be "cssStyleDeclarationSectionEditorFocused".

> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:73
> +        if (typeof this._delegate.editorFocused === "function")

Delegate methods should be prefixed with the class name, so they can't conflict with others or built-in methods. So this should be "cssStyleDeclarationTextEditorFocused" to match the other delegate methods on this class.

> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:330
> +        if (typeof this._delegate.editorFocused === "function")
> +            this._delegate.editorFocused();


> Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js:260
> +    editorFocused(ignoredSection)

This would be cssStyleDeclarationSectionEditorFocused.
Comment 4 Devin Rousso 2015-06-05 15:16:35 PDT
Created attachment 254391 [details]
Comment 5 WebKit Commit Bot 2015-06-05 18:16:51 PDT
Comment on attachment 254391 [details]

Clearing flags on attachment: 254391

Committed r185279: <http://trac.webkit.org/changeset/185279>
Comment 6 WebKit Commit Bot 2015-06-05 18:16:55 PDT
All reviewed patches have been landed.  Closing bug.