Commit Graph

106 Commits

Author SHA1 Message Date
Emilio Cobos Alvarez
c946015d10 Bug 1708735 - Make the arrowpanel code more generic. r=dao,zombie
Share the concept of a panel content with all other menupopups / panels.

This avoids importing global.css in the shadow tree, and renames the
arrowcontent part to just "content", since we want to introduce a
"content" part for other panels.

This shouldn't change behavior but makes bug 1708136 a matter of
tweaking a couple CSS rules and fixing up test failures.

Differential Revision: https://phabricator.services.mozilla.com/D113990
2021-05-30 12:31:49 +00:00
Butkovits Atila
0cd2df1600 Backed out changeset 229e905d571e (bug 1708735) for multiple regressions. CLOSED TREE 2021-05-30 14:27:20 +03:00
Emilio Cobos Alvarez
33b5b3ec17 Bug 1708735 - Make the arrowpanel code more generic. r=dao,zombie
Share the concept of a panel content with all other menupopups / panels.

This avoids importing global.css in the shadow tree, and renames the
arrowcontent part to just "content", since we want to introduce a
"content" part for other panels.

This shouldn't change behavior but makes bug 1708136 a matter of
tweaking a couple CSS rules and fixing up test failures.

Differential Revision: https://phabricator.services.mozilla.com/D113990
2021-05-28 11:56:07 +00:00
Gijs Kruitbosch
71ebc9493a Bug 1708985 - enforce the default background colour on the ContentSelect menulist's menupopup when custom option foreground colours are used, r=emilio,jaws
Broadly, this patch does 2 things:

- it mirrors the logic bug 1702258 introduced for <select> styling for <option> styling
- it enforces that if the website specifies custom foreground colours for options,
  we use the website-specified colour for the option background, too (even if it
  matches the UA/select style).

I also added automated testing for 3 cases:
1. the default dark mode situation (where we expect dark mode styles),
2. the case from the bug where the website specifies `#fff` for the background
of the select and the background of the options, but specifies a custom
foreground colour for the option (but not the select).
3. a very similar case where the website only specifies the background on the
select, and only the foreground on the option.

Differential Revision: https://phabricator.services.mozilla.com/D114382
2021-05-06 21:16:12 +00:00
Neil Deakin
3f1ebf3227 Bug 1667235, fix various issues with the browser_selectpopup.js test, mostly on Windows, r=Gijs
Change the height of a window opened during the test now that menus on windows 10 are larger. Make sure that the zoom level is reset after the test so that running the test again doesn't use the old zoom level. The default value of 'ignorekeys' is 'shortcuts' on Windows so reset this properly otherwise the test fails if run again.

Differential Revision: https://phabricator.services.mozilla.com/D112407
2021-04-19 17:22:08 +00:00
Butkovits Atila
1e7d77464a Bug 1667235 - disable browser_selectpopup.js on Windows for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D111716
2021-04-12 21:35:48 +00:00
Neil Deakin
2cbab9aae4 Bug 1701963, fix some menu related tests on Windows 10 that fail with the larger menu size, r=Gijs
Account for the border and padding now on the inner arrowscrollbox, and increase some window and margin
sizes to account for the menu being larger in Windows 10.

Differential Revision: https://phabricator.services.mozilla.com/D110587
2021-04-05 16:00:32 +00:00
Emilio Cobos Alvarez
5f7b937abf Bug 1702847 - Ensure we set the select background from content if either background or color is set. r=Gijs
This is also an issue with proton in dark mode, and I think that this solution
is sensible.

Differential Revision: https://phabricator.services.mozilla.com/D110733
2021-04-05 09:28:21 +00:00
Emilio Cobos Alvarez
9298192d52 Bug 1702258 - Fix interaction of proton with custom styles. r=Gijs
If the site specifies the background-color, we also specify the color to the
HTML UA style. This fixes the msn issue in a better way.

Unstyled selects would still get dark mode.

Differential Revision: https://phabricator.services.mozilla.com/D110586
2021-04-01 19:29:44 +00:00
Emilio Cobos Álvarez
6850430ece Bug 1701792 - Also use standins for graytext with the non-native theme, as it's used for disabled controls. r=mstange
Also remove a fixed FIXME comment, while I was going through the select code to
fix browser_selectpopup_colors.

Differential Revision: https://phabricator.services.mozilla.com/D110154
2021-03-30 04:24:40 +00:00
Gijs Kruitbosch
0180ad464d Bug 1693406 - fix select dropdown styling in proton when the page customizes it, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D105642
2021-02-18 16:33:20 +00:00
Andrew Nicols
230a1c5499 Bug 1686663: Set the value of buttons based on provided event r=smaug
Currently the default value of buttons is set to
MOUSE_BUTTONS_NOT_SPECIFIED, which defers calculation of the value to
the DOMWindowUtils GetButtonsFlagForButton function. This calculates a
default value based upon the value of the button key.

