Commit graph

5,012 commits

Author SHA1 Message Date
Moonchild
f080f2e978 [DOM] Make nsHTMLContentSerializer handle noscript depending on the scripting enabled state of the document. 2023-01-19 09:42:47 +08:00
Moonchild
7764640b0b [devtools] Improve Copy as cURL
Windows commonly fails to work because of --compressed, and its string
escaping needed improvement because of the complexities of argument
parsing in command windows.
2023-01-19 09:42:21 +08:00
Moonchild
d8756a58db [DOM] Add some null checks for PerformanceWorkers 2023-01-19 09:41:54 +08:00
Moonchild
549389d327 No issue - factor out some frame iterator helper functions. 2023-01-19 09:41:27 +08:00
Moonchild
4381425b26 [gtk widget] Use text/uri-list for file drag&drop. 2023-01-19 09:41:00 +08:00
Moonchild
525b4e1888 [network] Avoid queue manipulation inside a loop 2023-01-19 09:40:35 +08:00
Job Bautista
ee541a5330 Issue #80 - Re-unify some more missed sources in js/src 2023-01-13 13:29:05 +08:00
Moonchild
efeb0e3e97 Issue #2087 - Don't throw on lacking PresShell in SetFontInternal
In CanvasRenderingContext2D::SetFontInternal, we should not throw if
there is no PresShell due to (sandboxed/hidden) iframe use that has not
initialized its presentation yet at the time of property manipulation.
This removes the throwing of the error and just silently fails.

Resolves #2087
2023-01-10 07:42:08 +08:00
FranklinDM
2f7f622cd4 No issue - Fix invalid neq check on assert in RegExpParser 2023-01-10 07:41:54 +08:00
FranklinDM
56e636d8ec Issue #2084 - Part 2: Simplify logic in CSSParserImpl::LookupKeywordPrefixAware
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1259348
2023-01-10 07:41:39 +08:00
FranklinDM
db3ce13f28 Issue #2084 - Part 1: Remove CSSUnprefixingService.js and associated code
It's effectively dead code since it's been supplanted by built-in webkit-prefixed-CSS support (landed before fork point in Firefox 49).

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1259348
2023-01-10 07:37:30 +08:00
Martok
845411a7ad Issue #2073 - m-c 1454149: Do not advance animated images which are not displayed 2023-01-10 07:31:40 +08:00
Martok
a6a420259c Issue #2073 - m-c 1546500: Avoid dispatching synchronous thread shutdown runnables 2023-01-10 07:31:26 +08:00
Martok
9a39001cc3 Issue #2073 - m-c 1651587: Make image::Image release efficient on main thread 2023-01-10 07:31:09 +08:00
Martok
03a4a17ccf Issue #2073 - m-c 1383404: make SourceBuffer::Compact more efficient (squashed)
The first part also means that Compact no longer needs the SurfaceCache lock (used to be via CreateChunk->CanHold),
which avoids potential deadlocks during shutdown that m-c 523950 would otherwise cause
2023-01-10 07:30:55 +08:00
Martok
e96122ede2 Issue #2073 - m-c 523950: Discard decoded frames of very large GIF animations (squashed)
Controlled by image.animated.decode-on-demand.threshold-kb, default 256MB

Includes squashed bugfixes/regressions:
 - m-c 1444537: Shutting down the decode pool should make animated decoders bail early
 - m-c 1628606: Make sure to mark the surface cache entry available before sending the frame complete notification
 - m-c 1502275: Skip recreating the decoder after redecode errors if an animated image is reset
 - m-c 1443232: Don't insert frames into our AnimationFrameBuffer that we consider in error and unusable
2023-01-10 07:30:36 +08:00
Martok
eac8afce35 Issue #2073 - m-c 1343341: Infrastructure necessary to allow discarding of animated images (squashed)
Includes squashed changes of:
 - m-c 1317907: Refactor FrameAnimator::GetCompositedFrame to be a bit simpler
 - m-c 1351434: bugfix
 - m-c 686905: Enable the pref image.mem.animated.discardable to allow discarding of animated images
2023-01-10 07:29:50 +08:00
Martok
7d75c2717f Issue #2073 - m-c 1382683: Accelerate GIF decoding to SurfacePipe
1. Implement SurfacePipe::WritePixelBlocks for faster writing of pixels
2. Switch nsGIFDecoder2 to write pixels in blocks instead of individually
2023-01-10 07:29:36 +08:00
Job Bautista
5b438179ad Issue #2079 - Fix linking libxul on *nix when using a linker other than bfd.
Don't mark the .kPStaticModules section as relro for bfd, as the linkers on
 Windows and Mac don't do this anyway.
Add a section insert of .kPStaticModules to config/expandlibs_exec.py, which
 seems to be the primary cause of linking bustage on gold, lld, and mold.
