Commit Graph
96 Commits
Author SHA1 Message Date
Keith Cirkel 4517bc15ec Bug 1974383 - Implement headingoffset r=dom-core,accessibility-platform-reviewers,webidl,firefox-style-system-reviewers,smaug,emilio,Jamie,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D255837
2026-05-21 22:31:44 +00:00
Serban Stanca 7e965b9c73 Revert "Bug 1974383 - Implement headingoffset r=dom-core,accessibility-platform-reviewers,webidl,firefox-style-system-reviewers,smaug,emilio,Jamie,saschanaz" for causing non-unified build bustages in nsINode.h.
This reverts commit 1b706d0c7c.
2026-05-21 15:10:51 +00:00
Keith Cirkel 1b706d0c7c Bug 1974383 - Implement headingoffset r=dom-core,accessibility-platform-reviewers,webidl,firefox-style-system-reviewers,smaug,emilio,Jamie,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D255837
2026-05-21 14:08:16 +00:00
Serban Stanca 641847c817 Revert "Bug 1974383 - Implement headingoffset r=dom-core,accessibility-platform-reviewers,webidl,firefox-style-system-reviewers,smaug,emilio,Jamie,saschanaz" for causing build bustages in RemoteAccessible.cpp.
This reverts commit 01c40e5a58.
2026-05-21 09:39:07 +00:00
Keith Cirkel 01c40e5a58 Bug 1974383 - Implement headingoffset r=dom-core,accessibility-platform-reviewers,webidl,firefox-style-system-reviewers,smaug,emilio,Jamie,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D255837
2026-05-21 09:04:53 +00:00
Vincent Hilla cced3864f3 Bug 2015010 - Reset dir=auto elements if a slot descendant is removed. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D282352
2026-04-13 06:45:31 +00:00
Jan-Niklas Jaeschke 0b2d030087 Bug 2030660 - Remove dom.shadowdom.selection_across_boundary.enabled pref. r=masayuki,webidl
Differential Revision: https://phabricator.services.mozilla.com/D293086
2026-04-10 08:02:43 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +00:00
Sandor Molnar f72b160909 Revert "Bug 2015010 - Reset dir=auto elements if a slot descendant is removed. r=dom-core,smaug" for causing crashes @ mozilla::dom::Element::State
This reverts commit f320ddc6fb.
2026-02-27 18:02:05 +00:00
Vincent Hilla f320ddc6fb Bug 2015010 - Reset dir=auto elements if a slot descendant is removed. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D282352
2026-02-27 16:25:20 +00:00
Emilio Cobos Álvarez 0dc344d536 Bug 2017500 - Null-check host when computing auto directionality. r=vhilla
Restores behavior when running this after unlinking.

Differential Revision: https://phabricator.services.mozilla.com/D284686
2026-02-24 17:26:55 +00:00
Jan-Niklas Jaeschke 5ac7ea1d5e Bug 2014598 - Don't reset auto direction if slot is not in shadow tree. r=vhilla,smaug
Differential Revision: https://phabricator.services.mozilla.com/D282025
2026-02-06 13:56:06 +00:00
Emilio Cobos Álvarez 2a3733e687 Bug 2006613 - Optimize front-removal of various tree-ordered-arrays. r=smaug
The previous approach wasn't quite sound, because it makes the frame
constructor receive the WillBeRemoved after the flat tree has already
changed.

Instead, what do you think about something like this? This creates a
very simple wrapper over an array, but special-cases removals from the
front, and uses it for TreeOrderedArray and also AssignedNodes...

It could be polished (in particular there are a few places where an
Span::IndexOf operator could be beneficial and so).

Differential Revision: https://phabricator.services.mozilla.com/D277301
2025-12-22 21:03:58 +00:00
Norisz Fay ac500ea570 Revert "Bug 2006613 - Optimize front-removal of various tree-ordered-arrays. r=smaug" for causing multiple failures and bustages
This reverts commit 4d02f992d0.
2025-12-22 19:45:18 +00:00
Emilio Cobos Álvarez 4d02f992d0 Bug 2006613 - Optimize front-removal of various tree-ordered-arrays. r=smaug
The previous approach wasn't quite sound, because it makes the frame
constructor receive the WillBeRemoved after the flat tree has already
changed.

