WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
20273
Allow incrementing/decrementing numbers in editable style properties with arrow keys
https://bugs.webkit.org/show_bug.cgi?id=20273
Summary
Allow incrementing/decrementing numbers in editable style properties with arr...
Timothy Hatcher
Reported
2008-08-04 08:19:15 PDT
Firebug lets you increment/decrement numbers at the insertion point with the arrow keys. We should support this.
Attachments
Patch 1 of 2
(8.96 KB, patch)
2008-08-04 13:14 PDT
,
Timothy Hatcher
aroben
: review+
Details
Formatted Diff
Diff
Patch 2 of 2
(17.80 KB, patch)
2008-08-04 13:15 PDT
,
Timothy Hatcher
aroben
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Timothy Hatcher
Comment 1
2008-08-04 13:14:40 PDT
Created
attachment 22637
[details]
Patch 1 of 2
Timothy Hatcher
Comment 2
2008-08-04 13:15:15 PDT
Created
attachment 22638
[details]
Patch 2 of 2
Adam Roben (:aroben)
Comment 3
2008-08-04 18:53:02 PDT
Comment on
attachment 22637
[details]
Patch 1 of 2 I wonder if there's any way to reduce the code duplication in rangeOfWord? r=me
Adam Roben (:aroben)
Comment 4
2008-08-04 19:07:51 PDT
Comment on
attachment 22638
[details]
Patch 2 of 2 + var wordRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset , " \t\n\"':;,/()", this.listItemElement); I think it would really improve readability to start putting these character sets into named variables, like cssValueDelimeters or something. + var changeAmount = (event.shiftKey ? 10 : ((event.altKey || numberNearZero) ? 0.1 : 1)); I think this would be a little clearer as if/elseif/else. + if ((shorthandProperty || individualProperty) in foundProperties) I think you should put "(shorthandProperty || individualProperty) into a local variable since you keep repeating that construct. Do you have any test cases to land with this? r=me
Anthony Ricaud
Comment 5
2008-08-05 02:09:27 PDT
Firebug uses Page up and down to increase/decrease by ten (see
http://getfirebug.com/keyboard.html
). I'm not a huge fan of that shortcut but I'm mentioning this for compatibility between tools.
Timothy Hatcher
Comment 6
2008-08-05 09:49:23 PDT
Landed in
r35560
and
r35561
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug