Commit Graph

2362 Commits

Author SHA1 Message Date
Carsten "Tomcat" Book
37cacb6747 Merge mozilla-central to fx-team 2016-07-08 12:17:32 +02:00
Boris Zbarsky
3b1ead601a Bug 1282150 part 5. Kill off all the unused GetJSContextForEventHandlers cruft. r=bholley 2016-07-07 20:08:26 -04:00
Jan Henning
47101d08ae Bug 1282902 - Part 3 - Let the MobileViewportManager recalculate the saved resolution if the display width changed before restoring. r=kats
The mobile session store saves the current document resolution in order to restore the previous zoom level when restoring a page. If the display width has changed since the session data was captured (e.g. because the device was rotated), the resolution might have to be scaled appropriately.
Currently, the session store does this scaling by itself by comparing the stored and current window widths, however this implementation is slightly simplified and doesn't cover all use cases, which means some pages can be restored at a wrong zoom level after rotation. To correctly cover all cases, the session store would have to compare viewport widths, too.

Because the MobileViewportManager doesn't wait for the session store to set the restore resolution, the latter has to call setRestoreResolution() as early as possible in order to guarantee that the restore resolution is set before the first paint of the document. Therefore the session store currently calls this after receiving a LocationChange notification. However at that time, the correct viewport for the current document is not yet available, which means the resolution cannot be recalculated by the session store at that point.

Therefore, this patch changes the approach taken and lets the MVM handle all resolution calculations instead. The session store now simply passes the stored previous display dimensions along with the previous document resolution to the MVM, which can then compare them to the current display and viewport widths and scale the resolution appropriately before using it during first paint.


MozReview-Commit-ID: IGxWw87yftK

--HG--
extra : transplant_source : e%8D%BD%26%D2%C3%8E5%E3%2B%C0t%BA%DB%C1%BBs%3F%13%1F
2016-07-01 21:23:25 +02:00
Jan Henning
b357e8c764 Bug 1282902 - Part 1 - Add a helper method for getting the content viewer size in device pixels. r=kats
The intention is for the session store to record the current window size and then pass it to the MobileViewportManager for restoring, so the latter can correctly scale the stored resolution if the display width has since changed. However currently all window dimensions available from the JS side are measured in CSS pixels rounded to integers. Transforming those values back into display pixels by multiplying them with "window.devicePixelRatio" (or accessing window.gScreenWidth/Height, which does the same thing internally) unfortunately introduces some rounding errors.

Therefore this patch introduces a new helper method in DOMWindowUtils which allows to access the content window width as measured in device pixels from the JS side, too.

MozReview-Commit-ID: FGNQlXhkgrU

--HG--
extra : transplant_source : %8B%90G%5C%C7%87%B8%8F%0D%EA%3B%FF%3AU%D5%07%81%E7%7Cq
2016-06-30 23:15:41 +02:00
Fabrice Desré
f855149768 Bug 1284455 - Remove the System Messages API, Gecko part r=me
MozReview-Commit-ID: 1mhzddSLkuu

--HG--
extra : rebase_source : f230538d50f7c944825e1833c97ee0f56ecb86f8
2016-04-20 19:04:13 +02:00
Kaku Kuo
384567c29a Bug 1282710 - Part 1 - implement the suspend and resume logics in HTMLMediaElement.cpp according to visibility events; r=cpearce r=kamidphish
MozReview-Commit-ID: 4SyqzA1dnPB

--HG--
extra : transplant_source : %9B%B3%931N3%D75%2AH%5D%60%13T%0A%E8%7B%2A%EB%9E
2016-07-04 13:26:40 +08:00
Paul Roberts
ec18fc5ff7 Bug 671389 - Implement CSP sandbox directive. r=ckerschb r=smaug
--HG--
extra : rebase_source : d9c5f5868c2558a3696cd489674da6f243be11ad
2016-06-29 07:48:44 -07:00
Makoto Kato
954a8896f5 Bug 1203871 - Part 4. Implement QUERY_TEXT_RECT_ARRAY to nsIDOMWindowUtils for unit test. r=masayuki,smaug
To test eQueryCharRectArray, I would like to add it to nsIDOMWindowUtils.  Also this require unit test and will require external keyboard support on Android

Masayiki asks me more review to smaug this due IDL change.

MozReview-Commit-ID: 24lvQxXBnRX

