Commit Graph

63 Commits

Author SHA1 Message Date
Brian Smith 5b068f3726 Issue #2402 - CSP Violation events should have the correct sample for inline contexts. https://bugzilla.mozilla.org/show_bug.cgi?id=1473587 Add preference to increase max length of CSP report source sample. https://bugzilla.mozilla.org/show_bug.cgi?id=1415352 Return valid columnNumber value in CSP violation events. https://bugzilla.mozilla.org/show_bug.cgi?id=1418246 2024-01-11 09:50:12 +08:00
Moonchild dc253ce953 Issue #2362 - Fix click handling according to the spec.
This removes some hackery surrounding preventing content clicks, and in
general handles auxclick as it should, firing that event on secondary
buttons (wheel/right on default setup for right-handed mouse).
2023-12-06 14:50:08 +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 e65a864a3e Issue #2135 - Bug 1393806/Part 1: Change nsNodeUtils cloning/adopting stuff to use an ErrorResult for errors
This will allow us to propagate out more informative errors in some cases.
2023-03-06 16:23:51 +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
Moonchild 8831656c85 Issue #1959 - Don't apply CSPs to explicit data documents and images.
This resolves #1959
2022-07-15 08:50:41 +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 15feed4c00 Issue #1689 - Part 4: Add a preference for {Document,Element}.getAnimations()
This is probably the last thing we will ship (if ever) since it needs the most
spec and implementation work for arbitrary use that is pretty far into a corner.
2021-01-21 14:31:23 +08:00
Moonchild d9693c298c Issue #1689 - Part 2: Add a preference for implicit keyframes
This preference controls whether authors are allowed to specify animations
without a 0% or 100% keyframe.

We intend to ship this but it isn't implemented yet (needs a follow-up) but this
preference acts as a safeguard in case we discover we need to disable it once
it's implemented.
2021-01-21 14:31:20 +08:00
Moonchild ad1e2abea1 Issue #1689 - Part 1: Add pref for DOM Animation timelines API
Default false, no intent to ship for web content. Always enabled for Chrome.
2021-01-21 14:31:18 +08:00
Moonchild 21f707390d Issue #1705 - Part 3: Rename ScrollbarStyles to ScrollStyles.
ScrollbarStyles contains values of overflow, (over)scroll-behavior, etc.
The only one which is marginally related to scroll _bars_ is overflow, which can
be used to hide scrollbar (by making an element not scrollable) or enforce the
scrollbar to display.

It makes more sense to be called ScrollStyles as it's mainly concerning behavior
of scrolling, not scrollbars. Also, with the addition of scrollbar width
properties, the current name can be confusing.
2021-01-14 22:19:53 +08:00
Moonchild 317b96a1be Issue #1643 - Follow-up: Ensure we properly clear our pointers when the
Presentation of a document is destroyed.
2020-10-23 10:05:48 +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 78bcb176ea Issue #1655: Update MediaQueryList to the current draft spec.
This make MediaQueryList inherit from EventTarget and adds MediaQueryListEvent
as an interface as well as the onchange() method.
This should not affect compatibility with other code; the event object is a
MediaQueryListEvent instance, which is recognized as a MediaListQuery instance.
2020-09-25 22:04:07 +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 693a79ca08 Bug 1429656 - Implement ShadowRoot.activeElement
Tag #1375
2020-06-20 06:43:49 +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 15f6d2efda Bug 1355787 - nsIdentifierMapEntry should let one to use either strings or atoms as keys to avoid slow string assignments when possible.
Tag #1375
2020-06-20 06:43:45 +08:00
Matt A. Tobin ca48752304 Issue #1375 - Fix IsWebComponentsEnabled checks 2020-04-18 07:07:00 +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 2ee3ce62fc Bug 1412775 - Implement Event.composedPath
Tag #1375
2020-04-18 07:06:15 +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
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 5d444ef68a Bug 1332353 - Make it clearer when a stylesheet is really owned by its mDocument
Tag #1375
2020-04-18 07:04:19 +08:00
Matt A. Tobin 9d8343e19c Bug 1367683 - Optimize initializing nsRange
Tag #1375
2020-04-18 07:04:01 +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 cb2b45e472 Bug 1305458 - Changing -moz-appearence on hover breaks change event
* Rename nsIDOMEventTarget::PreHandleEvent to nsIDOMEventTarget::GetEventTargetParent
* Add nsIDOMEventTarget::PreHandleEvent
* Add EventTargetChainItem::GetFirstEventTarget
* Call EventTargetChainItem::PreHandleEvent even it sets mCanHandle=false
* Move form control frame focus/blur from nsGenericHTMLFormElement::GetEventTargetParent to PreHandleEvent
* Move fire change event from HTMLTextAreaElement::GetEventTargetParent to PreHandleEvent
* Refine nsXULElement::GetEventTargetParent
* Move dispatch XUL command from nsXULElement::GetEventTargetParent to PreHandleEvent
* Move fire events and set value from HTMLInputElement::GetEventTargetParent to PreHandleEvent
* Add test case
* Let HTMLInputElement delegate event handling to it's parent class
* Refine EventTargetChain flags to reduce overheads
* Refine event target chain creation
* Refine assertion in EventTargetChainItem::Create

