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

766 Коммитов

Автор SHA1 Сообщение Дата
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Eric Rahm 0938982c90 Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj
--HG--
extra : rebase_source : 063c7f95dda063eafabfa1921366bd1957b8fe73
2017-08-11 17:45:18 -07:00
Nicholas Nethercote a83fefd956 Bug 1390036 (part 1) - Remove most remaining uses of nsXPIDLString. r=erahm.
CompareCacheHashEntry::mCrit[] is the only case where the nsXPIDLString-ness
was important. The patch adds an explicit SetIsVoid() call to that class's
constructor and changes some null checks to IsVoid() checks.

--HG--
extra : rebase_source : e68befcde4dd098bac2a550bc666eaf3bf1298d7
2017-08-11 18:31:22 +10:00
Yoshi Huang 60b7d9f697 Bug 1390398: fix failures on windows for new data: URI inheritance model. r=smaug 2017-08-15 18:09:28 +08:00
Stone Shih 55c5359fa6 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Stone Shih 665fb7cd54 Backed out changeset de4929e39b7e (bug 1351148) 2017-08-11 15:19:30 +08:00
Stone Shih b27577d8d6 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Carsten "Tomcat" Book 0f16d437cc merge mozilla-inbound to mozilla-central a=merge 2017-08-08 13:18:14 +02:00
Christoph Kerschbaumer 28e9ff9691 Bug 1388028 - Update tests within widget/tests to comply with new data: URI inheritance model. r=smaug 2017-08-07 20:13:12 +02:00
Masatoshi Kimura e1f76e8883 Bug 1387802 - Remove [deprecated] methods from nsITaskbarPreviewController. r=jimm
MozReview-Commit-ID: 25cdKHqVLSh

--HG--
extra : rebase_source : f2dc739ad0f132cb1cc764cfa3ec11e83cbfa0c3
2017-08-06 13:35:02 +09:00
Nicholas Nethercote 73558eac3d Bug 1384834 (part 2) - Remove remaining uses of nsAdoptingCString. r=erahm.
--HG--
extra : rebase_source : 70a385a0a06bc88e728d51459e7460a68f15f7fb
2017-07-28 11:21:47 +10:00
Nicholas Nethercote d18fdecf67 Bug 1384834 (part 1) - Remove remaining uses of nsAdoptingString. r=erahm.
--HG--
extra : rebase_source : c81ee11b9d08198a000979760a8e29a01e9498d0
2017-07-28 11:21:45 +10:00
Carsten "Tomcat" Book 2ff6df9177 Backed out changeset 5198322f7a62 (bug 1351148) 2017-07-28 09:20:20 +02:00
Stone Shih a5bccae405 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Jim Chen 8b6bd21a0b Bug 1351170 - 2. Notify selection listeners after adjusting range offsets; r=smaug
`nsRange` registers mutation observers to adjust the range when content
changes. However, there are some cases where we adjust the start and/or
end offsets but don't notify selection listeners (i.e. we don't call
`nsRange::DoSetRange` to set the new range points, contrary to what the
comment above `nsRange::DoSetRange` says). This patch makes us call
`nsRange::DoSetRange` in those cases. The patch adds a testcase in
test_selectevents.html, and changes a few unexpected-pass cases in
test_composition_text_querycontent.xul that this patch fixed.

MozReview-Commit-ID: 73D8RYMS3MS

--HG--
extra : rebase_source : da0cc3073e4b8ad23c6f6eab42da5aa8b269cae9
2017-07-19 14:29:59 -04:00
Jim Chen 41148177ef Bug 1351170 - 1. Correctly calculate start offset for non-text nodes; r=masayuki
When the start node is a non-container node (i.e. <br>), and the start
offset is 0, we should not include a newline character for the node. For
example, for this range,

> <br/>hello
>  \___/

the start node/offset is (<br/>, 0) and end node/offset is ("hello", 1).
The calculated range offset should be 0, and the range length should be
2: 1 for the <br/> newline character plus 1 for "h".

The patch also ensures this behavior for pre-mode nsContentIterator, for
both start and end node adjustments. For start nodes, we include any
non-container nodes with offset 0 in the range. For end node, we exclude
any non-container nodes with offset 0 from the range.

MozReview-Commit-ID: Lt2tCLbapq7

