Bug 80507 - Web Inspector: [Styles] Click in the first line of rule while editing property starts a new property
Summary: Web Inspector: [Styles] Click in the first line of rule while editing propert...
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:
 
Reported: 2012-03-07 04:52 PST by Alexander Pavlov (apavlov)
Modified: 2012-03-09 01:52 PST (History)
10 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2012-03-07 05:05 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
Patch (3.27 KB, patch)
2012-03-07 07:13 PST, Alexander Pavlov (apavlov)
vsevik: 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) 2012-03-07 04:52:10 PST
Patch to follow.
Comment 1 Alexander Pavlov (apavlov) 2012-03-07 05:05:40 PST
Created attachment 130601 [details]
Patch
Comment 2 Vsevolod Vlasov 2012-03-07 06:36:37 PST
Comment on attachment 130601 [details]
Patch

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

> Source/WebCore/inspector/front-end/StylesSidebarPane.js:980
> +    selectorContainer.addEventListener("mousedown", this._handleEmptySpaceMouseDown.bind(this), false);

We have the same problem for each rule element also.

> Source/WebCore/inspector/front-end/StylesSidebarPane.js:1181
> +        var willCauseCancelEditing = this._willCauseCancelEditing;

Could you please extract this method?
Comment 3 Alexander Pavlov (apavlov) 2012-03-07 07:13:20 PST
Created attachment 130621 [details]
Patch
Comment 4 Vsevolod Vlasov 2012-03-07 07:37:37 PST
Comment on attachment 130621 [details]
Patch

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

> Source/WebCore/inspector/front-end/StylesSidebarPane.js:2031
> +            if (this.section._checkWillCancelEditing())

Consider renaming _startEditing to _mouseClicked.
Comment 5 Alexander Pavlov (apavlov) 2012-03-09 01:52:13 PST
Committed r110278: <http://trac.webkit.org/changeset/110278>