Commit Graph

22465 Commits

Author SHA1 Message Date
Wes Kocher
3c2dc39278 Merge m-c to inbound, a=merge
MozReview-Commit-ID: BgPWEtPV0sy
2017-07-31 17:49:47 -07:00
Wes Kocher
179a07b6ba Merge inbound to central, a=merge
MozReview-Commit-ID: Dg4fbH8wbXt
2017-07-31 17:43:38 -07:00
Jim Chen
97a5cae544 Bug 1382335 - 3. Use XPCOM queue for disposing compositor native objects; r=esawin
There's some racing going on between compositor methods that use the
XPCOM queue and the disposeNative method that uses the priority queue.
Move everything to the XPCOM queue to fix this condition.

MozReview-Commit-ID: BUxotrpBVsW
2017-07-31 12:30:32 -04:00
Jim Chen
b9eff08b91 Bug 1382335 - 2. Revert workaround from bug 1372777; r=esawin
Introduce the crash again to get more crash reports for analysis.

MozReview-Commit-ID: DYq95o5RpzB
2017-07-31 12:30:13 -04:00
Jim Chen
54718c4c49 Bug 1382335 - 1. Record the type of null native pointers; r=esawin
Right now we throw NullPointerException with the message "Null native
pointer", but we can save the type of the native pointer in the message
to make it easier to categorize and analyze crashes. This patch uses the
__func__ feature to get the name of a particular template parameter
type.

MozReview-Commit-ID: GNWzIy91OD6
2017-07-31 12:30:13 -04:00
Masayuki Nakano
3bbd4cc2d5 Bug 1379997 - part2: Remove "intl.tsf.hack.ms_japanese_ime.do_not_associate_imc_on_win10" pref completely r=m_kato
"intl.tsf.hack.ms_japanese_ime.do_not_associate_imc_on_win10" should be unnecessary anymore because it failed to avoid the crash of MS-IME for Japanese but causing other regression.  Therefore, this patch removes it completely.

MozReview-Commit-ID: 91jjxfIYReW

--HG--
extra : rebase_source : d261f5bf77c14c41562495574d87364a7bb2d4fc
2017-08-01 00:13:57 +09:00
Botond Ballo
e54b8b4984 Bug 1105109 - Have the parent process notify APZ of the start and stop of autoscrolling. r=kats
The messages are routed through nsITabParent, nsIWidget, and IAPZCTreeManager
(the latter possibly remoted via PAPZCTreeManager if out-of-process compositing
is used).

MozReview-Commit-ID: 1zXzLa1fqpG

--HG--
extra : rebase_source : c482816ecbaec0a889d817851ee15be186b2a49c
2017-07-26 19:33:02 -04:00
Nicholas Nethercote
72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Nicholas Nethercote
d4f9aa5530 Bug 1384835 (part 2, attempt 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
--HG--
extra : rebase_source : 6c24fbacb03d4adebe5f22b5e7fc60b069913f20
2017-07-31 14:23:50 +10:00
Nicholas Nethercote
581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Wes Kocher
316fd8283a Merge m-c to inbound, a=merge
MozReview-Commit-ID: KcxntLtRalL

--HG--
rename : taskcluster/actions/__init__.py => taskcluster/taskgraph/actions/__init__.py
rename : taskcluster/actions/add-new-jobs.py => taskcluster/taskgraph/actions/add-new-jobs.py
rename : taskcluster/actions/registry.py => taskcluster/taskgraph/actions/registry.py
rename : taskcluster/actions/retrigger.py => taskcluster/taskgraph/actions/retrigger.py
rename : taskcluster/actions/run_missing_tests.py => taskcluster/taskgraph/actions/run_missing_tests.py
rename : taskcluster/actions/test-retrigger-action.py => taskcluster/taskgraph/actions/test-retrigger-action.py
rename : taskcluster/actions/util.py => taskcluster/taskgraph/actions/util.py
2017-07-28 17:54:59 -07:00
Wes Kocher
40c3480d89 Merge inbound to central, a=merge
MozReview-Commit-ID: JNxfwQh0cac

--HG--
rename : gfx/layers/wr/WebRenderCompositableHolder.h => gfx/layers/wr/AsyncImagePipelineManager.h
2017-07-28 17:40:43 -07:00
Brendan Dahl
5dd8373329 Bug 1355147 - Use headless clipboard on macOS. r=jrmuizel
MozReview-Commit-ID: Fh0GHE34joE
2017-07-28 11:00:29 -07:00
Brendan Dahl
82161df837 Bug 1355147 - Expose IsHeadless on GfxInfo. r=jrmuizel
Allows marionette to check if the browser is in headless mode.

MozReview-Commit-ID: 2kaqO3HO9Ke
2017-07-28 11:00:28 -07:00
Brendan Dahl
987400a824 Bug 1355147 - Add basic support for headless mode on macOS. r=jrmuizel
MozReview-Commit-ID: 23Wchhimynz
2017-07-28 11:00:27 -07:00
Bill McCloskey
c6c1f4bbc9 Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm)
This parameter isn't used by any implementation of onDispatchedEvent,
and keeping the parameter makes later refactorings in this bug more difficult.

MozReview-Commit-ID: 90VY2vYtwCW
2017-07-28 13:09:06 -07:00
Carsten "Tomcat" Book
139661e8e4 Merge mozilla-central to mozilla-inbound 2017-07-28 15:25:58 +02:00
Carsten "Tomcat" Book
892bedca2e merge mozilla-inbound to mozilla-central a=merge 2017-07-28 15:24:39 +02:00
Sebastian Hengst
d7527a414d Backed out changeset 07b534f44740 (bug 1384835) for failing xpcshell's security/manager/ssl/tests/unit/test_cert_sha1.js checkCertErrorGenericAtTime on Linux x64 debug. r=backout 2017-07-28 10:30:29 +02:00
Sebastian Hengst
1d708511f0 Backed out changeset 5df4d8778602 (bug 1384835) 2017-07-28 10:29:29 +02:00
Sebastian Hengst
744a0a216b Backed out changeset ef5feef07bed (bug 1384835) 2017-07-28 10:29:24 +02:00
Carsten "Tomcat" Book
28bdd40776 Merge mozilla-central to mozilla-inbound 2017-07-28 09:48:24 +02:00
Carsten "Tomcat" Book
2ff6df9177 Backed out changeset 5198322f7a62 (bug 1351148) 2017-07-28 09:20:20 +02:00
Carsten "Tomcat" Book
6aa98d7df0 Merge mozilla-central to autoland 2017-07-28 09:50:36 +02:00
Carsten "Tomcat" Book
d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Nicholas Nethercote
200d8ec18b Bug 1384835 (part 3) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
This is similar like the previous patch, but for the 8-bit string variants.
Also, it changes assignment to Adopt() in GetCString() and GetDefaultCString()
to avoid an extra copy.

