Bug 53295

Summary: Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
[PATCH] Suggested fix
yurys: review-
[PATCH] Comment addressed yurys: review+

Description Alexander Pavlov (apavlov) 2011-01-28 04:15:03 PST
1. Create a property, "border: 1px solid"
2. Start editing the value, place the caret after "s" (in "solid").
3. Press Up

You will see "saddlebrownolid", "addlebrown" selected. Instead, the suffix ("olid") should get removed.
Comment 1 Alexander Pavlov (apavlov) 2011-01-28 05:14:20 PST
Created attachment 80440 [details]
[PATCH] Suggested fix
Comment 2 Yury Semikhatsky 2011-01-28 06:07:11 PST
Comment on attachment 80440 [details]
[PATCH] Suggested fix

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

> Source/WebCore/inspector/front-end/StylesSidebarPane.js:1944
> +        if (!selection.isCollapsed || !selection.rangeCount)

Let's ignore the selection and always change suffix of the current word.
Comment 3 Alexander Pavlov (apavlov) 2011-01-28 06:33:07 PST
Created attachment 80442 [details]
[PATCH] Comment addressed
Comment 4 Yury Semikhatsky 2011-01-28 06:35:41 PST
Comment on attachment 80442 [details]
[PATCH] Comment addressed

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

> Source/WebCore/inspector/front-end/StylesSidebarPane.js:1941
> +    _selectSuffix: function()

I'd give this method a more specific name.
Comment 5 Alexander Pavlov (apavlov) 2011-01-28 07:08:03 PST
Landed with the method renamed.

Committing to http://svn.webkit.org/repository/webkit/trunk ...
        M       Source/WebCore/ChangeLog
        M       Source/WebCore/inspector/front-end/StylesSidebarPane.js
Committed r76941