Commit graph

4,971 commits

Author SHA1 Message Date
Martok
e81a8d866d Issue #1285 - implement named capturing groups and named backrefs
- RegExpParser collects seen groups in named_captures_.
- After irregexp::ParsePattern has finished, RegExpParser::StoreNamedCaptureMap translates
  the parser data to RegExpCompileData.capture_name/index
- RegExpShared::initializeNamedCaptures takes these and builds a PlainObject map which
  is kept with the compiled expression
This is done because irregexp doesn't have access to the JS context and so can't allocate
any JSValues itself.
- for each match result, this map is used to build PlainObjects of name->match/undefined
  (extremely simplified from upstream at the expense of some perf)

IonMonkey switches to non-masm code path for expressions with named groups.
2022-12-24 08:09:39 +08:00
Martok
05a8a5271c No issue - Refactor parsing of unicode escapes to be more general 2022-12-24 08:09:37 +08:00
Martok
952f2273b6 No issue - Fix VectorMatchPairs allocating more memory than required 2022-12-24 08:09:33 +08:00
Martok
199ff12ba8 No issue - Flag to parse 'v' flag as 'u' for automated tests, disabled by default 2022-12-24 08:09:25 +08:00
Martok
85cb46096a No issue - refactor base classes for easier access
- move InfallibleVector into its own header, together with common typedefs
- refactor CapturesVector
2022-12-24 08:09:22 +08:00
Martok
5555a72d8e Issue #2056 - Fix handling of captures in lookbehinds
- Port unification of CheckNotBackReference*
- Port LoadCurrentCharacter
- Make RegExpMacroAssembler::CheckAtStart understand cp_offset
- Replace magic numbers in ChoiceNode::Emit, Trace::PerformDeferredActions
- CheckBacktrackStackLimit
- Allow backrefs to resist recursion
2022-12-24 08:09:18 +08:00
Moonchild
4db6fa8360 Issue #1279 - Implement regular expressions lookbehind (v3)
Based on d10e8a5b with the addition of chromium issue 570241.
2022-12-24 08:09:04 +08:00
Moonchild
f54f007d47 [network] Align cookie checks with RFC 6265 (bis) 2022-12-16 11:25:15 +08:00
Moonchild
a876dc7420 [libjar] Add some extra sanity checks to our Zip reader. 2022-12-16 11:24:45 +08:00
Moonchild
6a1e540412 [network] move some generic websocket code to the baseclass 2022-12-16 11:24:17 +08:00
Brian Smith
af3667d715 No issue - Fix packaging Epyrus on FreeBSD and Solaris. The TwemojiMozilla.ttf font should be bundled on Windows and any GTK platforms. We should not limit the GTK platform to Linux only. 2022-12-16 11:23:48 +08:00
Brian Smith
7354cde3ee No Issue - Fix building ldap on MacOS. Discovered this problem building Epyrus on MacOS, based on this Mozilla Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1652906 2022-12-02 23:57:13 +08:00
Brian Smith
e10eeed772 Issue #2022 Follow-Up - Add autorelease to our manual NSView to prevent potential leaks. Also move titlebar overrides from BaseWindow to ToolbarWindow... This caused problems in Waterfox Classic on Ventura, while this didn't seem to be necessary in UXP... There is no need for those overrides in BaseWindow, so why risk potential problems. https://bugzilla.mozilla.org/show_bug.cgi?id=1576387 d7f5814dc0 2022-12-02 23:56:58 +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
Martok
3f073056de Issue #2030 - Pref-gate default button event dispatch logic 2022-12-02 23:56:21 +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
Martok
4d310562d9 Issue #2030 - (chore) refactor event dispatch functions
Based on selected bits of M-C 1461708:
- EventStateManager::CheckForAndDispatchClick() to early-return style
- split EventStateManager::CheckForAndDispatchClick() into:
  EventCausesClickEvents, PostHandleMouseUp, DispatchClickEvents
