Граф коммитов

3879 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 76502ee6b0 Bug 1698477 - Prevent spin buttons from creating overflow. r=dholbert
This matches pre-existing behavior.

Differential Revision: https://phabricator.services.mozilla.com/D108608
2021-03-16 22:08:48 +00:00
Emilio Cobos Álvarez f5a4b965f6 Bug 1698821 - Remove dead GetNumberControlFrameForTextField. r=dholbert
There's no anonymous textfield since a long time ago.

Differential Revision: https://phabricator.services.mozilla.com/D108655
2021-03-16 21:53:20 +00:00
Emilio Cobos Álvarez 3df7550e39 Bug 1698821 - Fix GetNumberControlFrameForSpinButton. r=dholbert
It broke with bug 1698043 because we removed one wrapper.

Differential Revision: https://phabricator.services.mozilla.com/D108654
2021-03-16 21:53:20 +00:00
Emilio Cobos Álvarez e65533e909 Bug 1698821 - Simplify native-appearance-disabling for number spinners. r=dholbert
The root cause of this bug is that we're now accidentally using the
native theme for the spinners because GetNumberControlFrameForSpinButton
broke with my changes.

These pseudos are not exposed to content, and there's just one user of
this pseudo-class (the print.css one).

So just disable native appearance explicitly and remove that check.

Differential Revision: https://phabricator.services.mozilla.com/D108653
2021-03-16 21:53:20 +00:00
Emilio Cobos Álvarez 678b10493d Bug 1698315 - Manage placeholder and autofill preview visibility using CSS rather than custom code. r=masayuki
Should be much simpler and doesn't need to deal with the different
stuff. We already have pseudo-classes for this, :autofill and
:placeholder-shown.

I initially wrote this because this is the only limitation that forces
us to have the placeholder text as a direct child of the text control
frame. In the end I kept that as-is, but this simplification is still
worth it.

We remove dom.placeholder.show_on_focus because it doesn't behave
correctly (it doesn't match the :placeholder-shown pseudo-class and it
should). It was introduced in bug 807613 and never turned to false by
default. I suspect nobody will miss this, but if somebody complains
about it we can reintroduce it properly (handling the pref in DOM
instead, changing the right state bits).

Differential Revision: https://phabricator.services.mozilla.com/D108304
2021-03-15 08:52:43 +00:00
Emilio Cobos Álvarez 9cec29125b Bug 1698043 - Simplify <input type=number/search> layout to fix this bug and make ::-moz-complex-control-wrapper unnecessary. r=dholbert
This should be a simpler setup. We keep every element being a direct
anon child of the text control, and special case the reflow of the
spinners / clear button, to subtract that size from the other elements.

This fixes the bug by ensuring that the editor and placeholder are sized
and positioned in exactly the same way.

Differential Revision: https://phabricator.services.mozilla.com/D108305
2021-03-14 07:53:13 +00:00
Butkovits Atila f564d3679e Backed out changeset 2bc9ef937528 (bug 1698043) for causing failures on search-with-value.html. CLOSED TREE 2021-03-14 06:42:25 +02:00
Emilio Cobos Álvarez ceed5b80ff Bug 1698043 - Simplify <input type=number/search> layout to fix this bug and make ::-moz-complex-control-wrapper unnecessary. r=dholbert
This should be a simpler setup. We keep every element being a direct
anon child of the text control, and special case the reflow of the
spinners / clear button, to subtract that size from the other elements.

This fixes the bug by ensuring that the editor and placeholder are sized
and positioned in exactly the same way.

Differential Revision: https://phabricator.services.mozilla.com/D108305
2021-03-14 02:35:49 +00:00
Jonathan Kew ceb44d34d6 Bug 1664730 - Disable async font fallback when running mochitests, to avoid unpredictable extra reflows that can disrupt event-/timing-sensitive tests. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D107284
2021-03-10 12:26:52 +00:00
Mats Palmgren 26330a08b1 Bug 1694459 - Deal with 'display:contents' style changes on <fieldset> descendants better where it affects which <legend> is the rendered legend. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D106566
2021-03-01 03:42:41 +00:00
Emilio Cobos Álvarez 7f2b3314e0 Bug 1694059 - Use WebRender to render most non-native-theme widgets when possible. r=mstange
We basically use a couple primitives to draw these
(PaintRoundedRectWithRadius, FillRect), so making the code a bit generic
implementing stuff with WebRender seems straight-forward.

