Commit Graph

23957 Commits

Author SHA1 Message Date
Jed Davis
96c18b6c4a Bug 1467889 - Adjust some uses of XPCOM strings. r=mrbkap r=mstange
MozReview-Commit-ID: 5AG4WAmbLZz
2018-07-19 14:14:50 -06:00
Jeff Muizelaar
c4b5567231 Bug 1477036. Expose wrQualified in telemetry. r=kats
This adds a WEBRENDER_QUALIFIED feature that's set whenever the webrender could
be used on a machine regardless of whether it's actually being used.

MozReview-Commit-ID: Eke6PMKQOnx

--HG--
extra : rebase_source : 977d371c12c9e8ab3273d6e65655e0378c22c226
2018-07-19 14:05:29 -04:00
Jeff Muizelaar
4f9417ef01 Bug 1477033. Cleanup InitFeatureObject. r=kats
This removes an unused gfxConfig check and changes Maybe<FeatureStatus>
into FeatureStatus as none of the callers were using None.

MozReview-Commit-ID: Kep6nYpDI3B

--HG--
extra : rebase_source : d7f71dd9b358bfd2c57380d7bc194d6002a50cb9
2018-07-19 14:11:34 -04:00
Masayuki Nakano
0ed11cb188 Bug 1453629 - nsIWidget::GetNativeIMEContext() should return pseudo IME context if TextInputProcessor has a composition on the widget r=m_kato
Key of TextCompositionArrary to search composition on widget is native IME
context.  However, if TextInputProcessor dispatches composition events via
TextEventDispatcher, TextEventDispatcher::InitEvent() sets native IME context
of dispatching composition events to pseudo IME context (that's raw pointer
of TextEventDispatcher and process ID).

IMEStateManager::DispatchCompositionEvent() looks for existing TextComposition
with native IME context stored in WidgetCompositionEvent before dispatching
an event.  However, after dispatching it, it looks for remaining TextComposition
instance with widget stored in WidgetCompositionEvent.  Then,
TextCompositionArrary::IndexOf(nsIWidget*) will look for an instance with
the result of nsIWidget::GetNativeIMEContext() and this never returns actual
native IME context.  Therefore, IMEStateManager::DispatchCompositionEvent()
always fails to remove TextComposition instance from the array even after
a test composition is finished.

This patch moves nsIWidget::GetNativeIMEContext() to nsBaseWidget to refer
nsBaseWidget::mTextEventDispatcher makes it return pseudo IME context if
TextInputProcessor has input transaction.  Therefore, IMEStateManager becomes
always removes TextComposition from the array when every composition ends.

MozReview-Commit-ID: H1PCtPjBYJR

--HG--
extra : rebase_source : cbb3f3aae9954d65135d3840be8974fa30c4f7ff
2018-07-17 22:31:51 +09:00
Cosmin Sabou
88199de427 Merge mozilla-inbound to mozilla-central. a=merge 2018-07-18 20:19:59 +03:00
Margareta Eliza Balazs
42e6813f3f Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-18 12:42:29 +03:00
Xidorn Quan
c6926db959 Bug 1476477 - Replace nsAutoCString with nsCString for local result variables in windows widget. r=masayuki
MozReview-Commit-ID: JN6GVPTZNg2

--HG--
extra : rebase_source : f3b997f3b8fbcefd2de660158f336364282ef2f6
2018-07-18 10:44:00 +10:00
Tiberius Oros
d701ae940f Merge inbound to mozilla-central. a=merge 2018-07-18 00:55:33 +03:00
Bas Schouten
2ffa4da191 Bug 1476506: Move RoundedRect into Moz2D and convert all callers. r=mattwoodrow 2018-07-18 08:55:43 +02:00
Jim Chen
4f6c4496c9 Bug 1470786 - 1. Support async text changes from replacing text; r=esawin
Currently, we expect editing operations in
GeckoEditableSupport::OnImeReplaceText to cause synchronous text change
notifications. However, under e10s, text change notifications can be
asynchornous. The new code keeps track of active OnImeReplaceText calls,
and look for async text changes before replying to the calls.

MozReview-Commit-ID: INM3JLmQebK

--HG--
extra : rebase_source : ff5b728ef437fcd78e4e7eced9c9a537d4698dce
2018-07-17 11:22:34 -04:00
Kris Maglione
0bfdb4329f Bug 1473631: Part 0a - Make preference callbacks typesafe. r=njn
I initially tried to avoid this, but decided it was necessary given the number
of times I had to repeat the same pattern of casting a variable to void*, and
then casting it back in a part of code far distant from the original type.

This changes our preference callback registration functions to match the type
of the callback's closure argument to the actual type of the closure pointer
passed, and then casting it to the type of our generic callback function. This
ensures that the callback function always gets an argument of the type it's
actually expecting without adding any additional runtime memory or
QueryInterface overhead for tracking it.

MozReview-Commit-ID: 9tLKBe10ddP

--HG--
extra : rebase_source : 7524fa8dcd5585f5a31fdeb37d95714f1bb94922
2018-07-06 12:24:41 -07:00
Doug Thayer
56f41b91a9 Bug 1425144 - Init Jump list on lazy idle thread r=aklotz
We're already committing jump lists on mIOThread, and I see
no errors or problems with initting on mIOThread either, so
I think this is okay. Had to restructure some things to
make using a Promise simple, and to avoid dispatching to
mIOThread from within mIOThread (since we can only dispatch
to a LazyIdleThread from the owner thread).

MozReview-Commit-ID: 1imBF8Jzmn6