By specifying a default button value of 0, which has a meaning of
ePrimary, the buttons value is calculated as the
ePrimaryFlag (1), suggesting that a button was pressed.

This patch changes the behaviour to set the value of buttons based on
the original value of button before the default was applied. The value
of buttons also considers the event type to ensure that a mousedown
event has a default value calculated by DOMWindowUtils.

With the new behaviour:
- if a value was explicitly set for buttons, this is used
- if a value was explicitly set for button, then the not-specified
  constant is used to defer calculation to DOMWindowUtils
- if an event type was specified and that event type was not the
  'mousedown' event, then the no-button constant is used
- if an event type was not specified or it was for the 'mousedown'
  event, then the not-specified constant is used to defer calculation to
  DOMWindowUtils

Differential Revision: https://phabricator.services.mozilla.com/D101690
2021-02-04 00:59:54 +00:00
Nika Layzell
ed9e85fc9a Bug 1671983 - Part 4: Stop awaiting BrowserTestUtils.loadURI, r=annyG,remote-protocol-reviewers,extension-reviewers,preferences-reviewers,whimboo,zombie
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.

This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.

Differential Revision: https://phabricator.services.mozilla.com/D94641
2020-11-12 18:01:03 +00:00
Emilio Cobos Alvarez
6ed590a4f8 Bug 1675323 - Apply scrollbar-width to the content select scrollbox. r=mconley
(Instead of applying it directly to the menulist).

Since it's not inherited, we need to get the right value over to the scrollbox.
For that, export it from the arrowscrollbox, with the same name as the places
menupopup uses for the same purpose.

Differential Revision: https://phabricator.services.mozilla.com/D95887
2020-11-05 21:11:54 +00:00
Razvan Maries
beb7584870 Backed out 7 changesets (bug 1658084, bug 1671983) for perma failures on browser_async_remove_tab.js and browser_e10s_chrome_process.js. CLOSED TREE
Backed out changeset 2e6309c1cdbd (bug 1658084)
Backed out changeset 99aafd9304ef (bug 1671983)
Backed out changeset 80280b85280a (bug 1671983)
Backed out changeset 008db2659002 (bug 1671983)
Backed out changeset 32bd45c7fe3a (bug 1671983)
Backed out changeset 56e227e6580c (bug 1671983)
Backed out changeset a404f809f79d (bug 1671983)
2020-11-04 04:23:47 +02:00
Nika Layzell
f6849f1603 Bug 1671983 - Part 4: Stop awaiting BrowserTestUtils.loadURI, r=annyG,remote-protocol-reviewers,extension-reviewers,preferences-reviewers,whimboo,zombie
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.

This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.

Differential Revision: https://phabricator.services.mozilla.com/D94641
2020-11-04 00:55:36 +00:00
Emilio Cobos Alvarez
6eb1ea3bbe Bug 1394491 - Don't override menucaption background for content selects. r=mconley
So that they use the select background color by default. The code in
SelectParent expects this when figuring out whether to set background colors
too. This matches other browsers and MacOS, see:

  data:text/html,<select style="background: red"><optgroup label="foo"><option>Bar</option><option>Baz</option></optgroup></select>

Differential Revision: https://phabricator.services.mozilla.com/D95690
2020-11-03 17:56:23 +00:00
Jonathan Kew
9b72ad96e4 Bug 1533462 - Run font-info loader immediately for accessiblecaret and forms tests, for more consistent behavior. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D88545
2020-08-30 22:59:57 +00:00
Joel Maher
534301ae86 Bug 1661132 - disable a few mochitests on osx opt. r=bc
disable a few mochitests on osx opt

Differential Revision: https://phabricator.services.mozilla.com/D88193
2020-08-25 21:48:25 +00:00
Emilio Cobos Álvarez
a846c9c4ed Bug 1650703 - Don't double-apply text zoom for <select> popups. r=Gijs
The computed font-size already has the zoom value in that case.

Differential Revision: https://phabricator.services.mozilla.com/D83275
2020-07-13 10:36:09 +00:00
Emilio Cobos Álvarez
9c19b06691 Bug 1643522 - follow-up: Allow some floating point inaccuracies.
MANUAL PUSH: Orange on a CLOSED TREE
2020-06-05 15:43:51 +02:00
Emilio Cobos Álvarez
88580a19f0 Bug 1643522 - Use a sensible way to get the zoom for a browser in SelectParent.jsm. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D78471
2020-06-05 10:48:59 +00:00
Emilio Cobos Álvarez
58f95a9a17 Bug 1634109 - Support scrollbar customization on the <select> dropdown. r=Gijs
This needs another platform fix (bug 1571376), but I'll make sure that's
fixed before landing this.

