Commit Graph

20308 Commits

Author SHA1 Message Date
Martin Stransky
c6f6b7735f Bug 1215104 - Update nsWindow for non-X11 backend. r=karlt 2016-06-22 02:10:00 -04:00
Eugen Sawin
6fe4de35ae Bug 1278574 - [2.2] Instantiate MediaPrefs on Android during AndroidBridge construction. r=jya 2016-06-23 15:26:11 +02:00
Carsten "Tomcat" Book
fdb5ee5d63 Backed out changeset 34aa8f1f134f (bug 1268638) for assertion failures in Assertion failure: !mLockedForGL, at SharedSurfaceD3D11Interop.cpp:302
--HG--
extra : rebase_source : 12cc2c6e812d19438112acf568a034fb36249c67
2016-06-23 09:47:57 +02:00
Carsten "Tomcat" Book
60a9e9ce21 Backed out changeset 4171ff387666 (bug 1268638)
--HG--
extra : rebase_source : c57ffe49af64d35f69a5b186b2edef66b3223319
2016-06-23 09:47:20 +02:00
Masayuki Nakano
adabe1afd9 Bug 1281387 KeyboardLayout.cpp should use LazyLogModule instead of PR_NewLogModule() for making aware of MOZ_LOG* r=m_kato
MozReview-Commit-ID: LADKYU7uPcq

--HG--
extra : rebase_source : 5863bfa4fa3983740465d2ea745ca6b8a485b7e3
2016-06-22 15:39:58 +09:00
Masayuki Nakano
dead605781 Bug 1281391 IMContextWrapper and nsGtkKeyUtils should use LazyLogModule instead of PR_NewLogModule() for making MOZ_LOG* aware r=m_kato
MozReview-Commit-ID: 5xqIfFmakvq

--HG--
extra : rebase_source : 825b0b667d5200ba8d8c07ddbb3ea98f499ebd79
2016-06-22 16:31:37 +09:00
Jeff Gilbert
619c297be6 Bug 1268638 - Bitrot.
MozReview-Commit-ID: QJjb2PW5C4
2016-06-22 17:47:41 -07:00
Jeff Gilbert
d392c3d6b4 Bug 1268638 - Add good driver versions to blocklist for webgl+native-gl. - r=jrmuizel
MozReview-Commit-ID: IAalsSiuTiL
2016-06-22 17:47:41 -07:00
Alexandre Lissy
facb2f088c Bug 1281499 - Add missing include and namespace for MakeUnique<> r=mstange
MozReview-Commit-ID: DpBZrnx47g8

--HG--
extra : rebase_source : d0acf2ae074020fc8b1ffc1d51f80058b7f92c99
2016-06-22 17:38:40 +02:00
Carsten "Tomcat" Book
c2b7d7ae22 Merge mozilla-central to mozilla-inbound 2016-06-22 13:46:46 +02:00
Carsten "Tomcat" Book
3c9bce3256 merge mozilla-inbound to mozilla-central a=merge 2016-06-22 13:44:52 +02:00
Masayuki Nakano
f53ea998ce Bug 1280053 TextInputHandler should initialize WidgetKeyboardEvent without already handled characters r=m_kato
TextInputHandler may dispatch keypress events after InsertText() is called if there was composition and it's committed by "current" keydown event. In that case, [NSEvent characters] may have the committing string.  For example, when Opt+e of US keyboard layout started composition, Cmd+v causes committing the "`" character and pasting the clipboard text. Then, the "v" key's keydown event's |characters| is "`v". So, after InsertText() is called with "`", TextInputHandler shouldn't dispatch keypress event for "`" again. I.e., the KeyboardEvent.key value should be "v" rather than "`v".

For solving this issue, TextInputHandlerBase::AutoInsertStringClearer which is created at every InsertText() call should store the inserted string to TextInputHandlerBase::KeyEventState. However, for making the implemntation simpler, it should recode only when the inserting string is actually a part of [mKeyEvent characters]. Then, TextInputHandlerBase::KeyEventState can compute unhandled insert string at initializing WidgetKeyboardEvent.

