Commit Graph

541854 Commits

Author SHA1 Message Date
Sebastian Hengst
d70c8aa98b merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-06-16 09:52:22 +02:00
Sebastian Hengst
265affc002 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 5wTyHWufcCh
2017-06-16 09:50:00 +02:00
Paolo Amadini
c9b55f92a9 Bug 1372242 - The search suggestions hint is not smooth enough when animating. r=mak
By adding a small blank space to the end of the text, we can make the animation look faster. Also, the issues with the animation wouldn't be noticeable in that space.

MozReview-Commit-ID: H67YL6WZEd1

--HG--
extra : rebase_source : 2555fb0b40a9c83205537a969fe905f7f083f70a
extra : amend_source : 7a2deeb18c3e8dcc93fce1bca4be9efb8585e685
2017-06-16 08:43:11 +01:00
sotaro
61c0f84377 Bug 1372512 - Fix webrender Key leaks of WebRenderBridgeParent on abnormal shutdown r=kats
This bug handles abnormal client shut down case and Tab move between different windows.

Abnormal client shut down case, WebRenderBridgeParent does not receive IPC messages that are sent during WebRenderLayerManager and WebRenderBridgeChild destruction. In this case, webrender keys except keys of external images are not removed from webrender. Abnormal shut down could happen when content process was crashed or content process was killed by ContentParent if shutdown takes too long time.

In the tab move case, the WebRenderBridgeParent will need to be re-bound to a different CompositorBridgeParent and webrender, and so will need to clear all its related keys from the old webrender. This will happen in a future patch.
2017-06-16 15:31:01 +09:00
Andrea Marchesini
9e04e35075 Bug 1370819 - Postpone the dispatching of XHR events with opened synchronously, r=smaug 2017-06-16 08:07:00 +02:00
Phil Ringnalda
8f1db3dfce Backed out 3 changesets (bug 1373154) for Windows devtools timeouts
Backed out changeset ca4e62117e6a (bug 1373154)
Backed out changeset 0e89b1564ea4 (bug 1373154)
Backed out changeset 48767f3f315f (bug 1373154)

MozReview-Commit-ID: 3DhUjEjXVmn
2017-06-15 21:22:57 -07:00
Phil Ringnalda
2eb8aebb84 Backed out changeset ac1520300fc7 (bug 1356474) for failures in browser_grids_grid-outline-cannot-show-outline.js
MozReview-Commit-ID: 78R9AGsRIY5
2017-06-15 20:29:40 -07:00
Bill McCloskey
0767e31489 Bug 1372736 - Avoid using AbstractThread for non-media MozPromises (r=bkelly)
MozReview-Commit-ID: BBi0pK4DXxf
2017-06-15 20:16:25 -07:00
Bill McCloskey
1158c7c282 Bug 1372733 - EventTargetFor should return an nsISerialEventTarget (r=bkelly)
MozReview-Commit-ID: Kchg4kqBERt
2017-06-15 20:16:25 -07:00
Yoshi Huang
6c761bcc02 Bug 1368897 - rewrite dom/base/test/test_x-frame-options.html. r=smaug
We test the expected behavior base on the pref,
"security.data_uri.unique_opaque_origin".

We run the legacy test when the pref is off, however if the pref is on,
we run the new behavior, loading an iframe with X-FRAME-OPTIONS in a
data: URI should be blocked.
2017-06-16 10:54:10 +08:00
Yoshi Huang
68f70ea183 Bug 1368896 - rewrite dom/base/test/test_viewport_scroll.html. r=smaug 2017-06-16 10:53:04 +08:00
Yoshi Huang
7364f7009f Bug 1368893 - rewrite dom/html/test/test_iframe_sandbox_inheritance.html. r=smaug
Move the data URI in 'if_no_scripts' and 'if_scripts' to seperate files.

Also remove the test 'if_19', as it seems redundant, it tests the same
thing with the iframe 'if_scripts', and it also lacks of 'allow-scripts'
in its sandbox flag.
2017-06-16 10:52:25 +08:00
Yoshi Huang
8ddf2451de Bug 1267075 - Part 6: test state pseudo class for image blocking. r=bz
Verify when image is blocked, the style of the following state pseudo class will
apply:
:-moz-suppressed
:-moz-broken
:-moz-user-disabled
2017-06-16 10:12:10 +08:00
Yoshi Huang
0bb598eed9 Bug 1267075 - Part 5: test for blocking image. r=bz
A mochitest browser test for image blocking.
We query the blocking status by reading imageBlockingStatus.

