Commit Graph

62201 Commits

Author SHA1 Message Date
Sebastian Hengst
d4b4629dd4 Backed out changeset a10d45c7d6de (bug 1358115) for failing mochitest test_blob_worker_xhr_read_slice.html. r=backout 2017-04-24 14:06:29 +02:00
Andrea Marchesini
b48412eef0 Bug 1358115 - Use IPCBlob in DataTransfer, r=smaug 2017-04-24 12:16:50 +02:00
Andrea Marchesini
45f5829cfd Bug 1358113 - Use IPCBlob in File.createFromNsIFile/createFromFileName, r=smaug 2017-04-24 12:16:50 +02:00
Andrea Marchesini
5046098373 Bug 1358114 - Use IPCBlob in BlobURL, r=smaug 2017-04-24 12:16:49 +02:00
Andrea Marchesini
7a681dccf6 Bug 1358111 - Use IPCBlob in Entries API - part 2 - Entries API, r=smaug 2017-04-24 12:16:49 +02:00
Andrea Marchesini
44a1314868 Bug 1358111 - Use IPCBlob in Entries API - part 1 - GetFilesHelper, r=smaug 2017-04-24 12:16:49 +02:00
Andrea Marchesini
25e4c65c6d Bug 1358109 - Use IPCBlob in PFilePicker, r=smaug 2017-04-24 12:16:49 +02:00
Andrea Marchesini
f8288de597 Bug 1353629 - PBlob refactoring - part 15 - FileMediaResource is used for in-process blobURL, r=jwwang 2017-04-24 12:09:41 +02:00
Andrea Marchesini
dca7c55a43 Bug 1353629 - PBlob refactoring - part 14 - tests, r=smaug
--HG--
rename : dom/base/test/browser_bug1307747.js => dom/file/ipc/tests/browser_ipcBlob.js
2017-04-24 12:09:41 +02:00
Andrea Marchesini
38a7f75f35 Bug 1353629 - PBlob refactoring - part 13 - IPCBlobInputStream should support remote nsIAsyncInputStream, r=smaug
If a child-to-parent IPCBlob is more than 1mb, we end up using a pipe stream.
If that ipcBlob is sent to a different process, we need to implement asyncWait
correctly: we need to call the remoteStream->AsyncWait().
2017-04-24 12:09:41 +02:00
Andrea Marchesini
70d3bbfdb9 Bug 1353629 - PBlob refactoring - part 12 - nsInputStreamPump should use BufferedStreams, r=smaug
nsInputStreamPump should use the stream as nsIAsyncInputStream if available.
In order to do so, we need to wrap a BufferedStream around it.

MediaResource cannot use a simple sync nsIInputStream when BlobURL are involved
in the content process.
2017-04-24 12:09:41 +02:00
Andrea Marchesini
f29b1f76a9 Bug 1353629 - PBlob refactoring - part 11 - Comments, r=smaug 2017-04-24 12:09:41 +02:00
Andrea Marchesini
794d21eaaf Bug 1353629 - PBlob refactoring - part 9 - PBlob should use IPCStream in case it is dealing with an IPCBlobInputStream, r=smaug
This patch will go away when I'll finishing the removing of PBlob.  Currently,
when a PBlob is sent from child to parent, we use PMemoryStream in order to
recreate the inputStream on the parent side. PMemoryStream sends the data in
chunks.

But if PBlob is dealing with a IPCBlobInputStream, it doesn't have access to
the real data. In this case, we must send data using IPCStream. In this way,
Note that thisIPCBlobInputStream will send its ID, and the parent will take the
real inputStream from the IPCBlobInputStreamStorage.  Note that I check the
size to be 1mb instead 0. No particular reasons, but better to avoid the use of
PMemoryStream for nothing.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
7bbba02e9a Bug 1353629 - PBlob refactoring - part 8 - FileReader should use nsIAsyncInputStream if available, r=smaug
Currently FileReader API uses a nsITransport. This is not needed if the
inputStream is a nsIAsyncInputStream already, and IPCBlobInputStream is always
a nsIAsyncInputStream.

Note that, we must create a bufferedStream in order to use ReadSegments in case
the remote inputStream, received by IPCBlobInputStream, is a FileInputStream.
This was not needed with nsITransport.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
d6659b61c0 Bug 1353629 - PBlob refactoring - part 7 - IPCBlobInputStream must implement nsIAsyncInputStream, r=smaug
In order to retrieve data from an IPCBlobInputStream, it must be used as
nsIAsyncInputStream.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
db52df9bd7 Bug 1353629 - PBlob refactoring - part 6 - IPCBlobInputStream serialization, r=smaug
IPCBlobInputStream must implement nsIIPCSerializableInputStream interface.
When this is done, the child sends the internal ID of the IPCBlobInputStream to
the parent.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
b90e19e9d1 Bug 1353629 - PBlob refactoring - part 5 - IPCBlobInputStreamStorage, r=smaug
An IPCBlobInputStream can be sent back to the parent process (not implemented
in this patch). When this is done, we basically send only the internal ID.
From this ID, we can retrieve the original inputStream because any
IPCBlobInputStreamParent actor has previously registered it into a singleton:
IPCBlobInputStreamStorage.

