WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
67127
Web Inspector: Implement circular tabbing through the Styles sidebar pane contents
https://bugs.webkit.org/show_bug.cgi?id=67127
Summary
Web Inspector: Implement circular tabbing through the Styles sidebar pane con...
Alexander Pavlov (apavlov)
Reported
2011-08-29 07:34:35 PDT
Currently hitting Tab/Enter on a blank new property in the last editable style cancels editing. If a user has done this in error, they will need to use their mouse to restart the style editing. Instead, the editor should loop to the beginning end of the pane contents.
Attachments
[PATCH] Suggested solution
(10.50 KB, patch)
2011-08-29 09:09 PDT
,
Alexander Pavlov (apavlov)
no flags
Details
Formatted Diff
Diff
[PATCH] Simplified weird CSS property name/value field editor tabbing calculations
(15.21 KB, patch)
2011-09-05 09:08 PDT
,
Alexander Pavlov (apavlov)
no flags
Details
Formatted Diff
Diff
[PATCH] Extracted a hard part of the calculations into StylePropertiesSection (asked by yurys@chromium.org)
(15.33 KB, patch)
2011-09-07 04:18 PDT
,
Alexander Pavlov (apavlov)
no flags
Details
Formatted Diff
Diff
[PATCH] A minimally intrusive solution
(11.37 KB, patch)
2011-09-07 07:11 PDT
,
Alexander Pavlov (apavlov)
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Alexander Pavlov (apavlov)
Comment 1
2011-08-29 09:09:58 PDT
Created
attachment 105495
[details]
[PATCH] Suggested solution
Pavel Feldman
Comment 2
2011-08-29 12:28:24 PDT
Comment on
attachment 105495
[details]
[PATCH] Suggested solution Although I don't see any flags in the code, I suspect this could be implemented via adding less code. Can you track down the case when you jump from the last new property placeholder? The very moment when focus is about to leave the traversal?
Alexander Pavlov (apavlov)
Comment 3
2011-08-30 09:19:04 PDT
(In reply to
comment #2
)
> (From update of
attachment 105495
[details]
) > Although I don't see any flags in the code, I suspect this could be implemented via adding less code.
I will look into shortening the change.
> Can you track down the case when you jump from the last new property placeholder? The very moment when focus is about to leave the traversal?
What do you mean by this? Is there anything special about this case? Just a quick overview for editor navigation outside of currently edited properties (jumping between name-value gives a few more cases): * source editor (jump from): 1. ordinary property (may get deleted once the editor gets committed) 2. blank new property * target editor (jump to): 1. selector of the same section 2. selector of another section 3. ordinary property of the same section 4. ordinary property of another section 5. blank new property of the same section 6. blank new property of another section 11 combinations in total (1-4 excluded, as it is impossible), of which the new ones are (partly due to element.style not having a selector): 1-6 (Jump from the first element.style property backwards to a new blank property of the last editable section). This is handled by the lines 2035-2045. 2-5 (If there is only element.style and no matched rules, jump from element.style's blank property to itself) 2-6 (Jump from a blank new property of the last section to a blank new property of an empty element.style, or vice versa). These two cases (along with the already handled 2-1 and 2-2) are handled by the lines 2114-2128). I'll try to come up with something shorter for these cases.
Alexander Pavlov (apavlov)
Comment 4
2011-09-05 09:08:36 PDT
Created
attachment 106342
[details]
[PATCH] Simplified weird CSS property name/value field editor tabbing calculations
Alexander Pavlov (apavlov)
Comment 5
2011-09-07 04:18:25 PDT
Created
attachment 106568
[details]
[PATCH] Extracted a hard part of the calculations into StylePropertiesSection (asked by
yurys@chromium.org
)
Pavel Feldman
Comment 6
2011-09-07 04:41:36 PDT
Comment on
attachment 106568
[details]
[PATCH] Extracted a hard part of the calculations into StylePropertiesSection (asked by
yurys@chromium.org
) View in context:
https://bugs.webkit.org/attachment.cgi?id=106568&action=review
> Source/WebCore/inspector/front-end/StylesSidebarPane.js:941 > + var candidateSection = this;
I'd rather introduce Section::firstSibling - it can be fetched via parent element momentarily. Also, I would expect these two changes to solve the problem being addressed. Why is it not the case?
> Source/WebCore/inspector/front-end/StylesSidebarPane.js:963 > + var candidateSection = this;
ditto, Section::lastSibling
Alexander Pavlov (apavlov)
Comment 7
2011-09-07 07:11:20 PDT
Created
attachment 106581
[details]
[PATCH] A minimally intrusive solution
Alexander Pavlov (apavlov)
Comment 8
2011-09-07 07:13:34 PDT
(In reply to
comment #6
)
> (From update of
attachment 106568
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=106568&action=review
> > > Source/WebCore/inspector/front-end/StylesSidebarPane.js:941 > > + var candidateSection = this; > > I'd rather introduce Section::firstSibling - it can be fetched via parent element momentarily. Also, I would expect these two changes to solve the problem being addressed. Why is it not the case?
Added first/lastSibling. This is not the case because originally we were never able to cross the top boundary of a style with no selector (element.style). I have made a small refactoring to allow this, and dropped all my previous changes to reduce the change as much as possible.
> > Source/WebCore/inspector/front-end/StylesSidebarPane.js:963 > > + var candidateSection = this; > > ditto, Section::lastSibling
Done.
Yury Semikhatsky
Comment 9
2011-09-07 08:01:55 PDT
Comment on
attachment 106581
[details]
[PATCH] A minimally intrusive solution View in context:
https://bugs.webkit.org/attachment.cgi?id=106581&action=review
> Source/WebCore/inspector/front-end/StylesSidebarPane.js:944 > + if (curSection === this)
This shouldn't be needed since there is no sibling after the last section.
> Source/WebCore/inspector/front-end/StylesSidebarPane.js:950 > + return curSection.editable ? curSection : null;
return (curSection && curSection.editable) ? curSection : null;
> Source/WebCore/inspector/front-end/StylesSidebarPane.js:966 > + curSection = curSection.previousSibling;
Ditto.
> Source/WebCore/inspector/front-end/StylesSidebarPane.js:970 > + return curSection.editable ? curSection : null;
Ditto.
Alexander Pavlov (apavlov)
Comment 10
2011-09-07 08:15:20 PDT
Committed
r94671
: <
http://trac.webkit.org/changeset/94671
>
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