Commit Graph

22996 Commits

Author SHA1 Message Date
cku
b76d64f617 Bug 1399787 - Part 13. Handle AbortDocument. r=jwatt
While aborting conversion, we need to make sure there is no coversion task
executing in the PDFium process before destroying it.

MozReview-Commit-ID: 3Iqhe8KmYv2

--HG--
extra : rebase_source : b82fe3b7231d9c4a171d6a19cd22c0c7ff47b4bf
extra : source : 753ed705666fd4c55da456fb80604e4552d6bd52
2017-11-05 15:34:54 +08:00
cku
18a35d000e Bug 1399787 - Part 11.d. Using PrintTargetEMF on windows if skia-pdf is enable. r=jwatt
MozReview-Commit-ID: Hx94fqGJFz6

--HG--
extra : rebase_source : ba3ad9dc34a356918d099c8fb5c925cf637bd95a
extra : source : 564351eb834faef9c2363edd690d80e7b24a2c41
2017-11-14 13:57:11 +08:00
cku
0088c161b3 Bug 1399787 - Part 10. Make PrintTargetEMF use the PDFium process to convert to EMF. r=jwatt
We integrate PrintTargetEMF with the PDFium process to convert PDF into EMF in
this patch.

MozReview-Commit-ID: 5F0setrL94n

--HG--
extra : rebase_source : 576e077f804785da20923620d9c4e3041936e835
extra : source : 28f1671230fa70125e6971c9a287cb0658b89496
2017-11-05 03:06:04 +08:00
cku
fe99eaf1f9 Bug 1399787 - Part 9. Sandbox the PDFium process. r=bobowen,jwatt
MozReview-Commit-ID: 6ED7EPZvOMR

--HG--
extra : rebase_source : 5dbc1330a355e01a3a40e8145b35556cd27f0394
extra : intermediate-source : d90c5064d88a6468c1209f4a78ec7631592eec98
extra : source : 91b761e38efd28a69647c38531f5418fffee8f50
2017-10-18 20:52:45 +08:00
cku
a46e2d8e44 Bug 1399787 - Part 8. Open PDFium protocol channel. r=jwatt
MozReview-Commit-ID: F9W9ykEtVmK

--HG--
extra : rebase_source : 41936e4b7ffdb5ec00a005d4aeaa2754fe2f6daa
extra : intermediate-source : f9ef88f9ddc9ddb114633075472f5a20985d8c39
extra : source : 63e98299090e4fb98c2fb50aa9eaac35f35ca232
2017-10-17 12:48:30 +08:00
cku
2615f0ab34 Bug 1399787 - Part 7. Have PrintTargetEMF launch the PDFium process. r=jwatt
MozReview-Commit-ID: CVfB81ifV2p

--HG--
extra : rebase_source : 88725db5962ce59282fc3df298f3224446c9e086
2017-11-29 17:15:31 +08:00
cku
65b891af3e Bug 1399787 - Part 5. Implement the PDFium process. r=jwatt
MozReview-Commit-ID: 502jB9DAeIC

--HG--
extra : rebase_source : 276ed502c49cd913114e9a58d43e8ae9d61f9898
extra : intermediate-source : 695dfd5232f9e3ca08205fbc99cc5cbbe8737b12
extra : source : 2903a56630965e02602ff4aa3e38c51207b6fa15
2017-10-16 16:22:07 +08:00
cku
f605599984 Bug 1399787 - Part 4. Take out the code we landed in bug 1370488. r=jwatt
To move EMF conversion job to a dedicated process, I will implement a new
PrintTarget subclass, named PrintTargetEMF, to coordinate tasks among the
content process, chrome process and PDFium process. All the code that we
change in nsDeviceContextSpecWin is no longer needed.

MozReview-Commit-ID: GgKZoB92WYE

--HG--
extra : rebase_source : 1687d72a8fe88223f17c954c23022236dfe029a0
2017-11-05 00:53:05 +08:00
cku
31ba0da513 Bug 1399787 - Part 3. Create a top level protocol for the PDFium process. r=jwatt
Define ipdl and actor classes. Implementation of actors is added in subsequent
patches.

Control flow:
1. A user starts a printing job.
2. We create a PrintTarget to print web content page by page.
3. When printing pages:
   a. PrintTarget, who lives in the chrome process, create a new FileDescriptor
      and pass that FD to the content process.
   b. The content process renders page contents into the given FD.
   c. PrintTarget render that FD, which contains only one page, into a PDF
      file.
   d. PrintTaget asks PDFium process to convert that PDF file into EMF contents
      by *ConvertToEMF*
   e. The PDFium process converts the given PDF into EMF contents and send back
       EMF contents by *ConvertToEMFDone*
   f. PrintTaget playbacks that EMF onto a printer DC. One page is printed!
   f. If all pages are printed, then finalize print job; Otherwise, loop back
      to #a.

The control flow that we landed in bug 1370488 does not work like the flow
I described above.
In [1], we paint all pages into one single PDF file. After all pages are
rendered into this PDF file, we finalize the current print job, which means the
printing progress dialog is close. *Then* we start to convert that PDF into
EMF and print each EMF page onto printer DC. We can not cancel this conversion
task since the printing dialog is close, there is no UI allow us to do that.
One more serious problem is: since the printing progress dialog is close,
people think that printing is done, but actually it's not.

Except move EMF conversion to a dedicated process, named PDFium process, I will
also fix the behavior we landed in bug 1370488.

[1]
https://hg.mozilla.org/mozilla-central/rev/b611ec2a42bf

MozReview-Commit-ID: JAnmNc3gAVK

--HG--
extra : rebase_source : b6459a187de8e066e7574d2b8757d09fbcfcddba
extra : intermediate-source : 6d6cff8961fa14160b624b2879d231b32c61a8f5
extra : source : b172d78e8c1d801e1e28afd8fedb9fcfff77d113
2017-10-13 16:58:07 +08:00
cku
be1ec835a8 Bug 1399787 - Part 2.c. Rename DrawPageToFile to SavePageToFile. r=jwatt
This is to make the naming more consistent with SavePageToBuffer.

MozReview-Commit-ID: 5miYvv9yFFR

--HG--
extra : rebase_source : 07d1f72b33f962622a843355da6d3067a286483a
2017-11-02 20:19:30 +08:00
cku
2f777dcbae Bug 1399787 - Part 2.b. Add functions to read/write EMF content from/to a buffer. r=jwatt
With the help of these new function, we can serialize/deserialize EMF content
in/out a share memory object.

MozReview-Commit-ID: Dm45xEXmMqS

--HG--
extra : rebase_source : 8203924d873509ccb2d869bf1b427afb6afb718e
extra : source : 61f81b148f8b1d1569d7cf279575b38f4570171f
2017-11-01 20:27:17 +08:00
cku
a07e7d69cf Bug 1399787 - Part 2.a. Add functions to load the content of a PDF from a FileDescriptor. r=jwatt
All the functions added in Part 2 are utilities for sharing EMF/PDF contents
between processes.

MozReview-Commit-ID: 3qKosXH56kY

--HG--
extra : rebase_source : 0531cfa563094c1a3a6dac4895ed1b8edfd285e0
extra : source : b61b651ed6f668e32176353d346b25d23e2cd932
2017-11-01 21:33:28 +08:00
Bob Owen
0160e22eae Bug 1420171 Part 2: Remove some unused members from nsDeviceContextSpecG. r=karlt 2017-11-28 08:58:58 +00:00
Bob Owen
546d657b09 Bug 1420171 Part 1: Only default the print-to file name on Linux if not already set. r=karlt
This allows the web extension saveAsPDF function to work properly.
2017-11-28 08:58:43 +00:00
cku
86f919fdad Bug 1399787 - Part 1. Fix namespacing and include issues hidden by unified compilation. r=jwatt
We will create several new files in the following patches for IPC and a new
subprocess. Several already existed files will be shifted into new build units,
we will meet several compile errors because of it.

This patch fixes those compile error in advance.

MozReview-Commit-ID: 5hd0sNYfBu0