Instead, what do you think about something like this? This creates a
very simple wrapper over an array, but special-cases removals from the
front, and uses it for TreeOrderedArray and also AssignedNodes...

It could be polished (in particular there are a few places where an
Span::IndexOf operator could be beneficial and so).

Differential Revision: https://phabricator.services.mozilla.com/D277301
2025-12-22 18:35:29 +00:00
Jan-Niklas Jaeschke 573f34249c Bug 1949053, part 4 - Rename CharacterData::TextFragment() to CharacterData::DataBuffer(). r=masayuki,firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D259935
2025-08-06 08:48:09 +00:00
Jan-Niklas Jaeschke 0151e67615 Bug 1949053, part 2 - Rename nsTextFragment to mozilla::dom::CharacterDataBuffer. r=masayuki
This patch updates all occurrences of the type `nsTextFragment` into its new name, `mozilla::dom::CharacterDataBuffer`.
It also updates the includes, including sorting.

Differential Revision: https://phabricator.services.mozilla.com/D259867
2025-08-06 08:48:01 +00:00
Emilio Cobos Álvarez 791917d8af Bug 1976665 - Sort headers in dom/. r=dom-core,media-playback-reviewers,webrtc-reviewers,dom-storage-reviewers,padenot,janv,smaug,jesup,jib
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.

Differential Revision: https://phabricator.services.mozilla.com/D256800
2025-08-05 11:47:34 +00:00
Sean Feng d3f6c9a968 Bug 1932150 - Update ranges to correctly set and update nodes for flattened selection r=jjaschke,smaug,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D231589
2025-05-09 18:19:04 +00:00
Serban Stanca 032142893c Revert "Bug 1932150 - Update ranges to correctly set and update nodes for flattened selection r=jjaschke,smaug,dom-core"
This reverts commit 0221ba097e.
2025-05-08 20:00:27 +00:00
Sean Feng 0221ba097e Bug 1932150 - Update ranges to correctly set and update nodes for flattened selection r=jjaschke,smaug,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D231589
2025-05-08 13:40:04 +00:00
Atila Butkovits da71eedf0a Revert "Bug 1932150 - Fix build bustage" for causing build bustages.
This reverts commit 0681b181d6.

Revert "Bug 1932150 - Fix lint failure" for causing Build bustage.

This reverts commit 60cc0878d3.

Revert "Bug 1932150 - Add new test cases for selection in flat tree r=smaug"

This reverts commit 3dbe5fc183.

Revert "Bug 1932150 - Make selection code to correctly iterate flattened tree r=smaug"

This reverts commit 6f7a1e4886.

Revert "Bug 1932150 - ContentSubtreeIterator #3: Fix a bug in ContentSubtreeIterator where the end container is in the light DOM of a shadow host r=jjaschke"

This reverts commit 19ce2c5806.

Revert "Bug 1932150 - ContentSubtreeIterator #2: Allow ContentSubtreeIterator to iterate nodes in flattened tree r=jjaschke"

This reverts commit d9d192bc3a.

Revert "Bug 1932150 - ContentSubtreeIterator #1: Make the end container related logic in ContentSubtreeIterator more robust r=jjaschke,smaug,dom-core"

This reverts commit 2fbde5b84d.

Revert "Bug 1932150 - Update ranges to correctly set and update nodes for flattened selection r=jjaschke,smaug,dom-core"

This reverts commit 116d26c37f.

Revert "Bug 1932150 - Allow using flat tree order for point comparing in selection r=jjaschke,smaug,dom-core"

This reverts commit 2ba73e1639.

Revert "Bug 1932150 - Fix some inconsistency about indicating whether the selection is allowed to cross the shadow boundary r=jjaschke,dom-core"

