Commit graph

38 commits

Author SHA1 Message Date
Moonchild
37de431ac0 Issue #2721 - Create special case exception for <A>.Click() outside of DOM
This removes the requirement for there to be a non-null PresShell to
dispatch `Click()` events on `<A>` elements (only), since the exception
to the rule has propagated to the spec.

With these changes it should now be possible do create an anchor and
`Click()` on it from JS without actually first attaching it to the DOM
of the presented document, as abused by scripted downloads in pages
(instead of using the A attribute to custom-name downloads).
2025-06-17 09:24:44 +08:00
Moonchild
87a7cf7332 Issue #2472 - Part 6: Fire cancel event and close modal <dialog> on [ESC]
This implementation is different than Mozilla, not indirectly queueing cancel
tasks to be arbitrarily ordered, but rather synchronously close in reverse
top layer order.
2024-05-08 09:57:53 +08:00
Moonchild
7a04afab4a Issue #2472 - Part 4: Make TopLayer{Push|Pop} part of nsIDocument. 2024-05-08 09:55:38 +08:00
Moonchild
79c7489bb0 Issue #2472 - Part 3: Refactor Fullscreen stack to Top Layer stack
Fullscreen stack isn't part of the spec anymore; it's been changed to a more
generic version called Top Layer stack, which is being used by both full-screen
APIs and dialog elements.

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

Top Layer stack spec: https://fullscreen.spec.whatwg.org/#new-stacking-layer
2024-05-08 09:55:18 +08:00
FranklinDM
4bf43b8fb4 Issue #2488 - Part 3: Remove the StyleSetHandle smart pointer class 2024-04-02 22:49:48 +08:00
FranklinDM
b96b733bfa Issue #2112 - Part 9: Remove handling for multiple style backends 2024-04-02 22:42:43 +08:00
FranklinDM
10bf8705d0 Issue #2112 - Part 6: Remove IsStyledByServo function and callers 2024-04-02 22:41:54 +08:00
FranklinDM
b2d7504112 Issue #252 - Move getElementsByName from HTMLDocument to Document
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1415176
2023-04-08 07:29:02 +08:00
FranklinDM
e64aeea52d Issue #2135 - Bug 1430301: Implement ShadowRoot.elementFromPoint/elementsFromPoint 2023-03-06 16:15:38 +08:00
FranklinDM
e286eb8adb Issue #2135 - Bug 1430305: Implement ShadowRoot.fullscreenElement 2023-03-06 16:14:14 +08:00
FranklinDM
3dfffeaeca Issue #2135 - Bug 1430303: Implement ShadowRoot.pointerLockElement 2023-03-06 16:13:59 +08:00
FranklinDM
8a7587b401 Issue #21 - Remove use counters telemetry
This reverts Bug 968923 - Implement some equivalent of Chrome's use counters (on top of telemetry?)

For reference: https://bugzilla.mozilla.org/show_bug.cgi?id=968923
2022-04-28 10:43:09 +08:00
roytam1
92a1cc3139 Revert "Issue #21 - Remove use counters telemetry"
This reverts commit 8ca9db6b65.
2022-04-27 16:25:00 +08:00
FranklinDM
8ca9db6b65 Issue #21 - Remove use counters telemetry
This reverts Bug 968923 - Implement some equivalent of Chrome's use counters (on top of telemetry?)

