1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00
Commit Graph

22 Commits

Author SHA1 Message Date
Moonchild 2f20100059 Issue #3011 - Part 1: Add As{Text|Html}Editor() and AsEditorBase()
This adds helper functions to get specific types of content editors (if
possible) through the nsIEditor interface, as opposed to doing manual
casting and the ad hoc `GetHTMLEditor()` function.

Helper functions are spread out over multiple headers due to the
circular dependency issues that would be triggered otherwise.
2026-03-25 07:18:47 +08:00
Andy 4cc014cb6b Unprefix -moz-read-write / -moz-read-only 2025-07-04 22:27:22 +08:00
Moonchild c3f1c0cdba Issue #2721 - Remove nsILinkHandler.
This interface inly has a single implementation behind it, which is also
only used in 2 places after the previous commit. That's a lot of
additional complexity and compiler indirection for no good reason.
This change removes the interface and uses direct nsDocShell::Cast calls
instead of going through the interface in the few places left now that
we no longer build on a presentation context for links.
2025-06-17 09:25:00 +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 139e7a7ac6 Issue #2678 - Remove NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED
This no longer does anything at this point, except add indirection.
2025-01-20 21:12:18 +08:00
FranklinDM f0116f51db Issue #2488 - Part 6: Define and declare CSSStyleSheet cast functions directly in StyleSheet
This renames AsGecko calls to AsConcrete and removes the header containing leftover Stylo macros.
2024-04-02 22:52:28 +08:00
FranklinDM a93a7bed47 Issue #2112 - Part 5: Remove Servo from forwarding code used by magic pointer classes 2024-04-02 22:41:34 +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
Moonchild 1392f5f223 Issue #2019 - Do not dispatch keypress event for non-printable keys.
This will prevent the keypress DOM event from firing on keypresses
that do not produce printable keys (e.g. editing nav keys) in content.
This should not affect any chrome events that are in use.
Event dispatch can be re-enabled if necessary with the added pref.
2022-10-27 08:57:42 +08:00
Gaming4JC ec1301a85d Issue #1621 - Part 3: Use nsIAtom to change attirbute if possible.
We can replace old nsIEditor API with nsIAtom version.

Ref: Bug 1324996
2020-08-06 10:23:45 +08:00
Gaming4JC b6b2792a35 Issue #1621 - Part 2: Implement nsIAtom version of SetAttribute/RemoveAttribute/CloneAttirubte.
Add nsIAtom version of the following.
 - CloneAttribute
 - RemoveAttribute
 - RemoveAttributeOrEquivalent
 - SetAttribute
 - SetAttributeOrEquivalent

Ref: Bug 1324996
2020-08-06 10:23:43 +08:00
Gaming4JC 5260565a09 Issue #1621 - Part 1: CSSEditUtils should use atom for CSS property if possible.
There is a lot of string compare when using CSS property name. We should use nsGkAtoms instead.

Ref: Bug 1323138
2020-08-06 10:23:41 +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 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 4e14355697 Bug 1372829 - Part 2: mozilla::EditorBase should cache raw pointer of nsISelectionController and nsIDocument with nsWeakPtr
Tag #1375
2020-04-18 07:04:22 +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 32e4ad01e3 Bug 1337698 - Use UniquePtr instead of nsAutoPtr in editor
* PlaceholderTransaction should use UniquePtr
* HTMLEditor should use UniquePtr
* TypeInState should use UniquePtr

Tag #1375
2020-04-18 07:04:07 +08:00
Matt A. Tobin 9d8343e19c Bug 1367683 - Optimize initializing nsRange
Tag #1375
2020-04-18 07:04:01 +08:00
wolfbeast 92f7e0e48e Issue #1512 - Improve handling of multiple selections.
IsSelectionEditable should check whether the focus node and anchor node
aren't null before trying to use them.
This also changes the initialization of selections' aOutIndex to the
last range in the selection as a fallback in case we don't add a range
later (in AddItem) which could also end up with a null selection
otherwise if the additional selection nodes are removed.
2020-04-18 07:01:23 +08:00
wolfbeast 550c8977c1 Issue #12 Part 2: Stop using nsIDOMEvent in IsAcceptableInputEvent. 2019-02-16 00:05:40 +08:00
roytam1 dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00