Closed
Bug 393582
Opened 18 years ago
Closed 17 years ago
Improve the nsXULPopupManager.cpp nsNavigationDirection code
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
People
(Reporter: enndeakin, Assigned: karunasagark)
Details
(Keywords: helpwanted, Whiteboard: [good first bug])
Attachments
(2 files, 1 obsolete file)
|
7.50 KB,
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
|
5.34 KB,
patch
|
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
From https://bugzilla.mozilla.org/show_bug.cgi?id=279703#c41
Improve the NavigationDirection code
Updated•18 years ago
|
Keywords: helpwanted
Whiteboard: [good first bug]
| Assignee | ||
Comment 1•18 years ago
|
||
what kind of improvements are expected here?? On a coarse view, HandleKeyboardNavigationInPopup and HandleKeyboardNavigation code seems to be fine.
| Reporter | ||
Comment 2•18 years ago
|
||
The changes described in https://bugzilla.mozilla.org/show_bug.cgi?id=279703#c41
| Assignee | ||
Comment 3•18 years ago
|
||
Attachment #296295 -
Flags: review?(enndeakin)
| Reporter | ||
Comment 4•18 years ago
|
||
(In reply to comment #3)
> Created an attachment (id=296295) [details]
> Improve the nsXULPopupManager.cpp nsNavigationDirection code
>
Doesn't this bring back the warnings that were removed in bug 388356?
| Assignee | ||
Comment 5•18 years ago
|
||
Attachment #296295 -
Attachment is obsolete: true
Attachment #296928 -
Flags: review?(enndeakin)
Attachment #296295 -
Flags: review?(enndeakin)
Updated•18 years ago
|
Assignee: nobody → karunasagark
Updated•18 years ago
|
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: PC → All
| Reporter | ||
Comment 6•18 years ago
|
||
Comment on attachment 296928 [details] [diff] [review]
Improve the nsXULPopupManager.cpp nsNavigationDirection code
Looks OK, but keep all the 'broken ordering' assertions somewhere, probably where you moved the 'illegal key code' assertion
Attachment #296928 -
Flags: review?(enndeakin) → review+
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: xptoolkit.menus → xptoolkit.widgets
| Reporter | ||
Comment 7•17 years ago
|
||
Attachment #354309 -
Flags: superreview?(bzbarsky)
Updated•17 years ago
|
Attachment #354309 -
Flags: superreview?(bzbarsky) → superreview+
Comment 8•17 years ago
|
||
Comment on attachment 354309 [details] [diff] [review]
updated patch
>+++ b/layout/xul/base/public/nsXULPopupManager.h
>+#if NS_STYLE_DIRECTION_LTR != 0 || NS_STYLE_DIRECTION_RTL != 1
>+ #error "Can't deal with this language"
>+#endif
Now that we have static asserts, this is probably simpler to write as:
PR_STATIC_ASSERT(NS_STYLE_DIRECTION_LTR == 0 && NS_STYLE_DIRECTION_RTL == 1);
>-/**
>- * DirectionFromKeyCode_rl_tb: an array that maps keycodes to values of
>- * nsNavigationDirection for right-to-left and top-to-bottom flow orientation
>- * This is defined in nsXULPopupManager.cpp.
>- */
Some variant of this comment should likely stay.
>+++ b/layout/xul/base/src/nsXULPopupManager.cpp
>+ NS_ASSERTION((NS_VK_HOME == NS_VK_END + 1) &&
>+ (NS_VK_LEFT == NS_VK_END + 2) &&
>+ (NS_VK_UP == NS_VK_END + 3) &&
>+ (NS_VK_RIGHT == NS_VK_END + 4) &&
>+ (NS_VK_DOWN == NS_VK_END + 5), "Broken ordering");
This could also be a PR_STATIC_ASSERT in the header, right?
sr=bzbarsky with those nits picked.
| Reporter | ||
Updated•17 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•