--HG--
extra : rebase_source : 30788f550a465dc1ee058bf71d56656a89e364c2
extra : histedit_source : 2d2a2d4309b1fde6416408fe0e0d6b0f313898fb
2016-06-23 10:42:00 +01:00
Chih-Yi Leu
8733310923 Bug 1221730 - Change GamepadServiceTest into webidl. r=qdot, r=baku
--HG--
extra : rebase_source : 8e04725e80467a17d1a1a775f791782abe842c1b
2016-06-28 00:26:00 +02:00
Masayuki Nakano
60bb642e47 Bug 1275528 part.1 Support a way to query content relative to insertion point r=smaug
Native IME handler may want to query content relative to start of selection (or composition if there is it). Additionally, in e10s mode, insertion point in actual content may be different from the cache in parent.  Therefore, in some cases, it does make sense to query content with offset relative to start of selection or composition.

This patch implements it simply and only in non-e10s mode.

Additionally, this fixes a bug of nsQueryContentEventResult::GetOffset() which hasn't been accepted its calls even if the event message is valid (eQueryTextContent, eQueryTextRect and eQueryCaretRect).

MozReview-Commit-ID: 34I7vyTUAgO

--HG--
extra : rebase_source : d79ba0dc3e002f7691495ee1ff8bdb3854d8f6fe
2016-06-16 14:10:49 +09:00
Wes Kocher
4207c30811 Merge fx-team to central, a=merge CLOSED TREE 2016-06-21 10:10:21 -07:00
Masayuki Nakano
d5bf222ecd Bug 1275914 part.7 Add automated tests to query IME selections r=smaug
MozReview-Commit-ID: GwBU6Evcpfa

--HG--
extra : rebase_source : d6a54b3ab227fbae75e723b277f0ff1e95d44044
2016-06-20 16:31:29 +09:00
SUN Haitao
bc7d6ef55c Bug 1264815 - Rename 'serviceWorkerRegistrationID' to 'serviceWorkerRegistrationScope'. r=kcambridge 2016-05-26 22:19:09 +08:00
Kit Cambridge
21fdc3d97d Bug 1275434 - Refactor PushNotifier to clarify remoting logic. r=dragana
Previously, all `PushNotifier` methods checked the process type, and
either called `Notify*{Workers, Observers}` or sent an IPDL message.
The message handlers then called back in to `PushNotifier` from the
remote process.

This was clearer when we only sent worker event notifications to the
content process, and fired all observer notifications in the parent.
It became more complicated once we started notifying observers for all
subscriptions in both processes (bug 1266433). This makes it harder to
see omissions; for example, "push-subscription-modified" isn't
currently forwarded to the child, but "push-subscription-change" and
"push-message" are.

This patch moves the remoting code into `PushNotifier::Dispatch`, and
adds a base `PushDispatcher` class. Each notification type subclasses
this class and implements logic for sending messages and firing
observers and worker events. It's more code, but a bit easier to see
which methods are called where.

MozReview-Commit-ID: 7Q0eD7qXOrW

--HG--
extra : rebase_source : c69acb95a0cb5470cf1c804639971be41b976cc2
2016-05-19 19:01:34 -07:00
Frederik Braun
404a0bbb99 Bug 1265318: add require-sri-for CSP directive. r=ckerschb
MozReview-Commit-ID: 200PAvKtBME
2016-05-31 11:14:00 +02:00
Kit Cambridge
d9d287a14e Bug 1265841 - Implement the notificationclose service worker event. r=wchen,baku
MozReview-Commit-ID: EQfCbQKqn9H

--HG--
extra : rebase_source : 2dad51a3c148db794769fb7c64c28f81ea2ca6ff
extra : histedit_source : 254e2e372ba605f74c1f5106f40b207e492e85e1
2016-04-19 22:04:09 -07:00
Bill McCloskey
291c555f34 Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
Samael Wang
d6e0c31eda Bug 1271240 - Part 1: Support prerender flag in e10s and implement makePrerenderedBrowserActive(). r=smaug
MozReview-Commit-ID: 73E2kmqxRwm

--HG--
extra : rebase_source : 35441f58e15013b00a0774f764378fd5e0143add
2016-05-20 11:36:27 +08:00
Boris Zbarsky
2b85094faf Bug 909633. Remove the HTML Microdata API, since no one else ended up implementing it and now it's been removed from the spec. r=bkelly,jgraham 2016-05-20 23:13:17 -04:00
Kartikaya Gupta
b9e4a263e3 Bug 1270019 - Add a SetRestoreResolution API for fennec's SessionRestore to use. r=rbarker
MozReview-Commit-ID: 7WqmgAkFItQ
2016-05-17 14:50:08 -04:00
Gabor Krizsanits
2585c3f697 Bug 1255138 - Window resize support from JS for e10s. r=mconley 2016-05-11 11:44:57 +02:00
Kit Cambridge
de899472f4 Bug 1269436 - Always pass the principal to push observer notifications. r=dragana
MozReview-Commit-ID: J1vU3nRKlsa

