Commit graph

286 commits

Author SHA1 Message Date
wolfbeast
4b0b628cdd Remove IndexedDB for content pref.
Tag Issue #765
2019-02-16 00:14:34 +08:00
Gaming4JC
30797d4da8 backport mozbug 1334776 - CVE-2017-7797 Header name interning leaks across origins
Potential attack: session supercookie.

[Moz Notes](https://bugzilla.mozilla.org/show_bug.cgi?id=1334776#c5):
"The problem is that for unknown header names we store the first one we see and then later we case-insensitively match against that name *globally*. That means you can track if a user agent has already seen a certain header name used (by using a different casing and observing whether it gets normalized). This would allow you to see if a user has used a sensitive service that uses custom header names, or allows you to track a user across sites, by teaching the browser about a certain header case once and then observing if different casings get normalized to that.

What we should do instead is only store the casing for a header name for each header list and not globally. That way it only leaks where it's expected (and necessary) to leak."

[Moz fix note](https://bugzilla.mozilla.org/show_bug.cgi?id=1334776#c8):
"nsHttpAtom now holds the old nsHttpAtom and a string that is case sensitive (only for not standard headers).
So nsHttpAtom holds a pointer to a header name. (header names are store on a static structure). This is how it used to be. I left that part the same but added a nsCString which holds a string that was used to resoled the header name. So when we parse headers we call ResolveHeader with a char*. If it is a new header name the char* will be stored in a HttpHeapAtom, nsHttpAtom::_val will point to HttpHeapAtom::value and the same strings will be stored in mLocalCaseSensitiveHeader. For the first resolve request they will be the same but for the following maybe not. At the end this nsHttpAtom will be stored in nsHttpHeaderArray. For all operation we will used the old char* except when we are returning it to a script using VisitHeaders."
2019-02-16 00:14:28 +08:00
wolfbeast
5a03a408a8 Send worker-runnables destined for the main thread actually to the main thread.
A case of "one queue too many" here. Instead of worker runnables being sent to the main thread
where they are supposed to run, they are put in a task queue per-worker. This is devastating
for performance if many workers are running.
2019-02-16 00:14:03 +08:00
wolfbeast
73b9f505a1 Stop using the worker MainThreadTaskQueue from dom/fetch. 2019-02-16 00:14:01 +08:00
wolfbeast
3b98b8ca9a Stop using the MainThreadTaskQueue from service workers. 2019-02-16 00:14:00 +08:00
wolfbeast
ee1233bb0c Fix wrong SVG sizes with non-integer values for viewBox width/height.
Includes a standalone reftest.
2019-02-16 00:13:43 +08:00
wolfbeast
eff8a32348 Fix clang build bustage.
Follow-up to 9830cd079d8306abc223461190553af64b6fd0ca
2019-02-16 00:13:40 +08:00
wolfbeast
2f2751e46c Bug 1466991 - Part 2: Reparent nodes when they start being in the XBL scope. 2019-02-16 00:13:24 +08:00
wolfbeast
34f16bf61c Bug 1466991 - Part 1: Factor out ShouldUseXBLScope. 2019-02-16 00:13:22 +08:00
wolfbeast
44998d1f5b Bug 1472925 - Keep a strong reference to MediaStreamGraph from GraphDriver. 2019-02-16 00:13:21 +08:00
wolfbeast
c858b4cc75 Fix build bustage in cbfef7fcdb853916ff04015f6ee2d4b86f424a08
- imageDetails.format() needs a cast to SurfaceFormat
- style nit: wrap long lines.
2019-02-16 00:13:18 +08:00
wolfbeast
f3a19b8e9b Release mapped surface memory on size check failure to plug a leak. 2019-02-16 00:13:16 +08:00
wolfbeast
918ef0183a Move surface data checking to a separate function to make it less "totally nuts" 2019-02-16 00:13:15 +08:00
trav90
fb3d16e2db RTCCertificate.cpp: output truncated before the last format character
Fixes compiler warnings when building with GCC 7+
2019-02-16 00:12:49 +08:00
wolfbeast
b51651f769 Part 1. Duplicate IsLocalRefURL to nsContentUtils to reuse this function.
`IsLocalRefURL` is originally designed to be used by URLValue only.
Since we need this function in SVGUseElement::LookupHref too, duplicate it to nsContentUtils as a util function.
This is a duplication because CSSValue uses stringbuffers and not nsStrings.
While Bug 1356060 - "Just use nsString in URLValueData" converts this use from stringbuffer to nsString, it builds on a bunch of vartype refactoring (nsString vs. nsAString, etc.) which is too much of a headache to deal with just to deduplicate this simple function.
2019-02-16 00:12:41 +08:00
wolfbeast
5cc1408b3d Revert "Part 1. Move IsLocalRefURL to nsContentUtils to reuse this function. (port-rewrite)"
This reverts commit 19f010c62022e269f99066a8d90e3522fe31adaf.
2019-02-16 00:12:40 +08:00
Moonchild
49fc92f4a1 Bug 1357432 (#750)
* Part 1. Move IsLocalRefURL to nsContentUtils to reuse this function. (port-rewrite)

`IsLocalRefURL` is originally designed to be used by URLValue only.
Since we need this function in SVGUseElement::LookupHref too, move it to nsContentUtils as a util function.

* Revert "Part 1. Move IsLocalRefURL to nsContentUtils to reuse this function. (port-rewrite)"

This reverts commit 19f010c62022e269f99066a8d90e3522fe31adaf.

* Part 1. Duplicate IsLocalRefURL to nsContentUtils to reuse this function.

`IsLocalRefURL` is originally designed to be used by URLValue only.
Since we need this function in SVGUseElement::LookupHref too, duplicate it to nsContentUtils as a util function.
This is a duplication because CSSValue uses stringbuffers and not nsStrings.
While Bug 1356060 - "Just use nsString in URLValueData" converts this use from stringbuffer to nsString, it builds on a bunch of vartype refactoring (nsString vs. nsAString, etc.) which is too much of a headache to deal with just to deduplicate this simple function.

* Part 2. Implement nsSVGEffects::GetBaseURLForLocalRef to export local-ref-url-resolving logic.

ResolveURLUsingLocalRef is designed to be internally used by nsSVGEffects::Get-{SVGEffect}-URI functions.
Since we also need it in SVGUseElement::LookupHref, make it public in nsSVGEffects.

* Part 3. Resolve local-ref in SVGUseElement::LookupHref by nsSVGEffects::GetBaseURLForLocalRef.

* Part 4. Reftest for using local-ref as xlink:href value.
2019-02-16 00:12:35 +08:00
wolfbeast
ad782894c8 Remove all C++ telemetry autotimers 2019-02-16 00:12:34 +08:00
wolfbeast
8c8145e620 Remove all C++ Telemetry Accumulation calls.
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables).
Stub resolution/removal should be a follow-up to this.
2019-02-16 00:12:32 +08:00
wolfbeast
e2e197cada Remove support for TLS session caches in TLSServerSocket.
This resolves #738
2019-02-16 00:12:22 +08:00
wolfbeast
a7ef78cf06 Add missing } 2019-02-16 00:12:06 +08:00
wolfbeast
4932cf3ea0 Add a horizontal scroll action option for mouse wheel.
Resolves #732
2019-02-16 00:12:03 +08:00
wolfbeast
9531d12c10 Re-implement custom background color of standalone images.
This resolves #717.

Note: this does not affect other applications because the platform
default is to use the "darknoise" background image for standalone
image, which effectively overrides a bg color.
2019-02-16 00:11:44 +08:00
trav90
bfdfd654bf memset only the underlying vector from the Array container 2019-02-16 00:11:32 +08:00
trav90
8fd121628a Remove the const to fix the -Wignored-qualifiers warning with GCC 8 (Part 2) 2019-02-16 00:11:03 +08:00
trav90
a52bf9e82b Remove the const to fix the -Wignored-qualifiers warning with GCC 8 2019-02-16 00:10:59 +08:00
SpockMan02
d330e7e8fc Issue #686: Un-deprecate the Application Cache API 2019-02-16 00:10:43 +08:00
janekptacijarabaci
acb5d5839b Fixed misleading console error message for multiple CORS headers 2019-02-16 00:10:27 +08:00
janekptacijarabaci
43c36e207f Bug 1335296 - Expand about:support WebGL information 2019-02-16 00:10:19 +08:00
trav90
a20d2c6462 [EME] Add support for sbgp and sgpd boxes occuring in the sampletable 2019-02-16 00:10:03 +08:00
trav90
1ce79cb51e [EME] Add support for sbgp and sgpd boxes in the traf box 2019-02-16 00:10:01 +08:00
janekptacijarabaci
d75c4a5956 Bug 819475 - Make document.domain non-nullable 2019-02-16 00:09:14 +08:00
janekptacijarabaci
cbb7e5262c Bug 1351193 - Update tests 2019-02-16 00:09:13 +08:00
janekptacijarabaci
6e67c59787 Bug 1351193 - Added new DataTransfer constructor 2019-02-16 00:09:11 +08:00
janekptacijarabaci
8714f52f69 DOM - Element - add support for Element.toggleAttribute() 2019-02-16 00:08:52 +08:00
janekptacijarabaci
d57aa4fc94 Fix Build Bustage - with "--enable-debug" 2019-02-16 00:08:38 +08:00
janekptacijarabaci
731b3ea7ee Bug 1346501. Remove mFrameCreateCalled from nsImageLoadingContent, it is now unused 2019-02-16 00:08:32 +08:00
janekptacijarabaci
ece6d716f4 Bug 1346501. Don't mark every image as visible when a frame is created for it 2019-02-16 00:08:30 +08:00
wolfbeast
bdf323b915 Fix incorrect namespace use. 2019-02-16 00:08:25 +08:00
wolfbeast
49a6e3921a Switch from ShCompileOptions to int. 2019-02-16 00:08:23 +08:00
wolfbeast
33bbcf8110 Restore emulated functions for OS X 10.8/10.7 2019-02-16 00:08:22 +08:00
janekptacijarabaci
59321284d8 Add event.srcElement (the alias for event.target)
Issue #622
2019-02-16 00:08:17 +08:00
wolfbeast
9949bc6c34 Make the page visibility API pref-controlled.
This resolves #607.
2019-02-16 00:07:51 +08:00
janekptacijarabaci
8800e388b3 Bug 1331564 - XHR SyncTeardownRunnable must run also when the worker is in killing state 2019-02-16 00:07:47 +08:00
janekptacijarabaci
56c088c2d4 Bug 1298823 - Fix Request constructor - with "mode: navigate" 2019-02-16 00:07:45 +08:00
janekptacijarabaci
98546534b0 Bug 604026 - Sync event loops in workers should be created only if compatible with the worker shutdown status 2019-02-16 00:07:43 +08:00
janekptacijarabaci
df880ae53f nsIContentPolicy::TYPE_DOCUMENT - Use "aLoadInfo->ContextForTopLevelLoad()" instead of "aLoadInfo->LoadingNode()"
Issue #600
2019-02-16 00:07:41 +08:00
wolfbeast
d37f6a30b3 Clamp resolution in PerformanceNavigationTiming. 2019-02-16 00:07:11 +08:00
Kyle Machulis
152f93be21 Bug 1436241 - Check redirect status code before forwarding to NPAPI. r=jimm, r=pauljt, a=jcristau
NPAPI may handle a 307 redirect across different origins, while they
should only happen on same origin requests. Have the browser check
this before forwarding to NPAPI.
2019-02-16 00:07:02 +08:00
Byron Campen [:bwc]
03766e63da Bug 1464079 - Bring ICE connection state change callback up to spec. r=jib, a=RyanVM 2019-02-16 00:06:55 +08:00