Commit graph

5,239 commits

Author SHA1 Message Date
Job Bautista
f284afab44 [Pale-Moon] Issue MoonchildProductions/UXP#2165 - Support ICU as shared library in packaging.
Also removing obsolete MOZ_SYSTEM_ICU
2023-03-28 12:19:51 +08:00
Matt A. Tobin
d7a1209581 [Pale-Moon] Issue MoonchildProductions/UXP#61 - Add gkmedias back to package-manifest 2023-03-28 12:17:12 +08:00
Matt A. Tobin
e6ed122e1a [Basilisk] Issue MoonchildProductions/UXP#61 - Add gkmedias to package-manifest 2023-03-28 12:16:27 +08:00
Job Bautista
66eaa872f8 Issue #62 - Always build Spidermonkey as shared lib in Windows.
Shared JS is confirmed working fine in Windows after a week of testing.
Non-Windows will have to wait unfortunately. The JS_SHARED_LIBRARY option is
kept for easy testing on those unsupported platforms.
2023-03-28 12:13:54 +08:00
Job Bautista
f09b0002ee Issue #2165 - Disable LNK4217 and LNK4286 warnings when linking ICU as they're too spammy. 2023-03-28 12:13:34 +08:00
Job Bautista
9ff14017e5 Issue #324 - Follow-up: Remove more traces of *INTL_API.
The trace in Spidermonkey's old-configure is causing the MOZ_CONFIG_ICU function
to be called twice, which is not desirable as it can cause the MOZ_SHARED_ICU
check in build/autoconf/icu.m4 to fail and build an ICU data file even if we're
building ICU as a shared library.
2023-03-28 12:12:42 +08:00
Job Bautista
18e43fad29 Issue #2165 - Follow-up: Always build ICU as shared lib in Windows. 2023-03-28 12:12:21 +08:00
Job Bautista
bad884a7c7 Issue #2165 - Build ICU as a shared library if we're building Spidermonkey shared.
It seems that if we're going to enable JS_SHARED_LIBRARY, we need ICU to be a
shared library too in order to prevent code duplication in mozjs.dll bloating
it to a whopping 21 MB.
This unfortunately means we have to fold icudata back to icu itself. But since
icudata is still separated from libxul (which is what really matters for #1451),
I think this is a fair compromise.
Building ICU as shared is offered as an option via --enable-shared-icu. But
technically you really need --enable-shared-icu if you're going to use
--enable-shared-js. Unfortunately I can't make configure exit with an error if
MOZ_SHARED_ICU is not defined when JS_SHARED_LIBRARY is enabled, because options
are controlled by different configure scripts (icu is based on bash, while js is
based on python), and I have no idea how to pass MOZ_SHARED_ICU to js's
moz.configure.

Tag #62
2023-03-28 12:11:00 +08:00
Job Bautista
ed30a96467 Issue #62 - Fix xul.dll link bustage related to JS::ubi::DominatorTree.
This is the one I don't understand how it fixed the bustage. Why is it needed
to remove JS_PUBLIC_API..? It would seem counter-intuitive, but it wasn't...
2023-03-28 12:10:02 +08:00
Job Bautista
6890cdd9a1 Issue #62 - Fix xul.dll link bustage relating to JSErrorNotes. 2023-03-28 12:09:42 +08:00
Job Bautista
2c8387f4fa Issue #62 - Fix xul.dll link bustage related to MovableCellHasher.
The unsafeSet method is based on Jon Coppeard's part 2 patch for Mozilla bug
1306008. This is needed because of the use of unsafeSet in rekey() of
MovableCellHasher<JS::Heap<T>>
2023-03-28 12:09:30 +08:00
Job Bautista
b171da18f9 Issue #62 - Get --enable-shared-js and --enable-export-js working again, and fix link bustage related to ICU when doing shared lib 2023-03-28 12:09:19 +08:00
Matt A. Tobin
6b510a74e7 Issue #61 - Add missing external symbols for gkmedias when WebRTC is built 2023-03-28 12:09:00 +08:00
Matt A. Tobin
c85f28b0c0 Issue #61 - Add missing external symbol cubeb_set_log_callback to gkmedias symbols.def 2023-03-28 12:08:38 +08:00
Matt A. Tobin
924bf92e4b Issue #61 - Add configure option for non-windows platforms
Windows will ALWAYS have this enabled but we eventually want all target operating systems to use this as well but that will require more work
2023-03-28 12:08:12 +08:00
Moonchild
6b3767c443 Issue #61 - Place Skia in libxul
Skia does some nasty things that break with DLL calls like having virtual dtors
without a body definition (and it's honestly surprising that it even builds to
begin with the way it's done, but apparently they use some linking symbol voodoo
to work around that in dependent classes).
Not wanting to have to pull Google code apart to try and fix that for something
we're only using for canvas anyway, it's better to just let Skia reside in
libxul instead.
2023-03-28 12:07:39 +08:00
Moonchild
371d7cf05d Issue #61 - Reinstate buildability with shared gkmedias dll
This fully works for splitting gkmedias.dll back out from xul with one exception
which is Skia throwing undefined externals when linking gkmedias.
2023-03-28 12:07:03 +08:00
Martok
2554a83d1d Issue #2155 - Add SwitchEmitter
Based-on: m-c 1456006/{0,1}
2023-03-28 09:29:39 +08:00
Martok
70e1654c3c Issue #2155 - Move TryEmitter and ForOfLoopControl to TryEmitter.{cpp.h} and ForOfLoopControl.{cpp.h}
Based-on: m-c 1460489/5
2023-03-28 09:29:18 +08:00
Martok
a8ac1cac3d Issue #2155 - Move NestableControl classes except ForOfLoopControl to BytecodeControlStructures.{cpp.h}
Based-on: m-c 1460489/3
2023-03-28 09:28:59 +08:00
Martok
81691afbc3 Issue #2155 - Split Nestable to ds/ and EmitterScope to EmitterScope.{cpp.h}
Based-on: m-c 1351107/17, m-c 1460489/2
2023-03-28 09:28:30 +08:00
Timothy Valldeperas
1788589caa Issue #2175 - Fix build bustage in WebRTC. 2023-03-28 09:28:05 +08:00
Moonchild
dd2697172e Issue #2176 - Don't reconstruct the parent when tearing down display:contents nodes with pseudo-elements.
We need to use StyleChildrenIterator which iterates over them, instead.
This is a bit of a hack but we can't always have our cake.

We need to be a bit careful though, since ::before and ::after are owned
by their own frame, and thus could be unbound from the tree or even dead
after removing the frame.

This basically ports bugs 1435566 and 1438467
2023-03-27 16:10:54 +08:00
FranklinDM
f169940742 Issue #2135 - Don't discard event state mask when matching ::slotted() or :host arguments
This should fix issues with selectors like :host(:hover) that continue to be matched although the cursor is no longer hovering over those elements.
2023-03-24 23:32:36 +08:00
Moonchild
078b1b73dc Issue #2161 - Ctrl + Enter should cause keypress event even though the key combination doesn't input any character
Currently, we dispatch keypress event when Enter is pressed without
modifiers or only with the Shift key (line break).
However, other browsers dispatch keypress events for Ctrl + Enter also
even if it doesn't cause any text input.

So, we should fire keypress events for Ctrl + Enter, even in strict
keypress dispatching mode. Note that with other modifiers, it depends on
the browser and/or platform and we can't dispatch the event for
consistent behavior.

This means web developers shouldn't rely one keypress events to catch
Alt + Enter, Meta + Enter and two or more modifiers + Enter.

Based on BZ 1438133
Resolves #2161
2023-03-24 09:13:51 +08:00
FranklinDM
b29522749a Issue #1592 - Follow-up: Don't post a restyle event if restyleElement is null
This fixes a potential crash caused if restyleElement is null.
2023-03-24 09:13:34 +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
9a071f3b7a Issue #1592 - Part 9: Post a restyle event after changing the slot of a slottable 2023-03-24 09:12:52 +08:00
FranklinDM
4cd0de04d0 Issue #1592 - Part 8: Test the assigned slot for type/class/ID/attribute instead of the slottable when matching ::slotted() 2023-03-24 09:12:35 +08:00
FranklinDM
19226fd560 Issue #1592 - Part 7: Slottables cannot be matched from the outer tree. 2023-03-24 09:12:15 +08:00
FranklinDM
91d2b6f4cf Issue #1592 - Part 6: Allow pseudo-classes with a forgiving selector list argument to follow pseudo-elements
Pseudo-classes with a forgiving selector list argument are allowed to follow a pseudo-element, but must treat any selector that is not of the same type as invalid. It doesn't make any sense, but that's the behavior of other tainted browsers.
2023-03-24 09:12:00 +08:00
FranklinDM
8d2533ad70 Issue #1592 - Part 5: Use flattened element tree when looking for a parent while matching ::slotted() 2023-03-24 09:11:26 +08:00
FranklinDM
518c41fd7a Issue #1592 - Part 4: Walk ::slotted()-containing rules for slottables
- Check against all selector parts and not the leftmost selector only for ::slotted()
- Walk rules for ::slotted() regardless if the shadow root is opened/closed
- Ensure that ::slotted() rules are walked in the right order
- Fix ::slotted inheritance from topmost shadow root
2023-03-24 09:11:07 +08:00
FranklinDM
92b31dd255 Issue #1592 - Part 3: Ensure only tree-abiding pseudo-elements will follow ::slotted() 2023-03-24 09:10:42 +08:00
FranklinDM
77ad970db6 Issue #1592 - Part 2: Parse ::slotted() pseudo-element as if it were a pseudo-class
- Block slot elements from being matched by ::slotted
- Ensure ::slotted() is serialized as a pseudo-element
- Add pref to control whether the pseudo-class is enabled
2023-03-24 09:07:36 +08:00
FranklinDM
ab63b7b946 Issue #1592 - Part 1c: Pass SelectorParsingFlags as a reference 2023-03-24 09:04:18 +08:00
FranklinDM
460e8db94c Issue #1592 - Part 1b: Move <slot> UA rule to html.css
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1468127
2023-03-24 09:03:58 +08:00
FranklinDM
0232bcdfa4 Issue #1592 - Part 1a: Prevent crashing if a slot element was selected via DOM Inspector 2023-03-24 09:03:42 +08:00
Moonchild
f09d2bba0f Issue #2171 - Skip over shadow nodes that don't have an owning node.
Resolves #2171
2023-03-23 09:03:06 +08:00
FranklinDM
7374ca6716 Issue #1593 - Follow-up: Fix :host matching from inside the shadow tree
Previously, we'd match :host despite the element having a different shadow root from the one that we currently have. Also, there's a test where :host should be blocked from matching if it is a descendant of an explicit universal selector.
2023-03-23 09:02:47 +08:00
Martok
fbb5f73459 Issue #2155 - Fix wrong assertion
(x) = function() {..} is an extremely sparsely documented way to prevent function name inference.
Modeled after how BytecodeEmitter::emitInitializer does it.
2023-03-23 09:02:31 +08:00
Martok
76c2030142 Issue #2155 - Fix debug build 2023-03-23 09:02:07 +08:00
Martok
5dc6be1bcb Issue #2155 - Remove now-unused functions 2023-03-23 09:01:35 +08:00
Martok
e88f946c01 Issue #2155 - Fix BytecodeEmitter::emitArguments for our ParseNode tree
This resolves the differences in storage of call arguments between Mozilla's and our ParseNode tree.
2023-03-23 09:01:19 +08:00
Martok
89e6820006 Issue #2155 - Add PropOpEmitter, ElemOpEmitter, NameOpEmitter, CallOrNewEmitter
Attn: this plain patch port still contains issues caused by differences in the
ParseNode tree that will be fixed in the following commits.

Based-on: m-c 1466000/{7-10}
2023-03-23 09:01:02 +08:00
Martok
a2fd8846b6 Issue #2155 - Refactor BytecodeEmitter in preparation for *Emitter work
This removed a bit of reduncancy and makes stack building easier to follow.

- Move call context handling from BytecodeEmitter::emitGetNameAtLocation to BytecodeEmitter::emitCalleeAndThis
- Add stack comments for prop and elem related methods in BytecodeEmitter
- Remove emitAtopOp with NameNode*
- Pass JSOp to BytecodeEmitter::emitAssignment (modified)
- Add BytecodeEmitter::emitGetFunctionThis variant with offset

Based-on: m-c 1466000/{2-6}
2023-03-23 09:00:45 +08:00
Martok
da05c050e3 Issue #2155 - Simplify BytecodeEmitter::isRestParameter 2023-03-23 09:00:25 +08:00
Martok
e8fee20566 Issue #2155 - Split TDZCheckCache, IfEmitter/InternalIfEmitter, JumpList from BytecodeEmitter 2023-03-23 09:00:10 +08:00
Moonchild
05d29a53db Issue #2117 - Follow-up: Run precomplete cmd during package staging
We rely on this for all OSes except Mac where precomplete should not
be in the root (it uses Mozilla's fallback packaging that places it in
$RESPATH)
2023-03-20 12:33:50 +08:00
Moonchild
fd5015faeb [GFX] Add some sanity checks and clamps to SurfaceData calculations. 2023-03-20 10:44:29 +08:00