--HG--
extra : rebase_source : 4f912e819cec898910e72d95311e3924714a3090
2018-06-27 08:59:07 -07:00
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
Dale Harvey
dc2a4a2d84 Bug 1471877 - Add link to share menu to configuration. r=Gijs,mstange
MozReview-Commit-ID: CCTO9SJJMY6

--HG--
extra : rebase_source : 23daee7ff3550b7613c03f817c2db87aecaf7ec5
2018-06-30 18:35:46 +01:00
Noemi Erli
7c4c1c603f Backed out changeset 68859b04588d (bug 1471877) for failures in browser/content/browser-pageActions.js on a CLOSED TREE 2018-07-18 13:32:50 +03:00
Dale Harvey
dbcfb245b1 Bug 1471877 - Add link to share menu to configuration. r=Gijs,mstange
MozReview-Commit-ID: CCTO9SJJMY6

--HG--
extra : rebase_source : c9ae961b87a5b40a501f72501738f70c129f6d8b
2018-06-30 18:35:46 +01: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
Margareta Eliza Balazs
c866c30fcf Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-26 12:24:32 +03:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Martin Stransky
daff99d97a Bug 1467125 - [Wayland] Get events from Wayland display faster on compositor thread, r=jhorak
MozReview-Commit-ID: AmarsYA2INc

--HG--
extra : rebase_source : c30015ba1a45e98691abdeb012bede816eb8c440
2018-06-06 15:25:15 +02:00
Chris Peterson
ed185e6484 Bug 1469769 - Part 5: widget/gtk: Replace failing NS_NOTREACHED with NS_ERROR. r=karlt
I'm replacing non-failing calls to NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE, but this NS_NOTREACHED fails when running the browser/base/content/test/general/browser_tab_dragdrop2.js test because mContainer is unexpectedly *not* null. This is bug 1469183.

This patch DOES NOT fix the cause of the assertion failure. It just replaces this failing NS_NOTREACHED with NS_ERROR because I can't replace with a fatal MOZ_ASSERT_UNREACHABLE.

MozReview-Commit-ID: KeVjvKGihxZ

--HG--
extra : rebase_source : dc08a8e15d1e98cda0fa755be43c6d06910bfbe8
extra : intermediate-source : 562cc0bfc636f29b1708acd3284567bb8492e030
extra : source : 4f14f18eccd6bb18ed92f1d39a265a30ccdd21a1
2018-06-04 01:43:02 -07:00
Masayuki Nakano
2c6512d478 Bug 900750 - part 6: Rename |name| in test_keycodes.xul to |currentTestName| r=smaug
|name| is too generic but the scope is too wide in test_keycodes.xul.
So, let's rename it to |currentTestName|.

MozReview-Commit-ID: JvEDhRhKYCU

--HG--
extra : rebase_source : 15e06fabddeddb8e79198aa9f135e2951976aa8e
2018-06-04 20:41:43 +09:00
Masayuki Nakano
ec7dded4eb Bug 900750 - part 5: Make NativeKey set KeyboardEvent.key value of AltRight key to "AltGraph" when active keyboard layout has AltGr key r=m_kato,smaug
When AltGr key is pressed, following messages come:

1. WM_KEYDOWN for ControlLeft
2. WM_KEYDOWN for AltLeft
3. WM_SYSKEYUP for ControlLeft
4. WM_KEYUP for AltLeft

In these key sequence, KeyboardEvent.key value of keydown event at #2 and keyup
event at #4 should be "AltGraph".  This patch fixes the key value and
adding new test into test_keycodes.xul to check the behavior with
SynthesizeNativeKey().

MozReview-Commit-ID: JZ6WednB8la

--HG--
extra : rebase_source : 596371ede89e90c23f7e842b26ec8155b911fe60
2018-05-31 18:36:33 +09:00
Masayuki Nakano
cccab7b98a Bug 900750 - part 4: Make NativeKey replaces MODIFIER_CONTROL and MODIFIER_ALT of mModKeyState with MODIFIER_ALTGRAPH if user emulates AltGr key press with pressing both Ctrl and Alt keys and current keydown produces character(s) r=m_kato,smaug
Users can emulate AltGr key with pressing both Ctrl key and Alt key on Windows
since AltGr is represented as so in Windows and physical keyboard may not have
AltRight key.

If user emulates AltGr key, we should set MODIFIER_ALTGRAPH to a set of
keyboard events for printable keys only when the key press produces
character(s) or a dead key.  For example:

1. ControlLeft keydown event should make ctrlKey true.
2. AltLeft keydown event should make altKey true (not AltGraph state).
3. ctrlKey and altKey of printable keydown, keypress and keyup events should be
   set to false, but getModifierState("AltGraph") should return true.
4. AltLeft keyup event should make altKey false.
5. ControlLeft keyup event should make ctrlKey false.

(If AltLeft key is pressed first, altKey of AltLeft keydown is true and
both altKey and ctrlKey of the following ControlLeft keydown are true as
usual.)

MozReview-Commit-ID: 8Km8GXPDQw1

--HG--
extra : rebase_source : f4924f075c68361c8ce563910280ea24774c519f
2018-06-04 14:45:28 +09:00
Masayuki Nakano
ad475fd697 Bug 900750 - part 3: Remove unnecessary ModifierKeyState argument from some methods of NativeKey and KeyboardLayout r=m_kato
KeyboardLayout::InitNativeKey() takes |const ModifierKeyState&| as its
argument with NativeKey reference and it calls some internal methods with
the given ModifierKeyState without any changes.  Additionally, its caller
is only NativeKey::InitWithKeyChar() and its called with given NativeKey
instance's mModKeyState.  So, removing the redundant arguments from
some methods makes them clearer what they compute with.