--HG--
extra : rebase_source : eba805c3a7b809d5ccd6e853b1c9010db9477667
2017-07-27 16:45:10 +10:00
Tobias Schneider
3880ddff03 Bug 1382327 - (reftest) Rename reftest-print to reftest-paged. r=dbaron
--HG--
extra : rebase_source : c4e47e2de8d615c77e7e9ce88f6b21c9d15c92e4
2017-07-26 22:53:46 -07:00
Makoto Kato
dc2ee6bae4 Bug 1383659 - LookAndFeel::GetInt(LookAndFeel::eIntID_CaretBlinkTime) should cache caret blink rate. r=jimm
WebKit's Speedometer benchmark updates textbox to emulate text input. So it also updates caret position with focus.  And, nsCaret always gets current blink time when reseting caret via LookAndFeel.

When profiling speedometer benchmark, GetCaretBlinkTime somestimes show profiling stack.  This API gets data from kernel mode, so this isn't faster.

So, we should cache caret blink rate.

And when changing this rate via control panel, WM_SETTINGCHANGE is posted. So we should update this cache via this message.

MozReview-Commit-ID: IEIi25RvR1g

--HG--
extra : rebase_source : 4bc506acd67f2737cf44dc2a667c938efc7b4024
2017-07-27 18:53:34 +09:00
Nicholas Nethercote
0574a6b496 Bug 1384835 (part 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
Because we want to remove nsAdoptingString. We have other variants that don't
use nsAdoptingString, which can be used instead. There are three basic
patterns.

1. The easiest case is when we don't check for success.

> nsAdoptingString s = Preferences::GetString("foo");
> foo(s);

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> foo(s);

2. The next case is when we check if the result is empty.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s.IsEmpty()) { ... }

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> if (s.IsEmpty()) { ... }

3. The final case is when we null check the result.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s) { ... }

becomes:

> nsAutoString s;
> nsresult rv = Preferences::GetString("foo", s);
> if (NS_SUCCEEDED(rv)) { ... }

The patch also avoids some UTF8/UTF16 conversions in a few places.

--HG--
extra : rebase_source : f339b1a3dda4dc93979d38c30c001fbe77485b55
2017-07-25 20:36:14 +10:00
Nicholas Nethercote
f314cbcbe5 Bug 1384835 (part 1) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
This is basically a cosmetic change; references are the normal way to do string
outparams.

--HG--
extra : rebase_source : ffc5945f269bdcd3d4116755b56713e87a44b6cd
2017-07-25 19:12:56 +10:00
sotaro
b8bc54df5a Bug 1372880 - Add WebRender creation failure handling r=aosmond 2017-07-28 18:22:21 +09:00
Masayuki Nakano
937a9124a5 Bug 1379797 - nsWindow::GetEditCommandsRemapped() should do nothing if given event wasn't created with a native event r=karlt
When aEvent.mNativeKeyEvent of nsWindow::GetEditCommandsRemapped() is nullptr, that means the event was created without a native event.  Typically, chrome script created the event.  In such case, we should not execute native key bindings because doing it exposes the OS settings to chrome script because that might cause some privacy issue.  Therefore, the method should do nothing with such event.

MozReview-Commit-ID: 7ZHZjZ3ligT
2017-07-20 06:42:09 -07:00
Julian Seward
408d24da56 Bug 1382563 - Remove ns*String::AssignWithConversion. r=erahm.
This patch replaces four functions of the name AssignWithConversion which
are essentially wrappers around CopyASCIItoUTF16 and LossyCopyUTF16toASCII
with direct calls to the latter two functions.  The replaced functions are:

  void nsCString::AssignWithConversion( const nsAString& aData )
  void nsString::AssignWithConversion( const nsACString& aData )

  void nsTString_CharT::AssignWithConversion(
                            const incompatible_char_type* aData,
                            int32_t aLength = -1);

The last of the three exists inside the double-included nsTString* world and
so describes two functions, giving four in total.

This has two advantages:

* it removes code

* at the call points, it makes clear (from the replacement name) which
  conversion is being carried out.  The generic name "AssignWithConversion"
  doesn't make that obvious -- one had to infer it from the types.

The patch also removes two commented out lines from
editor/composer/nsComposerCommands.cpp, that appear to be related.  They are
at top level, where they would never have compiled.  They look like
leftovers from some previous change.

--HG--
extra : rebase_source : fb47bf450771c3c9ee3341dd14520f5da69ec4f5
2017-07-24 19:23:52 +02:00
Carsten "Tomcat" Book
740c6ff791 Merge mozilla-central to autoland 2017-07-28 15:27:47 +02:00
Masayuki Nakano
333068f586 Bug 1384027 - part2: Move PuppetWidget::NotifyIMEInternal() implementation to PuppetWidget::NotifyIME() which is a method of TextEventDispatcherListener, not nsIWidget r=m_kato
nsIWidget::NotifyIME() should call only TextEventDispatcher::NotifyIME() if it's necessary.  Then, TextEventDispatcher::NotifyIME() calls TextEventDispatcherListener::NotifyIME() if it's necessary.  E.g., requests to IME are necessary only for TextInputProcessor or native IME handler because the composition is only owned by one of them.  However, notifications are necessary for both of them since focused editor contents and its focus state are shared.

So, it doesn't need to call nsBaseWidget::NotifyIMEInternal() if all NotifyIMEInternal() implementations are moved to proper TextEventDispatcherListener::NotifyIME().  Currently, nsBaseWidget::NotifyIMEInternal() is implemented only by PuppetWidget.  It sends notifications and requests to the parent process for native IME.  Therefore, we can move NotifyIMEInternal() implementation to TextEventDispatcherListener::NotifyIME() which is implemented by PuppetWidget.

This patch moves PuppetWidget::NotifyIMEInternal() implementation to PuppetWidget::NotifyIME() of TextEventDispatcherListener class, not of nsIWidget and removes NotifyIMEInternal() completely.

With this change, handling order is changed.  Old behavior is, TextEventDispatcher::NotifyIME() calls TextEventDispatcherListener::NotifyIME() before handling NOTIFY_IME_OF_FOCUS and then, nsBaseWidget::NotifyIME() sends the notification to the parent process.  However, new behavior is, the notification is sent before TextEventDispatcher::NotifyIME() handles NOTIFY_IME_OF_FOCUS.  Therefore, with new handling order, TextEventDispatcher can have IME notification requests after setting focus correctly.  Additionally, TextEventDispatcher for PuppetWidget updates the notification requests at every event dispatch via TextEventDispatcher::BeginInputTransactionInternal() by the previous patch.