Tag #1375
2020-04-18 07:02:44 +08:00
Matt A. Tobin 146d0aa2d2 Issue #1395 - Remove FlyWeb Service 2020-02-08 07:11:37 +08:00
Gaming4JC fb6f6ec903 Bug 1405821 - Move microtask handling to CycleCollectedJSContext
Tag UXP Issue #1344
2020-01-31 07:40:36 +08:00
Gaming4JC 5db13d0f4b Bug 1415761 - Catch the exception and rethrow it after invoking custom elements reactions;
The spec was unclear on how CEReactions interact with thrown exceptions; see https://github.com/whatwg/html/issues/3217. The spec is now being clarified in https://github.com/whatwg/html/pull/3235.

Tag UXP Issue #1344
2020-01-31 07:40:30 +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 7ce1742985 Bug 1392970 - Part 1: Make CustomElementDefinition ref-counted and put it in CustomElementData.
Tag UXP Issue #1344
2020-01-31 07:37:25 +08:00
Gaming4JC 054c852fd2 Bug 1301024 - Part 1: Set CreateElement/CreateElementNS is attribute.
Tag UXP Issue #1344
2020-01-31 07:37:20 +08:00
Gaming4JC b2e0ae6983 Bug 1299363 - Part 5-1: Make the constructor created by document.registerElement() also works with construction stack.
So that the old upgrade can also work with new upgrade steps which will be implemented in part 5-2.

Tag UXP Issue #1344
2020-01-31 07:36:57 +08:00
Gaming4JC cca692c240 Creating customized built-in elements without relevant definitions registered first shouldn't throw NotFoundError;
per spec change: https://github.com/w3c/webcomponents/issues/608

Tag UXP Issue #1344
2020-01-31 07:36:05 +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
Gaming4JC cc71e21e02 Bug 1309147 - Part 4: Add CEReactions for CustomElementRegistry.
Tag UXP Issue #1344
2020-01-31 07:35:47 +08:00
Gaming4JC e8e20e994d Bug 1276438 part 3. Align the .body setter with the spec a bit better.
There are two changes here:

1) We allow setting .body even if the root element is not an <html:html>. This is what the spec says to do, and what we used to do before the changes in bug
366200. No tests for this yet, pending https://github.com/whatwg/html/issues/3403 getting resolved.

2) We use GetBody(), not GetBodyElement(), to look for an existing thing to replace. This matters if there are <frameset>s involved.

Tag UXP Issue #1344
Tag UXP Issue #252
2020-01-31 07:34:59 +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 10e59cb5a9 Issue #1118 - Part 7: Remove no-longer-used mWillReparent debug code. 2019-12-28 21:20:06 +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
wolfbeast 39cc10dde8 Update identifier map entries and notify if they get removed.
This can happen through DestroyElementMaps()
Based on work by Markus Stange and Edgar Chen.
2019-12-06 22:46:47 +08:00