So, this patch does not change any behavior.

MozReview-Commit-ID: 3w9Ee7PMU05

--HG--
extra : rebase_source : b724a18d5a14672e60ffa5fb9feca5c11dac42a3
2018-06-01 15:22:41 +09:00
Masayuki Nakano
8fc19f6752 Bug 900750 - part 2: Make ModifierKeyState and VirtualKey treat AltGraph as new modifier and won't set Control and Alt state while AltGraph is active r=m_kato,smaug
By the proposal from Google, <https://github.com/w3c/uievents/issues/147>,
Chromium treat AltRight key as "AltGraph" modifier if the keyboard layout
has AltGr key.

When AltRight key is pressed with a keyboard layout which has AltGr key,
modifiers should as following:

1. "keydown" for ControlLeft:
  ctrlKey:  true, altKey: false, getModifierState("AltGraph"): false
2. "keydown" for AltRight:
  ctrlKey: false, altKey: false, getModifierState("AltGraph"): true
3. Some "keydown", "keypress" and "keyup" events:
  ctrlKey: false, altKey: false, getModifierState("AltGraph"): true
4. "keyup" for ControlLeft:
  ctrlKey: false, altKey: false, getModifierState("AltGraph"): true
5. "keyup" for AltRight:
  ctrlKey: false, altKey: false, getModifierState("AltGraph"): false

So, only when the preceding "keydown" event for ControlLeft, ctrlKey should
be set to true as usual.  However, after AltRight key is pressed actually,
we should treat "AltGraph" modifier is true and both ctrlKey and altKey
should be set to false for web apps can handle text input normally.

So, MODIFIER_ALTGRAPH and MODIFIER_CONTROL/MODIFIER_ALT should not be set
at the same time.

This patch makes ModifierKeyState have only MODIFIER_ALTGRAPH or
MODIFIER_CONTROL/MODIFIER_ALT.

Additionally, this patch makes VirtualKey::ShiftState treat "AltGraph" as a
modifier.  So, now, VirtualKey needs to convert ShiftState to index value when
it accesses its mShiftStates array.  Therefore, this patch adds
VirtualKey::ToIndex() and make each VirtualKey method use it before
accessing mShiftStates.

Note that this patch also fixes bug of WinUtils::SetupKeyModifiersSequence().
The constructor of KeyPair takes 2 keycode values, but the second virtual
keycode can have scancode to distinguish if the key is left or right.
However, WinUtils::SetupKeyModifiersSequence() never sets scancode to
KeyPair.  Therefore, it fails to dispatch AltRight key event.

MozReview-Commit-ID: 7ealxJH9KlZ

--HG--
extra : rebase_source : 761bc4416222def020a0731d6ae7940ef074ebe0
2018-05-30 17:27:31 +09:00
Masayuki Nakano
ac32b59118 Bug 900750 - part 1: Make KeyboardLayout store the information if current keyboard layout has AltGr key r=m_kato
For setting AltRight key's key value to "AltGraph" if it should work as so,
we need to know if current keyboard layout has AltGr key.  Unfortunately,
Windows doesn't provide such information but we retrieve all input characters
from each key when a keyboard layout is loaded.  So, when we load a keyboard
layout, we can mark if current keyboard layout has AltGr key with checking
at least one key inputs different character(s) when AltGr key is pressed.

MozReview-Commit-ID: 8GI3phSVTUS

--HG--
extra : rebase_source : f1622615f03740609984da6d216391e23cae6796
2018-05-29 20:36:38 +09:00
Stephen A Pohl
75b122585b Bug 1467582: Prevent crashes on macOS when an invalid path is specified in the print.print_to_filename pref. r=haik 2018-06-25 15:17:34 -04:00
Masayuki Nakano
fe7c9f7c32 Bug 1468917 - part 2: TSFTextStore::GetTextExt() shouldn't return TS_E_NOLAYOUT when ATOK retrieves text rects *in* the composition string r=m_kato
Currently, TSFTextStore::GetTextExt() won't return TS_E_NOLAYOUT error when
ATOK retrieves text rect of all of the composition string.

However, if user converts 2nd or later clause, ATOK retrieves text rect after
start of the character of selected clause.  Returning TS_E_NOLAYOUT in this
case causes candidate window being positioned temporarily below first character
of the composition string.

For avoiding the flicker of the candidate window, TSFTextStore::GetTextExt()
shouldn't return TS_E_NOLAYOUT when ATOK retrieves text rects *in* the
composition string.

MozReview-Commit-ID: Cp17HmP2QGK

--HG--
extra : rebase_source : bdd2d2867cccdcf1fe39612ca2f52872d472cb7a
2018-06-22 18:43:40 +09:00
Masayuki Nakano
9c693d932d Bug 1468917 - part 1: Make TSFTextStore not create native caret if ATOK 2016 is active r=m_kato
Old ATOK referred native caret position to decide its candidate window position.
However, at least ATOK 2016 does not need to refer it.  Additionally, if we
create native caret for ATOK 2016, the candidate window position, ATOK 2016
refers the native caret only when we cannot return expected rect.  Therefore,
only immediately after modifying composition string, the position is different
from actual position by a couple of pixels and that looks like flicks the
candidate window.

So, we should stop creating native caret for ATOK 2016 (as same as ATOK 2017).

MozReview-Commit-ID: LsmVXCmRIzc