--HG--
extra : rebase_source : 9a1fabbdc42afb92a224fb5e89c2eaf106943cc9
2016-05-02 09:38:47 -07:00
Kit Cambridge
a186376653 Bug 1269385 - Notify Dev Tools when a push subscription is modified. f=janx r=dragana
MozReview-Commit-ID: 3iTl7jH9IkB

--HG--
extra : rebase_source : 4b3fe86714564373cd4fc1efc10239e12b8bbc76
2016-05-02 08:20:14 -07:00
L. David Baron
91233fe6f4 Bug 1271015 patch 1 - Add mechanism for testing the number of elements restyled. r=heycam
This is useful for writing tests that test particular optimizations,
such as that a particular operation doesn't cause restyles.  It sits
next to similar counters for frames constructed and frames reflowed.

I also snuck in a preference for the less-expensive mPresContext over
the more expensive mFrame->PresContext() (which dereferences multiple
pointers).

(Originally written for work I planned to be part of bug 1189598.)

MozReview-Commit-ID: 8PN7nwLJG9r
2016-05-09 11:26:35 -07:00
Ehsan Akhgari
eaba90d427 Bug 1261011 - Remove Inter-App Communication API; r=fabrice 2016-05-05 07:39:10 -04:00
Alastor Wu
60f0aad68a Bug 1242874 - part2 : window's suspend attribute. r=baku, r=ehsan
MozReview-Commit-ID: 2GZMjsaQWHC

--HG--
extra : rebase_source : 7840bda5c5e7e59d27fede1fce03a6b52760e798
2016-05-03 09:51:22 +08:00
Andrea Marchesini
1c0c183890 Bug 1261009 - Remove the Data Store API, r=fabrice 2016-04-29 09:02:45 +08:00
Carsten "Tomcat" Book
92d4b1a25d Backed out changeset 50896498013c (bug 1242874) 2016-04-28 13:59:06 +02:00
Alastor Wu
1bc115c492 Bug 1242874 - part2 : window's suspend attribute. r=ehsan, r=baku
MozReview-Commit-ID: Jw3E8Jdb66J

--HG--
extra : transplant_source : %2C%DF%BE%2A%8B%A6%5B%CA%DD%FAp%01%A8c%FB%9B%B4%017q
2016-04-28 00:21:27 +08:00
Jonathan Watt
2bb448cbb2 Bug 1267509 - Make nsContentSecurityManager::IsURIPotentiallyTrustworthy act on an nsIPrincipal. r=bz
MozReview-Commit-ID: Zu1zU4Brkx

--HG--
rename : dom/security/test/unit/test_isURIPotentiallyTrustworthy.js => dom/security/test/unit/test_isOriginPotentiallyTrustworthy.js
2016-04-26 11:30:43 +01:00
Kit Cambridge
2e593175f4 Bug 1266433 - Update the comments in the Push XPIDL interfaces. r=me
MozReview-Commit-ID: 7s9VFqYYV9s

--HG--
extra : rebase_source : 65498b06fd03e7824cf197e4f292f8b7fd5e85fb
2016-04-26 10:20:08 -07:00
Kit Cambridge
14ee7e9341 Bug 1266433 - Indicate push subscriptions created by privileged code. r=dragana
MozReview-Commit-ID: HYKndQiU98U

--HG--
extra : rebase_source : 5671a231b02dacf71de77a0d15c284c9b6365a73
2016-04-23 19:41:59 -07:00
Kit Cambridge
6de951432a Bug 1266433 - Clean up nsIPushNotifier static casts. r=dragana
MozReview-Commit-ID: AsZZ4TJquuB

--HG--
extra : rebase_source : c38f971c435748947c85c1f2bba9ea69d7fddaf1
2016-04-22 20:27:44 -07:00
Kit Cambridge
87fd821095 Bug 1266433 - Send an observer notification when a push subscription is lost. f=janx r=dragana
MozReview-Commit-ID: EjCVWje2jLB

--HG--
extra : rebase_source : 1cab8dfb1514a44a6e36f37e55e520ebaa343659
2016-04-21 12:04:15 -07:00
Kit Cambridge
4a32c937e7 Bug 1266433 - Send Push observer notifications to parent and content processes. f=janx r=dragana
MozReview-Commit-ID: 1aUS8HcQApo

--HG--
extra : rebase_source : 63c35b05cf9219c311ce96cd99932c6c20bd1e0c
2016-04-21 11:11:03 -07:00
Kris Maglione
f3feb0cfd3 Bug 1254194: Allow iterating over and inspecting sources of parsed CSP directives. r=ckerschb
MozReview-Commit-ID: G8b86UvSv0y