- Move implementation of UIEvent::GetRangeParent() and UIEvent::RangeOffset() to nsLayoutUtils
2022-12-02 23:55:37 +08:00
FranklinDM
6d6d149b6f Issue #2036 - Prevent GTK color picker from being frozen when launched from a modal XUL window
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1496836
2022-12-02 23:55:12 +08:00
Moonchild
f35ae1ce7b Issue #2019 - Follow-up: Make nsPluginInstanceOwner also listen to keypress events in the system event group.
nsPluginInstanceOwner only listens to keypress events in the default event group.
However, in our changed operating mode, keypress events are not fired in the
default event group if the key does not result in something printable.
This means that nsPluginInstanceOwner should also listen to keypress events
in the system event group and should handle each keypress that way, but
only once. I.e., if a printable keypress event is received in the system event
group, it should be ignored, since it would've already been handled in the
default event group in that case.
2022-11-25 11:45:41 +08:00
FranklinDM
bbd05cb4c8 Issue #2029 - Part 2: Protocol handling dialog should be dependent if not modal
Following the behavior of the download dialog, the content handling dialog should be `dependent` as well. This means that this dialog should close when the parent window is closed, is not visible on the taskbar, and stays in front of the parent window.
2022-11-25 11:45:12 +08:00
FranklinDM
36ddeff63c Issue #2029 - Part 1: Add preference for opening the protocol handling dialog as window modal
This adds the preference, `prompts.content_handling_dialog_modal.enabled`, to control whether the dialog is window modal or not.
2022-11-25 11:44:58 +08:00
FranklinDM
eb0c06101f Issue #2027 - Use reserved stack space instead of heap allocation in nsLocalFile
This should resolve the build bustage associated with c127f58ef3.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1371279
2022-11-25 11:44:36 +08:00
Moonchild
dc04d9f795 [XPCOM] Deal with lstat potentially lying in nsLocalFileUnix. 2022-11-25 11:44:00 +08:00
Moonchild
6408291d76 [network] Fix Mac buffer overflow. 2022-11-25 11:43:19 +08:00
Moonchild
7fab5ebd11 WebSocketChannel::CleanupConnection should run on the socket thread 2022-11-25 11:42:30 +08:00
Moonchild
37f0199c79 [Network, DOM] Align our implementation with the current CORS/Fetch spec. 2022-11-25 11:41:52 +08:00
Moonchild
bf19c2087b Update timezone data to 2022e 2022-11-10 14:55:09 +08:00
Moonchild
0a079c2b90 Issue #2024 - Part 2: Add wildcard to Access-Control-Allow-{Method|Headers}
For requests without credentials, add wildcard to Access-Control-Allow-Headers
and Access-Control-Allow-Method.

Resolves #2024
2022-11-10 14:54:54 +08:00
Moonchild
211b7cf219 Issue #2024 - Part 1: Add wildcard to Access-Control-Expose-Headers
For requests without credentials, add wildcard to Access-Control-Expose-Headers.
2022-11-10 14:54:33 +08:00
Moonchild
2f0acd868e [WebGL] Implement webgl.max-size-per-texture-mib 2022-10-27 09:04:31 +08:00
Moonchild
3fccd404fb [XPCOM] Fix Base64 off-by-one issue and safeguard against this mistake in the future. 2022-10-27 09:03:59 +08:00
Moonchild
e69b52eac1 Hold some strong references on nsRefreshDriver 2022-10-27 09:03:27 +08:00
athenian200
8b8084f661 Issue #1824 - Remove dependency on libdemangle.
This may be removed from illumos soon, and it is apparently unused anyway, so leaving it in doesn't make sense.
2022-10-27 09:03:10 +08:00
Brian Smith
70727d0a0b Issue #2022 - Part 2 - Add Ventura version detection. Also add Monterey and Ventura to the graphics driver blocklist. 2022-10-27 09:02:53 +08:00
Brian Smith
069b11c14c Issue #2022 - Part 1 - Fix transparent windows on MacOS 13 Ventura. During the BaseWindow creation contenView is nil on Ventura... So create a NSView with the requested dimensions and set is as the contenView. 2022-10-27 08:59:37 +08:00
Moonchild
2e944692c3 Issue #21 - Remove panning/tab animation performance measurements
Based on FranklinDM's follow-up for the issue.