--HG--
extra : rebase_source : 30b7d15cb23e567b14e1231909aa5a17bdf909a6
2018-06-21 19:57:58 +09:00
Bas Schouten
572e54cead Bug 1467363: Protect access to mTransparentSurface with a lock. r=rhunt
MozReview-Commit-ID: 6E9YpDIcuQk
2018-06-21 22:17:48 +02:00
Doug Thayer
10ff9c706f Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : dd000a05bfc2da40c586644d33ca4508fa5330f6
2018-04-29 18:21:20 -07:00
Martin Stransky
99a9d4a1c3 Bug 1441743 - [Wayland] Don't draw directly to frame buffer for partial window updates, r=jhorak
When only a part of window is updated we need to clip that drawing.
We use image surface for that as WindowSurfaceX11Image does.

MozReview-Commit-ID: 13znE1ZszB8

--HG--
extra : rebase_source : a236799fa33d73037913df94c0d5e619c5d3c47e
2018-06-15 09:41:56 +02:00
Cosmin Sabou
c913a59748 Merge central to inbound. a=merge 2018-06-21 04:19:13 +03:00
Cosmin Sabou
4c18cd4036 Merge inbound to central. a=merge
--HG--
rename : servo/components/style/properties/longhand/box.mako.rs => servo/components/style/properties/longhands/box.mako.rs
2018-06-21 04:16:40 +03:00
sotaro
7a2d7e5d6d Bug 1469028 - Supress Renderer threads r=nical 2018-06-21 08:32:09 +09:00
Andi-Bogdan Postelnicu
8cc8f8b517 Bug 1453795 - Widget - Initialize member fields in classes/ structures. r=jimm
--HG--
extra : rebase_source : 594fe9396c450401fab4c17e81a3333124f27f58
2018-06-15 17:48:51 +03:00
Andreea Pavel
f85f162e83 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-06-20 14:31:42 +03:00
Jim Chen
f02dcb9521 Bug 1466910 - 8. Use "content-document-global-created" to attach GeckoEditableSupport; r=esawin
Right now we use the "tab-child-created" notification to attach
GeckoEditableSupport to a PuppetWidget in the child process. However,
"tab-child-created" is not fired for all instances of PuppetWidget
creation, and attaching GeckoEditableSupport at this stage can also
cause race conditions.

This patch makes us listen to "content-document-global-created" instead,
but attach GeckoEditableSupport to the PuppetWidget the same way.

MozReview-Commit-ID: 8IAtzuvlK4K

--HG--
extra : rebase_source : 50e4f05bccd06d301a2c2b1464666e5e1a58b3b2
2018-06-19 16:31:35 -04:00
Jim Chen
e9e6bfafd3 Bug 1466910 - 7. Don't coalesce notifyIMEContext calls; r=esawin
Right now we coalesce notifyIMEContext calls but only for legacy
reasons. With the current code we don't want to coalesce calls, in order
to be properly notified of blurring and focusing.

MozReview-Commit-ID: 6N2jhyyBKui

--HG--
extra : rebase_source : 0a488a726b834da4f6124092426638f4be368d43
2018-06-19 16:31:35 -04:00
Jim Chen
89932955b2 Bug 1466910 - 6. Fix logging code; r=jchen
MozReview-Commit-ID: KciGTPzrkkG

--HG--
extra : rebase_source : df689bce039c001fbb31bf9a949debd847de24e3
2018-06-19 16:31:34 -04:00
Jim Chen
8afd1f13c8 Bug 1466910 - 4. Don't notify of blur unnecessarily; r=esawin
Right now we always notify Java of input blur. However, when input is
rapidly blurred and then focused again, we don't want to generate the
unnecessary blur notification, in order to avoid unwanted effects such
as the keyboard flashing.

MozReview-Commit-ID: AL6aLAHqNpD

--HG--
extra : rebase_source : c0a6a731f95f997a7a8e19eacdb635f99d21ebf5
2018-06-19 16:31:34 -04:00
Jim Chen
594f82583c Bug 1466910 - 1. Forward more InputContext members through e10s; r=masayuki
Some InputContext members are not forwarded through
PBrowser::SetInputContext.

MozReview-Commit-ID: C1bGYq4w8zT

--HG--
extra : rebase_source : 1481f08c7593fe9dceb3b96bbfe480a1c58ecf9d
2018-06-19 16:31:24 -04:00
Andi-Bogdan Postelnicu
59570fd627 Bug 1453795 - Widget/Cocoa - Initialize member fields in classes/ structures. r=mstange
--HG--
extra : rebase_source : 89d030a6ec943ca37e775a7ebceaab8b06e5a433
2018-06-15 17:15:23 +03:00
Xidorn Quan
7038d5f944 Bug 1463917 part 2 - Have windows widget render scrollcorner. r=jimm
MozReview-Commit-ID: K4Cu1mL6xvH

--HG--
extra : rebase_source : 01a9c544b918c1be4002535b1a09c5980022bd9d
2018-05-11 10:21:22 +10:00
Takuro Ashie
06d69fd42b Bug 1468670 - Enablel Alt modifier key on Wayland r=stransky
MozReview-Commit-ID: 3nxxJabsTkx

