Commit Graph

476 Commits

Author SHA1 Message Date
Sean Feng
4a776dbb51 Bug 1867058 - Part 8: Update Selection to support across shadow dom selection r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D195310
2024-03-25 13:40:59 +00:00
Sean Feng
894f00d943 Bug 1867058 - Part 4: Allow nodes inside shadow trees can be marked as descendants of ranges' common inclusive ancestor r=smaug
This is mainly used for nsINode::IsMaybeSelected() to work for nodes
inside shadow tree.

Differential Revision: https://phabricator.services.mozilla.com/D195304
2024-03-25 13:40:57 +00:00
pstanciu
bcc6e01718 Backed out 12 changesets (bug 1867058) for causing bustages on AbstractRange.cpp
Backed out changeset 6254c9c51033 (bug 1867058)
Backed out changeset 2ad556d56736 (bug 1867058)
Backed out changeset a8bc41291ab3 (bug 1867058)
Backed out changeset c30869c03a70 (bug 1867058)
Backed out changeset 39c5816dff6b (bug 1867058)
Backed out changeset 42e226158dc9 (bug 1867058)
Backed out changeset 67bb7158a09f (bug 1867058)
Backed out changeset 7b5a689dc7fd (bug 1867058)
Backed out changeset 3cf108eb13a6 (bug 1867058)
Backed out changeset 8efda4cce80c (bug 1867058)
Backed out changeset 0837e15babab (bug 1867058)
Backed out changeset 8ce7972ea4df (bug 1867058)
2024-03-23 02:24:26 +02:00
Sean Feng
e71c2c9c02 Bug 1867058 - Part 8: Update Selection to support across shadow dom selection r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D195310
2024-03-22 17:05:51 +00:00
Sean Feng
eb1247e95d Bug 1867058 - Part 4: Allow nodes inside shadow trees can be marked as descendants of ranges' common inclusive ancestor r=smaug
This is mainly used for nsINode::IsMaybeSelected() to work for nodes
inside shadow tree.

Differential Revision: https://phabricator.services.mozilla.com/D195304
2024-03-22 17:05:49 +00:00
Jan-Niklas Jaeschke
f48048966b Bug 1881695: Implemented a new Cache to store the index of a node in a parent. r=smaug
This new cache implementation keeps the last N node/index combos in a stack-allocated array, which will be queried before calling nsINode::ComputeIndexOf().

Differential Revision: https://phabricator.services.mozilla.com/D203900
2024-03-11 19:02:11 +00:00
Natalia Csoregi
bda037520e Backed out changeset 37af5c6d011a (bug 1881695) for causing Bug 1884602 and Bug 1884601. CLOSED TREE 2024-03-11 10:47:07 +02:00
Jan-Niklas Jaeschke
9542d9c0d0 Bug 1881695: Implemented a new Cache to store the index of a node in a parent. r=smaug
This new cache implementation keeps the last N node/index combos in a stack-allocated array, which will be queried before calling nsINode::ComputeIndexOf().

Differential Revision: https://phabricator.services.mozilla.com/D203900
2024-03-09 11:13:55 +00:00
Cristina Horotan
a77498aaf0 Backed out changeset e72815765675 (bug 1881695) for causing Hazard failure at nsContentUtils.h 2024-03-07 23:47:13 +02:00
Jan-Niklas Jaeschke
4bc4c58c44 Bug 1881695: Implemented a new Cache to store the index of a node in a parent. r=smaug
This new cache implementation keeps the last N node/index combos in a stack-allocated array, which will be queried before calling nsINode::ComputeIndexOf().

Differential Revision: https://phabricator.services.mozilla.com/D203900
2024-03-07 16:57:16 +00:00
Narcis Beleuzu
0acdaa9355 Backed out changeset cc11e54ef4b1 (bug 1881695) for bustages on nsContentUtils.h 2024-03-07 18:01:44 +02:00
Jan-Niklas Jaeschke
7b6a9412e4 Bug 1881695: Implemented a new Cache to store the index of a node in a parent. r=smaug
This new cache implementation keeps the last N node/index combos in a stack-allocated array, which will be queried before calling nsINode::ComputeIndexOf().