So, finally, TextInputHandlerBase::InitKeyEvent() should be called via TextInputHandlerBase::KeyEventState::InitKeyEvent(). This ensures that all key events which may cause InsertText() calls are always initialized with unhandled string.

MozReview-Commit-ID: A9o8o9pV2XV

--HG--
extra : rebase_source : d99e9ab7633f45069d0a3940cc2b2b5ad859ea05
2016-06-19 01:13:16 +09:00
Wes Kocher
78efbc26a7 Merge m-c to fx-team, a=merge CLOSED TREE 2016-06-21 10:12:35 -07:00
Wes Kocher
4207c30811 Merge fx-team to central, a=merge CLOSED TREE 2016-06-21 10:10:21 -07:00
Carsten "Tomcat" Book
dd716c9d5f Merge mozilla-central to fx-team 2016-06-21 12:15:15 +02:00
Oliver Henshaw
e76445cfb6 Bug 694570 - (3/4) - Stop using libgnome and libgnomeui on Linux. r=acomminos
(Based on original patch by Chris Coulson.)

Replace session management through libgnome with direct use of libSM and
libICE. This allows xsmp session restore on gtk2 and gtk3 builds.

Changes in behaviour:
- It now only sends the "session-save" notification when the save style
is SmSaveLocal or SmSaveBoth. Saving internal state with a save style of
SmSaveGlobal is actually incorrect. This means that Firefox now
distinguishes between a normal session exit and a session exit with
session saving enabled.
- As "quit-application-requested" might pop up a dialog, it only does
  this if the interact style is not SmInteractStyleNone
- "quit-application-requested" is only sent after sending
  SmcInteractRequest and receiving an interact message.
- It defers closing the connection to the session manager until
  the destructor, i.e after the "web-workers-shutdown" async shutdown
  phase completes. This means that firefox shouldn't be killed too early
  and lose data (*).

* It still might be killed prematurely if it takes too long to quit and
  the session manager decides to timeout, but that's another story.
2016-06-20 08:13:00 +02:00
Masayuki Nakano
f8210c2a4e Bug 1275918 part.2 Update TextComposition::mCompositionStartOffset when it's modified in the remote process r=m_kato
MozReview-Commit-ID: H1SJTWWav6G

--HG--
extra : rebase_source : 6d7d79e7d4d719b720bed4f4c20196079fb8b5fb
2016-06-14 21:06:34 +09:00
Masayuki Nakano
50a7dd324b Bug 1275918 part.1 ContentCache should retrieve the latest composition start offset from TextComposition and send it to the parent process r=m_kato
MozReview-Commit-ID: EoMZtqoMue3

--HG--
extra : rebase_source : c4a60248e765cddeccd1be3607f80358a99dda34
2016-06-13 18:17:58 +09:00
Masayuki Nakano
de8073afbb Bug 1275914 part.8 TextComposition should always update its composition start offset during composing r=smaug
TextComposition should update its composition start offset after every DOM event dispatch with first clause's selection type if there is composition string.

MozReview-Commit-ID: HFkePci1PhU

--HG--
extra : rebase_source : c7af075115505b52e48d8bbd5f2dd1d9001fe36e
2016-06-20 16:34:40 +09:00
Masayuki Nakano
d5bf222ecd Bug 1275914 part.7 Add automated tests to query IME selections r=smaug
MozReview-Commit-ID: GwBU6Evcpfa

--HG--
extra : rebase_source : d6a54b3ab227fbae75e723b277f0ff1e95d44044
2016-06-20 16:31:29 +09:00
Masayuki Nakano
4e5c167f73 Bug 1275914 part.5 Support special selections at handling eQuerySelectedText r=smaug
TextComposition needs to query first IME selection.  Therefore, we need to add support to query special selection range with eQuerySelectedText.

First, WidgetQueryContentEvent::mInput should have mSelectionType which should be initialized with InitForQuerySelectedText() but unfortunately, there is no method for eQuerySelectedText.  Therefore, this patch initializes WidgetQueryContentEvent::mInit::mSelectionType with SelectionType::eNormal in its constructor.