--HG--
extra : rebase_source : 11b19f1fce05714177c9782485b9a1cb5fadd491
extra : source : 5b0768baf0b7cb2fe1728ba1dcce1344b8e4bcfd
2018-06-20 16:24:27 +09:00
Kartikaya Gupta
ac8ae1c793 Bug 1468545 - Ensure the drag metrics gets to APZ before the target APZC for inactive scrollframes. r=botond
In the case where an inactive scrollframe's scrollbar gets dragged, the
main thread layerizes the scrollframe and dispatches both a
SetTargetAPZC message and a AsyncDragMetrics message using post-refresh
observers. However, the post-refresh observers are registered such that
the SetTargetAPZC message gets sent first, and APZ will start
processing the drag block immediately upon receipt of that event. This
means that the APZC might not have the correct drag metrics when it
processes those input events. For correct behaviour, we want the
AsyncDragMetrics message to reach APZ first in this scenario, and this
patch accomplishes this by allowing the post-refresh observers to be
registered in the opposite order.

MozReview-Commit-ID: 6LzyYYG1t6F

--HG--
extra : rebase_source : 2e3ebaa4fd776c8ad17e8225d70ec4a18eee67e0
2018-06-15 18:13:47 -04:00
Martin Stransky
46f6ecf022 Bug 1464823 - [Wayland] Don't paint until we have a visible wl_surface, r=jhorak,lsalzman
It's based on a solution by Takuro Ashie <ashie@clear-code.com>

MozReview-Commit-ID: FqcdUJQJLdl

--HG--
extra : rebase_source : d4ed4d66439a3693a2f4d5e6a4037ed62969d64f
2018-06-06 11:30:27 +02:00
Martin Stransky
5753c81b38 Bug 1466775 - [Wayland] Configure WebRender on X11, r=jhorak
MozReview-Commit-ID: ChXp7m5XeOI

--HG--
extra : rebase_source : 3b00ba11aad25be75e33138fefa4285b1b19ae21
2018-06-05 11:35:45 +02:00
Joel Maher
50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Bogdan Tara
fd27dd053f Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-06-09 15:08:05 +03:00
Masayuki Nakano
a20855c9f5 Bug 1441821 - NativeKey shouldn't mark eKeyDown and eKeyPress as "skippable in remote process" if message is not caused by physical key press r=m_kato,smaug
Currently, TabChild discards eKeyDown and eKeyPress events which are marked as
"repeated" and were dispatched after the latest eKeyDown event comes into the
process.  However, keyboard layout utils may generate native key events
as "repeated" even if each native key is important to input proper text.

So, TabChild shouldn't decide if coming keyboard event is skippable only with
mIsRepeat.  For solving this issue, this patch adds
mMaybeSkippableInRemoteProcess to WidgetKeyboardEvent and makes
TabChild::SkipRepeatedKeyEvent() check
WidgetKeyboardEvent::CanSkipInRemoteProcess() instead.

On Windows, there are two ways to generate keyboard input messages.  One is
using SendMessage() or PostMessage().  The other is SendInput() API.  In both
ways, utils can make their input as repeated key messages.

The former case must be safe for this issue since such utils need to set 31st
bit of lParam to 1 explicitly.

On the other hand, in the latter case, the utils probably need to append
KEYEVENTF_KEYUP into KEYBDINPUT::dwFlags.  Otherwise, only first call is
treated as non-repeated event.

So, when given message does not came from physical key operation, NativeKey
should set WidgetKeyboardEvent::mMaybeSkippableInRemoteProcess to false
even if WidgetKeyboardEvent::mIsRepeat is true.

MozReview-Commit-ID: 3rinrOjx8Tf

--HG--
extra : rebase_source : 26b6d869260176fc7ef535323b83001bb4b725c2
2018-06-06 23:35:16 +09:00
Chris Peterson
9294aea52b Bug 645325 - Part 1: Use NaN to indicate unset optional coordinate values returned from the location providers. r=garvank r=jdm
nsGeoPositionCoords will convert NaNs returned from the location providers to null properties of the JavaScript Coordinates object.

MozReview-Commit-ID: Cmuf2aO0ClD

--HG--
extra : rebase_source : cbccead609ff53a3e5f1bcf7698eba7382220ce5
extra : source : b4ced6e2bab2d17cf642f5850bda5998f635fccb
2018-02-25 23:35:16 -08:00
Coroiu Cristina
d2f82e1f42 Merge inbound to mozilla-central a=merge 2018-06-07 12:47:31 +03:00
Dan Glastonbury
7811112058 Bug 1465307 - P1: Extend StyleComplexColor to support additive blending. r=hiro,xidorn
Refactored StyleComplexColor to support "complex" blending between
background (numeric) color and foreground color (currentColor).
Made explicit the distinction between numeric, currentColor and a
complex blend in Gecko and Stylo.

This is to support SMIL animation, for example, of the form:

     <animate from="rgb(10,20,30)" by="currentColor" ... />

MozReview-Commit-ID: IUAK8P07gtm

--HG--
extra : rebase_source : d3648101c6f65479b21e6f02945731cd5bb57663
2018-05-23 15:23:26 +10:00
Ting-Yu Chou
dd7965dec0 Bug 1401883 - don't hold unnecessary references to the Windows app shell; r=jimm
When runnables are posted to the main thread's event loop, the event
loop notifies any thread observers that this has been done.  The app
shell registers itself as just such a runnable, and posts messages to
the native event loop that processing native events needs to be done.

On Windows, this posting takes an extra reference to the app shell, to
keep it alive until the message is processed by the native event loop,
since app shell code needs to be invoked during that processing.  The
processing releases this extra reference, so everything stays balanced.

Except that it's possible for messages to be posted to the native event
loop, and then browser shutdown happens.  Those messages are not
processed and the associated references taken are not released.  This
imbalance means that in debug builds, we appear to be leaking the app
shell, and that leaking results in intermittent oranges.