This reverts commit 793c2453f1.
2025-05-07 18:30:42 +00:00
Sean Feng 116d26c37f Bug 1932150 - Update ranges to correctly set and update nodes for flattened selection r=jjaschke,smaug,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D231589
2025-05-07 15:08:38 +00:00
Olli Pettay 60b974bb0b Bug 1914062 - implement updates to dir=auto traversal rules, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D222352
2024-09-16 22:07:47 +00:00
Vincent Hilla 2ddf8f16af Bug 1876163 - Part 5: Consider input / textarea children of dir=auto slot. r=smaug
This patch implements step 2.3.2 from https://html.spec.whatwg.org/#auto-directionality for the special case where the child is an auto-directionality form-associated element according to step 1 of the algorithm.

Depends on D208339

Differential Revision: https://phabricator.services.mozilla.com/D208340
2024-07-09 08:00:35 +00:00
Vincent Hilla c50c1c0cc9 Bug 1876163 - Part 4: Slot auto directionality for dynamic changes. r=smaug,emilio
Depends on D209704

Differential Revision: https://phabricator.services.mozilla.com/D208339
2024-07-09 08:00:34 +00:00
Vincent Hilla be572d5a4c Bug 1876163 - Part 3: Track whether node affects assigned dir=auto slot of ancestor. r=emilio,smaug
Along the parent chain of a node, multiple ancestors can be assigned to dir=auto slots that the element then impacts. The flag NodeAncestorHasDirAuto is therefore not sufficient anymore.

Depends on D208338

Differential Revision: https://phabricator.services.mozilla.com/D209704
2024-07-09 08:00:34 +00:00
Vincent Hilla e3fd65818d Bug 1876163 - Part 2: Update static case of compute auto directionality. r=emilio,smaug
This patch replaces WalkDescendantsSetDirectionFromText with a new function ComputeAutoDirectionality that implements the latest version of https://html.spec.whatwg.org/#auto-directionality

Depends on D208337

Differential Revision: https://phabricator.services.mozilla.com/D208338
2024-07-09 08:00:34 +00:00
Vincent Hilla ff068ff425 Bug 1896667 - Apply AncestorHasDirAuto flag consistently. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D210332
2024-07-09 08:00:33 +00:00
Vincent Hilla 92ef0d07b2 Bug 1881225 - Consider CDATASections for dir=auto. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D209697
2024-07-09 08:00:32 +00:00
Vincent Hilla 8cd8ba4bdf Bug 1873738 - Make non-html elements have a directionality. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D204384
2024-03-26 12:54:25 +00:00
Emilio Cobos Álvarez 18f7b60591 Bug 1874040 - Simplify dir=auto implementation. r=smaug
Make sure to do no work on insertions if the dir=auto element has
already the right strong directionality, but record that the node might
be the one impacting the dir=auto resolution.

Also get some node flags back.

Differential Revision: https://phabricator.services.mozilla.com/D202071
2024-02-21 12:23:48 +00:00
Emilio Cobos Álvarez bc8e14504e Bug 1856156 - Make Directionality an enum class. r=smaug
A bit neater this way.

Differential Revision: https://phabricator.services.mozilla.com/D198590
2024-01-15 19:35:44 +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
Emilio Cobos Álvarez 54e1143962 Bug 1866161 - Stop propagating directionality earlier. r=smaug
If the element already has the right directionality we don't need to
traverse the whole subtree.

Clean-up surrounding code a little bit while at it.

Differential Revision: https://phabricator.services.mozilla.com/D194503
2023-11-28 10:18:19 +00:00
Vincent Hilla cbc8307d45 Bug 1108425 - Fix dir=auto for textarea with rtl text. r=smaug
I copy-pasted all `SetDirectionFromValue`-related parts from HTMLInputElement to HTMLTextAreaElement