So, with those patches, IMEContentObserver can refer actual IME notification requests correctly even after we'll make focus notification to async message.

MozReview-Commit-ID: JwdQ68BjTXL

--HG--
extra : rebase_source : fbc7e311d83aab3b38fdd5c1b5c24d85458eb77b
2017-07-26 00:09:41 +09:00
Masayuki Nakano
e7a9572555 Bug 1384027 - part1: PuppetWidget should have TextEventDispatcher like nsIWidget instance in the parent process r=m_kato
In the parent process, every nsIWidget instance like nsWindow has TextEventDispatcher instance after dispatching a keyboard event or a composition event.  Then, TextEventDispatcher manages whether there is composition and handles NotifyIME.  However, PuppetWidget doesn't have it unless it synthesizes keyboard events or composition events for tests.
This causes PuppetWidget implementing nsIWidget::NotifyIME() with nsBaseWidget::NotifyIMEInternal() which is a virtual method only implemented by PuppetWidget.  For consistent implementation around here, we should move NotifyIMEInternal() implementation to TextEventDispatcherListener::NotifyIME() which is called by TextEventDispatcher::NotifyIME().  Then, PuppetWidget can handle NotifyIME() easier.

This patch creates TextEventDispatcher::BeginInputTransactionFor() which takes pointer to a dispatching event and pointer to PuppetWidget.  It emulates each corresponding event dispatcher method for managing composing state and begins input transaction for the dispatching event.

Unfortunately, this implementation is ugly due to duplicated code.  However, this is enough for now.  When we need to make TextEventDispatcher manage more states, we should add methods which are shared by both BeginInputTransactionFor() and event dispatcher method.

MozReview-Commit-ID: GeP028luZjR

--HG--
extra : rebase_source : ce71ce4d7ba52aeb12bff2c403c9a6df47ea3a11
2017-07-25 23:27:31 +09:00
James Willcox
d0bb12024d Bug 1381916 - Remove support for plugins on Android r=jchen,bsmedberg
MozReview-Commit-ID: AcAIC1QQew2
2017-07-31 12:25:16 -05:00
James Willcox
25dad4abf2 Bug 1381916 - Remove frontend support for plugins in Fennec r=nechen
MozReview-Commit-ID: Gkqe8Y5AMPV
2017-07-31 12:25:16 -05:00
kevin
47b2c10f66 Bug 1333912. Implement onvisibilitychange attribute on Document. r=bzbarsky 2017-07-26 16:22:42 -04:00
Bevis Tseng
95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Bevis Tseng
a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Kartikaya Gupta
ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Carsten "Tomcat" Book
198430bca2 merge mozilla-inbound to mozilla-central a=merge 2017-07-26 11:11:40 +02:00
Wes Kocher
f19f28adfd Merge m-c to autoland, a=merge
MozReview-Commit-ID: F1X8wKqbkg
2017-07-25 19:16:09 -07:00
Wes Kocher
65bbd0525a Merge inbound to central, a=merge
MozReview-Commit-ID: E4oXfAM1mtd
2017-07-25 19:04:37 -07:00
Brendan Dahl
cbbcce1fa2 Bug 1383078 - Use at minimum a 1,1 draw target in headless. r=jrmuizel 2017-07-25 09:04:54 -07:00
James Cheng
4843d195fb Bug 1382151 - Pause Exoplayer when mediaelement is paused. r=kikuo
MozReview-Commit-ID: 5MDBBP5vfpa

--HG--
extra : rebase_source : 9981585791cd359296ac7fef0fe0d7e900af6c61
2017-07-20 17:47:54 +08:00
Masayuki Nakano
22aa198848 Bug 1380652 - ContentCacheInParent::RequestIMEToCommitComposition() shouldn't handle the request synchronously when its TabParent has already sent eCompositionCommit(AsIs) event of the composition r=m_kato
If ContentCacheInParent::RequestIMEToCommitComposition() returns true after its TabParent has already sent eCompositionCommit(AsIs) event, ContentCacheInParent::OnEventNeedingAckHandled() will receive both eCompositionCommit(AsIs) and eCompositionCommitRequestHandled for a composition.  Then, that causes making mPendingCompositionCount decreased twice.  That causes the crash.

So, even if its TabParent already lost focus, it should return false after its TabParent sent eCompositionCommit(AsIs).

MozReview-Commit-ID: 6OylQtc8kgC

--HG--
extra : rebase_source : 9d8f2ab2b25f129ddbca75fcc8fb4bc7c3a96e56
2017-07-21 21:22:23 +09:00
Wes Kocher
1c6b33b69a Merge m-c to inbound, a=merge
MozReview-Commit-ID: AwACQvl2e5g

--HG--
extra : rebase_source : e70812f9a96acf1d0747cb7ea57afa1e2152283b
2017-07-25 19:09:39 -07:00
Jim Chen
ba6dd4ceb0 Bug 1382861 - 2. Don't use priority queue for GeckoView.Window and ThumbnailHelper; r=esawin
Use the regular XPCOM queue for those tasks because the priority queue
should only be used for input and other timing-sensitive tasks.

MozReview-Commit-ID: 5px0s0PJYrV
2017-07-25 17:26:14 -04:00
Jim Chen
454e868137 Bug 1382861 - 1. Replace jni::AbstractCall with nsIRunnable; r=esawin
The native binding code used `jni::AbstractCall` as the interface
between `ProxyNativeCall` and `DispatchToGeckoPriorityQueue`. However,
we already make use of `nsIRunnable` for dispatching to the XPCOM queue,
so we should just use `nsIRunnable` for the priority queue as well.

MozReview-Commit-ID: KmuNMZZkXX3
2017-07-25 17:25:58 -04:00
Jim Chen
84b7350f94 Bug 1351170 - Don't crash on selection exception in Beta; r=me
Don't crash when we encounter a selection exception when in Beta. Still
crash when in Nightly so we can investigate the source of the crash.
r=me for trivial patch.

MozReview-Commit-ID: HgmudX4VfWO
2017-07-25 15:32:53 -04:00
Carsten "Tomcat" Book
0c215343b0 merge mozilla-inbound to mozilla-central a=merge 2017-07-24 13:01:44 +02:00
Nicholas Nethercote
ac3e6bddb4 Bug 1382099 - Remove MOZ_WIDGET_GONK from media/, uriloader/, widget, /xpfe/. r=snorp.
--HG--
extra : rebase_source : 75fe5b8320d52c7316ca547f706b64f30250d28c
2017-07-24 10:08:55 +10:00
Wes Kocher
d45eb771f0 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Ah48RzFU8Mt
2017-07-21 18:20:46 -07:00
Wes Kocher
051dc17e6c Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: GYc8r8gnS0j
2017-07-21 18:12:55 -07:00
Ryan VanderMeulen
f4e3a91992 Merge m-c to inbound. a=merge 2017-07-21 09:40:28 -04:00
Sebastian Hengst
367f0ac5a2 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IWRTFZdtzaE
2017-07-21 12:56:44 +02:00
Sylvestre Ledru
7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Kentaro Hayashi
ef93e64d0d Bug 1382142 - Fix a typo about MOZ_CONTAINER_GET_CLASS definition. r=karlt
There is no side-effects by this commit because this macro definition is
not used in actual implementation.

