Compare commits

...
Author SHA1 Message Date
Moonchild 4dea7f04dc [gfx] Add sanity checks in ANGLE D3D11 renderer. 2026-04-29 15:06:03 +02:00
Moonchild 7cc35f1195 [DOM] Do not interrupt worker execution if already scheduled. 2026-04-29 15:05:56 +02:00
Moonchild afd0648631 [DOM] Validate size in FileReader. 2026-04-29 15:05:17 +02:00
Moonchild 6524bfee21 [DOM/media] Add some sanity checks to MP3 demuxer.
Note: `vbr.NumAudioFrames()` is already checked in `vbr.IsComplete()`
2026-04-29 15:05:11 +02:00
Iain Ireland de8c2d1762 Bug 2029806: Handle ill-formed UTF16 2026-04-29 15:05:06 +02:00
Karl Tomlinson 5309640d6c Bug 2027433 use nullptr for silent up-mix channels 2026-04-29 15:05:01 +02:00
Karl Tomlinson ddd016a6f8 Bug 2027433 Treat null input channels as zero in AudioChannelsDownMix() 2026-04-29 15:04:55 +02:00
Karl Tomlinson e76fc5637a Bug 2027433 Treat null input channels as zero in InterleaveAndConvertBuffer()
The loop nesting is inverted so as not to add a null check to the inner
loop, but this change would also have some impact on cache use:

* The loop ordering might perhaps not be the ideal for two channels and
large sample counts, for example, because it means going through the
output/largest buffer twice.
* It does, however, avoid pathological situations of iterating across
planar channel buffers, likely to load set-associative cache lines if
the channel buffers are page aligned, due to having 1024 (or somewhat
fewer) floats, for example.
2026-04-29 15:04:49 +02:00
Moonchild 62110dcf7f Revert "[DOM] Ensure the GC sees consistent states while adopting DOM nodes."
This reverts commit 7664a83451.
2026-04-28 17:39:16 +02:00
Moonchild c597f4de77 [NSS] Restore dropped 'S' :P 2026-04-26 17:06:16 +02:00
Moonchild fe4b55154b [NSS] Update NSS version for release.
Add (UXP) to the version display string to signify this is our variant of
NSS 3.90 to avoid confusion with the 3.90 branch used in Firefox 115 ESR.
This version has backported considerably more fixes than Mozilla's NSS.
2026-04-26 15:56:47 +02:00
Moonchild d9f4319bfd [parser] Handle foster parenting properly. 2026-04-26 15:56:36 +02:00
Moonchild ec7baced6c [media] Spot-fix for ffvpx handling of bad video data. 2026-04-26 15:56:28 +02:00
Moonchild 5ed591c3d7 [image] Don't do unnecessary work if the image is being destroyed. 2026-04-26 15:56:21 +02:00
Iain Ireland 32859868d6 Bug 2029727: Update RegExpStatics data after realloc 2026-04-26 15:56:09 +02:00
Moonchild 4ab80fceb4 [gfx] OTS/HB: Correct bounds checks. 2026-04-26 15:56:00 +02:00
Moonchild 4e25cc130f [js] Use isElement in UnmappedArgSetter to check if the argument was marked as deleted.
This is more consistent with `UnmappedArgGetter` and better handles the
case where the property was marked deleted in `RareArgumentsData` but not
actually deleted from the object due to OOM. Unfortunately this scenario
is hard to prevent because the property is marked as deleted in the
`ArgumentsObject::obj_delProperty` class hook and after that
`NativeDeleteProperty` tries to remove the property and this can fail.
2026-04-26 15:55:52 +02:00
Dennis Jackson f1b56f6512 Bug 2029323 - Improve size calculations in CMS content buffering 2026-04-26 15:55:38 +02:00
John Schanck b5d6c427ad Bug 2029425 - Heap use-after-free in cert_VerifyCertChainOld via dangling certsList[] entry on NameConstraints violation. 2026-04-26 15:55:29 +02:00
Moonchild 9a900503ea [image] Hold a strong ref on mInnerImage when requesting a refresh. 2026-04-26 15:55:22 +02:00
Moonchild f6296891bf [DOM] Add some death grips to TextTrackManager. 2026-04-26 15:55:17 +02:00
Moonchild bbd16ed644 [DOM/media] Use extended channel data as-appropriate. 2026-04-26 15:55:11 +02:00
John Schanck 8f6cd1cfcd Bug 2030135 - improve error handling in PK11_ImportPrivateKeyInfoAndReturnKey 2026-04-26 15:55:06 +02:00
Moonchild 70a3532f49 Revert "[gfx] Use local statics for harfbuzz callback pointers"
This reverts commit 60a96d9cd2.
2026-04-26 15:54:57 +02:00
Moonchild c160edb49b No issue - Update our in-tree brotli library to 1.2.0+
This includes a minor patch to encode.c to work around the "static init"
check that actually doesn't do anything in its default state, but, due to
compiler subtleties in handling duplicate object names, would not be able
to link brotli.exe because it would refuse to expose all symbols for
duplicate objects (a later one would just be ignored).
Unsure how clang does this but it's not portable across compilers.
(we need the brotli.exe tool for resource package compression)
2026-04-26 15:54:50 +02:00
John Schanck 32f0e6d1e6 Bug 2029462 - store email on subject cache_entry in NSS trust domain.
remove_email_entry used cert->email of the last-destroyed cert to locate
the hash entry to clean up. If that cert had no email, the entry was
silently skipped, leaving a dangling subjectList pointer after the arena
was freed. Store the registration-time email on the subject cache_entry
(mirroring ce->nickname) and thread it through remove_subject_entry so
removal always uses the correct email regardless of destruction order.
2026-04-26 15:54:36 +02:00
Moonchild 8c6098ed9e [security] Ensure DispatchToMainThreadAndWait isn't interrupted.
In some cases, `lock.wait()` can be interrupted by spurious wake-ups
before processing is done. To ensure things are, in fact, synchronous,
loop over `wait()` until it is actually done.
2026-04-26 15:54:26 +02:00
Timothy Nikkel 5f70302bfc Bug 2029291. 2026-04-26 15:54:16 +02:00
Jan de Mooij f1cc25409a Bug 2029317 - Create RareArgumentsData before mutating the arguments object in MappedArgumentsObject::obj_defineProperty. 2026-04-26 15:54:10 +02:00
Jan-Ivar Bruaroey 1bb67f87d1 Bug 2029423 - Reset post_proc state. 2026-04-26 15:53:55 +02:00
Andy Leiserson 6f89be191d Bug 2029427 - Fix format string 2026-04-26 15:53:50 +02:00
Moonchild f453aac0eb [gfx] Explicitly cast calculation to int32. 2026-04-26 15:53:42 +02:00
Moonchild abc2e56e6a [gfx] Port libyuv upstream bounds check. 2026-04-26 15:53:31 +02:00
Simon Farre 2f2c86599f Bug 2025973 - Use value-semantics for txExecutionState::TemplateRule
TemplateRule is a wrapper around references mostly and can for the
purposes of this function be copied to the stack, given that
TemplateRule::mModeNsId is not mutated there.
2026-04-26 15:53:24 +02:00
Dennis Jackson a52e68f04d [NSS] Clarify extension negotiation mechanism for TLS Handshakes. 2026-04-26 15:53:16 +02:00
Moonchild ee256eda09 [js] Only allow strings as function name. 2026-04-26 15:53:07 +02:00
Olli Pettay adbedd87a3 Bug 2025370 - Properly handle error case in EventListenerManager::GetTypedEventHandler 2026-04-26 15:52:46 +02:00
Moonchild 4f94981ad9 [DOM/XSLT] Don't use txXPathNode by reference.
Follow-up to previous XSLT fixes.
2026-04-26 15:52:36 +02:00
Moonchild fb15e11ef3 [gfx] Stop using binary arithmetic in software filtering.
There was some weird binary arithmetic to artificially clamp values in
calculations for dot products. (multiply by (x >= 0)...)
Switch to `std::clamp()` on the initial value instead.
2026-04-26 15:52:31 +02:00
Tom Schuster b0e1570535 Bug 2025332 - ErrorResult should call ClearUnionData more. 2026-04-26 15:52:26 +02:00
Karl Tomlinson b370042040 Bug 2025483 update mBeginProcessing even on speex_resampler_set_rate() error 2026-04-26 15:52:20 +02:00
Moonchild 60daf77274 [NSS] Deep copy profile data in CERT_FindSMimeProfile. 2026-04-26 15:52:15 +02:00
Moonchild 4f9ed77789 [DOM/XSLT] Prevent circular indexing
Added additional flag to txIndexedKeyHashEntry to signal whether or not
this entry is already in the process of indexing.

The XSL specs 3.0 talk about recursion being fine, but circularity not
being ok, which is the case when a key is already being looked up.
2026-04-26 15:52:04 +02:00
Moonchild c819a0b3c8 No issue - Deduplicate HTMLAllCollection::GetSupportedNames code.
This was duplicated with a minor difference from the code present in
nsContentList::GetSupportedNames.
2026-04-26 15:51:57 +02:00
Moonchild 104f493044 [NSS] Reject excessively large ASN.1 SEQUENCE OF in quickder. 2026-04-26 15:51:14 +02:00
Moonchild ccfb3fc5db [DOM] Avoid leaks in nsXMLPrettyPrinter. 2026-04-26 15:51:05 +02:00
Moonchild 9fa543c9f4 [DOM/WebCrypto] Reject absurdly large salt values. 2026-04-26 15:51:00 +02:00
Moonchild 1d18178eda [DOM] Add a death grip and use locals in BaseMediaResource::ModifyLoadFlags. 2026-04-26 15:50:54 +02:00
Moonchild 8a6b1f309b [DOM] Add a SequenceRooter to ConsoleProfile. 2026-04-26 15:50:48 +02:00
Moonchild a60ab0def7 [widget] Improve clearing of data during clipboard operations. 2026-04-26 15:50:40 +02:00
Daniel Holbert 6276177e20 Bug 2026293: Block scripts when initiating async scrollbar activity. 2026-04-26 15:50:33 +02:00
Moonchild 6c4e8f1466 [accessibility] Hold a strong ref to mParent in AccIterator. 2026-04-26 15:50:22 +02:00
Moonchild 19a4ae248b [gfx] Don't return dummy surfaces. 2026-04-26 15:50:16 +02:00
Moonchild 744212dbf3 [webrtc] Fix off-by-one comparison. 2026-04-26 15:50:10 +02:00
Simon Farre a46fbd6ead Bug 2025971 - Use txSingleNodeContext getter of owned txXPathNode.
eContext gets a copy of aNode. The function should use that one's member
as it's not a shared reference, which we can't know the life time of.
2026-04-26 15:50:04 +02:00
Moonchild bb39100caf Bug 2025976 - Follow-up: Make txXPathNode() a public class member. 2026-04-26 15:49:51 +02:00
Moonchild a27a4e4b60 [DOM/XSLT] Re-fetch index entry. 2026-04-26 15:49:45 +02:00
Simon Farre 490cf03fba Bug 2025976 - Make txxPathNode be a value instead of reference.
txxPathNode has value semantics (it's a smart pointer + uint32_t index;
two different objects of this instance with the same contents are the same
thing).

Increase correctness by making a copy instead of a reference.
2026-04-26 15:49:40 +02:00
Moonchild e93191409e [NSS] Improve input validation in DSAU signature decoding 2026-04-26 15:49:33 +02:00
Moonchild 5cfdaf4ad4 [image] Hold a strong ref on error. 2026-04-26 15:49:28 +02:00
Moonchild 7664a83451 [DOM] Ensure the GC sees consistent states while adopting DOM nodes.
This should prevent some intermittent CC crashes when the wrapper cache
has an incorrect state.
2026-04-26 15:49:22 +02:00
Moonchild f449e1fd7d [DOM] Improve CC/WrapperCache for nursery objects. 2026-04-26 15:49:16 +02:00
Moonchild bbd4a99be2 [network] Ensure UDPSocket remains alive during CloseWithReason. 2026-04-26 15:49:11 +02:00
Moonchild 4ae471baf9 [network] Hold strong ref in nsSyncStreamListener::Available. 2026-04-26 15:49:01 +02:00
Moonchild 4d41b5df11 [network] Force NUL termination in ToStringBuffer AF_LOCAL.
Also reject AF_LOCAL in IPC reader (just in case).
2026-04-26 15:48:54 +02:00
Moonchild 01188c1465 [webrtc] Hold a self-ref on behalf of sigslot, just in case.
Also, stop using these PC_AUTO_ENTER_API_CALL... macros
in functions that aren't actually JS API.
2026-04-26 15:48:41 +02:00
Moonchild 7eac3090a5 [DOM] Fix access to shared RuntimeService::mNavigatorProperties. 2026-04-26 15:48:28 +02:00
Moonchild e9bb602131 Issue #3060 - Align cookie magic prefix handling with the updated spec.
This adds `__Http-` and `__Host-Http-` magic prefixes, and aligns
our checks with RFC6265bis.