I've kept using the fallback codepath for the bits that draw complex
paths like arrows and such, but the rest of the things should work with
this patch.

A thing I'm not too happy about is the scrollbar painting setup (requires a lot
of boilerplate), but modulo template hacks make nsNativeBasicTheme a template
that receives its super class as a parameter or something) it seems hard to do
better.

Differential Revision: https://phabricator.services.mozilla.com/D105931
2021-02-23 10:49:37 +00:00
smolnar 7f2e38a6b3 Backed out changeset 960cb2cf2009 (bug 1694059) for causing reftest failures. 2021-02-23 06:41:58 +02:00
Emilio Cobos Álvarez c0fec9f98e Bug 1694059 - Use WebRender to render most non-native-theme widgets when possible. r=mstange
We basically use a couple primitives to draw these
(PaintRoundedRectWithRadius, FillRect), so making the code a bit generic
implementing stuff with WebRender seems straight-forward.

I've kept using the fallback codepath for the bits that draw complex
paths like arrows and such, but the rest of the things should work with
this patch.

A thing I'm not too happy about is the scrollbar painting setup (requires a lot
of boilerplate), but modulo template hacks make nsNativeBasicTheme a template
that receives its super class as a parameter or something) it seems hard to do
better.

Differential Revision: https://phabricator.services.mozilla.com/D105931
2021-02-23 02:58:47 +00:00
smolnar 79ca2f76fa Backed out changeset 4436a8bb02fd (bug 1694059) for causing reftest failures. CLOSED TREE 2021-02-23 04:17:14 +02:00
Emilio Cobos Álvarez cb286403d0 Bug 1694059 - Use WebRender to render most non-native-theme widgets when possible. r=mstange
We basically use a couple primitives to draw these
(PaintRoundedRectWithRadius, FillRect), so making the code a bit generic
implementing stuff with WebRender seems straight-forward.

I've kept using the fallback codepath for the bits that draw complex
paths like arrows and such, but the rest of the things should work with
this patch.

A thing I'm not too happy about is the scrollbar painting setup (requires a lot
of boilerplate), but modulo template hacks make nsNativeBasicTheme a template
that receives its super class as a parameter or something) it seems hard to do
better.

Differential Revision: https://phabricator.services.mozilla.com/D105931
2021-02-23 01:10:22 +00:00
Emilio Cobos Álvarez 15ff419df0 Bug 1694059 - Rename various nnt prefs. r=spohl,mstange
As per feedback in D105931.

Differential Revision: https://phabricator.services.mozilla.com/D105991
2021-02-22 20:05:35 +00:00
Emilio Cobos Álvarez 6825bbc8f8 Bug 1693688 - Make the non-native theme not return minimum sizes for checkboxes (and most other widgets). r=spohl,mstange
This matches closer what Chrome and Safari do (Safari paints outside of
the box when this happens, but the layout box still respects the
author), see:

  data:text/html,<button style="padding: 0; width: 0">
  data:text/html,<input type=checkbox style="width: 0">

Etc. For checkboxes, this matches what OSX does, too.

Since we still want checkboxes to be slightly larger than what they'd be
otherwise, we add a hook to tweak it when non-native theme is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D105798
2021-02-20 00:13:10 +00:00
Noemi Erli 73493a49e5 Backed out 2 changesets (bug 1693688) for causing failures in browser_options-view-01.js CLOSED TREE
Backed out changeset d0bd198837ee (bug 1693688)
Backed out changeset e0b1f4b79d4b (bug 1693688)
2021-02-19 23:39:07 +02:00
Emilio Cobos Álvarez d1915bcf15 Bug 1693688 - Make the non-native theme not return minimum sizes for checkboxes (and most other widgets). r=spohl,mstange
This matches closer what Chrome and Safari do (Safari paints outside of
the box when this happens, but the layout box still respects the
author), see:

  data:text/html,<button style="padding: 0; width: 0">
  data:text/html,<input type=checkbox style="width: 0">

Etc. For checkboxes, this matches what OSX does, too.

Since we still want checkboxes to be slightly larger than what they'd be
otherwise, we add a hook to tweak it when non-native theme is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D105798
2021-02-19 18:42:17 +00:00
Miko Mynttinen cf0c7ae9e3 Bug 1534549 - Part 2: Allow all display items to carry hit testing information r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D102515
2021-02-06 22:30:37 +00:00
Stephen A Pohl 8aade11c62 Bug 1690879: Make test_bug869314.html pass on macOS with the non-native theme enabled. r=emilio
Depends on D104084