So, if we have a IPCBlobInputStreamParent, we have an inputStream, and this
inputStream is known by IPCBlobInputStreamStorage. This will be useful in the
next patches.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
db0019c058 Bug 1353629 - PBlob refactoring - part 4 - IPCBlobInputStream, r=smaug
IPCBlobInputStream is a new type of nsIInputStream that is used only in content
process when a Blob is sent from parent to child. This inputStream is for now,
just cloneable.

When the parent process sends a Blob to a content process, it has the Blob and
its inputStream. With its inputStream it creates a IPCBlobInputStreamParent
actor. This actor keeps the inputStream alive for following uses (not part of
this patch).

On the child side we will have, of course, a IPCBlobInputStreamChild actor.
This actor is able to create a IPCBlobInputStream when CreateStream() is
called.  This means that 1 IPCBlobInputStreamChild can manage multiple
IPCBlobInputStreams each time one of them is cloned. When the last one of this
stream is released, the child actor sends a __delete__ request to the parent
side; the parent will be deleted, and the original inputStream, on the parent
side, will be released as well.

IPCBlobInputStream is a special inputStream because each method, except for
Available() fails. Basically, this inputStream cannot be used on the content
process for nothing else than knowing the size of the original stream.

In the following patches, I'll introduce an async way to use it.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
03ffca06a1 Bug 1353629 - PBlob refactoring - part 3 - IPCBlob in ClonedMessageData, r=smaug
This is the first use of IPCBlob: ClonedMessageData.
ClonedMessageData is used for BroadcastChannel, MessagePort and any
postMessage() communication. This patch changes StructuredCloneData in order to
use IPCBlob instead of PBlob.
BroadcastChannel has a custom way to manage Blobs because when the parent
receives them from a content process, it must send them to any other
BroadcastChild actor duplicating the serialization.
2017-04-24 12:09:40 +02:00
Andrea Marchesini
cf7edf5874 Bug 1353629 - PBlob refactoring - part 0 - IPCBlob, r=smaug
This first patch introduces the basic idea of the refactoring. Instead of
having a PBlob protocol, here we have a simple IPC struct: IPCBlob.
When a Blob is sent to a different process, we move an IPCBlob struct with
type, size, some specific File properties, and an inputStream as IPCStream.
2017-04-24 12:09:40 +02:00
Carsten "Tomcat" Book
fd0681d297 Backed out changeset 827141143dc9 (bug 1313927) for test failures in own test 2017-04-24 08:08:39 +02:00
Iris Hsiao
8b9629d52e Merge mozilla-central to mozilla-inbound 2017-04-24 12:04:12 +08:00
Tobias Schneider
01c33ba7f8 Bug 1313927 - Create separated test to disable it on Android only. r=jet
--HG--
extra : rebase_source : 86f018772eff4240c6c5415a41b9f0f610a615d6
2017-04-21 12:08:48 -07:00
Masatoshi Kimura
509e520eda Bug 1197497 - Convert the button rect to device coordinates correctly instead of casting CSS coordinates. r=jfkthame
MozReview-Commit-ID: EqyHnJpp2tU