See nsImageLoadingContent.cpp for the logic of blocking image.
In this test we verified the following behavior:
1. image is loaded.
2. image is blocked.
3. mCurrentRequest doesn't have size yet, so it should be replaced.
4. mCurrentRequest already got size, the following request should be a
pendingRequest.
2017-06-16 10:12:10 +08:00
Yoshi Huang
8af20dccc4 Bug 1267075 - Part 4: add a boolean to prevent calling asynchronously. r=bz
Use a boolean to prevent calling SetBlockedRequest asynchronously.
Also use the same boolean to prevent some evil code reenters LoadImage.

Then we should redesign the correct bahavior in those follow-up bugs,
Bug 1353685 - Should ServiceWorker call SetBlockedRequest
Bug 1353683 - consider calling SetBlockedRequest in nsCORSListenerProxy::UpdateChannel
Bug 1371237 - consider calling SetBlockedRequest in nsContentSecurityManager::CheckChannel
2017-06-16 10:12:09 +08:00
Yoshi Huang
0da35daccc Bug 1267075 - Part 3: cancel imgRequestProxy if asyncOpen2 failed. r=tnikkel
The problem is if we found a cache hit, then we could go through
ValidateRequestWithNewChannel to validate the cache.
Then if the CSP check fail(asyncOpen2() will fail), then the
imgRequestProxy will remain there, and cause the timeout.

I run into problem when running mochitest
browser/base/content/test/general/browser_aboutHome.js in non-e10s mode.
In the beginning, browser.xul will load defaultFavicon.png, will create
an image cache there.
Next time when the test starts to run, when it loads about:home, then it
will try to load defaultFavicon.png, it will found an image cache hit
(loaded previously by browser.xul), and call
ValidateRequestWithNewChannel there, however the asyncOpen2 call failed,
and the imgRequestProxy is added to the loadGroup of about:home, and
never be notified until timeout.
2017-06-16 10:12:09 +08:00
Yoshi Huang
83ef929df9 Bug 1267075 - Part 2: bail out early if it's for data document. r=bz
Check the document earlier before calling into imageLoader, this could
save us tons of time if in the end the document isn't allowed to load images.
2017-06-16 10:12:09 +08:00
Yoshi Huang
5dcdd16255 Bug 1267075 - Part 1: call SetBlockedRequest when CSP check failed. r=bz
As a follow-up from bug 1206961, we will remove calling CanLoadImage in
this bug. Also in the case of CSP check failed, we will call
SetBlockedRequest in those cases.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1267075#c30 for the
analysis between the old and new setup.
2017-06-16 10:12:08 +08:00
Manish Goregaokar
3125497283 Bug 1373018 - Part 11: stylo: Move cached style structs to GeckoStyleContext; r=bholley
MozReview-Commit-ID: 1LA8AJ3oNwF

--HG--
extra : rebase_source : e318c7c92973eb6daf9b9fb9b1dcd776e6788a95
2017-06-10 22:27:45 -07:00
Manish Goregaokar
3188b9bfd6 Bug 1373018 - Part 10: stylo: Remove StyleSource; r=bholley
MozReview-Commit-ID: 4IcROeDNoBA

--HG--
extra : rebase_source : e2f65c316be2c5640150eb5ff5628505ce446535
2017-06-10 22:27:45 -07:00
Manish Goregaokar
abdbfa30c6 Bug 1373018 - Part 9: stylo: Make more things on nsStyleContext inlined; r=bholley
MozReview-Commit-ID: FYiOtmSK2oC

--HG--
extra : rebase_source : a543fc05b6a5b5bd3c143d87730c66a1f8743f16
2017-06-10 22:27:45 -07:00
Manish Goregaokar
02ab46c24d Bug 1373018 - Part 8: stylo: Move nsStyleContext::SetStyle to GeckoStyleContext; r=bholley
MozReview-Commit-ID: ycXu95whnG

