Commit graph

377 commits

Author SHA1 Message Date
wolfbeast
9a4b847b7e Consider domain when deciding on inner window reuse. 2019-07-19 10:04:47 +08:00
win7-7
ffb2d9d791 Dispatch a PluginRemoved event for actual plugins, not images/unknown/iframe-type <objects>
If a page uses or removes many <object> elements which are not actually plugins, loading the page goes to a crawl because UXP recalculates the plugin UI every time.

Only dispatch a PluginRemoved event for actual plugins.
2019-07-19 10:04:08 +08:00
win7-7
922e819d1c Attach FrameProperties to each frame instead of using a shared hashtable
Dispense the shared hashtable and instead attach the frame property list directly to nsIFrame.
2019-07-05 21:32:14 +08:00
win7-7
53acd97766 NodeInfoManager should use a local cache
issue #1111
2019-05-31 07:19:14 +08:00
win7-7
f7def6729d change for nsNodeInfoManager.cpp
based to patch for https://bugzilla.mozilla.org/show_bug.cgi?id=1352235 v1 add main thread only cache.
2019-05-31 07:18:03 +08:00
win7-7
37870c0ff2 Add missing NS_AtomizeMainThread(nameToUse);
nsCOMPtr<nsIAtom> nameAtom = NS_AtomizeMainThread(nameToUse);
2019-05-31 07:17:59 +08:00
win7-7
c4af2549b2 add main thread only cache for nsIAtoms to speed up atomization dom/base
add main thread only cache for nsIAtoms to speed up atomization
2019-05-31 07:17:44 +08:00
Gaming4JC
4ab1401ee6 Issue #1102 - Disable <meta http-equiv=set-cookie>
Create a new pref 'dom.meta-set-cookie.enabled' which is set to 'false', disabling http-equiv meta cookies.
2019-05-31 07:17:21 +08:00
wolfbeast
78b6f639b2 Map IntersectionObserver rect to the correct viewport.
targetFrame is modified during the intersection computation loop, so
it's not the viewport you want if there are scrollframes around.
This bug triggers when IntersectionObservers are used on frames that
wrap.

Follow-up for #249.
2019-05-17 22:17:16 +08:00
wolfbeast
e3827df1a0 Capture delayed events and cancel as necessary.
Tag #1052
2019-04-27 08:56:22 +08:00
Matt A. Tobin
97059c1b48 Issue #1053 - Drop support Android and remove Fennec - Part 1b: Remove MOZ_FENNEC 2019-04-27 08:51:55 +08:00
wolfbeast
02260b18f3 Remove AIX VisualAge C++ compiler bug workaround.
Tag #186
2019-04-04 20:26:36 +08:00
wolfbeast
78d61fd2b1 Issue #187: Remove solaris conditional code. 2019-04-04 20:26:26 +08:00
wolfbeast
24fda598ca Allow empty string on location.search setter.
Fixes #970.
2019-02-16 00:28:18 +08:00
wolfbeast
a7680e43ed Revert "Increase purple limit triggers for CC."
This reverts commit babedf6c696f88734e59b63d0c6614962cc57519.
2019-02-16 00:28:13 +08:00
Andrew McCreight
7b5e5f85de Increase slice time for longer running CCs.
If a CC takes too long (around 50 slices) or gets interrupted by a GC,
we have to finish it synchronously, which can cause a big pause.
This patch tries to avoid that by eagerly increasing the slice budget
the longer a CC goes on. It linearly increases the slice time from 5ms
to 40ms as we approach the halfway point of a CC (1 second), matching
GC pauses, and then leaves it at 40ms.
2019-02-16 00:27:52 +08:00
wolfbeast
6cba36850f Increase purple limit triggers for CC.
Making these much larger to allow more purple buffer buildup
and prevent overzealous cycle collection on purple buffer pressure.
2019-02-16 00:27:50 +08:00
wolfbeast
39d5eb7759 Remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS 2019-02-16 00:27:49 +08:00
wolfbeast
e015efb999 Consolidate tracing and traversing. 2019-02-16 00:27:47 +08:00
wolfbeast
7798af3c14 Actually unlink targets from registered intersection observers.
When a node is released/removed, and it has an intersection observer
attached to it, that observer should be unlinked at the time of release.

