1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-06-25 17:59:34 +00:00
Commit Graph

140 Commits

Author SHA1 Message Date
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 bc12e05bd3 Issue #1592 - Part 10: Slot elements should restyle their parent on attribute changes 2023-03-24 09:13:16 +08:00
FranklinDM 7b395189ac Issue #2135 - Bug 1518795: Properly track responsive content in a connected ShadowRoot 2023-03-06 16:17:59 +08:00
FranklinDM 588c2154a5 Issue #2135 - Bug 1410578: Make <link rel="stylesheet"> work in shadow trees 2023-03-06 16:17:01 +08:00
FranklinDM 010db07bf3 Issue #2135 - Bug 1066965: Make contentEditable and spellchecking to work in Shadow DOM 2023-03-06 16:16:21 +08:00
FranklinDM 1185cfe3f0 Issue #2135 - Bug 1323815: FocusEvent.relatedTarget should work consistently with MouseEvent.relatedTarget
* This incorporates changes from Bug 1413102.
2023-03-06 16:15:09 +08:00
FranklinDM e286eb8adb Issue #2135 - Bug 1430305: Implement ShadowRoot.fullscreenElement 2023-03-06 16:14:14 +08:00
Martok 4354c7a1bc Issue #2030 - Allow child nodes of button to participate in mouse hit tests
This is needed for web compatibility, even if standards compliance is debatable.
2022-12-02 23:55:57 +08:00
Moonchild 95120acbb2 [DOM security] Be more explicit about CSP checks and reports. 2022-09-22 10:18:33 +08:00
Moonchild 142f08ce1f Issue #1720 - Follow-up: Explicitly include X11UndefineNone.h in HTMLOptGroupElement.cpp to fix unified building on X11 2022-09-07 11:02:14 +08:00
Moonchild 5dfded811d Issue #80 - reinstated unified building for some large chunks of our code.
This should reduce compile complexity saving time and reducing linker stress.
2022-09-07 10:36:23 +08:00
Brian Smith 13fcc4a046 Issue #1829 - Revert "Issue #1751" 2022-05-04 09:40:24 +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
Moonchild 8d800b1cb0 Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and
additional js module changes (next part).
2022-04-28 10:25:48 +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 0f56697eb9 Issue #3049 - Undo Stylo nonsense that breaks body and frame margins.
This restores support for using HTML tag styling of margins on the body.
Reftests post bug still pass for dynamic changes, so does the newly-added
test for body margins and frames that tests the old styling method.
This also removes the reftest list for stylo testing for obvious reasons.
2022-03-22 23:05:06 +08:00
Moonchild d1d00498ae [DOM/NPAPI] Defer loading object when setting attribute. 2021-08-12 11:21:26 +08:00
Moonchild a4b0f333ba Issue #1751 -- Remove XP_MACOSX conditionals from the rest of the tree.
This also removes some PP abuse and takes file entries out of PP when no longer
needed without XP_MACOSX conditionals.
2021-05-07 09:53:59 +08:00
Moonchild d29e4f8306 Issue #1751 -- Remove XP_MACOSX conditionals from /dom 2021-05-05 10:26:13 +08:00
Moonchild 7e02267fd3 [DOM] Add missing IDL definitions for CSP .nonce attributes.
Apparently Mozilla completely spaced out on this when adding the CSP nonce
mechanism, potentially causing web compat issues if scripting relies on
being able to get/set nonces through DOM and/or causing CSP policy check
issues if websites try to "hide" nonces.
2021-04-20 09:05:20 +08:00
athenian200 618fa768c8 Issue #1757 - Reinstate "dom.details_element.enabled" preference
The removal of this preference was botched, all other surrounding plumbing changes appear to be working okay. The ability to use prefs to control this stylesheet might be useful in the future, so perhaps this is one of those "if it ain't broke, don't fix it" bugs where leaving well enough alone in the first place would have been the best choice.
2021-04-02 10:33:54 +08:00
Moonchild 348c6604be Issue #1053 - Remove MOZ_WIDGET_ANDROID and IDB_MOBILE 2021-03-12 08:59:50 +08:00
Moonchild 8a55eab0f0 [DOM] Don't reveal error details for CORS-cross-origin decoding errors. 2021-02-25 09:26:41 +08:00
Moonchild d867f26c0e [widget] Require user interaction when picking files or folders v2
Now with extra sauce to make it work cross-platform and cross-versions and
for HTML input elements only.
2021-02-25 09:25:17 +08:00
trav90 a0aabcdaba Issue #1723 - Fix Linux build bustage in HTMLMenuItemElement.cpp 2021-02-03 10:04:42 +08:00
Moonchild a828a5f321 Issue #1719 - Make <menuitem> pref-controlled and disable by default.
Resolves #1719
2021-01-27 21:01:54 +08:00
Moonchild 0cd673d720 Issue #1656 - Part 6: Clean up the build files 2020-09-25 22:04:23 +08:00
Moonchild ed7e49eda6 Issue #1656 - Part 2: Unmangle some unfortunate UTF-8 victims.
The poor fellows got lost in an ASCII-interpretation of the world.
2020-09-25 22:04:14 +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 f5f9c8c597 Issue #1224 - Remove constant expressions from /dom
This excludes DOMProxy handlers in dom bindings because that's intertwined with
codegen and js that needs to be handled together.
2020-09-18 20:53:42 +08:00
Moonchild ef11a4d7e8 Issue #618 - Clear the module map when changing a Document's global and add
release build assertions for mismatching compartments.
2020-09-10 21:07:51 +08:00
Moonchild 209eb0a245 [media] Only include source error details in debugging scenarios.
Unless a user is debugging media errors, this detail is unnecessary to report
and could include sensitive data which could be abused by third-party
requesters. This aligns it with the standard success/error paradigms in normal
browsing situations.
2020-08-29 08:11:13 +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
athenian200 c1b3280e01 Fix nits 2020-08-19 16:21:24 +08:00
athenian200 42d14af9a3 Issue #1629 - Part 3: Implement behind preference.
This is not very "clean," and is mostly done in the same sloppy way as Emilio did it because that's basically the only way you can do it. Note well that this does NOT actually turn off everything I've done in a clean fashion like ifdefs would. For instance, the Explicitly Enabled flag is still present, but is now always false because the only condition that can set it true is behind the pref and therefore inert when this pref is off. Also, because the arguments of SetDisabled have changed, my modifications to SetMozDisabled must be present regardless of whether the pref is on or off. What I have done is turn off the actual reflection of the disabled attribute in Disabled and SetDisabled, as well as in AfterSetAttr.