--HG--
extra : rebase_source : 852051aa074cc8ed8f11f0d68c26fe4f0a6962b6
2017-06-10 22:27:45 -07:00
Manish Goregaokar
828745da04 Bug 1373018 - Part 7: stylo: Move nsStyleContext::mSource into subclasses; r=bholley
MozReview-Commit-ID: AspYUJ7lGqD

--HG--
extra : rebase_source : 1f8d368312bd8149f32efc31130f4bf6659064ed
2017-06-10 22:27:45 -07:00
Manish Goregaokar
092c404741 Bug 1373018 - Part 6: stylo: Move most Gecko-specific methods into GeckoStyleContext; r=bholley
MozReview-Commit-ID: KzMAbuY8nll

--HG--
extra : rebase_source : 7d96f19a4bfcc2e97b7df513df881fa88f27cd85
2017-06-10 22:27:45 -07:00
Manish Goregaokar
70773cfc42 Bug 1373018 - Part 5: stylo: Move child/sibling pointers to GeckoStyleContext; r=bholley
MozReview-Commit-ID: Gay6RwpkNcu

--HG--
extra : rebase_source : 57a7f22b3d830e2fdc47faa15ceafbe5020a5964
2017-06-10 22:27:45 -07:00
Manish Goregaokar
2991af8d79 Bug 1373018 - Part 4: stylo: Rename eArenaObjectID_nsStyleContext to eArenaObjectID_GeckoStyleContext; r=bholley
MozReview-Commit-ID: 5oZwxG8r9Ty

--HG--
extra : rebase_source : 32fdfe60a20b2d90f531df1999b3aee0e4c8a5c2
2017-06-10 22:27:45 -07:00
Manish Goregaokar
719eec238a Bug 1373018 - Part 3: stylo: Move mPresContext to ServoStyleContext; r=bholley
MozReview-Commit-ID: 2BmRpIjxEO8

--HG--
extra : rebase_source : 51b9d1cd0963d0d243a6e575eff3a7407ee27485
2017-06-10 22:27:45 -07:00
Manish Goregaokar
7fceedfbae Bug 1373018 - Part 2: stylo: Add stylo conversion methods for nsStyleContext; stop using arena; r=bholley
MozReview-Commit-ID: CeIDP7idlmC

--HG--
extra : rebase_source : 8e7ec95fd068e562d947fbc39e84cd8e60daa910
2017-06-10 22:27:45 -07:00
Manish Goregaokar
01dc13b311 Bug 1373018 - Part 1: stylo: Introduce ServoStyleContext and GeckoStyleContext subclasses; r=bholley
MozReview-Commit-ID: GY1GfkWMK0n

--HG--
extra : rebase_source : a631b068cf0d54f5105e3dfe411365157490cac5
2017-06-10 22:27:45 -07:00
steveck-chung
d309b485e7 Bug 1350264 - Allow users to re-enable form autofill feature after all populated fields were cleared manually, r=lchang
MozReview-Commit-ID: DG31YXJuT2t

--HG--
extra : rebase_source : 2a027b4d8ccdf0b385454783901dece914003623
2017-06-15 16:31:51 +08:00
Gerald Squelart
4a3a84f39f Bug 1371882 - Remove unneeded MediaCache::mContentLength - r=cpearce
Now that MediaCache doesn't use the content length to decide which block cache
to use, and can know it's the file-backed MediaCache (to reset the pointer,
and for telemetry purposes), we don't need to store mContentLength anymore.

MozReview-Commit-ID: KjxarKFe9WK

--HG--
extra : rebase_source : e2cb397c6d5e37a8390479f4245255ef52265483
2017-06-15 17:32:26 +12:00
Gerald Squelart
3af100b5e5 Bug 1371882 - MemoryBlockCache claims extra buffer capacity if any - r=cpearce
MozReview-Commit-ID: GDLs8FcuD07

--HG--
extra : rebase_source : f0bc302b53880ad9ee2f73f1305e7552af300321
2017-06-15 18:38:52 +12:00
Gerald Squelart
2f8acfe718 Bug 1371882 - MemoryBlockCache is responsible for tracking the combined size of all its buffers - r=cpearce
MemoryBlockCache won't allow initializing, or growing an existing buffer,
above the limit (min of 'media.memory_caches_combined_limit_kb' or
sysmem*'media.memory_caches_combined_limit_pc_sysmem'/100).