--HG--
extra : rebase_source : b6b8b069f8f2167ef87266ba9c95e8fe53cca6f6
2017-10-06 22:01:22 +08:00
Martin Stransky
1c02893dc9 Bug 1423869 - don't draw to mContainer when decorations are rendered by window manager, r=jhorak
Bug 1421974 introduced new mechanism to hide system titlebar by enabling client-side decorations for main Firefox window. It also causes a regression when the CSD window setup is enabled when system titlebar is hidden by window manager.

This patch fixes that and enables the CSD window setup only for case when it's actualy used.

MozReview-Commit-ID: 6OzoPyxlhCp

--HG--
extra : rebase_source : 9bcfc96cd27cb088f8d9671780304c2ac3772fdf
2017-12-07 15:20:48 +01:00
Martin Stransky
53c4e3f117 Bug 1417874 - Split clipboard implementation to shared (nsClipboard) and backend specific (nsClipboardX11) parts, r=jhorak
MozReview-Commit-ID: 5IebGayJl1

--HG--
extra : rebase_source : 7009a0f5a668895930280fc4426baa22abdc499c
2017-11-16 14:00:00 +01:00
Bogdan Tara
71dd57ba46 Merge mozilla central to autoland. r=merge a=merge on a CLOSED TREE 2017-12-07 15:54:19 +02:00
Masayuki Nakano
600d0e1cd9 Bug 1423456 - ContentCacheInParent::OnEventNeedingAckHandled() shouldn't decrement mPendingCompositionCount when it receives eCompositionCommit(AsIs) from the remote process but the composition has already been committed by a request to commit composition r=m_kato
After fixing bug 1420849, remote process started to ignore composition events
after it synthesizes eCompositionCommit event after requesting to commit
composition.  However, remote process still keeps returning composition events
when it receives from the main process.  So, if the main process has already
sent eCompositionCommit(AsIs) event when it's requested to commit composition
from the remote process, ContentCacheInParent::OnEventNeedingAckHandled()
receives both eCompositionCommitRequestHandled and eCompositionCommit(AsIs)
events for *a* composition.  Therefore, mPendingCompositionCount may be
decremented twice for a composition.  This causes hitting MOZ_DIAGNOSTIC_ASSERT.

So, ContentCacheInParent need to manage if sent composition events are ignored
or not.  Then, ContentCacheInParent::OnEventNeedingAckHandled() stops
decrementing mPendingCompositionCount when it receives eCompositionCommit(AsIs)
events which are ignored by the remote process.

This patch manages it with |mIsChildIgnoringCompositionEvents| and changes
|bool mIsPendingLastCommitEvent| to |uint8_t mPendingCommitCount| for
making ContentCache be able to manage multiple pending commit events if
its remote process is too busy.

MozReview-Commit-ID: CYQDeZXl7TJ

--HG--
extra : rebase_source : 6de1e2f1302d556d45d19c73b4d1ea3f86b65373
2017-12-06 15:07:41 +09:00
Masayuki Nakano
8418b1b497 Bug 1420849 - Make PuppetWidget discard composition events after requesting commit composition and synthesizing eCommitComposition event until new eCompositionStart event comes r=m_kato
When ContentCacheInParent::RequestIMEToCommitComposition() returns true,
the remote process will synthesize eCompositionCommit event.  This causes
destroying TextComposition event in the remote process (by
IMEStateManager::DispatchCompositionEvent()).  Then,
IMEStateManager::DispatchCompositionEvent() will recreate new TextComposition
instance when it receives new composition event.  Then, it may request
to commit composition to the main process via PuppetWidget accidentally.

So, after PuppetWidget::RequestIMEToCommitComposition() synthesizes
eCompositionCommit, PuppetWidget should discard following composition events
until it receives eCompositionStart since they are unnecessary for the content
and they are for the old composition, i.e., outdated events.

MozReview-Commit-ID: BNRcoYxABpd

--HG--
extra : rebase_source : caea469afeed8cc373aeca33199ac0d570052569
2017-11-27 20:34:01 +09:00
lochang
e889dbe685 Bug 1417751 - Implement a new value inner-spin-button to -moz-appearance on all platforms except Android. r=mats
MozReview-Commit-ID: 7jpLCOWZA2x

--HG--
extra : rebase_source : d2a4d160d26e6f6996ed1cb3a673576236b8ef23
2017-11-29 10:43:13 +08:00
Narcis Beleuzu
c396d718bd Merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2017-12-01 00:46:03 +02:00
Jim Chen
675847149d Bug 1416316 - 4. Update comments and bindings; r=jchen
MozReview-Commit-ID: 9CBe7Iej1D8

--HG--
extra : rebase_source : 0db28213833915747d9b34fe58458348a33458ad
2017-11-30 13:25:51 -05:00
Jim Chen
84ca8a1479 Bug 1416316 - 3. Update NPZC usages; r=rbarker
Remove NPZC references from LayerView, and add an NPZC getter in
LayerSession. Use the new APIs in GeckoView to forward events to NPZC.

MozReview-Commit-ID: 1UcJkpW0XuM

--HG--
extra : rebase_source : 6f50d1ca9398a2549678cc4e0fbb2578d284f63a
2017-11-30 13:25:50 -05:00
Jim Chen
bd61ff7f2f Bug 1416316 - 2. Clean up NativePanZoomController; r=rbarker
Clean up the NativePanZoomController object including,

1) Remove references to LayerView because NPZC will be created and used
by LayerSession.

2) Rename `mDestroyed` to `mAttached` because NPZC now needs to support
cases where it's used before being attached, in addition to after being
destroyed.

3) Move origin of synthesized event coordinates from the screen to the
surface in native code, so we don't need to do the same thing in Java.

4) Invoke all callbacks from native code on the UI thread.

MozReview-Commit-ID: Fu4XIY59yKw

--HG--
extra : rebase_source : cb4d432cb940cfa92f3c0a931f1f2d2991932462
2017-11-30 13:25:50 -05:00
Jim Chen
c8f7a24671 Bug 1416316 - 1. Move overscroll to LayerSession; r=rbarker
There is some overscroll handling code in NativePanZoomController that
should be moved, along with other overscroll code in LayerView, to
LayerSession. LayerSession now provides a getter for
OverscrollEdgeEffect, which is cleaned up to have a public API with
documentation.

MozReview-Commit-ID: LkKHFS8OkR7

--HG--
extra : rebase_source : dc6b680b1cc7d7e2dd221091a63a208971d63c80
2017-11-30 13:25:50 -05:00
Cosmin Sabou
7d7b59dd0b Backed out changeset 423f4e43a975 (bug 1417751) for xpcshell failures at devtools/shared/tests/unit/test_css-properties-db.js r=backout on a CLOSED TREE 2017-11-28 13:50:59 +02:00
Noemi Erli
c528f7e479 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-12-02 23:47:37 +02:00
Emilio Cobos Álvarez
13a91fa9f6 Bug 1417200: Make -moz-border-colors chrome only. r=xidorn
On a CLOSED TREE, since the servo patch managed to get in.

This also makes the border longhand no longer reset them.

MozReview-Commit-ID: KNais1e5FnE
2017-12-01 23:25:01 +01:00
lochang
416f319bb8 Bug 1417751 - Implement a new value inner-spin-button to -moz-appearance on all platforms except Android. r=mats
MozReview-Commit-ID: 3I1LBLbCfmF

--HG--
extra : rebase_source : f9a356d592eac90d91a59de0c7ab0ded6ab80ab2
2017-11-28 10:39:50 +08:00
Masayuki Nakano
b1a20692e4 Bug 1418747 - ContentCacheInParent needs to initialize mPendingCommitLength with 0 when it's created r=m_kato
ContentCacheInParent::mPendingCommitLength is never initialized until it
receives eCompositionCommit(AsIs) event from widget or receives the latest
content from the remote process when there is a composition.

The bug is, immediately after dispatching eCompositionStart and first
eCompositionChange event, MS Pinyin tries to query the character at caret,
but ContentCacheInParent::HandleQueryContentEvent() tries to resolve
related position of an eQueryTextRect event with the uninitialized
mPendingCommitLength.  Therefore, the query almost always fails and MS Pinyin
gives up to show its candidate window.

This patch just initializes the member with 0.

MozReview-Commit-ID: JyYNqi8hoTa