Differential Revision: https://phabricator.services.mozilla.com/D203900
2024-03-07 15:14:06 +00:00
Ryan VanderMeulen
5ad7a27167 Bug 1883927 - Add ClearOnShutdown.h includes to a couple files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D203793
2024-03-06 17:55:34 +00:00
Adam Vandolder
f6565c9ebc Bug 1880188 - Add shadowrootclonable attribute support. r=webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D202357
2024-02-28 19:00:34 +00:00
Jan-Niklas Jaeschke
80fb980e8c Bug 1879441: Added null check for selections in nsINode::IsSelected(). r=smaug
Selections are stored here as WeakPtr to save refcount overhead, which means that a selection can be null.

Differential Revision: https://phabricator.services.mozilla.com/D202143
2024-02-19 12:53:31 +00:00
Emilio Cobos Álvarez
1df8c0453d Bug 1879579 - Clean up CompareTreePosition and related code. r=smaug
Make TreeOrderedArray support what the form controls stuff needs, and
use it instead of custom nsContentUtils stuff.

Differential Revision: https://phabricator.services.mozilla.com/D201261
2024-02-12 20:01:36 +00:00
Noemi Erli
1637a997a2 Backed out changeset 1acc95286189 (bug 1879579) for causing mass failures CLOSED TREE 2024-02-12 17:25:21 +02:00
Emilio Cobos Álvarez
97dc4d46da Bug 1879579 - Clean up CompareTreePosition and related code. r=smaug
Make TreeOrderedArray support what the form controls stuff needs, and
use it instead of custom nsContentUtils stuff.

Differential Revision: https://phabricator.services.mozilla.com/D201261
2024-02-12 00:01:23 +00:00
Nazım Can Altınova
bb19083070 Bug 1877453 - Mark nsINode::QuerySelector and nsINode::QuerySelectorAll as relevant for js r=profiler-reviewers,julienw
Example profile with this patch: https://share.firefox.dev/42hGnbk

Previously we were seeing that there was a Document.querySelector{,All} call,
but it was impossible to see the selector itself. This label frame exposes the
query selector argument which I believe is valuable to web developers.

Differential Revision: https://phabricator.services.mozilla.com/D199984
2024-02-01 14:50:34 +00:00
Emilio Cobos Álvarez
f67c9a08e8 Bug 1875822 - nsObjectLoadingContent doesn't need to inherit from nsImageLoadingContent anymore. r=smaug
After bug 1875466, this is no longer needed and simplifies the code
quite a bit.

Differential Revision: https://phabricator.services.mozilla.com/D199252
2024-01-22 23:15:17 +00:00
Emilio Cobos Álvarez
08a8d2d9f1 Bug 1856156 - Recompute auto directionality on input type changes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D198588
2024-01-15 19:35:43 +00:00
Kagami Sascha Rosylight
9ef0cfab7c Bug 1868428 - Add ShadowRoot clonable attribute r=avandolder,webidl,emilio
Depends on D193677