This resolves #935.
2019-02-16 00:24:29 +08:00
wolfbeast
dc2cf8544d Rewrite IntersectionObserver list handling to be more robust.
Tag #935.
2019-02-16 00:24:21 +08:00
wolfbeast
9222116f26 Add isIntersecting property to IntersectionObserverEntry.
Per updated spec.

This resolves the issue raised in #249.
2019-02-16 00:24:20 +08:00
adeshkp
aea50f182f Telemetry: Remove stubs and related code 2019-02-16 00:24:04 +08:00
wolfbeast
14ea8bb121 Align Element.ScrollIntoView() with the spec.
This also removes the (unused) shadow alias from nsIDOMHTMLElement
which used the different calling convention.

This resolves #927
2019-02-16 00:24:00 +08:00
wolfbeast
304984a6aa Fix crashiness of IntersectionObservers.
Mozilla hashtables -still- suck.
2019-02-16 00:23:05 +08:00
wolfbeast
d76f949502 [intersection-observer] Calculate areas using int64_t.
Tag #249
2019-02-16 00:23:00 +08:00
wolfbeast
f82da789c8 Fix singed/unsigned type confusion for intersection threshold.
Tag #249
2019-02-16 00:22:59 +08:00
wolfbeast
d3a8693d52 Use content area as the intersection rectangle ...
... for custom root with overflow clip.
Tag #249
2019-02-16 00:22:57 +08:00
wolfbeast
475d865c14 Map intersectionRect to the coordinate space of the target document.
Spec says: "Map intersectionRect to the coordinate space of the
viewport of the Document containing the target."
Tag #249
2019-02-16 00:22:56 +08:00
wolfbeast
52f04699c0 Use targetFrame->GetRectRelativeToSelf() as the initial intersection rect.
Tag #249.
2019-02-16 00:22:54 +08:00
wolfbeast
47f52cee1f Intersection ratio should be 1.0 for zero-area intersections.
Tag #249
2019-02-16 00:22:53 +08:00
wolfbeast
42d9f2ffb3 Revise lifetime management of IntersectionObservers.
Tag #249
2019-02-16 00:22:51 +08:00
wolfbeast
4aacec4782 Issue #910 part 3. Throw SyntaxError from Location::SetProtocol on URI parse failures. 2019-02-16 00:22:31 +08:00
wolfbeast
a6eab2d84e Issue #910 part 2. Strip ':' and anything following it from the string passed to the location.protocol setter. 2019-02-16 00:22:29 +08:00
wolfbeast
32eb361301 Issue #910 part 1. Don't navigate when location.protocol is set to anything other than http or https. 2019-02-16 00:22:28 +08:00
wolfbeast
27d88fc505 Do not report resource-timing subdocument loads triggered by that subdocument. 2019-02-16 00:22:18 +08:00
wolfbeast
9b1124ccbd Remove VR hardware support.
This resolves #881
2019-02-16 00:20:27 +08:00
wolfbeast
b32338ed19 Tell the cycle collector about nsScriptLoadRequest::mElement.
Not doing this can cause a leak because there is a cycle between the load request and the script element.
2019-02-16 00:19:31 +08:00
wolfbeast
6e25ae612a Fix build bustage.
Tag #871
2019-02-16 00:19:29 +08:00
wolfbeast
a30b6ee962 Split the content viewer marking function in CCUncollectable out,
so a document-based marking function can be used separately.

Tag #871
2019-02-16 00:19:25 +08:00
wolfbeast
b7a342f120 Ensure user input suppression works correctly even after document.open. 2019-02-16 00:18:43 +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
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
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