Commit Graph

21720 Commits

Author SHA1 Message Date
Mats Palmgren
2feec4025d Bug 1333482 part 5 - [css-ui] Enable '-moz-appearance' support for some tests. r=dholbert
* * *
[mq]: sssssssss

MozReview-Commit-ID: 4wgnjld1rDt
2017-03-23 22:11:23 -07:00
Mats Palmgren
00b74113a3 Bug 1333482 part 4 - [css-ui] Amend all uses of '-moz-appearance:none' in tests to also specify 'appearance:none' (automated change). r=dholbert
MozReview-Commit-ID: BNOR5VRpV2E
2017-03-23 22:11:22 -07:00
Mats Palmgren
79cff05243 Bug 1333482 part 2 - [css-ui] Change all consumers of StyleDisplay::mAppearance to use the accessor UsedAppearance() instead, and make mAppearance/mMozAppearance private. r=dholbert
MozReview-Commit-ID: 8JwLsY1CLDJ
2017-03-23 22:11:18 -07:00
Carsten "Tomcat" Book
332688962a Merge mozilla-central to mozilla-inbound
--HG--
rename : testing/web-platform/tests/storage/interfaces.html => testing/web-platform/tests/storage/interfaces.https.html
2017-03-23 13:57:16 +01:00
Carsten "Tomcat" Book
492970c342 merge mozilla-inbound to mozilla-central a=merge 2017-03-23 13:44:09 +01:00
Olli Pettay
92bb395acd Bug 1339758, click() and similar can return 0 from various coordinate properties, r=masayuki
--HG--
extra : rebase_source : 71547cc6655c39ffeba89676d315bdb9bacc5ff4
2017-03-23 12:57:44 +02:00
sotaro
b98245c5fc Bug 1349476 - Remove LayersBackend::LAYERS_D3D9 type r=mattwoodrow 2017-03-23 11:00:41 +09:00
Bobby Holley
8c4e31302e Bug 1349815 - Avoid setting the static cache during the servo traversal. r=heycam
MozReview-Commit-ID: E9XC4kaCVd2
2017-03-22 21:20:23 -07:00
Boris Zbarsky
ec233151ac Bug 1348331 part 2. Switch Preferences::RegisterCallback/RegisterCallbackAndCall consumers that want prefix matches to the new RefisterPrefixCallback(AndCall) APIs. r=froydnj,padenot
MozReview-Commit-ID: 2ebVZO4fN6i
2017-03-21 14:59:02 -04:00
Bob Owen
c454d35621 Bug 1152353: Repost printer properties completion messages after nsAppShell::ProcessNextNativeEvent. r=jimm 2017-03-15 15:55:50 +00:00
Sebastian Hengst
c9f5cc6b45 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8nsStTZt40O
2017-03-18 16:24:53 +01:00
Jessica Jong
3c909e1184 Bug 1344642 - Part 1: Cleanup dom.forms.datepicker related code. r=smaug
This patch basically reverts Bug 825294.

--HG--
extra : rebase_source : 58b235bfddb5acd1ec0cf1afd8f34cbb8c4e09c1
2017-03-17 11:01:57 +08:00
Masayuki Nakano
87d8470a52 Bug 1347073 Get rid of UIEvent.isChar since it's not initialized properly on most platforms and the other browsers don't support this r=smaug
UIEvent.isChar is not supported by the other browsers and the value isn't initialized any platforms except on macOS. So, the value isn't useful and we have no reason to keep it.

MozReview-Commit-ID: 4BLpo88gSZj

--HG--
extra : rebase_source : ca950f8cb618a0cadc99ba4c80b5a8df94a20f27
2017-03-14 18:29:39 +09:00
Carsten "Tomcat" Book
3e0a5441c6 Merge mozilla-central to mozilla-inbound 2017-03-17 14:55:15 +01:00
Jim Chen
b00f1b075f Bug 1344892 - Let native calls dispatch to XPCOM event queue; r=snorp
Bug 1344892 - 1. Add option to dispatch to priority queue; r=snorp

For the regular "gecko" option, change to dispatching to the XPCOM event
queue, and add a new "gecko_priority" option that dispatches calls to
the widget event queue. GeckoThread.waitOnGecko is changed to wait on
both the widget queue and the XPCOM queue. nsAppShell::SyncRunEvent is
changed to avoid a possible deadlock condition involving locking
sAppShellLock twice.

