Commit Graph

23842 Commits

Author SHA1 Message Date
Noemi Erli
9793ca2da4 Merge inbound to mozilla-central. a=merge 2018-07-14 00:52:51 +03:00
Kris Maglione
c15ee94ddc Bug 1475612: Fix double file close on background thread. r=erahm
LSBUtils closes a file descriptor twice, once with fclose and then again with
close. It also does this on a background thread, during startup, which means
it tends to race with main thread code which opens files.

This patch fixes that, and also removes a work-around for the issue in the
MemMapSnapshot code.

MozReview-Commit-ID: JdDHt9ayFEl

--HG--
extra : rebase_source : 2000ede41108d6312734d8df7db98272b33528fa
extra : amend_source : 1443a596fab3e3126a22d44787adaf5e12e4587c
2018-07-12 23:13:04 -07:00
Masayuki Nakano
6118393cb8 Bug 1399126 - Make nsWindow for Windows not notify widget listener of activated/inactivated if active window is changed from/to popup window r=jimm
Some odd mouse drivers try to activate a window which the mouse driver wants to
scroll its content (such window is typically under the mouse cursor when mouse
wheel is turned).  However, this is illegal behavior and such odd mouse drivers
try to activate our popup windows which won't be activated without such apps.

We prevented this odd focus behavior with fixing of bug 953146.  However, it
did NOT stop notifying widget listener of activating nor inactivating the
windows.  Therefore, that caused a lot of reflow for supporting
-moz-window-inactive pseudo class.

This patch makes nsWindow::DealWithPopups() consume WM_ACTIVATE message before
nsWindow::ProcessMessage() because nsWindow::ProcessMessage() notifies widget
listener of activating and inactivating window even when focus move from and to
our popup window.  So, in other words, this patch stops notifying widget
listener of activating and inactivating window when focus moves from/to
a popup window.

MozReview-Commit-ID: 2dyq07zHZKp

--HG--
extra : rebase_source : 8075a3ead73a5f2892a1a1a8e71252e574200bf4
2018-07-10 21:24:06 +09:00
Brian Grinstead
eafdeadedf Bug 1475305 - Remove document.width and document.height from XULDocument;r=bz
MozReview-Commit-ID: 8jWcMUYA25R

--HG--
extra : rebase_source : c23a2e647922882fc1ca3d7153ec95c5d8a2aa9d
2018-07-12 11:35:11 -07:00
Masayuki Nakano
bb49027e6b Bug 1475153 - Make TSFTextStore::RecordCompositionStartAction() merge new composition with previous composition if IME commits composition and restart composition to replace the previous commit string r=m_kato
When user removes all composition string of MS Pinyin, MS Wubi, MS ChangJie and
MS Quick with Backspace key, IME commits last character temporarily and
restart composition to replace the last character with empty string when
user tries to remove last one character.

This causes flicking composition string because the additional composition
selects the character and it may be painted immediately before removed, and
also editor will have unnecessary undo transaction.

Therefore, as same as bug 1208043, TSFTextStore::RecordCompositionStartAction()
should restart last composition in such case.  Fortunately, we implemented
similar code for bug 1208043, however, unfortunately, we don't have preceding
pending compositionstart in this case.  Therefore, this patch makes
pending compositionend store start offset of composition.  Then, we can
restart composition only with information stored by pending compositionend
action.  Additionally, this patch renames the method checking pending
actions for self-describing the new meaning.

MozReview-Commit-ID: 1RyuacxEbky

--HG--
extra : rebase_source : 1c8ecc0b63114ae65c77cd76cb85a21d2716442c
2018-07-12 22:40:07 +09:00
Dão Gottwald
b1fa16e576 Bug 1470341 - Also call UIResolutionChanged from WM_MOVING. r=jimm
MozReview-Commit-ID: 2qyYncBG9jf

--HG--
extra : rebase_source : 0b5e9269756c572efdbff17d191b5a1579b20bc3
2018-07-04 12:58:33 +02:00
Masayuki Nakano
b98777fe41 Bug 1462257 - TextComposition should dispatch eCompositionChange event when eCompositionCommit is being fired immediately after eCompositionStart r=m_kato
TextEditor modifies composition string or selected string when first
eCompositionChange event is received.  However, TextComposition dispatches
eCompositionChange event ("text" event of DOM) only when composition string
becomes non-empty if current composition string is empty.  So, when IME
dispatches only eCompositionStart and eCompositionCommit events for removing
selected text, TextEditor does nothing.  This hacky behavior is used by
MS Pinyin on Windows 10 at least.

