Bug 53295 - Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword
Summary: Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword
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: 2011-01-28 04:15 PST by Alexander Pavlov (apavlov)
Modified: 2011-01-28 07:08 PST (History)
10 users (show)

See Also:


Attachments
[PATCH] Suggested fix (2.41 KB, patch)
2011-01-28 05:14 PST, Alexander Pavlov (apavlov)
yurys: review-
Details | Formatted Diff | Diff
[PATCH] Comment addressed (2.39 KB, patch)
2011-01-28 06:33 PST, Alexander Pavlov (apavlov)
yurys: 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) 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