--HG--
extra : rebase_source : 046b39dbd5f5977459154e30a3358151b923d4d5
2017-04-22 08:51:18 +09:00
Sebastian Hengst
473a1509ea merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 289I7nCINwK
2017-04-22 10:48:16 +02:00
Wes Kocher
c296c00a82 Merge m-c to autoland, a=merge
MozReview-Commit-ID: FvBazP0CwKm
2017-04-21 17:39:39 -07:00
Wes Kocher
d973551173 Merge inbound to central, a=merge
MozReview-Commit-ID: FHfhKIIlItM
2017-04-21 17:30:43 -07:00
Wes Kocher
4a05296446 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Cb0b59wJ0vy
2017-04-21 17:35:24 -07:00
Nicolas B. Pierron
cf3fce3eb4 Bug 900784 part 1.6 - Add a test case for the JS start-up bytecode cache. r=mrbkap 2017-04-21 16:57:58 +00:00
Nicolas B. Pierron
c6509f9e01 Bug 900784 part 1.5 - Encode JS bytecode when no more scripts are executed. r=mrbkap 2017-04-21 16:57:58 +00:00
Nicolas B. Pierron
5b59221f67 Bug 900784 part 1.4 - Decode JS bytecode either off/on-main-thread. r=mrbkap 2017-04-21 16:57:58 +00:00
Nicolas B. Pierron
86094a7a6d Bug 900784 part 1.3 - Add SRI hash import/export code from/to JS bytecode cache. r=francois,mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron
287c866026 Bug 900784 part 1.2 - Request JS bytecode if any is present in the cache. r=mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron
d52b01efa3 Bug 900784 part 1.1 - Add nsScriptLoader::mDataType to track the type of the loaded content. r=mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron
49b55aae35 Bug 900784 part 1.0 - Add nsJSUtils functions for encoding and decoding the bytecode. r=mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron
0e685e0450 Bug 900784 part 0.12 - Assert nsScriptLoadRequest::mProgress state in nsScriptLoader methods. r=mrbkap 2017-04-21 16:57:57 +00:00
Carsten "Tomcat" Book
975e251aff merge mozilla-inbound to mozilla-central a=merge 2017-04-21 10:57:02 +02:00
Iris Hsiao
7aacf33d10 Backed out 9 changesets (bug 1353689) for web platform reftest failures
Backed out changeset 80ac3ea1427e (bug 1353689)
Backed out changeset 9a5b36fefb22 (bug 1353689)
Backed out changeset 44c5f4b4cdfc (bug 1353689)
Backed out changeset 7f2790b4c963 (bug 1353689)
Backed out changeset 8d8d2824a763 (bug 1353689)
Backed out changeset d3ced5751998 (bug 1353689)
Backed out changeset 5179ebf1e982 (bug 1353689)
Backed out changeset ebf24732e9b3 (bug 1353689)
Backed out changeset e81924e4cff3 (bug 1353689)
2017-04-21 13:38:28 +08:00
Masayuki Nakano
3d8bbc6723 Bug 1217700 part.3 Expose text change, selection change and position change notifications to nsITextInputProcessorCallback with nsITextInputProcessorNotification r=smaug
For testing IMEContentObserver, text change, selection change and position change notifications should be exposed to JS with nsITextInputProcessorNotification.

MozReview-Commit-ID: 3PUhKXRwnAn

--HG--
extra : rebase_source : fce7a73683a2d4811070453629ef48d3ad15c8c8
2017-04-20 20:17:03 +09:00
Marco Bonardo
444b7b3de9 Bug 1356440 - Favicons of bookmarks views don't update on visit. r=mrbkap,past,enndeakin
MozReview-Commit-ID: 8j5yLqr7MTc

--HG--
extra : rebase_source : 0da3b4bf0fca0462e22f76c1392f1d9e69f0e71c
extra : amend_source : d6c92db62af2b62671cf13f0b5385b2bc2c8b81e
2017-04-19 11:41:49 +02:00
Alessio Placitelli
c8ffbbccd4 Bug 1346203 - Don't use an empty key for accumulating in CANVAS_WEBGL_FAILURE_ID. r=jrmuizel
MozReview-Commit-ID: 9S2UIEeTUi7

--HG--
extra : rebase_source : 2204bc4e6a73c66daed289f672ac33fe07a07b48
2017-04-18 11:57:53 +02:00
JW Wang
e96831f0c7 Bug 1356514 - remove the usage of nsContentUtils::IsInPrivateBrowsing() in HTMLMediaElement.cpp. r=Ehsan
Per bug 1194891 comment 35, use |NodePrincipal()->GetPrivateBrowsingId() > 0| instead.

MozReview-Commit-ID: Cu6geuTWhGz

--HG--
extra : rebase_source : 1f899705ce1c2d9b7beec44a2f88a2cb37d0430f
2017-04-18 14:26:32 +08:00
Michael Kaply
4ab68b1150 Bug 1357219 - Don't warn if we can't use a memory mapped file. r=jld
MozReview-Commit-ID: 9ajZCLzQe4G

--HG--
extra : rebase_source : 1a72612fa75724a2836efdd7a712836964a819cf
2017-04-21 15:56:34 -05:00
Mike Conley
cb7e9a244f Bug 1348409 - Stop supporting the showDialog argument for window.find r=mrbkap
The dialog functionality of the non-standard window.find API has been broken
with e10s since it shipped, and bug 1182569 or bug 1232432 (or both) have
broken it for non-e10s.

This patch remove showDialog support entirely, for both e10s and non-e10s,
in a more deliberate way. We now ignore the argument.

MozReview-Commit-ID: 1CTzgEkDhHW

--HG--
extra : rebase_source : 9aa9623ef649fb2c42ad22738130c361acf6b8cc
2017-04-13 11:54:15 -04:00
Masayuki Nakano
7b52d07cd2 Bug 1217700 part.2 IMEContentObserver should observe all possible notifications and check if it should be notified when it occurs r=m_kato
IMEContentObserver can store pointer of IMENotificationRequests of its mWidget.  Therefore, it can check the requests dynamically when it receives content change or layout change.