For supporting this behavior, we need to make TextComposition dispatch
eCompositionChange event when eCompositionChange(AsIs) event is fired
even before dispatching eCompositionChange event.

Although from point of view of web apps, the hacky composition should be
merged into the previous composition if it's possible but it's out of scope
of this bug.

MozReview-Commit-ID: 7QfeBJamGTU

--HG--
extra : rebase_source : 8de1353021f2961ae9f8bdf17ddded1058175339
2018-07-11 23:05:39 +09:00
Martin Stransky
cd921ebea3 Bug 1470047 - Implement InitBySystemSettingsWayland() and get key modifiers on Wayland, r=ashie
Use wl_keyboard_listener and keymap event to get key mapping on Wayland. Weston simple-im.c example
is used as a reference implementation and actual key modifiers are derived from Wayland/GDK code from
gdkkeys-wayland.c.

MozReview-Commit-ID: 9fMwCvxkYy0

--HG--
extra : rebase_source : 21212cadfa7b1e8bacec2d6fb6970d2aaba7b3f6
2018-07-10 18:28:32 +02:00
Tiberius Oros
92ba19b150 Merge inbound to mozilla-central. a=merge 2018-07-10 12:45:13 +03:00
Ciure Andrei
71c8139e52 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-07-10 01:02:15 +03:00
Matt Howell
7496fb37dd Bug 1368808 - Honor the system light/dark mode setting on Windows 10. r=jimm
MozReview-Commit-ID: 3bzhX9bfR4s

--HG--
extra : rebase_source : 52619ebf8fa230bc03d499fdb81f632296e2997b
2018-07-08 17:32:52 -07:00
Olli Pettay
7146d67afe Bug 1472887, focusin/out should be composed, and mark chrome event target chain items as chrome, r=masayuki 2018-07-09 17:40:01 +03:00
ozoder
6b491fa02a Bug 1472611 - Don't link DBus 1.5.12 symbol dbus_validate_bus_name(), r=stransky
MozReview-Commit-ID: 6scVh8DOex2

--HG--
extra : rebase_source : d66577a13d06b1a1bdcd1ec0e25fd1dc75d84a1e
2018-07-04 09:24:34 +02:00
Martin Stransky
a1dbf9b9f1 Bug 1474265 - Add missing semicolon at DBusRemoteClient.cpp, r=jhorak
MozReview-Commit-ID: HIz4gZOzfOE

--HG--
extra : rebase_source : 1b0cafbad46b231b2330bfe93acd59ba5e27e471
2018-07-09 13:18:59 +02:00
Kris Maglione
17578086c0 Bug 1472523: Part 4 - Avoid unnecessary domain string duplication in preference observers. r=njn
MozReview-Commit-ID: EMCgMRTDqDn