--HG--
extra : rebase_source : bdc504f83abdbb21e11ea69290908ed501e9a65f
2017-11-27 18:51:01 +09:00
Andrea Marchesini
2ef23c7ade Bug 1420223 - createImageBitmap must work with nsIAsyncInputStream - part 4 - ImageBitmap must use imgITools::decodeImageBuffer, r=aosmond 2017-11-27 17:05:57 +01:00
Botond Ballo
1b91441c7c Bug 951793 - Obey overscroll-behavior for swipe navigation. r=mstange
MozReview-Commit-ID: i2BuiAfG71
2017-11-25 01:29:15 +01:00
Sebastian Hengst
6d4637aebb Backed out 15 changesets (bug 951793) because it landed before the necessary servo changes. r=backout requested by emilio on a CLOSED TREE
Backed out changeset ca8c86e229df (bug 951793)
Backed out changeset 6eef6403fa71 (bug 951793)
Backed out changeset a5e529f52fb1 (bug 951793)
Backed out changeset 054e837609d0 (bug 951793)
Backed out changeset 713a3c9617ce (bug 951793)
Backed out changeset 884913aa1668 (bug 951793)
Backed out changeset c3340b84e534 (bug 951793)
Backed out changeset 50fe3c6ac486 (bug 951793)
Backed out changeset be4e22e5c257 (bug 951793)
Backed out changeset 7055bd5dfc4e (bug 951793)
Backed out changeset fa6da1e723cf (bug 951793)
Backed out changeset 386f77004d89 (bug 951793)
Backed out changeset fa82cdc01408 (bug 951793)
Backed out changeset 867d8ea5355c (bug 951793)
Backed out changeset e61ac8e48971 (bug 951793)
2017-11-25 01:01:41 +02:00
Botond Ballo
3ddd46e5f1 Bug 951793 - Obey overscroll-behavior for swipe navigation. r=mstange
MozReview-Commit-ID: i2BuiAfG71

--HG--
extra : rebase_source : 9fd9b60db5c6e5f01033f6dca934024ce488cedb
2017-10-23 18:27:24 -04:00
arthur.iakab
dfc104159a Merge inbound to central r=merge a=merge 2017-11-24 12:00:30 +02:00
Markus Stange
aea1e0fbbf Bug 1417709 - Add system colors called "-moz-mac-vibrant-titlebar-light/dark" for use with -moz-font-smoothing-background-color. r=emilio
MozReview-Commit-ID: 9FbRlPvrLMX

--HG--
extra : rebase_source : 84330fd5824468e4617649828d7902fc8f001f48
2017-11-16 11:50:09 -05:00
Markus Stange
cfe43479ab Bug 1417709 - Implement -moz-appearance: -moz-mac-vibrant-titlebar-light/dark on macOS. r=jrmuizel
MozReview-Commit-ID: ElMpYslSXOg

--HG--
extra : rebase_source : c9baf205bdfc17cd4c783aef62184635901deba0
2017-11-16 11:36:52 -05:00
Markus Stange
9a0061990e Bug 1417709 - Change GatherThemeGeometryRegion to GatherVibrantRegion. r=jrmuizel
MozReview-Commit-ID: 3Oytxnut623

--HG--
extra : rebase_source : 16c89319749efa1f16a4909f6f9dacb59f76e3d1
2017-11-16 11:34:09 -05:00
Margareta Eliza Balazs
2cb7aeff33 Backed out 5 changesets (bug 1417709) for failing X in devtools/shared/tests/unit/test_css-properties-db.js r=backout on a CLOSED TREE
Backed out changeset 5670c9582add (bug 1417709)
Backed out changeset 50f0febe43a0 (bug 1417709)
Backed out changeset 29e6c0d82193 (bug 1417709)
Backed out changeset e3a6c5b74595 (bug 1417709)
Backed out changeset a0fe569c86c0 (bug 1417709)
2017-11-23 01:17:07 +02:00
shindli
a0b20fcb81 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-22 23:42:02 +02:00
shindli
82254ca1cf Merge inbound to mozilla-central r=merge a=merge 2017-11-22 23:29:44 +02:00
James Willcox
e626ddf5dc Bug 1409113 - Relax the user input requirement in order to show VKB on Android r=jchen
MozReview-Commit-ID: 4lvuGFyWj76
2017-11-22 10:09:07 -06:00
James Willcox
e1181af857 Bug 1409113 - Add nsIPresShell::HasHandledUserInput() status to InputContext r=masayuki
MozReview-Commit-ID: 60x35NKEzhA
2017-11-22 10:09:06 -06:00
James Willcox
bacda12532 Bug 1409113 - Add nsIPresShell::HasHandledUserInput() r=masayuki
MozReview-Commit-ID: 3Yr5UmFJx5h
2017-11-22 10:09:04 -06:00
Masayuki Nakano
02815812a9 Bug 1405832 - part 4: ContentCacheInParent::OnEventNeedingAckHandled() shouldn't crash in release build r=m_kato
For protecting main process, we should stop crashing main process in release
build even when we detect our bug.  However, we should keep crashing with
MOZ_DIAGNOSTIC_ASSER which is enabled only on Night and Developer Edition.

MozReview-Commit-ID: 5BQ46IFzXXj

--HG--
extra : rebase_source : 1a894bb23b6b9f386b19eba95d14cd8db80fb2c6
2017-11-20 23:30:18 +09:00
Masayuki Nakano
07dc211d1a Bug 1405832 - part 3: ContentCacheInParent::RequestIMEToCommitComposition() should call nsIWidget::NotifyIME() via TextComposition::RequestToCommit() r=m_kato
Now, TextComposition::RequestToCommit() manages if it has already requested
IME to commit or cancel composition and this is important for redundant
requests.  Therefore, ContentCacheInParent::RequestIMEToCommitComposition()
shouldn't call nsIWidget::NotifyIME() directly.

MozReview-Commit-ID: 69VpgyK9Jk5

--HG--
extra : rebase_source : 5b86c11669c7a69ceb0a2af155765834621ee968
2017-11-20 23:08:37 +09:00
Masayuki Nakano
c4f2acf2f3 Bug 1405832 - part 2: TextComposition::RequestToCommit() should request IME to commit or cancel composition only when it hasn't been request it yet and hasn't received commit event yet r=m_kato
According to the log in crash reports, eCompositionCommitRequestHandled is
sent to ContentCacheInParent twice or more for a composition.  This causes
breaking mPendingCompositionCount and mPendingEventsNeedingAck management.

Currently, nsIWidget::NotifyIME() should be called only by
TextComposition::RequestToCommit().  Therefore, the method should manage if
it should request it actually.  If the composition has already received
eCompositionCommit(AsIs) event, it shouldn't request it because parent process
may have already stated new composition and it shouldn't be broken by request
for old composition.

MozReview-Commit-ID: 2ekSa6EIeRP

--HG--
extra : rebase_source : d23aa29ce7871e83b99cec8c15aff0c580e08fb4
2017-11-20 22:59:04 +09:00
Masayuki Nakano
b07eba4f1e Bug 1405832 - part 1: ContentCacheInParent::RequestIMEToCommitComposition() should increment mPendingEventsNeedingAck itself if it treat the request handled synchronously without actually requesting IME to commit composition r=m_kato
This is a simple bug of ContentCacheInParent.  When
ContentCacheInParent::RequestIMEToCommitComposition() returns true,
PuppetWidget::RequestIMEToCommitComposition() will send
eCompositionCommitRequestHandled pseudo event message back to the main process.
This causes counting down mPendingEventsNeedingAck in
ContentCacheInParent::OnEventNeedingAckHandled().  Therefore, in the normal
path, ContentCacheInParent::OnCompositionEvent() increments it for receiving
the pseudo event message.

However, if the tab parent has already lost focus,
RequestIMEToCommitComposition() returns true without requesting native IME to
commit composition.  So, ContentCacheInParent::OnCompositionEvent() cannot
increment mPendingEventsNeedingAck for coming
eCompositionCommitRequestHandled.  Therefore, RequestIMEToCommitComposition()
needs to increment mPendingEventsNeedingAck by itself when it won't request
IME to commit composition but it returns true.

MozReview-Commit-ID: 4Alwfy8avB

