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

93 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 75be5de2e1 Bug 1666739 - Add an optional opacity threshold for visibility hit-test. r=mconley,miko
This is a best-effort thing of course, but so is the rest of the
visibility threshold stuff in practice and this should be good enough.

Differential Revision: https://phabricator.services.mozilla.com/D98360
2020-12-04 00:48:45 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
longsonr 875f5e88ac Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.

Differential Revision: https://phabricator.services.mozilla.com/D83140
2020-07-11 02:20:20 +00:00
Botond Ballo 5cffd06241 Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-05-05 15:24:12 +00:00
Botond Ballo 8f18aa54b4 Bug 1556556 - Add a "relative to layout viewport" option for display list building. r=mstange,mattwoodrow
Use it in document.elementFromPoint().

Differential Revision: https://phabricator.services.mozilla.com/D68914
2020-05-05 19:24:08 +00:00
Simon Giesecke f458cd246a Bug 1626570 - Improve handling of copying arrays in dom/base/. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D73625
2020-05-05 10:08:02 +00:00
Erik Nordin e31f1c4b45 Bug 1633027 - Refactor Traversing/Unlinking StyleSheets r=emilio
- Add functions for traversing stylesheets in DocumentOrShadowRoot
- Add functions for unlinking stylesheets in DocumentOrShadowRoot
- Traverse and Unlink Document::mAdditionalSheets

Differential Revision: https://phabricator.services.mozilla.com/D72708
2020-04-29 16:40:55 +00:00
Erik Nordin cacf520bf8 Bug 1631057 - Remove adopted sheets from styles on unlink r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D71377
2020-04-28 18:38:39 +00:00
Csoregi Natalia b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo 2cb46cfa4b Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-04-28 01:44:43 +00:00
Botond Ballo 7fdd59addd Bug 1556556 - Add a "relative to layout viewport" option for display list building. r=mstange,mattwoodrow
Use it in document.elementFromPoint().

Differential Revision: https://phabricator.services.mozilla.com/D68914
2020-04-28 01:37:47 +00:00
Emilio Cobos Álvarez 5f95854d9b Bug 1449522 - Clean up stylesheet association modes. r=nordzilla
Should also have no behavior change.

After the previous patch we don't have sheets associated with a document but
not owned by it, so take advantage of that.

Differential Revision: https://phabricator.services.mozilla.com/D71264
2020-04-17 22:54:55 +00:00
Erik Nordin 65e0b8ff27 Bug 1629994 - Minor Code Changes Constructable StyleSheets r=emilio
These are a collection of minor changes that have no effect on the behavior of the code.

Differential Revision: https://phabricator.services.mozilla.com/D71093
2020-04-17 16:34:38 +00:00
Erik Nordin 468350e56a Bug 1629989 - Unify RemoveStyleSheet() Function r=emilio
- Remove function `Document::RemoveStyleSheet()`
- Remove function `ShadowRoot::RemoveSheet()`
- Remove function `DocumentOrShadowRoot::RemoveSheet()`, which was used by the former two functions.
- Add function `DocumentOrShadowRoot::RemoveStyleSheet()`, now uesed in all cases.

Differential Revision: https://phabricator.services.mozilla.com/D70927

--HG--
extra : moz-landing-system : lando
2020-04-15 17:20:11 +00:00
Erik Nordin 0aba3460c6 Bug 1459698 - Unlink DocumentOrShadowRoot::mStyleSheets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D70768

--HG--
extra : moz-landing-system : lando
2020-04-14 22:41:45 +00:00
Sean Feng c950be9883 Bug 1580603 - Refactor Fullscreen stack to Top Layer stack r=smaug,xidorn
Fullscreen stack isn't part of the spec anymore, it's changed to a
more generic version called Top Layer stack, which is being used
by both fullscreen APIs and dialog elements.

This patch refactors it to Top Layer stack so that it can be reused
for dialog element.

Top Layer stack : https://fullscreen.spec.whatwg.org/#new-stacking-layer