--HG--
extra : amend_source : 6075bacf7c0e2c10dd66dcfda8e28f16786d58de
2017-07-19 17:01:59 +09:00
Stone Shih
a930bf9910 Bug 1372097 Implement tangential pressure and twist on Mac. r=mstange.
MozReview-Commit-ID: 5eigFssLEGR
2017-06-12 16:25:49 +08:00
Andrew Osmond
69da7c2120 Bug 1381095 - Fallback correctly to non-WebRender if the GPU process/WebRender are disabled when creating a remote compositor session. r=dvander 2017-07-20 09:20:22 -04:00
Johann Hofmann
3eac596d72 Bug 1371219 - Add an inputSource attribute to XULCommandEvent. r=smaug
In the frontend we need to know if XUL buttons in the toolbar were
triggered by a touch event, so we're passing on the inputSource
in the command event.

MozReview-Commit-ID: DMvgZULk9hT

--HG--
extra : rebase_source : c455c8ec77e439bf02c1e3e8d34a36e1fb5e3bd0
2017-07-20 17:45:56 +02:00
Ryan VanderMeulen
d229288071 Merge m-c to autoland. a=merge
CLOSED TREE

--HG--
extra : amend_source : 2ab51304cc7df444f22c3aac001a1aba61faee3a
2017-07-21 09:42:41 -04:00
Dão Gottwald
f605598222 Bug 1379266 - Tweak -moz-win-accentcolortext formula to better match native title bars. r=jimm
MozReview-Commit-ID: 9unrhFI3sWh

--HG--
extra : rebase_source : 096198d640ee39c87d8495fe6e6e872544aa6478
2017-07-18 13:23:25 +02:00
Stone Shih
a5bccae405 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Wes Kocher
b5bcc4905e Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: CBL7SUEUGKV
2017-07-19 17:29:56 -07:00
Jim Chen
8b6bd21a0b Bug 1351170 - 2. Notify selection listeners after adjusting range offsets; r=smaug
`nsRange` registers mutation observers to adjust the range when content
changes. However, there are some cases where we adjust the start and/or
end offsets but don't notify selection listeners (i.e. we don't call
`nsRange::DoSetRange` to set the new range points, contrary to what the
comment above `nsRange::DoSetRange` says). This patch makes us call
`nsRange::DoSetRange` in those cases. The patch adds a testcase in
test_selectevents.html, and changes a few unexpected-pass cases in
test_composition_text_querycontent.xul that this patch fixed.

MozReview-Commit-ID: 73D8RYMS3MS

--HG--
extra : rebase_source : da0cc3073e4b8ad23c6f6eab42da5aa8b269cae9
2017-07-19 14:29:59 -04:00
Jim Chen
41148177ef Bug 1351170 - 1. Correctly calculate start offset for non-text nodes; r=masayuki
When the start node is a non-container node (i.e. <br>), and the start
offset is 0, we should not include a newline character for the node. For
example, for this range,

> <br/>hello
>  \___/

the start node/offset is (<br/>, 0) and end node/offset is ("hello", 1).
The calculated range offset should be 0, and the range length should be
2: 1 for the <br/> newline character plus 1 for "h".

The patch also ensures this behavior for pre-mode nsContentIterator, for
both start and end node adjustments. For start nodes, we include any
non-container nodes with offset 0 in the range. For end node, we exclude
any non-container nodes with offset 0 from the range.

MozReview-Commit-ID: Lt2tCLbapq7

--HG--
extra : rebase_source : 7d86b6cf04581f1cd71fa85f8c8586541b3a84e9
2017-07-19 14:29:59 -04:00
Ryan Hunt
017d292cac Bug 1382128 part 2 - Remove WrPoint, WrSize, WrRect, WrMatrix, and WrColor. r=kats
MozReview-Commit-ID: 9koNScu4CyE

--HG--
extra : rebase_source : 68185e949ddf2ae346a5d597d056a7f2d9ea7a28
2017-07-18 18:32:46 -04:00
Dão Gottwald
4b7389da4e Bug 1379938 - Rename the -moz-windows-accent-color-applies media query and make -moz-win-accentcolor available without it. r=jimm
MozReview-Commit-ID: 9zMr9JwkloF

--HG--
extra : rebase_source : 25e9cfa11dc0c3ff09e4e3aac18a53535cbcc27b
2017-07-19 16:38:49 +02:00
Ryan Hunt
3f3cb0a954 Bug 1382128 part 1 - Use a namespace in webrender_bindings. r=kats
MozReview-Commit-ID: 3JTMa9Ix5S7

--HG--
extra : rebase_source : 0bea14d9e395cab260d2db5135b1f64e9f82b2e2
2017-06-27 19:20:36 -04:00
Benjamin Smedberg
e92ddc293b Bug 1374038 - _exit() can call static destructors on Windows! So replace it with TerminateProcess which can't, r=jimm r=mstange
MozReview-Commit-ID: FSsOU85yA18

--HG--
extra : rebase_source : 7247a9940d7729e003af51c0cc7de15b08aa54d0
2017-07-17 16:06:15 -04:00
Andrew Osmond
094c212d54 Bug 1350408 - Gracefully handle failures in WebRenderLayerManager::Initialize to allow reinit. r=kats 2017-07-18 09:35:07 -04:00
Haik Aftandilian
09507f2814 Bug 1353064 - Add-on always prints at 100% due to missing nsPrintSettingsX::GetScaling() impl r=cosmo0920
MozReview-Commit-ID: AhIFJUfRrPJ

--HG--
extra : rebase_source : b01c8e6099df8de46c2e0ba983ac91738d648c84
2017-06-14 15:06:18 -07:00
Doug Thayer
7646a8ed3b Bug 1380629 - Check GetTheme result in nsNativeThemeWin r=jimm
The fix for bug 1373079 neglected the detail of OpenThemeData
that it can return null if no match is found for the specified
class name. The set of matching class data sections varies with
the default and the classic theme, and the classic theme doesn't
have matches for a few of the values that we try to get. This
causes us to pass a null theme to subsequent functions, which of
course breaks the layout.