Bug 1344892 - 2. Update dispatchTo = "gecko" options; r=snorp

Update some existing dispatchTo = "gecko" options to "gecko_priority",
which typically involve UI events or JNI management calls like
disposeNative. As a rule, disposeNative is dispatched to the queue with
the least priority among the queues that other native members of the
same class dispatch to (i.e. "gecko_priority" if all other native
members dispatch to "gecko_priority", or "gecko" if any native members
dispatch to "gecko").

Bug 1344892 - 3. Update auto-generated bindings; r=me
2017-03-16 23:30:54 -04:00
Carsten "Tomcat" Book
468f7d8e9f merge mozilla-inbound to mozilla-central a=merge 2017-03-16 15:35:50 +01:00
Nicholas Nethercote
e981884dca Bug 1347348 (part 5) - Remove an unnecessary profiler_is_active() calls. r=mstange.
profiler_get_profile() will return nullptr is the profiler is not active, so
there's no need to call profiler_is_active() just beforehand.

--HG--
extra : rebase_source : 9b7d4396599dc10230c5215492c9f63c48a4ff5e
2017-03-07 16:55:00 +11:00
Masayuki Nakano
c038f800f7 Bug 1339331 TextEventDispatcher should replace \r in composition string with \n and TextComposition should allow to input \n with composition events r=m_kato
According to ATOK's behavior, IME may send different line breaker from its platform's standard.  Therefore, we should treat \r as \n too.

Additionally, currently, TextComposition doesn't allow to input \n with composition.  However, this was added for preventing to see odd control characters as boxes with code point.  Therefore, we should allow \n for IMEs. (It was allowed, this limitation is unexpected when I reviewed the patch to reject control characters in TextComposition.)

MozReview-Commit-ID: DzGSMgp89Av

--HG--
extra : rebase_source : 0644e5941a080583af8701546111fbf46ec646ec
2017-03-16 16:26:43 +09:00
Karl Tomlinson
b969855019 bug 1346961 draw opaque scrollbar background on outermost scrollbar element even for GTK versions >= 3.20 r=jhorak+328198
MozReview-Commit-ID: BHsD1h4UQbs

--HG--
extra : rebase_source : 56cb7f915cfe1237375e735ca4e41826ac890c82
2017-03-16 18:02:27 +13:00
Masayuki Nakano
eec9e38f44 Bug 1347433 part.4 Add automated tests to check if \n and \r\n in composition string are treated as expected r=m_kato
Although, TextComposition's bug, those tests are not checked with expected values, we should fix them later.

MozReview-Commit-ID: 89jehNqMnCH

--HG--
extra : rebase_source : 2c622396edef067b92393f1e5e5291db9105417a
2017-03-15 21:32:49 +09:00
Masayuki Nakano
fc3e532636 Bug 1347433 part.3 TextEventDispatcher::PendingComposition::Flush() should replace native line breakers in the composition string before dispatching composition event r=m_kato
So, finally, Flush() should replace native line breakers in the composition string before dispatching composition events.  However, if the composition string was set by Set(), i.e., it's already been replaced with native line breakers, we shouldn't try to do it again due to performance reason.  Therefore, this patch adds |mReplacedNativeLineBreakers| to manage if it's already been called.

MozReview-Commit-ID: 5Y7ULWeP153

--HG--
extra : rebase_source : f825e45a7033c3c651e6324047e75c20f6c69b36
2017-03-15 19:09:30 +09:00
Masayuki Nakano
43c58f6aa5 Bug 1347433 part.2 Implement TextEventDispatcher::PendingComposition::ReplaceNativeLineBreakers() and TextEventDispatcher::PendingComposition::Set() should use it r=m_kato
MozReview-Commit-ID: 5mPiRGwUuej

--HG--
extra : rebase_source : 2d01998be5624188a94abd2dcda8f7ea6016e545
2017-03-15 18:59:34 +09:00
Masayuki Nakano
aa1ef41139 Bug 1347433 part.1 Separate TextRange offset and length adjustment to AdjustRange() r=m_kato
First of all, replacing native line breakers with XP line breakers needs to adjust offset and length of each TextRange.  Therefore, we cannot just duplicate the code into TextEventDispatcher::PendingComposition::Flush().

For creating a new method to replace the native line breakers in PendingComposition::mString, we should separate range adjustment code to a static method, AdjustRange(), because we cannot use for loop simply because we need to adjust both mClauses and mCaret.

