Compare commits

...
513 Commits
Author SHA1 Message Date
Moonchild f1b51be787 Merge branch 'redwood' into release 2020-07-10 18:46:10 +00:00
Moonchild 82faff19e1 [network] Use query and ref lengths if available in nsStandardURL. 2020-07-10 18:34:52 +00:00
Moonchild 1597b61148 [js] Get the class pointer from the ObjectGroup in NativeObject::slotSpan
This changes NativeObject::slotSpan() to get the class from the object group
rather than getting it from the base shape to avoid a race between
Shape::ensureOwnBaseShape and background sweeping.
2020-07-10 18:34:43 +00:00
Moonchild 694c5f889c Force clobber 2020-07-10 18:34:31 +00:00
Moonchild c1f8c0cb5d [NSS] Version and build bump 2020-07-10 18:33:22 +00:00
Sohaib ul Hassan dcab408a5f [NSS] Implement constant-time GCD and modular inversion
The implementation is based on the work by Bernstein and Yang
(https://eprint.iacr.org/2019/266)
"Fast constant-time gcd computation and modular inversion".

It fixes the old mp_gcd and s_mp_invmod_odd_m functions. The patch also fixes
mpl_significant_bits s_mp_div_2d and s_mp_mul_2d by having less control flow to
reduce side-channel leaks.

Co-authored by : Billy Bob Brumley
2020-07-10 18:33:11 +00:00
Moonchild 407c503fa4 [js] Improve readability and control flow of js date string parser. 2020-07-10 18:33:01 +00:00
Byron Campen [:bwc] 9130f12906 [WebRTC] Make candidate pair insertion code easier to read/understand.
Includes removing an error code for a function that never fails, and removing an
error return when the function successfully did what it said it would.

Ref: BZ 1644477
2020-07-10 18:32:51 +00:00
Moonchild 5e2b3d1d89 [AppCache] Add check for disallowed encoded path separators 2020-07-10 18:32:35 +00:00
Moonchild 0c5a41e894 [image] Add a sanity check to JPEG encoder buffer handling, just in case. 2020-07-10 18:32:26 +00:00
Moonchild e29a8bd113 Issue #618 - Fix typo and remove old function declarations. 2020-07-10 18:31:16 +00:00
Moonchild 83abc5af59 Issue #618 - Report source position information (line/column)
Report source position information for module export resolution failures.

Ref: BZ 1362098
2020-07-10 18:31:06 +00:00
Moonchild 47101f49c0 Issue #618 - Slightly improve module scripting tests.
Ref: BZ 1388728
2020-07-10 18:30:57 +00:00
Moonchild f6a6900a6b Issue #618 - Further align error handling for module scripts with the spec
Ref: BZ 1388728
2020-07-10 18:30:48 +00:00
Moonchild 40aad1a220 Issue #618 - Remove context and heap-idle check
For checking if a module is in an error state and what the error is, it
shouldn't matter if we are currently GC-ing or not. So we don't need to check
for it, which removes the requirement to pass in the JS context (needed for
AssertHeapIsIdle's runtime check); this unblocks progress where otherwise we'd
have to figure out what the context is at the module level just to satisfy this
check.
2020-07-10 18:30:39 +00:00
Moonchild 1e14031a59 Issue #618 - Remove eager instantiation
This backs out the stuff added in Bug 1295978.
Ref: BZ 1295978, 1388728
2020-07-10 18:30:30 +00:00
Moonchild 765c90318f Issue #618 - Fix JSAPI additions to pass the JS context. 2020-07-10 18:30:14 +00:00
Moonchild ef8d18da70 Issue #618 - Match JSAPI names with the changes in 9ca7414722
Ref: BZ 1388728
2020-07-10 18:30:03 +00:00
Moonchild 7bf3e4c464 Issue #618 - Add APIs to query module record errors
Ref: BZ 1388728
2020-07-10 18:29:52 +00:00
Moonchild 57523a0deb Issue #618 - Update code comments for ModuleInstantiate 2020-07-10 18:29:43 +00:00
Moonchild 3f25d0c8e4 Issue #618 - Align module instantiation/errors with the updated spec.
Store and re-throw module instantiation and evaluation errors.
Ref: BZ 1374239, 1394492
2020-07-10 18:29:33 +00:00
Moonchild ab05017026 Issue #618 - Add clarifying code comments. 2020-07-10 18:29:22 +00:00
Moonchild 255c7f6f3a Issue #618 - Check for failed instantiation when starting to fetch dependencies
If instantiation has failed, then also fail the load and don't fetch imports.
Ref BZ: 1358882
2020-07-10 18:29:13 +00:00
Moonchild 5ffe27bb03 Issue #1603 - Part 2: Split some classes out of ScriptLoader.cpp
This splits ScriptLoader up the same way Mozilla did with the exception of
ScriptRequest due to the fact that ScriptLoader and ScriptRequest are
interdependent and would create a circular dependency if split apart when not
using unified building.
2020-07-10 18:29:02 +00:00
Moonchild 0633844f46 Issue #1603 - Part 1: Reorganize ScriptLoader/ScriptElement
- Moves scripting parts of DOM into 'dom/script'
- Renames nsScript{Loader/Element} to Script{Loader/Element}
- Adjusts all callers
2020-07-10 18:28:50 +00:00
Gaming4JC d0126b96cd Bug 1316302 - Part 4: Refine HTMLEditRules::TryToJoinBlocks() and HTMLEditRules::MoveNodeSmart() with early return style for making scope of EditActionResult variable smaller
For now, let's make the scope of EditActionResult variable in them smaller without big change.

Tag #1563
2020-06-27 02:20:41 +02:00
Gaming4JC d4cd571021 Bug 1316302 - Part 3: Create EditActionResult class for making the methods which return nsresult, handled and canceled with out params
In a lot of places, edit action handlers and their helper methods return nsresult and aHandled and aCanceled with out params. However, the out params cause the code complicated since:

* it's not unclear if the method will overwrite aHandled and aCanceled value.
* callers need to create temporary variable event if some of them are not necessary.

This patch rewrites the helper methods of HTMLEditRules::WillDeleteSelection() with it.

Tag #1563
2020-06-27 02:20:28 +02:00
Gaming4JC 016c55f409 Bug 1316302 - Part 2: WillDeleteSelection() should retry to handle it when selection is collapsed and JoinBlocks() doesn't handle nor cancel the action
When selection is collapsed and JoinBlocks() doesn't handle nor cancel the action, WillDeleteSelection() should move selection to the start/end of leftmost/rightmost editable leaf node and retry to handle the action again.

For avoiding infinite loop, it checks if selected node is changed actually before calling itself again.

Tag #1563
2020-06-27 02:20:16 +02:00
Gaming4JC 016313d559 Bug 1316302 - Part 1: Helper methods for HTMLEditRules::WillDeleteSelection() should have an out argument to indicates if it actually handles the action
When HTMLEditRules::WillDeleteSelection() tries to remove something from the end/start of a block to its last/first text node but it's contained by block elements, it tries to join the container and the block. However, JoinBlocks() always fails to join them since it's impossible operation. In this case, HTMLEditRules::WillDeleteSelection() should retry to remove something in the leaf, however, it's impossible for now because JoinBlocks() and its helper methods don't return if it handles the action actually.

This patch renames |JoinBlocks()| to |TryToJoinBlocks()| for representing what it is. And this patch adds |bool* aHandled| to the helper methods. Then, *aHandled and *aCancel are now always returns the result of each method. Therefore, for merging the result of multiple helper methods, callers need to receive the result with temporary variables and merge them by themselves.

Note that when they modify DOM node actually or the action should do nothing (for example, selection is across tables), aHandled is set to true.

Tag #1563
2020-06-27 02:20:04 +02:00
wolfbeast 1fa428a789 Issue #1602 - Make sure we have a JSObject before trying to get global.
Dynamic script loading/unloading (thank you modules) can yank the script
out from under us before the JS API for it is initialized, leading to
null deref crashes.
This adds a simple check if the passed-in object is sane and present.
Resolves #1602
2020-06-27 02:19:50 +02:00
Lootyhoof d41fe2f55a Follow up to Issue #1578 - Remove unnecessary MOZ_ASSERT 2020-06-17 12:17:20 +00:00
Moonchild 4d9da86152 Issue #1594 - restore UAC elevation in the uninstaller.
Effectively backs out BZ 1333789 which was uplifted to
Firefox before we forked for UXP.
Resolves #1594
2020-06-17 12:13:15 +00:00
Gaming4JC aa19e3d8ba Bug 1613623 - For IMAP, no longer allow STARTTLS when server sends PREAUTH greeting.
Tag #1312
2020-06-17 12:12:36 +00:00
Moonchild f5b146a460 Issue #1587 - Part 10: Expose controlling pref and enable by default 2020-06-13 11:53:05 +02:00
Moonchild e2403eeb5a Issue #1587 - Part 9: Immediately reject an already-aborted signal 2020-06-13 11:52:53 +02:00
Moonchild 301ae8c2df Issue #1587 - Part 8: Remove controller follow/unfollow
Since it didn't end up being in the final spec after all.
2020-06-13 11:52:42 +02:00
Moonchild 21403c31e0 Issue #1587 - Part 7: Rename FetchController to AbortController
Also renames FetchSignal to AbortSignal. Includes renaming the various
controlling prefs to enable.
2020-06-13 11:52:30 +02:00
Moonchild 29bca891d5 Issue #1587 - Part 6: Move FetchController/Signal to its own dir
Since it is specced separately from fetch.
2020-06-13 11:52:17 +02:00
Moonchild bb70605829 Issue #1587 - Part 5: Hook FetchObserver up to the Fetch API 2020-06-13 11:52:04 +02:00
Moonchild 3f3d626434 Issue #1587 - Part 4: Implement FetchObserver 2020-06-13 11:51:53 +02:00
Moonchild a04d67dd12 Issue #1587 - Part 3: Hook FetchSignal up to the Fetch API 2020-06-13 11:51:41 +02:00
Moonchild 9e2da53a02 Issue #1587 - Part 2: Implement controller follow/unfollow 2020-06-13 11:51:30 +02:00
Moonchild 2b41c85019 Issue #1587 - Part 1: Implement FetchController/FetchSignal interface 2020-06-13 11:51:18 +02:00
adeshkp e9d41c9968 Issue #1542 - Fix a typo in wasm which was causing build failure on ARM 2020-06-13 11:50:21 +02:00
Moonchild 0e0feed5da Issue #1585 - Replace node.rootNode with node.getRootNode()
This removes the (default disabled) node.rootNode readonly attribute
and replaces it with a node.getRootNode() function per WhatWG
spec discussion.
Based on work by John Dai <jdai@mozilla.com>
2020-06-13 11:50:06 +02:00
Matt A. Tobin 7f238b1cf9 Follow up to Issue #1578 - Preprocess the popup binding 2020-06-13 11:49:53 +02:00
Lootyhoof 6235023c8b Issue MoonchildProductions/UXP#1578 - Add global menubar support for GTK 2020-06-13 11:49:36 +02:00
Moonchild f51beb3fda Issue #1560 - Always include speech synthesis IPDLs
This is entangled with the IPC messaging configuration so
we need these IPDLs even if sppech synthesis is otherwise
not being built.

This resolves #1560
2020-06-13 11:49:13 +02:00
Moonchild a934165b57 [NSS] Update exported symbols
Some symbols were missing from export which might lead to build bustage.
2020-06-13 11:47:25 +02:00
Gaming4JC 2516886ceb Issue #1580 - Add missing MP3Demuxer.h to MediaDecoderReader.h
Follow up for dom/media work on Issue #80. Fixes non-optimized build bustage.
2020-06-13 11:47:05 +02:00
Moonchild fbab1f4f9e [DOM] Hard-disable webcomponents and customelements prefs (redwood) 2020-06-07 18:09:13 +00:00
Moonchild 90c42b7afd Fix missing include 2020-06-03 11:45:28 +00:00
Moonchild 2deaddfca2 Fix missing include 2020-06-03 11:44:55 +00:00
Moonchild 0ccb51f2ae Merge branch 'release' of https://github.com/MoonchildProductions/UXP into release 2020-06-03 10:51:52 +00:00
Moonchild 5e5f2277f5 Merge branch 'redwood' into release 2020-06-03 10:50:44 +00:00
Moonchild 265d1b8019 [NSS] Bump NSS version 2020-06-03 10:49:54 +00:00
Moonchild 687f535b9c [NSS] Force a fixed length for DSA exponentiation 2020-06-03 10:49:43 +00:00
Moonchild 54b4fb0be6 Bug 1632717 2020-06-03 10:49:35 +00:00
adeshkp a054ece041 Issue #1566 - Lowercase link filename extension 2020-06-03 10:49:23 +00:00
Moonchild c6ca4380e9 Merge remote-tracking branch 'origin/redwood' into release 2020-06-01 21:58:35 +00:00
athenian200 744b044935 Issue #1571 - Remove JEMALLOC_USES_MAP_ALIGN and fix 48-bit addressing on SunOS AMD64.
The JEMALLOC_USES_MAP_ALIGN code has turned out to be worse than useless, and in fact it breaks 64-bit SunOS. It's very old and turned out not to be needed anymore because the way the memory allocator works has changed since it was implemented. It prevented a fix I tried for 48-bit addressing from working properly. However, without either this code or the 48-bit addressing fix, the 64-bit version won't even start, which is why I thought the code was still needed.

https://bugzilla.mozilla.org/show_bug.cgi?id=457189

https://hg.mozilla.org/mozilla-central/rev/a26c500b98ab

The 48-bit addressing fix is based on code found here:

https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/web/firefox/patches/patch-js_src_gc_Memory.cpp.patch

I already applied these changes to js/src/gc/Memory.cpp, but as I was looking through jemalloc.c I saw that there were very similar ifdefs for Linux on SPARC as the ones I'd had to enaable in Memory.cpp, but for whatever reason the patches I found didn't touch them. So I tried doing for jemalloc.c what was already done for Memory.cpp, and it worked (but only after I removed the map align code).
2020-06-01 11:48:25 +00:00
Moonchild b246f7b2f1 Update README.md
wiki -> site
2020-06-01 11:48:15 +00:00
wolfbeast 8618719921 Issue #1570 - Implement globalThis
This resolves #1570
2020-06-01 11:48:07 +00:00
Fedor b6db7da98a Issue #1558 - Prevent null deref crash in WebrtcVideoConduit DTOR 2020-06-01 11:47:44 +00:00
Ascrod 9805ddc483 Issue #361 - Remove dead Android code.
See Bug 1629030, part 3.
2020-06-01 11:47:09 +00:00
Trushita 83ac4391b6 Bug 1154295 - use normal formatting for plaintext documents in reader mode
Before this change the plain text document in reader mode was not formatted/styled properly.

Tag #361.
2020-06-01 11:47:01 +00:00
Cameron McCormack 027a4cac9c Bug 1621479 - Fix typo in reader mode CSS class preservation list.
Tag #361.
2020-06-01 11:46:53 +00:00
Ascrod 66470fa1d8 Issue #361 - Update Readability from upstream.
(git rev 52ab9b5c8916c306a47b2119270dcdabebf9d203)
2020-06-01 11:46:41 +00:00
athenian200 451509e2c0 Issue #1571 - Remove JEMALLOC_USES_MAP_ALIGN and fix 48-bit addressing on SunOS AMD64.
The JEMALLOC_USES_MAP_ALIGN code has turned out to be worse than useless, and in fact it breaks 64-bit SunOS. It's very old and turned out not to be needed anymore because the way the memory allocator works has changed since it was implemented. It prevented a fix I tried for 48-bit addressing from working properly. However, without either this code or the 48-bit addressing fix, the 64-bit version won't even start, which is why I thought the code was still needed.

https://bugzilla.mozilla.org/show_bug.cgi?id=457189

https://hg.mozilla.org/mozilla-central/rev/a26c500b98ab

The 48-bit addressing fix is based on code found here:

https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/web/firefox/patches/patch-js_src_gc_Memory.cpp.patch

I already applied these changes to js/src/gc/Memory.cpp, but as I was looking through jemalloc.c I saw that there were very similar ifdefs for Linux on SPARC as the ones I'd had to enaable in Memory.cpp, but for whatever reason the patches I found didn't touch them. So I tried doing for jemalloc.c what was already done for Memory.cpp, and it worked (but only after I removed the map align code).
2020-06-01 11:00:26 +02:00
wolfbeast 7895b8acd9 Issue #1570 - Implement globalThis
This resolves #1570
2020-06-01 10:59:51 +02:00
Fedor ccff4610c5 Issue #1558 - Prevent null deref crash in WebrtcVideoConduit DTOR 2020-06-01 10:59:15 +02:00
Moonchild 3045e1d5c9 [permissions] Fix build bustage with --disable-permissions 2020-05-23 16:13:26 +02:00
Moonchild 44de3c3023 [printing] Fix build bustage with --disable-printing 2020-05-23 16:13:14 +02:00
athenian200 a3124c55a1 Issue #1557 - Allow event dispatch on disabled form controls. (uplift) 2020-05-23 16:12:59 +02:00
athenian200 c4ed566602 Revert "Merge pull request #1357 from athenian200/form-disabled-issue"
This reverts commit ed88b99849, reversing
changes made to c4b0715baa.
2020-05-23 16:10:40 +02:00
athenian200 15a1f78f8b Issue #1557 - Allow event dispatch on disabled form controls. (uplift) 2020-05-21 13:16:17 +00:00
athenian200 8b44473fe6 Revert "Merge pull request #1357 from athenian200/form-disabled-issue"
This reverts commit ed88b99849, reversing
changes made to c4b0715baa.
2020-05-21 13:10:27 +00:00
athenian200 6e0aee959e Issue #1540 - Stop MP3 demuxer from choking on very small files. 2020-05-20 17:18:39 +02:00
Moonchild 99c2e698d2 Issue #1538 - remove speech recognition engine
This removes speech recognition, pocketsphinx, training models
and the speech automated test interface.
This also re-establishes proper use of MOZ_WEBSPEECH to work
for the speech API (synthesis part only) that was a broken mess
before, with some synth parts being always built, some parts
being built only with it enabled and recognition parts being
dependent on it. I'm pretty sure it'd be totally busted if you'd
ever have tried building without MOZ_WEBPEECH before.

Tested that synthesis still works as-intended.

This resolves #1538
2020-05-20 14:04:17 +00:00
Jiaxun Yang 15ac4021b0 Bug 1430745 - IPC: Fix unaligned accesses in DirReaderLinux
Tag: #1542
2020-05-20 14:04:01 +00:00
Jiaxun Yang 344b272991 Issue #1542 - [mtransport] Fix unaligned memory allocation in r_memory
Unaligend memory access can't work on RISC.
2020-05-20 14:03:54 +00:00
Jiaxun Yang fb8fcffe1d Bug 1426323 - Media: WebRTC: Fix build config for MIPS64
Tag: #1542
2020-05-20 14:03:46 +00:00
Jiaxun Yang b67a630966 Issue #1542 - [WebRTC] Set CPU speed to -1 on MIPS
CPU is pretty slow due to lack of SIMD optmization.
2020-05-20 14:03:38 +00:00
Jiaxun Yang a148bd40d8 Issue #1542 - [WebRTC] Don't use post proc on MIPS 2020-05-20 14:03:28 +00:00
Jiaxun Yang e59757fddf Bug 1384826 - Media: WebRTC: Fix build config for MIPS
Tag: #1542
2020-05-20 14:03:20 +00:00
Jiaxun Yang be954fca72 Bug 1412030 - [MIPS] Emit wasm memory access information
Tag: #1542
2020-05-20 14:03:12 +00:00
Jiaxun Yang f411e02716 Bug 1330942 - move MemoryAccessDesc::isUnaligned to the ARM/MIPS platform layer
Tag: #1542
2020-05-20 14:03:04 +00:00
Jiaxun Yang a34d02924c Bug 1441521 : [MIPS] Optimize comparation with small constants
Tag: #1542
2020-05-20 14:02:56 +00:00
Jiaxun Yang 084ea153c1 Bug 1430693 - IonMonkey: MIPS: Fix generic NaN for legacy mips (IEEE 754-1985)
Tag: #1542
2020-05-20 14:02:49 +00:00
Jiaxun Yang c40bda67bb Bug 1424978 - IonMonkey: MIPS64: Fix unboxNonDouble for Int32
Tag: #1542
2020-05-20 14:02:42 +00:00
Jiaxun Yang 0c2de12ffd Bug 1424978 - IonMonkey: MIPS64: Fix tagValue function
Tag: #1542
2020-05-20 14:02:35 +00:00
Jiaxun Yang e44709892b Bug 1424978 - IonMonkey: MIPS64: Fix boxValue function
Tag: #1542
2020-05-20 14:02:28 +00:00
Jiaxun Yang 237f8d7ebd Bug 1390802 - IonMonkey: MIPS64: Fix storeValue function
Tag: #1542
2020-05-20 14:02:21 +00:00
Jiaxun Yang 5001007287 Bug 1424978 - IonMonkey: MIPS: Fix ma_store_unaligned
Tag: #1542
2020-05-20 14:02:13 +00:00
Jiaxun Yang f83a88907a Bug 1424978 - IonMonkey: MIPS: Fix ma_addTestCarry
Tag: #1542
2020-05-20 14:02:06 +00:00
Jiaxun Yang ff8603d7a2 Bug 1390459 - mulby3 function implement error on mips platform
Tag: #1542
2020-05-20 14:02:00 +00:00
Jiaxun Yang 31ad2d12db Bug 1271968 - IonMonkey: MIPS: Refactor addMixedJump.
Tag: #1542
2020-05-20 14:01:52 +00:00
Jiaxun Yang 494cfe32c9 Bug 1271968 - wasm: MIPS: Port mixed jump for wasm.
Tag: #1542
2020-05-20 14:01:45 +00:00
Jiaxun Yang b4f0be5e95 Bug 1271968 - IonMonkey: MIPS: Refactor PatchWrite_NearCall.
Tag: #1542
2020-05-20 14:01:38 +00:00
Jiaxun Yang ac62e4cfdd Bug 1271968 - IonMonkey: MIPS: Handle conditional branch in out of line code of mixed jump.
Tag: #1542
2020-05-20 14:01:30 +00:00
Jiaxun Yang 0fa41e2adc Bug 1271968 - IonMonkey: MIPS: Merge MacroAssembler::branchWithCode.
Tag: #1542
2020-05-20 14:01:22 +00:00
Jiaxun Yang 61af6cc299 Bug 1271968 - IonMonkey: MIPS: Merge MacroAssembler::ma_jal.
Tag: #1542
2020-05-20 14:01:14 +00:00
Jiaxun Yang c3a21acaee Bug 1271968 - IonMonkey: MIPS: Merge Assembler::bind.
Tag: #1542
2020-05-20 14:01:06 +00:00
Jiaxun Yang 3fb8648bed Bug 1271968 - IonMonkey: MIPS: Replace long jumps by mixed jumps.
Tag: #1542
2020-05-20 14:00:59 +00:00
Jiaxun Yang f18d78dea0 Bug 1271968 - IonMonkey: MIPS: Make jit code in same 256 MB-aligned region
Tag: #1542
2020-05-20 14:00:49 +00:00
Jiaxun Yang 16ae8db806 [IonMonkey] MIPS: Import small optimizations from load & store 2020-05-20 14:00:40 +00:00
Jiaxun Yang 43f57fe642 Issue #1542 - IonMonkey: MIPS32: Fix build error on O32 platform. 2020-05-20 14:00:30 +00:00
Jiaxun Yang f50410bd79 Bug 1323646 - IonMonkey: MIPS64: Fix range checking in ma_addTestOverflow
Tag: #1542
2020-05-20 14:00:23 +00:00
Jiaxun Yang 609d904cc1 Bug 1323642 - IonMonkey: MIPS64: Fix load unsigned 48-bit immediate
Issue:
In ma_li(Register, ImmWord):
	Load unsigned 48-bit immediate: 0x0000_8000_0000_0000
	Wrong instructions stream:
		lui	reg, 0x8000
		dsll	reg, reg, 16 # reg = 0xffff_8000_0000_0000
	Fixed instructions stream:
		lui	reg, 0x8000
		dinsu	reg, zero, 32, 32
		dsll	reg, reg, 16

Tag: #1542
2020-05-20 14:00:15 +00:00
Jiaxun Yang fa1628f767 Bug 1323136 - wasm: MIPS: Do bounds check in 32-bit
Tag: #1542
2020-05-20 14:00:08 +00:00
Jiaxun Yang 0136960ec0 Bug 1344597 - Baldr: MIPS: Fix trap type of unsigned divide by zero
Tag: #1542
2020-05-20 14:00:01 +00:00
Jiaxun Yang d9e0b4be85 Bug 1394286 - mips64: fix error correction about stackpointer within function _NS_InvokeByIndex
Tag: #1542
2020-05-20 13:59:53 +00:00
Jiaxun Yang a17ab79b88 Issue #1542 - nsprpub: _PR_SI_ARCHITECTURE add missing mips64 2020-05-20 13:59:46 +00:00
Jiaxun Yang f11fff32fa Issue #1542 - IonMonkey: MIPS: Define JS_CODEGEN_MIPSXX by HAVE_64BIT_BUILD.
MIPSXX is required for 64bit build.
2020-05-20 13:59:39 +00:00
adeshkp 912e37d202 Issue #80 - Include MDNSResponderOperator.h in libmdns/nsDNSServiceDiscovery.h for Mac
This is needed for forward declaration of `BrowseOperator` and `RegisterOperator`.
2020-05-20 13:59:08 +00:00
Gaming4JC e15b6906c5 Issue #80 - Add nsSocketTransportService2.h to ThrottleQueue.cpp 2020-05-20 13:59:00 +00:00
Moonchild b048f3d473 Issue #80 - De-unify netwerk/wifi 2020-05-20 13:58:52 +00:00
Moonchild 6cdd6c6286 Issue #80 - De-unify netwerk/streamconv 2020-05-20 13:58:44 +00:00
Moonchild 25c1a5cbe3 Issue #80 - De-unify netwerk/srtp 2020-05-20 13:58:37 +00:00
Moonchild 83a71d9c9d Issue #80 - De-unify netwerk/socket 2020-05-20 13:58:30 +00:00
Moonchild d8a0849b7f Issue #80 - De-unify netwerk/protocol/http 2020-05-20 13:58:23 +00:00
Moonchild 02923a3648 Issue #80 - De-unify netwerk/protocol/res 2020-05-20 13:58:17 +00:00
Moonchild a5da610b87 Issue #80 - De-unify netwerk/protocol/ftp 2020-05-20 13:58:08 +00:00
Moonchild aedf5c0169 Issue #80 - De-unify smaller netwerk/protocol components
- data
- device
- file
- viewsource
- wyciwyg
2020-05-20 13:57:59 +00:00
Moonchild 1c16924e08 Issue #80 - De-unify netwerk/protocol/about 2020-05-20 13:57:52 +00:00
Moonchild 9c21ed1804 Issue #80 - De-unify netwerk/ipc 2020-05-20 13:57:44 +00:00
Moonchild 41b982b9bb Issue #80 - De-unify netwerk/dns 2020-05-20 13:57:37 +00:00
Moonchild 4c76b52e09 Issue #80 - De-unify netwerk/cookie 2020-05-20 13:57:30 +00:00
Moonchild e50cfc7b63 Issue #80 - De-unify netwerk/cache2 2020-05-20 13:57:24 +00:00
Moonchild 8bbc95988a Issue #80 - De-unify netwerk/cache 2020-05-20 13:57:16 +00:00
Moonchild ed9eb8f722 Issue #80 - De-unify netwerk/base 2020-05-20 13:57:09 +00:00
Moonchild 1cd91bc155 Issue #80 - De-unify editor/txmgr and editor/txtsvc 2020-05-20 13:56:50 +00:00
Moonchild 8c8e5fba69 Issue #80 - De-unify editor/libeditor 2020-05-20 13:56:43 +00:00
Moonchild ed1ea719dd Issue #80 - De-unify editor/composer 2020-05-20 13:56:35 +00:00
adeshkp d38d5414fc Issue #80 - Include gfx/Logging.h in NativeFontResourceMac.cpp 2020-05-20 13:56:20 +00:00
Gaming4JC 1182ecd0b4 Issue #80 - Include gfxEnv.h in gfx/gl/GLLibraryEGL.cpp 2020-05-20 13:56:12 +00:00
Moonchild 3220b7dc56 Issue #80 - Fix up gfx/ipc and gfx/src for Linux.
This removes an unused Telemetry enum
2020-05-20 13:56:02 +00:00
Moonchild 3e82ac05b1 Issue #80- De-unify gfx/layers
Excludes layers/ipc/CompositorBridgeParent and CrossProcessCompositorBridgeParent
because the latter purposely uses functions implemented in the former.
See also code comment in CrossProcessCompositorBridgeParent.cpp

Note: likely dead code for us anyway; likely not worth investing in to solve.
2020-05-20 13:55:50 +00:00
Moonchild 3ab7bd811f Issue #80 - De-unify gfx/ycbcr 2020-05-20 13:55:43 +00:00
Moonchild 8c4892fb45 Issue #80 - De-unify gfx/src 2020-05-20 13:55:36 +00:00
Moonchild 11749de754 Issue #80 - De-unify gfx/skia and stop using dangerous opts 2020-05-20 13:55:28 +00:00
Moonchild 5186d78330 Issue #80 - De-unify gfx/ots 2020-05-20 13:55:22 +00:00
Moonchild 0538c32e32 Issue #80 - De-unify gfx/ipc 2020-05-20 13:55:14 +00:00
Moonchild 46040d136d Issue #80 - De-unify gfx/harfbuzz 2020-05-20 13:55:08 +00:00
Moonchild 35c731cf08 Issue # 80 - Fix up gfx/2d/DataSurfaceHelpers
De-unified build requires <string.h> instead of <cstring> to
prevent stdlib confusion.
2020-05-20 13:55:01 +00:00
Moonchild b1851a4ad0 Issue #80 - de-unify and fix up gfx/graphite2
With de-unified building we have to re-apply the fix-up
for <cstdio>, and additionally the same for <cstring>
to prevent the compiler picking the wrong versions of
standard functions.
2020-05-20 13:54:54 +00:00
Moonchild 935ce8fa8e Issue #80 - Fix deps in gfxFont-Impl.h 2020-05-20 13:54:18 +00:00
Moonchild 85b89ee754 Issue #80 - Split out GetShapedWord template function 2020-05-20 13:54:11 +00:00
Moonchild 9c006089e1 Issue #80 - Fix gfx/thebes Windows conditional 2020-05-20 13:54:04 +00:00
Moonchild c3fc87a904 Issue #80 - De-unify gfx/gl 2020-05-20 13:53:57 +00:00
Moonchild 5f04717b00 Issue #80 - De-unify gfx/config 2020-05-20 13:53:49 +00:00
Moonchild e74b4ad8f8 Issue #80 - De-unify gfx/cairo 2020-05-20 13:53:41 +00:00
Moonchild fa68aa6fd5 Issue #80 - De-unify gfx/2d 2020-05-20 13:53:34 +00:00
Moonchild 9f37161ec5 Issue #80 - De-unify gfx/thebes 2020-05-20 13:53:25 +00:00
win7-7 21348b56d9 issue #1547 - Correct z-ordering for some table parts and add reftests 2020-05-20 13:52:54 +00:00
win7-7 ad69c023a9 Issue #1545 - Fix border-radius on table row groups, rows, column groups, or columns
Before issue #146, border-radius on row groups, rows, column groups, or columns don't apply to the background of each cell, yet the border-radius on the cell itself does.

After issue #146, the behaviors changed. In this patch, I tried to revert the behaviors of border-radius on table row groups, rows, column groups, or columns back to what happened before issue #146.

Also: Don't override GetBorderRadii in nsBCTableCellFrame.
2020-05-20 13:52:15 +00:00
Moonchild 206b1af429 Issue #457 - Silence some superfluous compiler warnings in cairo 2020-05-20 13:52:01 +00:00
Moonchild 2bdbc482e7 Bump platform version 2020-05-20 13:51:22 +00:00
Moonchild a444b5cc39 Issue #1543 - Follow-up: avoid displaying the Alt text if an image is loading.
This prevents the Alt text from briefly being shown before being replaced
with the image.
2020-05-20 13:50:04 +00:00
Moonchild d050188cd5 Issue #1543 - Align <img> with no src to the updated spec. 2020-05-20 13:49:55 +00:00
win7-7 3a1bebfb87 Issue #1355 - Fix the nit, remove nsPoint offset in nsFrame.cpp and change PresShellState member order 2020-05-20 13:49:35 +00:00
win7-7 d3d3aad6e5 Issue #1355 - Better way to create display items for column backgrounds
Part 1: Remove current table item, as it's never set.

Part 2: Get rid of generic table painting code, and handle each class separately.

Part 4: Hoist outline skipping into col(group) frame code.

Part 5: Skip box-shadow for table column and column groups.

Part 6: Store column and column group backgrounds separately, and then append them before the rest of the table contents.

Part 7: Pass rects in display list coordinates to AppendBackgroundItemsToTop.

Part 8: Create column and column group background display items as part of the cell's BuildDisplayList.

Part 9: Used cached values instead of calling nsDisplayListBuilder::ToReferenceFrame when possible, since it can be expensive when the requested frame isn't the builder's current frame.

Part 10: Make sure we build display items for table parts where only the normal position is visible, since we may need to create background items for ancestors at that position.

Part 11: Create an AutoBuildingDisplayList when we create background items for table columns and column groups, so that we initialize the invalidation state correctly.
2020-05-20 13:49:25 +00:00
win7-7 d8d0538162 Issue #1355 - SetNeedToCalcHasBCBorders to true when initialize nsTableFrame
In the printing preview, we create continuous table frame if table is too long to containing in a page. But the default value of NeedToCalcHasBCBorders is false which means we don't calculate HasBCBorders for continuous table frame. Thus, the border collapse is not shown when printing preview.
2020-05-20 13:49:16 +00:00
win7-7 36369e0fef Issue #1355 - Avoid unnecessary work in nsIFrame::BuildDisplayListForStackingContext() and nsIFrame::BuildDisplayListForChild() and Cleanup DescendIntoChild
Bug 1441796 - Part 1: Optimize the (pseudo)-stacking context conditions

Bug 1441796 - Part 3: Reuse the results in nsIFrame::BuildDisplayListForStackingContext() for ChildrenHavePerspective(), IsTransformed(), and Combines3DTransformWithAncestors()

Bug 1512244 - Part 1: Cleanup DescendIntoChild
2020-05-20 13:49:09 +00:00
win7-7 3c1e71f0b1 Issue #1355 - Preemptively fix build bustage for 1409114 2020-05-20 13:49:01 +00:00
win7-7 71137783ac Issue #1355 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList
Also fix build bustage for De-unified layout/xul in nsRootBoxFrame.cpp
2020-05-20 13:48:52 +00:00
athenian200 fe0963002f Issue #1540 - Stop MP3 demuxer from choking on very small files. 2020-05-20 13:48:10 +00:00
wolfbeast aeef4240d5 Issue #1589 - Ensure computed length and data is always available 2020-05-20 13:47:45 +00:00
Gaming4JC 938e6204ef Issue #21 - Remove TelemertyVFS
This reverts m-c Bug 668378 and completely removes Telemetry SQLite IO. As a bonus this fixes a potential crash in newer SQLite versions without the need for updating this useless telemetry shim.
2020-05-20 13:47:24 +00:00
Moonchild 16aaa21930 Issue #1536 - Part 3: Parse content to decide whether it's an init segment. 2020-05-20 13:47:10 +00:00
wolfbeast 6b7997abbe Issue #1536 - Part 2: Parse content to decide whether it's a media segment. 2020-05-20 13:47:02 +00:00
wolfbeast f358c4dfa9 Issue #1536 - Part 1: Add timecode checking for the WebM parser 2020-05-20 13:46:53 +00:00
Moonchild ad5cb04d71 Issue #80 - Fix additional deprot in /layout (redwood) 2020-05-20 13:45:06 +00:00
Matt A. Tobin ba5930cc8e Issue #1449 - Implement URLSearchParams's sort() 2020-05-10 16:06:19 +02:00
wolfbeast 6376255c0c Issue #1589 - Ensure computed length and data is always available 2020-05-10 14:51:23 +02:00
Matt A. Tobin 9be6582ec3 Hyperbola IceDove should use the toolkit SearchService 2020-05-06 19:17:04 +02:00
Moonchild 883fa80f7d [XPFE] Properly anchor XUL windows when tearing down 2020-05-06 19:16:51 +02:00
Moonchild 82b6d2cf9d [WebRTC] Port some upstream sctp fixes
- add SCTP auth token boundary check.
- turn off SCTP auth and address reconfiguration.
2020-05-06 19:16:40 +02:00
Moonchild 09b4a7828e [dom] Reorder some calls to improve memory safety 2020-05-06 19:16:20 +02:00
Moonchild ed58b7905e [devtools] Port various upstream fixes 2020-05-06 19:16:06 +02:00
Moonchild 31f47a2ba4 [js] Record load in MCreateThis alias set. 2020-05-06 19:15:54 +02:00
Bas Schouten 8b3b858546 Prevent the existance of dangling pointers upon failure of FindDataStart. 2020-05-06 19:15:42 +02:00
Moonchild dd506c896f Issue #1451 - Split out ICU data file on Windows
This reduces the xul.dll size by 11 MB
2020-05-06 19:15:12 +02:00
adeshkp f8588a2e86 Issue #457 - Fix warning about inline nsINode::GetFlattenedTreeParentNodeForStyle being undefined 2020-05-06 19:14:56 +02:00
adeshkp 0aa1b02b2b Issue #1259 - Remove a leftover GMP migration function 2020-05-06 19:14:42 +02:00
Moonchild e008deb88b Issue #1450 - Remove NVidia 3D-Vision utils
Legacy, unmaintained and untested D3D9 stereo
output behind a hidden pref that nobody ever uses... :P
'nuf said. Resolves #1450
2020-05-06 19:14:17 +02:00
Moonchild 56cb90a482 Issue #1517 - Remove dom.event.highrestimestamp.enabled pref
This resolves #1517
2020-05-06 19:14:05 +02:00
Matt A. Tobin 812574875b Issue #1449 - Implement URLSearchParams's sort() 2020-05-06 19:13:52 +02:00
Matt A. Tobin cd196a77d4 Issue #1531 - Work around GCC 10 defaulting to -fno-common in media/ffvpx/libavcodec/
Build Reference:
26:39.53 ../../../build/unix/gold/ld: error: /home/mattatobin/development/.obj/trunk-f1f9fdabf/navigator-x86_64-pc-linux-gnu-gtk2/media/ffvpx/libavcodec/flac_parser.o: multiple definition of 'ff_flac_parser'
26:39.53 ../../../build/unix/gold/ld: /home/mattatobin/development/.obj/trunk-f1f9fdabf/navigator-x86_64-pc-linux-gnu-gtk2/media/ffvpx/libavcodec/dummy_funcs.o: previous definition here
26:39.53 collect2: error: ld returned 1 exit status
26:39.53 gmake[4]: *** [/home/mattatobin/development/binoc-central/platform/config/rules.mk:773: libmozavcodec.so] Error 1

See also: https://gcc.gnu.org/gcc-10/porting_to.html
2020-05-06 19:13:31 +02:00
adeshkp e175224b88 Issue #80 - Include nsIContentInlines.h in layout/base/PositionedEventTargeting.cpp 2020-05-06 19:13:11 +02:00
Moonchild 0afb9e2d75 Issue #80 - Resolve issues with compiling on insane gcc configurations with no optimizations in layout/
(and fix a typo for cs fs)
2020-05-06 19:12:59 +02:00
Moonchild e733c3681b Issue #80 - De-unify layout/xul and tree, grid 2020-05-06 19:12:48 +02:00
Moonchild 157cd64a8e Issue #80 - De-unify layout/tables 2020-05-06 19:12:37 +02:00
Moonchild 5c3c92da90 Issue #80 - De-unify layout/svg 2020-05-06 19:12:26 +02:00
Moonchild aa21f96cf5 Issue #80 - De-unify layout/style (redwood) 2020-05-06 19:12:11 +02:00
Moonchild 537c63d600 Issue #80 - De-unify layout/printing 2020-05-06 19:06:17 +02:00
Moonchild 975db4c7f0 Issue #80 - De-unify layout/PITA... I mean layout/generic 2020-05-06 19:06:06 +02:00
Moonchild 528abd534e Issue #80 - De-unify layout/base 2020-05-06 19:05:49 +02:00
Moonchild 320682148b [XPFE] Properly anchor XUL windows when tearing down 2020-05-06 19:03:37 +02:00
Moonchild 1ed84ac1f8 [WebRTC] Port some upstream sctp fixes
- add SCTP auth token boundary check.
- turn off SCTP auth and address reconfiguration.
2020-05-06 19:03:23 +02:00
Moonchild 9c9d04e3e0 [dom] Reorder some calls to improve memory safety 2020-05-06 19:03:08 +02:00
Moonchild 19504d5263 [devtools] Port various upstream fixes 2020-05-06 19:02:56 +02:00
Moonchild 533b346f4e [js] Record load in MCreateThis alias set. 2020-05-06 19:02:42 +02:00
Bas Schouten 6afd96c460 Prevent the existance of dangling pointers upon failure of FindDataStart. 2020-05-06 19:02:28 +02:00
Matt A. Tobin 9858dc03cb Hyperbola IceDove should use the toolkit SearchService 2020-05-06 19:00:16 +02:00
wolfbeast d21b46fc9c Revert "Issue #1445 - Clarify the status of extensions in the Add-On manager"
This reverts commit f107de8a90.
2020-04-27 11:58:42 +02:00
wolfbeast 55fa46d059 Revert "Issue #1446 - Only allow extension add-on types for Firefox compat mode."
This reverts commit e8417acbff.
2020-04-27 11:57:28 +02:00
wolfbeast b089b365d6 Revert "Issue #1446 - Only match extension add-on types for target applications."
This reverts commit 4889e6dbbd.
2020-04-27 11:57:14 +02:00
wolfbeast 0c150945dc Revert "Issue #1445 - Use the detailed string also in the list entries."
This reverts commit ac68f8cf6c.
2020-04-27 11:57:01 +02:00
wolfbeast 0fb23389f5 Revert "Issue #1445 - remove redundant nativeIndicator"
This reverts commit 2073a7f1c9.
2020-04-27 11:56:47 +02:00
wolfbeast 7ba07f4a17 Revert "Issue #1445 - Add a link to details on using Firefox extensions in Pale Moon"
This reverts commit c220c30bbb.
2020-04-27 11:56:33 +02:00
wolfbeast 554183b5dd Revert "Issue #1445 - strings cleanup"
This reverts commit 461a9e86b2.
2020-04-27 11:56:19 +02:00
wolfbeast 98fe8b0ccb Merge branch 'redwood' into 28.9-platform 2020-04-26 12:56:46 +02:00
Matt A. Tobin 519030e688 Issue #80 - Resolve issues with compiling on insane gcc configurations with no optimizations in dom/ 2020-04-26 10:27:18 +02:00
adeshkp b9531d8e11 Issue #80 - Add Unused.h to dom/gamepad for Mac build 2020-04-26 10:26:57 +02:00
adeshkp 7605f4b0f8 Issue #80 - Fix include in PlatformDecoderModule.h 2020-04-26 10:26:07 +02:00
wolfbeast ab0e18135f Issue #80 - Fix include in dom/quota
Reported by Luke.
2020-04-26 10:23:13 +02:00
wolfbeast e883ac54e9 Issue #80 - Fix include in dom/media for Pale Moon builds. 2020-04-26 10:22:59 +02:00
New Tobin Paradigm 9cb65e8a77 Add Unused.h to dom/media/webrtc/MediaTrackConstraints.cpp 2020-04-26 10:22:46 +02:00
adeshkp 3a3152d54b Issue #80 - Include D3DMessageUtils.h in dom/plugins/ipc for Mac build
This should ideally not be needed on Mac but compilation fails due to
sizeof `DxgiAdapterDesc` not known.

Didn't face this issue on Linux though, probably due to a different include
chain which already has this file included somewhere along the way.
2020-04-26 10:22:32 +02:00
adeshkp f174801b64 Issue #80 - Fix includes in dom/media/platforms for Mac build 2020-04-26 10:22:20 +02:00
New Tobin Paradigm 3caceeb539 Issue #80 - Include nsIContentInlines.h in dom/svg/SVGTests.cpp to fix linux bustage 2020-04-26 10:21:59 +02:00
Moonchild 216189e6f7 Issue #80 - De-unify dom/xul 2020-04-26 10:21:48 +02:00
Moonchild bbae11cdd9 Issue #80 - De-unify dom/xslt 2020-04-26 10:21:37 +02:00
Moonchild 917447df6e Issue #80 - De-unify dom/xml 2020-04-26 10:21:27 +02:00
Moonchild 244c8ef1f7 Issue #80 - De-unify dom/xhr 2020-04-26 10:21:10 +02:00
Moonchild e1b6493747 Issue #80 - De-unify dom/xbl 2020-04-26 10:20:59 +02:00
Moonchild 4e225fc7d1 Issue #80 - De-unify dom/workers 2020-04-26 10:20:48 +02:00
Moonchild 683b1bedea Issue #80 - De-unify dom/system 2020-04-26 10:20:38 +02:00
Moonchild 11519ee6d2 Issue #80 - De-unify dom/svg 2020-04-26 10:20:27 +02:00
Moonchild 8a343284d9 Issue #80 - De-unify dom/smil 2020-04-26 10:20:16 +02:00
Moonchild 5a34fb5e1d Issue #80 - De-unify dom/security
Exception: CSPUtils relies on something in CSPContext, but on
Windows it throws in an MSVC include which provides no hints.
2020-04-26 10:20:05 +02:00
Moonchild 16c8dff724 Issue #80 - De-unify dom/quota 2020-04-26 10:19:55 +02:00
Moonchild 3595b9eecf Issue #80 - De-unify dom/push 2020-04-26 10:19:44 +02:00
Moonchild 594cbca6d1 Issue #80 - De-unify dom/plugins/ipc 2020-04-26 10:19:33 +02:00
Moonchild a4ba260904 Issue #80 - De-unify dom/plugins/base 2020-04-26 10:19:22 +02:00
Moonchild 4a8c186eea Issue #80 - De-unify dom/performance 2020-04-26 10:19:11 +02:00
Moonchild 8ff6e8c8a2 Issue #80 - De-unify dom/media part 3
Excluding /dom/media/webrtc for bad template use:
MediaTrackConstraints.cpp/h
MediaEngineCameraVideoSource.cpp and
MediaEngineRemoteVideoSource.cpp
2020-04-26 10:18:59 +02:00
Moonchild 3652cd0f99 Issue #80 - De-unify dom/media part 2 2020-04-26 10:18:45 +02:00
Moonchild b738ccc61b Issue #80 - De-unify dom/media part 1 (updated reland)
This de-unifies up to and including dom/media/platforms with the exception of
dom/media/platforms/wmf, because that one throws weird errors in the Win
SDK which don't have a clear cause (yet)
2020-04-26 10:18:28 +02:00
Moonchild 1c3a9a40e5 Issue #80 - De-unify dom/ipc 2020-04-24 10:37:30 +02:00
Moonchild 0a33733505 Issue #80 - De-unify dom/indexedDB 2020-04-24 10:37:19 +02:00
wolfbeast 691878e20f Issue #80 - De-unify dom/html 2020-04-24 10:37:08 +02:00
wolfbeast bf1fa93b91 [AM] Clean up addon-signing build leftovers. 2020-04-24 10:36:55 +02:00
wolfbeast 0ac7481d2e Issue #80 - De-unify dom/network 2020-04-24 10:36:44 +02:00
wolfbeast 168bb31e4f Issue #80 - De-unify dom/grid 2020-04-24 10:36:33 +02:00
wolfbeast ca04b37910 Issue #80 - De-unify dom/geolocation 2020-04-24 10:36:23 +02:00
wolfbeast f3b26f64fc Issue #80 - De-unify dom/gamepad 2020-04-24 10:36:11 +02:00
wolfbeast 99d23484bb Issue #80 - De-unify dom/filesystem 2020-04-24 10:36:01 +02:00
wolfbeast 376bc050a6 Issue #80 - De-unify dom/filehandle 2020-04-24 10:35:49 +02:00
Matt A. Tobin 9258382b0d Issue #576 - Remove IdentityService and ContextualIdentityService 2020-04-24 10:35:38 +02:00
Matt A. Tobin b6a703907e Issue #65 - Remove AppConstants from toolkit/prompts/content/tabprompts.xml
This file not only somehow escaped my pass through here but was also mocking me by using AppConstants in a preprocessed file BUT ALSO right AFTER a preprocessor directive.
2020-04-24 10:35:09 +02:00
Matt A. Tobin da42871b0e Put Request.cpp and Response.cpp back into UNIFIED in dom/fetch due to linux linker errors
Reference:

15:03.06 ../../build/unix/gold/ld: error: /home/mattatobin/development/.obj/trunk-master/navigator-x64-gtk3/toolkit/library/../../dom/fetch/Request.o: requires dynamic R_X86_64_PC32 reloc against '_ZN7mozilla3dom9FetchBodyINS0_7RequestEED2Ev' which may overflow at runtime; recompile with -fPIC
15:03.06 ../../build/unix/gold/ld: error: /home/mattatobin/development/.obj/trunk-master/navigator-x64-gtk3/toolkit/library/../../dom/fetch/Response.o: requires dynamic R_X86_64_PC32 reloc against '_ZN7mozilla3dom9FetchBodyINS0_8ResponseEED2Ev' which may overflow at runtime; recompile with -fPIC
15:03.06 ../../build/unix/gold/ld: error: read-only segment has dynamic relocations
15:03.07 /home/mattatobin/development/.obj/trunk-master/navigator-x64-gtk3/toolkit/library/../../dom/fetch/Request.o:Request.cpp:function mozilla::dom::Request::~Request(): error: undefined reference to 'mozilla::dom::FetchBody<mozilla::dom::Request>::~FetchBody()'
15:03.07 /home/mattatobin/development/.obj/trunk-master/navigator-x64-gtk3/toolkit/library/../../dom/fetch/Response.o:Response.cpp:function mozilla::dom::Response::~Response(): error: undefined reference to 'mozilla::dom::FetchBody<mozilla::dom::Response>::~FetchBody()'
2020-04-24 10:34:46 +02:00
wolfbeast c55433ee03 Issue #80 - De-unify dom/fetch
Running into the same problem as with dom/canvas: derived template
classes not being happy about being non-unified. Kept unified for now
to prevent linking errors.
2020-04-24 10:34:33 +02:00
wolfbeast d0a2389b43 Issue #80 - De-unify dom/events 2020-04-24 10:34:20 +02:00
wolfbeast 796a14e116 Issue #80 - De-unify dom/crypto 2020-04-24 10:34:08 +02:00
Matt A. Tobin ba6e4753b7 Fix typo in dom/animation/CSSPseudoElement.cpp
Linux filesystems tend to be case sensitive
2020-04-24 10:33:56 +02:00
wolfbeast 6d3d69f644 Issue #80 - De-unify dom/canvas 2020-04-24 10:33:20 +02:00
Matt A. Tobin fce3132fe8 Make application moz.configure file optional and set application/xulrunner as the default platform build_app 2020-04-24 10:33:08 +02:00
Matt A. Tobin a7da3cf52b Issue #80 - De-unify layout/mathml 2020-04-24 10:32:48 +02:00
Matt A. Tobin f5316668a3 Issue #80 - De-unify layout/forms 2020-04-24 10:32:36 +02:00
wolfbeast dc687dbc0b Issue #80 - De-unify dom/cache 2020-04-24 10:32:24 +02:00
wolfbeast 216aa2cada Issue #80 - De-unify dom/archivereader 2020-04-24 10:32:14 +02:00
wolfbeast 9d96ad90dd Issue #80 - De-unify dom/animation
KeyFrameEffect and KeyFrameEffectReadOnly are still built unified as
buddies because they have some complex interdependency that couldn't
easily be resolved without linking failures.
2020-04-24 10:32:03 +02:00
Matt A. Tobin b064c95231 Issue #80 - De-unify dom/messagechannel 2020-04-24 10:31:52 +02:00
Matt A. Tobin 11eb1f57f4 Issue #80 - De-unify dom/audiochannel 2020-04-24 10:31:42 +02:00
Matt A. Tobin 052cb18fff Issue #80 - De-unify dom/notification 2020-04-24 10:31:31 +02:00
Matt A. Tobin d306fe61c5 Issue #80 - De-unify dom/url 2020-04-24 10:31:19 +02:00
Matt A. Tobin 7859a0d693 Issue #80 - De-unify dom/encoding 2020-04-24 10:31:08 +02:00
Matt A. Tobin c5d9e1f973 Issue #80 - De-unify dom/json 2020-04-24 10:30:52 +02:00
Matt A. Tobin 2e12bda342 Issue #80 - De-unify dom/u2f 2020-04-24 10:30:40 +02:00
Matt A. Tobin 9755cd617d Issue #80 - De-unify dom/power 2020-04-24 10:30:29 +02:00
Matt A. Tobin abaf4d9fb4 Issue #80 - De-unify dom/mathml 2020-04-24 10:30:18 +02:00
Matt A. Tobin ae6f407177 Issue #80 - De-unify dom/jsurl 2020-04-24 10:30:08 +02:00
Matt A. Tobin 2a44476795 Issue #80 - De-unify dom/worklet 2020-04-24 10:29:56 +02:00
Matt A. Tobin 755cf4c7d0 Issue #80 - De-unify dom/console 2020-04-24 10:29:45 +02:00
Matt A. Tobin 47f26a67f4 Issue #80 - De-unify dom/media/webm 2020-04-24 10:29:34 +02:00
Matt A. Tobin e8aa76713a Issue #80 - De-unify dom/media/flac 2020-04-24 10:29:23 +02:00
Matt A. Tobin e6ffc4bdb7 Issue #80 - De-unify dom/media/mp3 2020-04-24 10:29:13 +02:00
Matt A. Tobin 90bbe7536d Issue #80 - De-unify dom/media/ogg 2020-04-24 10:29:01 +02:00
Matt A. Tobin 140750e4e8 Issue #80 - De-unify dom/media/encoder 2020-04-24 10:28:50 +02:00
Matt A. Tobin f2e089d51b Issue #80 - De-unify dom/media/mediasink 2020-04-24 10:28:38 +02:00
Matt A. Tobin e1d0ac30ac Issue #80 - De-unify dom/media/wave 2020-04-24 10:28:28 +02:00
Matt A. Tobin 9e8adc25a4 Issue #80 - De-unify dom/storage 2020-04-24 10:28:16 +02:00
Matt A. Tobin 7f66e8946a Issue #80 - De-unify dom/time 2020-04-24 10:28:05 +02:00
Matt A. Tobin c75b8ec714 Issue #80 - De-unify dom/permission 2020-04-24 10:27:54 +02:00
Matt A. Tobin 4250d93166 Issue #80 - De-unify dom/broadcastchannel 2020-04-24 10:27:42 +02:00
Matt A. Tobin 37250226d5 Issue #80 - De-unify dom/offline 2020-04-24 10:27:30 +02:00
Matt A. Tobin 802a4cfefe Issue #80 - De-unify /layout/inspector 2020-04-24 10:27:18 +02:00
Matt A. Tobin 5641a6d574 Issue #80 - De-unify /layout/tools/layout-debug/src 2020-04-24 10:27:06 +02:00
Matt A. Tobin 88d2480356 Issue #80 - De-unify /layout/ipc 2020-04-24 10:26:52 +02:00
Matt A. Tobin fcb4b997d0 Issue #80 - De-unify /layout/build 2020-04-24 10:26:40 +02:00
wolfbeast 79964767f5 [docs] Update coding style cf. discussion with Tobin. 2020-04-24 10:26:16 +02:00
wolfbeast a4a8d082a3 Issue #251 - Move MOZ_AV1 back to ac configure for everyone to use. 2020-04-24 10:25:57 +02:00
Matt A. Tobin adce88de95 Issue #1516 - Part 1: Add a global build define to determine if the client can draw in the titlebar and update consumers of the local define 2020-04-24 10:24:52 +02:00
wolfbeast 974d6ca889 Issue #1517 - Enable high-resolution DOM timestamps on trunk
At the very least we should enable these short term, with the potential
removal of it pending.
2020-04-16 13:58:36 +02:00
wolfbeast e08a4ad1c8 Issue #1517 - Enable high-resolution DOM timestamps on release 2020-04-16 04:20:42 +02:00
wolfbeast 39dac57259 Merge branch 'redwood' into 28.9-platform 2020-04-14 21:49:04 +02:00
wolfbeast c2d9ab62f3 Fix additional deprot in dom/base 2020-04-14 21:37:53 +02:00
wolfbeast b9e692af05 Revert 1320408 part 15: Make addDataProperty static 2020-04-14 21:10:50 +02:00
wolfbeast 871e57fdd6 Issue #80 - De-unify dom/base and fix deprot. 2020-04-14 14:19:58 +02:00
wolfbeast 03530de64f Fix deprot in /layout 2020-04-14 14:02:50 +02:00
Moonchild 4730da5b27 Create SECURITY.md
Provide basic instructions how to report security vulnerabilities.
2020-04-14 13:28:43 +02:00
wolfbeast 3cb245b749 Issue #1514 - Perform validity check before trying to use the content.
Resolves #1514
2020-04-14 13:28:28 +02:00
wolfbeast 9f5529d1e7 Issue #1513 - Bail on orphan node
This was refactored by Mozilla into doing effectively the same thing so
it aligns with them re: behavior.
Resolves #1513
2020-04-14 13:28:10 +02:00
wolfbeast 26c888208a Issue #1512 - Improve handling of multiple selections.
IsSelectionEditable should check whether the focus node and anchor node
aren't null before trying to use them.
This also changes the initialization of selections' aOutIndex to the
last range in the selection as a fallback in case we don't add a range
later (in AddItem) which could also end up with a null selection
otherwise if the additional selection nodes are removed.
2020-04-14 13:27:57 +02:00
wolfbeast 9a52b3b852 [layout] Always move descendants of layout frames if moved.
If we move the frame then we always need to move any descendant views,
not just in case the frame itself has a view.
2020-04-14 13:27:34 +02:00
wolfbeast 96afb5250d Issue #1511 - Bail on orphan situation.
This resolves #1511
2020-04-14 13:27:12 +02:00
Jan de Mooij b93afb1ba7 [js] Handle functions with rest parameters in isObservableArgumentSlot. 2020-04-14 13:26:57 +02:00
Matt A. Tobin 277f2116b6 Move aom source to a sub-directory under media/libaom
There is no damned reason to treat this differently than any other media lib given its license and there never was.
2020-04-14 13:26:42 +02:00
Matt A. Tobin d270404436 Silence removing dist/bin 2020-04-14 13:26:26 +02:00
Matt A. Tobin 3bec218684 Take files out of preprocessing that no longer require it 2020-04-14 13:26:13 +02:00
Matt A. Tobin 6daff43b61 Follow up to d0eee8f01 - Run precomplete cmd during package staging 2020-04-14 13:25:58 +02:00
Matt A. Tobin eedf9f5ebf Align mar generation on Windows with other platforms
This makes mar generation dependent on packaging not installer
2020-04-14 13:25:44 +02:00
Matt A. Tobin 049dae86d2 Alter config.guess to properly detect host and target bitness on SunOS 2020-04-14 13:25:29 +02:00
wolfbeast 65ba3cac58 [Docshell] Ensure nsDocShell::mContentViewer is released properly. 2020-04-14 13:25:13 +02:00
wolfbeast 1b8788aecb Issue #1505 - Part 3: Make native mode actually native again. 2020-04-14 13:24:59 +02:00
wolfbeast 747632bd64 Issue #1505 - Part 2: Store application build ID in nsHttpHandler
Since we're needing to reuse this several times, it makes it simpler to
just get it once in init and storing it.
2020-04-14 13:24:46 +02:00
wolfbeast 02327fa745 Issue #1505 - Rebuild application version string
To respond dynamically to the pref change, the mAppVersion string needs
to be rebuilt.
Includes some minor improvements for corner cases and removes leftover
b2g junk.
2020-04-14 13:24:32 +02:00
New Tobin Paradigm b470422d5a Issue #1497 - Re-implement an un-preprocessed file check 2020-04-14 13:24:17 +02:00
wolfbeast 449d530a30 Issue #1508 - Redirect moz://a to http://thereisonlyxul.org/ 2020-04-14 13:24:03 +02:00
wolfbeast 8bd941d4e3 Issue #1507 - Remove nsRefreshDriver's use of high res system timers.
Since we are using vsync for timing anyway in the layout refresh driver,
there is no need to bump the system timer resolution down to 1 ms.

This resolves #1507.
2020-04-14 13:23:48 +02:00
JustOff 7172fc72a3 Issue #65 - Fix unprocessed directives in WebRequest.jsm 2020-04-14 13:23:21 +02:00
Matt A. Tobin b977981df6 Make the reference to Handle unambiguous in ipc/testshell/XPCShellEnvironment.cpp
.. correctly
2020-04-14 13:23:06 +02:00
Matt A. Tobin 9dc65422ba Revert "Make the reference to Handle unambiguous in ipc/testshell/XPCShellEnvironment.cpp"
This reverts commit d4afddfada.
2020-04-14 13:22:51 +02:00
Matt A. Tobin 45e8e98031 Make the reference to Handle unambiguous in ipc/testshell/XPCShellEnvironment.cpp 2020-04-14 13:22:34 +02:00
Matt A. Tobin 965232ab2f Output webidl filenames as they are processed 2020-04-14 13:22:13 +02:00
athenian200 980ca14602 Issue #1501 - Un-bust building of NSS after update to 3.48 on Solaris. 2020-04-14 13:21:54 +02:00
Matt A. Tobin 02519e8575 Explicitly remove dist/bin before mozbuild's install_manifests get a hold of it 2020-04-14 13:21:33 +02:00
Matt A. Tobin e003547dc5 Properly fix crash in nsDownloadManager when repeatedly pausing and resuming a download
This applies only to applications that do not use JSDownloads and is based on Bug 1224326
2020-04-14 13:21:07 +02:00
Matt A. Tobin 56f8375338 Revert "Only state the stop notification for JSDownloads in nsWebBrowserPersist::EndDownload"
This reverts commit aa28523a55.
2020-04-14 13:20:54 +02:00
wolfbeast 2407845ec1 Issue #1280 - Un-bust certerror pages and ForgetAboutSite 2020-04-14 13:20:35 +02:00
wolfbeast 3f09b298b0 Issue #1280 - Stop requesting HPKP state from within devtools. 2020-04-14 13:20:22 +02:00
wolfbeast c27830f35c Issue #1280 - Part 2: Remove HPKP tests. 2020-04-14 13:19:54 +02:00
wolfbeast 99bad1726e Issue #1280 - Part 1: Remove HPKP components.
This also removes leftover plumbing for storing preload information
in SiteSecurityService since no service still uses it.
2020-04-14 13:19:41 +02:00
JustOff d86349716a Issue #1473 - Fix building %OS_SLICE% on non-Windows platforms 2020-04-14 13:19:20 +02:00
JMadgwick 64a7c9e2d2 Issue #1471 - Fix building on sparc64 Linux
Correct various pre-processor defines for sparc64 and in mozjemalloc use the JS arm64 allocator on Linux/sparc64.
This corrects build problems opn Linux sparc64 and is in line with bugzilla bug #1275204.
2020-04-14 13:18:48 +02:00
New Tobin Paradigm 514ff21cba Update README.md 2020-04-14 13:18:16 +02:00
wolfbeast edb5796d58 Issue #1497 Revert "Check if there are any unpreprocessed files"
This reverts PR #429
2020-04-14 13:18:02 +02:00
wolfbeast c23e3b25f8 Issue #1497 Revert "MoonchildProductions#1251 - Part 19"
"Make the unpreprocessed file script work on Solaris."

This reverts commit e51afbcc2f.
2020-04-14 13:17:47 +02:00
Matt A. Tobin e360caa1a2 Teach config.guess to know if we want to build 32 or 64 bit builds on Windows 2020-04-14 13:17:20 +02:00
Matt A. Tobin 9eeaeff77b Issue #1499 - Re-import ExtensionStorage.jsm 2020-04-14 13:16:54 +02:00
wolfbeast a435374873 Issue #1498 - Part 6: Remove STS preloadlist pref. 2020-04-14 13:16:38 +02:00
wolfbeast 04cfc091da Issue #1498 - Part 5: Update SSService CID and correct mismatch. 2020-04-14 13:16:24 +02:00
wolfbeast b23e7b61c6 Issue #1498 - Part 4: Remove clearPreloads.
Also tag #1280
2020-04-14 13:16:11 +02:00
wolfbeast 69b4e77751 Issue #1498 - Part 3: Remove support for storing "knockout" values. 2020-04-14 13:15:58 +02:00
wolfbeast 5657b5c53b Issue #1498 - Part 2: Stop persisting preload states.
Since we don't use preloading anymore for either HPKP or HSTS, we no
longer need persistent storage in the profile for preload states.
Tag #1280 also
2020-04-14 13:14:43 +02:00
wolfbeast 1037746d00 Issue #1498 - Part 1: Stop using HSTS preload lists. 2020-04-14 13:14:03 +02:00
Matt A. Tobin a060401264 Take nsSiteSecurityService out of UNIFIED_SOURCES
It exceeded the obj file sections limit because of the HSTS preload list so it cannot be built in UNIFIED mode.
2020-04-14 13:13:44 +02:00
wolfbeast 4e26fc1844 Issue #447 - Update HSTS preload list 2020-04-14 13:13:06 +02:00
Brian Smith 2645f9b944 Issue #1491 - Part 2: Disable a workaround on macOS 10.14+ for an Apple bug described in Mozilla bug 378645 involving popup windows that was fixed by Apple. 2020-04-14 13:12:48 +02:00
Brian Smith 88ce149033 Issue #1491 - Part 1: Update nsCocoaFeatures for newer versions of MacOS X. 2020-04-14 13:12:25 +02:00
wolfbeast 09655ad6d8 Issue #1467 - Part 4: Rename NSS_SQLSTORE to MOZ_SECURITY_SQLSTORE.
Rename the build config option accordingly.
2020-04-14 13:12:08 +02:00
wolfbeast 4fd0b98c2c Issue #1467 - Part 3: Use UTF-8 file paths for NSS-SQL database. 2020-04-14 13:11:51 +02:00
wolfbeast 894b33e53a Issue #1467 - Part 2: Make the PBKDF rounds adaptive to choice of NSS db 2020-04-14 13:11:37 +02:00
wolfbeast 236d425993 Issue #1467 - Part 1b: Fix type and make moz.configure happy. 2020-04-14 13:11:22 +02:00
wolfbeast 899e14e945 Issue #1467 - Part 1: Set up conditional NSS-SQL builds.
- Adds buildconfig option --enable-nss-sqlstore
- Prefixes NSS dbinit with either sql: or dbm: depending on config
- Pre-initializes mozStorage when NSS-SQL storage is used to prevent
  an sqlite3_config race in NSS Init
2020-04-14 13:11:05 +02:00
wolfbeast 03fda9f0f3 [devtools] Properly escape method arguments for curl. 2020-04-14 13:10:45 +02:00
wolfbeast 3aae828871 [DOM] Make sure to exit fullscreen mode if popups are opened or focused. 2020-04-14 13:10:23 +02:00
wolfbeast e7514afc7c [js] Remove pointless MakeMRegExpHoistable optimization.
It's a lot of code with no measurable effect.
2020-04-14 13:10:09 +02:00
wolfbeast 4adf0d09f7 [network] Cherry-pick various sctp lib upstream fixes. 2020-04-14 13:09:51 +02:00
wolfbeast 22d0b88e37 Issue #1355 - Make addition of cell border display items depend on
whether they should be drawn.

This reduces the size of display lists for tables by only adding display
list items that are actually going to be visibly drawn, which will help
overall performance of table drawing.
2020-04-14 13:06:54 +02:00
JustOff f7388678bd Issue #1482 - Give dynamic SSUAO rules priority over static ones 2020-04-14 13:06:30 +02:00
wolfbeast b45f5c435e Issue #1485 - Fix incorrect grid cell sizing to min/max space.
There were actually two separate logical errors in this method:

The first part is that "origSizes.isSome()" is simply a bogus
requirement for applying min/max-sizes here. I'm still keeping
the optimization of not needlessly copying the mSizes array
(as originally intended) since it's a quite common case.

The second bug is that min/max-sizes were only applied under
the "if (fr != 0.0f)" block. This is bogus since the calculated
'fr' value depends on 'aAvailableSize' which might change by
applying min/max-sizes and thus 'fr' could become non-zero in
the second round.
To fix, this patch just moves "applyMinMax" block out one level.
2020-04-14 13:06:11 +02:00
Matt A. Tobin 3c73c0805c Issue #1477 - Fix finding config.guess on builds not using MOZ_OBJDIR
* So far this seems to only affect Macintosh builds but other unix builds may be affected. Windows doesn't seem to be.
* This maintains consistency with other one-off file invocations and backwards compatibility with older comm setups
2020-04-14 13:05:58 +02:00
wolfbeast db93b005f5 Issue #1480 - Skip abspos, fixed, float and placeholders for outline. 2020-04-14 13:05:43 +02:00
JustOff d2aaa74f31 Issue #1053 - Remove no longer used function and modules from UserAgentUpdates.jsm 2020-04-14 13:05:25 +02:00
JustOff 702cf42544 Issue #1473 - Add %OS_SLICE% macro to SSUAO to refine OS info 2020-04-14 13:05:07 +02:00
wolfbeast 79a9dc2479 Minor update to UXP coding style guideline. 2020-04-14 13:04:46 +02:00
New Tobin Paradigm ddcc3deddd Update README.md 2020-04-14 13:04:19 +02:00
wolfbeast f3b148844a Issue #1474 - Prevent the cp detection from starting if preffed off.
When setting up connectivity, e.g. with new network detection, the pref
wouldn't be checked (or honored), resulting in spurious startup calls
despite being preffed off. This fixes that.

Resolves #1474
2020-04-14 13:04:05 +02:00
wolfbeast 51d5d162b7 Update UXP coding style guide JS guide. 2020-04-14 13:03:47 +02:00
wolfbeast 94494805da Update UXP coding style guide JS guide. 2020-04-14 13:03:34 +02:00
Matt A. Tobin 5c7109182c Issue #1470 - Part 3: Remove now unused update.locale
This requires changes to package-manifest in all applications
2020-04-14 13:03:21 +02:00
Matt A. Tobin 68e873ada7 Issue #1470 - Part 2: Change calls from UpdateUtils.getUpdateChannel() to UpdateUtils.UpdateChannel in telemetry modules 2020-04-14 13:03:07 +02:00
Matt A. Tobin a5b05528fe Issue #1470 - Part 1: Refactor UpdateUtils.jsm 2020-04-14 13:02:53 +02:00
wolfbeast ce88d82f4a Update UXP coding style guide with JS guide. 2020-04-14 13:02:39 +02:00
New Tobin Paradigm 61d3aa9be2 Remove exposed bug from UpdateUtils.jsm 2020-04-14 13:02:22 +02:00
Matt A. Tobin a078d9f976 Issue #1053 - Remove android-only skia-npapi 2020-04-14 13:01:51 +02:00
Matt A. Tobin 3ed2b7a7cc Issue #1053 - Remove android support from nsNSSComponent.cpp 2020-04-14 13:01:34 +02:00
Matt A. Tobin 9816a810e6 Issue #251 - Move --disable-dbm to ac configure
Also Tag #1467
2020-04-14 13:01:21 +02:00
Matt A. Tobin 9a8068ea3f Remove unused mailnews.mozbuild 2020-04-14 13:01:07 +02:00
Matt A. Tobin dcd9bbb717 Mork is not dependent on dbm and never was. 2020-04-14 13:00:55 +02:00
Matt A. Tobin ecc0a40688 Correct typo in mailnews/base/src/moz.build 2020-04-14 13:00:41 +02:00
Matt A. Tobin 8f40737fc7 Issue #1319 - Remove EARLY_BETA_OR_EARLIER condition 2020-04-14 13:00:26 +02:00
wolfbeast e7841ab5d7 Issue #1465 - Implement optional catch binding. 2020-04-14 13:00:11 +02:00
wolfbeast dba09fa5c4 Revert "Issue #1355 - Better way to create display items for column backgrounds"
This reverts commit 44c47c5038.
2020-04-14 12:59:57 +02:00
wolfbeast afe2b7fa5a Revert "Layout\reftests\table-background\reftest.list should have only additions to the end of it."
This reverts commit efdc2af8ab.
2020-04-14 12:59:43 +02:00
wolfbeast acaec3f389 [DOM] Add a null check 2020-04-14 12:59:26 +02:00
Matt A. Tobin d2083edba2 No Issue - Always build marionette until it can be tracked down and killed 2020-04-14 12:58:54 +02:00
win7-7 1ebcc1d7e5 Layout\reftests\table-background\reftest.list should have only additions to the end of it.
Layout\reftests\table-background\reftest.list should have only additions to the end of it. Revert incorrect additions.
2020-04-14 12:58:33 +02:00
win7-7 cbb61ab832 Issue #1355 - Better way to create display items for column backgrounds
Part 1: Remove current table item, as it's never set.

Part 2: Get rid of generic table painting code, and handle each class separately.

Part 4: Hoist outline skipping into col(group) frame code.

Part 5: Skip box-shadow for table column and column groups.

Part 6: Store column and column group backgrounds separately, and then append them before the rest of the table contents.

Part 7: Pass rects in display list coordinates to AppendBackgroundItemsToTop.

Part 8: Create column and column group background display items as part of the cell's BuildDisplayList.

Part 9: Used cached values instead of calling nsDisplayListBuilder::ToReferenceFrame when possible, since it can be expensive when the requested frame isn't the builder's current frame.

Part 10: Make sure we build display items for table parts where only the normal position is visible, since we may need to create background items for ancestors at that position.

Part 11: Create an AutoBuildingDisplayList when we create background items for table columns and column groups, so that we initialize the invalidation state correctly.
2020-04-14 12:58:11 +02:00
Matt A. Tobin cf288a1847 Issue #1053 - Remove android preprocessor directive from toolkit/locales/jar.mn 2020-04-14 12:57:54 +02:00
wolfbeast 0d1eea2ebf Revert #1091 Remove unboxed object code phase 1 + extras.
This should be the last code backout for this. merging this branch
should get us back to the way we were (+ additional code changes for
later changes) as fasr as the unused unboxed code is concerned.
2020-04-14 12:57:32 +02:00
wolfbeast af69cb07db Revert #1137 - Remove unboxed arrays
- accounting for removal of watch()/unwatch()
- updated for intermediate code changes.
2020-04-14 12:57:13 +02:00
wolfbeast dc4695406f Revert "Issue #1382 - Remove invalid assertion."
This reverts commit 9c6a8450b3.
2020-04-14 12:56:56 +02:00
wolfbeast c22a493144 Revert #1142 - Remove unboxed objects
- accounting for removal of watch()/unwatch()
2020-04-14 12:56:40 +02:00
Matt A. Tobin d20ca24a07 Issue #1053 - Remove android support from toolkit
Note: Does not remove support completely from toolkit/mozapps/installer or from telemetry or AppConstants.jsm
2020-04-14 12:56:02 +02:00
Matt A. Tobin b2ca17a298 Bug 1339444 - Remove unused resource://gre/modules/sqlite/sqlite_internal.js 2020-04-14 12:55:48 +02:00
Matt A. Tobin eb70e6e3d0 Issue #439 - Remove tests from toolkit/ 2020-04-14 12:55:19 +02:00
Matt A. Tobin 32ead79529 Issue #1053 - Remove android support from db 2020-04-14 12:55:00 +02:00
Matt A. Tobin 3e59235162 Issue #1053 - Remove android support from docshell 2020-04-14 12:54:47 +02:00
Matt A. Tobin 7494866cb5 Issue #1053 - Remove android support from hal 2020-04-14 12:54:30 +02:00
Matt A. Tobin 19bf63b0ee Issue #1053 - Remove android support from image 2020-04-14 12:54:15 +02:00
Matt A. Tobin 8b539ec9e7 Issue #1053 - Remove android support from intl/locale/nsLocaleService.cpp
This is the only non-icu file with android code in it. Not going to remove android in icu its self because it remains a 3rd party lib.
2020-04-14 12:54:01 +02:00
Matt A. Tobin ba0011606d Follow-up to 4e2e9be6a - Move HeapSnapshot DevTools-only Modules back to DevTools
I am so done with this.

Resolves #316
2020-04-14 12:53:46 +02:00
Matt A. Tobin ec2daa8dc9 Issue #1053 - Remove android support from memory 2020-04-14 12:53:27 +02:00
Matt A. Tobin 44c169c9be Issue #1053 - Remove android support from mfbt 2020-04-14 12:53:13 +02:00
Matt A. Tobin 57383be95d Issue #1053 - Remove android support from ipc except for ipc/chromium
This does not include android in the imported chromium code as specific research needs done on defines and logic.
2020-04-14 12:52:59 +02:00
Matt A. Tobin 6ef03f136b Issue #1053 - Remove android support from mozglue
Yes, I checked for unsaved files this time...
2020-04-14 12:52:45 +02:00
Matt A. Tobin d6bcaa6491 Issue #1053 - Remove android support from netwerk/protocol/http/nsHttpHandler.cpp 2020-04-14 12:52:32 +02:00
Matt A. Tobin 92edec6f58 Issue #1053 - Remove android support from netwerk 2020-04-14 12:52:18 +02:00
Matt A. Tobin 2dea4edfd7 Issue #1053 - Remove android support from storage/mozStorageConnection.cpp 2020-04-14 12:52:05 +02:00
Matt A. Tobin 54cb1b965e Issue #1053 - Remove android support from uriloader 2020-04-14 12:51:52 +02:00
Matt A. Tobin a6d1dd183d Issue #1053 - Remove android support from xpcom/threads/nsThread.cpp
Forgot to save..
2020-04-14 12:51:38 +02:00
Matt A. Tobin da15aa0fdf Issue #1053 - Remove android support from XPCOM 2020-04-14 12:51:25 +02:00
Matt A. Tobin 867737dd4b Remove redundant moz.build from db/ 2020-04-14 12:51:11 +02:00
Matt A. Tobin 36fc5f674e Reclassify heapsnapshot and nsJSInspector as not part of devtools
This resolves Issue #316
2020-04-14 12:50:57 +02:00
wolfbeast 7b30664f59 Set module default identification properly. 2020-04-14 12:50:42 +02:00
wolfbeast ef71f96a8d Remove gtest reference to non-existing path of removed component 2020-04-14 12:50:25 +02:00
wolfbeast 2b99226680 [gfx] Put Skia-specific CTOR init behind Skia-conditional. 2020-04-14 12:50:12 +02:00
wolfbeast 2794f0c48c Issue #316 - Make sure MOZ_DEVTOOLS_SERVER is passed down to js. 2020-04-14 12:49:36 +02:00
Matt A. Tobin 2f23073a3a Issue #1053 - Remove android support from NPAPI 2020-04-14 12:49:22 +02:00
Matt A. Tobin 496fbaf738 Issue #1053 - Remove conditional android code from widget/ 2020-04-14 12:49:08 +02:00
Matt A. Tobin 85621ee9b3 Issue #1053 - Remove Android Widget Toolkit specific files 2020-04-14 12:48:53 +02:00
Matt A. Tobin ee6595e6de Issue #439 - Remove tests from widget/ 2020-04-14 12:48:40 +02:00
wolfbeast 201be4d8fc Issue #316 - Be more gentle with the CC and nursery. 2020-04-14 12:48:23 +02:00
wolfbeast 9e586a1d0e Issue #316 - Pre-process Performance.webidl 2020-04-14 12:48:09 +02:00
wolfbeast 009c9dd2f8 Issue #316 - Make the memory GC performance object conditional (WIP)
This was only added for GCubench and likely interfering with building
without devtools-server.
2020-04-14 12:47:56 +02:00
Matt A. Tobin 6407f1abd4 Issue #1457 - Unfold sqlite3 from nss 2020-04-14 12:47:38 +02:00
wolfbeast 28f0155307 Issue #1383 - Remove "Copy raw data to clipboard" button
This resolves #1383
2020-04-14 12:47:23 +02:00
JustOff 11ede87242 Issue #1445 - Add a link to details on using Firefox extensions in Pale Moon 2020-04-14 12:47:05 +02:00
Matt A. Tobin 3630fec559 Issue #1454 - Add MOZ_PKG_SPECIAL to UpdateUtils 2020-04-14 12:46:46 +02:00
JustOff d062e7311c Issue #1445 - strings cleanup 2020-04-14 12:46:29 +02:00
wolfbeast 0313ac74fd Issue #1445 - remove redundant nativeIndicator
This resolves #1445
2020-04-14 12:46:14 +02:00
Matt A. Tobin 9612c64265 Issue #1320 - Stop appending cpu arch to the end of %BUILD_TARGET% on Windows in UpdateUtils.jsm 2020-04-14 12:45:59 +02:00
wolfbeast c5d570792d Issue #1445 - Use the detailed string also in the list entries. 2020-04-14 12:45:44 +02:00
wolfbeast 10c4e73e56 Issue #1446 - Only match extension add-on types for target applications.
This resolves #1446
2020-04-14 12:45:31 +02:00
win7-7 c9fd86cb78 Issue #1355 - Make nsTableCellFrame::GetColIndex/GetRowIndex faster
We can devirtualize it, remove some branches.
2020-04-14 12:45:15 +02:00
wolfbeast 550d634ff5 Issue #1446 - Only allow extension add-on types for Firefox compat mode. 2020-04-14 12:44:56 +02:00
wolfbeast bbee80fa1c Issue #1445 - Clarify the status of extensions in the Add-On manager
This resolves #1445.
2020-04-14 12:44:41 +02:00
wolfbeast 8ffe533b3d [CSS] Only emit non-GC chrome wrapped XUL box warnings in debug builds. 2020-04-14 12:44:16 +02:00
wolfbeast 9670bdb685 Issue #1441 - Guard appomni/greomni with UXP_CUSTOM_OMNI env var.
This adds an addition to the environment set up for child processes
(plugin container) so that it may still be able to pass the omni
parameters there as-needed.
2020-04-14 12:44:02 +02:00
wolfbeast 8fa80e2c8d Revert "Issue #1441 - Guard appomni/greomni with UXP_CUSTOM_OMNI env var."
This reverts commit 2bdbca39b2.
2020-04-14 12:43:49 +02:00
Simon Giesecke a377d1ecd4 [IndexedDB] Ensure that strong references to newly created cursors are
kept until the DOM Binding is created.

This fixes random crashes on websites that use IndexedDB cursors.
See also BZ bug 1599420
2020-04-14 12:43:34 +02:00
Henri Sivonen 1ebbb0af03 [Parser] Move setting context to null to the correct location. 2020-04-14 12:43:22 +02:00
wolfbeast 29b13d3523 Issue #1441 - Guard appomni/greomni with UXP_CUSTOM_OMNI env var. 2020-04-14 12:43:06 +02:00
sotaro 76476ed75b [Layers] Clear WrappingTextureSourceYCbCrBasic::mTexture correctly 2020-04-14 12:42:53 +02:00
wolfbeast 84fc500ff2 [Network] Bump http channel default Firefox CompatMode init value. 2020-04-14 12:42:38 +02:00
wolfbeast 2560dd2514 Fix a whitespace issue in nsComputedDOMStyle.cpp 2020-04-14 12:42:23 +02:00
wolfbeast 0e2b0db4d7 [CSS] Add stub for font-variation-settings
This stub is added because websites insist on considering this
very hardware-dependent and O.S.-variable low-level font-control
as a "critical feature" which it isn't as there is 0 guarantee
that font variation settings are supported or honored by any
operating system used by the client.

On top this is a WD status feature that sites shouldn't be using, and
the feature itself is strongly discouraged for use in favor of standard
CSS font manipulation keywords like `font-weight`.
2020-04-14 12:42:10 +02:00
wolfbeast c4f65de9b2 [CSP] Allow not having a Port for RessourceURI if the Scheme has no
Default Port
2020-04-14 12:41:57 +02:00
Matt A. Tobin e3148b0a25 Issue #65 - Correct nsHelperAppDlg.js for bad preprocessing conversion 2020-04-14 12:41:44 +02:00
Matt A. Tobin fe6730c219 Issue #80 - Stop building non-generated dom/binding files as UNIFIED_SOURCES
Also fix deprot
2020-04-14 12:41:31 +02:00
Matt A. Tobin 2e44ddb15e Directly assign PrimitiveConversions.h to the generated binding of KeyframeAnimationOptions.
This is a hack to deal UnifiedBindings trying to deal with an incomplete codegen implementation so it was worked around with a hack back in Firefox 30-something. If we have anymore of this non-sense crop up as stuff is added or removed from DOM then extend this conditional.

Least until something better comes along.
2020-04-14 12:41:12 +02:00
win7-7 da74d1f3f3 Issue #1355 - Do less work for columns not in the desired set in PaintRowGroupBackgroundByColIdx
Do less work in PaintRowGroupBackgroundByColIdx for cells that are not in our desired set of columns.

crash fix:

Guard against empty column groups when building a display list for a table.
2020-04-14 12:40:47 +02:00
Matt A. Tobin 91be118376 Issue #65 - Don't split in the middle of assignment statements in createProfileWizard.js 2020-04-14 12:40:06 +02:00
Matt A. Tobin 2258e09d59 Issue #65 - Correct fallthough case in profileSelection.js 2020-04-14 12:39:51 +02:00
Matt A. Tobin 30ec922d7e Issue #65 - Remove AppConstants from toolkit/components/passwordmgr 2020-04-14 12:39:35 +02:00
Matt A. Tobin 1000488a5b Issue #65 - Remove AppConstants from toolkit/components/alerts 2020-04-14 12:39:21 +02:00
Matt A. Tobin ffe75592e3 Issue #65 - Remove AppConstants from toolkit/components/places 2020-04-14 12:39:08 +02:00
Matt A. Tobin 0084e71953 Issue #65 - Remove AppConstants from toolkit/components/apppicker 2020-04-14 12:38:54 +02:00
Matt A. Tobin dbeceecde2 Issue #65 - Remove AppConstants from toolkit/components/thumbnails 2020-04-14 12:38:41 +02:00
Matt A. Tobin 9fc28c55c3 Issue #65 - Remove AppConstants from toolkit/components/printing 2020-04-14 12:38:27 +02:00
Matt A. Tobin 113a825c1f Issue #65 - Remove AppConstants from toolkit/components/satchel 2020-04-14 12:38:14 +02:00
Matt A. Tobin 419abfb09f Issue #65 - Remove AppConstants from toolkit/components/jsdownloads 2020-04-14 12:37:58 +02:00
Matt A. Tobin 4e58dab0a1 Issue #65 - Remove AppConstants from toolkit/mozapps/downloads 2020-04-14 12:37:44 +02:00
Matt A. Tobin 9e42d9ea2f Issue #65 - Remove AppConstants from toolkit/mozapps/extensions 2020-04-14 12:37:29 +02:00
Matt A. Tobin 377f54f3fe Issue #65 - Remove AppConstants from toolkit/mozapps/update 2020-04-14 12:37:16 +02:00
Matt A. Tobin 62f39d829d Issue #65 - Remove AppConstants from toolkit/profile 2020-04-14 12:37:02 +02:00
win7-7 28971524e4 fix whitespace
fix whitespace.
2020-04-14 12:36:29 +02:00
win7-7 be37269123 Issue #1386 - Devirtualize GetRowSpan/GetColSpan
It's at ~1.5% on the perf log for the Netflix use case, which seems a bit too much.
2020-04-14 12:36:12 +02:00
Matt A. Tobin 8acff5cdbe Issue #1395 - Part 2: Remove the rest of FlyWeb 2020-04-14 12:35:06 +02:00
Matt A. Tobin 11a4ab0982 Issue #1395 - Remove FlyWeb Service 2020-04-14 12:31:31 +02:00
Matt A. Tobin 8c41fcd240 Issue #1390 - Get rid of the Presentation API 2020-04-14 12:31:16 +02:00
Matt A. Tobin 27f4e60be8 Issue #1390 - Remove secondscreen modules from toolkit 2020-04-14 12:31:03 +02:00
wolfbeast aae1baabe9 [AM] Remove shared theme leftovers for webextensions 2020-04-14 12:30:49 +02:00
Matt A. Tobin f620afc446 Issue #1392 - Change --enable-eme to MOZ_ARG_ENABLE_BOOL and remove MOZ_EME_MODULES 2020-04-14 12:30:34 +02:00
Moonchild 456f4a5891 Update UXP Coding Style.md
Be more explicit about paranthesis spacing
2020-04-14 12:30:16 +02:00
Moonchild 84d99e2996 Update UXP Coding Style.md
Minor typo
2020-04-14 12:30:03 +02:00
wolfbeast e29301f5d0 Issue #26 - Part 2c: Remove dependence on gmp/widevine-adapter/* 2020-04-14 12:29:44 +02:00
wolfbeast 369ad75fc8 Issue #26 - Part 2b: Stub out GMPDecryptorProxy functions.
If EME isn't built, these functions would have no use and the callback
structures are unavailable. Stubbing these out will still allow the
callers to work unchanged, but in effect simply always return without
dispatching a promised task.
This fixes the dependency issue from part 2a.
2020-04-14 12:29:29 +02:00
wolfbeast 37e3135bc5 Issue #26 Part 2a: make more EME code conditional.
- Exclude missed MediaKey functions and CDMProxy code.
- Exclude EME APIs frm being built (webidl change)
- Fix tests in --disable-eme state
2020-04-14 12:29:16 +02:00
wolfbeast 259bd2e977 [Installer] Updated the 7-zip stub binary to make sure it doesn't hang
on older versions of Windows but instead provides a usable error message
2020-04-14 12:28:34 +02:00
win7-7 0ebdc99757 Issue #1384 - Match standard for colSpan/rowSpan
HTML standardizes proper behavior of colSpan and rowSpan:

The main thing is that getting the .rowSpan and .colSpan IDL properties will now return the actual clamped value that we use.
2020-04-14 12:28:14 +02:00
wolfbeast 68d3bc54fb Issue #1382 - Remove invalid assertion.
There is flexibility in exactly the value the initialized length must
hold, i.e. if an array is completely empty, it is valid for the
initialized length to be any value between zero and the length of the
array, as long as the in-memory values below the initialized length have
been initialized with a hole value.
In the case of 0, the array is packed and the move operation would be a
nop, so simply convert the assert to a condition to save some cycles.
2020-04-14 12:28:00 +02:00
win7-7 2109f36dd4 Issue #1355 - Hit testing in large tables has become extremely slow
Add dirty rect intersection checks so that we don't build unnecessary table part display items.
2020-04-14 12:27:45 +02:00
wolfbeast 58f10adc97 Revert "Issue #1355 - Hit testing in large tables has become extremely slow"
This reverts commit f7b2f0a665.
2020-04-14 12:27:31 +02:00
win7-7 05c68a17a0 Issue #1355 - Hit testing in large tables has become extremely slow
Add dirty rect intersection checks so that we don't build unnecessary table part display items.
2020-04-14 12:27:14 +02:00
New Tobin Paradigm f78958a020 Fix preprocessor directive in UserAgentUpdates.jsm 2020-04-14 12:26:58 +02:00
wolfbeast bcd6c96aec Issue #1378 - Follow-up: make sure background items remain table-aligned. 2020-04-14 12:26:44 +02:00
Matt A. Tobin 73289f5389 Issue #65 - Remove AppConstants from toolkit/modules
Except for secondscreen
2020-04-14 12:26:25 +02:00
Matt A. Tobin 4acc0d58cb Issue #65 - Remove AppConstants from toolkit/content 2020-04-14 12:26:11 +02:00
Matt A. Tobin a1c9dd468d Issue #65 - Remove AppConstants from netwerk/ 2020-04-14 12:25:58 +02:00
Matt A. Tobin 0a5acb852a Issue #65 - Remove AppConstants from mailnews/ 2020-04-14 12:25:45 +02:00
Matt A. Tobin c8bbebe59d Issue #65 - Remove AppConstants from dom/ 2020-04-14 12:25:32 +02:00
wolfbeast fddc35e438 Issue #1378 - Align the drawing of table cell backgrounds with the spec. 2020-04-14 12:22:44 +02:00
Matt A. Tobin 7e4efa4e1f Issue #1377 - Fix porting typo in mailnews/base/search/content/searchWidgets.xml
MailNews Core being historically comm tended to avoid defining shorthand for Components.interfaces
2020-04-14 12:21:51 +02:00
wolfbeast 84b5515a8d Issue #447 - Update HSTS preload list & reduce debug spew
Commented out spewing dump() statements in loops. With the ever growing
HSTS list it takes too much time and is pointless to display.
2020-04-14 12:21:27 +02:00
wolfbeast 6b7fa183dd Issue #1342 - Remove support for system libvpx 2020-04-14 12:21:10 +02:00
wolfbeast a43d59bcbf Issue #1342 - Remove support for system sqlite 2020-04-14 12:20:23 +02:00
wolfbeast ac6896b599 Issue #1342 - Update old.configure for removed build options 2020-04-14 12:20:08 +02:00
wolfbeast 171053d0b2 Issue #1342 - Remove support for system linbpng 2020-04-14 12:19:55 +02:00
win7-7 efd88ee999 Issue #1355 - Speed up the traversal of a table row frame's child cells
Speed up getting the first cellframe in a row and the next cellframe after the given one
2020-04-14 12:19:39 +02:00
wolfbeast 9a74d53315 Issue #1342 - Remove support for system NSPR/NSS 2020-04-14 12:18:35 +02:00
wolfbeast e2a478072a Issue #1342 - Remove support for system ICU 2020-04-14 12:18:21 +02:00
wolfbeast cb06cac81d [WebRequest] Remove AddonManagerPermissions leftovers
This was added as part of the WebExtension sec issue CVE-2017-5389.
Since we no longer have this interface, it needed to be removed to
prevent errors in the WebRequest channel callback.
2020-04-14 12:17:58 +02:00
athenian200 c3d92cd338 Issue #1356 - Add tests.
Forgot to include these before.
2020-04-14 12:17:34 +02:00
athenian200 8ae2267eac Issue #1356 - Restore older syntax.
Some newer Firefox syntax snuck into my last bug. Just to be on the safe side I'm restoring the older syntax here.
2020-04-14 12:16:48 +02:00
athenian200 563dc95cdb Issue #1356 - Remove -moz-user-input disabled to improve event handling. 2020-04-14 12:16:31 +02:00
wolfbeast 7e59ac9036 Issue #1360 - Enable acceleration by default on all known-good platforms. 2020-04-14 12:15:53 +02:00
wolfbeast f1e40aaa5b Issue #1360 - Part 2: Update tests for changed preferences. 2020-04-14 12:14:27 +02:00
wolfbeast 068372c618 Issue #1360 - Part 1: Simplify layers acceleration prefs.
This gets rid of platform-dependent hard-coded defaults, but keeps
build-time blocking if there is no GL provider (in which case layers
acceleration almost certainly won't work because it needs a GL
compositor and would likely crash without)

New prefs are
- layers.acceleration.enabled to enable HWA
- layers.acceleration.force to force it enabled (requires .enabled to be
  set as well)

This is the platform part of this issue. The rest will be front-end work
(Preference UI integration and pref migration)
2020-04-14 12:14:11 +02:00
5762 changed files with 26129 additions and 807472 deletions

No files matched your search

+1 -1
View File
@@ -22,5 +22,5 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Clobber for NSS Update
Clobber for NSS update
+6
View File
@@ -47,6 +47,12 @@ ifndef MOZ_PROFILE_USE
# We need to explicitly put BUILD_BACKEND_FILES here otherwise the rule in
# rules.mk doesn't run early enough.
$(TIERS) binaries:: CLOBBER $(configure_dir)/configure config.status $(BUILD_BACKEND_FILES)
# While our mozbuild backend has some kind of crazy install_manfests junk to
# try and make this not have to happen, we actually want dist/bin to be
# completely removed regardless.
default alldep all::
@$(RM) -r $(DIST)/bin
ifndef JS_STANDALONE
ifdef COMPILE_ENVIRONMENT
$(TIERS) binaries:: $(topsrcdir)/js/src/configure js/src/config.status
+4 -1
View File
@@ -18,7 +18,7 @@ directory. This will contain relevant documentation regarding contributing,
using and distributing this code and its binaries.
If you are interested in the development and building side of things, some
information will be available on the [Pale Moon developer wiki](http://developer.palemoon.org).
information will be available on the [Pale Moon developer site](http://developer.palemoon.org).
You are also always welcome to get in touch with our community on the [Pale Moon forum](https://forum.palemoon.org/).
### A note about trademarks and branding
@@ -34,3 +34,6 @@ and other community members.
If you fork this repository to perform your own work on it, please consider offering
improvement patches upstream to its origin to mutually improve the platform and build
a future for XUL.
## Looking for Pale Moon and Basilisk?
As of [`Issue #969`](https://github.com/MoonchildProductions/UXP/issues/969), release versions `28.9.0` and `2020.03.04` respectively, they have been split off into their own dedicated repositories located at [`MoonchildProductions/Pale-Moon`](https://github.com/MoonchildProductions/Pale-Moon) and [`MoonchildProductions/Basilisk`](https://github.com/MoonchildProductions/Basilisk).
+36
View File
@@ -0,0 +1,36 @@
# Security Policy
## What is or is not a vulnerability?
In general, vulnerabilities are those bugs that can actually be exploited to perform malicious tasks.
Most _crashes_ are not security vulnerabilities. Although important to fix, they don't inherently cause a problem for the
browser's security.
What should be considered vulnerabilities or security hazards by default:
- Use-after-free crashes, since those can potentially be used for remote code execution;
- Spoofing issues in the UI;
- File security issues, like out-of-bounds access to arbitrary files or locations;
- Type confusion issues;
- Bypass of security measures like CSP or the various mechanisms around HTTPS.
Generally not security vulnerabilities:
- Null dereferencing crashes;
- Malware extensions (but please do report those on the forum in the extensions board!);
- Denial-of-service (AKA "evil trap sites")
- Browser hangs
- Issues with non-standard manual configuration (either at build time or by manipulating about:config directly)
## Reporting a Vulnerability
If you find an issue in UXP or the applications it builds on that could impact the security or safety of users please **do not**
make an issue on GitHub about it. GitHub does not support restricted viewability for security sensitive bugs.
If you want to report a security-sensitive issue then please go to the [forum](https://forum.palemoon.org) and report the issue
via a **private message** to **Moonchild** (the founder and prime responsible for security issues).
The forum's private message system is fully secure since your visits are encrypted and private messages are not available to anyone
except the recipient (not even moderators!).
You will be informed via private message if the vulnerability report is accepted or declined, with reasoning.
Security updates occur regularly and are given priority over most other development tasks. In general, they can be solved
relatively quickly and will be included in the next point release (third digit if not rolled into a more major one).
+21 -27
View File
@@ -175,23 +175,17 @@ HTMLTableCellAccessible::Table() const
uint32_t
HTMLTableCellAccessible::ColIdx() const
{
nsITableCellLayout* cellLayout = GetCellLayout();
NS_ENSURE_TRUE(cellLayout, 0);
int32_t colIdx = 0;
cellLayout->GetColIndex(colIdx);
return colIdx > 0 ? static_cast<uint32_t>(colIdx) : 0;
nsTableCellFrame* cellFrame = GetCellFrame();
NS_ENSURE_TRUE(cellFrame, 0);
return cellFrame->ColIndex();
}
uint32_t
HTMLTableCellAccessible::RowIdx() const
{
nsITableCellLayout* cellLayout = GetCellLayout();
NS_ENSURE_TRUE(cellLayout, 0);
int32_t rowIdx = 0;
cellLayout->GetRowIndex(rowIdx);
return rowIdx > 0 ? static_cast<uint32_t>(rowIdx) : 0;
nsTableCellFrame* cellFrame = GetCellFrame();
NS_ENSURE_TRUE(cellFrame, 0);
return cellFrame->RowIndex();
}
uint32_t
@@ -285,6 +279,12 @@ HTMLTableCellAccessible::GetCellLayout() const
return do_QueryFrame(mContent->GetPrimaryFrame());
}
nsTableCellFrame*
HTMLTableCellAccessible::GetCellFrame() const
{
return do_QueryFrame(mContent->GetPrimaryFrame());
}
nsresult
HTMLTableCellAccessible::GetCellIndexes(int32_t& aRowIdx, int32_t& aColIdx) const
{
@@ -520,11 +520,9 @@ HTMLTableAccessible::SelectedCellCount()
if (!cellFrame || !cellFrame->IsSelected())
continue;
int32_t startRow = -1, startCol = -1;
cellFrame->GetRowIndex(startRow);
cellFrame->GetColIndex(startCol);
if (startRow >= 0 && (uint32_t)startRow == rowIdx &&
startCol >= 0 && (uint32_t)startCol == colIdx)
uint32_t startRow = cellFrame->RowIndex();
uint32_t startCol = cellFrame->ColIndex();
if (startRow == rowIdx && startCol == colIdx)
count++;
}
}
@@ -570,11 +568,9 @@ HTMLTableAccessible::SelectedCells(nsTArray<Accessible*>* aCells)
if (!cellFrame || !cellFrame->IsSelected())
continue;
int32_t startCol = -1, startRow = -1;
cellFrame->GetRowIndex(startRow);
cellFrame->GetColIndex(startCol);
if ((startRow >= 0 && (uint32_t)startRow != rowIdx) ||
(startCol >= 0 && (uint32_t)startCol != colIdx))
uint32_t startRow = cellFrame->RowIndex();
uint32_t startCol = cellFrame->ColIndex();
if (startRow != rowIdx || startCol != colIdx)
continue;
Accessible* cell = mDoc->GetAccessible(cellFrame->GetContent());
@@ -597,11 +593,9 @@ HTMLTableAccessible::SelectedCellIndices(nsTArray<uint32_t>* aCells)
if (!cellFrame || !cellFrame->IsSelected())
continue;
int32_t startRow = -1, startCol = -1;
cellFrame->GetColIndex(startCol);
cellFrame->GetRowIndex(startRow);
if (startRow >= 0 && (uint32_t)startRow == rowIdx &&
startCol >= 0 && (uint32_t)startCol == colIdx)
uint32_t startCol = cellFrame->ColIndex();
uint32_t startRow = cellFrame->RowIndex();
if (startRow == rowIdx && startCol == colIdx)
aCells->AppendElement(CellIndexAt(rowIdx, colIdx));
}
}
+6
View File
@@ -11,6 +11,7 @@
#include "TableCellAccessible.h"
class nsITableCellLayout;
class nsTableCellFrame;
namespace mozilla {
namespace a11y {
@@ -53,6 +54,11 @@ protected:
*/
nsITableCellLayout* GetCellLayout() const;
/**
* Return the table cell frame.
*/
nsTableCellFrame* GetCellFrame() const;
/**
* Return row and column indices of the cell.
*/
@@ -83,7 +83,7 @@
'listitem-2-3']);
queueTraversalSequence(gQueue, docAcc, TraversalRules.Graphic, null,
['image-2', 'image-3']);
['image-1', 'image-2', 'image-3']);
queueTraversalSequence(gQueue, docAcc, TraversalRules.Link, null,
['link-0', 'link-1', 'link-2', 'link-3']);
@@ -117,7 +117,7 @@
'1. Scheme', '2. Racket', '3. Clojure',
'4. Standard Lisp', 'link-0', ' Lisp',
'checkbox-1-5', ' LeLisp', '• JavaScript',
'heading-5', 'image-2', 'image-3',
'heading-5', 'image-1', 'image-2', 'image-3',
'Not actually an image', 'link-1', 'anchor-1',
'link-2', 'anchor-2', 'link-3', '3', '1', '4',
'1', 'Sunday', 'M', 'Week 1', '3', '4', '7', '2',
@@ -20,8 +20,8 @@
document.getElementsByTagName("img")[0].firstChild.data = "2";
var accTree = {
role: ROLE_TEXT,
children: [ { role: ROLE_TEXT_LEAF } ]
role: ROLE_GRAPHIC,
children: []
};
testAccessibleTree("the_img", accTree);
SimpleTest.finish();
+15 -5
View File
@@ -381,11 +381,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
_ISAINFO=`isainfo -k 2>/dev/null`
if [ "$_ISAINFO" = "amd64" ]; then
SUN_ARCH=x86_64
elif [ "$CC_FOR_BUILD" != no_compiler_found ]; then
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
@@ -842,6 +845,13 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW32_NT*:*)
if [ "$PLATFORM" = "X64" ]; then
echo x86_64-pc-mingw32
else
echo ${UNAME_MACHINE}-pc-mingw32
fi
exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
+2 -15
View File
@@ -8,19 +8,6 @@ dnl ICU library, as well as a few other things.
AC_DEFUN([MOZ_CONFIG_ICU], [
ICU_LIB_NAMES=
MOZ_SYSTEM_ICU=
MOZ_ARG_WITH_BOOL(system-icu,
[ --with-system-icu
Use system ICU (located with pkgconfig)],
MOZ_SYSTEM_ICU=1)
if test -n "$MOZ_SYSTEM_ICU"; then
PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 58.1)
CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS"
CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS"
fi
AC_SUBST(MOZ_SYSTEM_ICU)
dnl We always use ICU.
USE_ICU=1
@@ -51,7 +38,7 @@ if test -n "$USE_ICU"; then
dnl We also don't do it on Windows because sometimes the file goes
dnl missing -- possibly due to overzealous antivirus software? --
dnl which prevents the browser from starting up :(
if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
if test -z "$JS_STANDALONE"; then
MOZ_ICU_DATA_ARCHIVE=1
else
MOZ_ICU_DATA_ARCHIVE=
@@ -64,7 +51,7 @@ AC_SUBST(USE_ICU)
AC_SUBST(ICU_DATA_FILE)
AC_SUBST(MOZ_ICU_DATA_ARCHIVE)
if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
if test -n "$USE_ICU"; then
if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then
AC_MSG_ERROR([Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api])
fi
+2 -32
View File
@@ -42,15 +42,6 @@ if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then
_IS_OUTER_CONFIGURE=1
fi
MOZ_ARG_WITH_BOOL(system-nspr,
[ --with-system-nspr Use an NSPR that is already built and installed.
Use the 'nspr-config' script in the current path,
or look for the script in the directories given with
--with-nspr-exec-prefix or --with-nspr-prefix.
(Those flags are only checked if you specify
--with-system-nspr.)],
_USE_SYSTEM_NSPR=1 )
JS_POSIX_NSPR=unset
ifdef([CONFIGURING_JS],[
if test -n "$JS_STANDALONE"; then
@@ -71,7 +62,6 @@ ifdef([CONFIGURING_JS],[
])
dnl Pass at most one of
dnl --with-system-nspr
dnl --with-nspr-cflags/libs
dnl --enable-nspr-build
dnl --enable-posix-nspr-emulation
@@ -79,10 +69,6 @@ dnl --enable-posix-nspr-emulation
AC_MSG_CHECKING([NSPR selection])
nspr_opts=
which_nspr=default
if test -n "$_USE_SYSTEM_NSPR"; then
nspr_opts="x$nspr_opts"
which_nspr="system"
fi
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
nspr_opts="x$nspr_opts"
which_nspr="command-line"
@@ -136,11 +122,7 @@ fi
# anything itself.
if test -n "$_IS_OUTER_CONFIGURE"; then
if test -n "$_USE_SYSTEM_NSPR"; then
AM_PATH_NSPR($NSPR_MINVER, [MOZ_SYSTEM_NSPR=1], [AC_MSG_ERROR([you do not have NSPR installed or your version is older than $NSPR_MINVER.])])
fi
if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $NSPR_CFLAGS"
AC_TRY_COMPILE([#include "prtypes.h"],
@@ -178,19 +160,7 @@ AC_SUBST(NSPR_INCLUDE_DIR)
AC_SUBST(NSPR_LIB_DIR)
PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr"
if test -n "$MOZ_SYSTEM_NSPR"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $NSPR_CFLAGS"
AC_TRY_COMPILE([#include "prlog.h"],
[#ifndef PR_STATIC_ASSERT
#error PR_STATIC_ASSERT not defined
#endif],
,
AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT]))
CFLAGS=$_SAVE_CFLAGS
# piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc
PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER"
elif test -n "$JS_POSIX_NSPR"; then
if test -n "$JS_POSIX_NSPR"; then
PKGCONF_REQUIRES_PRIVATE=
fi
AC_SUBST([PKGCONF_REQUIRES_PRIVATE])
-3
View File
@@ -1,3 +0,0 @@
# Define indicating that this build is prior to one of the early betas. To be
# unset mid-way through the beta cycle.
EARLY_BETA_OR_EARLIER=
-5
View File
@@ -33,14 +33,9 @@ if ('MOZ_OFFICIAL_BRANDING' in listConfig) or (strBrandingDirectory.endswith("br
# Applies to Pale Moon and Basilisk
if ('MC_BASILISK' in listConfig) or ('MC_PALEMOON' in listConfig):
listViolations += [
'MOZ_SYSTEM_NSS',
'MOZ_SYSTEM_NSPR',
'MOZ_SYSTEM_JPEG',
'MOZ_SYSTEM_ZLIB',
'MOZ_SYSTEM_BZ2',
'MOZ_SYSTEM_PNG',
'MOZ_SYSTEM_LIBVPX',
'MOZ_SYSTEM_SQLITE',
'MOZ_SYSTEM_JEMALLOC'
]
+27 -16
View File
@@ -610,7 +610,7 @@ imply_option('--enable-project', application)
def default_project(build_env, help):
if build_env.topobjdir.endswith('/js/src'):
return 'js'
return 'browser'
return 'application/xulrunner'
option('--enable-project', nargs=1, default=default_project,
help='Project to build')
@@ -618,28 +618,22 @@ option('--enable-project', nargs=1, default=default_project,
option('--with-external-source-dir', env='EXTERNAL_SOURCE_DIR', nargs=1,
help='External directory containing additional build files')
@depends('--enable-project', '--with-external-source-dir',
check_build_environment, '--help')
@depends('--enable-project', '--with-external-source-dir', check_build_environment, '--help')
@imports(_from='os.path', _import='exists')
def include_project_configure(project, external_source_dir, build_env, help):
if not project:
die('--enable-project is required.')
base_dir = build_env.topsrcdir
if external_source_dir:
base_dir = os.path.join(base_dir, external_source_dir[0])
build_app = project[0]
if not external_source_dir and build_app not in ('xulrunner', 'js'):
die('Cannot find project %s', build_app)
path_project_src_dir_root = os.path.join(base_dir, build_app, 'moz.configure')
if exists(path_project_src_dir_root):
return path_project_src_dir_root
else:
die('Cannot find project %s', build_app)
return os.path.join(build_env.topsrcdir, 'toolkit', 'moz.configure')
@depends('--with-external-source-dir')
def external_source_dir(value):
@@ -649,12 +643,29 @@ def external_source_dir(value):
set_config('EXTERNAL_SOURCE_DIR', external_source_dir)
add_old_configure_assignment('EXTERNAL_SOURCE_DIR', external_source_dir)
@depends('--enable-project', '--with-external-source-dir', check_build_environment, '--help')
@imports(_from='os.path', _import='exists')
def build_project(project, external_source_dir, build_env, help):
if not project:
die('--enable-project is required.')
base_dir = build_env.topsrcdir
if external_source_dir:
base_dir = os.path.join(base_dir, external_source_dir[0])
build_app = project[0]
if not external_source_dir and build_app not in ('xulrunner', 'js'):
die('Cannot find project %s', build_app)
build_app_abspath = os.path.join(base_dir, build_app)
if exists(build_app_abspath):
return os.path.relpath(build_app_abspath, build_env.topsrcdir)
else:
die('Cannot find project %s', build_app)
@depends(include_project_configure, check_build_environment, '--help')
def build_project(include_project_configure, build_env, help):
ret = os.path.dirname(os.path.relpath(include_project_configure,
build_env.topsrcdir))
return ret
set_config('MOZ_BUILD_APP', build_project)
set_define('MOZ_BUILD_APP', build_project)
+3 -7
View File
@@ -157,6 +157,7 @@ def old_configure_options(*options):
'--enable-accessibility',
'--enable-address-sanitizer',
'--enable-alsa',
'--enable-av1',
'--enable-b2g-bt',
'--enable-b2g-camera',
'--enable-b2g-ril',
@@ -166,6 +167,7 @@ def old_configure_options(*options):
'--enable-cookies',
'--enable-cpp-rtti',
'--enable-crashreporter',
'--enable-dbm',
'--enable-dbus',
'--enable-debug-js-modules',
'--enable-jetpack',
@@ -222,6 +224,7 @@ def old_configure_options(*options):
'--enable-release',
'--enable-safe-browsing',
'--enable-sandbox',
'--enable-security-sqlstore',
'--enable-signmar',
'--enable-simulator',
'--enable-small-chunk-size',
@@ -233,7 +236,6 @@ def old_configure_options(*options):
'--enable-system-cairo',
'--enable-system-extension-dirs',
'--enable-system-pixman',
'--enable-system-sqlite',
'--enable-tasktracer',
'--enable-tests',
'--enable-thread-sanitizer',
@@ -287,13 +289,7 @@ def old_configure_options(*options):
'--with-sixgill',
'--with-soft-float',
'--with-system-bz2',
'--with-system-icu',
'--with-system-jpeg',
'--with-system-libevent',
'--with-system-libvpx',
'--with-system-nspr',
'--with-system-nss',
'--with-system-png',
'--with-system-zlib',
'--with-thumb',
'--with-thumb-interwork',
-5
View File
@@ -16,11 +16,6 @@ ac_add_options --enable-crashreporter
ac_add_options --enable-release
# Disable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-0}
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}
ac_add_options --enable-js-shell
. "$topsrcdir/build/mozconfig.automation"
+72
View File
@@ -0,0 +1,72 @@
#!/usr/bin/env python
from __future__ import print_function
import os, sys
if not len(sys.argv) is 2 or not os.path.exists(sys.argv[1]):
print("\nYou did not supply a valid path to check.")
exit(1)
else:
print("\nChecking for un-preprocessed files...", end = ' ')
DIST_PATH = sys.argv[1]
PP_FILE_TYPES = (
'.css',
'.dtd',
'.html',
'.js',
'.jsm',
'.xhtml',
'.xml',
'.xul',
'.manifest',
'.properties',
'.rdf'
)
PP_SPECIAL_TYPES = ('.css')
PP_DIRECTIVES = [
'define',
'if',
'ifdef',
'ifndef',
'elif',
'elifdef',
'endif',
'error',
'expand',
'filter',
'include',
'literal',
'undef',
'unfilter'
]
PP_FILES = []
PP_BAD_FILES = []
for root, directories, filenames in os.walk(DIST_PATH):
for filename in filenames:
if filename.endswith(PP_FILE_TYPES):
PP_FILES += [ os.path.join(root, filename).replace(os.sep, '/') ]
for file in PP_FILES:
with open(file) as fp:
marker = '%' if file.endswith(PP_SPECIAL_TYPES) else '#'
directives = tuple(marker + directive for directive in PP_DIRECTIVES)
for line in fp:
if line.startswith(directives):
PP_BAD_FILES += [ file.replace(DIST_PATH + '/', '') ]
fp.close()
PP_BAD_FILES = list(dict.fromkeys(PP_BAD_FILES))
print('Done!')
if len(PP_BAD_FILES) > 0:
print("\nWARNING: The following {0} file(s) in {1} may require preprocessing:\n".format(len(PP_BAD_FILES), DIST_PATH))
for file in PP_BAD_FILES:
print(file)
exit(0)
-3
View File
@@ -44,10 +44,7 @@ export:: $(export-preqs)
-DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
-DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
-DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
-DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
-DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
-DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
$(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
$(INSTALL) system_wrappers $(DIST)
+10 -12
View File
@@ -6,16 +6,14 @@
Library('icu')
if CONFIG['MOZ_SYSTEM_ICU']:
OS_LIBS += CONFIG['MOZ_ICU_LIBS']
DIRS += [
'common',
'data',
'i18n',
]
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
DIRS += ['stubdata']
USE_LIBS += ['icustubdata']
else:
DIRS += [
'common',
'data',
'i18n',
]
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
DIRS += ['stubdata']
USE_LIBS += ['icustubdata']
else:
USE_LIBS += ['icudata']
USE_LIBS += ['icudata']
+4 -14
View File
@@ -6,10 +6,8 @@
external_dirs = []
DIRS += [
'lgpllibs',
'sqlite',
]
DIRS += ['lgpllibs']
if not CONFIG['MOZ_SYSTEM_JPEG']:
external_dirs += ['media/libjpeg']
@@ -30,26 +28,18 @@ if CONFIG['MOZ_TREMOR']:
if CONFIG['MOZ_WEBM_ENCODER']:
external_dirs += ['media/libmkv']
if not CONFIG['MOZ_SYSTEM_LIBVPX']:
external_dirs += ['media/libvpx']
external_dirs += ['media/libvpx']
if CONFIG['MOZ_AV1']:
external_dirs += ['media/libaom']
if not CONFIG['MOZ_SYSTEM_PNG']:
external_dirs += ['media/libpng']
external_dirs += ['media/libpng']
external_dirs += ['media/libwebp']
if CONFIG['CPU_ARCH'] == 'arm':
external_dirs += ['media/openmax_dl']
if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']:
external_dirs += [
'media/sphinxbase',
'media/pocketsphinx',
]
if CONFIG['MOZ_FFVPX']:
external_dirs += ['media/ffvpx']
+1 -10
View File
@@ -3,8 +3,6 @@
# 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 MOZ_SYSTEM_NSS
CC_WRAPPER =
CXX_WRAPPER =
@@ -121,15 +119,9 @@ DEFAULT_GMAKE_FLAGS += NSS_ENABLE_TLS_1_3=1
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1)
DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' NSPR31_LIB_PREFIX=lib
endif
ifndef MOZ_SYSTEM_SQLITE
ifdef MOZ_FOLD_LIBS
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=nss3
else
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_DIR=$(ABS_DIST)/../config/external/sqlite
endif # MOZ_FOLD_LIBS
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_DIR=$(ABS_DIST)/../db/sqlite3/src
DEFAULT_GMAKE_FLAGS += SQLITE_INCLUDE_DIR=$(ABS_DIST)/include
endif
ifdef NSS_DISABLE_DBM
DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1
endif
@@ -475,4 +467,3 @@ endif # MOZ_FOLD_LIBS
# security/nss/lib/ckfw/builtins. See bug #836220.
libs-nss/lib$(if $(MOZ_FOLD_LIBS),/ckfw): $(call mkdir_deps,$(DEPTH)/security/nss/lib/ckfw/builtins)
endif
+8 -11
View File
@@ -6,14 +6,11 @@
Library('crmf')
if CONFIG['MOZ_SYSTEM_NSS']:
OS_LIBS += [l for l in CONFIG['NSS_LIBS'] if l.startswith('-L')]
else:
USE_LIBS += [
# The dependency on nss is not real, but is required to force the
# parent directory being built before this one. This has no
# practical effect on linkage, since the only thing linking crmf
# will need nss anyways.
'nss',
'static:/security/nss/lib/crmf/crmf',
]
USE_LIBS += [
# The dependency on nss is not real, but is required to force the
# parent directory being built before this one. This has no
# practical effect on linkage, since the only thing linking crmf
# will need nss anyways.
'nss',
'static:/security/nss/lib/crmf/crmf',
]
+3 -5
View File
@@ -6,10 +6,7 @@
DIRS += ['crmf']
if CONFIG['MOZ_SYSTEM_NSS']:
Library('nss')
OS_LIBS += CONFIG['NSS_LIBS']
elif CONFIG['MOZ_FOLD_LIBS']:
if CONFIG['MOZ_FOLD_LIBS']:
GeckoSharedLibrary('nss', linkage=None)
# TODO: The library name can be changed when bug 845217 is fixed.
SHARED_LIBRARY_NAME = 'nss3'
@@ -32,9 +29,10 @@ else:
'/security/nss/lib/smime/smime3',
'/security/nss/lib/ssl/ssl3',
'/security/nss/lib/util/nssutil3',
'sqlite',
]
USE_LIBS += ['sqlite']
# XXX: We should fix these warnings.
ALLOW_COMPILER_WARNINGS = True
+3 -1
View File
@@ -13,7 +13,6 @@
PR_*
PL_*
#endif
#include ../../../db/sqlite3/src/sqlite.symbols
ATOB_AsciiToData
ATOB_AsciiToData_Util
ATOB_ConvertAsciiToItem
@@ -113,6 +112,7 @@ CERT_GetCertChainFromCert
CERT_GetCertEmailAddress
CERT_GetCertificateDer
CERT_GetCertificateRequestExtensions
CERT_GetCertKeyType
CERT_GetCertTimes
CERT_GetCertTrust
CERT_GetCommonName
@@ -271,6 +271,7 @@ NSS_Init
NSS_Initialize
NSS_InitWithMerge
NSS_IsInitialized
NSS_OptionGet
NSS_OptionSet
NSS_NoDB_Init
NSS_SecureMemcmp
@@ -384,6 +385,7 @@ PK11_GetNextSymKey
PK11_GetPadMechanism
PK11_GetPrivateKeyNickname
PK11_GetPrivateModulusLen
PK11_GetSlotFromPrivateKey
PK11_GetSlotID
PK11_GetSlotInfo
PK11_GetSlotName
-22
View File
@@ -1,22 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
if CONFIG['MOZ_SYSTEM_SQLITE']:
Library('sqlite')
OS_LIBS += CONFIG['SQLITE_LIBS']
else:
DIRS += ['../../../db/sqlite3/src']
if CONFIG['MOZ_FOLD_LIBS']:
Library('sqlite')
# When folding libraries, sqlite is actually in the nss library.
USE_LIBS += [
'nss',
]
else:
SharedLibrary('sqlite')
SHARED_LIBRARY_NAME = 'mozsqlite3'
SYMBOLS_FILE = '/db/sqlite3/src/sqlite.symbols'
+1 -1
View File
@@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------
4.5.0
4.6.0
-3
View File
@@ -29,9 +29,6 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
# while the program here is in C.
HostProgram('nsinstall_real', c_only=True)
if CONFIG['MOZ_SYSTEM_ICU']:
DEFINES['MOZ_SYSTEM_ICU'] = True
PYTHON_UNIT_TESTS += [
'tests/test_mozbuild_reading.py',
'tests/unit-expandlibs.py',
+1 -1
View File
@@ -172,7 +172,7 @@ ifeq ($(MOZ_REPLACE_MALLOC_LINKAGE),dummy library)
mozglue/build/target memory/replace/logalloc/replay/target: memory/replace/dummy/target
endif
endif
ifeq (,$(MOZ_SYSTEM_NSPR)$(MOZ_SYSTEM_NSS)$(MOZ_FOLD_LIBS))
ifeq (,$(MOZ_FOLD_LIBS))
config/external/nss/target: config/external/nspr/pr/target config/external/nspr/ds/target config/external/nspr/libc/target
endif
# Most things are built during compile (target/host), but some things happen during export
-28
View File
@@ -1253,9 +1253,6 @@ soundtouch/SoundTouchFactory.h
#if MOZ_LIBAV_FFT==1
libavcodec/avfft.h
#endif
#if MOZ_SYSTEM_PNG==1
png.h
#endif
#if MOZ_SYSTEM_ZLIB==1
zlib.h
#endif
@@ -1291,15 +1288,6 @@ QtSparql/qsparqlresult.h
#if MOZ_TREE_PIXMAN!=1
pixman.h
#endif
#if MOZ_SYSTEM_LIBVPX==1
vpx/svc_context.h
vpx/vpx_codec.h
vpx/vpx_decoder.h
vpx/vpx_encoder.h
vpx/vp8cx.h
vpx/vp8dx.h
vpx_mem/vpx_mem.h
#endif
gst/gst.h
gst/app/gstappsink.h
gst/app/gstappsrc.h
@@ -1312,22 +1300,6 @@ kvm.h
spawn.h
err.h
xlocale.h
#ifdef MOZ_SYSTEM_ICU
unicode/locid.h
unicode/numsys.h
unicode/timezone.h
unicode/ucal.h
unicode/uchar.h
unicode/uclean.h
unicode/ucol.h
unicode/udat.h
unicode/udatpg.h
unicode/uenum.h
unicode/unorm.h
unicode/unum.h
unicode/ustring.h
unicode/utypes.h
#endif
libutil.h
unwind.h
fenv.h
+5 -5
View File
@@ -93,7 +93,7 @@ if (!defined($official)) {$official="";}
if (!defined($milestone)) {$milestone="";}
if (!defined($module)) {$module="";}
if (!defined($binary)) {$binary="";}
if (!defined($displayname)) {$displayname="Mozilla";}
if (!defined($displayname)) {$displayname="UXP";}
if (!defined($appversion)) {$appversion=$milestone;}
if (!defined($depth)) {$depth=".";}
if (!defined($rcinclude)) {$rcinclude="";}
@@ -234,10 +234,10 @@ for ($j = 1; $j < 4; $j++)
}
my $winappversion = "$appver[0],$appver[1],$appver[2],$appver[3]";
my $copyright = "License: MPL 2";
my $company = "Mozilla Foundation";
my $trademarks = "Mozilla";
my $productname = $displayname;
my $copyright = "License: MPL 2.0";
my $company = "Moonchild Productions";
my $trademarks = "Moonchild";
my $productname = "UXP";
if (defined($override_comment)){$override_comment =~ s/\@MOZ_APP_DISPLAYNAME\@/$displayname/g; $comment=$override_comment;}
+5 -6
View File
@@ -3,9 +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/.
if not CONFIG['NSS_DISABLE_DBM'] and CONFIG['MOZ_MORK']:
DIRS += [
'public',
'src',
'build',
]
DIRS += [
'public',
'src',
'build',
]
-11
View File
@@ -1,11 +0,0 @@
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
if not CONFIG['NSS_DISABLE_DBM'] and CONFIG['MOZ_MORK']:
DIRS += [
'mork/public',
'mork/src',
'mork/build',
]
+12 -23
View File
@@ -3,25 +3,18 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
NO_VISIBILITY_FLAGS = True
EXPORTS += [
'sqlite3.h',
]
NO_VISIBILITY_FLAGS = True
# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
if CONFIG['MOZ_FOLD_LIBS']:
# When folding libraries, sqlite is actually in the nss library.
FINAL_LIBRARY = 'nss'
else:
# The final library is in config/external/sqlite
FINAL_LIBRARY = 'sqlite'
GeckoSharedLibrary('sqlite', linkage=None, mozglue='library')
SHARED_LIBRARY_NAME = 'mozsqlite3'
SYMBOLS_FILE = 'sqlite.symbols'
SOURCES += [
'sqlite3.c',
]
EXPORTS += ['sqlite3.h']
SOURCES += ['sqlite3.c']
# -DSQLITE_SECURE_DELETE=1 will cause SQLITE to 0-fill delete data so we
# don't have to vacuum to make sure the data is not visible in the file.
@@ -34,8 +27,11 @@ SOURCES += [
# hidden preference. If that preference is missing or invalid then this value
# will be used.
# Note: Be sure to update the configure.in checks when these change!
for var in ('SQLITE_SECURE_DELETE', 'SQLITE_THREADSAFE', 'SQLITE_CORE',
'SQLITE_ENABLE_FTS3', 'SQLITE_ENABLE_UNLOCK_NOTIFY',
for var in ('SQLITE_SECURE_DELETE',
'SQLITE_THREADSAFE',
'SQLITE_CORE',
'SQLITE_ENABLE_FTS3',
'SQLITE_ENABLE_UNLOCK_NOTIFY',
'SQLITE_ENABLE_DBSTAT_VTAB'):
DEFINES[var] = 1
@@ -67,10 +63,6 @@ if CONFIG['MOZ_DEBUG']:
DEFINES['SQLITE_DEBUG'] = 1
DEFINES['SQLITE_ENABLE_API_ARMOR'] = True
if CONFIG['OS_TARGET'] == 'Android':
# default to user readable only to fit Android security model
DEFINES['SQLITE_DEFAULT_FILE_PERMISSIONS'] = '0600'
# Force using malloc_usable_size when building with jemalloc because _msize
# causes assertions on Win64. See bug 719579.
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_MEMORY']:
@@ -86,10 +78,7 @@ DEFINES['SQLITE_OMIT_DECLTYPE'] = True
# performance and doesn't suffer from a full separate tmp partition.
# Exclude 32bit platforms due to address space fragmentation issues.
# System Sqlite is managed through a PRAGMA instead.
if CONFIG['OS_TARGET'] == 'Android':
# On Android there's no tmp partition, so always use a MEMORY temp store.
DEFINES['SQLITE_TEMP_STORE'] = 3
elif CONFIG['HAVE_64BIT_BUILD']:
if CONFIG['HAVE_64BIT_BUILD']:
# On 64bit platforms default to a MEMORY temp store for performance.
DEFINES['SQLITE_TEMP_STORE'] = 2
+1 -1
View File
@@ -9828,7 +9828,7 @@ var Debugger =
var host = httpActivity.hostname;
info.hsts = sss.isSecureHost(sss.HEADER_HSTS, host, flags);
info.hpkp = sss.isSecureHost(sss.HEADER_HPKP, host, flags);
info.hpkp = false;
} else {
DevToolsUtils.reportException("NetworkHelper.parseSecurityInfo", "Could not get HSTS/HPKP status as hostname is not available.");
info.hsts = false;
+33 -15
View File
@@ -58,9 +58,21 @@ const Curl = {
* A cURL command.
*/
generateCommand: function (data) {
let utils = CurlUtils;
const utils = CurlUtils;
let command = ["curl"];
// Make sure to use the following helpers to sanitize arguments before execution.
const addParam = value => {
const safe = /^[a-zA-Z-]+$/.test(value) ? value : escapeString(value);
command.push(safe);
};
const addPostData = value => {
const safe = /^[a-zA-Z-]+$/.test(value) ? value : escapeString(value);
postData.push(safe);
};
let ignoredHeaders = new Set();
// The cURL command is expected to run on the same platform that Firefox runs
@@ -69,7 +81,7 @@ const Curl = {
utils.escapeStringWin : utils.escapeStringPosix;
// Add URL.
command.push(escapeString(data.url));
addParam(data.url);
let postDataText = null;
let multipartRequest = utils.isMultipartRequest(data);
@@ -79,15 +91,15 @@ const Curl = {
if (utils.isUrlEncodedRequest(data) ||
["PUT", "POST", "PATCH"].includes(data.method)) {
postDataText = data.postDataText;
postData.push("--data");
postData.push(escapeString(utils.writePostDataTextParams(postDataText)));
addPostData("--data-raw");
addPostData(utils.writePostDataTextParams(postDataText));
ignoredHeaders.add("content-length");
} else if (multipartRequest) {
postDataText = data.postDataText;
postData.push("--data-binary");
addPostData("--data-binary");
let boundary = utils.getMultipartBoundary(data);
let text = utils.removeBinaryDataFromMultipartText(postDataText, boundary);
postData.push(escapeString(text));
addPostData(text);
ignoredHeaders.add("content-length");
}
@@ -95,15 +107,15 @@ const Curl = {
// For GET and POST requests this is not necessary as GET is the
// default. If --data or --binary is added POST is the default.
if (!(data.method == "GET" || data.method == "POST")) {
command.push("-X");
command.push(data.method);
addParam("-X");
addParam(data.method);
}
// Add -I (HEAD)
// For servers that supports HEAD.
// This will fetch the header of a document only.
if (data.method == "HEAD") {
command.push("-I");
addParam("-I");
}
// Add http version.
@@ -114,7 +126,7 @@ const Curl = {
// data.httpVersion are HTTP/1.0, HTTP/1.1 and HTTP/2.0
// So in case of HTTP/2.0 (which should ideally be HTTP/2) we are using
// only major version, and full version in other cases
command.push("--http" + (version == "2.0" ? version.split(".")[0] : version));
addParam("--http" + (version == "2.0" ? version.split(".")[0] : version));
}
// Add request headers.
@@ -126,14 +138,14 @@ const Curl = {
for (let i = 0; i < headers.length; i++) {
let header = headers[i];
if (header.name.toLowerCase() === "accept-encoding") {
command.push("--compressed");
addParam("--compressed");
continue;
}
if (ignoredHeaders.has(header.name.toLowerCase())) {
continue;
}
command.push("-H");
command.push(escapeString(header.name + ": " + header.value));
addParam("-H");
addParam(header.name + ": " + header.value);
}
// Add post data.
@@ -388,7 +400,12 @@ const CurlUtils = {
* Credit: Google DevTools
*/
escapeStringWin: function (str) {
/* Replace quote by double quote (but not by \") because it is
/*
Replace dollar sign because of commands (e.g $(cmd.exe)) in
powershell when using double quotes.
Useful details http://www.rlmueller.net/PowerShellEscape.htm
Replace quote by double quote (but not by \") because it is
recognized by both cmd.exe and MS Crt arguments parser.
Replace % by "%" because it could be expanded to an environment
@@ -402,7 +419,8 @@ const CurlUtils = {
Replace new line outside of quotes since cmd.exe doesn't let
to do it inside.
*/
return "\"" + str.replace(/"/g, "\"\"")
return "\"" + str.replace(/\$/g, "`$")
.replace(/"/g, "\"\"")
.replace(/%/g, "\"%\"")
.replace(/\\/g, "\\\\")
.replace(/[\r\n]+/g, "\"^$&\"") + "\"";
+5 -11
View File
@@ -4,20 +4,14 @@
# 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/.
DIRS += [
'server',
'shared',
]
if CONFIG['MOZ_DEVTOOLS']:
DIRS += ['client']
if CONFIG['MOZ_DEVTOOLS_SERVER']:
DIRS += [
'server',
'shared',
]
else:
DIRS += [
'shared/heapsnapshot',
'shared/jsinspector',
]
# /browser uses DIST_SUBDIR. We opt-in to this treatment when building
# DevTools for the browser to keep the root omni.ja slim for use by external XUL
# apps. Mulet also uses this since it includes /browser.
+9 -57
View File
@@ -4,60 +4,12 @@
# 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/.
with Files('**'):
BUG_COMPONENT = ('Firefox', 'Developer Tools: Memory')
if CONFIG['ENABLE_TESTS']:
DIRS += ['tests/gtest']
XPCSHELL_TESTS_MANIFESTS += [ 'tests/unit/xpcshell.ini' ]
MOCHITEST_MANIFESTS += [ 'tests/mochitest/mochitest.ini' ]
MOCHITEST_CHROME_MANIFESTS += [ 'tests/mochitest/chrome.ini' ]
EXPORTS.mozilla.devtools += [
'AutoMemMap.h',
'CoreDump.pb.h',
'DeserializedNode.h',
'DominatorTree.h',
'FileDescriptorOutputStream.h',
'HeapSnapshot.h',
'HeapSnapshotTempFileHelperChild.h',
'HeapSnapshotTempFileHelperParent.h',
'ZeroCopyNSIOutputStream.h',
]
IPDL_SOURCES += [
'PHeapSnapshotTempFileHelper.ipdl',
]
include('/ipc/chromium/chromium-config.mozbuild')
SOURCES += [
'AutoMemMap.cpp',
'CoreDump.pb.cc',
'DeserializedNode.cpp',
'DominatorTree.cpp',
'FileDescriptorOutputStream.cpp',
'HeapSnapshot.cpp',
'HeapSnapshotTempFileHelperParent.cpp',
'ZeroCopyNSIOutputStream.cpp',
]
# Disable RTTI in google protocol buffer
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
FINAL_LIBRARY = 'xul'
if CONFIG['MOZ_DEVTOOLS_SERVER']:
DevToolsModules(
'census-tree-node.js',
'CensusUtils.js',
'DominatorTreeNode.js',
'HeapAnalysesClient.js',
'HeapAnalysesWorker.js',
'HeapSnapshotFileUtils.js',
'shortest-paths.js',
)
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
DevToolsModules(
'census-tree-node.js',
'CensusUtils.js',
'DominatorTreeNode.js',
'HeapAnalysesClient.js',
'HeapAnalysesWorker.js',
'HeapSnapshotFileUtils.js',
'shortest-paths.js',
)
-1
View File
@@ -17,7 +17,6 @@ DIRS += [
'heapsnapshot',
'inspector',
'jsbeautify',
'jsinspector',
'layout',
'locales',
'node-properties',
+2 -1
View File
@@ -668,7 +668,8 @@ var NetworkHelper = {
let host = httpActivity.hostname;
info.hsts = sss.isSecureHost(sss.HEADER_HSTS, host, flags);
info.hpkp = sss.isSecureHost(sss.HEADER_HPKP, host, flags);
// HPKP is no longer supported.
info.hpkp = false;
} else {
DevToolsUtils.reportException("NetworkHelper.parseSecurityInfo",
"Could not get HSTS/HPKP status as hostname is not available.");
+248 -12
View File
@@ -1,4 +1,4 @@
# UXP Coding Style Guide
# UXP Coding Style Guide
While our source tree is currently in a number of different Coding Styles and the general rule applies to adhere to style of surrounding code when you are making changes, it is our goal to unify the style of our source tree and making it adhere to a single style.
This document describes the preferred style for new source code files and the preferred style to convert existing files to.
@@ -11,9 +11,9 @@ Our own managed and maintained code should adhere to this guide where possible o
## General formatting rules
The following formatting rules apply to all code:
- Always use spaces for indentation, never use tabs!
- Put a space between a keyword and parenthesis, e.g. `if (`.
- Put a space between a keyword and parenthesis, e.g. `if (`. Do _not_ put a space between a function/type-assignment name and its parenthesis, e.g. `function(somevar)` or `int32_t(somevar)`.
- Put a space between variables and operators, e.g. `a == b`.
- Put a space after a comma or semicolon in variable lists, e.g. `function (a, b, c)` or `for (i = 1; i < 10; i++)`.
- Put a space after a comma or semicolon in variable lists, e.g. `function(a, b, c)` or `for (i = 1; i < 10; i++)`.
- Indentation of scopes is 2 spaces.
- Indentation of long lines is variable-aligned or expression-aligned (see "long line wrapping")
- Conditional defines are always placed on column 1. This is also true for nested defines.
@@ -126,7 +126,7 @@ switch (variable) {
code_for_1;
code_for_1;
break;
case value2:
case value2: // Comment describing 2 (alternative)
code_for_2;
code_for_2;
// fallthrough
@@ -225,15 +225,251 @@ somelongvariable = somelongexpression ?
## JavaScript
Applies to `*.js` and `*.jsm`.
### General formatting guidelines
- Place function signatures on the same line as js object identifiers, and do not use named function syntax in that case:
```JavaScript
var myObject = {
myIdentifier: function(var1, var2) {
...
},
myIdentifier2: function() {
...
}
}
```
- Variable initializers should be placed on the variable declaration line if needed.
```JavaScript
var fwdCommand = document.getElementById("Browser:Forward");
```
```JavaScript
var myObject = {
myVariable: null,
myString: "Something"
}
```
- Avoid placing executed code on the expression line. Preferably brace executed code.
WRONG:
```JavaScript
if (a == b) do_something();
if (a == b) { do_something(); }
```
DISCOURAGED:
```JavaScript
if (a == b)
do_something();
```
CORRECT:
```JavaScript
if (a == b) {
do_something();
}
```
- Format in-lined variable functions as if you would format normal functions with the exception of closure: break with the opening brace, followed by code, and closing brace on its own line, followed immediately by any other variables passed in-line.
```JavaScript
appMenuButton.addEventListener("mousedown", function(event) {
if (event.button == 0) {
appMenuOpening = new Date();
}
}, false);
```
- Don't use a space between `{` `}` braces in empty js objects, `{` `}` braces in empty function scopes, or `[` `]` brackets in empty arrays.
### Flow control
Flow control expressions should follow the following guidelines:
- Scopes have their opening braces on the expression line
- Scopes have their closing braces on a separate line, indent-aligned with the flow control expression
- Any alternative flow control paths are generally started with an expression on the closing brace line. The logic behind this is that you should keep the flow control level visually the same for the executed code blocks with no breaks (a closing brace on its own line means "done").
- Case statements are indented by 2 on a new line with the case expression on its own line.
- Flow control default scopes are always placed at the bottom.
#### if..else
`if..else` statements example:
```JavaScript
if (something == somethingelse) {
true_case_code here;
} else {
false_case_code here;
}
if (case1) {
case1_code here;
} else if (case2) {
case2_code here;
} else {
other_case_code here;
}
if (case1) {
case1_code here;
} else {
if (case2) {
case2_code here;
}
case2_and_other_code here;
}
```
#### for
`for` loop example:
```JavaScript
for (let i = 1; i < max; i++) {
loop_code here;
}
for (let i = 0;; i++) {
do_something_with(i);
if (i > max) break;
...
}
```
#### while
`while` loop example:
```JavaScript
while (something == true) {
loop_code here;
}
do {
execute_me_at_least_once();
...
} while (something == true);
```
#### switch..case
`switch..case` flow control example:
```JavaScript
switch (variable) {
case value1:
// Comment describing 1
code_for_1;
code_for_1;
break;
case value2: // Comment describing 2 (alternative)
code_for_2;
code_for_2;
// fallthrough
case value3:
case value4:
code_for_3_and_4;
break;
default:
code_for_default;
code_for_default;
}
```
Alternatively (braced):
```JavaScript
switch (variable) {
case value1: {
// Comment describing 1
code_for_1;
code_for_1;
break;
}
case value2: {
code_for_2;
code_for_2;
// fallthrough
}
case value3:
case value4: {
code_for_3_and_4;
break;
}
default: {
code_for_default;
code_for_default;
}
}
```
#### try..catch
- When using `try..catch` blocks, the use of optional catch binding is discouraged. Please always include the error variable.
`try..catch` flow control examples:
```JavaScript
try {
do_something();
} catch(e) {
handle_error(e);
} finally {
always();
}
try {
do_something();
} catch(e) {}
try {
do_something();
} finally {
always();
}
```
DISCOURAGED
```JavaScript
try {
do_something();
} catch {
// No error processing
do_something_else();
}
```
### Long line wrapping
If statements on a single line become overly long, they should be split into multiple lines:
- Binary operators (including ternary) must be left on their original lines if the line break happens around the operator. The second line should start in the same column as the start of the expression in the first line.
- Lists of variables (e.g. when calling or declaring a function) should be split at the wrapping column.
- Long OOP calls should be split at the period with the period on the start of the new line, indented to the column of the first object, filling to the wrapping column where possible, including additional terms.
- When breaking assignments/operations/logic, break right after the operator (`=`, `+`, `&&`, `||`, etc.)
- **Don't break too rigorously**; short additions should be kept on the same line to keep things legible - use common sense and context for flexibility.
WRONG:
```JavaScript
somelongobjectname.somelongfunction(
var1, var2, var3, var4, var5);
if (somelongvariable == somelongothervariable
|| somelongvariable2 == somelongothervariable2) {
somelongvariable = somelongexpression ? somevalue1
: somevalue2;
var iShouldntBeUsingThisLongOfAVarName
= someValueToAdd + someValueToAdd + someValueToAdd
+ someValueToAdd;
Cu.import("resource:///modules/DownloadsCommon.jsm", {}).
DownloadsCommon.initializeAllDataLinks();
```
CORRECT:
```JavaScript
somelongobjectname.somelongfunction(var1, var2, var3,
var4, var5);
if (somelongvariable == somelongothervariable ||
somelongvariable2 == somelongothervariable2) {
somelongvariable = somelongexpression ?
somevalue1 :
somevalue2;
var iShouldntBeUsingThisLongOfAVarName =
someValueToAdd + someValueToAdd + someValueToAdd +
someValueToAdd;
Cu.import("resource:///modules/DownloadsCommon.jsm", {})
.DownloadsCommon.initializeAllDataLinks();
let sessionStartup = Cc["@mozilla.org/browser/sessionstartup;1"]
.getService(Ci.nsISessionStartup);
```
## XUL and other XML-derivatives
Applies to `*.xul`, `*.html`, `*.xhtml`.
TODO
## IDL
Applies to `*.idl`, `*.xpidl` and `*.webidl`.
<!--stackedit_data:
eyJoaXN0b3J5IjpbMjUzODYzMzMsMjg5MjUwODIsLTQzMjMzNz
ExMSw4MzQ2MjYwNDksLTE5MDMyNzE5OTYsLTEwMTIwMjc3ODMs
LTE4MzgzODM5MDIsODA5MjEzNTEyLC01Mzg0MjM4MDAsMzgyNj
I3NDYzLDIwODYwMjIwODUsLTE1MjU5MjE2MjIsLTY1OTMzMTA0
MCwtNzQwOTE5MDQ1LDE4Njc1NTQxNDJdfQ==
-->
TODO
## Python-esque
Applies to `*.py`, `mozbuild` etc.
TODO
-2
View File
@@ -119,12 +119,10 @@ static RedirEntry kRedirMap[] = {
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
nsIAboutModule::ALLOW_SCRIPT
},
#ifndef ANDROID
{
"profiles", "chrome://global/content/aboutProfiles.xhtml",
nsIAboutModule::ALLOW_SCRIPT
},
#endif
// about:srcdoc is unresolvable by specification. It is included here
// because the security manager would disallow srcdoc iframes otherwise.
{
+10 -13
View File
@@ -860,6 +860,12 @@ nsDocShell::~nsDocShell()
shPrivate->SetRootDocShell(nullptr);
}
if (mContentViewer) {
mContentViewer->Close(nullptr);
mContentViewer->Destroy();
mContentViewer = nullptr;
}
if (--gDocShellCount == 0) {
NS_IF_RELEASE(sURIFixup);
}
@@ -4943,13 +4949,11 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
if (errorClass == nsINSSErrorsService::ERROR_CLASS_BAD_CERT) {
error.AssignLiteral("nssBadCert");
// If this is an HTTP Strict Transport Security host or a pinned host
// and the certificate is bad, don't allow overrides (RFC 6797 section
// 12.1, HPKP draft spec section 2.6).
// If this is an HTTP Strict Transport Security host, don't allow
// overrides (RFC 6797 section 12.1).
uint32_t flags =
UsePrivateBrowsing() ? nsISocketProvider::NO_PERMANENT_STORAGE : 0;
bool isStsHost = false;
bool isPinnedHost = false;
if (XRE_IsParentProcess()) {
nsCOMPtr<nsISiteSecurityService> sss =
do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
@@ -4957,9 +4961,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI,
flags, nullptr, &isStsHost);
NS_ENSURE_SUCCESS(rv, rv);
rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HPKP, aURI,
flags, nullptr, &isPinnedHost);
NS_ENSURE_SUCCESS(rv, rv);
} else {
mozilla::dom::ContentChild* cc =
mozilla::dom::ContentChild::GetSingleton();
@@ -4967,8 +4968,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
SerializeURI(aURI, uri);
cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HSTS, uri, flags,
&isStsHost);
cc->SendIsSecureURI(nsISiteSecurityService::HEADER_HPKP, uri, flags,
&isPinnedHost);
}
if (Preferences::GetBool(
@@ -4976,11 +4975,9 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
cssClass.AssignLiteral("expertBadCert");
}
// HSTS/pinning takes precedence over the expert bad cert pref. We
// HSTS takes precedence over the expert bad cert pref. We
// never want to show the "Add Exception" button for these sites.
// In the future we should differentiate between an HSTS host and a
// pinned host and display a more informative message to the user.
if (isStsHost || isPinnedHost) {
if (isStsHost) {
cssClass.AssignLiteral("badStsCert");
}
-22
View File
@@ -25,10 +25,6 @@
#ifdef MOZ_ENABLE_DBUS
#include "nsDBusHandlerApp.h"
#endif
#if defined(MOZ_WIDGET_ANDROID)
#include "nsExternalSharingAppService.h"
#include "nsExternalURLHandlerService.h"
#endif
// session history
#include "nsSHEntry.h"
@@ -85,10 +81,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(PlatformLocalHandlerApp_t)
#ifdef MOZ_ENABLE_DBUS
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDBusHandlerApp)
#endif
#if defined(MOZ_WIDGET_ANDROID)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalSharingAppService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsExternalURLHandlerService)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ContentHandlerService, Init)
// session history
@@ -114,10 +106,6 @@ NS_DEFINE_NAMED_CID(NS_LOCALHANDLERAPP_CID);
#ifdef MOZ_ENABLE_DBUS
NS_DEFINE_NAMED_CID(NS_DBUSHANDLERAPP_CID);
#endif
#if defined(MOZ_WIDGET_ANDROID)
NS_DEFINE_NAMED_CID(NS_EXTERNALSHARINGAPPSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_EXTERNALURLHANDLERSERVICE_CID);
#endif
NS_DEFINE_NAMED_CID(NS_SHENTRY_CID);
NS_DEFINE_NAMED_CID(NS_SHTRANSACTION_CID);
NS_DEFINE_NAMED_CID(NS_SHISTORY_CID);
@@ -142,10 +130,6 @@ const mozilla::Module::CIDEntry kDocShellCIDs[] = {
{ &kNS_LOCALHANDLERAPP_CID, false, nullptr, PlatformLocalHandlerApp_tConstructor },
#ifdef MOZ_ENABLE_DBUS
{ &kNS_DBUSHANDLERAPP_CID, false, nullptr, nsDBusHandlerAppConstructor },
#endif
#if defined(MOZ_WIDGET_ANDROID)
{ &kNS_EXTERNALSHARINGAPPSERVICE_CID, false, nullptr, nsExternalSharingAppServiceConstructor },
{ &kNS_EXTERNALURLHANDLERSERVICE_CID, false, nullptr, nsExternalURLHandlerServiceConstructor },
#endif
{ &kNS_SHENTRY_CID, false, nullptr, nsSHEntryConstructor },
{ &kNS_SHTRANSACTION_CID, false, nullptr, nsSHTransactionConstructor },
@@ -183,9 +167,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "performance", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "plugins", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "serviceworkers", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
#ifndef ANDROID
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "profiles", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
#endif
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "srcdoc", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "support", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "telemetry", &kNS_ABOUT_REDIRECTOR_MODULE_CID },
@@ -205,10 +187,6 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = {
{ NS_LOCALHANDLERAPP_CONTRACTID, &kNS_LOCALHANDLERAPP_CID },
#ifdef MOZ_ENABLE_DBUS
{ NS_DBUSHANDLERAPP_CONTRACTID, &kNS_DBUSHANDLERAPP_CID },
#endif
#if defined(MOZ_WIDGET_ANDROID)
{ NS_EXTERNALSHARINGAPPSERVICE_CONTRACTID, &kNS_EXTERNALSHARINGAPPSERVICE_CID },
{ NS_EXTERNALURLHANDLERSERVICE_CONTRACTID, &kNS_EXTERNALURLHANDLERSERVICE_CID },
#endif
{ NS_SHENTRY_CONTRACTID, &kNS_SHENTRY_CID },
{ NS_SHTRANSACTION_CONTRACTID, &kNS_SHTRANSACTION_CID },
+98
View File
@@ -0,0 +1,98 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "AbortController.h"
#include "AbortSignal.h"
#include "mozilla/dom/AbortControllerBinding.h"
#include "WorkerPrivate.h"
namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AbortController, mGlobal, mSignal)
NS_IMPL_CYCLE_COLLECTING_ADDREF(AbortController)
NS_IMPL_CYCLE_COLLECTING_RELEASE(AbortController)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AbortController)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
/* static */ bool
AbortController::IsEnabled(JSContext* aCx, JSObject* aGlobal)
{
if (NS_IsMainThread()) {
return Preferences::GetBool("dom.abortController.enabled", false);
}
using namespace workers;
// Otherwise, check the pref via the WorkerPrivate
WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(aCx);
if (!workerPrivate) {
return false;
}
return workerPrivate->AbortControllerEnabled();
}
/* static */ already_AddRefed<AbortController>
AbortController::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv)
{
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
if (!global) {
aRv.Throw(NS_ERROR_FAILURE);
return nullptr;
}
RefPtr<AbortController> abortController = new AbortController(global);
return abortController.forget();
}
AbortController::AbortController(nsIGlobalObject* aGlobal)
: mGlobal(aGlobal)
, mAborted(false)
{}
JSObject*
AbortController::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return AbortControllerBinding::Wrap(aCx, this, aGivenProto);
}
nsIGlobalObject*
AbortController::GetParentObject() const
{
return mGlobal;
}
AbortSignal*
AbortController::Signal()
{
if (!mSignal) {
mSignal = new AbortSignal(this, mAborted);
}
return mSignal;
}
void
AbortController::Abort()
{
if (mAborted) {
return;
}
mAborted = true;
if (mSignal) {
mSignal->Abort();
}
}
} // dom namespace
} // mozilla namespace
+59
View File
@@ -0,0 +1,59 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 mozilla_dom_AbortController_h
#define mozilla_dom_AbortController_h
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/AbortSignal.h"
#include "nsCycleCollectionParticipant.h"
#include "nsWrapperCache.h"
#include "mozilla/ErrorResult.h"
#include "nsIGlobalObject.h"
namespace mozilla {
namespace dom {
class AbortController final : public nsISupports
, public nsWrapperCache
{
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AbortController)
static bool
IsEnabled(JSContext* aCx, JSObject* aGlobal);
static already_AddRefed<AbortController>
Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
explicit AbortController(nsIGlobalObject* aGlobal);
JSObject*
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
nsIGlobalObject*
GetParentObject() const;
AbortSignal*
Signal();
void
Abort();
private:
~AbortController() = default;
nsCOMPtr<nsIGlobalObject> mGlobal;
RefPtr<AbortSignal> mSignal;
bool mAborted;
};
} // dom namespace
} // mozilla namespace
#endif // mozilla_dom_AbortController_h
+124
View File
@@ -0,0 +1,124 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
#include "AbortSignal.h"
#include "AbortController.h"
#include "mozilla/dom/Event.h"
#include "mozilla/dom/AbortSignalBinding.h"
namespace mozilla {
namespace dom {
NS_IMPL_CYCLE_COLLECTION_CLASS(AbortSignal)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AbortSignal,
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mController)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AbortSignal,
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mController)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AbortSignal)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(AbortSignal, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(AbortSignal, DOMEventTargetHelper)
AbortSignal::AbortSignal(AbortController* aController,
bool aAborted)
: DOMEventTargetHelper(aController->GetParentObject())
, mController(aController)
, mAborted(aAborted)
{}
AbortSignal::AbortSignal(bool aAborted)
: mAborted(aAborted)
{}
JSObject*
AbortSignal::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
{
return AbortSignalBinding::Wrap(aCx, this, aGivenProto);
}
bool
AbortSignal::Aborted() const
{
return mAborted;
}
void
AbortSignal::Abort()
{
MOZ_ASSERT(!mAborted);
mAborted = true;
// Let's inform the followers.
for (uint32_t i = 0; i < mFollowers.Length(); ++i) {
mFollowers[i]->Aborted();
}
EventInit init;
init.mBubbles = false;
init.mCancelable = false;
RefPtr<Event> event =
Event::Constructor(this, NS_LITERAL_STRING("abort"), init);
event->SetTrusted(true);
bool dummy;
DispatchEvent(event, &dummy);
}
void
AbortSignal::AddFollower(AbortSignal::Follower* aFollower)
{
MOZ_DIAGNOSTIC_ASSERT(aFollower);
if (!mFollowers.Contains(aFollower)) {
mFollowers.AppendElement(aFollower);
}
}
void
AbortSignal::RemoveFollower(AbortSignal::Follower* aFollower)
{
MOZ_DIAGNOSTIC_ASSERT(aFollower);
mFollowers.RemoveElement(aFollower);
}
// AbortSignal::Follower
// ----------------------------------------------------------------------------
AbortSignal::Follower::~Follower()
{
Unfollow();
}
void
AbortSignal::Follower::Follow(AbortSignal* aSignal)
{
MOZ_DIAGNOSTIC_ASSERT(aSignal);
Unfollow();
mFollowingSignal = aSignal;
aSignal->AddFollower(this);
}
void
AbortSignal::Follower::Unfollow()
{
if (mFollowingSignal) {
mFollowingSignal->RemoveFollower(this);
mFollowingSignal = nullptr;
}
}
} // dom namespace
} // mozilla namespace
+76
View File
@@ -0,0 +1,76 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 mozilla_dom_AbortSignal_h
#define mozilla_dom_AbortSignal_h
#include "mozilla/DOMEventTargetHelper.h"
namespace mozilla {
namespace dom {
class AbortController;
class AbortSignal;
class AbortSignal final : public DOMEventTargetHelper
{
public:
// This class must be implemented by objects who want to follow a AbortSignal.
class Follower
{
public:
virtual void Aborted() = 0;
protected:
virtual ~Follower();
void
Follow(AbortSignal* aSignal);
void
Unfollow();
RefPtr<AbortSignal> mFollowingSignal;
};
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AbortSignal, DOMEventTargetHelper)
AbortSignal(AbortController* aController, bool aAborted);
explicit AbortSignal(bool aAborted);
JSObject*
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
bool
Aborted() const;
void
Abort();
IMPL_EVENT_HANDLER(abort);
void
AddFollower(Follower* aFollower);
void
RemoveFollower(Follower* aFollower);
private:
~AbortSignal() = default;
RefPtr<AbortController> mController;
// Raw pointers. Follower unregisters itself in the DTOR.
nsTArray<Follower*> mFollowers;
bool mAborted;
};
} // dom namespace
} // mozilla namespace
#endif // mozilla_dom_AbortSignal_h
@@ -4,18 +4,23 @@
# 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 += [
'FennecJNINatives.h',
'FennecJNIWrappers.h',
with Files("**"):
BUG_COMPONENT = ("Core", "DOM")
TEST_DIRS += ['tests']
EXPORTS.mozilla.dom += [
'AbortController.h',
'AbortSignal.h',
]
UNIFIED_SOURCES += [
'FennecJNIWrappers.cpp',
'AbortController.cpp',
'AbortSignal.cpp',
]
LOCAL_INCLUDES += [
'../workers',
]
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/widget',
'/widget/android',
]
+113
View File
@@ -0,0 +1,113 @@
<script>
function ok(a, msg) {
parent.postMessage({ type: "check", status: !!a, message: msg }, "*");
}
function is(a, b, msg) {
ok(a === b, msg);
}
function testWebIDL() {
ok("FetchController" in self, "We have a FetchController prototype");
ok("FetchSignal" in self, "We have a FetchSignal prototype");
var fc = new FetchController();
ok(!!fc, "FetchController can be created");
ok(fc instanceof FetchController, "FetchController is a FetchController");
ok(!!fc.signal, "FetchController has a signal");
ok(fc.signal instanceof FetchSignal, "fetchSignal is a FetchSignal");
is(fc.signal.aborted, false, "By default FetchSignal.aborted is false");
next();
}
function testUpdateData() {
var fc = new FetchController();
is(fc.signal.aborted, false, "By default FetchSignal.aborted is false");
fc.abort();
is(fc.signal.aborted, true, "Signal is aborted");
next();
}
function testAbortEvent() {
var fc = new FetchController();
fc.signal.onabort = function(e) {
is(e.type, "abort", "Abort received");
next();
}
fc.abort();
}
function testAbortedFetch() {
var fc = new FetchController();
fc.abort();
fetch('slow.sjs', { signal: fc.signal }).then(() => {
ok(false, "Fetch should not return a resolved promise");
}, e => {
is(e.name, "AbortError", "We have an abort error");
}).then(next);
}
function testFetchAndAbort() {
var fc = new FetchController();
var p = fetch('slow.sjs', { signal: fc.signal });
fc.abort();
p.then(() => {
ok(false, "Fetch should not return a resolved promise");
}, e => {
is(e.name, "AbortError", "We have an abort error");
}).then(next);
}
function testWorkerAbortedFetch() {
var w = new Worker('worker_fetch_controller.js');
w.onmessage = function(e) {
ok(e.data, "Abort + Fetch works in workers");
next();
}
w.postMessage('testWorkerAbortedFetch');
}
function testWorkerFetchAndAbort() {
var w = new Worker('worker_fetch_controller.js');
w.onmessage = function(e) {
ok(e.data, "Abort + Fetch works in workers");
next();
}
w.postMessage('testWorkerFetchAndAbort');
}
var steps = [
// Simple stuff
testWebIDL,
testUpdateData,
// Event propagation
testAbortEvent,
// fetch + signaling
testAbortedFetch,
testFetchAndAbort,
testWorkerAbortedFetch,
testWorkerFetchAndAbort,
];
function next() {
if (!steps.length) {
parent.postMessage({ type: "finish" }, "*");
return;
}
var step = steps.shift();
step();
}
next();
</script>
+6
View File
@@ -0,0 +1,6 @@
[DEFAULT]
support-files =
file_abort_controller.html
worker_fetch_controller.js
[test_abort_controller.html]
@@ -4,4 +4,5 @@
# 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/.
JAR_MANIFESTS += ['jar.mn']
MOCHITEST_MANIFESTS += ['mochitest.ini']
@@ -0,0 +1,40 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!DOCTYPE HTML>
<html>
<head>
<title>Test FetchController</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<script class="testbody" type="text/javascript">
SpecialPowers.pushPrefEnv({"set": [["dom.fetchController.enabled", true ]]}, () => {
let ifr = document.createElement('iframe');
ifr.src = "file_fetch_controller.html";
document.body.appendChild(ifr);
onmessage = function(e) {
if (e.data.type == "finish") {
SimpleTest.finish();
return;
}
if (e.data.type == "check") {
ok(e.data.status, e.data.message);
return;
}
ok(false, "Something when wrong.");
}
});
SimpleTest.waitForExplicitFinish();
</script>
</body>
</html>
@@ -0,0 +1,27 @@
function testWorkerAbortedFetch() {
var fc = new AbortController();
fc.abort();
fetch('slow.sjs', { signal: fc.signal }).then(() => {
postMessage(false);
}, e => {
postMessage(e.name == "AbortError");
});
}
function testWorkerFetchAndAbort() {
var fc = new AbortController();
var p = fetch('slow.sjs', { signal: fc.signal });
fc.abort();
p.then(() => {
postMessage(false);
}, e => {
postMessage(e.name == "AbortError");
});
}
onmessage = function(e) {
self[e.data]();
}
+2
View File
@@ -7,6 +7,8 @@
#ifndef mozilla_AnimationComparator_h
#define mozilla_AnimationComparator_h
#include "mozilla/dom/Animation.h"
namespace mozilla {
// Although this file is called AnimationComparator, we don't actually
@@ -6,6 +6,7 @@
#include "mozilla/dom/AnimationEffectReadOnly.h"
#include "mozilla/dom/AnimationEffectReadOnlyBinding.h"
#include "mozilla/dom/Animation.h"
#include "mozilla/AnimationUtils.h"
#include "mozilla/FloatingPoint.h"
@@ -9,6 +9,9 @@
#include <initializer_list>
#include "mozilla/Maybe.h"
#include "nsTArray.h"
class nsXPIDLString;
namespace mozilla {
+1
View File
@@ -7,6 +7,7 @@
#include "mozilla/dom/CSSPseudoElement.h"
#include "mozilla/dom/CSSPseudoElementBinding.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/KeyframeEffectBinding.h" // for ElementOrCSSPseudoElement class
#include "mozilla/AnimationComparator.h"
namespace mozilla {
+1
View File
@@ -11,6 +11,7 @@
#include "mozilla/dom/AnimationEffectTiming.h"
#include "mozilla/dom/KeyframeEffectBinding.h"
#include "mozilla/KeyframeUtils.h"
#include "nsContentUtils.h"
#include "nsDOMMutationObserver.h" // For nsAutoAnimationMutationBatch
#include "nsIScriptError.h"
+2
View File
@@ -6,6 +6,7 @@
#include "mozilla/dom/KeyframeEffectReadOnly.h"
#include "mozilla/dom/Animation.h"
#include "mozilla/dom/KeyframeAnimationOptionsBinding.h"
// For UnrestrictedDoubleOrKeyframeAnimationOptions;
#include "mozilla/dom/CSSPseudoElement.h"
@@ -25,6 +26,7 @@
#include "nsCSSPseudoElements.h" // For CSSPseudoElementType
#include "nsIPresShell.h"
#include "nsIScriptError.h"
#include "nsRefreshDriver.h"
namespace mozilla {
+5 -2
View File
@@ -37,6 +37,11 @@ EXPORTS.mozilla += [
]
UNIFIED_SOURCES += [
'KeyframeEffect.cpp',
'KeyframeEffectReadOnly.cpp',
]
SOURCES += [
'Animation.cpp',
'AnimationEffectReadOnly.cpp',
'AnimationEffectTiming.cpp',
@@ -50,9 +55,7 @@ UNIFIED_SOURCES += [
'DocumentTimeline.cpp',
'EffectCompositor.cpp',
'EffectSet.cpp',
'KeyframeEffect.cpp',
'KeyframeEffectParams.cpp',
'KeyframeEffectReadOnly.cpp',
'KeyframeUtils.cpp',
'PendingAnimationTracker.cpp',
'TimingParams.cpp',
+2
View File
@@ -8,10 +8,12 @@
#include "mozilla/EventDispatcher.h"
#include "mozilla/dom/ArchiveRequestBinding.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/ScriptSettings.h"
#include "nsContentUtils.h"
using namespace mozilla;
using namespace mozilla::dom;
USING_ARCHIVEREADER_NAMESPACE
+1
View File
@@ -12,6 +12,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/dom/File.h"
using namespace mozilla;
using namespace mozilla::dom;
USING_ARCHIVEREADER_NAMESPACE
+1 -1
View File
@@ -13,7 +13,7 @@ EXPORTS.mozilla.dom.archivereader += [
'ArchiveZipFile.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'ArchiveEvent.cpp',
'ArchiveReader.cpp',
'ArchiveRequest.cpp',
+2 -4
View File
@@ -16,14 +16,12 @@ EXPORTS += [
'AudioChannelService.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'AudioChannelAgent.cpp',
'AudioChannelService.cpp',
]
LOCAL_INCLUDES += [
'/dom/base/',
]
LOCAL_INCLUDES += ['/dom/base/']
include('/ipc/chromium/chromium-config.mozbuild')
+3
View File
@@ -8,6 +8,9 @@
#define mozilla_dom_BlobSet_h
#include "mozilla/RefPtr.h"
#include "jsfriendapi.h"
#include "nsString.h"
#include "nsTArray.h"
namespace mozilla {
namespace dom {
+2
View File
@@ -7,6 +7,8 @@
#ifndef CORSMode_h_
#define CORSMode_h_
#include <stdint.h>
namespace mozilla {
enum CORSMode : uint8_t {
+1
View File
@@ -7,6 +7,7 @@
#include "mozilla/Base64.h"
#include "mozilla/BasePrincipal.h"
#include "jsfriendapi.h"
namespace mozilla {
namespace dom {
+1
View File
@@ -10,6 +10,7 @@
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/ChromeUtilsBinding.h"
#include "mozilla/dom/ThreadSafeChromeUtilsBinding.h"
#include "mozilla/dom/UnionTypes.h"
#include "mozilla/ErrorResult.h"
namespace mozilla {
+6
View File
@@ -7,8 +7,11 @@
#include "mozilla/dom/CustomElementRegistry.h"
#include "mozilla/dom/CustomElementRegistryBinding.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLElementBinding.h"
#include "mozilla/dom/WebComponentsBinding.h"
#include "mozilla/dom/Promise.h"
#include "nsContentUtils.h"
#include "nsIParserService.h"
#include "jsapi.h"
@@ -163,8 +166,11 @@ NS_INTERFACE_MAP_END
/* static */ bool
CustomElementRegistry::IsCustomElementEnabled(JSContext* aCx, JSObject* aObject)
{
return false;
/*
return Preferences::GetBool("dom.webcomponents.customelements.enabled") ||
Preferences::GetBool("dom.webcomponents.enabled");
*/
}
/* static */ already_AddRefed<CustomElementRegistry>
+1
View File
@@ -6,6 +6,7 @@
#include "mozilla/StaticPtr.h"
#include "mozilla/ClearOnShutdown.h"
#include "nsIDocShell.h"
#include "nsNetCID.h"
namespace mozilla {
namespace dom {
+1
View File
@@ -7,6 +7,7 @@
#ifndef DocGroup_h
#define DocGroup_h
#include "nsIDocument.h"
#include "nsISupports.h"
#include "nsISupportsImpl.h"
#include "nsIPrincipal.h"
+1
View File
@@ -8,6 +8,7 @@
#define mozilla_dom_ElementInlines_h
#include "mozilla/dom/Element.h"
#include "nsIContentInlines.h"
#include "nsIDocument.h"
namespace mozilla {
+2
View File
@@ -7,6 +7,8 @@
#ifndef GroupedSHistory_h
#define GroupedSHistory_h
#include "nsCOMArray.h"
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
#include "nsIFrameLoader.h"
#include "nsIGroupedSHistory.h"
#include "nsIPartialSHistory.h"
+2
View File
@@ -8,6 +8,8 @@
* animating */
#include "ImageTracker.h"
#include "mozilla/Preferences.h"
#include "nsAppRunner.h" // for XRE_IsContentProcess
namespace mozilla {
namespace dom {
+1
View File
@@ -10,6 +10,7 @@
#ifndef mozilla_dom_ImageTracker
#define mozilla_dom_ImageTracker
#include "imgIRequest.h"
#include "nsDataHashtable.h"
#include "nsHashKeys.h"
+4 -4
View File
@@ -6,6 +6,7 @@
#include "ImportManager.h"
#include "mozilla/dom/ScriptLoader.h"
#include "mozilla/EventListenerManager.h"
#include "HTMLLinkElement.h"
#include "nsContentPolicyUtils.h"
@@ -18,7 +19,6 @@
#include "nsIDOMEvent.h"
#include "nsIPrincipal.h"
#include "nsIScriptObjectPrincipal.h"
#include "nsScriptLoader.h"
#include "nsNetUtil.h"
//-----------------------------------------------------------------------------
@@ -156,7 +156,7 @@ ImportLoader::Updater::UpdateMainReferrer(uint32_t aNewIdx)
// Our nearest predecessor has changed. So let's add the ScriptLoader to the
// new one if there is any. And remove it from the old one.
RefPtr<ImportManager> manager = mLoader->Manager();
nsScriptLoader* loader = mLoader->mDocument->ScriptLoader();
ScriptLoader* loader = mLoader->mDocument->ScriptLoader();
ImportLoader*& pred = mLoader->mBlockingPredecessor;
ImportLoader* newPred = manager->GetNearestPredecessor(newMainReferrer);
if (pred) {
@@ -339,7 +339,7 @@ ImportLoader::DispatchEventIfFinished(nsINode* aNode)
}
void
ImportLoader::AddBlockedScriptLoader(nsScriptLoader* aScriptLoader)
ImportLoader::AddBlockedScriptLoader(ScriptLoader* aScriptLoader)
{
if (mBlockedScriptLoaders.Contains(aScriptLoader)) {
return;
@@ -352,7 +352,7 @@ ImportLoader::AddBlockedScriptLoader(nsScriptLoader* aScriptLoader)
}
bool
ImportLoader::RemoveBlockedScriptLoader(nsScriptLoader* aScriptLoader)
ImportLoader::RemoveBlockedScriptLoader(ScriptLoader* aScriptLoader)
{
aScriptLoader->RemoveParserBlockingScriptExecutionBlocker();
return mBlockedScriptLoaders.RemoveElement(aScriptLoader);
+4 -4
View File
@@ -45,8 +45,8 @@
#include "nsIStreamListener.h"
#include "nsIWeakReferenceUtils.h"
#include "nsRefPtrHashtable.h"
#include "nsScriptLoader.h"
#include "nsURIHashKey.h"
#include "mozilla/dom/ScriptLoader.h"
class nsIDocument;
class nsIPrincipal;
@@ -184,8 +184,8 @@ public:
// and wait for that to run its scripts. We keep track of all the
// ScriptRunners that are waiting for this import. NOTE: updating
// the main referrer might change this list.
void AddBlockedScriptLoader(nsScriptLoader* aScriptLoader);
bool RemoveBlockedScriptLoader(nsScriptLoader* aScriptLoader);
void AddBlockedScriptLoader(ScriptLoader* aScriptLoader);
bool RemoveBlockedScriptLoader(ScriptLoader* aScriptLoader);
void SetBlockingPredecessor(ImportLoader* aLoader);
private:
@@ -230,7 +230,7 @@ private:
// List of pending ScriptLoaders that are waiting for this import
// to finish.
nsTArray<RefPtr<nsScriptLoader>> mBlockedScriptLoaders;
nsTArray<RefPtr<ScriptLoader>> mBlockedScriptLoaders;
// There is always exactly one referrer link that is flagged as
// the main referrer the primary link. This is the one that is
+1 -1
View File
@@ -32,9 +32,9 @@
#include "mozilla/Likely.h"
#include "nsCycleCollectionParticipant.h"
#include "nsNullPrincipal.h"
#include "ScriptSettings.h"
#include "mozilla/Unused.h"
#include "mozilla/dom/LocationBinding.h"
#include "mozilla/dom/ScriptSettings.h"
namespace mozilla {
namespace dom {
+3
View File
@@ -7,6 +7,9 @@
#ifndef mozilla_dom_MutableBlobStorage_h
#define mozilla_dom_MutableBlobStorage_h
#include "nsCycleCollectionParticipant.h"
#include "nsThreadUtils.h"
#include "nsProxyRelease.h"
#include "mozilla/RefPtr.h"
#include "prio.h"
+1
View File
@@ -5,6 +5,7 @@
#include "MutableBlobStreamListener.h"
#include "MutableBlobStorage.h"
#include "nsIInputStream.h"
namespace mozilla {
namespace dom {
-59
View File
@@ -37,10 +37,7 @@
#include "mozilla/dom/PowerManager.h"
#include "mozilla/dom/WakeLock.h"
#include "mozilla/dom/power/PowerManagerService.h"
#include "mozilla/dom/FlyWebPublishedServer.h"
#include "mozilla/dom/FlyWebService.h"
#include "mozilla/dom/Permissions.h"
#include "mozilla/dom/Presentation.h"
#include "mozilla/dom/ServiceWorkerContainer.h"
#include "mozilla/dom/StorageManager.h"
#include "mozilla/dom/TCPSocket.h"
@@ -67,8 +64,6 @@
#include "nsIAppsService.h"
#include "mozIApplication.h"
#include "WidgetUtils.h"
#include "nsIPresentationService.h"
#include "mozilla/dom/MediaDevices.h"
#include "MediaManager.h"
@@ -218,7 +213,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator)
#ifdef MOZ_EME
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMediaKeySystemAccessManager)
#endif
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPresentation)
#ifdef MOZ_GAMEPAD
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGamepadServiceTest)
#endif
@@ -284,10 +278,6 @@ Navigator::Invalidate()
mTimeManager = nullptr;
}
if (mPresentation) {
mPresentation = nullptr;
}
mServiceWorkerContainer = nullptr;
#ifdef MOZ_EME
@@ -1364,41 +1354,6 @@ Navigator::GetBattery(ErrorResult& aRv)
return mBatteryPromise;
}
already_AddRefed<Promise>
Navigator::PublishServer(const nsAString& aName,
const FlyWebPublishOptions& aOptions,
ErrorResult& aRv)
{
RefPtr<FlyWebService> service = FlyWebService::GetOrCreate();
if (!service) {
aRv.Throw(NS_ERROR_FAILURE);
return nullptr;
}
RefPtr<FlyWebPublishPromise> mozPromise =
service->PublishServer(aName, aOptions, mWindow);
MOZ_ASSERT(mozPromise);
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(mWindow);
ErrorResult result;
RefPtr<Promise> domPromise = Promise::Create(global, result);
if (result.Failed()) {
aRv.Throw(NS_ERROR_FAILURE);
return nullptr;
}
mozPromise->Then(AbstractThread::MainThread(),
__func__,
[domPromise] (FlyWebPublishedServer* aServer) {
domPromise->MaybeResolve(aServer);
},
[domPromise] (nsresult aStatus) {
domPromise->MaybeReject(aStatus);
});
return domPromise.forget();
}
PowerManager*
Navigator::GetMozPower(ErrorResult& aRv)
{
@@ -1931,19 +1886,5 @@ Navigator::RequestMediaKeySystemAccess(const nsAString& aKeySystem,
}
#endif
Presentation*
Navigator::GetPresentation(ErrorResult& aRv)
{
if (!mPresentation) {
if (!mWindow) {
aRv.Throw(NS_ERROR_UNEXPECTED);
return nullptr;
}
mPresentation = Presentation::Create(mWindow);
}
return mPresentation;
}
} // namespace dom
} // namespace mozilla
-9
View File
@@ -39,8 +39,6 @@ class WakeLock;
class ArrayBufferViewOrBlobOrStringOrFormData;
class ServiceWorkerContainer;
class DOMRequest;
struct FlyWebPublishOptions;
struct FlyWebFilter;
} // namespace dom
} // namespace mozilla
@@ -74,7 +72,6 @@ class Connection;
} // namespace network
class PowerManager;
class Presentation;
class LegacyMozTCPSocket;
class StorageManager;
@@ -141,9 +138,6 @@ public:
Geolocation* GetGeolocation(ErrorResult& aRv);
Promise* GetBattery(ErrorResult& aRv);
already_AddRefed<Promise> PublishServer(const nsAString& aName,
const FlyWebPublishOptions& aOptions,
ErrorResult& aRv);
static void AppName(nsAString& aAppName, bool aUsePrefOverriddenValue);
static nsresult GetPlatform(nsAString& aPlatform,
@@ -210,8 +204,6 @@ public:
system::AudioChannelManager* GetMozAudioChannelManager(ErrorResult& aRv);
#endif // MOZ_AUDIO_CHANNEL_MANAGER
Presentation* GetPresentation(ErrorResult& aRv);
bool SendBeacon(const nsAString& aUrl,
const Nullable<ArrayBufferViewOrBlobOrStringOrFormData>& aData,
ErrorResult& aRv);
@@ -288,7 +280,6 @@ private:
RefPtr<time::TimeManager> mTimeManager;
RefPtr<ServiceWorkerContainer> mServiceWorkerContainer;
nsCOMPtr<nsPIDOMWindowInner> mWindow;
RefPtr<Presentation> mPresentation;
#ifdef MOZ_GAMEPAD
RefPtr<GamepadServiceTest> mGamepadServiceTest;
#endif
+1
View File
@@ -15,6 +15,7 @@
#include "mozilla/ArrayUtils.h"
#include "mozilla/Likely.h"
#include "mozilla/Unused.h"
#include "nsNodeInfoManager.h"
#include "nsCOMPtr.h"
+1
View File
@@ -8,6 +8,7 @@
#define mozilla_dom_Pose_h
#include "nsWrapperCache.h"
#include "mozilla/ErrorResult.h"
namespace mozilla {
namespace dom {
+2
View File
@@ -7,10 +7,12 @@
#ifndef TabGroup_h
#define TabGroup_h
#include "nsIDocument.h"
#include "nsISupports.h"
#include "nsISupportsImpl.h"
#include "nsIPrincipal.h"
#include "nsTHashtable.h"
#include "nsHashKeys.h"
#include "nsString.h"
#include "mozilla/RefPtr.h"
+1
View File
@@ -10,6 +10,7 @@
#include "nsIChannel.h"
#include "nsIServiceManager.h"
#include "nsIHttpChannelInternal.h"
#include "nsPIDOMWindow.h"
#include "nsIDOMWindow.h"
#include "nsILoadContext.h"
#include "nsIPrincipal.h"
+1
View File
@@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "TimeoutHandler.h"
#include "nsJSUtils.h"
namespace mozilla {
namespace dom {
+2
View File
@@ -7,9 +7,11 @@
#ifndef mozilla_dom_timeout_handler_h
#define mozilla_dom_timeout_handler_h
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
#include "nsCOMPtr.h"
#include "nsISupports.h"
#include "nsITimeoutHandler.h"
#include "nsString.h"
namespace mozilla {
namespace dom {
+2
View File
@@ -7,6 +7,8 @@
#ifndef TimerClamping_h___
#define TimerClamping_h___
#include <math.h>
namespace mozilla {
class TimerClamping
+2 -9
View File
@@ -26,7 +26,6 @@ XPIDL_SOURCES += [
'nsIObjectLoadingContent.idl',
'nsIRemoteWindowContext.idl',
'nsIScriptChannel.idl',
'nsIScriptLoaderObserver.idl',
'nsISelection.idl',
'nsISelectionController.idl',
'nsISelectionDisplay.idl',
@@ -96,7 +95,6 @@ EXPORTS += [
'nsINode.h',
'nsINodeList.h',
'nsIScriptContext.h',
'nsIScriptElement.h',
'nsIScriptGlobalObject.h',
'nsIScriptNameSpaceManager.h',
'nsIScriptObjectPrincipal.h',
@@ -117,7 +115,6 @@ EXPORTS += [
'nsRange.h',
'nsReferencedElement.h',
'nsSandboxFlags.h',
'nsScriptLoader.h',
'nsStructuredCloneContainer.h',
'nsStubAnimationObserver.h',
'nsStubDocumentObserver.h',
@@ -208,7 +205,6 @@ EXPORTS.mozilla.dom += [
'ResponsiveImageSelector.h',
'SameProcessMessageQueue.h',
'ScreenOrientation.h',
'ScriptSettings.h',
'ShadowRoot.h',
'SimpleTreeIterator.h',
'StructuredCloneHolder.h',
@@ -225,7 +221,7 @@ EXPORTS.mozilla.dom += [
'WindowOrientationObserver.h',
]
UNIFIED_SOURCES += [
SOURCES += [
'AnonymousContent.cpp',
'Attr.cpp',
'BarProps.cpp',
@@ -328,8 +324,6 @@ UNIFIED_SOURCES += [
'nsRange.cpp',
'nsReferencedElement.cpp',
'nsScreen.cpp',
'nsScriptElement.cpp',
'nsScriptLoader.cpp',
'nsScriptNameSpaceManager.cpp',
'nsStructuredCloneContainer.cpp',
'nsStubAnimationObserver.cpp',
@@ -356,7 +350,6 @@ UNIFIED_SOURCES += [
'ResponsiveImageSelector.cpp',
'SameProcessMessageQueue.cpp',
'ScreenOrientation.cpp',
'ScriptSettings.cpp',
'ShadowRoot.cpp',
'StructuredCloneHolder.cpp',
'StyleSheetList.cpp',
@@ -376,7 +369,7 @@ UNIFIED_SOURCES += [
]
if CONFIG['MOZ_WEBRTC']:
UNIFIED_SOURCES += [
SOURCES += [
'nsDOMDataChannel.cpp',
]
+34
View File
@@ -1526,6 +1526,40 @@ nsAttrValue::ParseIntWithFallback(const nsAString& aString, int32_t aDefault,
SetIntValueAndType(val, eInteger, nonStrict ? &aString : nullptr);
}
void
nsAttrValue::ParseClampedNonNegativeInt(const nsAString& aString,
int32_t aDefault, int32_t aMin,
int32_t aMax)
{
ResetIfSet();
nsContentUtils::ParseHTMLIntegerResultFlags result;
int32_t val = nsContentUtils::ParseHTMLInteger(aString, &result);
bool nonStrict = (result & nsContentUtils::eParseHTMLInteger_IsPercent) ||
(result & nsContentUtils::eParseHTMLInteger_NonStandard) ||
(result & nsContentUtils::eParseHTMLInteger_DidNotConsumeAllInput);
if (result & nsContentUtils::eParseHTMLInteger_ErrorOverflow) {
if (result & nsContentUtils::eParseHTMLInteger_Negative) {
val = aDefault;
} else {
val = aMax;
}
nonStrict = true;
} else if ((result & nsContentUtils::eParseHTMLInteger_Error) || val < 0) {
val = aDefault;
nonStrict = true;
} else if (val < aMin) {
val = aMin;
nonStrict = true;
} else if (val > aMax) {
val = aMax;
nonStrict = true;
}
SetIntValueAndType(val, eInteger, nonStrict ? &aString : nullptr);
}
bool
nsAttrValue::ParseNonNegativeIntValue(const nsAString& aString)
{
+13
View File
@@ -362,6 +362,19 @@ public:
*/
bool ParseNonNegativeIntValue(const nsAString& aString);
/**
* Parse a string value into a clamped non-negative integer.
* This method follows the rules for parsing non-negative integer from:
* https://html.spec.whatwg.org/multipage/infrastructure.html#clamped-to-the-range
*
* @param aString the string to parse
* @param aDefault value to return for negative or invalid values
* @param aMin minimum value
* @param aMax maximum value
*/
void ParseClampedNonNegativeInt(const nsAString& aString, int32_t aDefault,
int32_t aMin, int32_t aMax);
/**
* Parse a string value into a positive integer.
* This method follows the rules for parsing non-negative integer from:
+1 -2
View File
@@ -29,9 +29,8 @@
#include "nsIDocument.h"
#include "nsIDOMEvent.h"
#include "nsWeakPtr.h"
#include "ScriptSettings.h"
using mozilla::Unused; // <snicker>
using mozilla::Unused;
using namespace mozilla::dom;
using namespace mozilla;
+1 -1
View File
@@ -10,7 +10,6 @@
*/
#include "nsContentSink.h"
#include "nsScriptLoader.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "mozilla/css/Loader.h"
@@ -49,6 +48,7 @@
#include "nsHTMLDNSPrefetch.h"
#include "nsIObserverService.h"
#include "mozilla/Preferences.h"
#include "mozilla/dom/ScriptLoader.h"
#include "nsParserConstants.h"
#include "nsSandboxFlags.h"
+5 -2
View File
@@ -36,13 +36,16 @@ class nsIAtom;
class nsIChannel;
class nsIContent;
class nsNodeInfoManager;
class nsScriptLoader;
class nsIApplicationCache;
namespace mozilla {
namespace css {
class Loader;
} // namespace css
namespace dom {
class ScriptLoader;
} // namespace dom
} // namespace mozilla
#ifdef DEBUG
@@ -273,7 +276,7 @@ protected:
nsCOMPtr<nsIDocShell> mDocShell;
RefPtr<mozilla::css::Loader> mCSSLoader;
RefPtr<nsNodeInfoManager> mNodeInfoManager;
RefPtr<nsScriptLoader> mScriptLoader;
RefPtr<mozilla::dom::ScriptLoader> mScriptLoader;
// back off timer notification after count
int32_t mBackoffCount;
+1
View File
@@ -1080,6 +1080,7 @@ nsContentUtils::ParseHTMLInteger(const nsAString& aValue,
int sign = 1;
if (*iter == char16_t('-')) {
sign = -1;
result |= eParseHTMLInteger_Negative;
++iter;
} else if (*iter == char16_t('+')) {
result |= eParseHTMLInteger_NonStandard;
+3 -1
View File
@@ -444,7 +444,9 @@ public:
// Set if one or more error flags were set.
eParseHTMLInteger_Error = 1 << 3,
eParseHTMLInteger_ErrorNoValue = 1 << 4,
eParseHTMLInteger_ErrorOverflow = 1 << 5
eParseHTMLInteger_ErrorOverflow = 1 << 5,
// Use this flag to detect the difference between overflow and underflow
eParseHTMLInteger_Negative = 1 << 6,
};
static int32_t ParseHTMLInteger(const nsAString& aValue,
ParseHTMLIntegerResultFlags *aResult);
+4
View File
@@ -7,6 +7,7 @@
#include "nsDOMMutationObserver.h"
#include "mozilla/AnimationTarget.h"
#include "mozilla/CycleCollectedJSContext.h"
#include "mozilla/Maybe.h"
#include "mozilla/OwningNonNull.h"
@@ -29,6 +30,9 @@ using mozilla::dom::TreeOrderComparator;
using mozilla::dom::Animation;
using mozilla::dom::Element;
using namespace mozilla;
using namespace mozilla::dom;
AutoTArray<RefPtr<nsDOMMutationObserver>, 4>*
nsDOMMutationObserver::sScheduledMutationObservers = nullptr;
+2 -1
View File
@@ -3577,7 +3577,8 @@ nsDOMWindowUtils::IsNodeDisabledForEvents(nsIDOMNode* aNode, bool* aRetVal)
while (node) {
if (node->IsNodeOfType(nsINode::eHTML_FORM_CONTROL)) {
nsCOMPtr<nsIFormControl> fc = do_QueryInterface(node);
if (fc && fc->IsDisabledForEvents(eVoidEvent)) {
WidgetEvent event(true, eVoidEvent);
if (fc && fc->IsDisabledForEvents(&event)) {
*aRetVal = true;
break;
}
+10 -17
View File
@@ -166,7 +166,6 @@
#include "mozilla/dom/HTMLIFrameElement.h"
#include "mozilla/dom/HTMLImageElement.h"
#include "mozilla/dom/MediaSource.h"
#include "mozilla/dom/FlyWebService.h"
#include "mozAutoDocUpdate.h"
#include "nsGlobalWindow.h"
@@ -1881,7 +1880,7 @@ nsDocument::Init()
mScopeObject = do_GetWeakReference(global);
MOZ_ASSERT(mScopeObject);
mScriptLoader = new nsScriptLoader(this);
mScriptLoader = new dom::ScriptLoader(this);
mozilla::HoldJSObjects(this);
@@ -4686,7 +4685,7 @@ nsDocument::GetWindowInternal() const
return win;
}
nsScriptLoader*
ScriptLoader*
nsDocument::ScriptLoader()
{
return mScriptLoader;
@@ -5710,9 +5709,9 @@ nsDocument::IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject)
{
JS::Rooted<JSObject*> obj(aCx, aObject);
if (Preferences::GetBool("dom.webcomponents.enabled")) {
return true;
}
//if (Preferences::GetBool("dom.webcomponents.enabled")) {
// return true;
//}
// Check for the webcomponents permission. See Bug 1181555.
JSAutoCompartment ac(aCx, obj);
@@ -5726,9 +5725,9 @@ nsDocument::IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject)
bool
nsDocument::IsWebComponentsEnabled(dom::NodeInfo* aNodeInfo)
{
if (Preferences::GetBool("dom.webcomponents.enabled")) {
return true;
}
//if (Preferences::GetBool("dom.webcomponents.enabled")) {
// return true;
//}
nsIDocument* doc = aNodeInfo->GetDocument();
// Use GetScopeObject() here so that data documents work the same way as the
@@ -5741,6 +5740,7 @@ nsDocument::IsWebComponentsEnabled(dom::NodeInfo* aNodeInfo)
bool
nsDocument::IsWebComponentsEnabled(nsPIDOMWindowInner* aWindow)
{
/*
if (aWindow) {
nsresult rv;
nsCOMPtr<nsIPermissionManager> permMgr =
@@ -5754,7 +5754,7 @@ nsDocument::IsWebComponentsEnabled(nsPIDOMWindowInner* aWindow)
return perm == nsIPermissionManager::ALLOW_ACTION;
}
*/
return false;
}
@@ -8369,13 +8369,6 @@ nsDocument::CanSavePresentation(nsIRequest *aNewRequest)
return false;
}
// Don't save presentation if there are active FlyWeb connections or FlyWeb
// servers.
FlyWebService* flyWebService = FlyWebService::GetExisting();
if (flyWebService && flyWebService->HasConnectionOrServer(win->WindowID())) {
return false;
}
if (mSubDocuments) {
for (auto iter = mSubDocuments->Iter(); !iter.Done(); iter.Next()) {
auto entry = static_cast<SubDocMapEntry*>(iter.Get());
Loaded 100 of 5762 files, more files were not shown because too many files have changed in this diff. Show more