Closed
Bug 1428297
Opened 7 years ago
Closed 7 years ago
Ignore the widget/view usage that is used to show the dropdown menu when content-select is enabled.
Categories
(Core :: Layout: Form Controls, enhancement, P3)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla59
| Tracking | Status | |
|---|---|---|
| firefox59 | --- | fixed |
People
(Reporter: tommykuo, Assigned: tommykuo)
References
Details
Attachments
(3 files)
To render the dropdown menu in the content process, we should get rid of using widget/view to show that.
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•7 years ago
|
Attachment #8940576 -
Flags: review?(mats)
| Assignee | ||
Updated•7 years ago
|
Component: Layout → Layout: Form Controls
Updated•7 years ago
|
Priority: -- → P3
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•7 years ago
|
Summary: Get rid of using widget/view to show the dropdown menu when content-select is enabled. → Ignore the widget/view usage that is used to show the dropdown menu when content-select is enabled.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•7 years ago
|
Attachment #8941315 -
Flags: review?(mats)
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 7•7 years ago
|
||
It seems that the patches cannot pass the a11y test.
| Assignee | ||
Comment 8•7 years ago
|
||
Hi Jamie,
I found my part 1 patch made the a11y test case fail[1]. However, I think my patch would only work when the pref is set to true, so it would do nothing by default. Then I tried to apply the patch[2] that you provide, and it seems to pass the test case. Do you know the reason? I don't think my patch will affect the original code. Thanks!
[1]: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ebc770fb282d8e35aa300dc2acd012dc619987a0&selectedJob=155240302
[2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1421229#c25
Flags: needinfo?(jteh)
| Assignee | ||
Updated•7 years ago
|
Attachment #8940576 -
Flags: review?(mats)
| Assignee | ||
Updated•7 years ago
|
Attachment #8941315 -
Flags: review?(mats)
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 11•7 years ago
|
||
Oh... I found the problem. There is a missing `!` in my patch.
Flags: needinfo?(jteh)
Comment 12•7 years ago
|
||
Preferences::GetBool() is a bit slow. I think you should make a nsLayoutUtils
function to lookup that pref and use Preferences::AddBoolVarCache in that function.
See for example:
https://searchfox.org/mozilla-central/rev/88439dc6c5b02e167032374071cdc697a056efa1/layout/base/nsLayoutUtils.cpp#624
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•7 years ago
|
Attachment #8941696 -
Flags: review?(mats)
Comment 16•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8941696 [details]
Bug 1428297 - (Part 1) Add an nsLayoutUtils function to check whether content-select is enabled
https://reviewboard.mozilla.org/r/211938/#review217842
Attachment #8941696 -
Flags: review?(mats) → review+
Comment 17•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8941315 [details]
Bug 1428297 - (Part 2) Ignore the widget/view usage that is used to show the dropdown menu when content-select is enabled.
https://reviewboard.mozilla.org/r/211616/#review217912
::: layout/base/nsLayoutUtils.cpp:7437
(Diff revision 4)
> - if (frameType == LayoutFrameType::ListControl) {
> + if (!nsLayoutUtils::IsContentSelectEnabled() &&
> + frameType == LayoutFrameType::ListControl) {
Just to be clear for the record, this makes nsLayoutUtils::IsPopup()
return false for the dropdown frame. This seems a little odd,
but if you think this is the right way to go it's fine with me.
I haven't analyzed in detail how the IsPopup() is used - I assume
you did and determined it's fine.
::: layout/forms/nsListControlFrame.cpp:978
(Diff revision 4)
> - if (IsInDropDownMode()) {
> + if (!nsLayoutUtils::IsContentSelectEnabled() &&
> + IsInDropDownMode()) {
> + // TODO(kuoe0) Remove the following code when content-select is enabled.
> AddStateBits(NS_FRAME_IN_POPUP);
Ditto - it seems a bit odd to not mark the dropdown frame NS_FRAME_IN_POPUP, but I'll assume you checked the uses and determined it's fine.
Attachment #8941315 -
Flags: review?(mats) → review+
Comment 18•7 years ago
|
||
| mozreview-review | ||
Comment on attachment 8940576 [details]
Bug 1428297 - (Part 3) Disable the assertion that don't allow to call ShowDropDown() in the content process when content-select is enabled.
https://reviewboard.mozilla.org/r/210774/#review217916
Attachment #8940576 -
Flags: review?(mats) → review+
| Assignee | ||
Comment 19•7 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #17)
> Just to be clear for the record, this makes nsLayoutUtils::IsPopup()
> return false for the dropdown frame. This seems a little odd,
> but if you think this is the right way to go it's fine with me.
> I haven't analyzed in detail how the IsPopup() is used - I assume
> you did and determined it's fine.
>
> Ditto - it seems a bit odd to not mark the dropdown frame NS_FRAME_IN_POPUP,
> but I'll assume you checked the uses and determined it's fine.
According to my analysis, I think the term, 'Popup', in Firefox means the pop-up windows that are using widgets to show. So, I think we don't need to set `NS_FRAME_IN_POPUP` and return true for `IsPopup()` when content-select is enabled.
Comment 21•7 years ago
|
||
Pushed by tokuo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4334dcb44c57
(Part 1) Add an nsLayoutUtils function to check whether content-select is enabled r=mats
https://hg.mozilla.org/integration/autoland/rev/6ed02115d2c6
(Part 2) Ignore the widget/view usage that is used to show the dropdown menu when content-select is enabled. r=mats
https://hg.mozilla.org/integration/autoland/rev/46dd32e1f0fa
(Part 3) Disable the assertion that don't allow to call ShowDropDown() in the content process when content-select is enabled. r=mats
| Assignee | ||
Comment 22•7 years ago
|
||
Comment 23•7 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4334dcb44c57
https://hg.mozilla.org/mozilla-central/rev/6ed02115d2c6
https://hg.mozilla.org/mozilla-central/rev/46dd32e1f0fa
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in
before you can comment on or make changes to this bug.
Description
•