MozReview-Commit-ID: 5ycsN8EAs45

--HG--
extra : rebase_source : 0ef667669c9027958a0a955f4b883f70be89cbb3
2017-03-15 18:51:32 +09:00
Masayuki Nakano
bd8834c19e Bug 1346499 Don't remove Ctrl nor Alt modifier state at dispatching eKeyPress event when the modifier doesn't change inputting character r=m_kato
Ctrl+Space causes WM_CHAR of ' '.  On the other native applications, you can input ' ' with this key combination though, we shouldn't allow this because we need to remove Ctrl and Alt modifier state at dispatching keypress event for the limitation of TextEditor but this is important key combination for custom shortcut keys.

So, when Ctrl or Alt key is pressed but it doesn't change the inputting character, i.e., the character can be inputted without Ctrl or Alt, we shouldn't remove those modifier state from eKeyPress event.

MozReview-Commit-ID: 7omLvNdQWzW

--HG--
extra : rebase_source : 66d5015567799c489d925ac2419358913f808d63
2017-03-14 00:32:50 +09:00
Kartikaya Gupta
0525357947 Bug 1343977 - Ensure that synthetic mouseclicks generated from touch gestures don't reopen rollups. r=botond,enndeakin+6102
Synthetic mouseevents generated from touch gestures are dispatched asynchronously
from the touch events. This means that the nsAutoRollup that the widget puts on
the stack during the dispatching of the touch events is no longer in scope when
we get around to firing the mouse events. As a result, the mouse events can end
up reopening rollups that got closed by the touch events and that shouldn't be
reopened. We fix this by stashing the rollup that was in scope while the touch
events were being dispatched, and make sure we keep that in scope for the
synthetic mouse events.

MozReview-Commit-ID: HjteKHfAqvD

--HG--
extra : rebase_source : 46217b1ba610ef193963ccab454a6f584af61a2b
2017-03-13 10:44:59 -04:00
Kartikaya Gupta
44f27a56e4 Bug 1343977 - Extract nsAutoRollup into a more self-contained class and clean it up some. No functional changes intended. r=enndeakin+6102
This just decouples nsAutoRollup from the widget class, which it isn't really
bound to anyway because the internal data is static. We'll need to be able to
use nsAutoRollup independently in the next patch.

MozReview-Commit-ID: 1dxSLTr4g1K

--HG--
extra : rebase_source : 6f6964ca046b6f88e5c99c944a08b1c563f17837
2017-03-13 10:44:56 -04:00
David Major
fa1854f65a Bug 1344629 - Part 7.5: Add constructors for jni::StringParam that accept literal strings. r=dbaron
MozReview-Commit-ID: 8vSf7TGwPmD

--HG--
extra : rebase_source : d212421502542b0efa22e3b22ce94a69f781e012
2017-03-14 15:26:36 +13:00
David Major
dc67bfc9a3 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Iris Hsiao
5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
David Major
04420e097d Bug 1344629 - Part 7.5: Add constructors for jni::StringParam that accept literal strings. r=dbaron
MozReview-Commit-ID: 8vSf7TGwPmD

--HG--
extra : rebase_source : d212421502542b0efa22e3b22ce94a69f781e012
2017-03-14 15:26:36 +13:00
David Major
40f4821701 Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*,
e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get());
or
NS_NAMED_LITERAL_STRING(foo, "abc");
CallAFunctionThatTakesACharPointer(foo.get());

This patch rewrites the callsites that can be trivially changed to use char*/char16_t*.

I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep.

MozReview-Commit-ID: Kh1rUziVllo

--HG--
extra : rebase_source : c21a65694d6e1c42fd88f73632f7ac8f38d005ae
2017-03-14 15:26:27 +13:00
Carsten "Tomcat" Book
c1edc7067d merge mozilla-inbound to mozilla-central a=merge 2017-03-13 15:22:26 +01:00
Masayuki Nakano
fee81e4718 Bug 1338369 part.2 nsWindow for GTK should consume Shift key state of eContextMenu event if it's caused by Shift+F10 r=karlt,smaug
Shift+F10 is also well-known shortcut key on Linux.  So, it should behave same as pressing ContextMenu key.  So, for allowing web page to prevent its default, nsWindow for GTK needs to consume Shift key state at dispatching eContextMenu key.