--HG--
extra : rebase_source : 11731e5a7c53c725396a9c8b46f116071d0c6e31
2018-07-04 14:52:48 -07:00
Aaron Klotz
75d2812072 Bug 1460022: Part 11 - Update Win32 nsWindow to work with revised DLL interceptor interface; r=mhowell 2018-06-27 11:52:01 -06:00
shindli
dd50d1646e Backed out 13 changesets (bug 1460022) for bustages in :/build/build/src/mozglue/tests/interceptor/TestDllInterceptor.cpp(113) on a CLOSED TREE
Backed out changeset b798c3689bbf (bug 1460022)
Backed out changeset c3b3b854affd (bug 1460022)
Backed out changeset ecb1b6fd3134 (bug 1460022)
Backed out changeset 91fed649dd5a (bug 1460022)
Backed out changeset be7032cddad2 (bug 1460022)
Backed out changeset d4a036b976e6 (bug 1460022)
Backed out changeset 5f3dfde41e38 (bug 1460022)
Backed out changeset a16486a6f685 (bug 1460022)
Backed out changeset 69eacc5c3ab8 (bug 1460022)
Backed out changeset 34aa7c29b31e (bug 1460022)
Backed out changeset 00b20c0a7637 (bug 1460022)
Backed out changeset b8e8aea4a01f (bug 1460022)
Backed out changeset 15822d9848d8 (bug 1460022)
2018-07-04 03:37:11 +03:00
Aaron Klotz
f6d3eb0eb2 Bug 1460022: Part 11 - Update Win32 nsWindow to work with revised DLL interceptor interface; r=mhowell 2018-06-27 11:52:01 -06:00
shindli
dcc88f33f9 Backed out 13 changesets (bug 1460022) for bustages in builds/worker/workspace/build/src/dom/plugins/ipc/FunctionHook.h💯24 on a CLOSED TREE
Backed out changeset 0734142a3f35 (bug 1460022)
Backed out changeset 18fbfa7ca685 (bug 1460022)
Backed out changeset 2df129bd5692 (bug 1460022)
Backed out changeset 02a7ed68933f (bug 1460022)
Backed out changeset 221137d1c2de (bug 1460022)
Backed out changeset 9cb0b7a15402 (bug 1460022)
Backed out changeset 18f8f85c0307 (bug 1460022)
Backed out changeset 867a1351efff (bug 1460022)
Backed out changeset 933e0b698f8e (bug 1460022)
Backed out changeset 09da660071e1 (bug 1460022)
Backed out changeset 8bb5142d3f53 (bug 1460022)
Backed out changeset 0ddf581bdaac (bug 1460022)
Backed out changeset 1cd5f9b4a6af (bug 1460022)
2018-07-04 02:49:24 +03:00
Aaron Klotz
2a9cc69e85 Bug 1460022: Part 11 - Update Win32 nsWindow to work with revised DLL interceptor interface; r=mhowell
--HG--
extra : rebase_source : 273ea15e8379a8ff51ab6d37d210c86a9d72b78c
2018-06-27 11:52:01 -06:00
Olli Pettay
50ab1c422a Bug 1472570 - Use GetComposedDoc in nsBaseDragService, r=mrbkap
--HG--
extra : rebase_source : 78ada86c138960ed09b63d1755e7fb6fd5773cb3
2018-07-03 17:51:02 +03:00
Martin Stransky
df210ffb15 Bug 1444437 - [Wayland] Don't map mozcontainer subsurface until parent surface is commited, r=ashie
MozReview-Commit-ID: 4qoyGH8VCAU

--HG--
extra : rebase_source : 32c2e5d80268d082b4a9a8ae8c90d2ee86537fd2
2018-06-28 13:37:31 +02:00
Martin Stransky
1f770d80e5 Bug 1467128 - [Wayland] Get VSync from Gtk/Wayland, r=lsalzman
VSync on Wayland is a bit tricky as we can get only "last VSync" event signal with
CLOCK_MONOTONIC timestamp or none (if application is hidden/minimized).

That means we should draw a next frame at "last Vsync + frame delay" time and also
approximate next VSync event when we don't get any.

MozReview-Commit-ID: FI3Z4nkmDNK

--HG--
extra : rebase_source : 8a0f6148990cf4e7ad26ff287eadff87cb0215fc
2018-06-29 13:15:41 +02:00
Masayuki Nakano
36f73c43d8 Bug 1435717 - Make calling WidgetEvent::PreventDefault*() stop cross process forwarding too r=smaug
Currently, if an event is consumed in the main process, EventStateManager
does not send it to remote process.  However, this is unexpected behavior
for some WidgetKeyboardEvent dispatchers.  OS sometimes has consumed native
key events before sending applications.  For example, Alt key on Windows
should activate menu bar of focused window but Alt key may be consumed before
focused window receives the event.  In such case, we mark Alt keyboard event
as "consumed before dispatch", and chrome treat it like as its preventDefault()
is called in web content.  (Note that for compatibility with other browsers,
the consumed state is not exposed to web content.  So, Event.defaultPrevented
returns false in web content.)

Therefore, we need to treat "consumed" state and "cross process forwarding"
state separately.  This patch makes calling WidgetEvent::PreventDefault()
always stops cross process forwarding for backward compatibility.  Additionally,
for the special case mentioned above, this patch makes
WidgetEvent::PreventDefaultBeforeDispatch() take additional argument,
|aIfStopCrossProcessForwarding|.  If this is CrossProcessForwarding::eStop,
the event won't be sent to remote process as same as calling PreventDefault().
Otherwise, CrossProcessForwarding::eHold, PreventDefaultBeforeDispatch() call
does not change "cross process forwarding" state.  I.e., if the event's
StopCrossProcessForwarding() and PreventDefault() are not called until
EventStateManager::PostHandleEvent(), the event will be sent to remote process
as usual.

MozReview-Commit-ID: IQGWJvXetxV

