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

3761 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin ffcfb6dcec Bug 1651171 - Convert NS_SUBTREE_DIRTY to an inline method of nsIFrame. r=jfkthame
This is a straightforward conversion except that
`NS_SUBTREE_DIRTY(this)` can be written terser as `IsSubtreeDirty()`.

Differential Revision: https://phabricator.services.mozilla.com/D82811
2020-07-09 18:29:15 +00:00
Hiroyuki Ikezoe 2e4ceac41e Bug 1525561 - Rename nsPresContext::GetToplevelContentDocumentPresContext to GetInProcessRootContentDocumentPresContext. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D82812
2020-07-09 01:58:59 +00:00
Kagami Sascha Rosylight f6d17b63b5 Bug 1630704 - Part 28: Remove nsFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81865
2020-07-06 22:38:11 +00:00
Kagami Sascha Rosylight 1afcf4d621 Bug 1630704 - Part 27: Remove nsFrame from inheritance chain r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81864
2020-07-06 22:29:42 +00:00
Sylvestre Ledru caf785c695 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D82178
2020-07-04 09:38:43 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kagami Sascha Rosylight 1bc00c970c Bug 1647525 - Use HasAnyStateBits() in nsSelectsAreaFrame r=emilio
Depends on D81101

Differential Revision: https://phabricator.services.mozilla.com/D81102
2020-06-25 14:11:10 +00:00
Kagami Sascha Rosylight fc512af910 Bug 1647525 - Use HasAnyStateBits() in nsListControlFrame r=emilio
Depends on D81100

Differential Revision: https://phabricator.services.mozilla.com/D81101
2020-06-25 14:11:03 +00:00
Kagami Sascha Rosylight 987d11319c Bug 1647525 - Use HasAnyStateBits() in nsFieldSetFrame r=emilio
Depends on D81099

Differential Revision: https://phabricator.services.mozilla.com/D81100
2020-06-25 14:10:40 +00:00
Kagami Sascha Rosylight ec26e7ea7d Bug 1647525 - Use HasAnyStateBits() in nsComboboxControlFrame r=emilio
Depends on D81098

Differential Revision: https://phabricator.services.mozilla.com/D81099
2020-06-25 14:10:27 +00:00
Emilio Cobos Álvarez 88f6ea40ee Bug 1647474 - Wait for frame callbacks on the right window. r=kats
Quite obvious in hindsight :(

Differential Revision: https://phabricator.services.mozilla.com/D81128
2020-06-25 16:00:43 +00:00
Kagami Sascha Rosylight 166f2891a2 Bug 1643464 - Part 1: Rename eLeft/eRight to ePrimary/eSecondary r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D80331
2020-06-19 18:02:41 +00:00
Emilio Cobos Álvarez d53d510029 Bug 1644366 - Restore behavior of selection into view to keep scrolling ancestors on focus. r=smaug
... yet keep respecting the preventScroll flag.

Differential Revision: https://phabricator.services.mozilla.com/D78900
2020-06-22 15:31:34 +00:00
Emilio Cobos Álvarez b9b9e38dd9 Bug 1646224 - Use mozilla::Length rather than nscoord to store font sizes. r=heycam,jfkthame
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).

Differential Revision: https://phabricator.services.mozilla.com/D79928
2020-06-22 09:45:40 +00:00
Cosmin Sabou 65d75a47f3 Backed out changeset 299e19193e11 (bug 1646224) for causing font related failures. CLOSED TREE 2020-06-18 18:26:51 +03:00
Emilio Cobos Álvarez 090e3d2409 Bug 1646224 - Use mozilla::Length rather than nscoord to store font sizes. r=heycam,jfkthame
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).