Differential Revision: https://phabricator.services.mozilla.com/D176999
2023-05-22 12:35:01 +00:00
Natalia Csoregi 5a99179621 Backed out changeset 2f394b22e31d (bug 1108425) for causing failures on bidi/726420-1.html. CLOSED TREE 2023-05-16 18:47:45 +03:00
Vincent Hilla 22c182f844 Bug 1108425 - Fix dir=auto for textarea with rtl text. r=smaug
I copy-pasted all `SetDirectionFromValue`-related parts from HTMLInputElement to HTMLTextAreaElement

Differential Revision: https://phabricator.services.mozilla.com/D176999
2023-05-16 13:49:07 +00:00
Jonathan Kew 1ab520226e Bug 1665655 - Implement the HTML spec special-case of directionality for <input type=tel>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162133
2022-11-16 15:42:17 +00:00
Norisz Fay 53a2157449 Backed out changeset 37b80bf4bf5a (bug 1665655) for causing multiple StyleSheet related failures CLOSED TREE 2022-11-16 16:57:27 +02:00
Jonathan Kew 3633364c03 Bug 1665655 - Implement the HTML spec special-case of directionality for <input type=tel>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D162133
2022-11-16 14:12:16 +00:00
Dan Minor ef775171c2 Bug 1719554 - Unify nsCharType as intl::BidiClass; r=platform-i18n-reviewers,jfkthame,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D132275
2021-12-06 18:15:49 +00:00
Dan Minor 1244a99641 Bug 1719554 - Unify most of nsUnicodeProperties.h; r=platform-i18n-reviewers,jfkthame,gregtatum,necko-reviewers,valentin
This unifies most of the calls in nsUnicodeProperties.h. CharType and Script
will be handled in subsequent patches on this bug.

Differential Revision: https://phabricator.services.mozilla.com/D132273
2021-12-06 18:15:49 +00:00
Butkovits Atila c0faf95b7f Backed out 3 changesets (bug 1719554) for causing bustages complaining about gfxTextRun.cpp.
Backed out changeset 6181e40d4da1 (bug 1719554)
Backed out changeset c261ede6ae81 (bug 1719554)
Backed out changeset 221ec418475c (bug 1719554)
2021-12-04 00:58:15 +02:00
Dan Minor 1219282759 Bug 1719554 - Unify nsCharType as intl::BidiClass; r=platform-i18n-reviewers,jfkthame,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D132275
2021-12-03 20:49:31 +00:00
Dan Minor fed56cd5d8 Bug 1719554 - Unify most of nsUnicodeProperties.h; r=platform-i18n-reviewers,jfkthame,gregtatum,necko-reviewers,valentin
This unifies most of the calls in nsUnicodeProperties.h. CharType and Script
will be handled in subsequent patches on this bug.

Differential Revision: https://phabricator.services.mozilla.com/D132273
2021-12-03 20:49:31 +00:00
Emilio Cobos Álvarez 3f13fe7485 Bug 1667868 - Optimize directionality change handling during slotting. r=smaug
Same idea, when only one node is slotted or unslotted, we only need to
do work for the rest of assigned nodes iff the slot has dir=auto or a
dir=auto ancestor, and the result of computing the dir=auto ancestor
changes.

Otherwise we just need to propagate the directionality from the slot.

Depends on D91753

Differential Revision: https://phabricator.services.mozilla.com/D91754
2020-09-29 21:43:32 +00:00
Emilio Cobos Álvarez b1fc84a629 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
Emilio Cobos Álvarez 6054b692fd Bug 1623030 - Minor cleanup in DirectionalityUtils.cpp. r=smaug
HTMLSlotElement is in scope, so remove some unneeded qualification, and use auto
where the return type is obvious.

Differential Revision: https://phabricator.services.mozilla.com/D67122
2020-03-17 15:28:13 +00:00
Emilio Cobos Álvarez eb6db3d555 Bug 1622900 - <input> text node children don't affect the directionality of the input. r=smaug
This was causing inconsistent directionality depending on the order of changes
between text content and input value.

Differential Revision: https://phabricator.services.mozilla.com/D67039
2020-03-16 21:07:33 +00:00