--HG--
extra : rebase_source : 4ccdd500e80b8fe29e469ac3b85578e1c07c8358
2018-06-25 18:17:18 +09:00
Margareta Eliza Balazs
ee85ffa45d Merge inbound to mozilla-central. a=merge 2018-06-29 12:41:54 +03:00
Stephen A Pohl
e3f956cbc6 Bug 1471950: Restrict to 10.14 and above the automatic enabling of the dark theme when the system appearance changes to dark mode. r=haik 2018-06-28 21:18:31 -04:00
Stephen A Pohl
0259400505 Bug 1471950: Add nsCocoaFeatures::OnMojaveOrLater(). r=haik 2018-06-28 21:18:25 -04:00
shindli
c57ab475c6 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-29 01:51:06 +03:00
shindli
d288e9cae7 Merge inbound to mozilla-central. a=merge 2018-06-29 00:53:32 +03:00
Xidorn Quan
7a0d908a3d Bug 1471866 - Ensure viewport scrollbar uses style from root element. r=spohl
MozReview-Commit-ID: 1rIJFJHN0vf

--HG--
extra : rebase_source : 3dd2e0b54030507803b23023c01c2a1cd4949d38
2018-06-28 22:03:33 +10:00
Xidorn Quan
8a7d143341 Bug 1471766 - Ensure scrollcorner is handled for webrender. r=kats
MozReview-Commit-ID: JIIuG46WF3f

--HG--
extra : rebase_source : b5914ce3e77d0a3e64918d013e7eaf70611d9b41
2018-06-28 21:28:41 +10:00
Cosmin Sabou
a612a6fdf5 Merge mozilla-central to mozilla-inbound. a=merge 2018-06-28 13:13:46 +03:00
Cosmin Sabou
f4b3baf021 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-28 13:04:23 +03:00
Samuel Thibault
01084d60d8 Bug 1376756 - gtk: while drawing nsTreeBodyFrame, fetch current row attributes for proper style rendering. r=karlt 2018-06-27 05:11:00 +03:00
Masayuki Nakano
d4325e3dc9 Bug 1215818 - part 3: Add telemetry probe to collect IM share on Linux r=m_kato
Different from Windows and macOS, we cannot check if active keyboard layout
works as "IME" actually.  Therefore, this patch add the telemetry probe
to the dispatcher of eCompositionStart.  However, composition string is also
used by some Wester keyboard layouts which have dead keys.  So, the meaning
of the result is deferent from the other platforms, but it must be useful
information which IM (e.g., fcitx, ibus) is used by most users.

MozReview-Commit-ID: A7vYuGtcrRw

--HG--
extra : rebase_source : 1f0948b58b999eee4b539d7db05d455b34f4be72
2018-06-20 14:55:46 +09:00
Masayuki Nakano
611612e70e Bug 1215818 - part 2: Add telemetry probe to collect IME usage on macOS r=m_kato
This patch adds a telemetry probe to collect Input Source ID or Bundle ID of
IME when an IME open mode is selected by user.  Input Source ID includes
input mode of IME, but Bundle ID does not so.  In most languages, we need
to collect the former, but only for Japanese IME, we need to collect the
latter because non-Japanese IME's input mode is "how to input characters".
So, the input mode is important.  However, Japanese IME's input mode is
"to input which type of characters".  So, Japanese IME user may use multiple
input modes but we need only the IME mode.  If we'd collect number of
each input mode users of Japanese language, it'd be difficult to count
how many users actually used typical Japanese IME since somebody may use
only a mode, some others may use only different modes.

So, this patch collects Input Source ID when non-Japanese IME is open and
Bundle ID when Japanese IME is open.

MozReview-Commit-ID: CltLrWVGyRk

--HG--
extra : rebase_source : 752dd00c4e43bda9586ed3ba498636bf5069ead2
2018-06-20 11:33:42 +09:00
Masayuki Nakano
d7023e18b8 Bug 1215818 - part 1: Add telemetry probe to collect TIP names of TSF which are actually used by the users r=jimm,m_kato
We always struggle with a lot of IME bugs on Windows.  Currently, any IME
vendors should've already released TIP for TSF rather than legacy IMM-IME
since IMM-IME is not available on UWP apps.  Additionally, due to API
limitation, it's difficult to get human-friendly name of IMM-IME.  So, let's
collect only TIP names of TSF on Windows.  This must be enough.

Note that we cannot get common-English name even though the API to retrieve
TIP name taking language code.  Therefore, a TIP may be collected with
different name, e.g., one is Japanese name and the other is English name.
If we collect GUIDs of TIP, we can avoid this issue.  However, it's
difficult to collect both GUID and human-friendly name since Telemetry
key is up to 72 characters.