Differential Revision: https://phabricator.services.mozilla.com/D79928
2020-06-18 13:55:03 +00:00
Kris Maglione 3bda67deab Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-17 17:17:16 +00:00
Emilio Cobos Álvarez ef3d21048d Bug 1640623 - Use enum classes for LookAndFeel int and float IDs. r=jmathies,geckoview-reviewers,esawin
Differential Revision: https://phabricator.services.mozilla.com/D76694
2020-06-11 11:27:43 +00:00
Csoregi Natalia ea9bf8c0f4 Backed out changeset 1884e1c2ccf4 (bug 1644366) for scrolling failures. CLOSED TREE 2020-06-09 21:18:42 +03:00
Emilio Cobos Álvarez bbf8acf349 Bug 1644366 - Restore behavior of selection into view to keep scrolling ancestors on focus. r=smaug
... yet keep respecting the preventScroll flag.

Differential Revision: https://phabricator.services.mozilla.com/D78900
2020-06-09 16:15:04 +00:00
Ting-Yu Lin 1022daa063 Bug 1643173 Part 1 - Convert enum nsIFrame::DISPLAY_CHILD_* to enum class. r=dholbert
The modifications are all straightforward conversion except the one in
nsMathMLContainerFrame, where it is simplified by calling the equivalent
BuildDisplayListForInline() helper.

Differential Revision: https://phabricator.services.mozilla.com/D78166
2020-06-05 02:52:05 +00:00
Razvan Maries a36bb7751f Backed out 3 changesets (bug 1638153) for perma failures on cross-origin-objects.html. CLOSED TREE
Backed out changeset f7aedc92d396 (bug 1638153)
Backed out changeset 07ec713926c6 (bug 1638153)
Backed out changeset 5a656842e241 (bug 1638153)
2020-06-01 23:51:35 +03:00
Kris Maglione b3fcd970ec Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-01 17:59:01 +00:00
Emilio Cobos Álvarez 54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Miko Mynttinen 6013e7cd95 Bug 1640457 - Discard pending WR display items if the Gecko item will be pushed as an image r=jrmuizel
If |nsDisplayItem::CreateWebRenderCommands()| returns false, the items that have been pushed to |DisplayListBuilder::pending_chunk| need to be cleared, because the item will be pushed as an image instead. This happens, for example, when nsDisplayText encounters unsupported features.

Differential Revision: https://phabricator.services.mozilla.com/D77095
2020-05-27 16:45:08 +00:00
Emilio Cobos Álvarez ce1947b502 Bug 1640917 - Remove XBL mentions in layout. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D76846
2020-05-26 16:16:32 +00:00
Emilio Cobos Álvarez b68f73c01a Bug 1635675 - Implement the ::file-chooser-button pseudo-element. r=jwatt
As per https://github.com/w3c/csswg-drafts/issues/5049.

Don't enable it unconditionally just yet, as the name may change.

I had to move some rules in forms.css because otherwise you get
specificity conflicts.

Differential Revision: https://phabricator.services.mozilla.com/D76214
2020-05-25 23:54:10 +00:00
Emilio Cobos Álvarez 89958b377a Bug 1640605 - Remove IsInAnonymousSubtree / IsRootOfAnonymousSubtree. r=edgar
In favor of the NativeAnonymous versions which they forward to.

Done automatically with:

  rg -l 'IsInAnonymousSubtree' | xargs sed -i 's/IsInAnonymousSubtree/IsInNativeAnonymousSubtree/g'

And removing the function definitions afterwards.

Differential Revision: https://phabricator.services.mozilla.com/D76681
2020-05-25 11:43:51 +00:00
Narcis Beleuzu 973d9eb6a0 Backed out changeset 82df6f70ec60 (bug 1635675) for lint failure on file-chooser-button-001.tentative.html . CLOSED TREE 2020-05-25 13:49:39 +03:00
Emilio Cobos Álvarez a39a3a3807 Bug 1635675 - Implement the ::file-chooser-button pseudo-element. r=jwatt
As per https://github.com/w3c/csswg-drafts/issues/5049.

Don't enable it unconditionally just yet, as the name may change.

I had to move some rules in forms.css because otherwise you get
specificity conflicts.

