1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-06-20 15:28:50 +00:00
Commit Graph

55 Commits

Author SHA1 Message Date
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
Gaming4JC d35ff2985e Bug 1121994 - Implement adopted callback for custom elements.
Tag UXP Issue #1344
2020-01-31 07:37:46 +08:00
Gaming4JC befa1027e3 Bug 1334043 - Part 2: Make nsContentUtils::EnqueueLifecycleCallback static.
We make nsContentUtils::EnqueueLifecycleCallback static so that it can be called without a window object. To achive this, we also make CustomElementReaction not taking a CustomElementRegistry in the constructor, as it can call Upgrade statically.

Tag UXP Issue #1344
2020-01-31 07:37:35 +08:00
Gaming4JC d1a1106760 Bug 1392970 - Part 2: Get CustomElementDefinition from CustomElementData when possible.
Tag UXP Issue #1344
2020-01-31 07:37:28 +08:00
Gaming4JC b0285ef3f7 Bug 1301024 - Part 2: Implement create an element steps.
Tag UXP Issue #1344
2020-01-31 07:37:22 +08:00
Gaming4JC 2bd8be69ea Bug 1334051 - Part 2: Invoke attributeChangedCallback only if attribute name is in the observed attribute list.
We call attributeChangedCallback in two cases:

1. When any of the attributes in the observed attribute list has changed, appended, removed, or replaced.

2. When upgrading an element, for each attribute in element's attribute list that is in the observed attribute list.

Note: w/ Fixup for not implementing an API Enhancement Bug 1363481.

Tag UXP Issue #1344
2020-01-31 07:37:07 +08:00
Gaming4JC 979d2bfb96 Bug 1357002 - Part 1: Cache dom.webcomponents.customelements.enabled preference;
Tag UXP Issue #1344
2020-01-31 07:35:56 +08:00
Gaming4JC d662ddd6b6 Bug 1341898 - Make nsDocument::IsWebComponentsEnabled use a cached bool pref;
Note: Minus IPC bit.

Tag UXP Issue #1344
2020-01-31 07:35:53 +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
win7-7 c4af2549b2 add main thread only cache for nsIAtoms to speed up atomization dom/base
add main thread only cache for nsIAtoms to speed up atomization
2019-05-31 07:17:44 +08:00
wolfbeast c858b4cc75 Fix build bustage in cbfef7fcdb853916ff04015f6ee2d4b86f424a08
- imageDetails.format() needs a cast to SurfaceFormat
- style nit: wrap long lines.
2019-02-16 00:13:18 +08:00
wolfbeast f3a19b8e9b Release mapped surface memory on size check failure to plug a leak. 2019-02-16 00:13:16 +08:00
wolfbeast 918ef0183a Move surface data checking to a separate function to make it less "totally nuts" 2019-02-16 00:13:15 +08:00
wolfbeast b51651f769 Part 1. Duplicate IsLocalRefURL to nsContentUtils to reuse this function.
`IsLocalRefURL` is originally designed to be used by URLValue only.
Since we need this function in SVGUseElement::LookupHref too, duplicate it to nsContentUtils as a util function.
This is a duplication because CSSValue uses stringbuffers and not nsStrings.
While Bug 1356060 - "Just use nsString in URLValueData" converts this use from stringbuffer to nsString, it builds on a bunch of vartype refactoring (nsString vs. nsAString, etc.) which is too much of a headache to deal with just to deduplicate this simple function.
2019-02-16 00:12:41 +08:00
wolfbeast 5cc1408b3d Revert "Part 1. Move IsLocalRefURL to nsContentUtils to reuse this function. (port-rewrite)"
This reverts commit 19f010c62022e269f99066a8d90e3522fe31adaf.
2019-02-16 00:12:40 +08:00
Moonchild 49fc92f4a1 Bug 1357432 (#750)
* Part 1. Move IsLocalRefURL to nsContentUtils to reuse this function. (port-rewrite)

`IsLocalRefURL` is originally designed to be used by URLValue only.
Since we need this function in SVGUseElement::LookupHref too, move it to nsContentUtils as a util function.

* Revert "Part 1. Move IsLocalRefURL to nsContentUtils to reuse this function. (port-rewrite)"

This reverts commit 19f010c62022e269f99066a8d90e3522fe31adaf.

* Part 1. Duplicate IsLocalRefURL to nsContentUtils to reuse this function.

`IsLocalRefURL` is originally designed to be used by URLValue only.
Since we need this function in SVGUseElement::LookupHref too, duplicate it to nsContentUtils as a util function.
This is a duplication because CSSValue uses stringbuffers and not nsStrings.
While Bug 1356060 - "Just use nsString in URLValueData" converts this use from stringbuffer to nsString, it builds on a bunch of vartype refactoring (nsString vs. nsAString, etc.) which is too much of a headache to deal with just to deduplicate this simple function.

* Part 2. Implement nsSVGEffects::GetBaseURLForLocalRef to export local-ref-url-resolving logic.

ResolveURLUsingLocalRef is designed to be internally used by nsSVGEffects::Get-{SVGEffect}-URI functions.
Since we also need it in SVGUseElement::LookupHref, make it public in nsSVGEffects.

* Part 3. Resolve local-ref in SVGUseElement::LookupHref by nsSVGEffects::GetBaseURLForLocalRef.

* Part 4. Reftest for using local-ref as xlink:href value.
2019-02-16 00:12:35 +08:00
janekptacijarabaci dee826b7ee Bug 1329032 - Extend loadURIWithOptions by a triggeringPrincipal (without an hard e10s) 2019-02-15 23:54:30 +08:00
janekptacijarabaci 409656556b Bug 1182569 - Skip security check for plugins using newstream attribute 2019-02-15 23:54:23 +08:00
janekptacijarabaci e8dbb561f6 moebius#161: The Performance Resource Timing (make timestamps be relative to startTime)
https://github.com/MoonchildProductions/moebius/pull/161
2019-02-15 23:53:43 +08:00
janekptacijarabaci ca1f03fbae Revert "Bug 1182569 - Skip security check for plugins using newstream attribute"
This reverts commit 5b0f4649b3fee771379af60ec04d43b8a525cf80.
2019-02-15 23:49:42 +08:00
janekptacijarabaci 0337202a47 Bug 1182569 - Skip security check for plugins using newstream attribute
native in moebius
2019-02-15 23:49:32 +08:00