However, turning the pref off seems to restore more or less our old behavior, though there may be subtle differences unlike with an ifdef since this is, unfortunately, not an exact science and I can only turn off changes that happen within individual functions and not changes in how functions interact with each other.
2020-08-19 16:21:22 +08:00
athenian200 6835425e20 Issue #1629 - Part 2: Implement the Explicitly Enabled flag.
This part of the bug was significantly complicated by the following major refactors:

https://bugzilla.mozilla.org/show_bug.cgi?id=1456435
https://bugzilla.mozilla.org/show_bug.cgi?id=1459498

As best as I can tell, we just need to implement the explicitly enabled
flag on every instance of GetStyleSheetInfo, make sure
aIsExplicitlyEnabled is false in every situation except the one where
the disabled content attribute is removed from a link element, and
enable alternate stylesheets if this flag is set on them. So we take the
explicitly enabled flag as an input to PrepareSheet, and also add it to
LoadStyleLink and LoadInlineStyle. I also decided not to defer loading of
alternate stylesheets that have been explicitly enabled.
2020-08-19 16:21:19 +08:00
athenian200 4e15e4c252 Issue #1629 - Part 1: Implement basic logic in HTMLLinkElement.
So basically, I'm trying to adapt this to UXP:

https://bugzilla.mozilla.org/show_bug.cgi?id=1281135

The earliest source of difficulty while adapting Bug 1281135 to our codebase was simply getting the new ErrorResult flag added to the SetDisabled function to play nice with the SetMozDisabled function. At this point, the implementation can actually have a stylesheet be disabled by default but there are supposedly issues with alternate stylesheets.

At first I played around with the return type of SetMozDisabled to no avail, but I found another solution fairly quickly.

https://bugzilla.mozilla.org/show_bug.cgi?id=846972
https://bugzilla.mozilla.org/show_bug.cgi?id=1157898

Essentially, the way around the problem of the number of return arguments not matching up is to declare a local variable within SetMozDisabled called ErrorResult rv, and using that to store the return value of the ErrorResult argument from SetDisabled. After that, because ErrorCode was removed, you would return rv.StealNSResult() in order to report success or failure to any consumer that calls on SetMozDisabled.
2020-08-19 16:21:17 +08:00
Andy 9f48a59946 Issue #1620 - Enable Intrinsic Ratio by Default
A simpler name feels so much cleaner.
2020-08-14 08:59:37 +08:00
Andy c02e424911 Issue #1620 - Remove Development Comments 2020-08-14 08:59:35 +08:00
Andy be1f68f39e Issue #1620 - Use Intrinsic Aspect Ratio for Images
https://bugzilla.mozilla.org/show_bug.cgi?id=1547231
https://bugzilla.mozilla.org/show_bug.cgi?id=1559094
https://bugzilla.mozilla.org/show_bug.cgi?id=1633434
https://bugzilla.mozilla.org/show_bug.cgi?id=1565690
https://bugzilla.mozilla.org/show_bug.cgi?id=1602047

Make use of Aspect Ratios in Image frames before Images are loaded.
- Check for width and height HTML properties and create a ratio with them.
- Overwrite HTML size values with actual image dimensions on load.
- Collapse any frames with srcless images.

Comments:
dom/html/nsGenericHTMLElement.cpp:1483
layout/generic/nsImageFrame.cpp:289
2020-08-14 08:59:33 +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 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
athenian200 f6b3f2c38b Issue #1557 - Allow event dispatch on disabled form controls.
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=329509

This seems to resolve #1356 without causing #1557.

Also reverts previous changes as they no longer appear to serve a purpose.
2020-05-23 06:56:44 +08:00
Moonchild db14a637c4 Issue #1543 - Align <img> with no src to the updated spec. 2020-05-16 06:49:14 +08:00
wolfbeast 9b1967f0c3 Issue #80 - De-unify dom/html 2020-05-02 08:23:26 +08:00
Matt A. Tobin a6f048fc42 Bug 1360154 - nsIPlaintextEditor might have to have hasText property for UpdateOverlayTextVisibility
* DocumentIsBody should return bool, not nsresult
* Add fast path to check whether valus is emtpy

Tag #1375
2020-04-18 07:06:55 +08:00
Matt A. Tobin af22b5cba5 Bug 1409976 - Add slotchange event
* Add support for `slotchange` event
* Signal `slotchange` when slot's assigned nodes changes

Tag #1375
2020-04-18 07:06:25 +08:00