Граф коммитов

4812 Коммитов

Автор SHA1 Сообщение Дата
Yoshi Huang abec4b9645 Bug 1380263 - data: URI should inherit origin attributes. r=smaug 2017-07-19 14:41:40 +08:00
Boris Zbarsky 8fd50f23d4 Bug 1379762 part 2. Use a more reliable test to figure out when we can skip firing onload in nsDocumentViewer::LoadComplete. r=smaug
Unfortunately, GetRestoringDocument can be false by the time we reach
LoadComplete, if part of the restoration process managed to set up and then
remove onload blockers.  If that happens, we still don't want to fire a load
event for a document that has already has one fired.

Note that we could also use a boolean on the document to record whether we've
fired a load event, as long as we were careful to unset it when the readyState
transitions backwards from COMPLETE (e.g. document.open).  It's not clear which
approach is more robust.
2017-07-17 23:21:41 -04:00
Boris Zbarsky 24a1bc48da Bug 1379762 part 1. Don't call MediaFeaturesChanged if our override device pixel ratio is set to its current value. r=dbaron 2017-07-17 23:21:41 -04:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Junior Hsu ab6f1793a2 Bug 1373198 - Part 8: disable rcwn for dom mochitest tests which require deterministic cache behavior, r=smaug 2017-07-11 20:11:00 +02:00
Junior Hsu daf1b50996 Bug 1373198 - Part 3-1: disable rcwn for dom mochitest tests which require deterministic cache behavior, r=bz 2017-07-11 02:04:00 +02:00
Yoshi Huang 94d1d69dc1 Bug 1373513 - Part 1: data:image, data:css, and data:fonts should be same origin. r=smaug
For font-face
https://drafts.csswg.org/css-fonts-3/#font-fetching-requirements

/* data url's with no redirects are treated as same origin */
src: url("data:application/font-woff;base64,...");

For image
https://html.spec.whatwg.org/multipage/images.html#updating-the-image-data
Step 12
 Fetch request. Let this instance of the fetching algorithm be
associated with image request.

This will go to Fetch spec then.

For <link rel="stylesheet" href="data:text/css" ...>
https://html.spec.whatwg.org/multipage/semantics.html#obtaining-a-resource-from-a-link-element
Step 10
Fetch request.

This will also go to Fetch spec then.

[Fetch] specification,
https://fetch.spec.whatwg.org/#main-fetch, step 12,
request’s current url’s scheme is "data"
1. Set request’s response tainting to "basic".

And from
https://html.spec.whatwg.org/multipage/urls-and-fetching.html#terminology-3
A response whose type is "basic", "cors", or "default" is
CORS-same-origin.

For subresource loading using data: URI, it should be treated as same
origin.
2017-07-12 11:00:13 +08:00
Yoshi Huang 71b8c7686e Bug 1377492 - fix mochitest-1 failure in docshell when data: URI is a unique origin. r=smaug
When we turn on the pref security.data_uri.unique_opaque_origin to make
data URI is unique origin, the following tests will fail because now
data document is treated as cross origin, so we replace data URIs with
seperate files, hence it will still in the same origin.
2017-07-12 10:35:54 +08:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
J. Ryan Stinnett 9679cb9dce Bug 1371457 - Change restyle marker data to animation state. r=bholley,gregtatum
Stylo doesn't have a good equivalent for restyle hints to expose in markers and
the ones exposed for Gecko aren't very accurate either, so we don't want to
expose the restyle hint anymore.

At the same time, several animation restyle tests currently use the hint inside
the marker to check when animation-only restyles have happened.  We can preserve
this by changing the data inside the marker to be a flag for whether the restyle
is animation only, which we know for both Gecko and Stylo.

MozReview-Commit-ID: 8L8KU8Ush7P

--HG--
extra : rebase_source : 4eef80653c1ef79ee1539d27fe6a70fbfaf441ad
2017-06-28 11:59:28 -07:00
Yoshi Huang c6b138004a Bug 1376592 - rewrite test_triggeringprincipal_window_open.html. r=ckerschb
See the test in
http://searchfox.org/mozilla-central/rev/fdb811340ac4e6b93703d72ee99217f3b1d250ac/docshell/test/navigation/test_triggeringprincipal_window_open.html#59