Additionally, we should allow to open context menu with Shift+ContextMenu because only ContextMenu key press can be prevented its default by web page.  Therefore, we should allow users to open context menu even with keyboard even if web content doesn't want it.

Note that Ctrl+Shift+F10 or Alt+Shift+F10 should behave same as Shift+ContextMenu key, but we should discuss later.

MozReview-Commit-ID: 1mPGKMTsrkv

--HG--
extra : rebase_source : 75dd8333b24f5e2f4ded4414b5e5ee85de253cc7
2017-03-09 18:53:24 +09:00
Masayuki Nakano
9021b5582c Bug 1338369 part.1 nsWindow for Windows should consume Shift key state at dispatching eContextMenu event if it's caused by Shift+F10 r=smaug
In PresShell, eContextMenu event is marked as dispatched only in chrome when its shiftKey state is true. However, Shift+F10 causes the context menu, it should not be marked as so because this is standard shortcut key to open context menu on Windows.

This patch consumes Shift key state if previous key message is WM_SYSKEYDOWN of F10 before dispatching eContextMenu event.  So, user cannot block to prevent its default at opening context menu with Shift+F10, we should discuss this later.

MozReview-Commit-ID: 1P9LpeJoQof

--HG--
extra : rebase_source : f77fcf6a4587bc131901d717325f6083b4a89393
2017-02-24 20:07:52 +09:00
Stone Shih
eb9ee92c2d Bug 1323158 - Part 1: Fire pointer and mouse boundary events when capturing the pointer. r=smaug
--HG--
extra : rebase_source : 2895681bb5d0e4872dc37f9d67dc4e2928bdce33
extra : histedit_source : e08adaaf7299e9667eb1f3887ef518c5edf5dc59
2017-01-18 15:25:44 +08:00
Stone Shih
229b4ba331 Bug 606885 - Fire drag events with keyboard modifiers. r=enn
--HG--
extra : rebase_source : c6e4ac37ea2397d86368cb59b0a68aa3a9f43d79
2017-02-17 11:29:42 +08:00
Sebastian Hengst
772d7c9a4f Backed out changeset ffeffef36f34 (bug 1344892) on request of developer for issues with Android reftests. r=backout on a CLOSED TREE 2017-03-10 21:53:00 +01:00
Jim Chen
d2521e4b81 Bug 1344752 - Guard against blurring when replacing text; r=esawin
Inside OnImeReplaceText, an action can cause the editor to blur and
mDispatcher to be reset. We should guard against that and abandon
subsequent actions.
2017-03-10 14:10:15 -05:00
Jim Chen
c96d20e3f4 Bug 1344892 - Let native calls dispatch to XPCOM event queue; r=snorp
Bug 1344892 - 1. Add option to dispatch to priority queue; r=snorp

For the regular "gecko" option, change to dispatching to the XPCOM event
queue, and add a new "gecko_priority" option that dispatches calls to
the widget event queue.

Bug 1344892 - 2. Update dispatchTo = "gecko" options; r=snorp

Update some existing dispatchTo = "gecko" options to "gecko_priority",
which typically involve UI events or JNI management calls like
disposeNative.

Bug 1344892 - 3. Update auto-generated bindings; r=me
2017-03-10 14:10:15 -05:00
Kartikaya Gupta
d35e7aadf8 Back out cset f2262b093262 (bug 1345355) for failing to fix the problem it was trying to fix. r=backout 2017-03-10 09:45:15 -05:00
Kartikaya Gupta
627918d27b Bug 1345355 - Don't register a window as touch-enabled if there's no touch device supported. r=jimm
MozReview-Commit-ID: IycX3e0I5TQ

--HG--
extra : rebase_source : 78a80e5de83fcdc88b1075f19552fa265cafca74
2017-03-09 18:59:32 -05:00
Carsten "Tomcat" Book
6d06361383 merge mozilla-inbound to mozilal-central a=merge 2017-03-09 11:23:25 +01:00
Andy Kluger
be28304603 Use GTK cursors for zoom-in or zoom-out css cursors (bug 1328724) r=karlt
get_gtk_cursor attempts to use themed cursor icons for most css cursor types,
but left these two out. Now it will try to use the theme for these as well,
and fall back to the generic FF set used previously.

MozReview-Commit-ID: 9QHV0mc5AxK