2023-01-06 20:37:00 +08:00
Martok
86782b8f39 Issue #1382 - RegExpShared::groupsTemplate_ cannot be a GCPtr since RegExpShared is managed by C++ 2023-01-06 20:36:47 +08:00
Moonchild
e38f362d44 Issue #2075 - Part 5: Allow logical aliases in the property database. 2023-01-06 20:36:35 +08:00
Moonchild
1b22ef40f9 Issue #2075 - Part 4: Update tests
* Update reftests to use inset-*
* Update property database
* Update logical properties test
2023-01-06 20:36:22 +08:00
Moonchild
48087df576 Issue #2075 - Part 3: Regenerate devtools CSS database
Using `mach devtools-css-db`
2023-01-06 20:36:10 +08:00
Moonchild
07af4123d1 Issue #2075 - Part 2: Update devtools for inset-* 2023-01-06 20:35:53 +08:00
Moonchild
0c37c0db8f Issue #2075 - Part 1: Rename offset-* logical properties to inset-*
This adds aliases behind a pref with the old offset-* names
2023-01-06 20:35:40 +08:00
Job Bautista
507ed86ef5 Issue #80 - Fix deprot in js/src/irregexp.
Regression seems to have been introduced by PR #2060? This tree didn't fail
 building before we've reinstated unified building for js/src.
Found while building js/src de-unified.
2022-12-30 09:23:06 +08:00
Job Bautista
ba1887ff4c Issue #80 - Fix deprot in dom/base.
This regression was introduced by my PR #2015.
Found while building dom/base de-unified.
2022-12-30 09:22:21 +08:00
Moonchild
9958e387d8 Issue #2053 - Disable DOM Performance API navigation timing.
We may eventually want to make this permanent in the front-end of
Pale Moon for privacy reasons.
Disabling this to avoid usage expecting changed spec results.
2022-12-30 09:22:04 +08:00
Moonchild
c95a802078 Issue #2070 - When multiple HSTS headers are received, only consider the first.
This implements a plain interpretations of RFC 6797, which says to only consider
the first HSTS header.
This slightly conflicts with RFC 7230, which says that sending multiple headers
which can't be merged is illegal (except for a specific whitelist which HSTS isn't in),
so this situation should never occur in the first place (and would therefore not need
the explicit entry in RFC 6797).

It improves HSTS robustness dealing with non-compliant servers.

Resolves #2070
2022-12-30 09:21:48 +08:00
Job Bautista
5c505b86ca No issue - Fallthrough attributes must be terminated with semicolon.
This also fixes building with Clang 15 on Linux.
2022-12-30 09:21:30 +08:00
Job Bautista
ca3361fb57 Issue #2068 - Only wrap the last line of inline elements when positively padding to the right.
This fixes the 21 year old Mozilla bug 122795.

Co-authored-by: Jonathan Kew <jfkthame@gmail.com>
2022-12-30 09:21:14 +08:00
FranklinDM
704a1bcfab No issue - Replace use of deprecated GetPreventDefault in GTK menu bar 2022-12-30 09:20:59 +08:00
FranklinDM
9c51368727 Issue #2065 - Part 5: Fix incorrect inclusion of base file name in destination path for generated FasterMake track files
I'm not sure about what they had in mind when they first wrote this, but this is completely unnecessary. The base name is the file name. This part will break building with `mach faster` once partial filenames with wildcards are included in the package manifest, which became the case when we began supporting the newer MSVC runtime.

This also aligns FasterMake with how RecursiveMake treats wildcard copy directives.

They fixed this in bug 1416465, but it included a conditional that will almost always be true and kept this incorrect joining of the path and base name in the destination path. Since the value for the base name is either empty or contains a partial file name, that conditional effectively does nothing.
2022-12-30 09:20:41 +08:00
FranklinDM
b1b4c7d0ee Issue #2065 - Part 4: Revise comments and remove parts dependent on hybrid FasterMake/RecursiveMake backend 2022-12-30 09:20:28 +08:00
FranklinDM
558b83975c Issue #2065 - Part 3: Process install manifests with --track in the recursive make backend
This excludes parts that remove support for building the Mozilla SDK.
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1390916
2022-12-30 09:20:05 +08:00
FranklinDM
b67d7520b6 Issue #2065 - Part 2: Expand pattern when track file is created rather than read
This fixes build bustage on Windows when using `mach build faster`.

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1416465
2022-12-30 09:17:33 +08:00
Job Bautista
09cbcd3413 Issue #2063 - Ensure a floated ::first-letter inherits from ::first-line.
This fixes the 24 year old Mozilla bug 13610.

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2022-12-30 09:09:13 +08:00
Martok
904ddfa28f Follow-up #2060 - Correctly handle \k in non-unicode expressions 2022-12-30 09:08:53 +08:00
Martok
81a8ac427a Issue #1286 - Parse unicode property escapes and property sequences
In addition to upstream, we also allow RGI-named sequences since they're used in the wild.
2022-12-24 08:09:55 +08:00
Martok
d2e0e199b7 No issue - Refactor CharacterRange + Unicode handling into module for maintainability
Collects code from RegExpParser and RegExpEngine (regexp-compiler-tonode.cc)
Simplify parsing AtomEscape/CharacterClassEscape
2022-12-24 08:09:52 +08:00
Martok
6eead2deb4 Issue #1285 - Implement named capturing groups for replacing 2022-12-24 08:09:49 +08:00
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