--HG--
extra : rebase_source : 7d86b6cf04581f1cd71fa85f8c8586541b3a84e9
2017-07-19 14:29:59 -04:00
Christoph Kerschbaumer 148ee91dd2 Bug 1380641 - Convert test_input_events_on_deactive_window.xul to comply with new data: URI inheritance model. r=smaug 2017-07-14 12:17:13 +02:00
Masayuki Nakano 179e1ee17e Bug 1375825 - part1: Create test for querying text rect in a non-editable element in a contenteditable element r=smaug
This patch adds some automated tests for reproducing bug 1375825 and makes nsQuetyContentEventResult::GetText() work with eQueryTextRect event because ContentEventHandler sets it to the text which was used for computing the rect.

MozReview-Commit-ID: Gk8IV2Vln6V

--HG--
extra : rebase_source : 2d7127c09713358cf9a69fbbc180c325981794b2
2017-06-23 22:36:05 +09:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Greg Mierzwinski add4e2d809 Bug 1374057 - Catch more preceding position-change notifications and prevent post-test position change notifications. r=jmaher
This patch fixes failures for widget/tests/test_composition_text_querycontent.xul when it is run on ubuntu 16.04. It adds some missing handling for pre-test position change notifications and also adds some handling for after-test position change notifications.

MozReview-Commit-ID: 1t8NuxJqkOo

--HG--
extra : rebase_source : ddae0da39a087c5742e31fbae9d7930b95695f1e
2017-06-18 10:03:04 -04:00
Wei-Cheng Pan fafefc69a1 Bug 1354143 - Commit jump list on lazy idle thread. r=florian,jimm
Since committing will do IO on the main thread, it would be better to do it on
an idle thread instead. We have to change JavaScript code too because now the
API is asynchrous.

This patch also updates its xpcshell test.

Now mozilla::widget::AsyncDeleteAllFaviconsFromDisk will get profile directory
on the main thread to prevent it happens on off-main-threads, thus prevents
off-main-thread assertion.

MozReview-Commit-ID: CWcR0B2BC3n

--HG--
extra : rebase_source : 3685a07f9f4476bc94bdf92937734b78fb3fe309
2017-05-24 16:38:57 +08:00
Masayuki Nakano 696e4cb85a Bug 1250823 part 2 - IMEContentObserver should cache adding ranges as a range during document change r=smaug
Between nsIDocumentObserver::BeginUpdate() and nsIDocumentObserver::EndUpdate(), IMEContentObserver can cache added nodes as a range if they are consecutive nodes.  Even if a node is removed, a data node is changed or attribute is changed unexpectedly, IMEContentObserver can post text change of the added node range and handle it normally.

MozReview-Commit-ID: IttDHBkr92Y

--HG--
extra : rebase_source : f0849d5fab0b28bdfa311cf833a216d43b9215d2
2017-06-08 11:24:58 +09:00
Masayuki Nakano d457e48592 Bug 1217700 part.4 Add automated tests for IMEContentObserver r=m_kato
IMEContentObserver notifies IME of 3 notifications at most when editor is changed.

The order is:
1. text change (with merged range if 2 or more change occurred during an edit transaction)
2. selection change (only the latest selection change. other changes occurred before that during an editor transaction are ignored)
3. position change (scrolled, resized, window moved, etc)

This does not check the behavior in designMode because some operation in testWithHTMLEditor() causes unexpected behavior, e.g., moving focus. It *might* be bug of design mode.  However, it doesn't matter for this bug.  The important thing of this bug is, there should be automated tests for IMEContentObserver.  And fortunately, IMEContentObserver does not check the type of editor.  So, it's enough to test only contenteditable element for HTMLEditor at least for now.  Therefore, I gave up to test it in designMode for now.

MozReview-Commit-ID: 7L6ZlbVMU2P

--HG--
extra : rebase_source : 8282fe7aa2f4d405f2576f05d46b60b044223855
2017-04-19 21:57:58 +09:00
Florian Queze 37f2343b9a Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst 9e0ecf32c5 Backed out changeset e1f191aad863 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze 93a734a3ce Bug 1356569 - Remove appendElement's last parameter when it is false, r=jaws. 2017-04-14 21:51:39 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Joel Maher 99137683e9 Bug 1355089 - add BUG_COMPONENT to widget/* files. r=mstange,jimm
MozReview-Commit-ID: 49Ug2HTqHnf
2017-04-14 05:54:36 -04:00
Dan Banner cdf987089d Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8
MozReview-Commit-ID: K5TLF92pHq4