Differential Revision: https://phabricator.services.mozilla.com/D104091
2021-02-05 12:03:34 +00:00
Noemi Erli 1ea87269a8 Backed out 4 changesets (bug 1534549) for causing mochitest failures in test_group_wheelevents.html CLOSED TREE
Backed out changeset a03c745620d6 (bug 1534549)
Backed out changeset 2ac9c5dbe9f5 (bug 1534549)
Backed out changeset dabd0c5d21cf (bug 1534549)
Backed out changeset f1b390459263 (bug 1534549)
2021-02-05 02:41:19 +02:00
Miko Mynttinen 63a9dd596a Bug 1534549 - Part 2: Allow all display items to carry hit testing information r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D102515
2021-02-04 22:19:56 +00:00
Mats Palmgren 33bb91f1d1 Bug 1690166 - Don't report BreakBefore reflow status if the <fieldset> is an abs/fixed positioned out-of-flow. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D103824
2021-02-03 21:21:40 +00:00
Mats Palmgren 5b8e8fb4b6 Bug 1686728 - Make nsCheckboxRadioFrame::GetUsableScreenRect a static function for its only consumer. r=layout-reviewers,TYLin
Differential Revision: https://phabricator.services.mozilla.com/D101777
2021-01-29 20:47:59 +00:00
Mats Palmgren ee1a2518e5 Bug 1686395 - Remove [Un]RegisterAccessKey calls in frame code (idempotent change). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101556
2021-01-29 20:48:02 +00:00
Mats Palmgren f6ef0ea044 Bug 1683748 - Support Grid/Flex/Table/Column layout for the rendered legend of a fieldset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101555
2021-01-30 13:47:10 +00:00
Narcis Beleuzu 78590ae20c Backed out 2 changesets (bug 1686395, bug 1686728) for conflicting with the backout of Bug 1683748 . CLOSED TREE
Backed out changeset 9765f1640853 (bug 1686728)
Backed out changeset 0f95f2b3ea92 (bug 1686395)
2021-01-29 22:44:30 +02:00
Dorel Luca 689a7c82d0 Backed out changeset 2d16e9e90401 (bug 1683748) for WPT failures in html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-grid-flex-multicol.html. CLOSED TREE 2021-01-29 22:07:09 +02:00
Mats Palmgren 3168235844 Bug 1686728 - Make nsCheckboxRadioFrame::GetUsableScreenRect a static function for its only consumer. r=layout-reviewers,TYLin
Differential Revision: https://phabricator.services.mozilla.com/D101777
2021-01-29 15:45:39 +00:00
Mats Palmgren 7b6d28bc4a Bug 1686395 - Remove [Un]RegisterAccessKey calls in frame code (idempotent change). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101556
2021-01-29 15:45:31 +00:00
Mats Palmgren ca5460eda2 Bug 1683748 - Support Grid/Flex/Table/Column layout for the rendered legend of a fieldset. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101555
2021-01-29 15:45:42 +00:00
Emilio Cobos Álvarez a1bf2a82af Bug 1560824 - Move combobox select padding to the select rule rather than the combobox frame. r=dholbert
This doesn't change behavior by default but allows authors to remove the
padding if they wish to.

I thought this was going to be problematic because of the windows
arrowbutton, but that doesn't respect select padding so we're good.

Differential Revision: https://phabricator.services.mozilla.com/D103245
2021-01-28 07:09:23 +00:00
Emilio Cobos Álvarez 49e1237f27 Bug 1689098 - Make inputs, selects, and button actually have the same block-axis padding as claimed by our forms.css comments. r=dholbert
Combobox select has the block-axis padding in the comboboxcontrol frame.
Moving it fixes bug 1560824 and should be better, so will do that there.

1px block axis padding on buttons matches Chrome too, so shouldn't be a
problem compat-wise.