MozReview-Commit-ID: 6MkwFp2eeth

--HG--
extra : rebase_source : 17345f6fe9f00fddfbef87090665afccaabb2cf5
2017-06-15 17:10:54 +12:00
Gerald Squelart
319f8220ec Bug 1371882 - Let GetMediaCache decide which block cache to use - r=cpearce
This allows a fallback to the file-backed MediaCache, if a MemoryBlockCache
could not be created and initialized (which may happen in the next patch,
where MemoryBlockCache will take care of not using more than
MediaMemoryCachesCombinedLimit).

MediaCache::Init() is not needed anymore, as its only work was to initialize
its block cache.

MozReview-Commit-ID: ItAdOPuxEvt

--HG--
extra : rebase_source : 08461d61b8d738edb8c2088bca4e33213b8ae4e1
2017-06-15 16:32:06 +12:00
Gerald Squelart
5a0a2a8c04 Bug 1371882 - MediaCache::Flush reinitializes block cache instead of recreating it - r=cpearce
This saves from destruction&re-construction efforts, makes the flushing less
prone to first-initialization failures.
And it will allow moving the choice of block cache outside of MediaCache::Init.

MozReview-Commit-ID: 8vSunM3rRkL

--HG--
extra : rebase_source : d244c9ff0cb34f9b2171e5f5848501cc1d71d2bc
2017-06-15 16:12:30 +12:00
Gerald Squelart
6400af0f0e Bug 1371882 - MediaBlockCacheBase::Init may be called again to re-initialize cache - r=cpearce
This will be useful to let the MediaCache flush its block cache without having
to restart from scratch (and risk failing).

MozReview-Commit-ID: At3mxH9jb9m

--HG--
extra : rebase_source : b5ac513c6d6d100c8eb41220991388470c0b1a5e
2017-06-15 15:55:39 +12:00
Gerald Squelart
732f34fc15 Bug 1371882 - MediaCache is now ref-counted - r=cpearce
MediaCacheStreams have owning shared pointers to their MediaCache, and
a MediaCache owns itself while an update is in flight.
A non-owning pointer `gMediaCache` is only used by GetMediaCache and
~MediaCache to manage the one file-backed MediaCache.

MozReview-Commit-ID: AQHuXWGrKt6

--HG--
extra : rebase_source : f256e20080b8701f87418209aa42c5a0fe3f5239
2017-06-15 15:02:25 +12:00
Gerald Squelart
16c8e8bc32 Bug 1371882 - Remove MediaBlockCacheBase::Close() - r=cpearce
The only external use of Close was always followed by an implicit destruction
(by resetting the RefPtr), so we don't need to expose it, and it can be done
from the destructor.

FileBlockCache keeps its Close() function for internal use.
Also, FileBlockCache::mIsOpen is redundant, as it's true iff mThread is not
null.

MozReview-Commit-ID: LV7YVrwJvGG

--HG--
extra : rebase_source : 23decadf249b9e63190b3e19d81edc4a090afcef
2017-06-15 14:10:05 +12:00
Gerald Squelart
ac5fcad310 Bug 1371882 - Avoid MemoryBlockCache when combined sizes > 'media.memory_caches_combined_limit_...' - r=cpearce
Don't go over the lowest of 'media.memory_caches_combined_limit_kb'
(kilobytes) or 'media.memory_caches_combined_limit_pc_sysmem' (percents of
system memory).

Added more logging around creation/destruction of MediaCaches.

MozReview-Commit-ID: Cdz4ycyn1RR

--HG--
extra : rebase_source : 63168234f186c3ef9c0289a189a647d67d8526a4
2017-06-12 15:42:26 +12:00
Gerald Squelart
2f4776d6e2 Bug 1371882 - MediaCache uses MemoryBlockCache when content length is known - r=cpearce
MozReview-Commit-ID: 35A4Vc95NtB

--HG--
extra : rebase_source : 8cae198053b6b5ec062137176b8eba377f5bcc83
2017-06-09 18:56:34 +12:00
Gerald Squelart
cb4bc96af2 Bug 1371882 - MEMORYBLOCKCACHE_ERRORS telemetry to catch unexpected errors without crashing - r=cpearce,francois
No errors are expected to happen in MemoryBlockCache (except a few
'InitAllocation', which would still be good to know about), but instead of
taking drastic measures in these cases (i.e., crash), I would prefer to
collect some telemetry first.