If we turn on the pref, dataWin.onload won't be called as now dataWin is
cross origin, so we change it to use postMessage instead.
2017-06-30 11:06:17 -07:00
Masatoshi Kimura 68794e5c6e Bug 1376164 - Turn nsDocumentViewer::mHintCharset and mForceCharacterSet into const mozilla::Encoding*. r=hsivonen
MozReview-Commit-ID: HTi2eNwDH99

--HG--
extra : rebase_source : 13c702981c188a395b6026883c3731e816f55240
2017-06-25 22:46:08 +09:00
Carsten "Tomcat" Book 4e00eff077 merge mozilla-inbound to mozilla-central a=merge 2017-06-27 10:56:41 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Masatoshi Kimura b515c9c804 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : fdae0046f882d47fb539a7f882364e5c5caafdcd
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Florian Quèze 2924991bf6 Bug 1368456 - remove Promise.jsm imports in tests, r=mconley. 2017-06-23 11:25:52 +02:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Samael Wang eaa22c46f8 Bug 1373604 - Only try to switch focus to targetDocShell if the load succeeds. r=smaug
MozReview-Commit-ID: H1TsRcbagg4
2017-06-21 14:54:15 +08:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Carsten "Tomcat" Book 013fb0680e merge mozilla-inbound to mozilla-central a=merge 2017-06-20 11:26:40 +02:00
Hiroyuki Ikezoe 954618ad23 Bug 1362903 - Use reftest-wait to ensure this test finishes. r=smaug
This prevents a subsequent test from being started before this test is finished.

MozReview-Commit-ID: FPgVVMk6qeC

--HG--
extra : rebase_source : 5789af451fe67660f66e8bc0dc0b5dc709918db0
2017-06-19 11:34:15 +09:00
Honza Bambas 9e38f7b8fc Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz, r=mikedeboer
--HG--
extra : rebase_source : c9690f4b8decd39a10da676bd50ec09cb2ad8892
2017-05-30 18:07:59 +02:00
Kate McKinley 396962011a Bug 1363546 - Store and report HSTS upgrade source r=francois,keeler,mayhemer p=francois
Add a field to the HSTS cache which indicates the source of the HSTS
entry if known, from the preload list, organically seen header, or HSTS
priming, or unknown otherwise. Also adds telemetry to collect the source
when upgrading in NS_ShouldSecureUpgrade.

MozReview-Commit-ID: 3IwyYe3Cn73

--HG--
extra : rebase_source : 9b8daac3aa02bd7a1b4285fb1e5731a817a76b7f
2017-05-23 15:31:37 -07:00
Christoph Kerschbaumer 829704554e Bug 1370788 - Move XFO out of nsDSURIContentListener.cpp into dom/security. r=smaug 2017-06-19 06:59:44 +02:00
Masatoshi Kimura 838ccc4108 Bug 1369025 - Remove mozilla::dom::EncodingUtils. r=hsivonen
MozReview-Commit-ID: 5O5WtxbmATQ

--HG--
rename : dom/encoding/encodingsgroups.properties => intl/locale/encodingsgroups.properties
extra : rebase_source : 13143b43ee745b618e05ed1b6991d69781c2767d
2017-06-17 11:54:40 +09:00
Henri Sivonen 432653453a Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor.
MozReview-Commit-ID: 15Y5GTX98bv
2017-06-13 13:23:23 +03:00
Christoph Kerschbaumer 632fd14dfa Bug 1024557 - Ignore x-frame-options if CSP with frame-ancestors exists. r=smaug 2017-06-07 21:17:49 +02:00
Christoph Kerschbaumer 86374cab11 Bug 1369014: Do not pass explicitly pass a triggeringPrincipal within nsDocShellTreeOwner::HandleEvent. r=smaug
--HG--
extra : rebase_source : 832b69c0edec7f004afdf410e231adb660df0769
2017-06-07 14:25:46 +02:00
Marco Bonardo dd81367ed0 Bug 1337858 - Replace CopyFavicon in the Docshell with a proper favicons API. r=standard8
MozReview-Commit-ID: 8wjSbj0FTwE