Currently, I give up to avoid this duplicated issue.  Perhaps, this is not
so serious issue since most TIP users must match language of TIP and their
system language settings.  Therefore, this patch collects Locale ID of
TIP and description of it.  Locale ID is necessary because some TIPs may be
named same name for different languages.  For example, both Japanese and
Hangul IMEs of Microsoft are named as "Microsoft IME".

MozReview-Commit-ID: IeSxfeqS62a

--HG--
extra : rebase_source : b269ce3c41f7a998193972afb31183a61d3948be
2018-06-19 21:00:01 +09:00
Tiberius Oros
945c24abe5 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-28 01:12:18 +03:00
Alex Gaynor
ac56b410a9 Bug 1470994 - remove unused accuracy field from SensorData; r=gsvelto
Reviewers: gsvelto

Reviewed By: gsvelto

Bug #: 1470994

Differential Revision: https://phabricator.services.mozilla.com/D1817

--HG--
extra : rebase_source : 03e1aee4934bcba96968578ba92d6c2ec6275747
extra : amend_source : 6f6e69fb6e18d092090e99db765e12c16021f265
2018-06-27 16:05:48 +03:00
Emilio Cobos Álvarez
a24ebbee4e Bug 1470545: Add chromeonly "shadowrootattached" event for devtools. r=smaug
Summary:

document.addEventListener("shadowrootattached", e => {
  // Do stuff with composedTarget.
});

I didn't bother to add tests for the event itself since this is going to get
tested in bug 1449333, but I can look into writing a chrome mochitest if you
want.

Test Plan: See above.

Reviewers: smaug

Bug #: 1470545

Differential Revision: https://phabricator.services.mozilla.com/D1777

MozReview-Commit-ID: 55cVMSsznMS
2018-06-27 11:24:43 +02:00
Xidorn Quan
5d2f11ce8d Bug 1464722 part 6 - Enable scrollbar colors test on mac. r=spohl
MozReview-Commit-ID: IfBhLvGzr5u

--HG--
extra : rebase_source : 088455347ba1975bcec946bba5dc2a40892d0faf
2018-06-25 10:16:25 +10:00
Xidorn Quan
bc30486b09 Bug 1464722 part 5 - Paint scrollcorner for custom scrollbars on cocoa. r=spohl
MozReview-Commit-ID: EMj8urC6AWX

--HG--
extra : rebase_source : e3c966f0e740a0158078dfe2174c0e8ece1f7906
2018-06-25 09:56:38 +10:00
Xidorn Quan
277ee108e2 Bug 1464722 part 4 - Render custom scrollbars on cocoa widget. r=spohl
MozReview-Commit-ID: ITzdevItp1d

--HG--
extra : rebase_source : 64e7b6e215828e281fc0068d231392bdaad506e6
2018-06-22 14:17:22 +10:00
Xidorn Quan
a2a4430e6e Bug 1464722 part 3 - Fix rtl computation in ComputeScrollbarParams. r=spohl
MozReview-Commit-ID: GVAfPYS34a9

--HG--
extra : rebase_source : 13ed01a52cd22d269dbe0f4771b0a7dcf6acdcbc
2018-06-25 09:43:05 +10:00
Xidorn Quan
af6bddef48 Bug 1464722 part 2 - Move relative luminance functions into gfx. r=jrmuizel
MozReview-Commit-ID: H1BDdffJxaz

--HG--
extra : rebase_source : 369a7a8a5ac874aa2616189c8677e3ce335cec26
2018-06-21 16:34:06 +10:00
Xidorn Quan
ae309097a6 Bug 1464722 part 1 - Move functions related to custom scrollbars into nsNativeTheme. r=jimm
MozReview-Commit-ID: 4URdu5Tj5dg

--HG--
extra : rebase_source : 5a0103476ca798b23c34074bb0d7fbac4fd44bc0
2018-06-21 16:32:17 +10:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Stephen A Pohl
1f2e716a79 Bug 1466335: Automatically switch to the appropriate Firefox theme based on the macOS dark mode system preference. r=dao,mstange 2018-06-27 13:59:21 -04:00
Emilio Cobos Álvarez
c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Margareta Eliza Balazs
14cb8f1c23 Merge inbound to mozilla-central. a=merge 2018-06-26 17:53:19 +03:00