--HG--
extra : rebase_source : 2588221568440beecc2b992910fa53729b8abe1c
2017-11-20 22:20:02 +09:00
Gabriele Svelto
cbb30621ec Bug 1402519 - Remove MOZ_CRASHREPORTER directives from widget; r=froydnj
--HG--
extra : rebase_source : 4472a8d6ce5edf1b5a4665d522a1816020308a43
2017-11-23 10:59:04 +01:00
Martin Stransky
7916b9afd7 Bug 1419456 - Disable full CSD support for XFCE as it does not support GDK_DECOR_BORDER, r=jhorak
MozReview-Commit-ID: BFOgxJ3abrT

--HG--
extra : rebase_source : f17d0a8d1e64b09aa02f7c0b314980db0eacee84
2017-11-21 20:03:21 +01:00
Ciure Andrei
c7cf019289 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2017-11-22 12:20:25 +02:00
James Willcox
436c2828a9 Bug 1416015 - Ensure SurfaceTexture desctruction happens correctly r=jnicol
MozReview-Commit-ID: I4X1jQQC7ry
2017-11-21 12:43:31 -06:00
Markus Stange
47f0dbb9c5 Bug 1417709 - Add system colors called "-moz-mac-vibrant-titlebar-light/dark" for use with -moz-font-smoothing-background-color. r=emilio
MozReview-Commit-ID: 9FbRlPvrLMX

--HG--
extra : rebase_source : 95ed15a409d00df268478b786a50b925303512c0
2017-11-16 11:50:09 -05:00
Markus Stange
cf505c6dbe Bug 1417709 - Implement -moz-appearance: -moz-mac-vibrant-titlebar-light/dark on macOS. r=jrmuizel
MozReview-Commit-ID: ElMpYslSXOg

--HG--
extra : rebase_source : cae49ca995c8bf8a8b3dc64c07ede390510b033f
2017-11-16 11:36:52 -05:00
Markus Stange
4bfc2bbaca Bug 1417709 - Change GatherThemeGeometryRegion to GatherVibrantRegion. r=jrmuizel
MozReview-Commit-ID: 3Oytxnut623

--HG--
extra : rebase_source : f1010c9e0c3ba1572b163cbee00c3179b51bee13
2017-11-16 11:34:09 -05:00
Kartikaya Gupta
22471e0b18 Bug 1419868 - Fix some inconsistent naming r=mystor
The property in question is the offset from the content process to the
chrome process, but it gets called various things for historical
reasons. Let's be consistent and just call it the chrome offset
everywhere.

Also, in some places this was needlessly getting turned into a
nsIntPoint via ToUnknownPoint(), only to be turned back into a
LayoutDeviceIntPoint at all the use sites. So this patch also updates
some function signatures to avoid the needless conversion.

No functional changes.

MozReview-Commit-ID: AuhEUfa64Uj

--HG--
extra : rebase_source : 20e1895fefd944f98307a8437f977252ee2c3185
2017-11-22 14:21:37 -05:00
Jim Chen
82c5935b9b Bug 1416319 - 8. Switch to using LayerSession coordinates APIs; r=rbarker
Use the LayerSession coordinates APIs instead of manually calculating
coordinates using viewport metrics and toolbar height, which is prone to
error.

MozReview-Commit-ID: 4ebI3BHEOXR

--HG--
extra : rebase_source : 264f03f3032f101687c2a39d1cf052ac1805f12b
2017-11-22 14:12:23 -05:00
Jim Chen
5686bed431 Bug 1416319 - 4. Store DynamicToolbarAnimator in LayerSession; r=rbarker
Add getter/setter for DynamicToolbarAnimator in LayerSession in lieu of
LayerView. It is then LayerSession's responsibility to keep track of how
changes in the toolbar affects other things like the window and viewport
bounds.

MozReview-Commit-ID: HmRqxZ7EUCZ

--HG--
extra : rebase_source : 80648a17ed10672400daa4bcce0de49f4ee76557
2017-11-22 14:12:22 -05:00
Jim Chen
b21cdffaf4 Bug 1416319 - 1. Move content-document-is-displayed flag to native code; r=rbarker
One fix I forgot to make in bug 1416310 is to change the code to reset
the flag in LayerView. I think it's better if we just moved the whole
thing to native code, since we don't really use the flag in Java.

MozReview-Commit-ID: 9cbcYb89LhC

--HG--
extra : rebase_source : a209669d6657a60c198f59f4a0e4d959478485c3
2017-11-22 14:12:22 -05:00
Martin Stransky
26d40cc144 Bug 1418829 - Add MATE entry to GetCSDSupportLevel(), use GDK_DECOR_BORDER with CSD_SUPPORT_FULL only, r=jhorak
Adding MATE as FLAT as it does not support the shadow borders around the window.

GDK_DECOR_BORDER decoration mode means that the window manager renders borders around the window.
We want the border rendering for CSD_SUPPORT_FULL only which means the border looks like shadows. We don't wand WM to render solid/bold borders around main toplevel window.

MozReview-Commit-ID: BdwHi0LJRGC

--HG--
extra : rebase_source : 7b7d6733e62ae3188fe6cdeecca17de05b3d6873
2017-11-20 14:30:57 +01:00
Martin Stransky
7c5df586c4 Bug 1418829 - nsLookAndFeel enables rendering to the titlebar for supported window managers only, r=jhorak
MozReview-Commit-ID: JvqQuZenkWy

--HG--
extra : rebase_source : 11047d6bb3b85cd73aae7a8da9ac8124b2b9a5e7
2017-11-20 14:29:49 +01:00
Martin Stransky
5b47065c12 Bug 1418829 - Export GetCSDSupportLevel() as public from nsWindow, r=jhorak
We need that for nsLookAndFeel module.

MozReview-Commit-ID: 61YKeAUoKEu

--HG--
extra : rebase_source : 3587d39005fe8e6a63b527f55f377182bf1c69bd
2017-11-20 14:28:29 +01:00
Tiberius Oros
797c93d81f Merge inbound to mozilla-central r=merge a=merge 2017-11-21 11:55:23 +02:00
Jim Chen
676e0a6e5c Bug 1416310 - 5. Remove GeckoLayerClient.java and update generated bindings; r=jchen
Remove GeckoLayerClient.java since it's no longer used, and update
auto-generated JNI bindings. r=me for trivial patch.

MozReview-Commit-ID: CiNPLLkh3VJ

--HG--
extra : rebase_source : 0cddae4f8914dd6f6a0631a7e69701828476f2b8
2017-11-20 17:17:02 -05:00
Jim Chen
a845c063bf Bug 1416310 - 4. Don't use GeckoLayerClient in native code; r=rbarker
Use LayerSession::Compositor or NativePanZoomController to call back
into Java from nsWindow.

MozReview-Commit-ID: 9JUKAE5XQK1

--HG--
extra : rebase_source : 9d6861b9d641e6abb6b6f94f5f9c4b3661ff071c
2017-11-20 17:17:02 -05:00
Jim Chen
bbe7b4e34c Bug 1416310 - 1. Remove getMatrixForLayerRectToViewRect; r=rbarker
Patch gets rid of `LayerView.getMatrixForLayerRectToViewRect`, and just
uses `LayerView.getZoomFactor` directly when calculating the matrix in
GeckoInputConnection. This also lets us avoid the `isCompositorReady`
call on a non-UI thread. To get the correct offset, we need the screen
bounds from Gecko, so it's passed to Java as the first element in the
rect array. Using bounds from Gecko lets us avoid having to deal with
things like the dynamic toolbar animator ourselves.

MozReview-Commit-ID: 6I61SZGyQyO

--HG--
extra : rebase_source : d576fb7ef9a42de10b14db662e5c4833f16f6312
2017-11-20 17:17:00 -05:00
Nika Layzell
a7666fd8fe Bug 1418048 - Add a callback-based Send API to async returning IPDL methods, r=billm
Currently if you write an async IPDL method which has a return value, we expose
a SendXXX method which returns a MozPromise. This MozPromise can then be
->Then-ed to run code when it is resolved or rejected.

Unfortunately, using this API loses ordering guarantees which IPDL provides.
MozPromise::Then takes an event target, which the resolve runnable is dispatched
to. This means that the resolve callback's code doesn't have any ordering
guarantees relative to the processing of other IPC messages coming over the same
protocol.

This adds a new overload to SendXXX with two additional arguments, a lambda
callback which is called if the call succeeds, and a lambda callback which is
called if the call fails. These will be called in order with other IPC messages
sent over the same protocol.

