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.
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).
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.
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.
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.
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.
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
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
* 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.
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.
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.
* 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
This is based on Bug 1395828
* Add nsHTMLElement::IsBlock()
* Rename nsHTMLTags methods
* Remove AssertParserServiceIsCorrect()
* Remove most uses of nsIParserService/nsParserService
* 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
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.
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