MozReview-Commit-ID: 5LaR0qZlOzd

--HG--
extra : rebase_source : ba97163e5dfdd7127d550be54524e93f12195ffb
2017-07-17 13:55:28 -07:00
Milan Sreckovic
ebe72eb0d5 Bug 1359416: Allow blocklisting of D3D11 keyed mutex and block it for Intel Gen 6. r=bas,dvander
MozReview-Commit-ID: 2u7N5qhHhD1

--HG--
extra : rebase_source : 3a8ccc658d1b83d470f1bbeef4520779c1766919
2017-07-25 14:02:36 -04:00
Samael Wang
e90e4d4b15 Bug 1350643 - Part 7: Remove sync GetDPI/DefaultScale/WidgetRounding. Use primary screen's value until RecvShow. r=kanru
MozReview-Commit-ID: GlDMNecWp3j

--HG--
extra : rebase_source : 1f8573df8845c100172f41febc5a84bbcd069769
2017-05-19 18:20:18 +08:00
Samael Wang
f41a004bb1 Bug 1350643 - Part 6.2: Get per-monitor dpi in ScreenHelperWin & use the same value in nsWindow::GetDPI. r=jimm
MozReview-Commit-ID: 3oEvQe8zNJ0

--HG--
extra : rebase_source : b4c7d97ec1f701bbd1058ef40994f9874f6117cc
2017-06-16 11:16:47 +08:00
Samael Wang
b75d05055a Bug 1350643 - Part 6.1: Extract getting DPI logic from LogToPhysFactor & SystemScaleFactor to provide new functions MonitorDPI & SystemDPI. r=jimm
MozReview-Commit-ID: E9mXvFMM3pA

--HG--
extra : rebase_source : 1cc0f80c41054d6400d03b663f5b0037fbdb4cad
2017-06-16 01:11:41 +08:00
Samael Wang
a4e6b1337a Bug 1350643 - Part 5.2: Use per-monitor gdkScaleFactor to set contentsScaleFactor & nsWindow::GetDesktopToDeviceScale if running in gtk/wayland. r=karlt
MozReview-Commit-ID: Grs4dUqvLew

--HG--
extra : rebase_source : a5524e08fea8fb3623a55c486b33e95c4212fa59
2017-06-16 11:13:59 +08:00
Samael Wang
a4ddae112e Bug 1350643 - Part 5.1: Get per-monitor dpi in ScreenHelperGTK & use the same value in nsWindow::GetDPI. r=karlt
MozReview-Commit-ID: 9dOkUEzuUL8

--HG--
extra : rebase_source : 26fdbcc54edf8a3f4f0b166a88f85f98313bfe39
2017-06-16 10:58:11 +08:00
Samael Wang
480a9d013c Bug 1350643 - Part 4.2: Use screen.dpi in nsChildView::GetDPI. r=mstange
MozReview-Commit-ID: AiGBxTNzxSp

--HG--
extra : rebase_source : 50dcdca6e6b63ab3cbae7e00ecc8c8e7e4f10b74
2017-06-16 10:55:09 +08:00
Samael Wang
e6f4039653 Bug 1350643 - Part 4.1: Get per-monitor dpi in ScreenHelperCocoa. r=mstange
MozReview-Commit-ID: OHa8h2sh26

--HG--
extra : rebase_source : 67d7be6a51ad81d0d2cfe48ad4c92d0a6ef3c666
2017-06-06 18:18:52 +08:00
Samael Wang
3810bc3903 Bug 1350643 - Part 3: Add GetDPI to nsIScreen & ScreenDetails. r=kanru
MozReview-Commit-ID: HEFyuYV26Wy

--HG--
extra : rebase_source : fb172f4ba99ab7119036ddf4ec1b3eeeaead186c
2017-06-06 18:09:34 +08:00
Samael Wang
44adcfaeea Bug 1350643 - Part 2: Use gdk functions to enumerate monitors instead of Xinerama. r=karlt
MozReview-Commit-ID: D9f65oZMBuV

--HG--
extra : rebase_source : e4dfa2ee593b9e06433569aaa8f3ec965fca5f2d
2017-06-06 17:57:54 +08:00
Samael Wang
c9d2b57f92 Bug 1350643 - Part 1: Rename gfxPlatformGtk::GetDPI/GetDPIScale to GetFontScaleDPI/GetFontScaleFactor to better distinguish from nsIWidget::GetDPI. r=karlt
MozReview-Commit-ID: 4fxMG1FBlM8

--HG--
extra : rebase_source : 767780c828b2a9914b5f3af3c2749568099bece1
2017-06-14 16:54:21 +08:00
Kris Maglione
86877fceef Bug 1381097: Part 1 - Add default-false pref to enable APZ in remote popups. r=kats
Ideally, we definitely want APZ in remote popup browsers for the sake of
responsiveness. However, there are currently some serious painting and
checkerboarding issues that make APZ popups unsuitable for release
populations.

Once these issues are addressed, we should enable the preference by default.
But given the relative lack of testing, and the issues we've seen so far, we
should keep the preference so that we can disable it with a hotfix if further
issues arise.

MozReview-Commit-ID: GOZRdsmLNZR

--HG--
extra : rebase_source : ce0f2ca029d951a9c65ec1482e065b6695793133
2017-07-15 12:01:36 -07:00
David Parks
1dc60d3f88 Bug 1373220 - Use correct window reference when setting parent window in Windows widget. r=jimm
SetParent removes the widget from the old parent widget and then sets its new one.  We were incorrectly using the new parent widget when we needed the old one.
2017-07-12 19:32:48 -07:00
Kris Maglione
d60e48a1e8 Bug 1378948: Remove unused layers.popups.compositing.enabled preference. r=trivial
MozReview-Commit-ID: Css0qzakw14
2017-07-15 11:03:07 -07:00
Wes Kocher
6d62b1970e Merge m-c to inbound, a=merge
MozReview-Commit-ID: 4kiY84LofOi
2017-07-14 17:19:10 -07:00
Wes Kocher
e9fa5c772a Merge inbound to central, a=merge
MozReview-Commit-ID: 8nlqm5dHCUQ
2017-07-14 17:14:43 -07:00
David Anderson
983fda7771 Remove the Intel HD Graphics blocklist entry for Advanced Layers. (bug 1380580, r=milan) 2017-07-14 16:35:10 -07:00
Milan Sreckovic
b60a342a2b Bug 1381074: Have downloadable blocklist recognize advanced layers. r=dvander
MozReview-Commit-ID: GlzDUQoAH6P

