Commit graph

124 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
14de79d124 Bug 1772968 - Cleanup naming of GetUnretargetedFullscreenElement. r=edgar
Casing should be consistent with GetFullscreenElement.

Differential Revision: https://phabricator.services.mozilla.com/D148490
2022-06-08 11:25:24 +00:00
Emilio Cobos Álvarez
255763ef57 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Sylvestre Ledru
42f6811d95 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,media-playback-reviewers,necko-reviewers,padenot,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D148375
2022-06-07 12:32:55 +00:00
Emilio Cobos Álvarez
7e8cdcc7dd Bug 1762042 - Avoid retargeting in NodesFromRect. r=mconley
This is a ChromeOnly method so it makes sense to avoid retargeting to
the root scope and just return the raw elements.

Differential Revision: https://phabricator.services.mozilla.com/D144588
2022-04-27 14:39:00 +00:00
Emilio Cobos Álvarez
a29d6732b6 Bug 1617948 - Make some inspector methods deal with adopted stylesheets. r=nchevobbe,firefox-style-system-reviewers,boris
And simplify the tests while at it.

Differential Revision: https://phabricator.services.mozilla.com/D144566
2022-04-27 10:08:06 +00:00
Molnar Sandor
7d797ea85b Backed out changeset 0cec4dbebc87 (bug 1762042) for causing perma mochitest failures in browser_toggleTransparentOverlay. CLOSED TREE 2022-04-27 02:12:09 +03:00
Molnar Sandor
deabbe0548 Backed out changeset 3855f8235011 (bug 1617948) for causing mochitest plain failures in test_get_all_style_sheets. CLOSED TREE 2022-04-27 01:03:10 +03:00
Emilio Cobos Álvarez
42c562881f Bug 1617948 - Make some inspector methods deal with adopted stylesheets. r=nchevobbe,firefox-style-system-reviewers,boris
And simplify the tests while at it.

Differential Revision: https://phabricator.services.mozilla.com/D144566
2022-04-26 21:09:52 +00:00
Emilio Cobos Álvarez
0bc8695c2a Bug 1737455 - Don't clear adoptedStyleSheets when adopting from a template document to its owner or vice versa. r=edgar
See https://github.com/WICG/construct-stylesheets/issues/133, which is
where this change was discussed (and then made to Chromium apparently).

I filed https://github.com/w3c/csswg-drafts/issues/7229 to put some
actual spec text here. Also, tweak the wpt which is supposed to test so
that it fails without this change.

Differential Revision: https://phabricator.services.mozilla.com/D144564
2022-04-26 17:31:23 +00:00
Emilio Cobos Álvarez
2d67c93b0d Bug 1762042 - Avoid retargeting in NodesFromRect. r=mconley
This is a ChromeOnly method so it makes sense to avoid retargeting to
the root scope and just return the raw elements.

Differential Revision: https://phabricator.services.mozilla.com/D144588
2022-04-26 14:30:29 +00:00
Emilio Cobos Álvarez
a5d99bb713 Bug 1766227 - Convert constructable stylesheets to use ObservableArray. r=edgar
Pretty straight-forward. Also add support to idlharness for ObservableArray,
without it the relevant tests fail (they also fail in Chromium without this
change as expected).

Differential Revision: https://phabricator.services.mozilla.com/D144547
2022-04-26 11:14:40 +00:00
Andrew McCreight
8c5d7e5ee8 Bug 1736707, part 1 - Get rid of nsContentUtils::NameSpaceManager(). r=peterv
Call nsNameSpaceManager::GetInstance() instead.

Differential Revision: https://phabricator.services.mozilla.com/D129033
2021-10-22 16:15:57 +00:00
Masayuki Nakano
63d372da2f Bug 1676702 - part 2: Make TextControlState initialize TextEditor with PasswordMaskData r=m_kato
During a `TextControlState` alive, `PasswordMaskData` should be alive too.
Otherwise, we cannot keep unmasked range at reframing.

Depends on D118756

Differential Revision: https://phabricator.services.mozilla.com/D118757
2021-06-28 04:37:54 +00:00
Sean Feng
e58bb429df Bug 1690905 - Factors DOM memory sizes out to its own struct r=mccr8
This patch factors the DOM related sizes in nsWindowSizes to its own
struct, such that callers can easily acess DOM memory sizes.

Differential Revision: https://phabricator.services.mozilla.com/D111317
2021-05-27 17:55:44 +00:00
Kagami Sascha Rosylight
71db2e4db9 Bug 1707126 - Part 1: Split RadioGroupManager r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D113577
2021-04-28 16:01:34 +00:00
Simon Giesecke
4803e61816 Bug 708901 - Migrate to nsTHashSet in dom/base. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108593
2021-03-24 17:56:46 +00:00
Csoregi Natalia
f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke
82e566bfca Bug 708901 - Migrate to nsTHashSet in dom/base. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108593
2021-03-24 16:58:58 +00:00
Simon Giesecke
91fdeec18c Bug 1695162 - Migrate from custom hashtable iteration to range-based for in accessible, dom/animation, dom/base, dom/localstorage, gfx/thebes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D106895
2021-03-12 16:14:58 +00:00
Alexandru Michis
c691800cb0 Backed out changeset fd03162e726d (bug 1695162) for causing bustages in Document.cpp
CLOSED TREE
2021-03-12 17:10:02 +02:00
Simon Giesecke
2fb6095f16 Bug 1695162 - Migrate from custom hashtable iteration to range-based for in accessible, dom/animation, dom/base, dom/localstorage, gfx/thebes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D106895
2021-03-12 14:54:08 +00:00
Simon Giesecke
cb6c8aead4 Bug 1695162 - Make nsTHashtable::ConstIter return a real ConstIterator. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D107038
2021-03-09 10:28:16 +00:00
Emilio Cobos Álvarez
d5a1f6115c Bug 1696717 - Constify the dom fullscreen code a bit. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D107362
2021-03-07 21:46:00 +00:00
Simon Giesecke
0b443059fd Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +00:00
Simon Giesecke
4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Simon Giesecke
d2caea36fa Bug 1691894 - Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika
Differential Revision: https://phabricator.services.mozilla.com/D104676
2021-02-22 12:07:46 +00:00
Simon Giesecke
f701c44a5c Bug 1691894 - Fix EntryHandle to only work with DataType rather than wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika,jonco,valentin
Differential Revision: https://phabricator.services.mozilla.com/D104810
2021-02-12 15:25:40 +00:00
Simon Giesecke
d4f7649e81 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D104203
2021-02-09 18:19:39 +00:00
Edgar Chen
c2c0ea7709 Bug 1672330 - Move pointer lock code to PointerLockManager; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101054
2021-01-27 16:38:29 +00:00
Dorel Luca
b5c5a81751 Backed out changeset 4e317086de97 (bug 1672330) for Mochitest failures in dom/tests/mochitest/pointerlock/test_pointerlock_focus.html. CLOSED TREE 2021-01-27 14:05:29 +02:00
Edgar Chen
b81855eeb2 Bug 1672330 - Move pointer lock code to PointerLockManager; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D101054
2021-01-27 10:08:29 +00:00
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