Differential Revision: https://phabricator.services.mozilla.com/D195577
2023-12-11 14:19:17 +00:00
Adam Vandolder
b9bbd3c2cc Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-12-07 21:27:10 +00:00
Olli Pettay
e8eceb76ea Bug 1868746 - Drop styleset from Document sooner, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D195771
2023-12-07 20:50:14 +00:00
keithamus
dcf9ffb1a7 Bug 1868740 - guard GetEffectivePopoverTargetElement with pref flag r=surkov,emilio
Differential Revision: https://phabricator.services.mozilla.com/D195759
2023-12-07 11:51:38 +00:00
Iulian Moraru
8d186a8450 Backed out 6 changesets (bug 1712140) for causing sanitizer failures on nsHtml5TreeBuilder.cpp. CLOSED TREE
Backed out changeset b374469160e9 (bug 1712140)
Backed out changeset dfc44cccff32 (bug 1712140)
Backed out changeset 3a35e1401130 (bug 1712140)
Backed out changeset a93481858c38 (bug 1712140)
Backed out changeset a861fd445f56 (bug 1712140)
Backed out changeset dc1dc389f2dc (bug 1712140)
2023-12-07 08:16:23 +02:00
Adam Vandolder
0956658e5f Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-12-06 22:50:49 +00:00
Stanca Serban
34d35a19ee Backed out 6 changesets (bug 1712140) for causing Linux related wpt failures in nsHtml5TreeBuilder.cpp. CLOSED TREE
Backed out changeset 3d799b386f3e (bug 1712140)
Backed out changeset 2ed53d545d6d (bug 1712140)
Backed out changeset 6f50077df42a (bug 1712140)
Backed out changeset e7c5449482f9 (bug 1712140)
Backed out changeset 5490dad148ef (bug 1712140)
Backed out changeset 50828058065e (bug 1712140)
2023-12-06 00:18:38 +02:00
Adam Vandolder
d4c62c3dcb Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-12-05 18:18:16 +00:00
Iulian Moraru
80baabd575 Backed out 6 changesets (bug 1712140) for causing wpt failures on declarative-shadow-dom-opt-in.html.
Backed out changeset 78e3a33470ae (bug 1712140)
Backed out changeset 8601fce480ef (bug 1712140)
Backed out changeset 4d2749962c5f (bug 1712140)
Backed out changeset b65511d17150 (bug 1712140)
Backed out changeset 8ae1f766f1f9 (bug 1712140)
Backed out changeset 4ffe7a6ad366 (bug 1712140)
2023-12-04 22:30:04 +02:00
Adam Vandolder
773870d396 Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-12-04 17:35:49 +00:00
Stanca Serban
3fa8347485 Backed out 6 changesets (bug 1712140) for causing wpt failures in declarative-shadow-dom-opt-in.html.
Backed out changeset 554a46ed8046 (bug 1712140)
Backed out changeset 14ebbfca2e84 (bug 1712140)
Backed out changeset 98dd5766dd46 (bug 1712140)
Backed out changeset 4241a7241a9b (bug 1712140)
Backed out changeset 59ee434d503e (bug 1712140)
Backed out changeset ff3bb42f91d1 (bug 1712140)
2023-12-01 03:26:27 +02:00
Adam Vandolder
f03d7c3ce0 Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-11-30 23:17:15 +00:00
Olli Pettay
63e3dac2da Bug 1843477, mark some classes being main thread only, r=mccr8
Depends on D187148

Differential Revision: https://phabricator.services.mozilla.com/D188958
2023-09-26 12:36:21 +00:00
Cosmin Sabou
1483b97d75 Backed out 6 changesets (bug 1843477) for causing hazards failures. CLOSED TREE
Backed out changeset 64b093aa12a9 (bug 1843477)
Backed out changeset bdcd84c938d1 (bug 1843477)
Backed out changeset 05c882dd0d9a (bug 1843477)
Backed out changeset 1de814e5820d (bug 1843477)
Backed out changeset 6a0e19a60a5d (bug 1843477)
Backed out changeset 48942aff586f (bug 1843477)
2023-09-26 05:32:28 +03:00
Olli Pettay
033c66276e Bug 1843477, mark some classes being main thread only, r=mccr8
Depends on D187148