--HG--
extra : rebase_source : 0e32b40f1d4939431bad194706f623bbf4a3829b
2017-07-14 14:13:54 -04:00
James Cheng
950fc2b63c Bug 1379866 - Implement MediaResource Suspend and Resume in HLSResource. r=jolin
1. Pause the Exoplayer when navigating to another page and resume playback when navigating back.

2. Fix the OOM issue.

MozReview-Commit-ID: 5UGmBzpObsb

--HG--
extra : rebase_source : f8f268612687669e1b31881465600b02b3531c55
2017-07-14 01:29:00 +08:00
Blake Kaplan
46f55c55cc Bug 1374862 - Avoid setting gHandled when we don't handle signals. r=masayuki
This avoids a fatal assertion for some key events when focus isn't on a text
input.

MozReview-Commit-ID: Hqr6LNW61Kn

--HG--
extra : rebase_source : adc954fc355044c91dc34e9e689a745da95e78c9
2017-06-20 17:03:09 -07:00
Nicholas Nethercote
c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

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

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

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

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

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

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

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Brendan Dahl
80c9890f5c Bug 1376812 - Create default headless draw target. r=jrmuizel
Defining the default draw target avoids the previous mix of cairo
and d2d layers, which would trigger an assertion when capturing
a page with the widget layers.
2017-07-13 16:55:23 -07:00
Dão Gottwald
8f5c440b72 Backed out changeset 5a5d8de65b70 (bug 1379938) on CLOSED TREE 2017-07-13 23:16:12 +02:00
Farmer Tseng
9b1bba24c6 Bug 1380301 - Add windows.h include to nsLookAndFeel.h r=heycam
MozReview-Commit-ID: Js9Kc73VXS1

--HG--
extra : rebase_source : 05b984cc3aa219dddc10faf22de046d03144bf45
2017-07-13 13:36:31 +08:00
Farmer Tseng
225f9a9b82 Bug 1380301 - Add missing "#ifdef MOZ_ENABLE_SKIA_PDF" to nsDeviceContextSpecWin.h r=heycam
MozReview-Commit-ID: YxvOID7Xbp

--HG--
extra : rebase_source : 5e8b4e37e7f74e4f0eecd35b5e5366a7953cb996
2017-07-13 13:07:18 +08:00
Dão Gottwald
0f2337c0c7 Bug 1379938 - Rename the -moz-windows-accent-color-applies media query and make -moz-win-accentcolor available without it. r=jimm
MozReview-Commit-ID: BkDrm6KtiP3

--HG--
extra : rebase_source : 1c0deb5b77e1ce83a8f157c100606c563d61577c
2017-07-13 11:08:27 +02:00
Carsten "Tomcat" Book
0edfa97e38 merge mozilla-inbound to mozilla-central a=merge 2017-07-12 11:07:09 +02:00
Josh Aas
9d7fb5a517 Bug 1372599 - Only turn off CGEvent logging on buggy versions of OSX to avoid delays in first paint. r=mstange
--HG--
extra : amend_source : 6ac7d91aac2458e50a3de8a59e2e6ce0f1fd4509
2017-07-06 23:31:00 -04:00
Carsten "Tomcat" Book
31311070d9 merge mozilla-inbound to mozilla-central a=merge 2017-07-11 12:51:59 +02:00
David Anderson
399881cdfc Report when constant buffer offsetting doesn't work. (bug 1379413 part 2, r=bas)
--HG--
extra : rebase_source : 881471eca6ae17e4b9810bc34b609d58c6eb0b3d
2017-07-11 00:13:26 -07:00
Wes Kocher
1ef5d8834c Merge m-c to autoland, a=merge 2017-07-10 18:51:05 -07:00
Doug Thayer
a57fa0349a Bug 1373079 - (3) Special-case min-size cache for buttons r=jimm
Testing for cache differences via assertions on try revealed that
we need to special-case buttons in our cache, since they can have
two different values for aSizeReq. Visual inspection of the code
reveals that this is the only aWidgetType value that has this
problem. I'm not sure how future-proof we want to try to be with
this. If anything else starts varying in this parameter then we
might unwittingly introduce caching problems, but I don't know
how likely that is.

MozReview-Commit-ID: 3kaJ01oJe3

--HG--
extra : rebase_source : 9a9c15f38eee7c59cd73e7fe42a0f581e0adeac5
2017-07-07 10:15:32 -07:00
Doug Thayer
e36c93f372 Bug 1373079 - (2) Cache GetMinimumWidgetSize r=jimm
See commit (1) for more detail about the bug.

This patch caches the expensive parts of GetMinimumWidgetSize,
which are when we call GetDC and ReleaseDC. The exits before this
cached section don't have their results cached partly because
they don't seem to show up in profiles, and partly because we
don't necessarily have a theme part at that point, which means
we would need to have a more complicated caching scheme directly
involving the aWidgetType.

MozReview-Commit-ID: 886N4tTHVVk

--HG--
extra : rebase_source : 31c4750088c26d140813419c63277a330472b84e
2017-06-22 16:19:13 -04:00
Doug Thayer
6b1ccd4b56 Bug 1373079 - (1) Cache GetWidgetBorder r=jimm
Both GetWidgetBorder and GetMinimumWidgetSize are showing up
in some profiles (see bug for more details.) This is the first
patch in a series of patches which cache the results of these
functions.

Because aWidgetType can map to multiple theme parts, in order to
cover as much as possible with our cache we decided to cache
based off of the theme class and the theme part, which are derived
from the aWidgetType and misc. other state. (Assumption: the
widget border and minimum widget size should not changed based on
the theme "state" (the value that accompanies the "part".))

The total cache size for these, if we use plain arrays, is 18KB.
We could reduce this by some amount by using a sparse dynamically
sized cache or by just using aWidgetType and discarding the
overloaded values, which are few. I don't have a great intuition
for how much we care about saving a few KB, or how much time this
could cause us to lose on L1 and L2 cache misses. Accordingly it
might be more optimal to go with something else, and I am open to
criticism/suggestions.

MozReview-Commit-ID: 4LG9BnaRG7l

--HG--
extra : rebase_source : 6d3ecf11e02a863f5528fb3ec2417eb1a246574c
2017-06-21 16:43:27 -04:00
Masayuki Nakano
7edb06b6ab Bug 1367482 NativeKey::HandleCharMessage() should treat a WM_CHAR message for '\r' as a Enter key press r=m_kato
Starting from 52, NativeKey::HandleCharMessage() ignores all control characters.  However, some keyboard layout utilities may send WM_CHAR message whose wParam is '\r' for emulating pressing Enter key.  For supporting such utilities, we should dispatch Enter keypress event when HandleCharMessage() receives such event.

