1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-27 11:51:17 +00:00
Commit Graph

75 Commits

Author SHA1 Message Date
Moonchild 3c2c7ce1e2 No issue - Escape < and > in element attribute values.
Per spec, extend escaping of attribute value characters to include
`<` and `>`. We already did this for text fragments, and it makes sense
to apply the same to attribute values. We are at parity with mainstream
that default-escape attribute values this way in current releases.
2025-06-27 23:29:12 +08:00
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 53a6f6349d Issue #2736 - Part 14: Make CSP-enabled available to workers. 2025-05-14 14:35:35 +08:00
Moonchild c8db9efb3c Issue #2736 - Part 4: Re-work img <src> attribute.
Use subject principal as triggering principal in <img> "src" attribute.
Also get rid of the `BeforeMaybeChangeAttr`/`AfterMaybeChangeAttr` dance:
It makes more logical sense for these effects to happen _after_ the
attribute has actually been changed.
2025-05-14 14:23:17 +08:00
Moonchild 9ad680cfc4 Issue #2736 - Part 1: Provide more consistent principals to CSP.
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a
loading principal currently retrieve it from the context node.
Since no current callers require the principal to be the loading
principal, and some already expect it to be the triggering principal
(which there's currently no other way to retrieve), a choice was made
to pass the triggering principal whenever possible, but use the loading
principal to determine the origin URL.
2025-05-14 14:21:46 +08:00
Moonchild 7b6e3a2d4a Issue #2653 - Part 1: Initial cleanup of AppId and isolated mozbrowser.
This removes a lot of the plumbing for having the platform embed itself
through IPC which was required for B2G running the browser as both
shell and browser application.
2024-11-21 21:01:27 +08:00
Moonchild 7d978ccd71 Issue #2641 - Update Fetch to adhere to the updated spec (pass refpolicy)
Resolves #2641
2024-10-24 07:37:31 +08:00
Moonchild 3058bef840 Issue #2472 - Part 1: Add helper method to directly dispatch events to widgets. 2024-05-08 09:53:11 +08:00
FranklinDM 6c53117699 Issue #2158 - Part 5: Guard preload links support with a preference
This is enabled by default.
2024-01-29 15:30:41 +08:00
FranklinDM 95490b25eb Issue #2158 - Part 4: Dispatch load/error events upon parsing preload links 2024-01-29 15:30:15 +08:00
Martok d6dd1f8133 Issue #2452 - Ensure DOM events aren't dispatched at unexpected time
https://bugzilla.mozilla.org/show_bug.cgi?id=1409985
https://bugzilla.mozilla.org/show_bug.cgi?id=1443746
2024-01-18 10:08:24 +08:00
Moonchild d375578415 Issue #2401 - Part 2: Add GetCommonFlattenedTreeAncestor.
Passing GetFlattenedTreeParent() as the "get parent" function.

This way we can reduce the complexity in our EventStateManager by simply
calling out to the templatized function from Part 1.
2024-01-11 09:51:40 +08:00
Moonchild a73c8e93d6 Issue #2401 - Part 1: Templatize GetCommonAncestor. 2024-01-11 09:51:25 +08:00
Brian Smith 6979441734 Issue #2402 - importScripts should be governed by script-src in Web Workers. https://bugzilla.mozilla.org/show_bug.cgi?id=1322111 Add TYPE_INTERNAL_WORKER_IMPORT_SCRIPTS content policy. Update the Cache API schema to account for new nsIContentPolicy type. 2024-01-11 09:45:52 +08:00
Martok f059bb0a59 Issue #2240 - Align Microtasks and promises scheduling with spec
Microtasks, resolved Promises and Observers are handled after the sync
task that caused them, in the order they were generated.
Also simplifies reentrancy handling.

Based-on: m-c 1193394
2024-01-09 11:59:32 +08:00
Moonchild 50ad087351 Issue #1721 - Implement GlobalPrivacyControl
(and get rid of failed DoNotTrack)
2023-10-18 10:17:23 +08:00
Brian Smith 529bc13f05 Issue #1442 - Part 16 - Report stream errors during consumption. https://bugzilla.mozilla.org/show_bug.cgi?id=1128959 2023-10-04 10:02:10 +08:00
Brian Smith bff1f3bc60 Issue #1442 - Part 8: Fetch implementation of streams. https://bugzilla.mozilla.org/show_bug.cgi?id=1128959 +worker-friendly pref checking for the DOM API. 2023-10-04 09:55:06 +08:00
FranklinDM bbcfb62753 Issue #2197 - Part 4: Expose structuredClone in Sandbox
Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=1734320
2023-04-10 07:27:03 +08:00
FranklinDM 47147d58b0 Issue #2197 - Part 1b: Transferables should be arrays of objects
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1336020
2023-04-10 07:25:20 +08:00
FranklinDM 56193120c5 Issue #2135 - Implement sequential focus navigation for shadow DOM
This covers the following:
Bug 1413834	Implement sequential focus navigation regarding shadow DOM
> Bug 1430020	Let sequential focus navigation in shadow DOM enter iframes
> Bug 1430701	Handle focus navigation on frameless shadow hosts in light DOM
> Bug 1430692	Handle focus navigation on NAC in shadow DOM
> Bug 1453693	Ensure sequential focus navigation works in Shadow DOM and add some tests
> Bug 1466581	Handle sequential focus also in nested shadow DOM
> Bug 1481079	Shadow DOM hosts should be focusable
> Bug 1507101	Use StyleChildrenIterator instead of custom frame tree walking code to handle NAC inside shadow dom
> Bug 1512043	Ensure traverse all nodes owned by the top level shadow host
> Bug 1512457	Fix various cases that focus navigation doesn't work well with frameless shadow host
> Bug 1513141	Really minor nsFocusManager cleanup
> Bug 1519090	Keyboard focus is trapped inside <slot>
> Bug 1528034	Make IsHostOrSlot null-safe
> Bug 1544826	Wrong focus navigation behavior when the root element is a shadow root
>> Bug 1500273	Ensure backward focus navigation works in Shadow DOM
2023-03-06 16:17:39 +08:00
FranklinDM 24572438a0 Issue #2135 - Bug 1413102: Ensure Shadow DOM boundaries are dealt properly in event handling
* RE: BasicEvents.h - our WidgetEvent is not movable (yet), so the change that requires that wasn't included.
* Parts of this use code that was introduced in bug 1427511. For now, they were replaced with their equivalents.
2023-03-06 16:14:31 +08:00
Martok b4dd106262 Issue #2030 - Dispatch click on common interactive ancestor if mousdown/up are not on the same element
For example, if the mouse is dragged from one element to another while
staying inside the same button, dispatch from their common ancestor
2022-12-02 23:56:40 +08:00
Moonchild 37f0199c79 [Network, DOM] Align our implementation with the current CORS/Fetch spec. 2022-11-25 11:41:52 +08:00
Brian Smith 13fcc4a046 Issue #1829 - Revert "Issue #1751" 2022-05-04 09:40:24 +08:00
Moonchild 51d3f2d2f3 Issue #1783 - Part 1: Move GetNodeDepth to ResizeObserver.cpp
GetNodeDepth() is a specialized version for ResizeObserver to get the depth of
a node across Shadow DOM. It's better to have this in ResizeObserver.cpp
instead of the generic ContentUtils.

Also updated the function to bypass the shadow root itself and not count it
because ResizeObserver doesn't observe the shadow root and only needs the
relative depths among all observed targets. IOW we use the flattened tree here.
2021-06-24 11:05:44 +08:00
Moonchild d29e4f8306 Issue #1751 -- Remove XP_MACOSX conditionals from /dom 2021-05-05 10:26:13 +08:00
Moonchild d86d1256bc [dom] Update noscript serialization to the changed spec.
Make <noscript> escaping conditional on whether scripting is enabled.
2021-02-25 09:26:37 +08:00
Matt A. Tobin d4324dc064 Issue #1390 - Clean up presentation api leftovers 2021-01-27 21:01:56 +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 d883c3ef98 Issue #1643 - Part 1: Add GetNodeDepth() to nsContentUtils. 2020-09-18 20:53:12 +08:00
Moonchild 52c03190ee [network/dom] Improve sanitization of download filenames. 2020-07-31 08:07:47 +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 04a69cbc34 Issue #1375 - Merge CustomElements pref with Webcomponents Pref 2020-04-18 07:07:23 +08:00
Matt A. Tobin d9112daf48 Bug 1426536 - Remove nsContentUtils::IsContentInsertionPoint
Tag #1375
2020-04-18 07:06:29 +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 6d8e6e8955 Bug 1419799 - Fix nsContentUtils::IsInSameAnonymousTree in Shadow DOM
Tag #1375
2020-04-18 07:06:02 +08:00
Matt A. Tobin cab78760e5 Bug 1409975 - Implement node distribution for shadow tree slots
* Implementation for assignedNodes
* Include slots in the flat tree
* Fix event get-the-parent algorithm for a node
* Update and add reftests for Shadow DOM v1
* Update web platform tests expectations

Tag #1375
2020-04-18 07:05:39 +08:00
Matt A. Tobin a7ba34c672 Bug 1418002 - Remove HTMLContentElement
Tag #1375
2020-04-18 07:05:35 +08:00
Matt A. Tobin cedff6e214 Bug 1416999 - Remove document.registerElement
Tag #1375
2020-04-18 07:05:32 +08:00
Matt A. Tobin 5917636e83 Bug 1396584 - Remove support for multiple ShadowRoots
Tag #1375
2020-04-18 07:05:03 +08:00
Matt A. Tobin 9928baf912 Issue #1375 - Stop largely using the parser service
This is based on Bug 1395828

* Add nsHTMLElement::IsBlock()
* Rename nsHTMLTags methods
* Remove AssertParserServiceIsCorrect()
* Remove most uses of nsIParserService/nsParserService
2020-04-18 07:04:57 +08:00
Matt A. Tobin 6ce9cc2a25 Bug 1377978 - Make nsRange use uint32_t to offset
Tag #1375
2020-04-18 07:04:38 +08:00
Matt A. Tobin c37b4d0c63 Bug 1330843 - Allow JS to create NAC pseudo-elements
Tag #1375
2020-04-18 07:03:31 +08:00
Matt A. Tobin a03838af22 Bug 1321284 - Crash in nsCSSFrameConstructor::GetInsertionPrevSibling when trying to reframe native anonymous content
* Make StyleChildrenIterator skip NAC generated by root element primary frame ancestors.
* Add nsINode::GetFlattenedTreeParentNodeForStyle.
* Add iterator class to find all restyle roots.

NOTE: Parts 1, 2, and "4.2"

Tag #1375
2020-04-18 07:02:47 +08:00
win7-7 51f5cb3576 Issue #1384 - Match standard for colSpan/rowSpan
HTML standardizes proper behavior of colSpan and rowSpan:

The main thing is that getting the .rowSpan and .colSpan IDL properties will now return the actual clamped value that we use.
2020-02-07 07:57:04 +08:00
Gaming4JC 57da7a1935 Bug 1430951 - Avoid element name atomizing to improve performance of LookupCustomElementDefinition
Since we are dealing with the element (nodeInfo->LocalName() and NameAtom() are the same value), we could use nodeInfo->NameAtom() instead.

Tag UXP Issue #1344
2020-01-31 07:40:59 +08:00
Gaming4JC fb6f6ec903 Bug 1405821 - Move microtask handling to CycleCollectedJSContext
Tag UXP Issue #1344
2020-01-31 07:40:36 +08:00
Gaming4JC dba59f0317 Bug 1406325 - Part 5: Implement try to upgrade.
Tag UXP Issue #1344
2020-01-31 07:39:51 +08:00
Gaming4JC db3b6b5884 Bug 1406325 - Part 4: Use mType for LookupCustomElementDefinition and also removing parts of v0.
Tag UXP Issue #1344
2020-01-31 07:39:47 +08:00