This patch makes IMEContentObserver stores IMENotificationRequests as pointer and check it at every change notification received.  Additionally, notification request may be changed due to focus move or something.  Therefore, this patch makes IMEContentObserver and IMEContentObserver::IMENotificationSender() check if the notifications are still necessary.

MozReview-Commit-ID: 2uU2wN15D8v

--HG--
extra : rebase_source : 6086e0293343632df43087c767ad00521e764476
2017-04-13 14:32:12 +09:00
Masayuki Nakano
0789f7b595 Bug 1217700 part.1 nsIWidget should return reference to IMENotificationRequests r=m_kato
IMEContentObserver may need to change notifications to send when TextInputProcessor begins input transaction.  In current design, IMEContentObserver needs to retrieve IMENotificationRequests at every change.  However, if nsIWidget returns a reference to its IMENotificationRequests, IMEContentObserver can call it only once.

For that purpose, this patch changes nsIWidget::GetIMENotificationRequests() to nsIWidget::IMENotificationRequestsRef() and make it return |const IMENotificationRequests&|.  However, if the lifetime of the instance of IMENotificationRequest is shorter than the widget instance's, it's dangerous.  Therefore, it always returns TextEventDispatcher::mIMENotificationRequests.  TextEventDispatcher's lifetime is longer than the widget.  Therefore, this guarantees the lifetime.

On the other hand, widget needs to update TextEventDispatcher::mIMENotificationRequests before calls of nsIWidget::IMENotificationRequestsRef().  Therefore, this patch makes TextEventDispatcher update proper IMENotificationRequests when it gets focus or starts new input transaction and clear mIMENotificationRequests when it loses focus.

Note that TextEventDispatcher gets proper requests both from native text event dispatcher listener (typically, implemented by native IME handler class) and TextInputProcessor when TextInputProcessor has input transaction because even if TextInputProcessor overrides native IME, native IME still needs to know the content changes since they may get new input transaction after that.

However, there may not be native IME handler in content process.  If it runs in Android, PuppetWidget may have native IME handler because widget directly handles IME in e10s mode for Android.  Otherwise, native IME handler is in its parent process.  So, if TextInputHandler has input transaction in content process, PuppetWidget needs to behave as native event handler.  Therefore, this patch makes PuppetWidget inherit TextEventDispatcherListener and implements PuppetWidget::IMENotificationRequestsRef().

MozReview-Commit-ID: 2SW3moONTOX

--HG--
extra : rebase_source : d2634ada6c33dbf7a966fadb68608411ee24bfab
2017-04-15 01:35:58 +09:00
JW Wang
433b4bb763 Bug 1348053 - add the UrgentStart flag to the channel when the loading is initiated by a user interaction for quicker network response. r=cpearce
MozReview-Commit-ID: 1tk9k8u1zTu

--HG--
extra : rebase_source : 349a518dd071f4c4b10a3853f7d42fe9a43f0804
extra : intermediate-source : 379f010a50f6a72d5429c530b1a24bfd1c9ed803
extra : source : cd10c3301c6da15e9bc87b956d8cc2c956acefaf
2017-04-10 15:23:11 +08:00
JW Wang
f2ea37e57b Bug 1357986 - Use helper functions of TimeUnit to make code more readable. r=kaku
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().

MozReview-Commit-ID: 6hC94PXx86i

--HG--
extra : rebase_source : 1ea3b409e6ec12915f3e1a00359d6ff4152c8917
extra : intermediate-source : e31a12ad0e7a4840119036f261ed17eaaff85734
extra : source : ae07ee48000c4a52da0e4fd502b4d690ec51ce1f
2017-04-17 16:35:04 +08:00
JW Wang
d2ca2106c9 Bug 1357983 - remove media::Microseconds. r=gerald
media::TimeUnit can take its place. We don't want 2 things for the same purpose to cause confusion.

MozReview-Commit-ID: 3z6hbgXFsxP

--HG--
extra : rebase_source : 0b472e351abdc48e337aaf645ae8be467e8a300f
extra : intermediate-source : 4e2156ec04fd30af6cf59adfd1390cf67f411d4c
extra : source : bf5b035c7041a892517373dd566d2a7d7ec60c72
2017-04-17 14:34:36 +08:00
bechen
d116c9373e Bug 1353689 - selectors/cue : Enable testcases under */selector/* . Fix the padding and overflow issue. r=rillian
MozReview-Commit-ID: 6jdlx01hEv7

--HG--
extra : rebase_source : 93a63954d5b64cb8a33de1ce560da8f97a5a2001
2017-04-17 17:27:23 +08:00