This would require browser FE changes, particularly removing the associated
code in `tabbrowser.xml`, however, that was already done in Pale Moon previously.
Other front-end applications may need to take note, though.

Based on changes from the following bugs:
* Bug 696398 - Need an api to analyze panning performance
* Bug 800031 - Include paint time in tab switch telemetry
* Bug 820167 - Enable performance measurement of tab animation
* Bug 826383 - Improve Start/Stop FrameTimeRecording for telemetry usage
2022-10-27 08:59:25 +08:00
FranklinDM
1ae5f60a1b Issue #1793 - Follow-up: Fix incorrect media query 2022-10-27 08:59:01 +08:00
FranklinDM
1a55f18324 Issue #58 - Remove leftover rust build files from /js 2022-10-27 08:58:50 +08:00
FranklinDM
d023830727 Issue #1829 - Follow-up: Mac-specific shortcut key for closing the developer tools toolbox window should not be excluded from other platforms 2022-10-27 08:58:38 +08:00
Basilisk-Dev
9277c9418d Issue #1375 - Don't mark nodes in the shadow tree as orphan nodes
Port of Bug 1026714
2022-10-27 08:58:24 +08:00
Moonchild
808332c2c1 Issue #2019 - Follow-up: Make autocomplete and satchel listen to keypress events in the system event group
The autocomplete module listens to keypress events for both printable keys
and non-printable keys a lot. However, we're stopping dispatching keypress
events for non-printable keys in the default event group of web content.

This means that autocomplete should listen to keypress events in the
system event group.

Note that it's difficult to globally change keypress event listeners to
keydown event listeners because if we stop keypress events at preceding
keydown event in autocomplete or satchel modules, some other modules
fail to handle keydown or keypress events before autocomplete, and it's
not easy to investigate which keypress event listener in which modules
should be changed to a keydown event listener.

Therefore, this patch doesn't do that, and uses the event group approach.
2022-10-27 08:58:11 +08:00
Moonchild
5699d9673f Issue #2019 - Follow-up: Adjust content spellchecker to use keydown
Since keypress is no longer triggered on all keypresses in content,
the spellchecker would potentially not be triggered when it should be.
This changes the trigger to keydown, instead.
No behavioral changes otherwise.
2022-10-27 08:57:55 +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
Moonchild
2f0896ab31 Issue #1279 - Implement regular expressions lookbehind (v2)
Because of some additional changes in the JS engine in the meantime,
this implementation should work and not crash due to slot allocation.
2022-10-13 10:40:14 +08:00
Moonchild
d32162089d Issue #2016 - Remove non-functional V8 regex import 2022-10-12 17:21:14 +08:00
Job Bautista
d367067698 Issue #1375 - Use nsIAtom* instead of nsAtom* for CE Upgrade function.
We haven't refactored nsIAtom* as Mozilla did yet.
2022-10-12 17:20:51 +08:00
Job Bautista
bc36c607a9 Issue #1375 - Implement customElements.upgrade.
Backported from Mozilla bug 1443722.
2022-10-12 17:20:32 +08:00
Moonchild
3ea1f776a9 [Pale-Moon] Use native mode for Zoho 2022-10-06 10:29:41 +08:00
Moonchild
a46b413b76 [Pale-Moon] Add SSUAO for Facebook (because compatmode 102 breaks their JS) 2022-10-06 10:29:05 +08:00
Basilisk-Dev
062b2c255f [Basilisk] Add SSUAO for Facebook 2022-10-06 10:28:14 +08:00