--HG--
extra : rebase_source : c7857e88af0d94dd1162dccfe12aae6567945f2c
2016-04-23 20:42:43 -07:00
Kit Cambridge
3dc35814a4 Bug 1247685 - WebIDL and DOM implementation changes for app server keys. r=mt,baku
MozReview-Commit-ID: 1xYjSuLMnV4

--HG--
extra : rebase_source : 6bcb2e662cfa9a0d942731e8914a9df2e3dee197
2016-03-22 13:38:03 -07:00
Alastor Wu
b5361feb4b Bug 1249579 - part2 : audio competing suspend/resume methods. r=snorp, baku.
MozReview-Commit-ID: EjNvKELCiAy

--HG--
extra : transplant_source : %AE%20%21e%E1%94%DE%29B%9C%F5%04%13%C6%3Dr%D3%9Aj%B4
2016-04-18 18:48:41 +08:00
Haik Aftandilian
50fdb00a05 Bug 1258925 - [e10s] Browser window is resized when click. r=gabor
Adds a new IPC message to the PBrowser protocol exposing
the number of tabs in the current window to the content
process. This allows the content process to reject window.resize*
calls in cases where there is more than one tab in the
window.

--HG--
extra : histedit_source : dfa6b7b71882a1583cbbe90c2a7327cb212ed15d
2016-04-14 14:03:00 -04:00
Mike Conley
1cff2809c8 Bug 1264409 - Make last transaction ID available via nsIDOMWindowUtils, and pass transaction ID through MozAfterPaint. r=mattwoodrow,mrbkap
MozReview-Commit-ID: 7wCYif8F6ws

--HG--
extra : rebase_source : 5a87a558dbb7955c04842b6f8b71adb15ecd3370
2016-04-13 16:59:15 -04:00
Kartikaya Gupta
0d937a92c1 Bug 1257641 - Allow enabling/disabling of displayport suppression for tests. r=botond
MozReview-Commit-ID: 7p2RIyPyzkH
2016-04-13 10:21:13 -04:00
Josh Matthews
80d7a050f3 Bug 1255576 - Propagate privacy status for removed content preferences to observers. r=adw 2016-04-04 15:25:58 -04:00
Kit Cambridge
f57e60c641 Bug 1247089 - Log Web Push decryption errors. r=bkelly
MozReview-Commit-ID: HEEq8IPlwBx

--HG--
extra : rebase_source : 8501836fa322b3a09ffec21e83fdb32e4aa3abf5
2016-03-28 13:33:20 -07:00
Kit Cambridge
d55b21e98b Bug 1246341 - Report push event errors and rejections to the Push service. r=baku
MozReview-Commit-ID: D6fRPqojOEh

--HG--
extra : rebase_source : 41c55862cb7393681fdea28e35b689a970a376c3
2016-03-28 11:50:39 -07:00
John Dai
d5b4810bd4 Bug 1256299 - Remove redundent trailing spaces. r=bz
--HG--
extra : rebase_source : 306f13563f9530118ab898ffe8018f7071e79a1e
2016-03-25 18:23:53 +08:00
Christoph Kerschbaumer
39f2d53360 Bug 1122236 - CSP: Implement block-all-mixed-content (r=tanvi,kate,mrbkap) 2016-01-13 20:58:16 -08:00
Ehsan Akhgari
a36acab5c8 Bug 1256178 - Drop the moz prefix from the MozCSSKeyframeRule and MozCSSKeyframesRule interfaces; r=bzbarsky 2016-03-15 10:23:01 -04:00
Kit Cambridge
d2fcfdda5d Bug 1253438 - Expose Push observer notification topics. r=markh
MozReview-Commit-ID: HublNSAD3NY

--HG--
extra : rebase_source : ca89fad6bfafa403e97c1e1defc4d3a0673af430
2016-03-03 14:37:10 -08:00
J. Ryan Stinnett
95f8000ac8 Bug 1238160 - Add assertions in non-desktop code paths. r=bz,fabrice
Several code paths try to ask the principal if it's in a browser element, but
the principal now only knows about *isolated* browser elements.  All such code
paths are currently unused on desktop.  The frame loader now asserts that
isolation remains enabled for cases where apps are used.

MozReview-Commit-ID: 775DZecc35t
2016-03-02 10:35:56 -06:00
J. Ryan Stinnett
a6d2c487b5 Bug 1238160 - Set tab context's isolation from frame attr. r=smaug
Renames existing nsFrameLoader::OwnerIsBrowser* methods to add "Moz" prefix for
clarity.

Adds nsFrameLoader::OwnerIsIsolatedMozBrowserFrame which checks the noisolation
attribute of mozbrowser frames, if present.

This is used to set isolation in nsFrameLoader::GetNewTabContext only when true.

MozReview-Commit-ID: Dz02xBoKh1P
2016-03-02 10:35:56 -06:00