Closed
Bug 1167239
Opened 9 years ago
Closed 9 years ago
GTK3: TEST-UNEXPECTED-FAIL | dom/events/test/test_bug426082.html | Moving the mouse down from the label should have unpressed the button.
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: acomminos, Assigned: acomminos, Mentored)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
acomminos
:
review+
|
Details | Diff | Splinter Review |
Running mochitest dom/events/test/test_bug426082.html on GTK3 builds fails. TEST-UNEXPECTED-FAIL | dom/events/test/test_bug426082.html | Moving the mouse down from the label should have unpressed the button.
Assignee | ||
Updated•9 years ago
|
QA Contact: acomminos
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → acomminos
QA Contact: acomminos
Assignee | ||
Comment 1•9 years ago
|
||
This patch makes GTK3's GtkStateFlags more consistent with what is currently done on GTK2 (requiring hover for the button active state), fixing the test in this bug. Thanks!
Attachment #8608914 -
Flags: review?(karlt)
Comment 2•9 years ago
|
||
Comment on attachment 8608914 [details] [diff] [review] Fix button focus state flags on GTK3 I doubt this is the right fix. I suspect there are some widgets that should be active even when there is no hover. It shouldn't be the drawing code applying a restriction that the widget is not active when not hovered. That should be determined by the particular widget implementation. Is it depressed or active that is set on the button when not expected? The GTK2 code is quite different because the widget can have only one state. With GTK3 there are different flags, and so different combinations are possible.
Attachment #8608914 -
Flags: review?(karlt) → review-
Assignee | ||
Comment 3•9 years ago
|
||
'active' is being set on buttons that are not currently being hovered over, which violates the expectation of dom/events/test/test_bug426082.html.
I agree though, moving the activity decision out of the drawing code makes a lot of sense. What are your thoughts on putting the check in nsNativeThemeGtk::GetGtkWidgetAndState?
Cocoa does something similar in nsNativeThemeCocoa.cpp when dealing with buttons:
> [cell setHighlighted:isActive &&
> inState.HasAllStates(NS_EVENT_STATE_ACTIVE | NS_EVENT_STATE_HOVER)];
Comment hidden (Legacy TBPL/Treeherder Robot) |
Assignee | ||
Comment 5•9 years ago
|
||
This patch moves the button activity decision based on hover state to nsNativeThemeGTK::GetGtkWidgetAndState. Thanks!
Attachment #8608914 -
Attachment is obsolete: true
Attachment #8622475 -
Flags: review?(karlt)
Comment 6•9 years ago
|
||
Comment on attachment 8622475 [details] [diff] [review] Make GTK button activity require hover. > } > >+ if (aWidgetType == NS_THEME_BUTTON) { >+ aState->active &= aState->inHover; >+ } Please make this "else if". I think this is fine, but some other button widgets should also behave similarly.
Attachment #8622475 -
Flags: review?(karlt) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Updated to cover more button types. Try (GTK2): https://treeherder.mozilla.org/#/jobs?repo=try&revision=074645cc5482
Attachment #8622475 -
Attachment is obsolete: true
Attachment #8623070 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/709775ec03a2
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•