--HG--
extra : rebase_source : 295bf325a07fa8ec4c55a8babf5418588308dca6
2017-04-12 11:10:00 +01:00
Masayuki Nakano fd9e71872c Bug 1347835 NativeKey should dispatch keypress events even if WM_KEYDOWN is processed by IME but followed by printable WM_(SYS)CHAR messages r=m_kato
Some IME may handle WM_KEYDOWN message before application and may set the keycode value to VK_PROCSSKEY but not do actually. Similarly, IME may handle WM_KEYDOWN message and replace following WM_CHAR messages with different characters.
Therefore, even if WM_KEYDOWN message comes with VK_PROCESSKEY, NativeKey shouldn't stop dispatching keypress events if it detects following printable char messages.

MozReview-Commit-ID: DcC2qgcLDrQ

--HG--
extra : rebase_source : 85c6a5dd5700b4032d1a21ed28b25c313cefa5cd
2017-04-10 15:32:02 +09: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
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 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
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
Joel Maher 8681dbd17f Bug 1285414 - Intermittent widget/tests/test_assign_event_data.html. disable for android debug. r=gbrown 2017-03-03 09:18:58 -07:00
Carsten "Tomcat" Book 4a4777d1aa merge mozilla-inbound to mozilla-central a=merge 2017-03-02 14:02:48 +01:00
Masayuki Nakano 944a1927bb Bug 1342865 When Control key is pressed and InsertText() isn't called on macOS, its KeyboardEvent.key value should be characters which are inputted by the key without Control key state r=m_kato
Because of conforming to UI Events KeyboardEvent key Values, when some modifier keys cause not inputting character, the KeyboardEvent.key value should be computed with removing all modifier state except glyph modifier keys.

When Control key is pressed, Cocoa fires odd key events typically.  For example, characters isn't computed with same logic of UI Events KeyboardEvent key Values especially when Option key is pressed (see adding testcases for the detail).

Therefore, this patch makes TISInputSourceWrapper::InitKeyEvent() ignore both characters and charactersIgnoringModifiers at computing KeyboardEvent.key value when Control key is pressed and InsertText() isn't called.

On the other hand, this patch does NOT touch the path to compute KeyboardEvent.key when Command key is pressed.  It should be changed in different bug because Command key behavior isn't so simple.

MozReview-Commit-ID: dMHgUEOnQw

--HG--
extra : rebase_source : 7a67c98d2bf6ca38c7e6ae9dcbad01020d9cea31
2017-03-01 10:58:55 +09:00
Jim Chen e559b260ee Bug 1137567 - Make nsWindow for Android use TextEventDispatcher; r=esawin r=rbarker r=masayuki r=snorp
Bug 1137567 - 1. Allow dispatching key events during composition; r=esawin

We potentially dispatch key events during composition to provide
compatibility for pages that only listen to key events.

Bug 1137567 - 2. Allow keyboard events in DispatchInputEvent when not on APZ thread; r=rbarker

We use nsIWidget::DispatchInputEvent to dispatch our keyboard events on
the Gecko thread, which on Android is not the APZ controller thread. We
should allow these events to pass instead of crashing.

Bug 1137567 - 3. Add GeckoEditableSupport class to support TextEventDispatcher; r=masayuki

Add a separate GeckoEditableSupport class, which implements
TextEventDispatcherListener and uses TextEventDispatcher for IME
operations. The new class is entirely separate from nsWindow to allow it
to be independently used in content processes as well.

Most of the code is copied from nsWindow::GeckoViewSupport, and adapted
to use TextEventDispatcher.

Bug 1137567 - 4. Make nsWindow::WindowPtr available for outside classes; r=snorp

Make nsWindow::WindowPtr available not just for classes inside nsWindow
but for outside classes as well. Also, add support for RefPtr native
objects to nsWindow::NativePtr.

Bug 1137567 - 5. Use GeckoEditableSupport in nsWindow; r=esawin

Use the new GeckoEditableSupport class in nsWindow to replace the
previous code in nsWindow::GeckoViewSupport. GeckoEditable native
methods now go to GeckoEditableSupport instead of GeckoViewSupport.

Several native methods in GeckoEditable are changed from
dispatchTo="proxy" to dispatchTo="gecko", because we no longer need the
special nsWindow::WindowEvent wrapper for our native calls.

Bug 1137567 - 6. Use pushPrefEnv in test_assign_event_data.html; r=masayuki