Differential Revision: https://phabricator.services.mozilla.com/D103244
2021-01-28 07:08:34 +00:00
Ting-Yu Lin 4a76528949 Bug 1686603 Part 4 - Use StyleSizeOverrides to revise flex base size resolution. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D101795
2021-01-26 02:47:36 +00:00
Ting-Yu Lin a43cae175a Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-26 02:47:40 +00:00
Csoregi Natalia 0492d8333a Backed out 8 changesets (bug 1686603) for causing crashtest failures. CLOSED TREE
Backed out changeset 94b5d0986d27 (bug 1686603)
Backed out changeset e7edf6fcc41d (bug 1686603)
Backed out changeset 4c9271f07178 (bug 1686603)
Backed out changeset 7013b95266ae (bug 1686603)
Backed out changeset cf7a55638aef (bug 1686603)
Backed out changeset 7717a0f2a37b (bug 1686603)
Backed out changeset c82593b13a61 (bug 1686603)
Backed out changeset fd1d95a1e706 (bug 1686603)
2021-01-26 04:32:13 +02:00
Ting-Yu Lin 902b99ce81 Bug 1686603 Part 4 - Use StyleSizeOverrides to revise flex base size resolution. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D101795
2021-01-25 22:25:57 +00:00
Ting-Yu Lin ffce5ed7d6 Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-25 22:29:31 +00:00
Mihai Alexandru Michis b6b2f1e5f4 Backed out 7 changesets (bug 1686603) for causing crashtest assertion failures.
CLOSED TREE

Backed out changeset 19cba7d34a7f (bug 1686603)
Backed out changeset 3a0d0155ea5e (bug 1686603)
Backed out changeset f1f672cdd0c6 (bug 1686603)
Backed out changeset 63020922e2fd (bug 1686603)
Backed out changeset 8766ce79ba5e (bug 1686603)
Backed out changeset 965dbe8de1e1 (bug 1686603)
Backed out changeset b1328ee45f43 (bug 1686603)
2021-01-21 09:21:12 +02:00
Ting-Yu Lin d1b6d1f716 Bug 1686603 Part 4 - Use StyleSizeOverrides to revise flex base size resolution. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D101795
2021-01-21 04:22:08 +00:00
Ting-Yu Lin d0c462cb81 Bug 1686603 Part 2 - Add StyleSizeOverrides parameter to ReflowInput's constructor & co. to override data from style system data. r=dholbert
This patch adds the struct as a parameter to various functions.

The struct is cached in ReflowInput so that we don't need to pass it
down to the internal method where nsIFrame::ComputeSize() is called.

In the subsequent patches, we'll use it to revise the implementation of
flex container's flex base size resolution, and size overrides.

Differential Revision: https://phabricator.services.mozilla.com/D101793
2021-01-21 04:17:59 +00:00
Cameron McCormack d90d40b0c4 Bug 1685962 - Fix test_bug549170.html to work on Linux with the native theme. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D101325
2021-01-21 00:22:53 +00:00
Mirko Brodesser f6f7a6f1aa Bug 1685303: part 8) Annotate `nsFrameSelection::SetDragState` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101467
2021-01-14 13:24:16 +00:00
Bogdan Tara 0700454a9e Backed out 4 changesets (bug 1685303) for bustage complaining about offsets CLOSED TREE
Backed out changeset a4640aac6619 (bug 1685303)
Backed out changeset bd2020c26531 (bug 1685303)
Backed out changeset 3f2e96b93f19 (bug 1685303)
Backed out changeset 8cf49a7677c9 (bug 1685303)
2021-01-14 12:58:25 +02:00
Mirko Brodesser 353996bf27 Bug 1685303: part 8) Annotate `nsFrameSelection::SetDragState` with `MOZ_CAN_RUN_SCRIPT`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101467
2021-01-14 10:20:30 +00:00
Razvan Maries 2947602bcd Backed out 3 changesets (bug 1677253) for multiple perma failures. CLOSED TREE
Backed out changeset 01b34d4be08c (bug 1677253)
Backed out changeset aabba45e0b43 (bug 1677253)
Backed out changeset 171689d8d386 (bug 1677253)
2021-01-12 17:18:04 +02:00
Kagami Sascha Rosylight fd004def2f Bug 1677253 - Part 2: Detect direction change in SelectionChangeEventDispatcher r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D101246
2021-01-12 02:01:00 +00:00
Kagami Sascha Rosylight 4c49f54099 Bug 1665944 - Unset drag state when moving focus to text controls r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D101202
2021-01-09 01:49:35 +00:00
Jonathan Kew 809ac36608 Bug 1676966 - Don't block layout on global font fallback; load character maps asynchronously, and then reflow when available. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D98904
2020-12-31 00:33:48 +00:00