--HG--
extra : rebase_source : 9957affac43f7e04dcd94d2fa9cf2d973cd327de
2017-05-18 16:48:23 +02:00
Geoff Brown c353084858 Bug 1333702 - Allow assertion in test_bug385434.html; r=jmaher
Intermittent assertions observed for several months.
2017-06-02 08:46:06 -06:00
Ben Kelly e89c30f6c4 Bug 1363829 P9 Make docshell chrome tests wait for next paint to avoid races. r=smaug 2017-05-31 17:13:19 -07:00
Christoph Kerschbaumer d0c653622f Bug 1357386: Gather telemetry for toplevel data: URI loads. r=dveditz,francois 2017-05-31 20:24:17 +02:00
Christoph Kerschbaumer 3fc12a8c6e Bug 1363977 - Have loadTabs() provide the correct triggeringPrincipal. r=gijs,smaug 2017-05-29 21:32:21 +02:00
Carsten "Tomcat" Book bdfe9a25bf Backed out changeset 2b92af4575ae (bug 1357386) 2017-05-30 08:51:22 +02:00
Christoph Kerschbaumer 74a7c96cd0 Bug 1357386: Have loadTabs() provide the correct triggeringPrincipal. r=gijs,smaug 2017-05-30 08:31:08 +02:00
Julian Descottes c1a123b391 Bug 1363327 - remove unused config variable MOZ_DEVTOOLS_ALL;r=ochameau
The variable MOZ_DEVTOOLS_ALL was only used in order to register about:debugging and should
no longer be needed.

MozReview-Commit-ID: 16di87Cad2n

--HG--
extra : rebase_source : 19be6ea118c00293e36b4a1d7e3441499ecb3c62
2017-05-23 19:38:07 +02:00
Julian Descottes 5fb78f1d7e Bug 1363327 - register about:debugging dynamically using a manifest;r=ochameau
MozReview-Commit-ID: 2WG5zN6p1EK

--HG--
extra : rebase_source : e64de772772242fbae8de186df0f97ba60df92d2
2017-05-26 10:09:42 +02:00
Ryan VanderMeulen 8543438674 Merge inbound to m-c. a=merge 2017-05-25 16:34:16 -04:00
Honza Bambas b852ed009a Backout of 7f28c1084c47 (bug 1319111) for security checks breakage, r=me 2017-05-25 18:16:02 +02:00
Samael Wang cb393d1f72 Bug 1363036 - Part 2: Reject AddEntry / ReplaceEntry if the entry has been associated to another SHistory. Cleanup mHistoryTracker if root docshell changes. r=smaug
MozReview-Commit-ID: 9s4dQG18JUN

--HG--
extra : rebase_source : 728dcdc63c11aaf177faa4e093750a69da8175e4
2017-05-22 15:36:06 +08:00
Samael Wang ecbe18e933 Bug 1363036 - Part 1: Remove MOZ_DIAGNOSTIC_ASSERTs previously added for bug hunting. r=smaug
MozReview-Commit-ID: BAkuRlHtMcP

--HG--
extra : rebase_source : 5e708d0dacec9a673851d689d1f5274a0f1b69aa
2017-05-22 11:25:54 +08:00
Honza Bambas 5f3173e90f Bug 1365306 - Remove net::ThrottlingService, don't suspend/resume download channels on page load. r=hurley 2017-05-18 14:09:00 -04:00
Honza Bambas 2dfe5d94b8 Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz 2017-05-23 08:09:00 -04:00
Carsten "Tomcat" Book 067f1fa700 Merge mozilla-central to mozilla-inbound 2017-05-18 14:59:47 +02:00
Bob Owen 73b521bf6c Bug 1351358 Part 1: Add flag to nsISHEntry to indicate if it was originally loaded in this process. r=bz
This flag is for when we've loaded a URI in a remote type that is not the default
for compatibility reasons (for example related http in the file content process).
So that we can load the history entry in that same process as well.
2017-05-18 12:08:56 +01:00
Samael Wang da20faa46e Bug 1363036 - Add MOZ_DIAGNOSTIC_ASSERTs for bug hunting. r=smaug
MozReview-Commit-ID: JPnkkJlkwDY
2017-05-16 10:54:01 +08:00
Geoff Brown 061c806f3d Bug 1300351 - Fix non-standard manifest annotation; r=me,test-only
Just introduced this - did not put spaces in the right place.
2017-05-15 16:17:02 -06:00
Geoff Brown 0f0c36efe3 Bug 1300351 - Disable browser_onbeforeunload_navigation.js on non-debug windows; r=jmaher 2017-05-15 16:02:02 -06:00
Christoph Kerschbaumer e4f38c8d7c Bug 1362993 - Rewrite gBrowser.addTab() to use BrowserTestUtils.addTab(). r=florian 2017-05-15 21:49:50 +02:00
Honza Bambas d6d727a69e backout of f9abb9c83452 (bug 1319111) for crashes, r=bz 2017-05-13 13:55:11 +02:00