setAndObserveCompositionPref in test_assign_event_data.html does not
invoke the callback if the pref is already set. This patch changes it to
use SpecialPowers.pushPrefEnv so the callback is always invoked.
2017-03-01 15:29:30 -05:00
Masatoshi Kimura 7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Wes Kocher 18e735dcef Merge m-c to inbound, a=merge
MozReview-Commit-ID: EfMOcZbAiSe
2017-01-27 16:39:29 -08:00
Wes Kocher 7cd28f7e5d Merge inbound to central, a=merge
MozReview-Commit-ID: HvoljuLV6Gj
2017-01-27 16:37:18 -08:00
Gijs Kruitbosch 8faf5c08a8 Bug 1333164 - fix invalid references to mochitest stylesheet, r=erahm
MozReview-Commit-ID: 1Xxt72jYdm7

--HG--
extra : rebase_source : 15d854ffd6a142687fe5232149a0e370f1c058c2
2017-01-24 14:24:04 +00:00
Florian Quèze b11907c7aa Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
Florian Quèze be4dbae285 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Tooru Fujisawa bc4b754a71 Bug 1321230 - Remove legacy generator from widget/. r=m_kato 2017-01-28 00:42:47 +09:00
Jim Chen 8b160783a8 Bug 1319660 - Fix possible crash when editing contentEditable; r=esawin r=masayuki r=smaug
Bug 1319660 - 1. Don't take shortcut if old replacement ranges don't match; r=esawin

The block at [1] is a shortcut we take when we reconcile Java text
changes with Gecko text changes. However, we only checked that the new
ranges are the same, i.e. that the new Gecko text is the same as the new
Java text. We should also be checking that the old ranges are the same,
i.e. that the replaced Gecko text is the same as the replaced Java text.

[1] https://dxr.mozilla.org/mozilla-central/rev/bbbd2f7539f224a482cc6d2dd10e6a5f31c8baf3/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoEditable.java#1233

Bug 1319660 - 2. Use previous node instead of sibling when adjusting last node; r=masayuki r=smaug

nsContentIterator in pre mode adjusts its last node if the node is a
childless node like <br>. However, right now it's using GetPrevSibling,
which can lead to error in some edge cases such as:

<p></p><div><br></div>

In this case, if the last node is <br> with offset 0, GetPrevSibling
will return <p> because <p> is <br>'s parent's previous sibling, and the
last node will be set to <p>. However, the correct last node in this
case is <div>, because <br> with offset 0 refers to the position to the
left of <br>, which is <div> with offset 0. In this case, PrevNode
returns the correct <div> value, so we should set the last node to the
result of PrevNode.

For the first node, for a childless node in pre mode, GetNextSibling and
NextNode are the same, so there is no bug in this case. Nevertheless,
this patch changes the call to NextNode to be consistent with calling
PrevNode for the last node.

Bug 1319660 - 3. Add test for correctly adjusting last node in content iterator; r=masayuki

Add a test for the previous patch that makes sure querying selected text
in an edge case works correctly.

Bug 1319660 - 4. Add test for start node regression; r=me

Add a new test case for the NextNode() regression. r=me for trivial
test-only patch.

Bug 1319660 - 5. Restore GetNextSibling call for first node of pre-content-iterator; r=smaug

The last patch changed the `GetNextSibling()` call to `NextNode()`
because I assumed they're equivalent in this case. That turned out to
not be the case because we can reach this line even if the node has
children -- the index just has to be after the last child. So this patch
restores the `GetNextSibling` call to restore the correct behavior.

I also added some comment to clarify that we can reach this line due to
one of two conditions: 1) the node has no children; 2) the node has
children but the index is after the last child.

This patch also replaces the `HasChildren()` check when setting
`cChild`.  If the index is after the last child (i.e. index ==
childCount), `GetChildAt()` fails and we erroneously log an assertion
warning, even though the input was valid. The new check handles all
cases whether start node has children or not.
2017-01-23 14:35:04 -05:00
Mark Banner 16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00:00
Ryan VanderMeulen 9e4ddf00bd Backed out 3 changesets (bug 1319660) for causing bug 1329446.
Backed out changeset d506d3c193c9 (bug 1319660)
Backed out changeset 93353b53a706 (bug 1319660)
Backed out changeset 9a7c2edd54b8 (bug 1319660)

--HG--
extra : rebase_source : 43ad1287462697f2312aa18925a462eb85c52495
2017-01-18 10:55:53 -05:00