MozReview-Commit-ID: FZHJJaSDoZy
2017-11-20 17:55:32 -05:00
Markus Stange
a0e9560488 Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl
The idea is the following:
Behind-window vibrancy is mostly rendered by the window server. For a given
vibrant region of a window, the window server renders a vibrancy "backdrop",
which is a blurred version of everything that's behind that region, modified
with a color tint and blended in some way. Then it puts our actual window
contents on top of that background.
The backdrop's shape is usually a rectangle. If we don't want it to be a
rectangle, we need to tell the window server about the shape that we want it to
be. We can't just "draw" a different shape in our own rendering, because our
own rendering is merely placed on top of the backdrop - but here we want to
modify the shape of the backdrop itself.

NSVisualEffectView lets us set a mask image on the view. If this view is the
content view of a window, then the view will automatically communicate the mask
image to the window server.

Traditionally, our popup windows have had a ChildView as their content view. If
we now want an NSVisualEffectView to be the content view of the window, then we
need to nest the ChildView inside that NSVisualEffectView.
But this NSVisualEffectView is only needed when the window is vibrant and the
vibrancy backdrop needs to have a certain shape. This is the case for our menus
which need to have rounded corners. If the window transitions to being
non-vibrant, or not needing a special shape, then we can go back to the way our
window's NSView hierarchy has worked traditionally. So we need to reparent
NSViews during those transitions.

MozReview-Commit-ID: Bo2VzjhhR0A

--HG--
extra : rebase_source : 9eb463cc68c16c3b9281b57455330969c5e2642c
2017-11-19 18:38:35 -05:00
Andreea Pavel
9474960c52 Backed out 1 changesets (bug 1370040) for build bustage at /cocoa/VibrancyManager.mm:207 r=backout on a CLOSED TREE
Backed out changeset 84c737eb3c6e (bug 1370040)
2017-11-20 01:36:36 +02:00
Markus Stange
75bf1f6ae8 Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl
The idea is the following:
Behind-window vibrancy is mostly rendered by the window server. For a given
vibrant region of a window, the window server renders a vibrancy "backdrop",
which is a blurred version of everything that's behind that region, modified
with a color tint and blended in some way. Then it puts our actual window
contents on top of that background.
The backdrop's shape is usually a rectangle. If we don't want it to be a
rectangle, we need to tell the window server about the shape that we want it to
be. We can't just "draw" a different shape in our own rendering, because our
own rendering is merely placed on top of the backdrop - but here we want to
modify the shape of the backdrop itself.

NSVisualEffectView lets us set a mask image on the view. If this view is the
content view of a window, then the view will automatically communicate the mask
image to the window server.

Traditionally, our popup windows have had a ChildView as their content view. If
we now want an NSVisualEffectView to be the content view of the window, then we
need to nest the ChildView inside that NSVisualEffectView.
But this NSVisualEffectView is only needed when the window is vibrant and the
vibrancy backdrop needs to have a certain shape. This is the case for our menus
which need to have rounded corners. If the window transitions to being
non-vibrant, or not needing a special shape, then we can go back to the way our
window's NSView hierarchy has worked traditionally. So we need to reparent
NSViews during those transitions.

MozReview-Commit-ID: Bo2VzjhhR0A

--HG--
extra : rebase_source : 0434a17e2cddc94715db6a5fd17bc27e2cddd05c
2017-11-19 17:01:02 -05:00
Robin Grenet
34508b32f6 Bug 1360278 - Add preference to trigger context menu on mouse up for GTK+ and macOS, r=mstange,smaug
MozReview-Commit-ID: Bg60bD8jIg6

--HG--
extra : rebase_source : cc8bd5796096f49ad4fdab81885a426afd6117e4
2017-11-16 13:35:58 +01:00
lochang
9214b56b5a Bug 1406268 - Use rect width/height instead of minimum width/height and clamp the rect on Linux. r=mats
MozReview-Commit-ID: B7KjnO9uaef

--HG--
extra : rebase_source : c4647b31b650dddd90df528ff1ac48f72d92fed5
2017-11-17 14:20:42 +08:00
Jean-Yves Avenard
66fa0333bd Bug 1417442 - P2. fix nsIGfxInfo in GPU process. r=dvander
MozReview-Commit-ID: FiU8Ygfh86s

--HG--
extra : rebase_source : 969ff0bc095e30820106ca08ecf5e06e2ebf223e
2017-11-15 23:33:37 +01:00
Jean-Yves Avenard
73c4627a67 Bug 1417442 - P1. Don't attempt to initialize MediaPrefs in the GPU process. r=dvander
MozReview-Commit-ID: 66766Tx8vgM

--HG--
extra : rebase_source : 43e37d4fc43d51f5e9f185a30965800d2f4f7830
2017-11-16 17:21:09 +01:00
Martin Stransky
8eafc3d45b Bug 1414212 - Enable titlebar rendering on Gtk+ >= 3.10, r=jhorak
MozReview-Commit-ID: JFmpa8JyHEl

--HG--
extra : rebase_source : 311e1ac327b78e2fe5251a465e120e8aee4df152
2017-11-16 15:18:17 +01:00
Ciure Andrei
fdbe147ffb Merge mozilla-central to autoland. r=merge a=merge CLOSED TREE 2017-11-17 12:09:31 +02:00
Ciure Andrei
92d28bd8f2 Merge inbound to mozilla-central r=merge a=merge 2017-11-17 11:59:03 +02:00
Makoto Kato
8fbfdec507 Bug 1417356 - xpcshell doesn't have Java thread. r=jchen
This is a regression by bug 1403690.  After landing this, some xpcshell tests
cause crash with stylo.

mozilla::java::GeckoAppShell::GetShowPasswordSetting doesn't work on xpcshell
test.  If JNI isn't available such as xpcshell, we shouldn't use this method.

MozReview-Commit-ID: AUrT93SkQ2H

--HG--
extra : rebase_source : 2147a42633ea98e3a4d891af832f28c105d5dcf8
2017-11-16 12:25:26 +09:00
Joel Maher
eb7c7c286f Bug 1417653 - clean up a few moz.build files that have typos. r=gbrown 2017-11-16 08:56:51 -05:00
Brendan Dahl
ce5b5fa465 Bug 1409580 - Raise headless sheet widgets when shown. r=jrmuizel
Fixes:
 - test_modal_prompts.html
 - test_prompt.html

MozReview-Commit-ID: IHkrqAaMe7L

--HG--
extra : rebase_source : 9a7e377f621fdad5a30a178e5f82d7f8d8b24105
2017-10-19 17:09:28 -07:00
Brendan Dahl
5530b8b09e Bug 1409580 - Use different scroll delta modes on different platforms in headless. r=jrmuizel
Fixes test_group_wheelevents.html

MozReview-Commit-ID: Ctq0WngKG15

--HG--
extra : rebase_source : 4322e00378827c34d83c2b732da7564ed0b3e00e
2017-10-19 15:57:39 -07:00
Brendan Dahl
a58c9d187c Bug 1409580 - Use top level widget for headless screen offset. r=jrmuizel
Fixes test_group_mouseevents.html

MozReview-Commit-ID: dHItN6BssI

--HG--
extra : rebase_source : 2cb934efd8f94ec1cb817851e79442264a739a98
2017-10-19 15:55:35 -07:00
Boris Zbarsky
198e006805 Bug 1415741. Switch to a different env var, not MOZ_DEBUG, for disabling mouse event taps on Mac. r=mstange
MozReview-Commit-ID: BgFpmE2Juom
2017-11-15 12:23:58 -05:00
Noemi Erli
f24a75f9b7 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2017-11-15 12:15:40 +02:00
Chris Peterson
768b96f58b Bug 1415470 - build: Enable VS2017 C5038 initializer list order warnings (like gcc -Wreorder). r=glandium
C5038 is a new warning in VS2017, similar to gcc and clang's -Wreorder, which is enabled by -Wall. We should enable C5038 so Windows developers can see these warnings locally instead of when gcc and clang fail with warnings-as-errors on Try.

https://blogs.msdn.microsoft.com/vcblog/2017/07/21/diagnostic-improvements-in-vs2017-15-3-0/