MozReview-Commit-ID: 4WdFS34lgzj

--HG--
extra : rebase_source : 5600d0b93d4d438d8cc9cf5a74d9fbf24fe2822e
2017-06-12 16:22:28 +12:00
Gerald Squelart
b901a472b6 Bug 1371882 - Implement MemoryBlockCache - r=cpearce
Memory-backed block cache.
At initialization, allocates memory needed to store the expected content
length.
If MediaCache attempts to write/move beyond the expected size, we grow the
buffer accordingly, as we cannot fully trust HTTP headers. (Future patch will
ensure we put a limit to this growth.)

MozReview-Commit-ID: GHxYMGXYrwI

--HG--
rename : dom/media/MediaBlockCacheBase.h => dom/media/MemoryBlockCache.h
extra : rebase_source : 4fe263006839ba82a77d124f147adf5943cfa651
2017-06-09 15:37:23 +12:00
Gerald Squelart
b3828d2355 Bug 1371882 - Rename MediaCache::mFileCache to mBlockCache - r=cpearce
Because blocks may not necessarily be held in files anymore.

MozReview-Commit-ID: 2GNc7B5w2Jt

--HG--
extra : rebase_source : 4ceda80ca6736b159d8b726cdcfb8d7f74cf8529
2017-06-14 17:01:46 +12:00
Gerald Squelart
98f4458011 Bug 1371882 - Virtualize FileBlockCache's API into MediaBlockCacheBase - r=cpearce
MozReview-Commit-ID: Eya0RWiyiEP

--HG--
rename : dom/media/FileBlockCache.h => dom/media/MediaBlockCacheBase.h
extra : rebase_source : e4e847924e2df5bf0e7f2b7e92068fc104ca9bb6
2017-06-09 14:26:22 +12:00
Gerald Squelart
d891f9f0c5 Bug 1371882 - Remove FileBlockCache's dependency on Runnable - r=cpearce
This is necessary before we can make FileBlockCache depend on another
ref-counted base in the following patch.

MozReview-Commit-ID: 8bfNwQhY8k0

--HG--
extra : rebase_source : b216d0af3e4b5abb68532f2547597c4f04585a71
2017-06-09 14:51:17 +12:00
Gerald Squelart
527c7d3dee Bug 1371882 - If content length <= 'media.memory_cache_max_size', use a discrete memory-backed MediaCache - r=cpearce
MozReview-Commit-ID: HH1R6LjKkxb

--HG--
extra : rebase_source : 2ce35a504c6709624bc7d161003b8331f6f25d1e
2017-06-09 23:15:04 +12:00
Gerald Squelart
d86f260baa Bug 1371882 - Move MEDIACACHESTREAM_NOTIFIED_LENGTH telemetry collection to MediaCacheStream::Init - r=cpearce
The initial telemetry collection was done in NotifyDataLength() because that
was the first point where the length was introduced; but some extra code was
needed to ensure that were collecting the first length.
Now that this initial length is passed directly to Init(), we can report that
number instead.
In the "worst" case, it will actually be a bit more correct about what we
initially wanted to report, i.e., the initial length given by the HTTP
response header; and it's what we really want to know, now that we are using
this number to make a decision about which MediaCache to use.

MozReview-Commit-ID: 11Th8pensZt

--HG--
extra : rebase_source : 97a6d2dcbfad6c9b37819bfe6471baff2ec7e335
2017-06-12 14:27:46 +12:00
Micah Tigley
c4243d211b Bug 1356474 - Add units tests for the Grid Outline component. r=gl
MozReview-Commit-ID: 85ZjxjkpIgU
2017-06-08 19:12:25 -06:00
Micah Tigley
b5c9740d92 Bug 1356474 - Add units tests for the Grid Outline component. r=gl
MozReview-Commit-ID: 85ZjxjkpIgU
2017-06-08 19:12:25 -06:00
Mike Hommey
7a056a1e03 Bug 1373478 - Remove the remainder of gonk widget code. r=me 2017-06-16 10:41:06 +09:00