Differential Revision: https://phabricator.services.mozilla.com/D76214
2020-05-21 12:27:54 +00:00
Mats Palmgren ebfa4831f9 Bug 1637476 - Build the ::placeholder's DisplayLists first so that it doesn't obscure the caret. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75252
2020-05-20 18:15:55 +00:00
Noemi Erli aa3f65786f Backed out changeset 55bb4c4449cd (bug 1637476) as requested by dev CLOSED TREE 2020-05-20 20:16:46 +03:00
Mats Palmgren 6a9fbb22ed Bug 1637476 - Build the ::placeholder's DisplayLists first so that it doesn't obscure the caret. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75252
2020-05-20 16:22:49 +00:00
Kristen Wright 9a760db959 Bug 1626386 - Convert ui.menu.incremental_search.timeout to a static pref r=emilio
Converts `ui.menu.incremental_search.timeout` to a static pref and replaces macros related to the incremental search timeout with the actual pref, so that they are kept in sync without the need to manually update any macros. The two `.xml` files mentioned in the note were nowhere to be found, so this patch makes the assumption that those do not exist anymore and do not need to be kept in sync.

Differential Revision: https://phabricator.services.mozilla.com/D75182
2020-05-19 20:56:06 +00:00
Emilio Cobos Álvarez f0953195ce Bug 1636998 - Make ::-moz-focus-outer a no-op, and remove it on Nightly. r=jwatt
See https://bugzilla.mozilla.org/show_bug.cgi?id=932410#c2 for the
context for which this pseudo-element was added.

In the previous patch, I had to special-case range appearance because of
this pseudo-class, but that patch makes this pseudo-class completely
redundant, as now all form controls, themed and unthemed, display
outlines, unless the native theme displays a focus indicator on its own.

Remove the special case, and make ranges use outlines like everything
else rather than this bespoke pseudo-element.

Differential Revision: https://phabricator.services.mozilla.com/D74734
2020-05-18 10:54:16 +00:00
Xidorn Quan 583e647fb1 Bug 1638263 - Full screen window after getting focus in test_bug665540. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D75662
2020-05-18 10:10:35 +00:00
Csoregi Natalia f6ee95862e Backed out changeset 62ad26fbfaf8 (bug 1636998) for reftest failures on 1174332-1.html. CLOSED TREE 2020-05-18 13:31:56 +03:00
Emilio Cobos Álvarez 36b46408b8 Bug 1636998 - Make ::-moz-focus-outer a no-op, and remove it on Nightly. r=jwatt
See https://bugzilla.mozilla.org/show_bug.cgi?id=932410#c2 for the
context for which this pseudo-element was added.

In the previous patch, I had to special-case range appearance because of
this pseudo-class, but that patch makes this pseudo-class completely
redundant, as now all form controls, themed and unthemed, display
outlines, unless the native theme displays a focus indicator on its own.

Remove the special case, and make ranges use outlines like everything
else rather than this bespoke pseudo-element.

Differential Revision: https://phabricator.services.mozilla.com/D74734
2020-05-18 07:59:32 +00:00
Emilio Cobos Álvarez 74f2dc7de8 Bug 1638127 - Remove nsGlobalWindowInner::mShowFocusRingForContent. r=edgar
Instead move the check to the focus manager, more similar to how
focus-visible works.

Now nsGlobalWindowInner::ShouldShowFocusRing means "Should we show focus
ring for anything in this window", that is: Have we keyboard-navigated
in this window, or do we have a pref that says that we should always
show focus rings.

Fix some callers appropriately (some of them that were not properly
accounting for the element being focused in the first place...).

Differential Revision: https://phabricator.services.mozilla.com/D75504
2020-05-16 18:03:54 +00:00
Csoregi Natalia 4302fa80f7 Backed out changeset a8850a0ffab1 (bug 1638127) for failures on test_focusrings.xhtml. CLOSED TREE 2020-05-16 00:44:59 +03:00
Emilio Cobos Álvarez f1b1884de4 Bug 1638127 - Remove nsGlobalWindowInner::mShowFocusRingForContent. r=edgar
Instead move the check to the focus manager, more similar to how
focus-visible works.