Differential Revision: https://phabricator.services.mozilla.com/D68478

--HG--
extra : moz-landing-system : lando
2020-04-14 19:51:36 +00:00
Erik Nordin ccc51b2ce0 Bug 1622322 - Improve print performance when sheets are adopted multiple times r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D68116

--HG--
extra : moz-landing-system : lando
2020-04-01 20:06:47 +00:00
Emily McDonough c4d84d5ca5 Bug 1626133 - Separate the portion of Element::GetAnimation which needs script from the part that doesn't. r=birtles
Also update the existing caller which doesn't need the flush that was causing
the script requirement.

Differential Revision: https://phabricator.services.mozilla.com/D68944

--HG--
extra : moz-landing-system : lando
2020-03-31 01:45:08 +00:00
Erik Nordin ca4fa23626 Bug 1621415 - Ensure adopted styles are applied when printing r=emilio
- Add functionality to clone adopted style sheets for printing.
- Add reftest to ensure that the document's adopted styles show in print.
- Add reftest to ensure that a shadow root's adopted styles show in print.

Differential Revision: https://phabricator.services.mozilla.com/D66517

--HG--
extra : moz-landing-system : lando
2020-03-24 22:54:18 +00:00
Emilio Cobos Álvarez 04828e3a4a Bug 253870 - Make disabled form controls selectable. r=masayuki,MarcoZ
This rejiggers a bit the way selection focus is handled so that focusing a
disabled form control with the mouse handles selection properly, and hides the
document selection and so on.

This matches the behavior of other browsers as far as I can tell.

Given now readonly and disabled editors behave the same, we can simplify a bit
the surrounding editor code.

Differential Revision: https://phabricator.services.mozilla.com/D66464

--HG--
extra : moz-landing-system : lando
2020-03-19 13:18:16 +00:00
Mihai Alexandru Michis 58bc354025 Backed out changeset 9eeee9ec66d9 (bug 253870) for causing failures in browser_bug1261299.js
CLOSED TREE
2020-03-16 22:32:41 +02:00
Emilio Cobos Álvarez 9f28f89085 Bug 253870 - Make disabled form controls selectable. r=masayuki,MarcoZ
This rejiggers a bit the way selection focus is handled so that focusing a
disabled form control with the mouse handles selection properly, and hides the
document selection and so on.

This matches the behavior of other browsers as far as I can tell.

Given now readonly and disabled editors behave the same, we can simplify a bit
the surrounding editor code.

Differential Revision: https://phabricator.services.mozilla.com/D66464

--HG--
extra : moz-landing-system : lando
2020-03-16 17:41:07 +00:00
Razvan Maries a2e3903c68 Backed out changeset c0235b7bddcc (bug 1621415) for Mochitest perma failures on test_printpreview.xhtml. CLOSED TREE 2020-03-14 02:52:09 +02:00
Erik Nordin b6f5189943 Bug 1621415 - Ensure adopted styles are applied when printing r=emilio
- Add functionality to clone adopted style sheets for printing.
- Add reftest to ensure that the document's adopted styles show in print.
- Add reftest to ensure that a shadow root's adopted styles show in print.

Differential Revision: https://phabricator.services.mozilla.com/D66517

--HG--
extra : moz-landing-system : lando
2020-03-13 21:20:22 +00:00
Erik Nordin ae085e705a Bug 1611236 - Optimize adoptedStyleSheets append case r=emilio
- Generalize enumeration over unique sheets to take any array of sheets.
- Add check if the new adoptedStyleSheets only appends sheets.
- Handle append case for new adoptedStyleSheets.
- Add WPT test case for duplicate sheets in the ShadowRoot.
- Add WPT test cases for appending sheets.

Differential Revision: https://phabricator.services.mozilla.com/D64686

--HG--
extra : moz-landing-system : lando
2020-03-02 20:38:28 +00:00
Emilio Cobos Álvarez 449d4bf816 Bug 1617746 - Deal with duplicate adopted stylesheets correctly. r=nordzilla
This also fixes some other bits, like mAdoptedStyleSheets.ElementAt(0) (which
really should be "the first applicable adopted stylesheet") and so on. Added a
test for that.