--HG--
extra : rebase_source : c03d01f6dc3a30a8f16def9f95cee14d18f7a8a1
2017-03-08 01:28:47 -05:00
Andrea Marchesini
12b54aa0f5 Bug 1299500 - Get rid of DeviceStorage API - part 10 - DeviceStorage, r=ehsan, r=billm 2017-03-08 20:15:45 +01:00
Carsten "Tomcat" Book
2ec7c626f1 Merge mozilla-central to mozilla-inbound 2017-03-08 17:01:16 +01:00
Carsten "Tomcat" Book
78ac0ceba9 merge mozilla-inbound to mozilla-central a=merge 2017-03-08 16:59:42 +01:00
Andreas Farre
85536fcfc4 Bug 1337392 - Update test cases to match new cursor behavior. r=smaug
MozReview-Commit-ID: 4BdZyeqTBAx
2017-03-08 16:41:42 +01:00
Jim Chen
53a1107cd1 Bug 1343075 - Use GeckoEditableSupport from PuppetWidget; r=masayuki r=rbarker r=snorp r=esawin
Bug 1343075 - 1a. Add TextEventDispatcherListener::GetIMEUpdatePreference; r=masayuki

Add a GetIMEUpdatePreference method to TextEventDispatcherListener to
optionally control which IME notifications are received by NotifyIME.
This patch also makes nsBaseWidget forward its GetIMEUpdatePreference
call to the widget's native TextEventDispatcherListener.

Bug 1343075 - 1b. Implement GetIMEUpdatePreference for all TextEventDispatcherListener; r=masayuki

This patch implements GetIMEUpdatePreference for all
TextEventDispatcherListener implementations, by moving previous
implementations of nsIWidget::GetIMEUpdatePreference.

Bug 1343075 - 2. Allow setting a PuppetWidget's native TextEventDispatcherListener; r=masayuki

In PuppetWidget, add getter and setter for the widget's native
TextEventDispatcherListener. This allows overriding of PuppetWidget's
default IME handling. For example, on Android, the PuppetWidget's native
TextEventDispatcherListener will communicate directly with Java IME code
in the main process.

Bug 1343075 - 3. Add AIDL interface for main process; r=rbarker

Add AIDL definition and implementation for an interface for the main
process that child processes can access.

Bug 1343075 - 4. Set Gecko thread JNIEnv for child process; r=snorp

Add a JNIEnv* parameter to XRE_SetAndroidChildFds, which is used to set
the Gecko thread JNIEnv for child processes. XRE_SetAndroidChildFds is
the only Android-specific entry point for child processes, so I think
it's the most logical place to initialize JNI.

Bug 1343075 - 5. Support multiple remote GeckoEditableChild; r=esawin

Support remote GeckoEditableChild instances that are created in the
content processes and connect to the parent process GeckoEditableParent
through binders.

Support having multiple GeckoEditableChild instances in GeckoEditable by
keeping track of which child is currently focused, and only allow
calls to/from the focused child by using access tokens.

Bug 1343075 - 6. Add method to get GeckoEditableParent instance; r=esawin

Add IProcessManager.getEditableParent, which a content process can call
to get the GeckoEditableParent instance that corresponds to a given
content process tab, from the main process.

Bug 1343075 - 7. Support GeckoEditableSupport in content processes; r=esawin

Support creating and running GeckoEditableSupport attached to a
PuppetWidget in content processes.

Because we don't know PuppetWidget's lifetime as well as nsWindow's,
when attached to PuppetWidget, we need to attach/detach our native
object on focus/blur, respectively.

Bug 1343075 - 8. Connect GeckoEditableSupport on PuppetWidget creation; r=esawin

Listen to the "tab-child-created" notification and attach our content
process GeckoEditableSupport to the new PuppetWidget.

Bug 1343075 - 9. Update auto-generated bindings; r=me
2017-03-07 22:34:39 -05:00
Phil Ringnalda
394951281e Backed out 2 changesets (bug 1343613) for Android crashes in nsWindow::GeckoViewSupport::EnableEventDispatcher]
Backed out changeset f9632a8f4b14 (bug 1343613)
Backed out changeset 4aa287ae1cec (bug 1343613)
2017-03-07 18:56:35 -08:00
Eugen Sawin
5728cb6576 Bug 1343613 - [2.3] Add GeckoView event queuing in EventDispatcher. r=jchen,snorp 2017-03-08 00:19:42 +01:00