For reference: https://bugzilla.mozilla.org/show_bug.cgi?id=968923
2022-04-27 16:15:31 +08:00
Moonchild
8c395520d9 Issue #1656 - Part 1: Nuke most vim config lines in the tree.
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-25 22:04:12 +08:00
Moonchild
57d143dc6e Issue #1643 - Part 4: Hook up all the plumbing. 2020-09-18 20:53:16 +08:00
Moonchild
3781c4a6dd Issue #618 - (async) Implement async attribute for inline module scripts.
This commit does several things:
- Moves the pref check from ScriptLoader to ns[I]Document so it can be called on
the document.
- Changes the atrribute freezing function to a better name that takes the
document as a parameter.
- Sets the proper async/defer attributes on HTML script elements based on
keywords and whether they are module scripts or not.
2020-08-29 08:10:42 +08:00
Moonchild
f85b274e94 Issue #1603 - Part 1: Reorganize ScriptLoader/ScriptElement
- Moves scripting parts of DOM into 'dom/script'
- Renames nsScript{Loader/Element} to Script{Loader/Element}
- Adjusts all callers
2020-07-04 07:01:00 +08:00
Matt A. Tobin
db72493615 Bug 1426494 - Share more code between nsIDocument and ShadowRoot
Tag #1375
2020-06-20 06:43:47 +08:00
Matt A. Tobin
b8260c664a Bug 1425769 - Base class for ShadowRoot and Document to manage style state
Tag #1375
2020-04-18 07:06:51 +08:00
Matt A. Tobin
a36d367eeb Bug 1348481 - Part 1b: Generalize FindDocStyleSheetInsertionPoint so it doesn't require an array of RefPtrs
Tag #1375
2020-04-18 07:06:38 +08:00
Matt A. Tobin
3b90312fac Bug 1422931 - Fix crash with slot element and make webcomponents preference per-doc
Tag #1375
2020-04-18 07:06:05 +08:00
Matt A. Tobin
cedff6e214 Bug 1416999 - Remove document.registerElement
Tag #1375
2020-04-18 07:05:32 +08:00
Gaming4JC
baa035c5c4 Bug 1396620 - Part 1: Remove created callback for custom elements
Tag UXP Issue #1344
2020-01-31 07:40:25 +08:00
Gaming4JC
a3b5d98af7 Bug 1378079 - Part 2: Introduce throw-on-dynamic-markup-insertion counter.
Per spec, document objects have a throw-on-dynamic-markup-insertion counter, which is used in conjunction with the create an element for the token algorithm to prevent custom element constructors from being able to use document.open(), document.close(), and document.write() when they are invoked by the parser.

Tag UXP Issue #1344
2020-01-31 07:39:02 +08:00
Gaming4JC
d35ff2985e Bug 1121994 - Implement adopted callback for custom elements.
Tag UXP Issue #1344
2020-01-31 07:37:46 +08:00
Gaming4JC
659204631b Bug 1334044: Replace detached callback (v0) with disconnected callback (v1).
Tag UXP Issue #1344
2020-01-31 07:37:43 +08:00
Gaming4JC
207d5a2e3e Bug 1334043 - Part 1: Replace attached callback (v0) with connected callback (v1).
Tag UXP Issue #1344
2020-01-31 07:37:32 +08:00
Gaming4JC
c939244e89 Bug 1276438 part 2. Move the implementation of the .body setter from nsHTMLDocument to nsIDocument.
Tag UXP Issue #1344
Tag UXP Issue #252
2020-01-31 07:34:56 +08:00
Gaming4JC
0ef352d74b Bug 1276438 part 1. Move the implementation of the .body getter from nsHTMLDocument to nsIDocument.
Tag UXP Issue #1344
Tag UXP Issue #252
2020-01-31 07:34:53 +08:00
wolfbeast
f255a1e606 Issue #1118 - Part 8: Remove no-longer-used mDidDocumentOpen and
CheckForOutdatedParent()

This was only used to check for cases when document.open() changed the
global, and elements being inserted into the document needing a new
reflector as a result.

Since document.open() no longer changes the global, this code is no
longer needed.
2019-12-28 21:20:07 +08:00
wolfbeast
fc5d61608c Issue #1118 - Part 5: Change the way document.open() works
This changes the work we do for document.open() in the following ways:
- We no longer create a new Window when doing document.open().
  We use the same Window but remove all the event listeners on the
  existing DOM tree and Window before removing the document's existing
  children to provide a clean slate document to use for .write().
- We no longer create a session history entry (previously would be a
  wyciwyg URI). We now replace the current one, effectively losing the
  entry for the original document.
- We now support document.open() on windowless documents.
2019-12-28 21:20:03 +08:00
win7-7
e6f376f5ef Convert dom/base/nsImageLoadingContent.cpp to use AsyncOpen2 and followups along with it (1445670 and 1373780 part 2 and 3)
Convert dom/base/nsImageLoadingContent.cpp to use AsyncOpen2 and followups along with it (1445670 and 1373780 part 2 and 3)
2019-08-10 06:26:08 +08:00
wolfbeast
34f16bf61c Bug 1466991 - Part 1: Factor out ShouldUseXBLScope. 2019-02-16 00:13:22 +08:00
Gaming4JC
d4ac94cf3e Remove support and tests for HSTS priming from the tree. Fixes #384 2019-02-15 23:59:39 +08:00
janekptacijarabaci
9db39c42c0 moebius#121: DOM - Selection API - getSelection() should exist on XMLDocument / Selection.type
https://github.com/MoonchildProductions/moebius/pull/121
2019-02-15 23:49:13 +08:00
wolfbeast
3df0152d88 Implement "cookie-averse document objects".
See: https://html.spec.whatwg.org/multipage/dom.html#cookie-averse-document-object
This resolves #196.
2019-02-15 23:30:32 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00