The new invariant also implies that a DocumentOrShadowRoot can't appear twice in
StyleSheet::mAdopters.

Also clears adopted stylesheets in Document::ResetStylesheetsToURI, as it's the
right thing to do (if you hit that code path with constructable sheets you'd end
up asserting, as we'd call FillStyleSetDocumentSheets after and find sheets in
there). I don't quite have a test-case for that though.

Differential Revision: https://phabricator.services.mozilla.com/D64151

--HG--
extra : moz-landing-system : lando
2020-02-27 01:46:17 +00:00
Cosmin Sabou 3497aa8314 Backed out 2 changesets (bug 1617746) assertion failures on ShadowRoot.cpp.
CLOSED TREE
Backed out changeset 6cb30e866b95 (bug 1617746)
Backed out changeset 3543162b815b (bug 1617746)
2020-02-27 01:12:46 +02:00
Emilio Cobos Álvarez 1292de292e Bug 1617746 - Deal with duplicate adopted stylesheets correctly. r=nordzilla
This also fixes some other bits, like mAdoptedStyleSheets.ElementAt(0) (which
really should be "the first applicable adopted stylesheet") and so on. Added a
test for that.

The new invariant also implies that a DocumentOrShadowRoot can't appear twice in
StyleSheet::mAdopters.

Also clears adopted stylesheets in Document::ResetStylesheetsToURI, as it's the
right thing to do (if you hit that code path with constructable sheets you'd end
up asserting, as we'd call FillStyleSetDocumentSheets after and find sheets in
there). I don't quite have a test-case for that though.

Differential Revision: https://phabricator.services.mozilla.com/D64151

--HG--
extra : moz-landing-system : lando
2020-02-26 21:20:05 +00:00
Erik Nordin 5c05e8e03f Bug 1617302 - Temporarily disallow duplicate style sheets r=emilio
* Disallow duplicate style sheets to unblock fuzzers until this is handled properly.

Differential Revision: https://phabricator.services.mozilla.com/D63739

--HG--
extra : moz-landing-system : lando
2020-02-24 21:50:53 +00:00
Erik Nordin 14304c1fdf Bug 1609288 - Apply styles from adopted stylesheets r=emilio
- Ensure that adopted styles are applied correctly to ShadowRoot
- Ensure that adopted styles are applied correctly to Document
- Add new WPT test cases to ensure the ordering of the styles.

Differential Revision: https://phabricator.services.mozilla.com/D60083

--HG--
extra : moz-landing-system : lando
2020-02-15 01:16:46 +00:00
Boris Zbarsky b88d5ac5a8 Bug 1612213 part 1. Switch most consumers of ThrowDOMException to the new methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61267

--HG--
extra : moz-landing-system : lando
2020-02-03 20:19:11 +00:00
Emilio Cobos Álvarez e2137e11e5 Bug 1610164 - Only the adoptedStyleSheets setter throws. r=nordzilla
The getter should never throw, and we can tag it as such in the IDL to avoid
useless error outparams.

Differential Revision: https://phabricator.services.mozilla.com/D60371

--HG--
extra : moz-landing-system : lando
2020-01-22 12:10:48 +00:00
Emilio Cobos Álvarez 8a7906f381 Bug 1610064 - Avoid including StyleSheet.h from Document.h. r=nordzilla,firefox-style-system-reviewers
This in turn requires fixing various other include hell / missing include
issues.

Differential Revision: https://phabricator.services.mozilla.com/D60337

--HG--
extra : moz-landing-system : lando
2020-01-21 20:31:05 +00:00
nordzilla fcdb3eb4fc Bug 1608488 - Add the adoptedStyleSheets WebIDL Attribute r=emilio,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59941

--HG--
extra : moz-landing-system : lando
2020-01-15 22:27:59 +00:00
Eric Rahm 78ee6675cf Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59042