We need to suppress C5038 warnings from Windows Runtime Library header files (wrl.h) included in ANGLE and widget/windows:

z:\build\build\src\vs2017_15.4.2\SDK\Include\10.0.15063.0\winrt\wrl\wrappers\corewrappers.h(515): error C5038: data member 'Microsoft::WRL::Wrappers::Details::SyncLockWithStatusT<Microsoft::WRL::Wrappers::HandleTraits::SemaphoreTraits>::sync_' will be initialized after data member 'Microsoft::WRL::Wrappers::Details::SyncLockWithStatusT<Microsoft::WRL::Wrappers::HandleTraits::SemaphoreTraits>::status_'
...

And suppress C5038 warnings in upstream webrtc code:

media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseFilter.cpp(176): error C5038: data member 'mozilla::media::BaseFilter::mClsId' will be initialized after data member 'mozilla::media::BaseFilter::mState'
media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp(169): error C5038: data member 'mozilla::media::BasePin::mFilter' will be initialized after data member 'mozilla::media::BasePin::mLock'
media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp(170): error C5038: data member 'mozilla::media::BasePin::mLock' will be initialized after data member 'mozilla::media::BasePin::mName'
media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp(172): error C5038: data member 'mozilla::media::BasePin::mDirection' will be initialized after data member 'mozilla::media::BasePin::mQualitySink'

MozReview-Commit-ID: BMDVkvQXNoq

--HG--
extra : rebase_source : 0d5ede9530d0d0750b8fffdc1cdfdc646ec8f22a
2017-11-07 19:52:10 -08:00
Kevin Chen
49b2130100 Bug 1415469 - Remove mDeviceResetSequenceNumber from TDR process since we don't need it anymore; r=dvander
MozReview-Commit-ID: 3uQQwW8QOJA

--HG--
extra : rebase_source : ab6090ad51a2a4714f1739a30d854d624d187239
2017-11-08 15:26:43 +08:00
Jim Chen
4fc4969b9b Bug 1415994 - 8. Update auto-generated bindings; r=jchen
MozReview-Commit-ID: 2r1V6Hvl5Pb

--HG--
extra : rebase_source : c0347e4d915d3f585a6971fc3048d1f658490ec6
2017-11-14 18:18:36 -05:00
Jim Chen
db59a90277 Bug 1415994 - 6b. Track GeckoDisplay origin changes; r=snorp
Add a `screenOriginChanged` callback to GeckoDisplay.Listener, which
informs Gecko of changes in the origin of the display. The origin
translates to coordinates for web APIs like screenX/screenY and certain
other calculations.

Also, make GeckoDisplay listen to layout changes in the view tree (by
overriding gatherTransparentRegion as an optimization), and call
`screenOriginChanged` accordingly.

MozReview-Commit-ID: C72EHCkbV3T

--HG--
extra : rebase_source : 240c5c8fb3c2938ae966f40e86f7c5a0ca66526c
2017-11-14 18:18:35 -05:00
Jim Chen
ff6c25061a Bug 1415994 - 5. Use LayerSession from GeckoSession; r=snorp
Make GeckoSession inherit from LayerSession, and connect its Compositor
to native code as part of the GeckoSession routine.

MozReview-Commit-ID: wQaH1A0a7z

--HG--
extra : rebase_source : ee4ae96e974d15c8cb9ad569ea9abf0ace4d0fa5
2017-11-14 18:18:35 -05:00
Jim Chen
e029f5ee64 Bug 1415994 - 4. Use LayerSession in native code; r=snorp
Make native code use LayerSession::Compositor instead of
LayerView::Compositor. Also, make some callbacks happen on the UI thread
to make the Java code cleaner.

MozReview-Commit-ID: KhuHel7Zfdn

--HG--
extra : rebase_source : 040442539fd7cc1af8e13e4be1d9ebfb1625f778
2017-11-14 18:18:35 -05:00
Jim Chen
11dc67a595 Bug 1415994 - 1. Don't report screen size in GeckoLayerClient; r=rbarker
We don't actually use the screen size through GeckoLayerClient anymore.
Getting rid of it lets us get rid of the Context field in
GeckoLayerClient as well.

MozReview-Commit-ID: GM1jlhAZm4T

--HG--
extra : rebase_source : 04827eb61d6304d4782a7a935d5528013255726f
2017-11-14 18:18:34 -05:00
Markus Stange
ff02ca90b1 Bug 1417197 - Create constants for hardcoded theme fill colors. r=jrmuizel
MozReview-Commit-ID: KnRKm3TyHIE

--HG--
extra : rebase_source : 8d419344dd67dad5692506c31763e9c3c3d4d968
2017-11-14 16:01:32 -05:00
Markus Stange
a25f1fafb3 Bug 1417197 - Create nsITheme::CreateWebRenderCommands in order to optimize simple theme fills, and add a Mac implementation. r=jrmuizel
MozReview-Commit-ID: 1G9NHPwd5ST

--HG--
extra : rebase_source : 74189f1bad32600979b099663bae27cd24d1f0ec
2017-11-14 15:34:56 -05:00
Brendan Dahl
c161ff02d7 Bug 1409580 - Support edit command mapping in headless MacOS. r=masayuki
Extracts out the creation of an NSEvent from a WidgetKeyEvent in
TextInputHandler.mm into generic helper method. The helper is used by headless
to create a fake NSEvent to then build edit commands from key events.

Fixes:
- test_selectevents.html
- test_bug756984.html
- test_movement_by_characters.html
- test_movement_by_words.html
- test_backspace_vs.html
- test_bug1094000.html
- ... many key event tests

MozReview-Commit-ID: 1Jur5MHOrkp

--HG--
extra : rebase_source : fbe320aff8fd2e1b36f3b46e02336e9fc89c48d0
2017-10-13 17:40:27 -07:00
Sylvestre Ledru
2fda79adb2 Bug 1416712 - Remove nsPaperPS as it seems to be dead code r=karlt
MozReview-Commit-ID: IWbo6cXDyiy

--HG--
extra : rebase_source : 32259c1324420a81ba18511366f44cd7a7deffb1
2017-11-13 11:24:47 +01:00
Csoregi Natalia
e520b4f458 Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE 2017-11-14 00:59:27 +02:00
Boris Zbarsky
87c6b14c1a Bug 1415677 part 6. Remove nsIDOMHTMLCollection. r=qdot
MozReview-Commit-ID: E8P9o0bv63L
2017-11-13 10:41:33 -05:00
Yura Zenevich
b2b66a61f5 Bug 1401980 - shutdown accessibility service on accessibliity.force_disable pref change. r=surkov
MozReview-Commit-ID: 8YfCaoB5Stt
2017-11-11 22:21:45 -05:00
Andreea Pavel
7fb4cc447c Merge inbound to mozilla-central r=merge a=merge 2017-11-11 11:59:20 +02:00
Phil Ringnalda
15fafc3560 Backed out 2 changesets (bug 1401980) for failures in browser_shutdown_pref.js
CLOSED TREE

Backed out changeset cea72923c4be (bug 1401980)
Backed out changeset 72f9e62daa10 (bug 1401980)

MozReview-Commit-ID: 2bhiTKZmmib
2017-11-10 21:50:14 -08:00
Yura Zenevich
446a07beed Bug 1401980 - shutdown accessibility service on accessibliity.force_disable pref change. r=surkov
MozReview-Commit-ID: 8YfCaoB5Stt
2017-11-10 22:43:22 -05:00
Ryan VanderMeulen
ef843a0e30 Merge m-c to inbound. a=merge 2017-11-10 16:14:16 -05:00
Dylan Roeh
ebd39f9ce0 Bug 1337078 - Improve the use of Android API in OSPreferences r=snorp
Add BrowserLocaleManager.refreshLocales, a native function which calls OSPreferences::Refresh, and BrowserLocaleManager.getLocale, which returns the current locale string. Use these in place of observing modification of the intl.locale.os pref.
2017-11-10 09:20:04 -06:00
Markus Stange
c871c885f9 Bug 1415070 - Cut out the window button shape on Windows 7. r=kats
MozReview-Commit-ID: 6hKuNMqJsMW