Differential Revision: https://phabricator.services.mozilla.com/D188958
2023-09-25 21:09:01 +00:00
Olli Pettay
22262b6f58 Bug 1843473 - Don't dispatch DOMActivate if there are no listeners for it, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D186473
2023-08-18 06:01:16 +00:00
Peter Van der Beken
c10814e75a Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre
Differential Revision: https://phabricator.services.mozilla.com/D184973
2023-08-02 20:41:48 +00:00
Sandor Molnar
24e7457734 Backed out 2 changesets (bug 1843035) for causing assertion failures in dom/html/nsGenericHTMLElement.cpp CLOSED TREE
Backed out changeset d44bf85938f0 (bug 1843035)
Backed out changeset 238e99b4449c (bug 1843035)
2023-07-18 17:30:09 +03:00
Mirko Brodesser
0f87fa519a Bug 1843035: part 2) Assert correctness of popover attribute state at all relevant callers of GetPopoverAttributeState(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183477
2023-07-18 08:57:26 +00:00
Adam Vandolder
92c9949b2e Bug 1685333 - Support adoption of document fragment nodes across documents. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D177215
2023-07-13 14:02:46 +00:00
Emilio Cobos Álvarez
69c751a4c3 Bug 1837816 - Make selector cache not tied to a document. r=media-playback-reviewers,karlt,mstange
It doesn't really need to.

Differential Revision: https://phabricator.services.mozilla.com/D180591
2023-06-16 17:20:42 +00:00
Emilio Cobos Álvarez
6ea286c6e6 Bug 1472169 - Notify of appends from CloneAndAdopt clone path. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D180314
2023-06-12 11:06:01 +00:00
Jan-Niklas Jaeschke
d34befcb48 Bug 1828469, part 2: Moved some logic from nsRange to AbstractRange to support StaticRanges in custom highlights. r=masayuki
With this change, Selections are also registered into StaticRanges,
ultimately making them visible to `nsINode::IsSelected()`,
which is necessary to paint them.

Differential Revision: https://phabricator.services.mozilla.com/D175784
2023-05-31 08:23:45 +00:00
Mirko Brodesser
896dabd637 Bug 1834493: part 1) Rename PopoverState to PopoverAttributeState. r=emilio
Less confusing.

Differential Revision: https://phabricator.services.mozilla.com/D178770
2023-05-24 10:48:04 +00:00
Noemi Erli
9a6edab85a Backed out 3 changesets (bug 1828469) for causing assertion in RangeBoundary.h
Backed out changeset ab92a12ba6ea (bug 1828469)
Backed out changeset 217801294c41 (bug 1828469)
Backed out changeset c78c717e4ec9 (bug 1828469)
2023-05-23 12:10:12 +03:00
Jan-Niklas Jaeschke
654b508a08 Bug 1828469, part 2: Moved some logic from nsRange to AbstractRange to support StaticRanges in custom highlights. r=masayuki
With this change, Selections are also registered into StaticRanges,
ultimately making them visible to `nsINode::IsSelected()`,
which is necessary to paint them.

Differential Revision: https://phabricator.services.mozilla.com/D175784
2023-05-23 06:53:32 +00:00
Alexander Surkov
91c19e8580 Bug 1821732 - GetTopmostClickedPopover fails to return a popover, r=emilio
Temporary auto popover list variable is freed while it's used for mozilla::Reversed, thus
GetTopmostClickedPopover comparisment fails.

Differential Revision: https://phabricator.services.mozilla.com/D178209
2023-05-17 00:47:53 +00:00
Masayuki Nakano
d8b4f4d3a2 Bug 1829570 - part 1: Create a static method version of AsyncEventDispatcher::RunDOMEventWhenSafe r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D176486
2023-05-15 01:07:29 +00:00
Emilio Cobos Álvarez
79e2754796 Bug 1831539 - Remove HasBoxFFI. r=boris
HasBoxFFI and HasArcFFI aren't great, see bug 1831242 as for examples of
why.

HasArcFFI requires a bit more care, but HasBoxFFI doesn't give us much
benefit. Instead use the same type in the FFI boundary.

Differential Revision: https://phabricator.services.mozilla.com/D177252
2023-05-09 11:07:26 +00:00