Now nsGlobalWindowInner::ShouldShowFocusRing means "Should we show focus
ring for anything in this window", that is: Have we keyboard-navigated
in this window, or do we have a pref that says that we should always
show focus rings.

Fix some callers appropriately (some of them that were not properly
accounting for the element being focused in the first place...).

Differential Revision: https://phabricator.services.mozilla.com/D75504
2020-05-15 20:12:14 +00:00
Xidorn Quan 58b03accf4 Bug 1276537 part 1 - Make resizable window on macOS always show full screen button. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D74833
2020-05-15 06:19:14 +00:00
Emilio Cobos Álvarez b9c1bf761c Bug 312971 - Unprefix -moz-read-write / -moz-read-only. r=edgar
And remove some duplicated tests from WPT.

Differential Revision: https://phabricator.services.mozilla.com/D75231
2020-05-14 16:46:08 +00:00
Emilio Cobos Álvarez eeb12fd8d0 Bug 1637771 - Don't draw inner focus ring styles for unthemed buttons / combo-boxes. r=jfkthame
Now that we have outlines for them, unthemed select / buttons show two
different focus indicators, which is undesired.

Furthermore, the ones in comboboxes are basically unremovable /
unstylable, so authors end up having to use massive hacks to do it, see
bug 1580935.

This fixes it elegantly (IMO) by just rendering them when themed (which
is what these were for anyway, to match the windows theme).

Differential Revision: https://phabricator.services.mozilla.com/D75283
2020-05-14 14:11:26 +00:00
Emilio Cobos Álvarez 7a14870e23 Bug 1636998 - Only suppress auto-style outlines for widgets that paint their own focus indicator. r=jfkthame
Turns out we did have a hook for this already! But it is used to draw or
not inner button styles, so not quite equivalent.

I had to expand the amount of things it applies to because buttons and
such do paint focus indicators in all widgets. This patch could cause
some undesired outlines in some widgets. I hope not (I tried to audit to
the best of my knowledge), but in that case they'd be just more values
to add to the list.

Differential Revision: https://phabricator.services.mozilla.com/D74733
2020-05-13 20:38:26 +00:00
Narcis Beleuzu 23b4220599 Backed out changeset f5546bfc9604 (bug 1636998) for reftest failures on 1174332-1.html . CLOSED TREE 2020-05-13 23:22:56 +03:00
Emilio Cobos Álvarez dbbe7901c1 Bug 1636998 - Only suppress auto-style outlines for widgets that paint their own focus indicator. r=jfkthame
Turns out we did have a hook for this already! But it is used to draw or
not inner button styles, so not quite equivalent.

I had to expand the amount of things it applies to because buttons and
such do paint focus indicators in all widgets. This patch could cause
some undesired outlines in some widgets. I hope not (I tried to audit to
the best of my knowledge), but in that case they'd be just more values
to add to the list.

Differential Revision: https://phabricator.services.mozilla.com/D74733
2020-05-13 14:47:07 +00:00
Kagami Sascha Rosylight 5ae938ffc0 Bug 1630704 - Merge XUL methods to nsIFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D74335
2020-05-08 17:31:35 +00:00
Botond Ballo 967bb355ae Bug 1556556 - Include the layout-to-visual transform for a zoomed content root in GetTransformMatrix(). r=kats,mattwoodrow
This is the "core" change of the patch series, which causes most
existing layout codepaths to correctly factor in the visual to
layout transform (or its inverse), as long as the callers correctly
propagate it in the correct ViewportType.

Differential Revision: https://phabricator.services.mozilla.com/D68920
2020-05-05 19:27:47 +00:00
Botond Ballo 173d001b86 Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-05-05 19:26:38 +00:00