This intermittent orange has manifested itself in a variety of ways over
the years, depending on how big the app shell itself was (since that
changes the number of bytes leaked) and how many leak-checked things the
app shell was holding on to.  This bug is merely the latest
manifestation; the last serious work on analyzing the phenomenon and
fixing it was done in bug 1220517.

The solution proposed in that bug was that we simply stop the extra
reference counting; when the app shell is destroyed normally, we
shouldn't be processing the native event loop any more anyway.  So even
if the native event loop is holding (freed) pointers to the app shell,
we'd never execute the callback and perform a use-after-free.  Reading
through the code suggests that this *ought* to be the case, but the
potential for shooting ourselves in the foot seems awfully high.

In any event, this is not a problem unique to Windows; we have seen this
same sort of thing happen on OS X.  See nsAppShell::ProcessGeckoEvents
in widget/cocoa/nsAppShell.mm.

Here we propose a slightly different solution: we keep track of the
number of native event callbacks we have scheduled, incrementing when we
schedule, and decrementing when we actually run one.  When the app shell
is destroyed, we simply set the number of outstanding events to zero,
and we prohibit the callback from accessing the app shell if there are
no outstanding events.  This solution is analogous to dropping the extra
reference counting, but avoids potential badness if we do wind up
processing native events after the app shell is destroyed.
2018-06-06 11:05:18 -04:00
Randall Barker
2c2e0b614f Bug 1465816 - Add initial code needed to support gfxVRExternal on android r=kip,jchen
MozReview-Commit-ID: 9rXXqIvyvhp
2018-06-05 18:33:01 -07:00
Cosmin Sabou
2c1302b895 Backed out changeset 66a3146a7fce (bug 1465816) for frequent reftest failures on draw_rect.html. CLOSED TREE 2018-06-06 00:28:56 +03:00
Randall Barker
4b62519e23 Bug 1465816 - Add initial code needed to support gfxVRExternal on android r=kip,jchen
MozReview-Commit-ID: 9rXXqIvyvhp
2018-06-05 12:34:15 -07:00
Miko Mynttinen
4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab
7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Andreea Pavel
4ced6e8b2d Merge mozilla-central to autoland. a=merge 2018-06-03 07:27:01 +03:00
Mats Palmgren
8f2a5e19c9 Bug 1466330 - Make nsITheme::GetWidgetBorder return the border directly instead of using an out-param (idempotent patch). r=emilio 2018-06-02 19:10:48 +02:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Boris Zbarsky
c7f378d7ab Bug 1465875 part 1. Eliminate pointless QIs to nsIDOMNSEditableElement. r=qdot
We expose the relevant APIs on textarea and input elements anyway
(chromeonly).  The QIs will throw on a non-input or non-textarea element, but
none of these consumers expect that to happen.
2018-06-01 22:35:22 -04:00
Csoregi Natalia
468205953d Merge inbound to mozilla-central. a=merge 2018-06-02 01:01:33 +03:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Martin Stransky
6d3e29e131 Bug 1464808 - [Wayland] Emulate gdk_drag_context_get_actions(), nsWaylandDragContext::GetSelectedDragAction returns available D&D actions when no one is selected by user, r=jhorak
MozReview-Commit-ID: 586XiJXYZ3D

--HG--
extra : rebase_source : 32d006922cf93f2048f0dda236a69f730fc0f8a0
2018-06-01 12:24:17 +02:00
Noemi Erli
1fd69fa2bc Backed out 18 changesets (bug 1462784) for failures in devtools/client/performance/test/unit/test_tree-model-08.js on a CLOSED TREE
Backed out changeset a74d36598442 (bug 1462784)
Backed out changeset c8192175f360 (bug 1462784)
Backed out changeset cde492240e99 (bug 1462784)
Backed out changeset 8c8d30fa406c (bug 1462784)
Backed out changeset ad3802ffb780 (bug 1462784)
Backed out changeset 2fe10732076c (bug 1462784)
Backed out changeset 268a72b7c3c4 (bug 1462784)
Backed out changeset 4055eb6c3bc6 (bug 1462784)
Backed out changeset 3901070e2e60 (bug 1462784)
Backed out changeset 2faf787fbbdf (bug 1462784)
Backed out changeset 8f06963c7c6f (bug 1462784)
Backed out changeset 036e6f64e224 (bug 1462784)
Backed out changeset e670f156a603 (bug 1462784)
Backed out changeset cd39588aece4 (bug 1462784)
Backed out changeset 2ac65d100fa2 (bug 1462784)
Backed out changeset ea05ff70a51d (bug 1462784)
Backed out changeset 8a06c0ba42f7 (bug 1462784)
Backed out changeset 52ed9a039ad2 (bug 1462784)
2018-06-01 01:06:29 +03:00
Noemi Erli
614b78ae36 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-01 00:58:09 +03:00
Markus Stange
bdb6a5f828 Bug 1462784 - Annotate idle stacks in the native event loop on Linux. r=froydnj
MozReview-Commit-ID: 3Q2A7ytsn1Y

--HG--
extra : rebase_source : 83271e841a84fc2ac7a2fdd5cc66812fb09f61f1
2018-05-18 18:59:47 -04:00
Markus Stange
358ae08897 Bug 1462784 - Annotate idle stacks in the native event loop on Windows. r=froydnj
MozReview-Commit-ID: A0c3ZLLkLUC

--HG--
extra : rebase_source : 9e6c0c0f2fad67fa60f06dbea38b66e3b2ebea6e
2018-05-18 18:59:05 -04:00
Markus Stange
81465bc0d6 Bug 1462784 - Annotate idle stacks in the native event loop on macOS. r=spohl
MozReview-Commit-ID: HD48iBTT8EN