Note that this patch does NOT support a pair of WM_KEYDOWN and WM_CHAR whose wParam is '\r' but the WM_KEYDOWN isn't VK_RETURN.  If there is such case, we need to support it too.  However, it needs a lot of code changes.  So, we shouldn't support it until such bug is filed actually.

MozReview-Commit-ID: CWyvBtLmXgg

--HG--
extra : rebase_source : 6e9b27dc2fb9eb75626cdd5ab339d348a7be3040
2017-07-08 03:08:07 +09:00
Wei-Cheng Pan
421c3c6958 Bug 1376760 - Fix race condition for ICustomDestinationList usage. r=jimm
MozReview-Commit-ID: fgZjrHqiek

--HG--
extra : rebase_source : fc4a347bbba68f8927ac3afc85db748ffc03eff1
2017-07-06 14:06:09 +08:00
Kartikaya Gupta
b95ebf372e Bug 1379252 - Remove unused argument. r=rbarker
MozReview-Commit-ID: 7G8i0G9LyvZ

--HG--
extra : rebase_source : 229e4ef955e50b5a473c24522e3e499fdf658519
2017-07-07 14:56:10 -04:00
Kartikaya Gupta
b76136b43b Bug 1379252 - Remove a bunch of unused fields from ImmutableViewportMetrics. r=rbarker
Also propagate the removal outwards to remove other unused functions.

MozReview-Commit-ID: 9aqcbBA0Mf1

--HG--
extra : rebase_source : 9ce961ee0129f81e5c8d8a8df1a27ee6ff8012c7
2017-07-07 14:56:07 -04:00
Carsten "Tomcat" Book
f5427a22f2 Merge mozilla-central to autoland 2017-07-07 10:42:39 +02:00
Carsten "Tomcat" Book
b5c809a8bc merge mozilla-inbound to mozilla-central a=merge 2017-07-07 10:35:44 +02:00
Kartikaya Gupta
b13fcdbce3 Bug 1378956 - Don't try starting WebRender on widgets that have transparency. r=jrmuizel
MozReview-Commit-ID: 6AvsxxXCeVv

--HG--
extra : rebase_source : 85276ff6d43c9dd7d96c51957f66c4a47afc99a0
2017-07-06 16:00:43 -04:00
Masayuki Nakano
cac05f3ef3 Bug 1377672 - part4: ContentCacheInParent::RequestIMEToCommitComposition() should ignore too late requests r=m_kato
Requests to commit/cancel composition came from remote process with sync message.  So, it may be too late.  E.g.,

* If the process already sent new composition start but is not handled by the remote process yet.
* If the process already send commit message but it's not handled by the remote process yet.
* If focus was already moved to different process.

In the former 2 cases, the remote process should wait eCompositionCommit(AsIs) events for clearing TextComposition.  Therefore, the requested should be treated as it's handled asynchronously.

In the last case, the remote process should commit composition with latest composition string in the main process because if the remote process commits composition with "current" composition string in it, user may lost some inputted text.

MozReview-Commit-ID: 18BUoZZq7HS

--HG--
extra : source : fd1585ad670a87d8b1ef8908931f3d4037751475
2017-07-05 19:55:18 +09:00
Masayuki Nakano
d6e921676c Bug 1377672 - part3: IMEStateManager::NotifyIME() should ignore notifications and requests which comes from unexpected process r=m_kato,smaug
IME should receive notifications and requests only from proper process.  E.g., IME shouldn't commit composition by a request which came from previous focused process.

This patch makes that IMEStateManager::NotifyIME() takes pointer to TabParent optionally.  If the request or notification came from remote process, it should be non-nullptr.  Then, this makes it ignore notifications and requests from unexpected process.

Note that this patch also touches some gfx headers because they use |ipc::| but compiler is confused at the ambiguousness between |mozilla::ipc::| and |mozilla::dom::ipc::|.

Finally, this patch changes the NS_ASSERTION in IMEHandler::OnDestroyWindow() to MOZ_ASSERT because the orange caused by the NS_ASSERTION was not realized since there was already an intermittent orange bug caused by different NS_ASSERTION.

MozReview-Commit-ID: 9CgKXQRJWmN

--HG--
extra : source : f3b5711908870c5e0e852a399a07e0ae721a12f1
2017-07-06 00:47:40 +09:00
Masayuki Nakano
c726abb366 Bug 1377672 - part2: IMEStateManager::SetIMEState() should set input context with proper origin information r=m_kato
Currently, IMEStateManager always sets input context as set by current process even when it needs to adjust IME state when a tab parent for current focused IME process is removed.  Then, input context for the widget is marked as for main process but the widget still have IME focus of a remote process.

For fixing this mismatch, IMEStateManager should set ORIGIN_CONTENT even when the tab parent is being destroyed.

MozReview-Commit-ID: C10YOAtkET4

--HG--
extra : source : 9430d123b19e0ac551c6048bb044fcfa22d13e45
2017-07-03 12:28:10 +09:00
Wes Kocher
bbb26fe90e Merge inbound to central, a=merge
MozReview-Commit-ID: 2nFzji7su8C
2017-07-06 16:10:49 -07:00
Eugen Sawin
ffad978150 Bug 1368701 - [1.2] Add shutdown intent action to shutdown Fennec. r=snorp,bc 2017-07-06 19:20:43 +02:00
Carsten "Tomcat" Book
2178a22de4 Merge mozilla-central to autoland 2017-07-06 11:24:24 +02:00
Carsten "Tomcat" Book
7857fa0a5e merge mozilla-inbound to mozilla-central a=merge 2017-07-06 11:18:05 +02:00
Botond Ballo
8b7ba8ac1c Bug 1377020 - Use MOZ_DEFINE_ENUM instead of a sentinel enumerator for enumerations in gfx/layers. r=kats
MozReview-Commit-ID: IUQDb0VIAwQ

--HG--
extra : rebase_source : 50d05ab09a5fb03d16c044edd38f0f3e0dba7ada
2017-06-30 21:18:55 -04:00
Erica Wright
6a89d8490a Bug 1378499 - add missing include files. r=mstange
MozReview-Commit-ID: LQ6E0wAbhU0

--HG--
extra : rebase_source : 6383e90725f5aa50e15c06cf88153b7fc7d0f665
2017-07-05 16:40:09 -04:00
Kartikaya Gupta
4826f32d87 Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel
One thing to note here is that the Scale function on gfxRect has a
different implementation than that in gfx::Rect which is replacing it.
The former just scales the width/height directly whereas the latter
scales the XMost/YMost and recomputes the width/height.

MozReview-Commit-ID: 5FImdIaNfC3