Differential Revision: https://phabricator.services.mozilla.com/D73184
2020-04-30 13:12:50 +00:00
Edgar Chen
11ec3fb80d Bug 1628186 - Mouse event on <select> elements should be composed; r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D71073
2020-04-17 16:25:34 +00:00
Bogdan Tara
87c11c1d7e Bug 40545 - Fix prettier errors on browser_selectpopup.js and SelectChild.jsm CLOSED TREE 2020-04-06 21:32:59 +03:00
Emilio Cobos Álvarez
6483b32fe7 Bug 40545 - Fix the empty-label attribute case in the select popup. r=chutten
And rename GetRenderLabel to GetRenderedLabel, as it's a slightly more
descriptive name IMHO.

Differential Revision: https://phabricator.services.mozilla.com/D69837
2020-04-06 16:43:17 +00:00
Chris H-C
bd97e241a8 Bug 40545 - Options to use label attribute when present r=emilio,jfkthame,mats
According to spec, option elements with label attributes should show and use
those labels rather than their element text. So let's do that.

Requires some trickery because the option element is a block element (so it
lays out its width based on its text content) so we put its label (if it has
one) in its ::before and skip frame generation so it measures the text of its
label, not of its text node children.

Differential Revision: https://phabricator.services.mozilla.com/D63545
2020-04-06 16:06:36 +00:00
Gurzau Raul
7488b7888f Backed out changeset 813e1405e501 (bug 40545) for Android failures at test_bug659596.html on a CLOSED TREE. 2020-04-01 19:35:32 +03:00
Chris H-C
b9fca9539f Bug 40545 - Options to use label attribute when present r=emilio,jfkthame,mats
According to spec, option elements with label attributes should show and use
those labels rather than their element text. So let's do that.

Requires some trickery because the option element is a block element (so it
lays out its width based on its text content) so we put its label (if it has
one) in its ::before and skip frame generation so it measures the text of its
label, not of its text node children.

Differential Revision: https://phabricator.services.mozilla.com/D63545
2020-04-01 09:20:21 +00:00
sjustus
b18b372f6e Bug 1622242 - Replace BrowserTestUtils.waitForCondition with TestUtils.waitForCondition in browser_selectpopup_colors.js r=prathiksha
Differential Revision: https://phabricator.services.mozilla.com/D66975
2020-03-18 11:10:09 +00:00
Mark Banner
1cc76add79 Bug 1620218 - Automatic code fixes for Prettier 1.18.2 upgrade. r=mossop,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65509
2020-03-08 21:45:16 +00:00
Mark Banner
d375cfec54 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D65703
2020-03-07 10:09:44 +00:00
Dão Gottwald
91122eb636 Bug 1610497 - Increase browser window min-width so the address bar can be focused by mouse. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D60960
2020-01-30 15:59:29 +00:00
Kris Maglione
7b2657b231 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741
2019-12-13 20:36:24 +00:00
Kris Maglione
8c0d38f33d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-13 20:36:16 +00:00
shindli
0aa47af90e Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione
eb68f8b548 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741
2019-12-10 23:07:21 +00:00
Kris Maglione
ad3537fc50 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-10 23:07:13 +00:00
Noemi Erli
21eec8658f Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione
6fb2c35351 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741
2019-12-07 18:44:34 +00:00
Kris Maglione
88fbf261f8 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-07 19:11:58 +00:00
Daniel Varga
85f263a4c2 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione
487c4fe9c7 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741
2019-12-06 22:14:22 +00:00
Kris Maglione
e59706f08a Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740
2019-12-06 22:14:14 +00:00
Kashav Madan
43686e5ccd Bug 1590540 - Remove BrowserTestUtils.contentPainted, r=mconley
This helper only has 2 callers. Just use BrowserTestUtils.waitForContentEvent
directly.

Depends on D51441

Differential Revision: https://phabricator.services.mozilla.com/D52058
2019-11-08 16:24:40 +00:00
Emilio Cobos Alvarez
6f5aad948b Bug 1590644 - Set font family on the content select menupopup, not menuitem. r=mconley
So that fonts chosen by the author inherit into the menuitems
properly, instead of being overriden.

Differential Revision: https://phabricator.services.mozilla.com/D51086
2019-11-03 10:04:34 +00:00
monikamaheshwari
edb30ffaec Bug 1578683 Turn on ESLint rule prefer-boolean-length-check for toolkit and browser r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D45629
2019-09-14 09:39:26 +00:00
Hiroyuki Ikezoe
3aa13f1c4c Bug 1578973 - Don't use autofocus in data URL in browser_selectpopup.js. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D45779
2019-09-13 11:00:10 +00:00
Emilio Cobos Álvarez
89c8258323 Bug 1561882 - Make sure to dispatch input and change consistently even if the first causes us to get uninited. r=mconley,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D43061
2019-08-23 10:14:39 +00:00
Victor Porof
a3641f184a Bug 1561435 - Format browser/base/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36041
2019-07-05 09:48:57 +02:00