--HG--
extra : rebase_source : 28e5e421b82e2f25fbc806804d36686907cfdd9e
2018-05-16 13:31:02 -04:00
Markus Stange
d521b4678d Bug 1462784 - Add an IDLE category. r=njn
MozReview-Commit-ID: JJ30AhXofBr

--HG--
extra : rebase_source : d79d4da6d51a5dd7259cf015ee1f3678d59ac3bd
2018-05-18 18:15:46 -04:00
Markus Stange
d80822de42 Bug 1462784 - Relabel various other stuff as being OTHER. r=njn
Any more specific work that is happening in these methods will have its own
specific category labeling in that specific code. The instances touched in this
patch are more on the outside and don't really know what kind of code is going
to be running inside.

MozReview-Commit-ID: 47NO1DZzkdH

--HG--
extra : rebase_source : 35362bc94068103367f46b23a14cb3831cd86990
2018-05-18 17:58:43 -04:00
Markus Stange
2d4663fe41 Bug 1462784 - Remove EVENTS category. r=njn
Categories are useful to indicate: This much % of time was spent in this category.

The EVENTS category isn't a very good match for this. This category is currently
only set on labels of functions that handle the processing of an event. But
those functions are usually closer to the base of the stack, and the actual CPU
work during the processing of an event is usually in another category closer to
the top of the stack, e.g. in JS if we're running an event handler, or in LAYOUT
if we're hit testing the position of the event.

This changeset removes the EVENTS category and replaces all uses of it with the
OTHER category.

MozReview-Commit-ID: JPm5hQiBkvp

--HG--
extra : rebase_source : 34fb2ca94151403a6d7ffd5a8b840f00a8bb4afb
2018-05-18 17:36:30 -04:00
Kartikaya Gupta
b81f4d85c3 Bug 1321069 - Redirect the end event of a long-tap sequence back to the content window. r=karlt
In the case of a long-tap touch sequence, a new popup window (the
contextmenu) is spawned while the sequence is ongoing. The touch-end of
the sequence ends up getting delivered to the popup window, instead of
the original content window, and that causes the touch-handling
machinery state in the content window to get out of sync with reality.
This patch detects this scenario and redirects the touch events on the
popup window back to the original content window.

MozReview-Commit-ID: L2vvKLlogRA

--HG--
extra : rebase_source : fd4c36c93e45d05155d415f6470e12979b9a675b
2018-05-30 09:49:23 -04:00
Csoregi Natalia
0c87942d7d Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-30 12:27:51 +03:00
Csoregi Natalia
83a923ef7a Merge inbound to mozilla-central. a=merge 2018-05-30 12:25:03 +03:00
Boris Zbarsky
6213894581 Bug 1455676 part 3. Remove nsIDOMNode usage from widget/. r=qdot 2018-05-29 22:58:48 -04:00
Masayuki Nakano
80b5c54449 Bug 1464016 - TextInputHandler should not clear alt/ctrl/meta modifiers of eKeyPress event before sending TextEventDispatcher r=m_kato
If a key combination causes text input, we need to dispatch keypress
events without alt/ctrl/meta modifiers since TextEditor won't handle
keyepress events whose altKey, ctrlKey or metaKey is true as inputting
text.

Currently, TextEventDispatcher sets mCharCode of eKeyPress event from
mKeyValue.  Then, when altKey, ctrlKey or metaKey is true, it'll call
WillDispatchKeyboardEvent() and then, TextInputHandler needs to reset
the charCode value from native event information.

However, the problem is, TextInputHandler::InsertText() is called
with control character when control key is pressed and InsertText()
clears the modifier information before sending eKeyPress event to
TextEvenDispatcher so that TextEventDispatcher won't call
WillDispatchKeyboardEvent() even though control key is actually
pressed.  Therefore, TextInputHandler cannot adjust charCode value
and modifier flags in some cases such as control + option + 'a'.

This patch makes InsertText() stop clearing the modifiers and
makes WillDispatchKeyboardEvent() do it instead.  This procedure
is expected by TextEventDispatcher.

MozReview-Commit-ID: Ig6qgRBeQDh

--HG--
extra : rebase_source : 446e8af0e921946f3409d26ede70446248317673
2018-05-24 20:59:48 +09:00
Xidorn Quan
661ed3d065 Bug 1463993 - Add a rendering test for scrollbar color properties. r=heycam
MozReview-Commit-ID: 442pfDQUUUs

--HG--
extra : rebase_source : 6e336c36f61d7772023e641ca84751c7ddd2b018
2018-05-29 16:37:35 +10:00
Markus Stange
27976ff026 Bug 1461118 - Null-check mGeckoChild after calling DispatchInputEvent. r=spohl
MozReview-Commit-ID: 4bfe8TM4GuS

--HG--
extra : rebase_source : 472e531f56b6a63b7cc8c5fc9faeef6b4abb76c0
2018-05-28 18:00:35 -04:00
Masayuki Nakano
1d38d6b282 Bug 1458845 - Make TextEventDispatcher dispatch keypress event even if altKey is true on macOS r=smaug
On macOS, option key is mapped to alt key, and it works like AltGr key on
the other platforms.  Since our editor doesn't accept keypress events as
typing printable character if one of altKey, ctrlKey and metaKey of the
events is true, widget for macOS sets those attributes to false when an
editor has focus.  On the other hand, if no editor has focus, our widget
does not do this hack so that altKey and ctrlKey values of keypress events
are always same as actual user operation and this is same behavior as the
other browsers.  Therefore, we need to keep setting altKey of keypress
events to true if no editor has focus but we need to dispatch keypress
events even on content unless the charCode is 0.