Next, ContentEventHandler needs to support to handle eQuerySelectedText with special selection types.  However, we need to create 2 paths in some cases, one is for normal selection and the other is for special selections because there are no selection ranges may be usual case for special selections but not so for normal selection.  Therefore, ContentEventHandler::InitCommon() becomes a little bit more complicated.  ContentEventHandler::mSelection and ContentEventHandler::mFirstSelectedRange is initialized with the specified selection type but normal selection type is also necessary to compute the selection root since the selection root is computed from the first selected range which may not be anywhere if its selection type is not normal.

Finally, ContentEventHandler::OnQuerySelectedText() returns "there are no selections" as succeeded case in special selection type cases.

MozReview-Commit-ID: 9WzUx8b5piw

--HG--
extra : rebase_source : fb07b40748b594d36315f1fc21c0a02ff9f668bb
2016-06-21 13:13:11 +09:00
Nathan Froyd
fff70b0253 Bug 1280964 - fix gtk+2 build problems in widget/gtk/; r=karlt 2016-06-21 02:28:34 -04:00
Karl Tomlinson
4cd71ef94b bug 1280951 copy tooltip style context and cache that instead of widget r=stransky+263117
MozReview-Commit-ID: 6thXro9uYHn

--HG--
extra : rebase_source : 9b43f563bb433753e18d0f98d1541fcdae828ba3
2016-06-22 16:46:24 +12:00
Masayuki Nakano
e195616e12 Bug 1280182 ContentCache should return non-empty rect as far as possible if query content event is relative to insertion point r=m_kato
ContentCache may store composition string's rects which are inserted by one or more older composition event.  Even in such case, native IME, especially TIP of TSF, expects non-empty rects.

Therefore, if native IME handler uses "insertion point relative query", ContentCache should return non-empty rect as far as possible.  For example, even if query offset or range is not in its rect array of composition string, ContentCache should adjust the offset into the stored range.

MozReview-Commit-ID: 7hcIqxOWFk2

--HG--
extra : rebase_source : 8b1572e01cc56e5596ffba4eac0f7d5818b85a89
2016-06-22 14:16:59 +09:00
Nathan Froyd
9158ecd1de Bug 1278314 - avoid invalid copying of objects in PrefsHelper.h; r=darchons
In an expression such as:

  const auto& x = cond() ? AClass(...) : AClass();

the C++ standard specifies that the copy constructor of AClass is
invoked on the result of the conditional expression ([expr.cond]p6).
GCC does not honor this part of the specification, whereas clang does;
clang therefore complains about instances of code such as:

   const auto& jstrVal = type == widget::PrefsHelper::PREF_STRING ?
       jni::StringParam(strVal, aPrefName.Env()) :
       jni::StringParam(nullptr);

as jni::StringParam is not copy-constructable.

The simplest solution that does not introduce unnecessary allocation
uses mozilla::Maybe to hold the temporary objects and to hide some of
the details of constructing objects in-place.  The compiler may even be
able to optimize away some of the unnnecessary checks that Maybe
introduces (e.g. checking for whether the Maybe is a Some or None at
certain points).
2016-06-20 18:37:13 -04:00
Daniel Holbert
caa9d85a69 Bug 1279608: Move nsBaseWidget.cpp's PRTimeToSeconds and kAccessibilityLastRunDatePref definitions inside the same #ifdef guard where their usages are. r=jimm
MozReview-Commit-ID: 5RAdy4RCDOQ

--HG--
extra : rebase_source : 3480879aecfa6b023005912329a6748f9a39f58e
2016-06-10 13:04:31 -07:00
Nicolas Silva
6e53af5d81 Bug 1264365 - Disable hardware acceleration for small popup widgets. r=dvander 2016-04-21 12:20:31 +02:00
Dylan Roeh
35f22f7ca8 Bug 1280594 - Pause the compositor directly instead of bouncing off the Gecko thread. r=snorp 2016-06-17 16:03:57 +01:00
Masayuki Nakano
0137cf7bf6 Bug 1280513 part.2 WinMouseScrollHandler should use LazyLogModule instead of PR_NewLogModule() r=m_kato
For making WinMouseScrollHandler MOZ_LOG* environment variables aware, WinMouseScrollHandler should use LazyLogModule.

MozReview-Commit-ID: ERurkwVX2Fb