--HG--
extra : rebase_source : d8894db275ff4f28dc32d670e400cfb16c14d23c
2017-11-09 16:31:08 -05:00
Chris Peterson
0e8425b401 Bug 1416164 - Replace NS_ABORT with MOZ_ASSERT_UNREACHABLE. r=froydnj
MozReview-Commit-ID: DRdYlOYqZpN

--HG--
extra : rebase_source : b20fb24abf0f2ce648c12a827532c0dbeefb6c63
2017-10-24 23:52:56 -07:00
Kartikaya Gupta
00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Jed Davis
c7f8a32bf4 Bug 1401786 - Move base::LaunchApp options into a LaunchOptions struct, like upstream Chromium. r=billm
MozReview-Commit-ID: 74IXV4oGeWR

--HG--
extra : rebase_source : ef4021a60506a8fc5fa5a35e3f3fefb9dbad75d6
2017-09-08 20:35:06 -06:00
Neil Deakin
4b1d934d48 Bug 1411705, check the pseudo char code in GetAccessKeyCandidates so that this check works in both keydown and keypress events, r=masayuki 2017-11-09 18:42:40 -05:00
Martin Stransky
47784aca73 Bug 1360560 - Add destructor to nsRemoteClient, r=jhorak"
Create nsRemoteClient pointer as a base class pointer to X11/DBus implementations.

MozReview-Commit-ID: 3CpkDey6rLU

--HG--
extra : rebase_source : f7f6fd7e179e23d4bfabe528092710bcbe9a1892
2017-11-02 16:23:06 +01:00
Martin Stransky
79f785f637 Bug 1360560 - Implement XRemote client by D-Bus service, r=jhorak
MozReview-Commit-ID: JDNEC8Jar5w

--HG--
extra : rebase_source : 8c1d1e128101dfb2e4e467fda74d82febdcd323a
2017-11-02 16:21:28 +01:00
Mats Palmgren
1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Makoto Kato
639e6d2041 bug 1414881 - Detect more resolution icons. r=karlt
I add some resolution icons for HiDPI by bug 1415014.  So we should detect
these resolution icons.  Also, Thunderbird has default256.png, so we should
support it, too.

MozReview-Commit-ID: 6BEgV0usnE2

--HG--
extra : rebase_source : ec1b954e1ee4664f365376202fe6f9158c6a9e3b
2017-11-16 14:08:10 +09:00
Sebastian Hengst
a353221537 merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-11-09 00:00:16 +02:00
Martin Stransky
13cafd9d37 Bug 1415080 - Rename all 's' prefixed members of nsLookAndFeel as they're not static ones, r=jhorak
MozReview-Commit-ID: 9LHIewRnbAY

--HG--
extra : rebase_source : f0a9b3c7b51bbc21ed8ab4cb5ca419a25fdc2b2e
2017-11-07 10:14:52 +01:00
Margareta Eliza Balazs
130574a8e2 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE 2017-11-08 00:09:29 +02:00
Randall Barker
7fe4594a76 Bug 1413362 - part 1: Add GeckoVRManager to support GVR WebVR implementation on Android r=jchen,snorp
MozReview-Commit-ID: C7XTF8N1W9a
2017-11-07 10:50:14 -08:00
Johann Hofmann
fc671c4d92 Bug 1299286 - Enable touchdown to start dragging on elements with touchdownstartsdrag attributes. r=kats
MozReview-Commit-ID: 8TL9VfY88ip

--HG--
extra : rebase_source : a560e2e9ac4a7ff633f597c0ff20f39373fd30a8
2017-11-03 13:09:21 +01:00
Jonathan Watt
2322aebae3 Bug 1413217 - Fix some includes etc. in widget code. r=jimm
MozReview-Commit-ID: 8bW6WIPMun4
2017-10-12 17:03:35 +01:00
Martin Stransky
646ed8e303 Bug 1414272 - Implement SetNonClientMargins() for Gtk+, r=jhorak
Original patch author is Andrew Comminos [:acomminos] <andrew@comminos.com>

MozReview-Commit-ID: Jnqz35iNsQb

--HG--
extra : rebase_source : b3be56afc3330a98a981af0d8b85a28164953e1c
2017-11-03 15:38:29 +01:00
Jim Chen
832cd8d996 Bug 1415074 - Fix unresponsiveness after restoring GeckoView states; r=jchen
Fix a bug where GeckoView becomes unresponsive to dispatched events
after restoring states, due to the native queue not being restored.
r=me for small, tested patch.

MozReview-Commit-ID: K1cVjjNaZK1

--HG--
extra : rebase_source : b1329c84d82f5bdc06767bf310ca87e52ff6ec9b
2017-11-07 01:53:11 -05:00
Jim Chen
edb0428314 Bug 1413698 - 2. Move GeckoView to GeckoSession; r=snorp
Rename GeckoView to GeckoSession. Strip out parts of it that depended on
being a subclass of View. Also strip out parts of it that dealt with
switching EventDispatcher and NativeQueue, because now there's only one
copy of each for each GeckoSession.

MozReview-Commit-ID: J699twtpmTS

--HG--
rename : mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoView.java => mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSession.java
extra : rebase_source : 60e045f6f1e6a70dcabc03f5a32cae5576c2edd8
2017-11-06 14:54:09 -05:00
Jim Chen
6fdb886eb4 Bug 1413698 - 1. Separate out attach() from open() in GeckoView.Window; r=snorp
Right now, `GeckoView.Window.open()` consists of opening a new Gecko
nsWindow and attaching it to the opening GeckoView. This patch separates
the attaching step into an `Window.attach()` function that was renamed
from `Window.reattach()`. Going forward, `Window.open()` and
`Window.close()` will correspond to opening and closing a session, which
`Window.attach()` will correspond to attaching a display to a session.

MozReview-Commit-ID: 94Un74pwizY

--HG--
extra : rebase_source : a7d9c6c3227de4b05e800d77a184f1deae9af5f8
2017-11-06 14:54:08 -05:00
Martin Stransky
8d2317143c Bug 1414774 - Initialize sCSDCloseButton/sCSDMaximizeButton/sCSDMinimizeButton, r=jhorak
MozReview-Commit-ID: 10Yk1gFu0Vk

--HG--
extra : rebase_source : 2fbe514f920e85cb5a857a0f5293edd4f023db06
2017-11-06 11:41:38 +01:00
Lee Bousfield
8b33a0a29e Bug 1398539: Inhibit screensaver with XScreenSaverSuspend r=karlt
MozReview-Commit-ID: LhhpaDaPdaO

--HG--
extra : rebase_source : 6d53031ea8669b15cdf6fad4c55c58624bd54c38
2017-09-13 18:28:51 -06:00
Sebastian Hengst
d61954557d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: Ai6Y5GGfkfT
2017-11-04 10:58:24 +01:00
Alex Gaynor
016a127546 Bug 1412643 - revert part 3 of the changes from 1319423 to fix print selection; r=bobowen
This will be re-landed with a real fix for print-selection after we branch for 58.

MozReview-Commit-ID: JjhBEiEviVB

--HG--
extra : rebase_source : 15b9a2eccdc5ce001bacb776e15f98f4d368c436
2017-11-03 14:03:02 -04:00
sotaro
bce40231ea Bug 1390741 - Use BasicCompositor if widget type does not support acceleration r=aosmond,kats 2017-11-03 16:38:34 +09:00
Masayuki Nakano
2fcb0a64f2 Bug 1406446 - part 2: Android widget should use API of InputContextAction rather than accessing EventStateManager r=jchen
Basically, widget code shouldn't access API in dom/events as far as possible
since it's difficult to care widget code when other developers to change under
dom/.

This patch backouts the patch for bug 1402461 which made GeckoEditableSupport
depend on EventStateManager in dom/events.  Now, necessary information is in
InputContextAction and same condition should be shared with Windows.

MozReview-Commit-ID: LMlrizswxUj

--HG--
extra : rebase_source : c13604eac143ec5994c65571bff09887d5c0c221
2017-10-24 02:53:19 +09:00
Masayuki Nakano
93977460e2 Bug 1406446 - part 1: InputContextAction should treat focus change during handling a user input as caused by user input even if it's caused by JS r=smaug
Currently, widget doesn't show VKB when input context change is caused by JS.
However, if it's caused by an event handler of a user input, user may expect
to open VKB.  For example, if a touch event in fake editor causes moving
focus to actual editable node, user expect to show VKB.