--HG--
extra : rebase_source : 98662d2a52ff9652ec60b066641a07c6d5ee8e08
2017-07-05 11:22:00 -04:00
Kartikaya Gupta
cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Carsten "Tomcat" Book
49921c11be Merge mozilla-central to autoland 2017-07-05 13:05:51 +02:00
Masayuki Nakano
5533f095cb Bug 1377653 - part3: WidgetEvent::mFlags should have a bool flag if it's been posted to at least one remote process r=smaug
Currently, it's not been managed yet that whether an event is posted to at least one remote process.  So, for managing the state, BaseEventFlags should have a new bool flag and WidgetEvent and BaseEventFlags should have helper methods for it.

Additionally, this fixes a bug of nsGUIEventIPC.h. In a lot of ParamTraits, static_cast<Foo> is used for using base class's ParamTraits.  However, it causes creating temporary instance with copy constructor.  Therefore, WidgetEvent::MarkAsPostedToRemoteProcess() call in ParamTraits<mozilla::WidgetEvent>::Write() didn't work as expected.

MozReview-Commit-ID: DdafsbVfrya

--HG--
extra : rebase_source : 94205f3a7b36455c3c9f607c35866be033e627c1
2017-07-05 18:59:44 +09:00
Masayuki Nakano
57f359b0de Bug 1377653 - part2: Add helper methods to WidgetEvent and BaseEventFlags to manage propagation state between parent process and remote process r=smaug
Currently, we have 2 bool flags (and optional 2 bool flags with related purpose) for managing propagation state between parent process and remote process.  However, it's really complicated.  Actually, setting these flags and referring the flags is usually follow explanation.

So, for making simpler, WidgetEvent and BaseEventFlags should have some utility methods for making them as self documented code.

This patch moves WidgetKeyboardEvent::mIsReserved to BaseEventFlags::mIsReservedByChrome.  That allows us to manage the cross process event propagation state in same place.

MozReview-Commit-ID: IXEDQJ4GpAZ

--HG--
extra : rebase_source : 5b63ac4f1d15e40e8bfc88423e336de28caa8ab6
2017-07-05 13:58:41 +09:00
Masayuki Nakano
f51d22ebb9 Bug 1377653 - part1: Get rid of WidgetKeyboardEvent::mInputMethodAppState r=smaug
WidgetKeyboardEvent::mInputMethodAppState was used by B2G for managing keyboard event propagation state between chrome process and IME process.  Therefore, we can remove it now.

MozReview-Commit-ID: 7BwvzE8VjIR

--HG--
extra : rebase_source : 99e19fee6af0be1de19bd6c23e57e7dbf83a4a9c
2017-07-01 16:19:40 +09:00
Nicholas Nethercote
5d446671a8 Bug 1375776 (part 4) - Allow ProfilerMarkerPayload.h to be #included unconditionally. r=mstange.
This requires:

- Moving the constructors of ProfilerMarkerPayload and its subclasses into the
  .h file so they are visible even when ProfilerMarkerPayload.cpp isn't
  compiled.

- Similarly, using a macro to make StreamPayload() a crashing no-op when the
  profiler isn't enabled. (It is never called in that case.)

--HG--
extra : rebase_source : 7aad2fdb1bd4e49782024dba6664e8f992771520
2017-06-23 16:24:15 +10:00
Mats Palmgren
ef56cb7d33 Bug 1377591 - Make nsCocoaWindow and nsChildView 'final' to devirtualize some calls. r=mstange
MozReview-Commit-ID: 4sXYV9sVEZl
2017-07-05 02:01:45 +02:00
Stephen A Pohl
ac6efcdfe0 Bug 1356317: Avoid intermittent debug assertions in browser chrome tests when creation of draw targets fails. r=jimm 2017-07-04 13:45:18 -05:00
Stephen A Pohl
448afc7974 Bug 1356317: Enable off-main-thread compositing on Windows when possible. r=kmag 2017-07-04 13:45:18 -05:00
Carsten "Tomcat" Book
63e37c85e1 Backed out changeset ad0560789e1e (bug 1331932)
--HG--
extra : rebase_source : 234862b52d30a4a9ffd371c1088b67dd80a253af
2017-07-04 09:53:11 +02:00
Beekill95
4b50ba3fad Bug 1331932 - Suppress window animations while we're restoring window dimension. r=mikedeboer,jimm,mstange 2017-06-22 14:27:05 +07:00
sotaro
0159f2016c Bug 1377314 - Replace ImageKey when image size is changed r=kats 2017-07-04 11:56:04 +09:00
Randall Barker
590cfe546d Bug 1367850 - Move Android UI thread runnable queue from AndroidBridge to AndroidUiThread r=jchen
MozReview-Commit-ID: 4okw7R2P2LC
2017-07-03 17:18:50 -07:00
Bill McCloskey
224d56eb18 Bug 1377222 - Eliminate nsITimer::InitWithFuncCallback in favor of InitWithNamedFuncCallback (r=froydnj)
MozReview-Commit-ID: 9zN9aAd7daA
2017-07-03 16:19:56 -07:00
Nicholas Nethercote
3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Phil Ringnalda
915412e692 Merge m-i to m-c, a=merge
MozReview-Commit-ID: HINQtggBLDr
2017-07-01 17:36:09 -07:00
Mats Palmgren
15925cc551 Bug 1377486 - Make nsWindow 'final' to possibly devirtualize some calls. r=tn
MozReview-Commit-ID: GrcIukJYmt6
2017-07-01 19:59:21 +02:00
Carsten "Tomcat" Book
59605ed6b5 Merge mozilla-central to mozilla-inbound 2017-06-30 15:11:49 +02:00
Carsten "Tomcat" Book
daa67cc9e3 merge mozilla-inbound to mozilla-central a=merge 2017-06-30 12:59:45 +02:00
Phil Ringnalda
894f8f9c6f Backed out 2 changesets (bug 1356317) for frequent Win7 debug "Assertion failure: !mCompositeDC"
Backed out changeset d0cdeb6ffaeb (bug 1356317)
Backed out changeset 698042ea9555 (bug 1356317)

MozReview-Commit-ID: GUNfDlWpg4p
2017-06-29 22:42:12 -07:00
Mats Palmgren
949cb19d0b Bug 1377348 - Make nsLookAndFeel final to allow the compiler to devirtualize some calls. r=tn
MozReview-Commit-ID: 7AoZKsTyb3O
2017-06-30 03:34:15 +02:00
Bruce Sun
caf2005748 Bug 1368948: [7/7] Add moz.build for PDFium. r=glandium
MozReview-Commit-ID: J9YPDe90cMc
2017-06-29 17:18:34 -07:00
Stephen A Pohl
e7bc7d572d Bug 1356317: Enable off-main-thread compositing on Windows when possible. r=jimm 2017-06-29 14:37:56 -07:00