--HG--
extra : rebase_source : 4dd1b257b075eb32328f628edac3cbcc1cbf6210
2016-06-17 03:10:06 +09:00
Masayuki Nakano
a369ad3acf Bug 1280513 part.1 Rename LogKeyStateImpl() to MouseScrollHandler::MaybeLogKeyState() r=m_kato
MozReview-Commit-ID: DGDrRO3Y9jD

--HG--
extra : rebase_source : d1b8253ab276a115b8b3a17c9646b05427bcc4dc
2016-06-17 03:03:44 +09:00
Jonathan Watt
b92e6743a4 Backed out changeset 1bd6da31483d (bug 1279654) 2016-06-16 17:28:50 +01:00
Thomas Zimmermann
97a43c0b93 Bug 1276927: Define HAVE_ANDROID_OS before including 'android_filesystem_config.h', r=fabrice
The preprocessor token HAVE_ANDROID_OS configures 'android_filesystem_config.h'
to include the correct header files from the environment.

MozReview-Commit-ID: oKwdjzDjij
2016-06-16 08:43:51 +01:00
Thomas Zimmermann
32d428f04a Bug 1276927: Fix B2G widget code to build with Android NDK, r=fabrice
MozReview-Commit-ID: Acewzo0hNEE
2016-06-16 08:43:50 +01:00
Masayuki Nakano
46e33a611c Bug 1279170 TextInputHandler::InsertText() should set keypress event's .key value property when it replaces specified range with a character r=m_kato
TextEventDispatcher::MaybeDispatchKeypressEvents() dispatches keypress events with passed event's mKeyNameIndex and mKeyValue values. I.e., setting mCharCode doesn't make sense in this case. Similarly, mKeyCode value is also ignored (overwritten by 0) if it's printable key's key event (mKeyNameIndex == KEY_NAME_INDEX_USE_STRING).

MozReview-Commit-ID: bdBQOlVKTs

--HG--
extra : rebase_source : 0786fb72ce8cc5468bbf3d4d1e5cadaa4586837e
2016-06-16 12:11:01 +09:00
Cervantes Yu
28706c5d87 Bug 1275398 - Use shmem for sending image data in IPCDataTransfer. r=nical
MozReview-Commit-ID: 9XETnSBXxEW
2016-06-16 00:57:46 +08:00
Cervantes Yu
3115f628a1 Bug 1272018 - Use shared memory to transfer drag image data. r=nical
MozReview-Commit-ID: K5r9LBQ1FO0
2016-06-15 13:49:13 +01:00
SUN Haitao
9b7b1f5140 Bug 1264815 - Add a 'showPersistentAlertNotification' method to GeckoAppShell. r=kcambridge 2016-04-17 21:18:20 +08:00
SUN Haitao
372169ecdf Bug 1264815 - Add a 'showPersistentNotification' method to nsIAlertService. r=kcambridge 2016-05-12 23:58:18 +08:00
Masayuki Nakano
9b89c75f4d Bug 1280355 part.2 TextInputHandler should use LazyLogModule instead of PR_NewLogModule() r=m_kato
For making TextInputHandler MOZ_LOG* environment variables aware, TextInputHandler should use LazyLogModule.

MozReview-Commit-ID: 9La229BFaJ1

--HG--
extra : rebase_source : f18f689ea6522f3300c5411bcd9e49d4c31143e4
2016-06-16 17:14:34 +09:00
Masayuki Nakano
a39783f70c Bug 1280355 part.1 TISInputSourceWrapper::CurrentInputSource() should create the static instance when it's called r=m_kato
This is preparation. TISInputSourceWrapper is created before starting XPCOM, however, when its first instance is created, TextInputHandler.mm tries to log all keyboard layouts and IMEs which are installed into the system. This would be problem if it uses LazyLogModule because it's initialized at starting XPCOM.

MozReview-Commit-ID: DWz8TylL175

--HG--
extra : rebase_source : f377530f6325d6fcf8f90be5d6856972e9d312e5
2016-06-16 17:00:38 +09:00
Masayuki Nakano
d829b3effe Bug 1275528 part.5 TSFTextStore should use insertion point relative query for getting character rect and caret rect only while there is a composition r=m_kato
TSFTextStore should use insertion point relative query for getting character rect and caret rect while there is a composition because in such case, TSF must want to query a part of or around the composition.  Therefore, it makes sense to use insertion point relative query since it adjusts the offset with the latest content information.