Therefore, InputContextAction should declare two causes.  One is unknown but
occurred during handling non-keyboard event.  The other is unknown but occurred
during handling keyboard event.

However, EventStateManager doesn't have an API to check if it's being handling
a keyboard event.  Therefore, this patch adds it first.
AutoHandlingUserInputStatePusher sends event type to StartHandlingUserInput()
and StopHandlingUserInput() of EventStateManager and sUserKeyboardEventDepth
manages the number of nested keyboard event handling.  Therefore,
EventStateManager::IsHandlingKeyboardInput() can return if it's handling a
keyboard event.

IMEStateManager uses this new API to adjust the cause of changes of input
context.

Finally, InputContextAction::IsUserInput() is renamed to IsHandlingUserInput()
for consistency with EventStateManager and starts to return true when the
input context change is caused by script while it's handling a user input.

MozReview-Commit-ID: 5JsLqdqeGah

--HG--
extra : rebase_source : 9fcf7687d1bf90eeebbf6eac62d4488ff64b083c
2017-10-24 02:46:15 +09:00
James Cheng
590d6b160c Bug 1396698 - Part1 - Remove the dispatchTo gecko main thread attribute. r=kikuo
MozReview-Commit-ID: 9Opa894ZQMQ

--HG--
extra : rebase_source : 78807da52b2b070a0488ef2c1f673b728172e59d
2017-11-03 13:40:46 +08:00
Makoto Kato
18c5223126 Bug 1151753 - Set program class name when not using --class command line option. r=karlt
GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=747634

Before 3.16.3, GDK cannot override classname by --class command line option
when program uses gdk_set_program_class().  So if 3.16.3+, we should call
gdk_set_program_class() to set program class name of default.

MozReview-Commit-ID: KvNc3U6xHr7

--HG--
extra : rebase_source : aae14973022bb29eb89787b67323a845763c0650
2017-10-25 15:58:49 +09:00
Ryan VanderMeulen
f44bfd0fc0 Merge m-c to autoland. a=merge 2017-11-01 21:55:56 -04:00
Ryan VanderMeulen
cf94e55fa8 Backed out changesets 9adb0bc561c3 and 9e50716eaebe (bug 1406032) in favor of a different fix.
--HG--
extra : rebase_source : d68493d891fc9d5560e58a41e581ad7f55ea9f09
2017-11-01 21:52:57 -04:00
Ryan VanderMeulen
76b05e595e Backed out changeset f4df790d1477 (bug 1412130) in favor of a better fix.
--HG--
extra : rebase_source : 79103611ce2a4548b27ebcacda23f95a6bdb46af
2017-11-01 21:51:29 -04:00
Sebastian Hengst
4ff29d14f8 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: GSDYk9wLOAM

--HG--
rename : browser/base/content/test/general/browser_bug561636.js => browser/modules/test/browser/formValidation/browser_form_validation.js
rename : browser/base/content/test/general/browser_bug595507.js => browser/modules/test/browser/formValidation/browser_validation_iframe.js
rename : browser/modules/test/browser/browser_bug1319078.js => browser/modules/test/browser/formValidation/browser_validation_invisible.js
2017-11-01 22:55:12 +01:00
Sebastian Hengst
ca88e3c4c5 Merge mozilla-central to autoland. r=merge a=merge 2017-11-01 22:58:44 +01:00
Tom Ritter
f9519e7a49 Bug 1412611 Reorder member initialization to fix -Wreorder warning in widget/windows/nsLookAndFeel.cpp r=njn
MozReview-Commit-ID: EJp1FqllORN

--HG--
extra : rebase_source : f7c8983f3ae7e1aae1a14fd7321ab1aae8b7ba04
2017-10-28 23:36:04 -05:00
Jim Chen
db34ad5809 Bug 1412872 - 8. Remove GeckoAppShell dependency in gecko-view; r=snorp
In the future, GeckoAppShell will only be part of the service process
library, and will not be part of the app process library. Therefore, we
should minimize GeckoAppShell usage in any GeckoView code that will
likely end up in the app process library.

In particular, AndroidGamepadManager and Clipboard are made to accept
Context as arguments, instead of using
GeckoAppShell.getApplicationContext() for getting the Context.

MozReview-Commit-ID: G9SC815H5Ku
2017-11-01 14:54:04 -04:00
Jim Chen
7496680254 Bug 1412872 - 4. Handle negate scroll pref in native code; r=rbarker
Handle the negate_wheel_scroll pref in native code so we don't depend on
PrefsHelper in NativePanZoomController.

MozReview-Commit-ID: 14YCcrDlObz
2017-11-01 14:54:03 -04:00
Jim Chen
453375471c Bug 1412872 - 3. Remove native GeckoView loadUri call; r=snorp
Remove the native GeckoView loadUri call because it's Fennec-only.
Replace the call with a Fennec-only "Tab:OpenUri" event.

MozReview-Commit-ID: 7xZW9aceoPL
2017-11-01 14:54:03 -04:00
Jim Chen
adad54189b Bug 1406168 - 5. Fix build; r=snorp
Removing the previous cpp files moved AndroidBridge.cpp to a different
compilation unit, and that caused some problems with other code that
depended on AndroidBridge being in or not in their compilation unit.
This patch fixes those (unwanted) dependencies.

MozReview-Commit-ID: DJsk3iENsx2
2017-11-01 14:48:49 -04:00
Jim Chen
984efaf88e Bug 1406168 - 4. Remove unused code; r=snorp
Remove AndroidJNI.cpp, which is empty. Also remove some JNI string
functions that are unused from AndroidBridge.

MozReview-Commit-ID: CsP4L0TyN48
2017-11-01 14:48:48 -04:00
Jim Chen
5f70c0bf46 Bug 1406168 - 3. Remove AndroidJavaWrappers; r=snorp
Remove AndroidJavaWrappers. Convert nsJNIString usages to use
jni::String and AndroidMotionEvent usages to use java::sdk::MotionEvent.
Move key code constants to GeckoEditableSupport.cpp.

MozReview-Commit-ID: CwcGGADWCNv
2017-11-01 14:48:48 -04:00
Jim Chen
ec08814aaa Bug 1406168 - 2. Remove AndroidJNIWrapper; r=snorp
Remove AndroidJNIWrapper. It was primarily used by JNI.jsm and WebRTC.
Usages in WebRTC are replaced with equivalent uses of JNI templates.

MozReview-Commit-ID: DPSeMOtH2wF
2017-11-01 14:48:48 -04:00
Martin Stransky
79aef7f85b Bug 1348310 - Use CLOCK_MONOTONIC as a base for nsWindow::GetEventTimeStamp() on Wayland, r=karlt
We assume CLOCK_MONOTONIC as timebase for events on Wayland and use that to translates GDK event times to gecko timestamps.

MozReview-Commit-ID: LWd2KWTQeha

--HG--
extra : rebase_source : 1839d35989b9c29c60dd33d445db79afc75af9ab
2017-10-19 15:28:47 +02:00
Martin Stransky
8137c88d04 Bug 1413206 - Export ConstructCommandLine() to RemoteUtils module, r=jhorak
Create ConstructCommandLine() to be shared between X11 and DBus implementation.

MozReview-Commit-ID: CJIe7B7DWwo

--HG--
extra : rebase_source : b42df1cca45e03b7e826b83f532829f6d8bd6e89
2017-10-31 16:24:24 +01:00
Sebastian Hengst
7a0f790c30 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4CDH6A5NT2U
2017-11-01 00:36:12 +01:00
Tristan Bourvon
357ebb9638 Bug 1412645 - Initialize some uninitialized fields in widget/cocoa/. r=mstange 2017-10-31 11:25:04 +01:00
Martin Stransky
fcfeac2a70 Bug 1411018 - Rename shellHasCSD to drawToContainer and mark our rendering widget by gtk_widget_set_app_paintable(), r=jhorak
Rename shellHasCSD to drawToContainer for better understanding and always mark our rendering widget by gtk_widget_set_app_paintable() to make sure Gtk+ does not draw default background for it.

MozReview-Commit-ID: 4mhxrG7C34i

--HG--
extra : rebase_source : 312e956e317c85196d27213dd86bd30b73a25b02
2017-10-23 21:44:02 +02:00