So, only on macOS, WidgetKeyboardEvent::IsInputtingText() does not need
to check altKey state.

MozReview-Commit-ID: 4DMgdOfLqvQ

--HG--
extra : rebase_source : 18db91c0d77c6910a206e6c767e6f3b5cfd1c2ab
2018-05-23 22:27:17 +09:00
Dorel Luca
d54a3b06aa Backed out changeset da12c077747f (bug 1448040) for Android build bustage on build/src/obj-firefox/dist/include/mozilla/HangAnnotations.h. CLOSED TREE
--HG--
extra : amend_source : 683201b5a47af3cb7fdcb7426c65f1c9ed713186
2018-05-25 20:13:26 +03:00
Doug Thayer
9765bdd0e0 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : a8840bd26f4b01b756ffa72345ababb625048550
2018-04-29 18:21:20 -07:00
Brendan Dahl
962180171e Bug 1332040 - Dispatch resize after fullscreen transistion for headless. r=jrmuizel
MozReview-Commit-ID: Lo17bhJsnww

--HG--
extra : rebase_source : 6266e9141d8bf99ec4dbaaf6b909e6c02ef9b9d6
2018-05-20 17:00:57 -07:00
Xidorn Quan
ee0c05df56 Bug 1463687 - Apply scrollbar style of root element to scrollbars of viewport. r=heycam
MozReview-Commit-ID: GWmhehtqO1U

--HG--
extra : rebase_source : 18e73bb269c9a0b1fd7d3c4ab25f4ad788d1a065
2018-05-24 16:34:58 +10:00
Martin Stransky
7cc5f69e7a Bug 1463753 - [DragAndDrop] Update mTarget(Wayland)DragContext unconditionally and check its validity after that, r=jhorak
MozReview-Commit-ID: KiNaPDDVvLu

--HG--
extra : rebase_source : 2614c6e33b5a49f809cff5d4590d5f7f4053e808
2018-05-24 11:51:17 +02:00
Noemi Erli
303e1e01d9 Backed out changeset ac922efad9fd (bug 1463687) for failures in build/build/src/layout/base/nsLayoutUtils.cpp on a CLOSED TREE 2018-05-24 13:55:51 +03:00
Xidorn Quan
f34d64c3c5 Bug 1463687 - Apply scrollbar style of root element to scrollbars of viewport. r=heycam
MozReview-Commit-ID: GWmhehtqO1U

--HG--
extra : rebase_source : 76e460a6f57a4caa852ee1ada1c8e213c598bbd1
2018-05-24 16:34:58 +10:00
Markus Stange
a5f551f7c4 Bug 1461635 - Enforce a minimum widget size of 1x1 for toolbar separators. r=spohl
MozReview-Commit-ID: Gc5TC5DGUI

--HG--
extra : rebase_source : 185ad305189e47877bf6765f12917f5307b3b329
2018-05-23 11:55:41 -04:00
Cosmin Sabou
0f45148664 Backed out changeset 531593bacc4e (bug 1448040) for Android build bustages on HangAnnotations.h. CLOSED TREE
--HG--
extra : rebase_source : ea3618023c548a8ca6ca14749633c194606af52f
2018-06-07 19:22:31 +03:00
Doug Thayer
87bf13e093 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : 59e4a6ced7d14d2a01c0b79e944078ea84cae523
2018-04-29 18:21:20 -07:00
Tooru Fujisawa
0eaac17a4a Bug 1378585 - Remove unused nsDragDropEventStatus enum. r=masayuki 2018-05-31 15:15:48 +09:00
Csoregi Natalia
2f779be8d9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-02 01:03:45 +03:00
Markus Stange
9930a8e72c Bug 1462784 - Annotate idle stacks in the native event loop on Linux. r=froydnj
MozReview-Commit-ID: 3Q2A7ytsn1Y

--HG--
extra : rebase_source : 34c6c678570924bc0e5955a0f8545f1ab1df0d02
2018-05-18 18:59:47 -04:00
Markus Stange
c154c90490 Bug 1462784 - Annotate idle stacks in the native event loop on Windows. r=froydnj
MozReview-Commit-ID: A0c3ZLLkLUC

--HG--
extra : rebase_source : deab79f008225eadfbf301d094e928d9aeff452b
2018-05-18 18:59:05 -04:00
Markus Stange
fdb7675018 Bug 1462784 - Annotate idle stacks in the native event loop on macOS. r=spohl
MozReview-Commit-ID: HD48iBTT8EN

--HG--
extra : rebase_source : 4f34c1b4de30ec5d94a07aa9bab3bd301041c7d6
2018-05-16 13:31:02 -04:00
Markus Stange
c545b8d1ba Bug 1462784 - Add an IDLE category. r=njn
MozReview-Commit-ID: JJ30AhXofBr

--HG--
extra : rebase_source : 0e94fb43e57411281fd57eea54815aef4558b6df
2018-05-18 18:15:46 -04:00
Markus Stange
423ce68542 Bug 1462784 - Relabel various other stuff as being OTHER. r=njn
Any more specific work that is happening in these methods will have its own
specific category labeling in that specific code. The instances touched in this
patch are more on the outside and don't really know what kind of code is going
to be running inside.

MozReview-Commit-ID: 47NO1DZzkdH

--HG--
extra : rebase_source : 344c380ddaaf42a1fd820a26b762c61ee9e2d524
2018-05-18 17:58:43 -04:00