Граф коммитов

22255 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano f303a1f631 Bug 1379448 - ContentCacheInParent::FlushPendingNotifications() should do nothing if aWidget is nullptr r=m_kato
Due to the fix of bug 1376424, ContentCacheInParent::FlushPendingNotifications() may be called when aWidget is nullptr. In this case, it doesn't need to do anything.  So, it should ignore the call.

MozReview-Commit-ID: Fj3J76v6Xuk

--HG--
extra : rebase_source : 18c722628a3ae8fa50beca3908d5e732cec404d9
2017-07-10 17:33:26 +09:00
Carsten "Tomcat" Book 049436ef06 Merge mozilla-central to autoland 2017-07-11 13:02:38 +02: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
Martin Stransky fa30ab7210 Bug 1373249 - Enable OMTC for composited popups, r=karlt
MozReview-Commit-ID: 1G4P2B4CA3z

--HG--
extra : rebase_source : aad1dbbae6e589f8925c2224f242b878d44a3d64
2017-06-15 17:17:53 +02: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
Farmer Tseng d8467854d7 Bug 1370488 - Add support for having printing on Windows print via Skia PDF and PDFium r=jwatt
1. Convert PDF to EMF via PDFViaEMFPrintHelper.
2. Replay EMF on printer DC.

MozReview-Commit-ID: 8YTcaZ2Y1rO

--HG--
extra : rebase_source : 7b5e718c7fe5dbeee13bbd7a0c958cd285d0833f
2017-06-08 18:55:42 +08:00