Resolves #3060
2026-04-26 15:48:16 +02:00
Moonchild ddc8b21705 [network] Handle WebSocketChannel::IsPersistentFramePtr correctly. 2026-04-26 15:47:59 +02:00
Moonchild 6209d33f4e [network] Hold strong ref in nsDownloader::OnDataAvailable. 2026-04-26 15:47:50 +02:00
Moonchild cbaace24c0 [DOM] Add a death grip. 2026-04-26 15:47:44 +02:00
Moonchild 051951ef00 [network] Use locals for VisitHeader 2026-04-26 15:47:38 +02:00
Moonchild a9062b8710 [DOM] Update some DOM canvas checks. 2026-04-26 15:47:14 +02:00
Moonchild 18c656ebba Issue #3058 - Part 1: Fix arithmetic issue in ConvertYCbCrToRGB32
The more complex part can be landed later.
2026-04-26 15:46:58 +02:00
Moonchild 9220d05de2 [NSS] Fix memory leak in NSC_GenerateKey error path. 2026-04-26 15:46:43 +02:00
Moonchild fdd286d190 [NSS] Protect rwSessionCount with slotLock.
Previously, SFTKSlot.rwSessionCount was incremented and decremented
atomically, which meant that there was no way to synchronize reads from it
in NSC_GetTokenInfo. This patch removes the atomic operations but protects
rwSessionCount with SFTKSlot.slotLock.
SFTKSlot.sessionCount is already protected in this way, so this should
have no performance impact.
2026-04-26 15:46:29 +02:00
Moonchild 4fa8a8ce1d [NSS] Fix potential integer underflow in tls 1.3.
Fix integer underflow in tls13_AEAD when ciphertext is shorter than tag.
2026-04-26 15:46:24 +02:00
Moonchild d5e853a25b [media] Check alpha data pointer instead of length.
`nestegg_packet_additional_data()` can return a non-zero length with a
null-pointer after failure to parse an ID_BLOCK_ADDITIONAL element.
See upstream bug https://github.com/mozilla/nestegg/issues/76
2026-04-26 15:46:18 +02:00
Moonchild 6ea3635847 [network] use nsCOMPtr for mRequest in Base Channel's ScopedRequestSuspender 2026-04-26 15:46:09 +02:00
Moonchild 0ea3d42a38 Issue #2946 - Follow-up: Sanity-check WMF video properties.
Not sure where else to put this under, but it's a WMF HWA related check,
so filing it as a follow-up here to recent work.
Also tag #2949
2026-04-26 15:45:50 +02:00
Moonchild a024df6124 [DOM] More consistently use already-calculated image properties. 2026-04-26 15:45:33 +02:00
Moonchild 11a80021f4 [layout] Minor frame scroll improvements. 2026-04-26 15:45:26 +02:00
Moonchild 301873c751 [XPCOM] Update list of executable extensions on Windows. 2026-04-26 15:45:18 +02:00
Moonchild 90986caee8 [NSS] ensure permittedSubtrees don't match wildcards that could be outside
the permitted tree.
2026-04-26 15:45:12 +02:00
Moonchild 778d93ac49 [network] Ignore non-compliant http server header. 2026-04-03 07:38:32 +02:00
Moonchild f9ba08fa11 [NSS] Update NSS to 3.90.9.1 (custom) 2026-04-03 07:38:24 +02:00
Moonchild 95911aa2ce [gfx] Use local statics for harfbuzz callback pointers
This ensures thread-safe initialization.
2026-04-03 07:38:10 +02:00
Moonchild ccbea05142 [XPCOM] Add more validation to SnappyUncompressInputStream 2026-04-03 07:37:56 +02:00
Moonchild 867c957ceb No issue - Add convolver sanity check 2026-04-03 07:37:41 +02:00
Moonchild 0d2ff3ee65 Merge branch 'master' into release 2026-03-28 19:02:37 +01:00
Moonchild 5871ce0b85 Merge pull request 'Implement TypedArray.prototype.toSorted' (#3025) from Basilisk-Dev/UXP-contrib:typedarray-tosorted into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3025
2026-03-28 15:07:05 +00:00
Moonchild 6237c680ca Merge pull request 'Cleanup obsolete XPCOM Support' (#3026) from Basilisk-Dev/UXP-contrib:cleanup-xpcom into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3026
2026-03-28 15:05:35 +00:00
Basilisk-Dev facdbf7bc0 Issue #3007 - remove VERY obsolete HTML files in XPCOM 2026-03-28 09:08:54 -04:00
Basilisk-Dev 8f54050907 Issue #3007 - remove 32-bit SPARC OpenBSD support in XPCOM 2026-03-28 08:50:38 -04:00
Basilisk-Dev 2fbe032ee9 Issue #3007 - remove some obsolete HTML files in xpcom 2026-03-28 08:46:49 -04:00
Basilisk-Dev a8a68383cb Issue #3007 - Remove bitrig support from XPCOM. 2026-03-28 08:44:21 -04:00
Basilisk-Dev e3f67c01a2 Issue #3007 - remove remaining HP-UX references in XPCOM 2026-03-28 08:39:01 -04:00
Moonchild a1fe345c98 No issue - Add 10.4 and 26.* SDK versions to KNOWN_SDK_VERSIONS
For Mac builds as requested by dbsoft.
Sorted the entries by major version for readability.
2026-03-28 08:37:42 +01:00
Basilisk-Dev a1caa316a7 Issue #2551 - implement TypedArray.prototype.toSorted 2026-03-27 13:35:04 -04:00
Moonchild 1011058248 Merge pull request 'Update document.currentScript implementation to align with current spec' (#3021) from currentScript-work into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3021
2026-03-26 14:59:30 +00:00
Moonchild dc9a5cd350 Merge pull request 'Implement window.MathMLElement global.' (#3022) from dbsoft/UXP:mathmldom-work6 into master
Reviewed-on: https://repo.palemoon.org/MoonchildProductions/UXP/pulls/3022
Reviewed-by: Moonchild <moonchild@palemoon.org>
2026-03-25 21:52:41 +00:00
Brian Smith 80c7d08eee Issue #2548 - Part 5 - Implement the HTMLOrForeignElement mixin.
https://bugzilla.mozilla.org/show_bug.cgi?id=1577660
Add 'preventScroll' option to HTMLElement's, SVGElement's and XULElement's 'focus' method.
https://bugzilla.mozilla.org/show_bug.cgi?id=1374045
2026-03-24 19:38:41 -05:00
Brian Smith a8c59c38d4 Issue #2548 - Part 4 - Fix some missed changes for ElementCSSInlineStyle.
Introduce GlobalEventHandlers/DocumentAndElementEventHandlers/ElementCSSInlineStyle mixin.
https://bugzilla.mozilla.org/show_bug.cgi?id=1579457
2026-03-24 19:38:41 -05:00
Brian Smith 9bf46d80f1 Issue #2548 - Part 3 - Fix some MathML issues encountered since WebIDL works.
Add an nsContentUtils API for getting the CallerType of a JSContext.
https://bugzilla.mozilla.org/show_bug.cgi?id=1316616
Also added a Fetch() change that was not in the Mozilla patch.
2026-03-24 19:38:41 -05:00
Brian Smith 638c7f07f7 Issue #2548 - Part 2 - Collection of WebIDL parsing updates in an attempt to fix partial interface mixin error.
We should ensure, at build-time, that partial interfaces are defined in the same file as the interface they extend.
Since our build system doesn't really support correct dep builds if they're placed in a different file.
https://bugzilla.mozilla.org/show_bug.cgi?id=1333117
WebIDL: Better error message for trying to inherit from a mixin.
https://bugzilla.mozilla.org/show_bug.cgi?id=1575384
Fix webidl identifier conflicts involving typedefs to produce saner exceptions.
https://bugzilla.mozilla.org/show_bug.cgi?id=1531623
Disallow nullable types for WebIDL constants.
https://bugzilla.mozilla.org/show_bug.cgi?id=1535647
Add support for extended attributes on types in Web IDL
https://bugzilla.mozilla.org/show_bug.cgi?id=1359269
Allow LenientFloat to be only in a specific overload
https://bugzilla.mozilla.org/show_bug.cgi?id=1020975
2026-03-24 19:38:41 -05:00
Brian Smith 8e01b2d181 Issue #2548 - Part 1 - Implement MathML DOM and pre-requisites.
https://bugzilla.mozilla.org/show_bug.cgi?id=1571487
Introduce interface mixins.
https://bugzilla.mozilla.org/show_bug.cgi?id=1414372
Switch XPathEvaluator to using IDL mixins and remaining users of IDL "implements" over to mixin syntax.
https://bugzilla.mozilla.org/show_bug.cgi?id=1574195
Introduce GlobalEventHandlers/DocumentAndElementEventHandlers/ElementCSSInlineStyle mixin.
https://bugzilla.mozilla.org/show_bug.cgi?id=1579457
Introduce DocumentAndElementEventHandlers to more closely align with the HTML spec.
https://bugzilla.mozilla.org/show_bug.cgi?id=1330457
Remove the use of IsCallerChrome in FetchRequest.
https://bugzilla.mozilla.org/show_bug.cgi?id=1335368
2026-03-24 19:38:41 -05:00
Moonchild 14122475be Issue #2981 - Add nullcheck in GetPointerCapabilities (uplift)
Uplift to release.
2026-03-09 11:32:39 +01:00
Moonchild d881e7ed56 Merge branch 'master' into release 2026-03-01 23:37:59 +01:00
Moonchild 9b0054c55f Merge branch 'master' into release 2026-02-27 19:28:35 +01:00
Moonchild baeae97784 Merge branch 'master' into release 2026-02-27 07:08:35 +01:00
Moonchild 0324bfa219 Re-sync master to release.
Post-merge synchronization to bypass rebase-shenanigans after backouts.
2026-02-24 17:25:53 +01:00
Moonchild b279fd025b Merge branch 'master' into release
# Conflicts:
#	js/src/jit/CodeGenerator.cpp
#	js/src/jit/arm/Lowering-arm.cpp
#	js/src/jit/arm64/Lowering-arm64.cpp
#	js/src/jit/mips32/Lowering-mips32.cpp
#	js/src/jit/mips64/Lowering-mips64.cpp
#	js/src/jit/shared/LIR-shared.h
#	js/src/jit/x64/Lowering-x64.cpp
#	js/src/jit/x86/Lowering-x86.cpp
#	mfbt/Xoroshiro128PlusPlusRNG.h
#	parser/expat/lib/xmlparse.c
2026-02-24 14:37:42 +01:00
Francis Dominic Fajardo f31546817a Issue #2828 - Follow-up: Simplify rule node tracking and ensure rule walker state isn't reset for the first child processor (uplift)
Styles contained in NAC shouldn't be tracked with their own rule node (as opposed to what was done in https://repo.palemoon.org/MoonchildProductions/UXP/pulls/2859) because it causes precedence issues. This should now more closely imitate the original behavior where NAC and regular document styles (at least, the "unlayered" layer) are grouped together.

This also gets rid of the manual last rule node checks against null, since they are now consistently handled by the separate function.
2026-01-25 14:44:49 +01:00
Moonchild f272382a9c Revert "Issue #2895 - Part 1: Replace XorShift128+ with Xoroshiro128++"
This reverts commit c90df0c332.
2026-01-21 10:18:46 +01:00
Moonchild aa8af9d7f8 Revert "Issue #2895 - Part 2: Remove incorrect debug asserts."
This reverts commit 97786271f9.
2026-01-21 10:18:38 +01:00
Moonchild e1f03ae019 Revert "Issue #2895 - Part 1b: Update license block."
This reverts commit 12821ae90a.
2026-01-21 10:18:08 +01:00
Moonchild f316bc6535 Revert "Issue #2895 - Follow-up: Fix JIT code generator for 32-bit targets."
This reverts commit 8112ed2e6c.
2026-01-21 10:17:51 +01:00
Moonchild 82e4c66520 Revert "Issue #2889 - Part 0: Relocate Mozilla-specific files from Expat source."
This reverts commit f93d0fadf2.
2026-01-21 10:04:52 +01:00
Moonchild 3c923e0467 Revert "Issue #2889 - Part 1: Prepare Mozilla's changes and extensions for Expat 2.6.4."
This reverts commit 6c7850482f.
2026-01-21 10:04:44 +01:00
Moonchild 866985ac88 Revert "Issue #2889 - Part 2: Import Expat 2.6.4 source."
This reverts commit e7cacf4642.
2026-01-21 10:04:37 +01:00
Moonchild ba772b40ad Revert "Issue #2889 - Part 3: Apply Mozilla's patches to Expat 2.6.4."
This reverts commit 2ae8833092.
2026-01-21 10:04:29 +01:00
Moonchild 7a86f0e1b7 Revert "Issue #2889 - Part 4: Fix build and runtime issues."
This reverts commit ef1532cab2.
2026-01-21 10:04:22 +01:00
Moonchild 7e9286f2d8 Revert "Issue #2889 - Follow-up: Avoid conflicts with system version of libexpat"
This reverts commit e284ffab6c.
2026-01-21 10:04:14 +01:00
Moonchild b0d1e365ec Revert "Issue #2889 - Follow-up: void methods shouldn't return a value."
This reverts commit 647a1ab5f0.
2026-01-21 10:04:07 +01:00
Moonchild dbd5a2cbf4 Revert "Issue #2889 - Part 5: Rewrite patches for Expat 2.7.3."
This reverts commit 0f1faad9a3.
2026-01-21 10:03:58 +01:00
Moonchild d60fb1d5c0 Revert "Issue #2889 - Part 6: Import Expat 2.7.3 source."
This reverts commit 627fdf8fe4.
2026-01-21 10:03:49 +01:00
Moonchild 29c91fcdba Revert "Issue #2889 - Part 7: Apply patches to Expat 2.7.3."
This reverts commit 112abdc25a.
2026-01-21 10:03:40 +01:00
Moonchild fe65674f3f Revert "Issue #2889 - Follow-up: Allow generate_hash_secret_salt to be used." 2026-01-21 10:03:24 +01:00
Moonchild a3a6b5ed7e Revert "Issue #2889 - Follow-up: Adjust Expat 2.7.3 local patches for removal of 3rd patch."
This reverts commit 073378ec92.
2026-01-21 10:01:44 +01:00
Moonchild d2de8658a7 Revert "Issue #2889 - Follow-up: Remove fix for BZ 569229."
This reverts commit a22613d3e0.
2026-01-21 10:01:37 +01:00
Moonchild be785b4783 Merge branch 'master' into release
This resyncs platform to master, overwriting more recent backouts from
the release branch.
2026-01-16 23:16:32 +01:00
Moonchild 70e34941c4 [devtools] Remove newline kludge from "Copy as cURL" on Windows 2025-10-15 19:46:52 +02:00
Moonchild 545d52572d Revert "Issue #2828 - Part 1: Build and store the array of layer name tokens in the layer at-rules"
This reverts commit 253ec6706a.
2025-10-08 23:24:27 +02:00
Moonchild dfa0736b49 Revert "Issue #2828 - Part 2: Collect and hold rule cascade data per cascade layer"
This reverts commit a91b385f68.
2025-10-08 23:24:20 +02:00
Moonchild c7bb5664d9 Revert "Issue #2828 - Part 3: Refactor selector matching and rule cascade data into separate files/classes"
This reverts commit 211aa6d652.
2025-10-08 23:24:13 +02:00
Moonchild 6bbc6f3417 Revert "Issue #2828 - Part 4: Move cache key storage to ResolvedRuleCascades"
This reverts commit 202e354f87.
2025-10-08 23:24:07 +02:00
Moonchild 631169a312 Revert "Issue #2828 - Part 5: Implement child rule processors"
This reverts commit bc45ec4f57.
2025-10-08 23:24:02 +02:00
Moonchild 427b3312a6 Revert "Issue #2828 - Part 6: Assert rules were added to the rule cascade data"
This reverts commit be7a231579.
2025-10-08 23:23:56 +02:00
Moonchild 2287b0b57a Revert "Issue #2828 - Part 7: Walk child rule processors separately and ensure inverted cascade layer order is enforced for important rules"
This reverts commit c3e12fe822.
2025-10-08 23:23:50 +02:00
Moonchild 56aaba09b1 Revert "Issue #2828 - Part 8: Extract RuleProcessorGroup (formerly ResolvedRuleCascades) into separate file"
This reverts commit 5fda071898.
2025-10-08 23:23:45 +02:00
Moonchild 332938fef3 Revert "Issue #2828 - Part 9: Rename CascadeEnumData to CascadeLayer"
This reverts commit ebb0ae456c.
2025-10-08 23:23:39 +02:00
Moonchild 13710f7a06 Revert "Issue #2828 – Part 10: Clean up cascade layer constructor"
This reverts commit 047458a002.
2025-10-08 23:23:33 +02:00
Moonchild 530693099b Revert "Issue #2828 - Part 11: Detach weighted rule data from cascade layer"
This reverts commit b1c19137ad.
2025-10-08 23:23:28 +02:00
Moonchild f68aa7ea88 Revert "Issue #2828 - Part 12: Implement cascade layer SizeOfIncludingThis"
This reverts commit 5ef79e303f.
2025-10-08 23:23:23 +02:00
Moonchild 5bdaee5e40 Revert "Issue #2828 - Part 13: Exclude strong layers-related code from release builds"
This reverts commit e82fa3450a.
2025-10-08 23:23:18 +02:00
Moonchild 1b465bc2e2 Revert "Issue #2828 - Part 14: Clobber required for CSS rule processor refactoring"
This reverts commit 038c5a95fc.
2025-10-08 23:23:12 +02:00
Moonchild e455021bea Revert "Issue #2835 - Part 1: Expose nsCSSRuleProcessor::CascadeSheet"
This reverts commit 618f62e753.
2025-10-08 23:23:02 +02:00
Moonchild 4fe1246bcc Revert "Issue #2835 - Part 2: Implement processing of import rules based on order of appearance"
This reverts commit 2ba24302d9.
2025-10-08 23:22:57 +02:00
Moonchild 59b4ac4d5f Revert "Issue #2835 - Follow-up: Guard against import rules with no attached style sheet"
This reverts commit 5fccc6ec3d.
2025-10-08 23:22:42 +02:00
Moonchild de641fedfe Merge branch 'master' into release 2025-10-02 21:21:39 +02:00
Moonchild cb99fabcc0 Merge branch 'master' into release 2025-09-24 10:33:48 +02:00
Moonchild f996ea12c2 Merge branch 'master' into release 2025-09-19 21:04:01 +02:00
Moonchild 4e7fb3e0ea Merge branch 'master' into release 2025-09-18 13:15:14 +02:00
Moonchild e7cbbbef0f Merge branch 'master' into release 2025-09-14 11:54:15 +02:00
Moonchild a181078981 Revert "[gfx] Guard against possible race via gfxFontEntry::GetFontTable."
This reverts commit 98ddf30155.
2025-08-27 15:54:15 +02:00
Moonchild 987a662b51 [NSS] Avoid leak in pkcs12 decoder. 2025-08-20 16:26:17 +02:00
Moonchild 77e3e14e55 [js] Error-check pthread calls
These calls return error states (int) that weren't checked for success.
Failures here are fatal, so using MOZ_RELEASE_ASSERT to safely crash.
2025-08-20 16:26:10 +02:00
Moonchild 98ddf30155 [gfx] Guard against possible race via gfxFontEntry::GetFontTable. 2025-08-20 16:26:03 +02:00
Moonchild 83da5c58a2 Issue #2850 - Alias :focus-visible to :-moz-focusring
Band-aid to have it be parsed as valid with reasonably-expected behaviour.
2025-08-17 10:46:32 +02:00
Moonchild 7136ae45a7 [DOM] Simplify <object> scheme check code and fix plugin handling.
Trying to do a positive check on nested URIs apparently doesn't work,
but the handling could be simplified to just check for non-null mURI
instead - this also fixes plugin loading (which broke with the previous
check).
2025-07-31 10:44:08 +02:00
Moonchild 97d3d61749 [DOM] Fix crash in <object> scheme checking code.
If a website would nor supply a URI for object loading code, the browser
would crash on a null deref.
This reintroduces the nestedURI check to make sure we have a valid URI.
2025-07-30 09:29:51 +02:00
Sergey Larin 9c8bf1fe5d No Issue - Disable VSX extensions (uplift)
There is no detection script for them as for AltiVec, and
it's breaking older machines (PowerMac G5 in particular).
2025-07-25 16:57:09 +02:00
Sergey Larin d1cc6ff3cb Issue #2777 - Fix ffvpx build on PPC64 (uplift) 2025-07-25 16:55:27 +02:00
Moonchild db76d74820 [DOM] Make object loading use an explicit scheme whitelist. 2025-07-25 14:23:45 +02:00
Moonchild 8fdd9d52f9 [network] Stop accepting nameless cookies. 2025-07-25 14:23:34 +02:00
Moonchild d42797f587 [js] Align br_table limits with V8/Gecko. 2025-07-25 14:23:18 +02:00
Moonchild 6b9c1f6ab8 [gfx] Hold a stronger reference to gfxFontEntry. 2025-07-25 14:23:10 +02:00
Moonchild 4aedc96db2 No issue - Adjust CSP URI reporting more closely with the spec.
According to the W3C discussion we should allow websocket URIs to be
reported aside from http/https/ftp ones.
This rewrites things slightly and updates comments to clarify.
We do retain the non-standard reduction to origin only in case the
report is for cross-origin URIs (stops leaking full URIs to the CSP
reported destination).
See https://github.com/w3c/webappsec-csp/issues/735
2025-07-25 14:22:58 +02:00
Francis Dominic Fajardo 234830da1e Issue #2826 - Set up fontconfig on XRE startup (GTK only) 2025-07-25 14:22:35 +02:00
Moonchild 244b95968f Issue #2720 - Follow-up: Use temp value for duplicate color stop 2025-07-25 14:20:13 +02:00
Moonchild 810cd553b5 [devtools] Further improve special character escaping in "copy as curl".
Follow-up to 15335ce39d

Trying to cross-platform sanitize causes issues escaping too much and
as a result mangling the curl commands that get spit out.
This reverts previously added Windows-specific escaping on POSIX and
vice versa.
Since we do not offer cross-platform copying as a curl command in devtools
anyway, it makes little sense to sanitize for the O.S. we're not running on
as we would not be using the command processor in such environments that
could trip over characters for the other O.S. This was previously added
as a defense-in-depth in case we would start offering this, but I see no
real reason to do so, anyway.

Also decided to in-line comments for readability instead of a bulleted
list in the function head.

Mozilla has taken similar steps because of fall-out, but they do offer
cross-platform "copy as curl" for corner cases, so they will have to
find solutions for a problem we won't have.
2025-07-08 22:57:28 +02:00
Basilisk-dev e52eaa961c Issue #2773 - Allow building FFVPX on all architectures (uplift)
Resolves build bustage.
2025-07-03 20:16:10 +02:00
Moonchild b7827091b8 Merge branch 'master' into release 2025-06-26 14:26:02 +02:00
Moonchild 2e344377b5 Merge branch 'master' into release
# Conflicts:
#	devtools/client/shared/curl.js
#	security/nss/lib/ckfw/builtins/certdata.txt
#	security/nss/lib/nss/nss.h
#	security/nss/lib/softoken/softkver.h
#	security/nss/lib/util/nssutil.h
2025-06-24 17:08:59 +02:00
Moonchild 15335ce39d [devtools] Improve special character escaping for curl 2025-05-29 17:28:44 +02:00
Moonchild 14b03e1f8c No issue - Set device contrast to an acceptable value if OOB.
On Mac and Win+DW, enhanced device contrast can possibly not be set.
This throws Skia for a loop by passing in an OOB scalar to its init.
Work around this by setting an accepted average value that helps
prevent font wash-out while not causing fringing.
2025-05-29 17:28:30 +02:00
Moonchild 0968b94e5c No issue - Force C++ run-time type information on protobuf (uplift)
Protobuf uses `dynamic_cast` on polymorphic types which cannot be
inferred properly at compile-time, which can lead to unexpected behavior.
As a code safety measure, enable C++ RTTI for protobuf.
2025-05-29 17:27:29 +02:00
Moonchild ba6b2258aa No issue - Don't support modulo math space in ExtractLinearSum. (uplift) 2025-05-20 00:56:35 +02:00
Moonchild 1e1715ff11 No issue - Fix promise combinator function state. (uplift) 2025-05-19 22:50:48 +02:00
Brian Smith c93381fa79 No Issue - Fixes for building with LLVM 19 (uplift).
Fix a conflict with libc++ 19 and the old Mozilla (re)alloc macros.
LLVM 18+ does not allow std::char_traits<unsigned char> so avoid it.
https://bugzilla.mozilla.org/show_bug.cgi?id=1849070
Partial NSS upgrade to replace ByteString with a class.
https://bugzilla.mozilla.org/show_bug.cgi?id=1851092
2025-05-07 13:01:33 +02:00
Moonchild 65b0a59757 [devtools] Escape some more characters for copying as cURL on Posix. 2025-04-30 15:01:54 +02:00
Moonchild c785639043 [NSS] Update NSS version to 3.90.7 2025-04-30 15:01:48 +02:00
Moonchild 512c259822 [NSS] Update built-in data 2025-04-30 15:01:42 +02:00
Moonchild 90fea6f0d4 [NSS] Improve locking in nssPKIObject_GetInstances. 2025-04-30 15:01:35 +02:00
Moonchild d892468fd0 Issue #2731 - Fix crashes on unknown BigInt types in JIT (uplift)
This only works around the unknown type crashes but doesn't actually fix
attempts at using 64-bit BigInts in Ion.
Resolves #2731
2025-04-22 15:27:34 +02:00
Moonchild 81ab98b329 Merge branch 'master' into release 2025-04-04 20:37:42 +02:00
Moonchild 3f1cacd3e6 Merge branch 'master' into release 2025-04-03 10:22:24 +02:00
Moonchild 6e41e01a29 No issue - fix some minor link issues in about:rights
Privacy was moved to a subdir. Also replacing http with https because
that is what everyone expects by default.
2025-03-07 15:43:13 +01:00
Moonchild 9ce81488d4 No issue - Update Twemoji font to unicode 15.1.3 2025-03-07 02:06:25 +01:00
Moonchild 25bc2630d9 [js] Disable potentially unsafe attempts at recovering JIT operations. 2025-03-06 20:18:39 +01:00
Moonchild e5b69418a0 No Issue - NULL crash fix in nsExternalResourceMap::PendingLoad::OnDataAvailable
Curiously, we should have had this at our fork point (as it was backported
by Mozilla to 52.5.2) by apparently Tobin's import wasn't actually 52.6.0.
:-/
2025-03-06 20:18:24 +01:00
Shadow 229a69be5f Update js/src/wasm/WasmIonCompile.cpp
Bug 1328639 , wasm , Simplify block-value popping in Ion compilation
2025-03-06 20:18:07 +01:00
Moonchild 7f2561312a [layout] Always reserve 64 bits for frame property value
This ensures frame property values can always be stored even in edge cases
on 32-bit machines (where a void ptr is half the width).
2025-02-18 21:42:59 +01:00
Moonchild 93d11a07f9 Issue #2694 - Improve nested grid layout performance by caching.
This improves performance by caching the grid items' block axis
measurement, avoiding potentially exponential calculations and reflows.
Resolves #2694
2025-02-18 16:57:20 +01:00
Moonchild 8e5e24c4c6 Issue #2693 - Disable CSP reporting by default in the platform.
This is a temporary measure to work around CF OOM situations.
Reporting is desirable normally so webmasters get alerted to CSP issues,
and this should be flipped back on once we can.
2025-02-18 10:13:35 +01:00
Moonchild 517ee6754c [DOM] Honor security.csp.reporting.enabled pref in more places. 2025-02-18 10:13:28 +01:00
Moonchild 47690c287c No issue - avoid potential underflow in StructuredClone.
Prevents potential loop-around if there's bogus internal Map data.
2025-02-18 10:13:19 +01:00
Moonchild 364b95170e Merge branch 'master' into release 2025-02-05 23:36:07 +01:00
Moonchild 407006d673 Merge branch 'master' into release 2025-02-05 18:33:29 +01:00
Moonchild 2d60605cc6 Merge branch 'master' into release
# Conflicts:
#	netwerk/cookie/nsCookieService.cpp
2025-02-03 19:13:42 +01:00
Moonchild 2d1129eb7e [network] Don't try to use non-existing connections. 2025-01-13 20:29:31 +01:00
Moonchild 495b4980e7 [DOM] Convert cleanup of FlushCurrentWord() to a ScopeExit task.
Ensures consistent cleanup even if early exit due to OOM.
2025-01-10 15:55:10 +01:00
Moonchild ad480be112 [DOM] Slightly extend lifetime of data in Structured Clone operations. 2025-01-10 15:54:44 +01:00
Moonchild a06001c022 [network] Verify connection NPN against negotiated NPN. 2025-01-10 15:54:35 +01:00
Moonchild 6cbda74aeb Issue #2670 - Compute baseDomain when cookies are read from the database
baseDomain is used as a key for cookies in a hashmap. For cookie
operations to work properly, the baseDomain generation must be reliable.
This is, however, not the case, because the result can change by updates
to the public suffix list (PSL).

Since the stored baseDomain is not reliable, the value must be recomputed
when the database is read. This causes a minor performance hit but is
needed if we want to keep abreast of PSL changes without clobbering the
cookies database.

Resolves #2670
2024-12-24 22:12:33 +01:00
Moonchild 576fbdf490 Issue #2672 - Follow-up: Remove unused telemetry variable. 2024-12-24 22:12:24 +01:00
Moonchild 52b00c38ea Issue #2672 - Part 4: Prevent db access while rebuilding is underway. 2024-12-24 22:12:15 +01:00
Moonchild 8ec56f459b Issue #2672 - Part 3: Ensure thread lifetimes are in tandem. 2024-12-24 22:12:05 +01:00
Moonchild 5cbe423461 Issue #2672 - Part 2: Auto-close syncConn for edge cases. 2024-12-24 22:11:59 +01:00
Moonchild 369fbba750 Issue #2672 - Part 1: Load nsCookieService OMT and use sync reads.
No more lazy-loading on the main thread, thanks. Everyone needs this.
2024-12-24 22:11:52 +01:00
Martok 8e3c35efc6 Issue #1787 - Follow-up: remove no longer used AppClearDataObserver. 2024-12-24 22:11:37 +01:00
Moonchild b3b852b877 Merge branch 'master' into release 2024-12-04 11:10:21 +01:00
Moonchild d5c6e20e9e Merge branch 'master' into release 2024-12-01 20:52:12 +01:00
Moonchild 89b36775fb Merge branch 'master' into release 2024-11-29 10:21:36 +01:00
Karl Tomlinson df16df5693 Bug 1920800 - Remove oldImages from check for flushed old principal handle
The logic should be equivalent when frame IDs on aImages are contiguously
increasing from IDs on previously set frames.

There are currently no callers passing empty aImages, but the logic in this
case would now be as described in the documentation of
UpdatePrincipalHandleForFrameID():

> We will notify mElement that aPrincipalHandle has been applied when all
> FrameIDs prior to aFrameID have been flushed out.
2024-10-31 11:44:56 +01:00
Moonchild aa1fd576ac Issue #2648 - Inherit the content disposition of the multipart response 2024-10-30 10:54:11 +01:00
Moonchild 2512188ca7 Issue #2648 - Apply CSP to documents sent through multipart/x-mixed-replace 2024-10-30 10:54:04 +01:00
Moonchild 89e88ca6a0 Merge branch 'master' into release 2024-10-02 19:45:47 +02:00
Moonchild 2697dd162f [js xpconnect] Fix error handling in xpc::CreateSandboxObject 2024-09-05 10:13:09 +02:00
Moonchild 53a4179c4a [js] Simplify with-env handling in FetchName 2024-09-05 10:13:01 +02:00
Moonchild a120731ddd [DOM] Stop exposing NotifyPaintEvent to web content.
There's no reason this should be available to the web, as it's an
indicator of browser internals.
2024-09-05 10:12:55 +02:00
Moonchild bda611a41a Revert "Issue #2523 - Part 1 - Import headers from FFmpeg 7.0"
This reverts commit 27bb48deaf.
2024-09-03 13:03:20 +02:00
Moonchild 5a02a4a1a4 Revert "Issue #2523 - Part 2 - Update audio & video decoders to work with FFmpeg 7.0"
This reverts commit 7dbc24a739.
2024-09-03 13:03:12 +02:00
Moonchild e59f358b45 Revert "Issue #2527 - Part 1 - Remove old FFmpeg and LibAV headers"
This reverts commit b970fc412a.
2024-09-03 13:02:55 +02:00
Moonchild 90c9535b39 Revert "Issue #2527 - Part 2 - Remove support for libavcodec < 58"
This reverts commit 738c6a740a.
2024-09-03 13:02:46 +02:00
Moonchild ad778bbfdb Revert "Issue #2527 - Part 3 - Remove additional checks for LibAV"
This reverts commit b0f872c919.
2024-09-03 13:02:31 +02:00
Moonchild 8868552b24 Merge branch 'master' into release 2024-08-09 19:35:34 +02:00
Moonchild 66826eb487 Merge branch 'master' into release 2024-08-09 19:18:02 +02:00
Moonchild 39127b5ee9 Merge branch 'master' into release 2024-08-09 16:18:50 +02:00
Moonchild 80cff816a8 Merge branch 'master' into release 2024-08-09 15:56:36 +02:00
Moonchild e9dda8dafa Merge branch 'master' into release
# Conflicts:
#	security/nss/doc/rst/releases/index.rst
#	security/nss/lib/nss/nss.h
#	security/nss/lib/softoken/softkver.h
#	security/nss/lib/util/nssutil.h
2024-08-07 20:13:00 +02:00
Moonchild 11fc818dfb [DOM/network] Disable DNS prefetching if document nodePrincipal is systemPrincipal 2024-07-10 10:54:53 +02:00
Moonchild 84ed844e3f [IPC] Clean up control flow in WaitableEvent. 2024-07-10 10:54:43 +02:00
Moonchild 50af804f1c [network] Add additional cookie setting checks.
Added checks for sub-document navigations from cross-site to same-site in
third-party checks when setting a cookie.
2024-07-10 10:54:37 +02:00
Moonchild 82ce93bce9 No issue - Update SQLite to 3.46.0 2024-07-10 10:54:24 +02:00
Moonchild 228abc8259 No issue - Update NSS to 3.90.3 2024-07-10 10:54:17 +02:00
Moonchild 1692fa5291 Issue #2045 - Temporarily force hidden elements to be actually hidden.
For the time being, because we don't have `revert` yet, we should force
normally hidden elements to be hidden, so they aren't revealed by sites
using the bad practice of `*{ }` style blanking rules but then using
`revert` to re-hide them.
2024-07-10 10:54:02 +02:00
Moonchild bb58c6ae38 Issue #2541 - Deal with empty LineNameList in CSS grid templates.
Resolves #2541
2024-07-02 01:39:01 +02:00
Moonchild 4f58dc27f9 Re-synchronize branches, picking up 2 commits that were not correctly merged. 2024-06-16 12:32:02 +02:00
Moonchild fc5324b9f7 Issue #2532 - Align dialog submission triggered by form.submit() with the spec.
Submission in click handler of submit button should not be deferred
per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submit-dialog

See Bug 1719872
2024-06-15 17:56:37 +02:00
Moonchild 561f65aabf Issue #2532 - Prevent unwanted text selection when backdrop is clicked. 2024-06-15 17:56:31 +02:00
Moonchild 9acfe36b95 Issue #2532 - Don't do PreventDefault for escape key if <select> dropdown is not shown
We always use PreventDefault for <select> element, which is problematic if modal
dialog is on as it prevents cancelling the dialog. We fix it by not blocking the
default action if <select> is not shown.

See Bug 1649278
2024-06-15 17:56:25 +02:00
Moonchild ce495cbd85 Issue #2532 - Fix a null pointer crash while doing dialog form submission
See Bug 1652699
2024-06-15 17:56:20 +02:00
Moonchild c44020f188 Issue #2532 - Default pref check to true 2024-06-15 17:56:15 +02:00
Moonchild 35e7a695af Issue #2532 - Implement form[method=dialog]
See bug 1557303
2024-06-15 17:56:08 +02:00
Moonchild 7a55055d22 Merge branch 'master' into release 2024-06-13 21:31:39 +02:00
Moonchild 061900b87f [gfx] Use calloc for cairo font-creation functions. 2024-05-23 13:48:18 +02:00
Moonchild abe32f7309 [gfx] Ensure font entry's unitsPerEm and font extents are initialized when gfxFont is created. 2024-05-23 13:48:11 +02:00
Moonchild 7bfd4c7fe7 [DOM] Clean up ReportLoadError and normalize error messages. 2024-05-23 13:48:04 +02:00
Moonchild 859d6a3e2c [gfx] Clear mSharedBlobData if blob creation failed. 2024-05-23 13:47:58 +02:00
Moonchild c2f05f99af [network] Make http digest auth cnonce length configurable. 2024-05-23 13:47:50 +02:00
Moonchild 55b33fb02b Merge branch 'master' into release 2024-04-19 22:05:10 +02:00
Moonchild c247e40d41 Revert "Update NSS to 3.90.2"
This reverts commit b1cb7e0a8f.
2024-03-23 07:45:56 +01:00
Moonchild 05c58f159d Revert "Undo build system change from NSS update to fix missing command-line utils."
This reverts commit 67d5fefcf2.
2024-03-23 07:45:40 +01:00
Moonchild 67d5fefcf2 Undo build system change from NSS update to fix missing command-line utils. 2024-03-21 21:53:57 +01:00
Moonchild aad017be9e [MFBT] Make move assignment of RefPtr have the same behavior as nsCOMPtr 2024-03-20 19:52:30 +01:00
Moonchild 4543dbf3ff [parser] Specialize AddAttributes for <html>/<body>. 2024-03-20 19:52:24 +01:00
Moonchild b1cb7e0a8f Update NSS to 3.90.2 2024-03-20 19:52:08 +01:00
Moonchild 1c6d21c97d [network] Block set-cookie from multipart/x-mixed-replace 2024-02-22 23:20:07 +01:00
Eitan Isaacson fc42fb38c9 [layout] Process pairs in coord list in PolyArea.
Range -1 assures the array is even with a step size of 2, avoiding lone
value processing.
2024-02-22 23:19:59 +01:00
Jens Stutte 618068c15b [DOM] Check if WorkerRunnable::Run runs on top of WorkerThreadPrimaryRunnable::Run in a worker thread. 2024-02-22 23:19:53 +01:00
FranklinDM 808516a0a8 No issue - Replacing location might throw NS_ERROR_UNEXPECTED while the developer tools window is being destroyed 2024-02-22 23:19:45 +01:00
FranklinDM 7d6b806040 No issue - Remove leftover doorhanger code from the developer tools
Partially based on reverting https://bugzilla.mozilla.org/show_bug.cgi?id=1078539
2024-02-22 23:19:38 +01:00
Martok 6b4e2c9d73 Issue #2453 - Follow-Up: Use hard-coded minimum timer interval in workers.
From the spec: "If nesting level is greater than 5, and timeout is less than 4, then set timeout to 4.",
therefore not having it user-configurable doesn't really break anything.
2024-02-22 23:19:20 +01:00
Moonchild 787883f6a4 Disable URL-paste content loading by default.
See https://repo.palemoon.org/MoonchildProductions/Pale-Moon/issues/1957
2024-02-22 23:18:36 +01:00
Moonchild 7f02753c04 Issue #2465 - Do not use our in-tree metrics hints if using system-cairo
Use a somewhat equivalent font-options instance when using the
system-supplied cairo lib, instead of our in-tree extension.

Resolves #2465
2024-02-07 21:40:55 +01:00
Moonchild 8fa38b3445 Issue #618 - Follow-up: Fix missed constant refactor preventing ExportEntries from working. 2024-02-07 21:40:29 +01:00
Moonchild 541c5f9f45 Merge branch 'master' into release 2024-01-25 15:55:20 +01:00
Moonchild 4b6bd4976a Merge branch 'master' into release
# Conflicts:
#	modules/libpref/init/all.js
2024-01-25 09:09:51 +01:00
Moonchild a0843d52b4 Revert "[XPCOM] Compare return value of readlink in nsLocalFileUnix::GetNativeTarget"
This reverts commit 188f61505f.
2023-12-21 14:03:31 +01:00
Kershaw Chang 977a8cbed8 Bug 1736385 - Make sure thread is alive in CacheIOThread::ThreadFunc 2023-12-21 11:44:50 +01:00
Moonchild 1e85085305 [dom] Better handling of aborted websocket workers.
Catch the case where we are in worker-shutdown but are still connecting
and make filing and closing connections a bit more robust with a RefPtr.
2023-12-21 11:44:42 +01:00
Barret Rennie 188f61505f [XPCOM] Compare return value of readlink in nsLocalFileUnix::GetNativeTarget 2023-12-21 11:44:32 +01:00
Moonchild a514d7f6a4 [layout] Always check against fragment length in nsTextFrame 2023-12-21 11:44:21 +01:00
Moonchild 47c2c75ceb Bug 1868901 2023-12-21 11:44:12 +01:00
Moonchild 7082ec8a9a No issue - Allow redirects for requests that require preflight
Spec update, see Bug 1312864
2023-12-21 11:43:58 +01:00
Brian Smith 2907a84362 Issue #2387 - Remove a missed AddRef() which could cause leaks.
Update comments explaining how the reference counting works.
2023-12-10 23:58:08 +01:00
Brian Smith b8d1ee05c3 Issue #2387 - Collection of fixes related to a crash while canceling a dynamic import.
Add AddRef/Release hooks for embedding's script or module private value and set this script source object where appropriate.
https://bugzilla.mozilla.org/show_bug.cgi?id=1519140 Partial, no Value passing changes.
Clear the list of dynamic import requests after cancelling them in ScriptLoader::ParsingComplete as we do for other requests.
https://bugzilla.mozilla.org/show_bug.cgi?id=1291535
ScriptLoader::OnStreamComplete never returns a failure.
https://bugzilla.mozilla.org/show_bug.cgi?id=1627275
Also cancel the correct kind of parser for Modules.
2023-12-10 23:57:54 +01:00
Moonchild 0b625e624a [DOM] Fix double-free crash in MessagePort.cpp 2023-12-10 17:02:28 +01:00
Moonchild a4da712f91 Issue #2281 - Exclude throw wrapping on modern libcpp.
As discussed.
2023-11-25 18:17:35 +01:00
Moonchild 185f124e87 Issue #2381 - Remove system-nspr/nss leftovers (release port) 2023-11-25 17:15:01 +01:00
Moonchild 8633077691 [WebGL] Flip the validation state for gl_KHR_no_validation.
The original state was inverted due to confusion due to a double
negative (not:no_error).
This validation should only be enabled on Windows (for now).
Future tracking and discussion in BZ 1862039
2023-11-24 12:24:55 +01:00
Moonchild 39a1899045 [DOM] Improve MessagePort state machine. 2023-11-24 12:24:32 +01:00
Moonchild 4dc011a187 [Network] Fix relative URL path starting with multiple slashes 2023-11-24 12:24:19 +01:00
Moonchild ccb12e1dda [DOM] Check if rootDoc is secure context for web compat 2023-11-24 12:24:04 +01:00
Moonchild 63f0d3e295 [WebGL] Turn on more validation/error checking in webgl (when not on Win) 2023-11-24 12:23:49 +01:00
Moonchild 09d598c496 Revert "No Issue - add mutex in EventSource"
This reverts commit 10b3237e52.

Apparently causes deadlocks in Linux.
2023-11-15 12:22:11 +01:00
Moonchild 7e60482d80 No issue - Stop supporting data: scheme in SVG <use> elements. 2023-11-14 12:42:58 +01:00
Moonchild 10b3237e52 No Issue - add mutex in EventSource
Potentially avoids a gc crash when load is high.
2023-11-14 12:42:26 +01:00
athenian200 99af7cc028 Issue #1824 - Support SunOS Linker mapfiles.
Generating OS-appropriate mapfiles from a provided SYMBOL_FILE is
apparently required to work with newer ffvpx. Nothing else in our
codebase actually seemed to require it. Also seems to reduce the amount
of console spam I see relating to symbol visibility during the build
process, and I think it even makes libxul.so link a bit faster.
2023-11-04 01:47:00 -05:00
athenian200 76b360b5d1 Issue #1824 - Move to GCC 10.
It seems to work, but it is a lot slower than compiling with GCC 7.
2023-11-04 01:38:20 -05:00
Moonchild 4001b58a3e [DOM] For now, use C++11 static_asserts only.
Single-param static_assert is C++17 or later.
Follow-up to 3d92b82125
2023-10-27 14:20:10 +02:00
Moonchild 134a8aac87 Issue #35 - Follow-up: undo locale changes so they aren't pre-processed.
Pre-processing loses our localization notes and licensing headers for
l10n which is not a good thing. It's not a big deal having a few unused
strings in these files in the resulting locales.
2023-10-26 22:47:13 +02:00
Moonchild 3e2e48872a Merge branch 'master' into release 2023-10-25 22:51:58 +02:00
Moonchild 622b43cbc5 Merge branch 'master' into release 2023-10-25 22:49:37 +02:00
Moonchild 75b44ef620 Merge branch 'master' into release
# Conflicts:
#	js/src/wasm/WasmBinaryIterator.cpp
#	media/libvpx/vp8/encoder/onyx_if.c
2023-10-05 23:43:10 +02:00
Basilisk-Dev 00084ea49c Cherry-pick upstream libvpx fix
Backport of https://hg.mozilla.org/releases/mozilla-esr115/rev/5241232a3292943bd59ff1704eab60fee3cbc9d1
Addresses CVE-2023-5217
2023-09-28 16:18:01 +02:00
Moonchild b6fae24296 [network] Refactor TransactionObserver::OnDataAvailable() 2023-09-27 21:55:28 +02:00
André Bargull 13c6b7422d [js] Handle dead wrappers 2023-09-27 21:55:19 +02:00
Moonchild 24f2e663cd Restore incorrect SIMD Op removals. 2023-09-25 10:48:42 +02:00
Brian Smith f96b155988 Issue #2313 - Implement WebAssembly sign extension opcodes. (uplift) 2023-09-25 10:46:25 +02:00
Brian Smith d5cc24e916 Issue #2308 & #1240 Follow-up - Fill in missing JSOP_INC/DEC cases for Doubles in Ion. 2023-09-20 03:34:06 +02:00
Brian Smith 8eba271c5f Issue #2308 & #1240 Follow-up - Replace JSOP_POS in ++/-- with JSOP_TONUMERIC.
https://bugzilla.mozilla.org/show_bug.cgi?id=1519135
2023-09-20 03:33:57 +02:00
Brian Smith 19955c82b3 Issue #2308 & #1240 Follow-up - Fill in missing JSOP_INC/DEC cases for Ion on Intel32/64. 2023-09-20 03:33:50 +02:00
Brian Smith 80ae8aec7c Issue #2308 & #1240 Follow-up - Add BigInt support to JSOP_INC and JSOP_DEC.
https://bugzilla.mozilla.org/show_bug.cgi?id=1526309
2023-09-20 03:33:41 +02:00
Brian Smith d8441d7c81 Issue #2308 & #1240 Follow-up - Introduce new increment and decrement operations.
https://bugzilla.mozilla.org/show_bug.cgi?id=1508521
2023-09-20 03:33:33 +02:00
Brian Smith c2446f2478 Issue #2308 - Fix JSON BigInt regressions.
https://bugzilla.mozilla.org/show_bug.cgi?id=1522433
2023-09-20 03:33:23 +02:00
Brian Smith 6efb7a1904 Issue #2282 - Performance observer safety checks.
Both fixes from later revisions, without the Dispatch API changes.
2023-09-20 03:33:14 +02:00
Brian Smith fa0b03a10f Issue #2026 Follow-up: Fill in missing BigInt64 cases in js::IsTypedArrayConstructor().
Hopefully fixes RSA errors on ProtonMail.
2023-09-20 03:32:41 +02:00
Moonchild 3ae2972950 Issue #2309 - Cherry-pick upstream libwebp fix.
Backport of: https://chromium.googlesource.com/webm/libwebp.git/+/2af26267cdfcb63a88e5c74a85927a12d6ca1d76

Resolves #2309
2023-09-13 10:22:50 +02:00
Moonchild 2d48de9998 Merge branch 'master' into release 2023-09-01 15:44:29 +02:00
Moonchild 3b029cdfe4 Merge branch 'master' into release 2023-07-15 16:01:39 +02:00
Moonchild ea9077a8a5 Merge branch 'master' into release 2023-07-07 19:41:06 +02:00
Moonchild b4af6b6265 No issue - Set the default for incremental cycle collector to be off.
Negative performance impact if enabled.
2023-06-05 21:17:24 +02:00
Moonchild ae1d53ceb1 Issue #2257 - Remove rematerialized frames after bailouts and exceptions.
This ensures that rematerialized frames used by the devtools debugger
are properly removed so that no stale data is used during bailouts.
2023-06-05 21:17:13 +02:00
Brian Smith c3f4709d5e Issue #2252 - Prevent crash when attempting to load a script with execution disallowed.
This issue is due to the ExecutionContext added in Issue #1691 not handling GetScript()
in a context where script execution is not allowed.  This expressed itself in crashes when
playing MP4s with the NoScript extension installed and enabled.
2023-06-05 21:16:57 +02:00
FranklinDM a7bb3fc175 Issue #1592 - Follow-up: Ensure topmost scope marker is cleaned up 2023-06-05 21:16:43 +02:00
FranklinDM 6a0203f25f Issue #2250 - Part 2: Ignore the ancestor filter assertion if rule matching is restricted or if the current element is under a shadow host
This only affects debug builds.
2023-06-05 21:16:31 +02:00
FranklinDM b0dfcb147f Issue #2250 - Part 1: Return early if the element being tested for is likely an ancestor and does not have an assigned slot 2023-06-05 21:16:22 +02:00
Job Bautista 06fd4c9357 Issue #2221 - Follow-up: Simplify jit_ioncheck{1|2|3}_deunified_sources assignment. 2023-06-05 21:15:52 +02:00
Job Bautista b9ea7fd9ee Issue #2221 - Follow-up: Ensure jit_ioncheck{1|2|3}_deunified_sources is defined.
Should fix build bustage in armhf, as well as prevent bustage in mips32.
2023-06-05 21:15:33 +02:00
Moonchild 58308a5c7a Merge branch 'master' into release
# Conflicts:
#	python/mozbuild/mozpack/dmg.py
2023-05-11 17:35:14 +02:00
Brian Smith 88c7d54975 No Issue - Fix FreeBSD build failure with WebRTC enabled. (release uplift)
Tag #2227
2023-05-01 22:12:11 +02:00
Timothy Valldeperas eadb5678b3 Issue #2175 - Fix build bustage in WebRTC. (release uplift)
Resolves #2227
2023-05-01 19:04:57 +02:00
Moonchild 54e3e60796 Revert "[devtools] Don't allow sourcemap URLs to redirect"
This reverts commit 2a05494abe.
2023-04-17 10:25:45 +02:00
Moonchild 2a05494abe [devtools] Don't allow sourcemap URLs to redirect 2023-04-13 10:54:34 +02:00
Moonchild bc89e58def [network] Improve checks while parsing MIME parameters. 2023-04-13 10:54:27 +02:00
Moonchild 3a009b97f6 Issue #1911 - Follow-up: Filter out illegal characters in more locations. 2023-04-13 10:54:10 +02:00
Moonchild a105f6d5e9 No issue - Fix off-by-one of kLargeDatasetSize 2023-04-13 10:54:02 +02:00
Sandra 5db241c0c0 Increase size of data over which we write the data to disk rather than keep it around in memory 2023-04-13 10:53:53 +02:00
Sandra d38dca10e5 Use nsAnonymousTemporaryFile for clipboard cache
Base on https://github.com/mozilla/gecko-dev/commit/ecc04a9245b409d7eed7df63ba733cd2073180de
2023-04-13 10:53:14 +02:00
Moonchild 54fc723126 Issue #2180 - Follow-up: Move sentinel check up a bit. 2023-04-02 15:39:05 +02:00
Moonchild 9b8ca17ee4 Issue #2180 - Add pref to control NSS TLS 1.3 protocol downgrade sentinel 2023-04-02 15:38:57 +02:00
Moonchild cddc95b39b 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-04-02 15:38:31 +02:00
Moonchild 5676529793 Issue #2171 - Skip over shadow nodes that don't have an owning node.
Resolves #2171
2023-04-02 15:37:44 +02:00
Moonchild ce68156cf4 Revert "[widget] Linux GTK3: Detach accessible from moz_container before it's deleted"
This reverts commit 465a18f342.
Resolves #2168
2023-03-18 19:57:56 +01:00
Moonchild 5032ad9593 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-17 22:11:30 +01:00
Moonchild b55f765f2e Issue #1911 - Follow-up: Filter out illegal file extensions also.
We already did this for file names, just not extensions.
2023-03-17 12:02:55 +01:00
Moonchild 856078d435 [widget] Linux GTK3: Detach accessible from moz_container before it's deleted 2023-03-17 12:02:46 +01:00
Moonchild c74c262d2f [GFX] Add some sanity checks and clamps to SurfaceData calculations. 2023-03-17 12:02:38 +01:00
Moonchild 787e29e374 No Issue - Ensure more OsiSpace
ensureOsiSpace(); was very much under-used. This adds more instances
where it makes sense to ensure Osi space before placing masm calls.
2023-03-17 12:02:31 +01:00
FranklinDM e439896c9b Issue #2148 - Shrink Vector from (usually) four pointers in size to three
when no inline storage is used.

See Bug 1338374
2023-03-17 12:02:20 +01:00
FranklinDM 15b508f1fb Issue #2148 - Make Vector not use AlignedStorage for its inline element storage
See Bug 1338374 1/2
2023-03-17 12:02:12 +01:00
Job Bautista 5651ebfc76 Issue #2148 - Discard RegExpShared data tables when discarding regexp JIT code.
Based on Mozilla bug 1378736's part 2.
Should fix the double-free.
Follow-up for #2083
2023-03-17 12:02:04 +01:00
Job Bautista 593bfc1ce8 Issue #2148 - Don't null out RegExpObject -> RegExpShared pointer on GC.
Follow-up for issue #2083.
Taken from Mozilla bug 1378736.
2023-03-17 12:01:50 +01:00
Brian Smith 28953cda7a Issue #2160 - Initial support for notarizing during DMG package.
Added --with-macbundle-idenity configure option to set a codesign identity.
If no identity is set or cross-compiling from Linux no codesigning will be
done. Currently doing a full deep bundle v2 sign, instead of limited v1.
2023-03-15 15:10:52 +01:00
Moonchild 516f3f545d Merge branch 'master' into release
# Conflicts:
#	CLOBBER
#	js/src/vm/RegExpObject.cpp
#	security/nss/lib/nss/nss.h
#	security/nss/lib/pkcs12/p12d.c
#	security/nss/lib/softoken/softkver.h
#	security/nss/lib/util/nssutil.h
2023-03-13 13:11:20 +01:00
Moonchild 83aff65a42 Force clobber 2023-02-19 17:53:31 +01:00
Moonchild 5bd97df957 [NSS] Update NSS to 3.52.9 to pick up fixes. 2023-02-19 17:51:26 +01:00
Moonchild 8772711181 [DOM] Check whether module load request was already cancelled when a load fails 2023-02-19 17:51:18 +01:00
Moonchild dc9526f4c6 [widget] Properly test for and handle errors in target-surface creation
and mapping.
2023-02-19 17:51:10 +01:00
Moonchild 9ab36e7ae0 Issue #2103 - Fix typo in RegExp Parser
This corrects the typo where the left-hand character would determine if
the right-hand character would be added or not.

Resolves #2103
2023-02-02 10:50:47 +01:00
Job Bautista e8d30841e7 Issue #2091 - Parse \p{Extended_Pictographic} too.
This is essentially a follow up to Issue #1286. We already have
 UCHAR_EXTENDED_PICTOGRAPHIC in our in-tree ICU, so there's no reason to comment
 this case out.
2023-01-27 05:01:53 +01:00
Martok 9faf29374e Issue #2093 - Trace HeapPtr<RegExpShared::groupsTemplate_> for GC move/compact events, regression from #2072 2023-01-26 20:11:28 +01:00
Moonchild 75e4818d36 Merge branch 'master' into release 2023-01-19 00:42:00 +01:00
Moonchild a65144e9e0 Fix merge conflicts. 2023-01-13 12:55:52 +01:00
Moonchild 4f29548526 Merge branch 'master' into release
# Conflicts:
#	image/decoders/nsJXLDecoder.cpp
#	js/src/irregexp/NativeRegExpMacroAssembler.cpp
#	js/src/irregexp/RegExpAST.h
#	js/src/irregexp/RegExpEngine.cpp
#	js/src/irregexp/RegExpParser.cpp
#	js/src/irregexp/RegExpParser.h
#	xpcom/io/nsLocalFileUnix.cpp
2023-01-13 12:11:56 +01:00
Moonchild 528db2cbd8 Issue #1818 - Remove obsolete path hack in widget code. 2022-12-16 09:13:48 +00:00
Moonchild 84e6bcc1e6 [network] Align cookie checks with RFC 6265 (bis) 2022-12-16 09:13:38 +00:00
Moonchild 0dc9ff518d [libjar] Add some extra sanity checks to our Zip reader. 2022-12-16 09:13:25 +00:00
Moonchild a2e3bd44aa [network] move some generic websocket code to the baseclass 2022-12-16 09:13:09 +00:00
Moonchild 163a0e7caf Revert "Issue #1279 - Implement regular expressions lookbehind (v2)"
This reverts commit d10e8a5b06.
2022-12-15 09:11:02 +00:00
Moonchild 49a86db5f3 Issue #2040 - Pre-multiply the alpha values in our JXL decode buffer. (uplift)
Using selective calculation (only if not opaque) and fast integer
math here should optimize well in compilers.
2022-12-15 09:09:19 +00:00
Moonchild 2640953d8b 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-26 18:18:09 +00:00
Moonchild 7eb7d67f7a Issue #2033 - Temporary fix of R<->B channel swap.
We have a BGR/RGB channel ordering mismatch here. to at least
provide proper display, a quick&dirty byte swap on the output
buffer will fix this for now, but we should look into seeing where
the surface mismatch is caused.
std::swap() should optimize pretty well in any of the used
compilers, but if necessary, a full buffer ASM routine can be
slotted in (although on current hardware I doubt this will be
even noticeable as it is)
2022-11-26 02:43:18 +00:00
Moonchild e28860ba7f Revert "[XPCOM] Deal with lstat potentially lying in nsLocalFileUnix."
This reverts commit c127f58ef3.
2022-11-20 14:14:48 +00:00
Moonchild 49a96b1d91 Merge branch 'master' into release 2022-11-19 20:15:23 +00:00
Moonchild 3130812693 Merge branch 'master' into release 2022-11-12 18:34:07 +00:00
Moonchild 71ae69aea8 [WebGL] Implement webgl.max-size-per-texture-mib 2022-10-26 14:50:05 +00:00
Moonchild 9e34d697c7 [XPCOM] Fix Base64 off-by-one issue and safeguard against this mistake in the future. 2022-10-26 14:49:55 +00:00
Moonchild 8fa9125d02 [No issue] Hold some strong references on nsRefreshDriver 2022-10-26 14:49:46 +00:00
Brian Smith 4b4488c3e4 Issue #2022 - Part 2 - Add Ventura version detection.
Also add Monterey and Ventura to the graphics driver blocklist.
2022-10-26 14:49:33 +00:00
Brian Smith 248db7d301 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-26 14:49:23 +00:00
Moonchild e199f2949b [No issue] Ensure LockImpl::Try() returns the correct bool value. 2022-10-26 14:45:39 +00:00
Moonchild 456b5450a4 Issue #2010 - Ensure raw tagnames are safe exiting internalEntityParser
This resolves #2010
2022-09-28 13:50:10 +00:00
Moonchild d8e629c4a3 Merge branch 'master' into release 2022-09-27 20:12:40 +00:00
Moonchild 4898c4f297 Merge branch 'master' into release 2022-09-24 12:16:59 +00:00
Moonchild 7cd578bbc6 Merge branch 'master' into release 2022-09-22 13:16:48 +00:00
Moonchild 1e91df628a Merge branch 'master' into release 2022-09-22 11:52:16 +00:00
Moonchild b110549cbd Merge branch 'master' into release 2022-07-27 06:07:45 +00:00
Moonchild 971047835a Merge branch 'master' into release
# Conflicts:
#	config/milestone.txt
#	toolkit/mozapps/extensions/internal/XPIProvider.jsm
2022-07-25 20:47:06 +00:00
Moonchild dd4d9eb032 [XPCOM] Crash safely when TArray replacements are OOB.
In the unlikely event of TArray element replacement calls are OOB, crash safely
with a debug breakpoint instead of corrupting memory.
2022-07-03 15:49:44 +00:00
Moonchild 8b94f1e480 [DOM] use the sanitizer to restrict href in svg:use to fragment-only URLs 2022-07-03 15:49:34 +00:00
Moonchild c89610a5c7 [network] Clear PAC loader when the load failed 2022-07-03 15:49:23 +00:00
Moonchild 217963cbed Update NSS to 3.52.7 2022-07-03 15:49:14 +00:00
Moonchild c4f4e18340 [DOM media] Remove potentially unsafe type accesses when debug logging 2022-07-03 15:49:04 +00:00
Moonchild 8a7c0e7345 [network] Clean up and update the list of external protocol handlers. 2022-07-03 15:48:54 +00:00
Moonchild 52e304d450 Issue #1053 - Follow-up: Correct conditional define on POSIX systems. (uplift)
This conditional was incorrectly changed when removing Android support.
This potentially causes issues on Linux systems by not using pthreads correctly,
which may lead to high idle CPU usage.
2022-06-28 13:28:20 +00:00
Moonchild cfc0eeca53 Revert "Issue #1909 - Guard against empty update manifest URL"
This reverts commit d7fadcdef9.
2022-06-07 11:59:07 +00:00
Moonchild ebd3dd9228 Merge branch 'master' into release 2022-06-03 21:50:44 +00:00
Moonchild cb40e4e7ef Merge branch 'master' into release 2022-06-01 13:54:11 +00:00
Moonchild 662dba55fd Merge branch 'master' into release 2022-05-29 11:13:44 +00:00
Moonchild 8760ce023c Issue #1895 - Implement queueMicroTask(callback()) (uplift) 2022-05-07 14:40:14 +00:00
Moonchild b86e148bb7 Roll back milestone version to release. 2022-05-06 12:43:43 +00:00
Moonchild 9e83721e5e Merge branch 'master' into release 2022-05-06 12:43:00 +00:00
Moonchild dc2d6c2e60 Revert "No Issue - Make content-type on JAR channels behave the same as HTTP channels."
This reverts commit 425677ada7.
2022-05-03 17:38:19 +00:00
Moonchild 4ada6f6762 Update 7zSD for v31 2022-05-03 17:38:12 +00:00
420 changed files with 24249 additions and 18666 deletions

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ private:
{
explicit IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr);
Accessible* mParent;
RefPtr<Accessible> mParent;
int32_t mIndex;
IteratorState* mParentState;
};
+8 -2
View File
@@ -304,12 +304,18 @@ Element::TabIndex()
}
void
Element::Focus(mozilla::ErrorResult& aError)
Element::Focus(const FocusOptions& aOptions, ErrorResult& aError)
{
nsCOMPtr<nsIDOMElement> domElement = do_QueryInterface(this);
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
// Also other browsers seem to have the hack to not re-focus (and flush) when
// the element is already focused.
// Until https://github.com/whatwg/html/issues/4512 is clarified, we'll
// maintain interoperatibility by not re-focusing, independent of aOptions.
// I.e., `focus({ preventScroll: true})` followed by `focus( { preventScroll:
// false })` won't re-focus.
if (fm && domElement) {
aError = fm->SetFocus(domElement, 0);
aError = fm->SetFocus(domElement, nsFocusManager::FocusOptionsToFocusManagerFlags(aOptions));
}
}
+1 -1
View File
@@ -216,7 +216,7 @@ public:
/**
* Make focus on this element.
*/
virtual void Focus(mozilla::ErrorResult& aError);
virtual void Focus(const FocusOptions& aOptions, ErrorResult& aError);
/**
* Show blur and clear focus.
+7 -1
View File
@@ -395,8 +395,14 @@ FileReader::ReadFileContent(Blob& aBlob,
return;
}
CheckedInt<size_t> size(mTotal);
if (!size.isValid()) {
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
return;
}
if (mDataFormat == FILE_AS_ARRAYBUFFER) {
mFileData = js_pod_malloc<char>(mTotal);
mFileData = js_pod_malloc<char>(size.value());
if (!mFileData) {
NS_WARNING("Preallocation failed for ReadFileData");
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
+7 -6
View File
@@ -400,6 +400,7 @@ ImageEncoder::ExtractDataInternal(const nsAString& aType,
layers::PlanarYCbCrImage* ycbcrImage = static_cast<layers::PlanarYCbCrImage*> (aImage);
gfxImageFormat format = SurfaceFormat::A8R8G8B8_UINT32;
uint32_t stride = GetAlignedStride<16>(aSize.width, 4);
auto size = stride * aSize.height;
size_t length = BufferSizeFromStrideAndHeight(stride, aSize.height);
if (length == 0) {
return NS_ERROR_INVALID_ARG;
@@ -413,10 +414,10 @@ ImageEncoder::ExtractDataInternal(const nsAString& aType,
stride);
rv = aEncoder->InitFromData(data.Elements(),
aSize.width * aSize.height * 4,
size,
aSize.width,
aSize.height,
aSize.width * 4,
stride,
imgIEncoder::INPUT_FORMAT_HOSTARGB,
aOptions);
} else {
@@ -433,10 +434,10 @@ ImageEncoder::ExtractDataInternal(const nsAString& aType,
return NS_ERROR_INVALID_ARG;
}
rv = aEncoder->InitFromData(map.mData,
aSize.width * aSize.height * 4,
map.mStride * aSize.height,
aSize.width,
aSize.height,
aSize.width * 4,
map.mStride,
imgIEncoder::INPUT_FORMAT_HOSTARGB,
aOptions);
dataSurface->Unmap();
@@ -467,10 +468,10 @@ ImageEncoder::ExtractDataInternal(const nsAString& aType,
return NS_ERROR_INVALID_ARG;
}
rv = aEncoder->InitFromData(map.mData,
aSize.width * aSize.height * 4,
map.mStride * aSize.height,
aSize.width,
aSize.height,
aSize.width * 4,
map.mStride,
imgIEncoder::INPUT_FORMAT_HOSTARGB,
aOptions);
emptyCanvas->Unmap();
+4 -2
View File
@@ -523,7 +523,8 @@ nsContentList::NamedItem(const nsAString& aName, bool aDoFlush)
}
void
nsContentList::GetSupportedNames(nsTArray<nsString>& aNames)
nsContentList::GetSupportedNames(nsTArray<nsString>& aNames,
FilterElementWithName aFilter)
{
BringSelfUpToDate(true);
@@ -546,7 +547,8 @@ nsContentList::GetSupportedNames(nsTArray<nsString>& aNames)
// Note: nsINode::HasName means the name is exposed on the document,
// which is false for options, so we don't check it here.
const nsAttrValue* val = el->GetParsedAttr(nsGkAtoms::name);
if (val && val->Type() == nsAttrValue::eAtom) {
if (val && val->Type() == nsAttrValue::eAtom &&
(!aFilter || aFilter(el))) {
nsIAtom* name = val->GetAtomValue();
MOZ_ASSERT(name != nsGkAtoms::_empty,
"Empty names don't get atomized");
+9 -1
View File
@@ -295,7 +295,9 @@ public:
aFound = !!item;
return item;
}
virtual void GetSupportedNames(nsTArray<nsString>& aNames) override;
virtual void GetSupportedNames(nsTArray<nsString>& aNames) override {
GetSupportedNames(aNames, nullptr);
}
// nsContentList public methods
uint32_t Length(bool aDoFlush);
@@ -303,6 +305,12 @@ public:
mozilla::dom::Element*
NamedItem(const nsAString& aName, bool aDoFlush);
// Used by HTMLAllCollection to limit the elements whose name attribute is
// considered. The filter MUST NOT cause any flushes.
using FilterElementWithName = bool (*)(nsIContent*);
void GetSupportedNames(nsTArray<nsString>& aNames,
FilterElementWithName aFilter);
// nsIMutationObserver
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
+36
View File
@@ -2259,6 +2259,31 @@ nsContentUtils::IsCallerContentXBL()
return xpc::IsContentXBLScope(c);
}
bool
nsContentUtils::IsSystemCaller(JSContext* aCx)
{
MOZ_ASSERT(NS_IsMainThread());
// This is similar to what SubjectPrincipal() does, except we do in fact
// assume that we're in a compartment here; anyone who calls this function in
// situations where that's not the case is doing it wrong.
JSCompartment *compartment = js::GetContextCompartment(aCx);
MOZ_ASSERT(compartment);
JSPrincipals *principals = JS_GetCompartmentPrincipals(compartment);
return nsJSPrincipals::get(principals) == sSystemPrincipal;
}
bool
nsContentUtils::ThreadsafeIsSystemCaller(JSContext* aCx)
{
if (NS_IsMainThread()) {
return IsSystemCaller(aCx);
}
return workers::GetWorkerPrivateFromContext(aCx)->UsesSystemPrincipal();
}
// static
bool
nsContentUtils::LookupBindingMember(JSContext* aCx, nsIContent *aContent,
@@ -7336,6 +7361,17 @@ nsContentUtils::HasDistributedChildren(nsIContent* aContent)
return false;
}
// static
bool nsContentUtils::IsNodeInEditableRegion(nsINode* aNode) {
while (aNode) {
if (aNode->IsEditable()) {
return true;
}
aNode = aNode->GetParent();
}
return false;
}
// static
bool
nsContentUtils::IsForbiddenRequestHeader(const nsACString& aHeader,
+24
View File
@@ -202,6 +202,23 @@ public:
static bool ThreadsafeIsCallerChrome();
static bool IsCallerContentXBL();
// The APIs for checking whether the caller is system (in the sense of system
// principal) should only be used when the JSContext is known to accurately
// represent the caller. In practice, that means you should only use them in
// two situations at the moment:
//
// 1) Functions used in WebIDL Func annotations.
// 2) Bindings code.
//
// Use pretty much anywhere else is almost certainly wrong and should be
// replaced with [NeedsCallerType] annotations in bindings.
// Check whether the caller is system if you know you're on the main thread.
static bool IsSystemCaller(JSContext* aCx);
// Check whether the caller is system if you might be on a worker thread.
static bool ThreadsafeIsSystemCaller(JSContext* aCx);
// In the traditional Gecko architecture, both C++ code and untrusted JS code
// needed to rely on the same XPCOM method/getter/setter to get work done.
// This required lots of security checks in the various exposed methods, which
@@ -2550,6 +2567,13 @@ public:
*/
static bool GPCEnabled();
/**
* Returns whether a node has an editable ancestor.
*
* @param aNode The node to test.
*/
static bool IsNodeInEditableRegion(nsINode* aNode);
/**
* Returns a LogModule that dump calls from content script are logged to.
* This can be enabled with the 'Dump' module, and is useful for synchronizing
+6
View File
@@ -48,6 +48,7 @@
#include "mozilla/ContentEvents.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ElementBinding.h"
#include "mozilla/dom/ShadowRoot.h"
#include "mozilla/dom/HTMLInputElement.h"
#include "mozilla/dom/HTMLSlotElement.h"
@@ -2999,6 +3000,11 @@ nsFocusManager::DetermineElementToMoveFocus(nsPIDOMWindowOuter* aWindow,
return NS_OK;
}
uint32_t nsFocusManager::FocusOptionsToFocusManagerFlags(
const mozilla::dom::FocusOptions& aOptions) {
return aOptions.mPreventScroll ? nsIFocusManager::FLAG_NOSCROLL : 0;
}
static bool
IsHostOrSlot(nsIContent* aContent)
{
+4
View File
@@ -26,6 +26,7 @@ class nsIMessageBroadcaster;
namespace mozilla {
namespace dom {
struct FocusOptions;
class TabParent;
}
}
@@ -110,6 +111,9 @@ public:
static nsIContent* GetFocusedDescendant(nsPIDOMWindowOuter* aWindow, bool aDeep,
nsPIDOMWindowOuter** aFocusedWindow);
static uint32_t FocusOptionsToFocusManagerFlags(
const mozilla::dom::FocusOptions& aOptions);
/**
* Returns the content node that focus will be redirected to if aContent was
* focused. This is used for the special case of certain XUL elements such
+3 -2
View File
@@ -7395,9 +7395,10 @@ nsGlobalWindow::Confirm(const nsAString& aMessage,
already_AddRefed<Promise>
nsGlobalWindow::Fetch(const RequestOrUSVString& aInput,
const RequestInit& aInit, ErrorResult& aRv)
const RequestInit& aInit,
CallerType aCallerType, ErrorResult& aRv)
{
return FetchRequest(this, aInput, aInit, aRv);
return FetchRequest(this, aInput, aInit, aCallerType, aRv);
}
void
+1
View File
@@ -929,6 +929,7 @@ public:
already_AddRefed<mozilla::dom::cache::CacheStorage> GetCaches(mozilla::ErrorResult& aRv);
already_AddRefed<mozilla::dom::Promise> Fetch(const mozilla::dom::RequestOrUSVString& aInput,
const mozilla::dom::RequestInit& aInit,
mozilla::dom::CallerType aCallerType,
mozilla::ErrorResult& aRv);
void PrintOuter(mozilla::ErrorResult& aError);
void Print(mozilla::ErrorResult& aError);
+1 -1
View File
@@ -37,7 +37,7 @@ native Visibility(mozilla::Visibility);
* observers to check which request they are getting notifications for.
*
* Please make sure to update the MozImageLoadingContent WebIDL
* interface to mirror this interface when changing it.
* mixin to mirror this interface when changing it.
*/
[scriptable, builtinclass, uuid(0357123d-9224-4d12-a47e-868c32689777)]
+16 -4
View File
@@ -33,17 +33,29 @@ nsWrapperCache::HoldJSObjects(void* aScriptObjectHolder,
}
}
static inline bool
IsNurseryWrapper(JSObject* aWrapper) {
return aWrapper && !JS::ObjectIsTenured(aWrapper);
}
void
nsWrapperCache::SetWrapperJSObject(JSObject* aWrapper)
{
mWrapper = aWrapper;
nsWrapperCache::SetWrapperJSObject(JSObject* aNewWrapper) {
JSObject* oldWrapper = mWrapper;
mWrapper = aNewWrapper;
UnsetWrapperFlags(kWrapperFlagsMask & ~WRAPPER_IS_NOT_DOM_BINDING);
if (aWrapper && !JS::ObjectIsTenured(aWrapper)) {
if (IsNurseryWrapper(aNewWrapper) && !IsNurseryWrapper(oldWrapper)) {
CycleCollectedJSContext::Get()->NurseryWrapperAdded(this);
}
}
void nsWrapperCache::ClearWrapperOnWrapFailure() {
if (IsNurseryWrapper(mWrapper)) {
CycleCollectedJSContext::Get()->NurseryWrapperRemovedSlow(this);
}
ClearWrapper();
}
void
nsWrapperCache::ReleaseWrapper(void* aScriptObjectHolder)
{
+2
View File
@@ -131,6 +131,8 @@ public:
SetWrapperJSObject(nullptr);
}
void ClearWrapperOnWrapFailure();
/**
* Update the wrapper if the object it contains is moved.
*
+11 -23
View File
@@ -3711,7 +3711,7 @@ class CGWrapWithCacheMethod(CGAbstractMethod):
failureCode = dedent(
"""
aCache->ReleaseWrapper(aObject);
aCache->ClearWrapper();
aCache->ClearWrapperOnWrapFailure();
return false;
""")
@@ -4464,9 +4464,6 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
isOptional=False,
invalidEnumValueFatal=True,
defaultValue=None,
treatNullAs="Default",
isEnforceRange=False,
isClamp=False,
isNullOrUndefined=False,
exceptionCode=None,
lenientFloatCode=None,
@@ -4544,6 +4541,12 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
# And we can't both be an object and be null or undefined
assert not isDefinitelyObject or not isNullOrUndefined
# Types can also have extended attributes, copy them over
isClamp = type.clamp
isEnforceRange = type.enforceRange
if type.treatNullAsEmpty:
treatNullAs = "EmptyString"
# If exceptionCode is not set, we'll just rethrow the exception we got.
# Note that we can't just set failureCode to exceptionCode, because setting
# failureCode will prevent pending exceptions from being set in cases when
@@ -5648,6 +5651,10 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
undefinedBehavior = "eNull"
else:
undefinedBehavior = "eStringify"
if type.treatNullAsEmpty:
treatNullAs = "EmptyString"
else:
treatNullAs = "Default"
nullBehavior = treatAs[treatNullAs]
def getConversionCode(varName):
@@ -6297,9 +6304,6 @@ class CGArgumentConverter(CGThing):
not self.argument.variadic),
invalidEnumValueFatal=self.invalidEnumValueFatal,
defaultValue=self.argument.defaultValue,
treatNullAs=self.argument.treatNullAs,
isEnforceRange=self.argument.enforceRange,
isClamp=self.argument.clamp,
lenientFloatCode=self.lenientFloatCode,
isMember="Variadic" if self.argument.variadic else False,
allowTreatNonCallableAsNull=self.argument.allowTreatNonCallableAsNull(),
@@ -8370,18 +8374,6 @@ class FakeArgument():
self.variadic = False
self.defaultValue = None
self._allowTreatNonCallableAsNull = allowTreatNonCallableAsNull
# For FakeArguments generated by maplike/setlike convenience functions,
# we won't have an interfaceMember to pass in.
if interfaceMember:
self.treatNullAs = interfaceMember.treatNullAs
else:
self.treatNullAs = "Default"
if isinstance(interfaceMember, IDLAttribute):
self.enforceRange = interfaceMember.enforceRange
self.clamp = interfaceMember.clamp
else:
self.enforceRange = False
self.clamp = False
self.identifier = FakeIdentifier(name)
@@ -11063,7 +11055,6 @@ class CGProxySpecialOperation(CGPerSignatureCall):
argument = arguments[1]
info = getJSToNativeConversionInfo(
argument.type, descriptor,
treatNullAs=argument.treatNullAs,
sourceDescription=("value being assigned to %s setter" %
descriptor.interface.identifier.name))
if argumentHandleValue is None:
@@ -12694,8 +12685,6 @@ class CGDictionary(CGThing):
getJSToNativeConversionInfo(
member.type,
descriptorProvider,
isEnforceRange=member.enforceRange,
isClamp=member.clamp,
isMember="Dictionary",
isOptional=member.canHaveMissingValue(),
defaultValue=member.defaultValue,
@@ -15575,7 +15564,6 @@ class CGCallbackInterface(CGCallback):
class FakeMember():
def __init__(self, name=None):
self.treatNullAs = "Default"
if name is not None:
self.identifier = FakeIdentifier(name)
+29 -1
View File
@@ -45,7 +45,8 @@ class Configuration(DescriptorProvider):
# Our build system doesn't support dep build involving
# addition/removal of "implements" statements that appear in a
# different .webidl file than their LHS interface. Make sure we
# don't have any of those.
# don't have any of those. See similar block below for partial
# interfaces!
#
# But whitelist a RHS that is LegacyQueryInterface,
# since people shouldn't be adding any of those.
@@ -66,6 +67,33 @@ class Configuration(DescriptorProvider):
if not thing.isInterface() and not thing.isNamespace():
continue
iface = thing
# Our build system doesn't support dep builds involving
# addition/removal of partial interfaces that appear in a different
# .webidl file than the interface they are extending. Make sure we
# don't have any of those. See similar block above for "implements"
# statements!
if not iface.isExternal():
for partialIface in iface.getPartials():
if (partialIface.filename() != iface.filename() and
# Unfortunately, NavigatorProperty does exactly the
# thing we're trying to prevent here. I'm not sure how
# to deal with that, short of effectively requiring a
# clobber when NavigatorProperty is added/removed and
# whitelisting the things it outputs here as
# restrictively as I can.
(partialIface.identifier.name != "Navigator" or
len(partialIface.members) != 1 or
partialIface.members[0].location != partialIface.location or
partialIface.members[0].identifier.location.filename() !=
"<builtin>")):
raise TypeError(
"The binding build system doesn't really support "
"partial interfaces which don't appear in the "
"file in which the interface they are extending is "
"defined. Don't do this.\n"
"%s\n"
"%s" %
(partialIface.location, iface.location))
self.interfaces[iface.identifier.name] = iface
if iface.identifier.name not in config:
# Completely skip consequential interfaces with no descriptor
+3
View File
@@ -164,6 +164,7 @@ public:
void Throw(nsresult rv) {
MOZ_ASSERT(NS_FAILED(rv), "Please don't try throwing success");
ClearUnionData();
AssignErrorCode(rv);
}
@@ -324,6 +325,7 @@ public:
// Throw() here because people can easily pass success codes to
// this.
void operator=(nsresult rv) {
ClearUnionData();
AssignErrorCode(rv);
}
@@ -393,6 +395,7 @@ private:
}
void AssignErrorCode(nsresult aRv) {
MOZ_ASSERT(mUnionState == HasNothing);
MOZ_ASSERT(aRv != NS_ERROR_TYPE_ERR, "Use ThrowTypeError()");
MOZ_ASSERT(aRv != NS_ERROR_RANGE_ERR, "Use ThrowRangeError()");
MOZ_ASSERT(!IsErrorWithMessage(), "Don't overwrite errors with message");
+2 -2
View File
@@ -13,7 +13,7 @@ from mozbuild import shellutil
# (whether camelCase, _underscorePrefixed, etc.) and the given array of
# extended attributes.
def generateLine(propName, extendedAttrs):
return " [%s] attribute DOMString %s;\n" % (", ".join(extendedAttrs),
return " [%s] attribute [TreatNullAs=EmptyString] DOMString %s;\n" % (", ".join(extendedAttrs),
propName)
def generate(output, idlFilename, preprocessorHeader):
print(idlFilename)
@@ -30,7 +30,7 @@ def generate(output, idlFilename, preprocessorHeader):
continue
# Unfortunately, even some of the getters here are fallible
# (e.g. on nsComputedDOMStyle).
extendedAttrs = ["Throws", "TreatNullAs=EmptyString"]
extendedAttrs = ["Throws"]
if pref is not "":
extendedAttrs.append('Pref="%s"' % pref)
File diff suppressed because it is too large. Load diff
+7 -5
View File
@@ -311,7 +311,7 @@ Cache::MatchAll(JSContext* aCx, const Optional<RequestOrUSVString>& aRequest,
already_AddRefed<Promise>
Cache::Add(JSContext* aContext, const RequestOrUSVString& aRequest,
ErrorResult& aRv)
CallerType aCallerType, ErrorResult& aRv)
{
if (NS_WARN_IF(!mActor)) {
aRv.Throw(NS_ERROR_UNEXPECTED);
@@ -341,12 +341,13 @@ Cache::Add(JSContext* aContext, const RequestOrUSVString& aRequest,
}
requestList.AppendElement(Move(request));
return AddAll(global, Move(requestList), aRv);
return AddAll(global, Move(requestList), aCallerType, aRv);
}
already_AddRefed<Promise>
Cache::AddAll(JSContext* aContext,
const Sequence<OwningRequestOrUSVString>& aRequestList,
CallerType aCallerType,
ErrorResult& aRv)
{
if (NS_WARN_IF(!mActor)) {
@@ -390,7 +391,7 @@ Cache::AddAll(JSContext* aContext,
requestList.AppendElement(Move(request));
}
return AddAll(global, Move(requestList), aRv);
return AddAll(global, Move(requestList), aCallerType, aRv);
}
already_AddRefed<Promise>
@@ -579,7 +580,8 @@ Cache::ExecuteOp(AutoChildOpArgs& aOpArgs, ErrorResult& aRv)
already_AddRefed<Promise>
Cache::AddAll(const GlobalObject& aGlobal,
nsTArray<RefPtr<Request>>&& aRequestList, ErrorResult& aRv)
nsTArray<RefPtr<Request>>&& aRequestList,
CallerType aCallerType, ErrorResult& aRv)
{
MOZ_DIAGNOSTIC_ASSERT(mActor);
@@ -605,7 +607,7 @@ Cache::AddAll(const GlobalObject& aGlobal,
RequestOrUSVString requestOrString;
requestOrString.SetAsRequest() = aRequestList[i];
RefPtr<Promise> fetch = FetchRequest(mGlobal, requestOrString,
RequestInit(), aRv);
RequestInit(), aCallerType, aRv);
if (NS_WARN_IF(aRv.Failed())) {
return nullptr;
}
+5 -3
View File
@@ -28,6 +28,7 @@ class RequestOrUSVString;
class Response;
template<typename T> class Optional;
template<typename T> class Sequence;
enum class CallerType : uint32_t;
namespace cache {
@@ -50,10 +51,11 @@ public:
const CacheQueryOptions& aOptions, ErrorResult& aRv);
already_AddRefed<Promise>
Add(JSContext* aContext, const RequestOrUSVString& aRequest,
ErrorResult& aRv);
CallerType aCallerType, ErrorResult& aRv);
already_AddRefed<Promise>
AddAll(JSContext* aContext,
const Sequence<OwningRequestOrUSVString>& aRequests, ErrorResult& aRv);
const Sequence<OwningRequestOrUSVString>& aRequests,
CallerType aCallerType, ErrorResult& aRv);
already_AddRefed<Promise>
Put(JSContext* aCx, const RequestOrUSVString& aRequest, Response& aResponse,
ErrorResult& aRv);
@@ -97,7 +99,7 @@ private:
already_AddRefed<Promise>
AddAll(const GlobalObject& aGlobal, nsTArray<RefPtr<Request>>&& aRequestList,
ErrorResult& aRv);
CallerType aCallerType, ErrorResult& aRv);
already_AddRefed<Promise>
PutAll(JSContext* aCx, const nsTArray<RefPtr<Request>>& aRequestList,
+3 -2
View File
@@ -4356,6 +4356,9 @@ CanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
textToDraw.Truncate();
}
// This is only needed to know if we can know the drawing bounding box easily.
const bool doCalculateBounds = NeedToCalculateBounds();
// for now, default to ltr if not in doc
bool isRTL = false;
@@ -4376,8 +4379,6 @@ CanvasRenderingContext2D::DrawOrMeasureText(const nsAString& aRawText,
isRTL = GET_BIDI_OPTION_DIRECTION(document->GetBidiOptions()) == IBMBIDI_TEXTDIRECTION_RTL;
}
// This is only needed to know if we can know the drawing bounding box easily.
const bool doCalculateBounds = NeedToCalculateBounds();
if (presShell->IsDestroying()) {
return NS_ERROR_FAILURE;
}
+3 -1
View File
@@ -890,7 +890,9 @@ protected:
* last call to UpdateFilter and now.
*/
const gfx::FilterDescription& EnsureUpdatedFilter() {
bool isWriteOnly = mCanvasElement && mCanvasElement->IsWriteOnly();
bool isWriteOnly = IsWriteOnly() ||
(mCanvasElement && mCanvasElement->IsWriteOnly()) ||
(mOffscreenCanvas && mOffscreenCanvas->IsWriteOnly());
if (CurrentState().filterSourceGraphicTainted != isWriteOnly) {
UpdateFilter();
EnsureTarget();
+1
View File
@@ -753,6 +753,7 @@ private:
}
Sequence<JS::Value> arguments;
SequenceRooter<JS::Value> rooter(aCx, &arguments);
for (uint32_t i = 0; i < length; ++i) {
JS::Rooted<JS::Value> value(aCx);
+5
View File
@@ -1118,6 +1118,11 @@ public:
}
mSaltLength = params.mSaltLength;
// Reject absurdly large salt values.
if (mSaltLength > 8192) {
mEarlyRv = NS_ERROR_DOM_OPERATION_ERR;
return;
}
} else if (algName.EqualsLiteral(WEBCRYPTO_ALG_ECDSA)) {
mAlgorithm = Algorithm::ECDSA;
CHECK_KEY_ALGORITHM(aKey.Algorithm(), WEBCRYPTO_ALG_ECDSA);
+5 -1
View File
@@ -1632,8 +1632,12 @@ EventListenerManager::GetTypedEventHandler(nsIAtom* aEventName,
JSEventHandler* jsEventHandler = listener->GetJSEventHandler();
Maybe<RefPtr<JSEventHandler>> pin;
if (listener->mHandlerIsString) {
CompileEventHandlerInternal(listener, nullptr, nullptr);
pin.emplace(jsEventHandler);
if (NS_FAILED(CompileEventHandlerInternal(listener, nullptr, nullptr))) {
listener = nullptr;
}
}
const TypedEventHandler& typedHandler =
+4 -5
View File
@@ -21,6 +21,7 @@
#include "nsProxyRelease.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/BodyUtil.h"
#include "mozilla/dom/DOMError.h"
#include "mozilla/dom/Exceptions.h"
@@ -317,7 +318,7 @@ public:
already_AddRefed<Promise>
FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
const RequestInit& aInit, ErrorResult& aRv)
const RequestInit& aInit, CallerType aCallerType, ErrorResult& aRv)
{
RefPtr<Promise> p = Promise::Create(aGlobal, aRv);
if (NS_WARN_IF(aRv.Failed())) {
@@ -325,12 +326,10 @@ FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
}
// Double check that we have chrome privileges if the Request's content
// policy type has been overridden. Note, we must do this before
// entering the global below. Otherwise the IsCallerChrome() will
// always fail.
// policy type has been overridden.
MOZ_ASSERT_IF(aInput.IsRequest() &&
aInput.GetAsRequest().IsContentPolicyTypeOverridden(),
nsContentUtils::IsCallerChrome());
aCallerType == CallerType::System);
AutoJSAPI jsapi;
if (!jsapi.Init(aGlobal)) {
+3 -1
View File
@@ -35,6 +35,7 @@ class InternalRequest;
class OwningBlobOrArrayBufferViewOrArrayBufferOrFormDataOrURLSearchParamsOrUSVString;
struct ReadableStream;
class RequestOrUSVString;
enum class CallerType : uint32_t;
namespace workers {
class WorkerPrivate;
@@ -42,7 +43,8 @@ class WorkerPrivate;
already_AddRefed<Promise>
FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
const RequestInit& aInit, ErrorResult& aRv);
const RequestInit& aInit, CallerType aCallerType,
ErrorResult& aRv);
nsresult
UpdateRequestReferrer(nsIGlobalObject* aGlobal, InternalRequest* aRequest);
+1 -36
View File
@@ -162,42 +162,7 @@ HTMLAllCollection::NamedGetter(const nsAString& aID,
void
HTMLAllCollection::GetSupportedNames(nsTArray<nsString>& aNames)
{
// XXXbz this is very similar to nsContentList::GetSupportedNames,
// but has to check IsAllNamedElement for the name case.
AutoTArray<nsIAtom*, 8> atoms;
for (uint32_t i = 0; i < Length(); ++i) {
nsIContent *content = Item(i);
if (content->HasID()) {
nsIAtom* id = content->GetID();
MOZ_ASSERT(id != nsGkAtoms::_empty,
"Empty ids don't get atomized");
if (!atoms.Contains(id)) {
atoms.AppendElement(id);
}
}
nsGenericHTMLElement* el = nsGenericHTMLElement::FromContent(content);
if (el) {
// Note: nsINode::HasName means the name is exposed on the document,
// which is false for options, so we don't check it here.
const nsAttrValue* val = el->GetParsedAttr(nsGkAtoms::name);
if (val && val->Type() == nsAttrValue::eAtom &&
IsAllNamedElement(content)) {
nsIAtom* name = val->GetAtomValue();
MOZ_ASSERT(name != nsGkAtoms::_empty,
"Empty names don't get atomized");
if (!atoms.Contains(name)) {
atoms.AppendElement(name);
}
}
}
}
uint32_t atomsLen = atoms.Length();
nsString* names = aNames.AppendElements(atomsLen);
for (uint32_t i = 0; i < atomsLen; ++i) {
atoms[i]->ToString(names[i]);
}
Collection()->GetSupportedNames(aNames, IsAllNamedElement);
}
+3 -3
View File
@@ -3590,7 +3590,7 @@ HTMLInputElement::Blur(ErrorResult& aError)
}
void
HTMLInputElement::Focus(ErrorResult& aError)
HTMLInputElement::Focus(const FocusOptions& aOptions, ErrorResult& aError)
{
if (mType == NS_FORM_INPUT_NUMBER) {
// Focus our anonymous text control, if we have one.
@@ -3600,7 +3600,7 @@ HTMLInputElement::Focus(ErrorResult& aError)
RefPtr<HTMLInputElement> textControl =
numberControlFrame->GetAnonTextControl();
if (textControl) {
textControl->Focus(aError);
textControl->Focus(aOptions, aError);
return;
}
}
@@ -3616,7 +3616,7 @@ HTMLInputElement::Focus(ErrorResult& aError)
}
if (mType != NS_FORM_INPUT_FILE) {
nsGenericHTMLElement::Focus(aError);
nsGenericHTMLElement::Focus(aOptions, aError);
return;
}
+2 -1
View File
@@ -134,7 +134,8 @@ public:
virtual int32_t TabIndexDefault() override;
using nsGenericHTMLElement::Focus;
virtual void Blur(ErrorResult& aError) override;
virtual void Focus(ErrorResult& aError) override;
virtual void Focus(const FocusOptions& aOptions,
ErrorResult& aError) override;
// nsINode
#if !defined(XP_MACOSX)
+3 -2
View File
@@ -93,14 +93,15 @@ HTMLLabelElement::GetForm() const
}
void
HTMLLabelElement::Focus(ErrorResult& aError)
HTMLLabelElement::Focus(const FocusOptions& aOptions,
ErrorResult& aError)
{
// retarget the focus method at the for content
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
if (fm) {
nsCOMPtr<nsIDOMElement> elem = do_QueryObject(GetLabeledElement());
if (elem)
fm->SetFocus(elem, 0);
fm->SetFocus(elem, nsFocusManager::FocusOptionsToFocusManagerFlags(aOptions));
}
}
+2 -1
View File
@@ -56,7 +56,8 @@ public:
}
using nsGenericHTMLElement::Focus;
virtual void Focus(mozilla::ErrorResult& aError) override;
virtual void Focus(const FocusOptions& aOptions,
ErrorResult& aError) override;
virtual bool IsDisabled() const override { return false; }
+8 -5
View File
@@ -86,7 +86,8 @@ HTMLLegendElement::UnbindFromTree(bool aDeep, bool aNullParent)
}
void
HTMLLegendElement::Focus(ErrorResult& aError)
HTMLLegendElement::Focus(const FocusOptions& aOptions,
ErrorResult& aError)
{
nsIFrame* frame = GetPrimaryFrame();
if (!frame) {
@@ -95,7 +96,7 @@ HTMLLegendElement::Focus(ErrorResult& aError)
int32_t tabIndex;
if (frame->IsFocusable(&tabIndex, false)) {
nsGenericHTMLElement::Focus(aError);
nsGenericHTMLElement::Focus(aOptions, aError);
return;
}
@@ -108,7 +109,8 @@ HTMLLegendElement::Focus(ErrorResult& aError)
nsCOMPtr<nsIDOMElement> result;
aError = fm->MoveFocus(nullptr, this, nsIFocusManager::MOVEFOCUS_FORWARD,
nsIFocusManager::FLAG_NOPARENTFRAME,
nsIFocusManager::FLAG_NOPARENTFRAME |
nsFocusManager::FocusOptionsToFocusManagerFlags(aOptions),
getter_AddRefs(result));
}
@@ -116,9 +118,10 @@ bool
HTMLLegendElement::PerformAccesskey(bool aKeyCausesActivation,
bool aIsTrustedEvent)
{
// just use the same behaviour as the focus method
FocusOptions options;
ErrorResult rv;
Focus(rv);
Focus(options, rv);
return NS_SUCCEEDED(rv.StealNSResult());
}
+2 -1
View File
@@ -24,7 +24,8 @@ public:
NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLLegendElement, legend)
using nsGenericHTMLElement::Focus;
virtual void Focus(ErrorResult& aError) override;
virtual void Focus(const FocusOptions& aOptions,
ErrorResult& aError) override;
virtual bool PerformAccesskey(bool aKeyCausesActivation,
bool aIsTrustedEvent) override;
+5
View File
@@ -211,6 +211,7 @@ TextTrackManager::AddCues(TextTrack* aTextTrack)
for (uint32_t i = 0; i < cueList->Length(); ++i) {
mNewCues->AddCue(*cueList->IndexedGetter(i, dummy));
}
RefPtr<TextTrackManager> kungFuDeathGrip(this);
DispatchTimeMarchesOn();
}
}
@@ -236,6 +237,7 @@ TextTrackManager::RemoveTextTrack(TextTrack* aTextTrack, bool aPendingListOnly)
for (uint32_t i = 0; i < removeCueList->Length(); ++i) {
mNewCues->RemoveCue(*((*removeCueList)[i]));
}
RefPtr<TextTrackManager> kungFuDeathGrip(this);
DispatchTimeMarchesOn();
}
}
@@ -305,6 +307,7 @@ TextTrackManager::NotifyCueAdded(TextTrackCue& aCue)
if (mNewCues) {
mNewCues->AddCue(aCue);
}
RefPtr<TextTrackManager> kungFuDeathGrip(this);
DispatchTimeMarchesOn();
}
@@ -315,6 +318,7 @@ TextTrackManager::NotifyCueRemoved(TextTrackCue& aCue)
if (mNewCues) {
mNewCues->RemoveCue(aCue);
}
RefPtr<TextTrackManager> kungFuDeathGrip(this);
DispatchTimeMarchesOn();
if (aCue.GetActive()) {
// We remove an active cue, need to update the display.
@@ -824,6 +828,7 @@ TextTrackManager::NotifyCueUpdated(TextTrackCue *aCue)
{
// TODO: Add/Reorder the cue to mNewCues if we have some optimization?
WEBVTT_LOG("NotifyCueUpdated");
RefPtr<TextTrackManager> kungFuDeathGrip(this);
DispatchTimeMarchesOn();
}
+3 -2
View File
@@ -150,8 +150,9 @@ public:
// If something is focused in the same document, ignore autofocus.
if (!fm->GetFocusedContent() ||
fm->GetFocusedContent()->OwnerDoc() != document) {
mozilla::ErrorResult rv;
mElement->Focus(rv);
FocusOptions options;
ErrorResult rv;
mElement->Focus(options, rv);
return rv.StealNSResult();
}
+2 -1
View File
@@ -434,8 +434,9 @@ public:
return rv.StealNSResult();
}
NS_IMETHOD Focus() final override {
mozilla::dom::FocusOptions options;
mozilla::ErrorResult rv;
Focus(rv);
Focus(options, rv);
return rv.StealNSResult();
}
NS_IMETHOD GetDraggable(bool* aDraggable) final override {
@@ -4,10 +4,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
#include "base/compiler_specific.h"
#include "mozilla/ArrayUtils.h"
#include "nsGkAtoms.h"
#include "nsIContentInlines.h"
#include "nsITableCellLayout.h" // for MAX_COLSPAN / MAX_ROWSPAN
#include "nsCRT.h"
#include "nsLayoutStylesheetCache.h"
@@ -26,7 +28,8 @@
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventStates.h"
#include "mozilla/dom/ElementBinding.h"
#include "mozilla/EventListenerManager.h" // for EventListenerManager
#include "mozilla/dom/MathMLElementBinding.h"
using namespace mozilla;
using namespace mozilla::dom;
@@ -34,7 +37,7 @@ using namespace mozilla::dom;
//----------------------------------------------------------------------
// nsISupports methods:
NS_IMPL_ISUPPORTS_INHERITED(nsMathMLElement, nsMathMLElementBase,
NS_IMPL_ISUPPORTS_INHERITED(MathMLElement, MathMLElementBase,
nsIDOMElement, nsIDOMNode, Link)
static nsresult
@@ -75,28 +78,28 @@ ReportParseErrorNoTag(const nsString& aValue,
"AttributeParsingErrorNoTag", argv, 2);
}
nsMathMLElement::nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
: nsMathMLElementBase(aNodeInfo),
MathMLElement::MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
: MathMLElementBase(aNodeInfo),
ALLOW_THIS_IN_INITIALIZER_LIST(Link(this)),
mIncrementScriptLevel(false)
{
}
nsMathMLElement::nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsMathMLElementBase(aNodeInfo),
MathMLElement::MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: MathMLElementBase(aNodeInfo),
ALLOW_THIS_IN_INITIALIZER_LIST(Link(this)),
mIncrementScriptLevel(false)
{
}
nsresult
nsMathMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
bool aCompileEventHandlers)
MathMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
bool aCompileEventHandlers)
{
Link::ResetLinkState(false, Link::ElementHasHref());
nsresult rv = nsMathMLElementBase::BindToTree(aDocument, aParent,
nsresult rv = MathMLElementBase::BindToTree(aDocument, aParent,
aBindingParent,
aCompileEventHandlers);
NS_ENSURE_SUCCESS(rv, rv);
@@ -130,7 +133,7 @@ nsMathMLElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
}
void
nsMathMLElement::UnbindFromTree(bool aDeep, bool aNullParent)
MathMLElement::UnbindFromTree(bool aDeep, bool aNullParent)
{
// If this link is ever reinserted into a document, it might
// be under a different xml:base, so forget the cached state now.
@@ -141,14 +144,14 @@ nsMathMLElement::UnbindFromTree(bool aDeep, bool aNullParent)
doc->UnregisterPendingLinkUpdate(this);
}
nsMathMLElementBase::UnbindFromTree(aDeep, aNullParent);
MathMLElementBase::UnbindFromTree(aDeep, aNullParent);
}
bool
nsMathMLElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
nsAttrValue& aResult)
MathMLElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
nsAttrValue& aResult)
{
MOZ_ASSERT(IsMathMLElement());
if (aNamespaceID == kNameSpaceID_None) {
@@ -166,6 +169,9 @@ nsMathMLElement::ParseAttribute(int32_t aNamespaceID,
aAttribute == nsGkAtoms::mathbackground_) {
return aResult.ParseColor(aValue);
}
if (aAttribute == nsGkAtoms::tabindex) {
return aResult.ParseIntValue(aValue);
}
if (mNodeInfo->Equals(nsGkAtoms::mtd_)) {
if (aAttribute == nsGkAtoms::columnspan_) {
aResult.ParseClampedNonNegativeInt(aValue, 1, 1, MAX_COLSPAN);
@@ -178,8 +184,8 @@ nsMathMLElement::ParseAttribute(int32_t aNamespaceID,
}
}
return nsMathMLElementBase::ParseAttribute(aNamespaceID, aAttribute,
aValue, aResult);
return MathMLElementBase::ParseAttribute(aNamespaceID, aAttribute,
aValue, aResult);
}
static Element::MappedAttributeEntry sMtableStyles[] = {
@@ -218,7 +224,7 @@ static Element::MappedAttributeEntry sDirStyles[] = {
};
bool
nsMathMLElement::IsAttributeMapped(const nsIAtom* aAttribute) const
MathMLElement::IsAttributeMapped(const nsIAtom* aAttribute) const
{
MOZ_ASSERT(IsMathMLElement());
@@ -287,7 +293,7 @@ nsMathMLElement::IsAttributeMapped(const nsIAtom* aAttribute) const
}
nsMapRuleToAttributesFunc
nsMathMLElement::GetAttributeMappingFunction() const
MathMLElement::GetAttributeMappingFunction() const
{
// It doesn't really matter what our tag is here, because only attributes
// that satisfy IsAttributeMapped will be stored in the mapped attributes
@@ -296,9 +302,9 @@ nsMathMLElement::GetAttributeMappingFunction() const
}
/* static */ bool
nsMathMLElement::ParseNamedSpaceValue(const nsString& aString,
nsCSSValue& aCSSValue,
uint32_t aFlags)
MathMLElement::ParseNamedSpaceValue(const nsString& aString,
nsCSSValue& aCSSValue,
uint32_t aFlags)
{
int32_t i = 0;
// See if it is one of the 'namedspace' (ranging -7/18em, -6/18, ... 7/18em)
@@ -378,10 +384,10 @@ nsMathMLElement::ParseNamedSpaceValue(const nsString& aString,
// number)"
//
/* static */ bool
nsMathMLElement::ParseNumericValue(const nsString& aString,
nsCSSValue& aCSSValue,
uint32_t aFlags,
nsIDocument* aDocument)
MathMLElement::ParseNumericValue(const nsString& aString,
nsCSSValue& aCSSValue,
uint32_t aFlags,
nsIDocument* aDocument)
{
nsAutoString str(aString);
str.CompressWhitespace(); // aString is const in this code...
@@ -429,6 +435,13 @@ nsMathMLElement::ParseNumericValue(const nsString& aString,
number.Append(c);
}
if (gotDot && str[i - 1] == '.') {
if (!(aFlags & PARSE_SUPPRESS_WARNINGS)) {
ReportLengthParseError(aString, aDocument);
}
return false; // Number ending with a dot.
}
// Convert number to floating point
nsresult errorCode;
float floatValue = number.ToFloat(&errorCode);
@@ -499,8 +512,8 @@ nsMathMLElement::ParseNumericValue(const nsString& aString,
}
void
nsMathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
MathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes,
nsRuleData* aData)
{
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Font)) {
// scriptsizemultiplier
@@ -918,7 +931,7 @@ nsMathMLElement::MapMathMLAttributesInto(const nsMappedAttributes* aAttributes,
}
nsresult
nsMathMLElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
MathMLElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
{
nsresult rv = Element::GetEventTargetParent(aVisitor);
NS_ENSURE_SUCCESS(rv, rv);
@@ -927,30 +940,30 @@ nsMathMLElement::GetEventTargetParent(EventChainPreVisitor& aVisitor)
}
nsresult
nsMathMLElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
MathMLElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
{
return PostHandleEventForLinks(aVisitor);
}
NS_IMPL_ELEMENT_CLONE(nsMathMLElement)
NS_IMPL_ELEMENT_CLONE(MathMLElement)
EventStates
nsMathMLElement::IntrinsicState() const
MathMLElement::IntrinsicState() const
{
return Link::LinkState() | nsMathMLElementBase::IntrinsicState() |
return Link::LinkState() | MathMLElementBase::IntrinsicState() |
(mIncrementScriptLevel ?
NS_EVENT_STATE_INCREMENT_SCRIPT_LEVEL : EventStates());
}
bool
nsMathMLElement::IsNodeOfType(uint32_t aFlags) const
MathMLElement::IsNodeOfType(uint32_t aFlags) const
{
return !(aFlags & ~eCONTENT);
}
void
nsMathMLElement::SetIncrementScriptLevel(bool aIncrementScriptLevel,
bool aNotify)
MathMLElement::SetIncrementScriptLevel(bool aIncrementScriptLevel,
bool aNotify)
{
if (aIncrementScriptLevel == mIncrementScriptLevel)
return;
@@ -961,26 +974,55 @@ nsMathMLElement::SetIncrementScriptLevel(bool aIncrementScriptLevel,
UpdateState(true);
}
bool
nsMathMLElement::IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse)
int32_t
MathMLElement::TabIndexDefault()
{
nsCOMPtr<nsIURI> uri;
if (IsLink(getter_AddRefs(uri))) {
return IsLink(getter_AddRefs(uri)) ? 0 : -1;
}
// XXX Bug 1586011: Share logic with other element classes.
bool
MathMLElement::IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse)
{
nsIDocument* doc = GetComposedDoc();
if (!doc || doc->HasFlag(NODE_IS_EDITABLE)) {
// In designMode documents we only allow focusing the document.
if (aTabIndex) {
*aTabIndex = ((sTabFocusModel & eTabFocus_linksMask) == 0 ? -1 : 0);
*aTabIndex = -1;
}
return true;
return false;
}
int32_t tabIndex = TabIndex();
if (aTabIndex) {
*aTabIndex = tabIndex;
}
nsCOMPtr<nsIURI> uri;
if (!IsLink(getter_AddRefs(uri))) {
// If a tabindex is specified at all we're focusable
return HasAttr(kNameSpaceID_None, nsGkAtoms::tabindex);
}
// Links that are in an editable region should never be focusable, even if
// they are in a contenteditable="false" region.
if (nsContentUtils::IsNodeInEditableRegion(this)) {
if (aTabIndex) {
*aTabIndex = -1;
}
return false;
}
if (aTabIndex && (sTabFocusModel & eTabFocus_linksMask) == 0) {
*aTabIndex = -1;
}
return false;
return true;
}
bool
nsMathMLElement::IsLink(nsIURI** aURI) const
MathMLElement::IsLink(nsIURI** aURI) const
{
// http://www.w3.org/TR/2010/REC-MathML3-20101021/chapter6.html#interf.link
// The REC says that the following elements should not be linking elements:
@@ -1051,7 +1093,7 @@ nsMathMLElement::IsLink(nsIURI** aURI) const
}
void
nsMathMLElement::GetLinkTarget(nsAString& aTarget)
MathMLElement::GetLinkTarget(nsAString& aTarget)
{
const nsAttrValue* target = mAttrsAndChildren.GetAttr(nsGkAtoms::target,
kNameSpaceID_XLink);
@@ -1077,14 +1119,59 @@ nsMathMLElement::GetLinkTarget(nsAString& aTarget)
}
already_AddRefed<nsIURI>
nsMathMLElement::GetHrefURI() const
MathMLElement::GetHrefURI() const
{
nsCOMPtr<nsIURI> hrefURI;
return IsLink(getter_AddRefs(hrefURI)) ? hrefURI.forget() : nullptr;
}
// XXX Bug 1586014: Share logic with other element classes.
void
MathMLElement::RecompileScriptEventListeners() {
int32_t i, count = mAttrsAndChildren.AttrCount();
for (i = 0; i < count; ++i) {
const nsAttrName* name = mAttrsAndChildren.AttrNameAt(i);
// Eventlistenener-attributes are always in the null namespace
if (!name->IsAtom()) {
continue;
}
nsIAtom* attr = name->Atom();
if (!IsEventAttributeName(attr)) {
continue;
}
nsAutoString value;
GetAttr(kNameSpaceID_None, attr, value);
SetEventHandler(attr, value, true);
}
}
bool
MathMLElement::IsEventAttributeNameInternal(nsIAtom* aName) {
// The intent is to align MathML event attributes on HTML5, so the flag
// EventNameType_HTML is used here.
return nsContentUtils::IsEventAttributeName(aName, EventNameType_HTML);
}
nsresult
nsMathMLElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
MathMLElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
const nsAttrValueOrString* aValue,
bool aNotify) {
if (aNamespaceID == kNameSpaceID_None) {
if (!aValue && IsEventAttributeName(aName)) {
if (EventListenerManager* manager = GetExistingListenerManager()) {
manager->RemoveEventHandler(aName, EmptyString());
}
}
}
return MathMLElementBase::BeforeSetAttr(aNamespaceID, aName, aValue, aNotify);
}
nsresult
MathMLElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
const nsAttrValue* aValue,
const nsAttrValue* aOldValue,
nsIPrincipal* aSubjectPrincipal,
@@ -1105,13 +1192,22 @@ nsMathMLElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
Link::ResetLinkState(aNotify, aValue || Link::ElementHasHref());
}
return nsMathMLElementBase::AfterSetAttr(aNameSpaceID, aName, aValue,
aOldValue, aSubjectPrincipal,
aNotify);
if (aNameSpaceID == kNameSpaceID_None) {
if (IsEventAttributeName(aName) && aValue) {
MOZ_ASSERT(aValue->Type() == nsAttrValue::eString,
"Expected string value for script body");
nsresult rv = SetEventHandler(aName, aValue->GetStringValue());
NS_ENSURE_SUCCESS(rv, rv);
}
}
return MathMLElementBase::AfterSetAttr(aNameSpaceID, aName, aValue,
aOldValue, aSubjectPrincipal,
aNotify);
}
JSObject*
nsMathMLElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
MathMLElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
{
return ElementBinding::Wrap(aCx, this, aGivenProto);
return MathMLElementBinding::Wrap(aCx, this, aGivenProto);
}
@@ -3,8 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsMathMLElement_h
#define nsMathMLElement_h
#ifndef mozilla_dom_MathMLElement_h_
#define mozilla_dom_MathMLElement_h_
#include "mozilla/Attributes.h"
#include "mozilla/dom/ElementInlines.h"
@@ -15,28 +15,30 @@
class nsCSSValue;
typedef nsMappedAttributeElement nsMathMLElementBase;
namespace mozilla {
class EventChainPostVisitor;
class EventChainPreVisitor;
} // namespace mozilla
namespace dom {
typedef nsMappedAttributeElement MathMLElementBase;
/*
* The base class for MathML elements.
*/
class nsMathMLElement final : public nsMathMLElementBase,
public nsIDOMElement,
public mozilla::dom::Link
class MathMLElement final : public MathMLElementBase,
public nsIDOMElement,
public mozilla::dom::Link
{
public:
explicit nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
explicit nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
explicit MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
explicit MathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
// Implementation of nsISupports is inherited from nsMathMLElementBase
// Implementation of nsISupports is inherited from MathMLElementBase
NS_DECL_ISUPPORTS_INHERITED
// Forward implementations of parent interfaces of nsMathMLElement to
NS_IMPL_FROMCONTENT(MathMLElement, kNameSpaceID_MathML)
// Forward implementations of parent interfaces of MathMLElement to
// our base class
NS_FORWARD_NSIDOMNODE_TO_NSINODE
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
@@ -88,6 +90,7 @@ public:
return mIncrementScriptLevel;
}
int32_t TabIndexDefault() final;
virtual bool IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) override;
virtual bool IsLink(nsIURI** aURI) const override;
virtual void GetLinkTarget(nsAString& aTarget) override;
@@ -95,11 +98,16 @@ public:
virtual nsIDOMNode* AsDOMNode() override { return this; }
void RecompileScriptEventListeners() override;
bool IsEventAttributeNameInternal(nsIAtom* aName);
protected:
virtual ~nsMathMLElement() {}
virtual ~MathMLElement() {}
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
nsresult BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName,
const nsAttrValueOrString* aValue, bool aNotify) override;
virtual nsresult AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
const nsAttrValue* aValue,
const nsAttrValue* aOldValue,
@@ -110,4 +118,7 @@ private:
bool mIncrementScriptLevel;
};
#endif // nsMathMLElement_h
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_MathMLElement_h_
@@ -5,7 +5,7 @@
#include "nsContentCreatorFunctions.h"
#include "nsGkAtoms.h"
#include "nsMathMLElement.h"
#include "mozilla/dom/MathMLElement.h"
using namespace mozilla::dom;
@@ -13,6 +13,6 @@ using namespace mozilla::dom;
nsresult
NS_NewMathMLElement(Element** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
{
NS_ADDREF(*aResult = new nsMathMLElement(aNodeInfo));
NS_ADDREF(*aResult = new MathMLElement(aNodeInfo));
return NS_OK;
}
+6 -2
View File
@@ -3,9 +3,13 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS.mozilla.dom += [
'MathMLElement.h',
]
UNIFIED_SOURCES += [
'nsMathMLElement.cpp',
'nsMathMLElementFactory.cpp',
'MathMLElement.cpp',
'MathMLElementFactory.cpp',
]
include('/ipc/chromium/chromium-config.mozbuild')
+17 -5
View File
@@ -105,6 +105,8 @@ gDownMixMatrices[CUSTOM_CHANNEL_LAYOUTS*(CUSTOM_CHANNEL_LAYOUTS - 1)/2] =
* Given an array of input channels, downmix to aOutputChannelCount, and copy
* the results to the channel buffers in aOutputChannels. Don't call this with
* input count <= output count.
* Each of aOutputChannels must be non-null.
* aChannelArray elements may be null.
*/
template<typename T>
void AudioChannelsDownMix(const nsTArray<const T*>& aChannelArray,
@@ -119,7 +121,11 @@ void AudioChannelsDownMix(const nsTArray<const T*>& aChannelArray,
if (inputChannelCount > 6) {
// Just drop the unknown channels.
for (uint32_t o = 0; o < aOutputChannelCount; ++o) {
PodCopy(aOutputChannels[o], inputChannels[o], aDuration);
if (inputChannels[o]) {
PodCopy(aOutputChannels[o], inputChannels[o], aDuration);
} else {
std::fill_n(aOutputChannels[o], aDuration, static_cast<T>(0));
}
}
return;
}
@@ -138,13 +144,19 @@ void AudioChannelsDownMix(const nsTArray<const T*>& aChannelArray,
// want an input channel to contribute to nothing
T outputChannels[CUSTOM_CHANNEL_LAYOUTS + 1] = {0};
for (uint32_t c = 0; c < inputChannelCount; ++c) {
outputChannels[m.mInputDestination[c]] +=
m.mInputCoefficient[c]*(static_cast<const T*>(inputChannels[c]))[s];
if (inputChannels[c]) {
outputChannels[m.mInputDestination[c]] +=
m.mInputCoefficient[c] *
(static_cast<const T*>(inputChannels[c]))[s];
}
}
// Utilize the fact that in every layout, C is the third channel.
if (m.mCExtraDestination != IGNORE) {
outputChannels[m.mCExtraDestination] +=
m.mInputCoefficient[SURROUND_C]*(static_cast<const T*>(inputChannels[SURROUND_C]))[s];
if (inputChannels[SURROUND_C]) {
outputChannels[m.mCExtraDestination] +=
m.mInputCoefficient[SURROUND_C] *
(static_cast<const T*>(inputChannels[SURROUND_C]))[s];
}
}
for (uint32_t c = 0; c < aOutputChannelCount; ++c) {
+9 -3
View File
@@ -121,13 +121,19 @@ AudioSegment::Mix(AudioMixer& aMixer, uint32_t aOutputChannels,
}
if (channelData.Length() < aOutputChannels) {
// Up-mix.
AudioChannelsUpMix(&channelData, aOutputChannels, SilentChannel::ZeroChannel<AudioDataValue>());
AudioChannelsUpMix(&channelData, aOutputChannels, static_cast<const AudioDataValue*>(nullptr));
for (uint32_t channel = 0; channel < aOutputChannels; channel++) {
AudioDataValue* ptr =
PointerForOffsetInChannel(buf.Elements(), outBufferLength,
aOutputChannels, channel, offsetSamples);
PodCopy(ptr, reinterpret_cast<const AudioDataValue*>(channelData[channel]),
frames);
if (channelData[channel]) {
PodCopy(
ptr,
reinterpret_cast<const AudioDataValue*>(channelData[channel]),
frames);
} else {
PodZero(ptr, frames);
}
}
MOZ_ASSERT(channelData.Length() == aOutputChannels);
} else if (channelData.Length() > aOutputChannels) {
+15 -8
View File
@@ -61,15 +61,22 @@ template <typename SrcT, typename DestT>
static void
InterleaveAndConvertBuffer(const SrcT* const* aSourceChannels,
uint32_t aLength, float aVolume,
uint32_t aChannels,
uint32_t aChannelCount,
DestT* aOutput)
{
DestT* output = aOutput;
for (size_t i = 0; i < aLength; ++i) {
for (size_t channel = 0; channel < aChannels; ++channel) {
float v = AudioSampleToFloat(aSourceChannels[channel][i])*aVolume;
*output = FloatToAudioSample<DestT>(v);
++output;
for (size_t channel = 0; channel < aChannelCount; ++channel) {
DestT* output = aOutput;
if (aSourceChannels[channel]) {
for (size_t i = 0; i < aLength; ++i) {
float v = AudioSampleToFloat(aSourceChannels[channel][i])*aVolume;
*output = FloatToAudioSample<DestT>(v);
output += aChannelCount;
}
} else {
for (size_t i = 0; i < aLength; ++i) {
*output = static_cast<DestT>(0);
output += aChannelCount;
}
}
}
}
@@ -408,7 +415,7 @@ void WriteChunk(AudioChunk& aChunk,
if (channelData.Length() < aOutputChannels) {
// Up-mix. Note that this might actually make channelData have more
// than aOutputChannels temporarily.
AudioChannelsUpMix(&channelData, aOutputChannels, SilentChannel::ZeroChannel<SrcT>());
AudioChannelsUpMix(&channelData, aOutputChannels, static_cast<const SrcT*>(nullptr));
}
if (channelData.Length() > aOutputChannels) {
// Down-mix.
+8 -5
View File
@@ -1547,26 +1547,29 @@ void BaseMediaResource::SetLoadInBackground(bool aLoadInBackground) {
void BaseMediaResource::ModifyLoadFlags(nsLoadFlags aFlags)
{
RefPtr<BaseMediaResource> kungFuDeathGrip(this);
nsCOMPtr<nsIChannel> channel = mChannel;
nsCOMPtr<nsILoadGroup> loadGroup;
nsresult rv = mChannel->GetLoadGroup(getter_AddRefs(loadGroup));
nsresult rv = channel->GetLoadGroup(getter_AddRefs(loadGroup));
MOZ_ASSERT(NS_SUCCEEDED(rv), "GetLoadGroup() failed!");
nsresult status;
mChannel->GetStatus(&status);
channel->GetStatus(&status);
bool inLoadGroup = false;
if (loadGroup) {
rv = loadGroup->RemoveRequest(mChannel, nullptr, status);
rv = loadGroup->RemoveRequest(channel, nullptr, status);
if (NS_SUCCEEDED(rv)) {
inLoadGroup = true;
}
}
rv = mChannel->SetLoadFlags(aFlags);
rv = channel->SetLoadFlags(aFlags);
MOZ_ASSERT(NS_SUCCEEDED(rv), "SetLoadFlags() failed!");
if (inLoadGroup) {
rv = loadGroup->AddRequest(mChannel, nullptr);
rv = loadGroup->AddRequest(channel, nullptr);
MOZ_ASSERT(NS_SUCCEEDED(rv), "AddRequest() failed!");
}
}
+7 -2
View File
@@ -9,6 +9,7 @@
#include <algorithm>
#include "mozilla/Assertions.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/EndianUtils.h"
#include "nsAutoPtr.h"
#include "VideoUtils.h"
@@ -602,8 +603,12 @@ MP3TrackDemuxer::OffsetFromFrameIndex(int64_t aFrameIndex) const {
const auto& vbr = mParser.VBRInfo();
if (vbr.IsComplete()) {
offset = mFirstFrameOffset + aFrameIndex * vbr.NumBytes().value() /
vbr.NumAudioFrames().value();
CheckedInt<int64_t> product = CheckedInt<int64_t>(aFrameIndex) * vbr.NumBytes().value();
if (product.isValid()) {
offset = mFirstFrameOffset + product.value() / vbr.NumAudioFrames().value();
} else {
offset = StreamLength();
}
} else if (AverageFrameLength() > 0) {
offset = mFirstFrameOffset + aFrameIndex * AverageFrameLength();
}
@@ -67,7 +67,7 @@ CopyAndPackAudio(AVFrame* aFrame, uint32_t aNumChannels, uint32_t aNumAFrames)
} else if (aFrame->format == AV_SAMPLE_FMT_FLTP) {
// Planar audio data. Pack it into something we can understand.
AudioDataValue* tmp = audio.get();
AudioDataValue** data = reinterpret_cast<AudioDataValue**>(aFrame->data);
AudioDataValue** data = reinterpret_cast<AudioDataValue**>(aFrame->extended_data);
for (uint32_t frame = 0; frame < aNumAFrames; frame++) {
for (uint32_t channel = 0; channel < aNumChannels; channel++) {
*tmp++ = data[channel][frame];
@@ -86,7 +86,7 @@ CopyAndPackAudio(AVFrame* aFrame, uint32_t aNumChannels, uint32_t aNumAFrames)
// Planar audio data. Convert it from S16 to 32 bits float
// and pack it into something we can understand.
AudioDataValue* tmp = audio.get();
int16_t** data = reinterpret_cast<int16_t**>(aFrame->data);
int16_t** data = reinterpret_cast<int16_t**>(aFrame->extended_data);
for (uint32_t frame = 0; frame < aNumAFrames; frame++) {
for (uint32_t channel = 0; channel < aNumChannels; channel++) {
*tmp++ = AudioSampleToFloat(data[channel][frame]);
@@ -105,7 +105,7 @@ CopyAndPackAudio(AVFrame* aFrame, uint32_t aNumChannels, uint32_t aNumAFrames)
// Planar audio data. Convert it from S32 to 32 bits float
// and pack it into something we can understand.
AudioDataValue* tmp = audio.get();
int32_t** data = reinterpret_cast<int32_t**>(aFrame->data);
int32_t** data = reinterpret_cast<int32_t**>(aFrame->extended_data);
for (uint32_t frame = 0; frame < aNumAFrames; frame++) {
for (uint32_t channel = 0; channel < aNumChannels; channel++) {
*tmp++ = AudioSampleToFloat(data[channel][frame]);
+15 -3
View File
@@ -15,6 +15,7 @@
#include "DXVA2Manager.h"
#include "nsThreadUtils.h"
#include "Layers.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/layers/LayersTypes.h"
#include "MediaInfo.h"
@@ -760,6 +761,10 @@ WMFVideoMFTManager::CreateBasicVideoFrame(IMFSample* aSample,
NS_ENSURE_TRUE(SUCCEEDED(hr), hr);
stride = mVideoStride;
}
if (stride <= 0) {
LOG("CreateBasicVideoFrame: invalid stride %ld", stride);
return E_FAIL;
}
// YV12, planar format: [YYYY....][VVVV....][UUUU....]
// i.e., Y, then V, then U.
@@ -782,9 +787,16 @@ WMFVideoMFTManager::CreateBasicVideoFrame(IMFSample* aSample,
if (videoHeight % 16 != 0) {
padding = 16 - (videoHeight % 16);
}
uint32_t y_size = stride * (videoHeight + padding);
uint32_t v_size = stride * (videoHeight + padding) / 4;
uint32_t halfStride = (stride + 1) / 2;
mozilla::CheckedInt<uint32_t> y_size_checked =
mozilla::CheckedInt<uint32_t>(static_cast<uint32_t>(stride)) *
(videoHeight + padding);
if (!y_size_checked.isValid()) {
LOG("CreateBasicVideoFrame: plane size too large");
return E_FAIL;
}
uint32_t y_size = y_size_checked.value();
uint32_t v_size = y_size / 4;
uint32_t halfStride = static_cast<uint32_t>((static_cast<int64_t>(stride) + 1) / 2);
uint32_t halfHeight = (videoHeight + 1) / 2;
uint32_t halfWidth = (videoWidth + 1) / 2;
+7 -3
View File
@@ -181,9 +181,13 @@ public:
if (mResamplerOutRate == aOutRate) {
return;
}
if (speex_resampler_set_rate(mResampler, mBufferSampleRate, aOutRate) != RESAMPLER_ERR_SUCCESS) {
NS_ASSERTION(false, "speex_resampler_set_rate failed");
return;
int result = speex_resampler_set_rate(mResampler, mBufferSampleRate, aOutRate);
if (result != RESAMPLER_ERR_SUCCESS) {
WEB_AUDIO_API_LOG("speex_resampler_set_rate failed: %i", result);
// mResampler den_rate and num_rate might have been updated, despite
// the error, in which case the resampler will output zeros but
// still consume input. Continue below to update mBeginProcessing
// for any change in resampler behavior.
}
}
+1 -1
View File
@@ -751,7 +751,7 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType, MediaRawDataQueue *aSampl
WEBM_DEBUG("push sample tstamp: %ld next_tstamp: %ld length: %ld kf: %d",
tstamp, next_tstamp, length, isKeyframe);
RefPtr<MediaRawData> sample;
if (mInfo.mVideo.HasAlpha() && alphaLength != 0) {
if (mInfo.mVideo.HasAlpha() && alphaData != 0) {
sample = new MediaRawData(data, length, alphaData, alphaLength);
if (length && !sample->Data() || (alphaLength && !sample->AlphaData())) {
// OOM.
+2
View File
@@ -172,6 +172,8 @@ UDPSocket::CloseWithReason(nsresult aReason)
return;
}
RefPtr<UDPSocket> kungFuDeathGrip(this);
if (mOpened) {
if (mReadyState == SocketReadyState::Opening) {
// reject openedPromise with AbortError if socket is closed without error
+2 -2
View File
@@ -4,7 +4,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
[NoInterfaceObject, Exposed=(Window,Worker,System)]
interface AbstractWorker {
[Exposed=(Window,Worker)]
interface mixin AbstractWorker {
attribute EventHandler onerror;
};
+1 -1
View File
@@ -45,4 +45,4 @@ interface AnalyserNode : AudioNode {
};
// Mozilla extension
AnalyserNode implements AudioNodePassThrough;
AnalyserNode includes AudioNodePassThrough;
+1 -2
View File
@@ -18,8 +18,7 @@ dictionary AnimationFilter {
boolean subtree = false;
};
[NoInterfaceObject]
interface Animatable {
interface mixin Animatable {
[Func="nsDocument::IsElementAnimateEnabled", Throws]
Animation animate(object? keyframes,
optional UnrestrictedDoubleOrKeyframeAnimationOptions options);
+1 -1
View File
@@ -42,4 +42,4 @@ interface AudioBufferSourceNode : AudioNode {
};
// Mozilla extensions
AudioBufferSourceNode implements AudioNodePassThrough;
AudioBufferSourceNode includes AudioNodePassThrough;
+1 -2
View File
@@ -67,8 +67,7 @@ partial interface AudioNode {
[ChromeOnly]
readonly attribute unsigned long id;
};
[NoInterfaceObject]
interface AudioNodePassThrough {
interface mixin AudioNodePassThrough {
[ChromeOnly]
attribute boolean passThrough;
};
+1 -1
View File
@@ -46,5 +46,5 @@ interface BiquadFilterNode : AudioNode {
};
// Mozilla extension
BiquadFilterNode implements AudioNodePassThrough;
BiquadFilterNode includes AudioNodePassThrough;
+2 -2
View File
@@ -27,8 +27,8 @@ interface Blob {
//slice Blob into byte-ranged chunks
[Throws]
Blob slice([Clamp] optional long long start,
[Clamp] optional long long end,
Blob slice(optional [Clamp] long long start,
optional [Clamp] long long end,
optional DOMString contentType = "");
// void close(); TODO bug 1048325
+5 -10
View File
@@ -19,15 +19,7 @@ dictionary BrowserElementExecuteScriptOptions {
DOMString? origin;
};
[NoInterfaceObject]
interface BrowserElement {
};
BrowserElement implements BrowserElementCommon;
BrowserElement implements BrowserElementPrivileged;
[NoInterfaceObject]
interface BrowserElementCommon {
interface mixin BrowserElementCommon {
[Throws,
Pref="dom.mozBrowserFramesEnabled",
ChromeOnly]
@@ -60,7 +52,7 @@ interface BrowserElementCommon {
};
[NoInterfaceObject]
interface BrowserElementPrivileged {
interface BrowserElement {
[Throws,
Pref="dom.mozBrowserFramesEnabled",
ChromeOnly]
@@ -176,3 +168,6 @@ interface BrowserElementPrivileged {
DOMRequest getWebManifest();
};
BrowserElement includes BrowserElementCommon;
+1 -1
View File
@@ -29,7 +29,7 @@ interface BrowserElementAudioChannel : EventTarget {
DOMRequest isActive();
};
partial interface BrowserElementPrivileged {
interface mixin BrowserElementPrivileged {
[Pure, Cached, Throws,
Pref="dom.mozBrowserFramesEnabled",
ChromeOnly]
+2 -2
View File
@@ -11,5 +11,5 @@
ChromeOnly]
interface BrowserElementProxy : EventTarget {
};
BrowserElementProxy implements BrowserElementCommon;
BrowserElementProxy implements BrowserElementPrivileged;
BrowserElementProxy includes BrowserElementCommon;
BrowserElementProxy includes BrowserElementPrivileged;
+1 -1
View File
@@ -22,4 +22,4 @@ interface CSSPseudoElement {
};
// https://w3c.github.io/web-animations/#extensions-to-the-pseudoelement-interface
CSSPseudoElement implements Animatable;
CSSPseudoElement includes Animatable;
+1 -1
View File
@@ -21,7 +21,7 @@ interface CSSStyleDeclaration {
CSSValue? getPropertyCSSValue(DOMString property);
DOMString getPropertyPriority(DOMString property);
[CEReactions, Throws]
void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");
void setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value, optional [TreatNullAs=EmptyString] DOMString priority = "");
[CEReactions, Throws]
DOMString removeProperty(DOMString property);
+2 -2
View File
@@ -17,9 +17,9 @@ interface Cache {
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
[NewObject]
Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
[NewObject]
[NewObject, NeedsCallerType]
Promise<void> add(RequestInfo request);
[NewObject]
[NewObject, NeedsCallerType]
Promise<void> addAll(sequence<RequestInfo> requests);
[NewObject]
Promise<void> put(RequestInfo request, Response response);
+6 -8
View File
@@ -59,7 +59,7 @@ interface CanvasRenderingContext2D {
DOMMatrix getTransform();
[Throws, LenientFloat]
void setTransform(double a, double b, double c, double d, double e, double f);
[Throws, LenientFloat]
[Throws]
void setTransform(optional DOMMatrix2DInit transform);
[Throws]
void resetTransform();
@@ -239,11 +239,10 @@ interface CanvasRenderingContext2D {
[ChromeOnly]
void demote();
};
CanvasRenderingContext2D implements CanvasDrawingStyles;
CanvasRenderingContext2D implements CanvasPathMethods;
CanvasRenderingContext2D includes CanvasDrawingStyles;
CanvasRenderingContext2D includes CanvasPathMethods;
[NoInterfaceObject]
interface CanvasDrawingStyles {
interface mixin CanvasDrawingStyles {
// line caps/joins
[LenientFloat]
attribute double lineWidth; // (default 1)
@@ -265,8 +264,7 @@ interface CanvasDrawingStyles {
attribute DOMString textBaseline; // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
};
[NoInterfaceObject]
interface CanvasPathMethods {
interface mixin CanvasPathMethods {
// shared path API methods
void closePath();
[LenientFloat]
@@ -342,4 +340,4 @@ interface Path2D
{
[Throws] void addPath(Path2D path, optional DOMMatrix2DInit transformation);
};
Path2D implements CanvasPathMethods;
Path2D includes CanvasPathMethods;
+4 -4
View File
@@ -11,8 +11,8 @@
*/
interface CharacterData : Node {
[TreatNullAs=EmptyString, Pure, SetterThrows]
attribute DOMString data;
[Pure, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString data;
[Pure]
readonly attribute unsigned long length;
[Throws]
@@ -27,5 +27,5 @@ interface CharacterData : Node {
void replaceData(unsigned long offset, unsigned long count, DOMString data);
};
CharacterData implements ChildNode;
CharacterData implements NonDocumentTypeChildNode;
CharacterData includes ChildNode;
CharacterData includes NonDocumentTypeChildNode;
+2 -4
View File
@@ -7,8 +7,7 @@
* http://dom.spec.whatwg.org/#interface-childnode
*/
[NoInterfaceObject]
interface ChildNode {
interface mixin ChildNode {
[CEReactions, Throws, Unscopable]
void before((Node or DOMString)... nodes);
[CEReactions, Throws, Unscopable]
@@ -19,8 +18,7 @@ interface ChildNode {
void remove();
};
[NoInterfaceObject]
interface NonDocumentTypeChildNode {
interface mixin NonDocumentTypeChildNode {
[Pure]
readonly attribute Element? previousElementSibling;
[Pure]
+1 -1
View File
@@ -26,5 +26,5 @@ interface ConvolverNode : AudioNode {
};
// Mozilla extension
ConvolverNode implements AudioNodePassThrough;
ConvolverNode includes AudioNodePassThrough;
+2 -2
View File
@@ -7,8 +7,8 @@
* https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#crypto-interface
*/
[NoInterfaceObject, Exposed=(Window,Worker)]
interface GlobalCrypto {
[Exposed=(Window,Worker)]
interface mixin GlobalCrypto {
[Throws] readonly attribute Crypto crypto;
};
+1 -1
View File
@@ -10,4 +10,4 @@ interface DOMCursor : EventTarget {
void continue();
};
DOMCursor implements DOMRequestShared;
DOMCursor includes DOMRequestShared;
+3 -5
View File
@@ -15,9 +15,7 @@
interface StackFrame;
[NoInterfaceObject,
Exposed=(Window,Worker)]
interface ExceptionMembers
interface mixin ExceptionMembers
{
// A custom message set by the thrower. LenientThis so it can be
// gotten on the prototype, which Error.prototype.toString will do
@@ -68,7 +66,7 @@ interface Exception {
stringifier;
};
Exception implements ExceptionMembers;
Exception includes ExceptionMembers;
// XXXkhuey this is an 'exception', not an interface, but we don't have any
// parser or codegen mechanisms for dealing with exceptions.
@@ -107,4 +105,4 @@ interface DOMException {
// XXXkhuey copy all of Gecko's non-standard stuff onto DOMException, but leave
// the prototype chain sane.
DOMException implements ExceptionMembers;
DOMException includes ExceptionMembers;
+3 -3
View File
@@ -5,8 +5,8 @@
enum DOMRequestReadyState { "pending", "done" };
[Exposed=(Window,Worker,System), NoInterfaceObject]
interface DOMRequestShared {
[Exposed=(Window,Worker)]
interface mixin DOMRequestShared {
readonly attribute DOMRequestReadyState readyState;
readonly attribute any result;
@@ -26,4 +26,4 @@ interface DOMRequest : EventTarget {
[TreatNonCallableAsNull] optional AnyCallback? rejectCallback = null);
};
DOMRequest implements DOMRequestShared;
DOMRequest includes DOMRequestShared;
+1 -1
View File
@@ -24,5 +24,5 @@ interface DelayNode : AudioNode {
};
// Mozilla extension
DelayNode implements AudioNodePassThrough;
DelayNode includes AudioNodePassThrough;
+9 -11
View File
@@ -155,9 +155,6 @@ partial interface Document {
// Gecko extensions?
attribute EventHandler onwheel;
attribute EventHandler oncopy;
attribute EventHandler oncut;
attribute EventHandler onpaste;
attribute EventHandler onbeforescriptexecute;
attribute EventHandler onafterscriptexecute;
@@ -440,11 +437,12 @@ partial interface Document {
[Func="IsChromeOrXBL"] readonly attribute boolean inlineScriptAllowedByCSP;
};
Document implements XPathEvaluator;
Document implements GlobalEventHandlers;
Document implements TouchEventHandlers;
Document implements ParentNode;
Document implements OnErrorEventHandlerForNodes;
Document implements GeometryUtils;
Document implements FontFaceSource;
Document implements DocumentOrShadowRoot;
Document includes XPathEvaluatorMixin;
Document includes GlobalEventHandlers;
Document includes DocumentAndElementEventHandlers;
Document includes TouchEventHandlers;
Document includes ParentNode;
Document includes OnErrorEventHandlerForNodes;
Document includes GeometryUtils;
Document includes FontFaceSource;
Document includes DocumentOrShadowRoot;
+1 -1
View File
@@ -24,4 +24,4 @@ partial interface DocumentFragment {
NodeList querySelectorAll(DOMString selectors);
};
DocumentFragment implements ParentNode;
DocumentFragment includes ParentNode;
+1 -2
View File
@@ -8,8 +8,7 @@
* http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin
*/
[NoInterfaceObject]
interface DocumentOrShadowRoot {
interface mixin DocumentOrShadowRoot {
// Not implemented yet: bug 1430308.
// Selection? getSelection();
Element? elementFromPoint (float x, float y);
+1 -1
View File
@@ -16,4 +16,4 @@ interface DocumentType : Node {
readonly attribute DOMString systemId;
};
DocumentType implements ChildNode;
DocumentType includes ChildNode;
+1 -1
View File
@@ -32,5 +32,5 @@ interface DynamicsCompressorNode : AudioNode {
};
// Mozilla extension
DynamicsCompressorNode implements AudioNodePassThrough;
DynamicsCompressorNode includes AudioNodePassThrough;
+32 -9
View File
@@ -163,6 +163,29 @@ interface Element : Node {
sequence<Grid> getGridFragments();
};
// https://drafts.csswg.org/cssom/#the-elementcssinlinestyle-mixin
interface mixin ElementCSSInlineStyle {
[SameObject, PutForwards=cssText]
readonly attribute CSSStyleDeclaration style;
};
// https://html.spec.whatwg.org/#focus-management-apis
dictionary FocusOptions {
boolean preventScroll = false;
};
interface mixin HTMLOrForeignElement {
[SameObject] readonly attribute DOMStringMap dataset;
// See bug 1389421
// attribute DOMString nonce; // intentionally no [CEReactions]
// See bug 1575154
// [CEReactions] attribute boolean autofocus;
[CEReactions, SetterThrows, Pure] attribute long tabIndex;
[Throws] void focus(optional FocusOptions options);
[Throws] void blur();
};
// http://dev.w3.org/csswg/cssom-view/
enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
dictionary ScrollIntoViewOptions : ScrollOptions {
@@ -212,10 +235,10 @@ partial interface Element {
// http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface
partial interface Element {
[CEReactions, Pure,SetterThrows,TreatNullAs=EmptyString]
attribute DOMString innerHTML;
[CEReactions, Pure,SetterThrows,TreatNullAs=EmptyString]
attribute DOMString outerHTML;
[CEReactions, Pure, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString innerHTML;
[CEReactions, Pure, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString outerHTML;
[CEReactions, Throws]
void insertAdjacentHTML(DOMString position, DOMString text);
};
@@ -246,11 +269,11 @@ partial interface Element {
attribute DOMString slot;
};
Element implements ChildNode;
Element implements NonDocumentTypeChildNode;
Element implements ParentNode;
Element implements Animatable;
Element implements GeometryUtils;
Element includes ChildNode;
Element includes NonDocumentTypeChildNode;
Element includes ParentNode;
Element includes Animatable;
Element includes GeometryUtils;
// https://fullscreen.spec.whatwg.org/#api
partial interface Element {
+10 -8
View File
@@ -24,8 +24,7 @@ typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
callback OnErrorEventHandlerNonNull = boolean ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error);
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
[NoInterfaceObject]
interface GlobalEventHandlers {
interface mixin GlobalEventHandlers {
attribute EventHandler onabort;
attribute EventHandler onblur;
// We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
@@ -147,8 +146,7 @@ interface GlobalEventHandlers {
attribute EventHandler onwebkittransitionend;
};
[NoInterfaceObject]
interface WindowEventHandlers {
interface mixin WindowEventHandlers {
attribute EventHandler onafterprint;
attribute EventHandler onbeforeprint;
attribute OnBeforeUnloadEventHandler onbeforeunload;
@@ -166,17 +164,21 @@ interface WindowEventHandlers {
attribute EventHandler onunload;
};
interface mixin DocumentAndElementEventHandlers {
attribute EventHandler oncopy;
attribute EventHandler oncut;
attribute EventHandler onpaste;
};
// The spec has |attribute OnErrorEventHandler onerror;| on
// GlobalEventHandlers, and calls the handler differently depending on
// whether an ErrorEvent was fired. We don't do that, and until we do we'll
// need to distinguish between onerror on Window or on nodes.
[NoInterfaceObject]
interface OnErrorEventHandlerForNodes {
interface mixin OnErrorEventHandlerForNodes {
attribute EventHandler onerror;
};
[NoInterfaceObject]
interface OnErrorEventHandlerForWindow {
interface mixin OnErrorEventHandlerForWindow {
attribute OnErrorEventHandler onerror;
};
+1 -2
View File
@@ -10,8 +10,7 @@
typedef object JSON;
typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit;
[NoInterfaceObject, Exposed=(Window,Worker)]
interface Body {
interface mixin Body {
readonly attribute boolean bodyUsed;
[Throws]
Promise<ArrayBuffer> arrayBuffer();
+1 -2
View File
@@ -10,8 +10,7 @@
* liability, trademark and document use rules apply.
*/
[NoInterfaceObject]
interface FontFaceSource {
interface mixin FontFaceSource {
[Pref="layout.css.font-loading-api.enabled"]
readonly attribute FontFaceSet fonts;
+1 -1
View File
@@ -23,5 +23,5 @@ interface GainNode : AudioNode {
};
// Mozilla extension
GainNode implements AudioNodePassThrough;
GainNode includes AudioNodePassThrough;
+2 -3
View File
@@ -21,8 +21,7 @@ dictionary ConvertCoordinateOptions {
CSSBoxType toBox = "border";
};
[NoInterfaceObject]
interface GeometryUtils {
interface mixin GeometryUtils {
[Throws, Func="nsINode::HasBoxQuadsSupport"]
sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options);
[Throws, Pref="layout.css.convertFromNode.enabled"]
@@ -33,6 +32,6 @@ interface GeometryUtils {
DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options);
};
// PseudoElement implements GeometryUtils;
// PseudoElement includes GeometryUtils;
typedef (Text or Element /* or PseudoElement */ or Document) GeometryNode;
+1 -1
View File
@@ -35,7 +35,7 @@ interface HTMLAnchorElement : HTMLElement {
attribute DOMString text;
};
HTMLAnchorElement implements HTMLHyperlinkElementUtils;
HTMLAnchorElement includes HTMLHyperlinkElementUtils;
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
partial interface HTMLAnchorElement {
+3 -3
View File
@@ -38,6 +38,6 @@ interface HTMLAppletElement : HTMLElement {
attribute DOMString width;
};
HTMLAppletElement implements MozImageLoadingContent;
HTMLAppletElement implements MozFrameLoaderOwner;
HTMLAppletElement implements MozObjectLoadingContent;
HTMLAppletElement includes MozImageLoadingContent;
HTMLAppletElement includes MozFrameLoaderOwner;
HTMLAppletElement includes MozObjectLoadingContent;
+1 -1
View File
@@ -35,7 +35,7 @@ interface HTMLAreaElement : HTMLElement {
readonly attribute DOMTokenList relList;
};
HTMLAreaElement implements HTMLHyperlinkElementUtils;
HTMLAreaElement includes HTMLHyperlinkElementUtils;
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
partial interface HTMLAreaElement {
+11 -11
View File
@@ -16,18 +16,18 @@ interface HTMLBodyElement : HTMLElement {
};
partial interface HTMLBodyElement {
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
attribute DOMString text;
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
attribute DOMString link;
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
attribute DOMString vLink;
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
attribute DOMString aLink;
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
attribute DOMString bgColor;
[CEReactions, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString text;
[CEReactions, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString link;
[CEReactions, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString vLink;
[CEReactions, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString aLink;
[CEReactions, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString bgColor;
[CEReactions, SetterThrows]
attribute DOMString background;
};
HTMLBodyElement implements WindowEventHandlers;
HTMLBodyElement includes WindowEventHandlers;
+5 -5
View File
@@ -57,11 +57,11 @@ interface HTMLDocument : Document {
[Throws]
DOMString queryCommandValue(DOMString commandId);
[CEReactions, TreatNullAs=EmptyString] attribute DOMString fgColor;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString linkColor;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString vlinkColor;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString alinkColor;
[CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString fgColor;
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString linkColor;
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString vlinkColor;
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString alinkColor;
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
[Pure]
readonly attribute HTMLCollection anchors;
+9 -24
View File
@@ -22,22 +22,14 @@ interface HTMLElement : Element {
// attribute boolean translate;
[CEReactions, SetterThrows, Pure]
attribute DOMString dir;
[Constant]
readonly attribute DOMStringMap dataset;
[CEReactions, GetterThrows, Pure, TreatNullAs=EmptyString]
attribute DOMString innerText;
[CEReactions, GetterThrows, Pure]
attribute [TreatNullAs=EmptyString] DOMString innerText;
// user interaction
[CEReactions, SetterThrows, Pure]
attribute boolean hidden;
void click();
[CEReactions, SetterThrows, Pure]
attribute long tabIndex;
[Throws]
void focus();
[Throws]
void blur();
[CEReactions, SetterThrows, Pure]
attribute DOMString accessKey;
[Pure]
@@ -61,15 +53,6 @@ interface HTMLElement : Element {
//readonly attribute boolean? commandHidden;
//readonly attribute boolean? commandDisabled;
//readonly attribute boolean? commandChecked;
// styling
[PutForwards=cssText, Constant]
readonly attribute CSSStyleDeclaration style;
// Mozilla specific stuff
attribute EventHandler oncopy;
attribute EventHandler oncut;
attribute EventHandler onpaste;
};
// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
@@ -89,8 +72,7 @@ partial interface HTMLElement {
attribute boolean scrollgrab;
};
[NoInterfaceObject]
interface TouchEventHandlers {
interface mixin TouchEventHandlers {
[Func="nsGenericHTMLElement::TouchEventsEnabled"]
attribute EventHandler ontouchstart;
[Func="nsGenericHTMLElement::TouchEventsEnabled"]
@@ -101,8 +83,11 @@ interface TouchEventHandlers {
attribute EventHandler ontouchcancel;
};
HTMLElement implements GlobalEventHandlers;
HTMLElement implements TouchEventHandlers;
HTMLElement implements OnErrorEventHandlerForNodes;
HTMLElement includes GlobalEventHandlers;
HTMLElement includes HTMLOrForeignElement;
HTMLElement includes DocumentAndElementEventHandlers;
HTMLElement includes ElementCSSInlineStyle;
HTMLElement includes TouchEventHandlers;
HTMLElement includes OnErrorEventHandlerForNodes;
interface HTMLUnknownElement : HTMLElement {};
+3 -3
View File
@@ -41,6 +41,6 @@ partial interface HTMLEmbedElement {
Document? getSVGDocument();
};
HTMLEmbedElement implements MozImageLoadingContent;
HTMLEmbedElement implements MozFrameLoaderOwner;
HTMLEmbedElement implements MozObjectLoadingContent;
HTMLEmbedElement includes MozImageLoadingContent;
HTMLEmbedElement includes MozFrameLoaderOwner;
HTMLEmbedElement includes MozObjectLoadingContent;
+1 -1
View File
@@ -13,7 +13,7 @@
[HTMLConstructor]
interface HTMLFontElement : HTMLElement {
[CEReactions, TreatNullAs=EmptyString, SetterThrows] attribute DOMString color;
[CEReactions, SetterThrows] attribute [TreatNullAs=EmptyString] DOMString color;
[CEReactions, SetterThrows] attribute DOMString face;
[CEReactions, SetterThrows] attribute DOMString size;
};
+5 -5
View File
@@ -29,10 +29,10 @@ interface HTMLFrameElement : HTMLElement {
readonly attribute Document? contentDocument;
readonly attribute WindowProxy? contentWindow;
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
attribute DOMString marginHeight;
[CEReactions, TreatNullAs=EmptyString, SetterThrows]
attribute DOMString marginWidth;
[CEReactions, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString marginHeight;
[CEReactions, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString marginWidth;
};
HTMLFrameElement implements MozFrameLoaderOwner;
HTMLFrameElement includes MozFrameLoaderOwner;
+1 -1
View File
@@ -19,4 +19,4 @@ interface HTMLFrameSetElement : HTMLElement {
attribute DOMString rows;
};
HTMLFrameSetElement implements WindowEventHandlers;
HTMLFrameSetElement includes WindowEventHandlers;
+1 -2
View File
@@ -10,8 +10,7 @@
* and create derivative works of this document.
*/
[NoInterfaceObject]
interface HTMLHyperlinkElementUtils {
interface mixin HTMLHyperlinkElementUtils {
// Bug 824857: no support for stringifier attributes yet.
// stringifier attribute USVString href;
+6 -6
View File
@@ -45,10 +45,10 @@ partial interface HTMLIFrameElement {
[CEReactions, SetterThrows, Pure]
attribute DOMString longDesc;
[CEReactions, TreatNullAs=EmptyString, SetterThrows, Pure]
attribute DOMString marginHeight;
[CEReactions, TreatNullAs=EmptyString, SetterThrows, Pure]
attribute DOMString marginWidth;
[CEReactions, SetterThrows, Pure]
attribute [TreatNullAs=EmptyString] DOMString marginHeight;
[CEReactions, SetterThrows, Pure]
attribute [TreatNullAs=EmptyString] DOMString marginWidth;
};
partial interface HTMLIFrameElement {
@@ -59,9 +59,9 @@ partial interface HTMLIFrameElement {
partial interface HTMLIFrameElement {
// nsIDOMMozBrowserFrame
[ChromeOnly,SetterThrows]
[ChromeOnly, SetterThrows]
attribute boolean mozbrowser;
};
HTMLIFrameElement implements MozFrameLoaderOwner;
HTMLIFrameElement includes MozFrameLoaderOwner;
HTMLIFrameElement implements BrowserElement;
+3 -4
View File
@@ -55,7 +55,7 @@ partial interface HTMLImageElement {
[CEReactions, SetterThrows]
attribute DOMString longDesc;
[CEReactions, TreatNullAs=EmptyString,SetterThrows] attribute DOMString border;
[CEReactions, SetterThrows] attribute [TreatNullAs=EmptyString] DOMString border;
};
// [Update me: not in whatwg spec yet]
@@ -77,8 +77,7 @@ partial interface HTMLImageElement {
readonly attribute long y;
};
[NoInterfaceObject]
interface MozImageLoadingContent {
interface mixin MozImageLoadingContent {
// Mirrored chrome-only nsIImageLoadingContent methods. Please make sure
// to update this list if nsIImageLoadingContent changes.
[ChromeOnly]
@@ -108,4 +107,4 @@ interface MozImageLoadingContent {
void forceImageState(boolean aForce, unsigned long long aState);
};
HTMLImageElement implements MozImageLoadingContent;
HTMLImageElement includes MozImageLoadingContent;
Loaded 100 of 420 files, more files were not shown because too many files have changed in this diff. Show more