--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:56 +00:00
Emilio Cobos Álvarez f2ae3383f9 Bug 1603534 - Merge ShadowRoot::StyleSheets and Document::StyleSheets(). r=nordzilla
They do the same so no reason to have it duplicated. EnsureDOMStyleSheets
doesn't have any other caller so just inline it there.

Differential Revision: https://phabricator.services.mozilla.com/D56986

--HG--
extra : moz-landing-system : lando
2019-12-12 21:51:59 +00:00
Emilio Cobos Álvarez a09dd426e0 Bug 1597715 - Don't dereference this on DocumentOrShadowRoot subclasses. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D53836

--HG--
extra : moz-landing-system : lando
2019-11-20 19:58:21 +00:00
Brian Birtles e50dce95ba Bug 1590971 - Move getAnimations from Document to DocumentOrShadowRoot; r=emilio,baku
This updates the Gecko implementation to match the following change to
the Web Animations spec:

  792453b952 (diff-4c9f5c055fb219a7fcad23a9a7a80b64)

Differential Revision: https://phabricator.services.mozilla.com/D50768

--HG--
rename : testing/web-platform/tests/web-animations/interfaces/Document/getAnimations.html => testing/web-platform/tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html
extra : moz-landing-system : lando
2019-10-29 07:13:22 +00:00
Sylvestre Ledru a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D28329

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Emilio Cobos Álvarez d3f8a1f5a6 Bug 1544535 - Bug 1542263 - Don't keep two list of stylesheets in ServoStyleSet. r=firefox-style-system-reviewers,jwatt
Just one set of stylesheets is enough. While at it, unify SheetType and Origin.

Differential Revision: https://phabricator.services.mozilla.com/D27564

--HG--
extra : moz-landing-system : lando
2019-04-19 04:20:31 +00:00
Mike Conley 189f9c4505 Bug 1542756 - Bug 1543128 - Add option to only return visible nodes from nsIDOMWindowUtils.nodesFromRect. r=emilio
Depends on D26778

Differential Revision: https://phabricator.services.mozilla.com/D26809

--HG--
extra : moz-landing-system : lando
2019-04-15 01:08:12 +00:00
Csoregi Natalia 9e8043e236 Backed out 10 changesets (bug 1542756, bug 1543128, bug 1543122) for multiple media failures /test_setSinkId.html. CLOSED TREE
Backed out changeset ce3a15e1b737 (bug 1543128)
Backed out changeset cea8c1af70ad (bug 1543128)
Backed out changeset aeb23f8f45fb (bug 1543128)
Backed out changeset a2e73d143aba (bug 1543128)
Backed out changeset 1692fc6491a0 (bug 1543128)
Backed out changeset 9fbce4274cfd (bug 1542756)
Backed out changeset 20092bcebe6a (bug 1543122)
Backed out changeset 1645d577016c (bug 1543122)
Backed out changeset 3fce0b7586c1 (bug 1543122)
Backed out changeset aab68db4131b (bug 1543122)
2019-04-13 06:22:47 +03:00
Mike Conley 0d5744162f Bug 1542756 - Bug 1543128 - Add option to only return visible nodes from nsIDOMWindowUtils.nodesFromRect. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D26809

--HG--
extra : moz-landing-system : lando
2019-04-13 01:22:58 +00:00
Emilio Cobos Álvarez d8e2990d8a Bug 1535788 - Make the Document own the StyleSet. r=heycam
This is the last step to be able to call matchMedia on display: none iframes.

This is green, except for some startup preference query tests that I'm going to
address in a blocking bug (making LangGroupFontPrefs global, basically).

The setup is similar to the ShadowRoot one, except we don't eagerly keep the
StyleSet around up-to-date, we only fill it if it ever had a pres context.

Differential Revision: https://phabricator.services.mozilla.com/D23903

--HG--
extra : moz-landing-system : lando
2019-04-03 07:02:00 +00:00
Masayuki Nakano de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25338

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Dorel Luca 5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano 9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25338

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00