MozReview-Commit-ID: IVjZ4zqFUkr

--HG--
extra : rebase_source : e535ffa2c7649f16ffe7f761a9ed01b061848aa7
2016-06-15 17:10:38 +09:00
Masayuki Nakano
b04303d171 Bug 1275528 part.4 IMMHandler should use insertion point relative query for getting character rect and caret rect r=m_kato
IMM always queries character rect or caret rect relative to insertion point.  Therefore, it makes sense to use the new feature, insertion point relative query content events for them.  Then, IMMHandler doesn't need to care mismatch between its cache and actual content information.

MozReview-Commit-ID: LCCrJkR77I8

--HG--
extra : rebase_source : c75f1b29e34e13df397de351909f07e2a95b6c5f
2016-06-15 13:52:03 +09:00
Masayuki Nakano
02e3dc2d1b Bug 1275528 part.3 Support selection relative WidgetQueryContentEvent in e10s mode r=m_kato
In e10s mode and during focus is in a remote process, ContentCache handles WidgetQueryContentEvent instead of ContentEventHandler.  Therefore, for supporting selection relative WidgetQueryContentEvent in e10s mode, we need to support it in ContentCache too.

MozReview-Commit-ID: L5d5ilmpetG

--HG--
extra : rebase_source : 46d646677ac0a5803398d18efbfd667bc3bf0c17
2016-06-14 20:54:54 +09:00
Masayuki Nakano
60bb642e47 Bug 1275528 part.1 Support a way to query content relative to insertion point r=smaug
Native IME handler may want to query content relative to start of selection (or composition if there is it). Additionally, in e10s mode, insertion point in actual content may be different from the cache in parent.  Therefore, in some cases, it does make sense to query content with offset relative to start of selection or composition.

This patch implements it simply and only in non-e10s mode.

Additionally, this fixes a bug of nsQueryContentEventResult::GetOffset() which hasn't been accepted its calls even if the event message is valid (eQueryTextContent, eQueryTextRect and eQueryCaretRect).

MozReview-Commit-ID: 34I7vyTUAgO

--HG--
extra : rebase_source : d79ba0dc3e002f7691495ee1ff8bdb3854d8f6fe
2016-06-16 14:10:49 +09:00
Wes Kocher
8e4ef7176d Backed out 8 changesets (bug 1268638) for build bustage CLOSED TREE
Backed out changeset 1a2db6efc575 (bug 1268638)
Backed out changeset ad38e0439b62 (bug 1268638)
Backed out changeset 0078605c6974 (bug 1268638)
Backed out changeset 8ed7ed6c57db (bug 1268638)
Backed out changeset 69116551e4b9 (bug 1268638)
Backed out changeset 002f87a61edf (bug 1268638)
Backed out changeset 8b0db9b0f87c (bug 1268638)
Backed out changeset 5d1285d0c221 (bug 1268638)
2016-06-21 14:53:22 -07:00
Jeff Gilbert
a5edaa87c8 Bug 1268638 - Add good driver versions to blocklist for webgl+native-gl. - r=jrmuizel
MozReview-Commit-ID: IAalsSiuTiL
2016-06-21 14:10:32 -07:00
Jeff Gilbert
41c6dce417 Bug 1279657 - Fix missed callsites. - r=jrmuizel
MozReview-Commit-ID: 8RY2D5OTnZ5
2016-06-21 14:04:00 -07:00
Wes Kocher
a3cd1a678b Merge m-c to inbound, a=merge CLOSED TREE 2016-06-21 10:12:01 -07:00
Jordan
f35a9b375c Bug 825294 - Add framework for datepicker widgets to input[type=date]. r=smaug
-Add framework for datepicker widgets
-Split date input preference from dom.experimental_forms to dom.forms.date
2016-06-20 15:55:00 +02:00
Nicolas Silva
6d2e7705e4 Bug 1272332 - Allow gtk the global dark theme behind a pref. r=karlt 2016-06-21 14:51:03 +02:00