Commit Graph

1894 Commits

Author SHA1 Message Date
Boris Zbarsky
668b8a8b2d Bug 1298243 part 6. Remove the unused xpidl versions of DataTransfer.types and DataTransfer.getData. r=mystor 2016-10-10 21:07:47 -04:00
Boris Zbarsky
241a4d12eb Bug 1298243 part 5. Notify the DataTransfer whenever its types list changes. r=mystor 2016-10-10 21:07:47 -04:00
Boris Zbarsky
ee441d05fb Bug 1298243 part 4. Drop the pointless ErrorResult from the DataTransferItemList indexed getter. r=mystor 2016-10-10 21:07:47 -04:00
Boris Zbarsky
27b35620e7 Bug 1298243 part 3. Restrict mutation of a DataTransferItem's kind to codepaths that are actually changing its data. r=mystor 2016-10-10 21:07:47 -04:00
Boris Zbarsky
298989ed98 Bug 1298243 part 2. Make the type of a DataTransferItem immutable. r=mystor 2016-10-10 21:07:47 -04:00
Boris Zbarsky
018d43c3c0 Bug 1298243 part 1. Add some more documentation to DataTransferItemList. r=mystor 2016-10-10 21:07:47 -04:00
Ryan VanderMeulen
e980397fb4 Merge m-c to autoland. a=merge 2016-10-07 23:22:46 -04:00
Kartikaya Gupta
8d70bf45ca Bug 1291381 - Enable touch tests on Windows. r=botond
MozReview-Commit-ID: 3zmGDCFLUgF
2016-10-07 15:10:53 -04:00
Kartikaya Gupta
758d479cf5 Bug 1308483 - Allow firing the mouselongtap event to chrome JS for use in tests. r=smaug
MozReview-Commit-ID: GYfLAPle5Kl
2016-10-07 15:10:39 -04:00
Michelangelo De Simone
3e5861c1f3 Bug 1306772 - Remove DOM/cellbroadcast and related code. r=jst
MozReview-Commit-ID: EWBjamnhAyC

--HG--
extra : rebase_source : 84bc99a7fd0f9d74b5b25d3ddc295c132e51d987
2016-09-30 16:03:21 -07:00
Dan Minor
621afd7f92 Bug 1291715 - Add RTCDTMFSender and RTCDTMFToneChangeEvent to webidl; r=smaug
MozReview-Commit-ID: FvAp6DQex02

--HG--
extra : rebase_source : 1b8102930efba0fb0da855b02effd106370a1b8b
2016-09-14 08:53:23 -04:00
Sebastian Hengst
7520674246 Backed out changeset 903fa45a9d6c (bug 1291715) for build bustage. r=backout 2016-10-05 17:03:06 +02:00
Dan Minor
c168a463ed Bug 1291715 - Add RTCDTMFSender and RTCDTMFToneChangeEvent to webidl; r=smaug
MozReview-Commit-ID: FvAp6DQex02

--HG--
extra : rebase_source : 1b8102930efba0fb0da855b02effd106370a1b8b
2016-09-14 08:53:23 -04:00
Stone Shih
ce7f1ca7af Bug 1292063 - Part 3: Add mComposedInNativeAnonymousContent to determine which events can cross the boundary of native anonymous content. r=smaug
--HG--
extra : rebase_source : 6b3fcc52b2a099944cc1a0427a36624394fb3b2e
2016-09-12 18:15:16 +08:00
Stone Shih
7b63299a94 Bug 1292063 - Part 2: Add composed argument to getEventTargetChainFor and refine test cases. r=smaug
--HG--
extra : rebase_source : 221e1bd75cfa3ab1c8ef435e8e87c5a6f56b82aa
2016-09-13 17:29:08 +08:00
Stone Shih
d76caea5e4 Bug 1292063 - Part 1: Add Event.composed. r=smaug
--HG--
extra : rebase_source : 105f9cfddb083d48d3da25fa13bf9a3b4c2637f6
2016-08-31 11:16:11 +08:00
Stone Shih
299f264eae Bug 1304318 - [Pointer Event] Enable passed pointer events test cases. f=btseng, r=masayuki
--HG--
extra : rebase_source : dd7d59bc57d861c060883422c73457df083f8427
2016-09-21 16:39:37 +08:00
Stone Shih
1aa4b81fa4 Bug 1293174 - [Pointer Event] Implement implicit pointer capture for touch. f=bevistseng. r=smaug
--HG--
extra : rebase_source : ef86008679a1c0e7af30bab658e0c7668093adfe
2016-08-11 14:49:15 +08:00
Andrea Marchesini
6266ebefa2 Bug 1306222 - Use NeedsSubjectPrincipal in DataTransfer, r=ehsan 2016-09-30 19:54:28 +02:00
Carsten "Tomcat" Book
6636b09ddd merge mozilla-inbound to mozilla-central a=merge 2016-09-30 12:02:16 +02:00
Carsten "Tomcat" Book
1b096c3511 Merge mozilla-central to autoland 2016-09-29 11:50:17 +02:00
Andrea Marchesini
afce29a145 Bug 1297393 - Make passing of subject principals to webidl entry points explicit - part 3 - DataTransferItemList, r=ehsan 2016-09-29 08:55:20 +02:00
Andrea Marchesini
995acd8d49 Bug 1297393 - Make passing of subject principals to webidl entry points explicit - part 2 - DataTransferItem, r=ehsan 2016-09-29 08:55:20 +02:00
Masayuki Nakano
7a28856eef Bug 1304624 ContentEventHandler::GetFlatTextLengthInRange() shouldn't include a line break length caused by the end node's open tag when the given range ends before the open tag r=smaug
This must be a regression of bug 1213589.  When removing whole text from an editor, the editor removes moz-<br> after removing all nodes.  Immediately before the remove, moz-<br> becomes <br>.  So, IMEContentObserver::AttributeChanged() detects the native text length for the <br> element changing from 0 to 2 (on Windows) or 1 (on the other platforms).  However, the call of ContentEventHandler::GetFlatTextLengthInRange() in IMEContentObserver::AttributeChanged() returns 2 (on Windows) or 1 (on the other platforms).  Although, it tries to get the length from the start of the editor to before aElement, it always includes the length of the line breaker caused by the end node.

The reason is, ContentEventHandler::GetFlatTextLengthInRange() always adds the line breaker's length for the end node without checking the range includes open tag of the end node.  Therefore, this patch adds the check into ContentEventHandler::GetFlatTextLengthInRange().  So, ContentEventHandler::GetFlatTextLengthInRange() becomes to support NodePositionBefore() for the end of the range.

Additionally, this patch fixes a bug at appending text node length.  In the loop, |aEndPosition| shouldn't be referred because it may be hacked with |endPosition|.  So, detecting the last text node should be compared with |endPosition|.

For making the method code safer, this changes whole |aEndPosition| after defining |endPosition| is replaced with |endPosition|.

MozReview-Commit-ID: FUp2nxuQHnO

--HG--
extra : rebase_source : 611992faf95082ce8ae005b7bcce90a3bea4f99e
2016-09-29 14:04:15 +09:00
Masayuki Nakano
3b6cadf939 Bug 1305355 part.1 TextComposition::GetSelectionStartOffset() should query normal selection range when composition string is empty r=smaug
TextComposition::GetSelectionStartOffset() tries to query the start offset of the composition if there is a composition. Therefore, it tries to query first clause when it has some clause information of the composition string.  However, even if the composition string is empty, TextComposition::mRanges which refers CompositionEvent::mRanges of the last eCompositionChange event may have empty clause information.  In such case, this method tries to query not existing IME selection range.  Then, this returns UINT32_MAX and ContentCacheInChild will query character rects around the offset and ContentEventHandler::SetRangeFromFlatTextOffset() will meet odd case.

For avoiding this issue, TextComposition::GetSelectionStartOffset() should query normal selection when composition string in the editor is empty.  Note that TextComposition::mString will be updated after the editor completes updating its DOM contents.  Therefore, TextComposition should refer mLastData which is set before dispatching eCompositionChange in the tree.

MozReview-Commit-ID: F2UGCQLXLSz

--HG--
extra : rebase_source : 0349a74f20f0948afa9989552a88047788aa1585
2016-09-26 21:06:26 +09:00
Kirk Steuber
ad4b55af1f Bug 1206133 - Add popuppositioning state and popuppositioned event to improve arrow panel position handling. r=enndeakin
MozReview-Commit-ID: Dh1npORCQ6J

--HG--
extra : rebase_source : 5df6076561a746791c44d249afa31009d0e1b30a
2016-08-16 15:33:05 -07:00
Andrea Marchesini
b3b8830fcc Bug 1306220 - Get rid of nsIDOMDataTransfer::clearData and mozClearDataAt, r=ehsan 2016-09-29 22:47:01 +02:00
Kartikaya Gupta
1d5a942431 Bug 1300421 - Back out 4 csets from bug 1288760 for regressing event coordinate reporting. r=jfkthame
MozReview-Commit-ID: AJ2PkSfYCpv
2016-09-29 10:20:52 -04:00
Masayuki Nakano
97735168f1 Bug 1297013 part.2 Implement some helper methods to log constants related to event handling r=smaug
This patch implements some helper methods to log constants related to event handling.

ToString(KeyNameIndex) and ToString(CodeNameIndex) converts the enum itmes to human readable string.  They use WidgetKeyboardEvent's helper class which returns Unicode text.  Therefore, this need to convert from UTF16 to UTF8.  That's the reason why these methods don't return |const char*|.

GetDOMKeyCodeName(uint32_t) returns DOM keycode name if it's defined.  Otherwise, returns hexadecimal value.  For generating switch-case statement, VirtualKeyCodeList.h shouldn't include ",".  Therefore, this patch removes "," from VirtualKeyCodeList.h and append it at defining NS_DEFINE_VK.  Additionally, the last item of enum and array should not end with ",".  Therefore, this adds dummy last item at each of them.  Finally, some of the keyCode values are shared between 2 keys.  Therefore, it needs to support NS_DISALLOW_SAME_KEYCODE for switch-case generator.  See the comment in the file for more detail.

GetModifiersName(Modifiers) returns all modifier names included in the given value.

MozReview-Commit-ID: 9i2ftFOTpDn

--HG--
extra : rebase_source : 458a4d28624dc10dd4454f2e7708d746d1fcb045
2016-09-15 00:48:47 +09:00
Andrea Marchesini
72d886f7a3 Bug 1301249 - nsIDocument::GetDocumentURI() should be fallible, r=smaug 2016-09-20 14:03:05 +02:00
Ethan Lin
752790c966 Bug 1176997 - Part1. Support focus-within. r=xidron r=smaug 2016-09-09 00:12:00 +02:00
Randell Jesup
8f96069cc5 Bug 1298169: use StaticRefPtr r=masayuki 2016-09-20 01:12:09 -04:00
Jan de Mooij
a53986bf29 Bug 1302448 part 1 - Rename CycleCollectedJSRuntime to CycleCollectedJSContext. r=mccr8
--HG--
rename : xpcom/base/CycleCollectedJSRuntime.cpp => xpcom/base/CycleCollectedJSContext.cpp
rename : xpcom/base/CycleCollectedJSRuntime.h => xpcom/base/CycleCollectedJSContext.h
extra : rebase_source : 075214b5057f151520926715b6154e99ae80a0b3
2016-09-14 15:47:32 +02:00
Olli Pettay
16a7908638 Bug 1300606 - DeviceType event handlers/listeners aren't removed properly, r=mccr8 2016-09-13 17:00:43 -07:00
Ho-Pang Hsu
382e637a0d Bug 1285804 - Part 2: Update and enable testcases. r=smaug, f=btseng
--HG--
extra : rebase_source : e8e6aad881cebafc686b472e524415d8c9cf156b
extra : histedit_source : 7ed1d86ee8d0c1c3175bf550b269cdf0effe2f36
2016-09-12 13:51:10 +08:00
Ho-Pang Hsu
45cd280352 Bug 1299199 - Part 2: Remove 'sendPointerEvent' from mochitest_support_external.js. f=btseng, r=smaug
--HG--
extra : rebase_source : 7b51f98b530445ee9621e1e096349d97efc27088
extra : histedit_source : 649af0d76d9303366e8475b855635a834b4bf0c4
2016-09-12 23:51:56 +08:00
Ho-Pang Hsu
d606722f4c Bug 1299199 - Part 1: Replace 'sendPointerEvent()' with 'sendMouseEvent()' in testcases. f=btseng, r=smaug
--HG--
extra : rebase_source : 4d3d8874531b5eaf2efaa65db2d2a65b2548e9fc
extra : histedit_source : 26d2fecec8b9b2b6c937ebb2d74d41c954e3a127
2016-09-12 23:51:56 +08:00
Carsten "Tomcat" Book
656d6db419 Merge mozilla-central to mozilla-inbound 2016-09-07 17:21:27 +02:00
Carsten "Tomcat" Book
1c61ba654e merge mozilla-inbound to mozilla-central a=merge 2016-09-07 17:20:12 +02:00
Michael Layzell
e12728495c Bug 1018486 - Part 9: Changes to account for modifications to clang plugin, r=ehsan
MozReview-Commit-ID: EPQMbfHYxUK
2016-09-07 10:50:47 -04:00
Michael Layzell
c47fca1cd7 Bug 1018486 - Part 1: Changes in dom/, r=baku
MozReview-Commit-ID: 4tCUM4KRe81
2016-09-07 10:50:35 -04:00
Masayuki Nakano
a1c3cc4ad1 Bug 1296217 ContentEventHandler::OnQueryTextRectArray() should apply CSS transform to each character or line breaker rect r=smaug
Currently, ContentEventHandler::OnQueryTextRectArray() is used only in e10s mode (at caching necessary character rects in ContentCacheInChild).  Therefore, this bug occurs only in e10s mode.

ContentEventHandler::OnQueryTextRectArray() applies CSS transform only to each frame rect.  Therefore, character rect's width and height are not applied.

This patch makes the loop apply CSS transform to each character or line breaker rect (i.e., each item of charRects).  Then, we need to rewrite the lastCharRect hack.  It stores the last charRect value for computing next line breaker rect if next line breaker is caused by a block level element or something, i.e., not caused by a <br> frame.  So, when brRect is computed with lastCharRect, the loop needs to apply CSS transform of the last text frame to the following brRect because it tries to compute a caret rect immediately after the last character.  For doing this, this patch adds lastFrame which stores the last frame for lastCharRect and set it to baseFrame.  Then, at applying CSS transform to each charRect, it can apply CSS transform of expected frame.

Similarly, when brRect is computed with last text frame, this patch looks for the last text frame from lastTextContent and use it as base frame to apply to CSS transform.

MozReview-Commit-ID: 5Yr2HMrooHd

--HG--
extra : rebase_source : fa643f442036d9167a1df3a4383b0802a1729a3e
2016-09-06 11:46:31 +09:00
Ho-Pang Hsu
0174b1ed3b Bug 1258808 - Part 1: Passing PointerId (Gecko). r=smaug, f=btseng
--HG--
extra : rebase_source : 82113a04a209748d003d72b9103de78db4d1f73d
extra : histedit_source : 07c3c256639c7042487a0a2dc4135dc3063078b8
2016-09-01 16:12:15 +08:00
Wes Kocher
a2e7bd60fc Merge m-c to inbound, a=merge 2016-09-02 13:34:10 -07:00
Olli Pettay
b1f6796732 bug 1300129, Ensure devtools get the right event listener data, r=mccr8 2016-09-02 23:19:56 +03:00
Wes Kocher
ee92002ede Merge inbound to m-c a=merge 2016-09-02 13:17:30 -07:00
Andrea Marchesini
cd55795e9f Bug 1299956 - Better use of kungFuDeathGrip in EventListenerManager, r=smaug 2016-09-02 06:59:42 -07:00
Stone Shih
1cf8ba2093 Bug 1298255 - [Pointer Event] Update web-platform-test pointerevent_element_haspointercapture-manual.html. f=bevistseng r=smaug 2016-08-26 10:38:59 +08:00
Jimmy Wang
9ca5305aa9 Bug 1297539 - Send message PasteTransferable if the focused element is on the content process, otherwise pass the transferable to the controller directly. r=mrbkap
MozReview-Commit-ID: Bj3mY23YUDT

--HG--
extra : rebase_source : f63309608b5dcc2f602290a9415519826b2f08cd
2016-08-23 20:00:27 -04:00
Michael Layzell
e4a2ac3b82 Bug 1297186 - Correctly propagate principals when getting the files list in DataTransfer, r=enndeakin
MozReview-Commit-ID: 8LRBekaOUJR
2016-09-01 11:22:15 -04:00
Nicholas Nethercote
34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Stone Shih
344d0d32d0 Bug 1296491 - [Pointer Event] Investigate failure of pointerevent_attributes_mouse-manual.html. r=bevistseng, r=smaug 2016-09-02 11:10:48 +08:00
Stone Shih
60f3766a41 Bug 1292070 - Part 4: Enable test_pointerevent_pointermove-on-chorded-mouse-button.html. f=bevistseng, r=smaug
--HG--
extra : rebase_source : addf473c2b7c605517b61dbce8210af20c939243
extra : histedit_source : 2238397c1977f07b06472b89d6e0f99ac6d2cdcc
2016-08-18 17:35:20 +08:00
Stone Shih
2d66c06058 Bug 1292070 - Part 3: Update test cases to synthesize mouse events with correct attributes. f=bevistseng, r=smaug
--HG--
extra : rebase_source : a2450d25990e69910793832c9e86abb5957e8d33
extra : histedit_source : 541587919143ee22e2bf086ee7f6d9eac437f4e5
2016-08-18 12:01:51 +08:00
Stone Shih
4c774b11b2 Bug 1292070 - Part 2: Add API to synthesize mouse event with buttons. f=bevistseng, r=smaug
--HG--
extra : rebase_source : c676026e30c857b2a19854285f8bb40c47c58267
extra : histedit_source : c1ee981e9ab821a51d3abb96b1d2d334ffe8e0d2
2016-08-18 11:58:48 +08:00
Stone Shih
b6697d07aa Bug 1294335 - [Pointer Event] Refine setPointerCapture / releasePointerCapture to follow the algorithm defined in the spec. f=bevistseng, r=smaug 2016-08-12 09:49:31 +08:00
Thomas Wisniewski
e18ef07821 Bug 1069015 - Restore code for :placeholder-shown pseudo-class. r=dbaron 2016-08-31 14:21:44 -04:00
Aryeh Gregor
76862dadad Bug 1299453 - Stop using createEvent("DragEvents"/"KeyEvents") internally; r=smaug
They are non-standard aliases for "DragEvent" and "KeyboardEvent" that
are not supported by any other UA, and we would like to drop support.
So first let's stop using them ourselves, so we can use telemetry to see
if any sites are using them.

MozReview-Commit-ID: ICC33ORa2st
2016-08-31 20:38:50 +03:00
Emilio Cobos Álvarez
4a2a67b606 Bug 1299046: Take into account generated content in EventStateManager::PreHandleEvent. r=smaug
This patch adds a MOZ_ASSERT. I'll try to pass it through try, and otherwise
turn it into a warning, I guess.

MozReview-Commit-ID: 9KZS6dh3wzw

--HG--
extra : rebase_source : 263cc55878fde3cea1fc0184cda4b3118e38d134
2016-08-29 21:06:57 -07:00
Stone Shih
e9962ae1fc Bug 1292067 - Make width/height of pointer default to 1. f=bevistseng. r=smaug
--HG--
extra : rebase_source : a55c4356dadacb2a41b49cde98a31051af6aa9d8
2016-08-10 13:04:33 +08:00
Aryeh Gregor
f3e54042f1 Bug 1271115 - Merge ChromeUtils.js into EventUtils.js; r=jmaher
This allows plain mochitests to use the functions as well, which is
necessary to get them to work with e10s.

MozReview-Commit-ID: J4um2mliJcZ
2016-08-25 16:57:09 +03:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Stone Shih
9e7beee054 Bug 1285861 - Enable test_pointerevent_gotpointercapture_before_first_pointerevent-manual.html. r=smaug 2016-08-18 17:22:50 +08:00
Stone Shih
0b8383dac7 Bug 1296194 - [Pointer Event] Update web-platform-test pointerevent_element_haspointercapture. r=smaug
--HG--
rename : dom/events/test/pointerevents/pointerevent_element_haspointercapture.html => dom/events/test/pointerevents/pointerevent_element_haspointercapture-manual.html
rename : dom/events/test/pointerevents/test_pointerevent_element_haspointercapture.html => dom/events/test/pointerevents/test_pointerevent_element_haspointercapture-manual.html
rename : testing/web-platform/tests/pointerevents/pointerevent_element_haspointercapture.html => testing/web-platform/tests/pointerevents/pointerevent_element_haspointercapture-manual.html
2016-08-18 14:11:04 +08:00
Ryan VanderMeulen
82663d8710 Merge inbound to m-c. a=merge 2016-08-23 10:05:18 -04:00
Andi-Bogdan Postelnicu
a63c848d60 Bug 1297048 - remove useless null check in DragEvent::InitDragEvent. r=masayuki
MozReview-Commit-ID: 5BFD0aAyPqq

--HG--
extra : rebase_source : 002756bf045c33bf7f58fafb11c23eeef4550257
2016-08-22 15:13:57 +03:00
Stone Shih
4af21c4cd1 Bug 1296185 - Part 2: Update modified test cases. r=smaug
--HG--
extra : rebase_source : 33fef67d8f656585ea67f27a38131b91bc75eb65
2016-08-19 16:12:36 +08:00
Stone Shih
d4de3956f3 Bug 1296185 - Part 1: [Pointer Event] Import new web-platform-tests to pointer events mochitest. r=smaug
--HG--
extra : rebase_source : 813bab7d433fac7a166f6ff320dec3039e152b86
2016-08-15 11:02:41 +08:00
Ryan VanderMeulen
833833b8c5 Merge inbound to m-c. a=merge 2016-08-22 09:40:41 -04:00
Xidorn Quan
33700e24af Bug 1296625 - Replace query to ui.use_activity_cursor pref with a cached bool value. r=smaug
MozReview-Commit-ID: GeTr29JG4qy

--HG--
extra : rebase_source : 2a74d2ca0ffe8fee23230334e01b483cc3abc8f2
2016-08-20 00:43:01 +10:00
Kartikaya Gupta
14a899b828 Bug 1217715 - Don't limit the system scroll override to the root content. r=botond,masayuki
MozReview-Commit-ID: EH94OR5rEsX
2016-08-19 06:52:25 -04:00
Nicholas Nethercote
67af4817e9 Bug 1293596 (part 2) - Rework nsIWidget bounds getters. r=mstange.
This patch makes GetBounds(), GetScreenBounds() and GetClientBounds() more
obviously infallible, like existing functions such as GetNaturalBounds() and
GetClientSize(). This results in clearer behaviour in nsCocoaWindow.mm if
Objective C exceptions occur. Along the way, the patch removes some useless
failure checks for these functions.

The patch also removes the NS_IMETHOD from GetRestoredBounds and makes that
function MOZ_MUST_USE.
2016-08-19 09:03:04 +10:00
Wes Kocher
a58f8b89a0 Merge m-c to inbound, a=merge 2016-08-18 16:32:58 -07:00
Michael Layzell
c6c3b7b266 Bug 1296277 - Move DataTransferItem.cpp and DataTransferItemList.cpp into UNIFIED_SOURCES, r=baku
MozReview-Commit-ID: IjajWDSuBxn
2016-08-18 15:54:22 -04:00
Michael Layzell
6dbd9e26cb Bug 1296041 - Check subject principal in Data(), instead of IndexedGetter, r=baku
MozReview-Commit-ID: 4aeGjTejP3z
2016-08-18 15:54:21 -04:00
Wes Kocher
66098b3d43 Merge m-c to autoland, a=merge 2016-08-17 17:25:57 -07:00
Wes Kocher
07f8858bf6 Merge inbound to central, a=merge 2016-08-17 16:38:41 -07:00
Sebastian Hengst
4cc5c09d8b Backed out changeset c5cb27604f9f (bug 1206133) for timing out in notification tests of passwordmanager on Linux. r=backout 2016-08-18 19:58:44 +02:00
Aryeh Gregor
d41a879b6a Bug 1264291 - initEvent must unset the stop propagation flag; r=smaug
Tests upstream <https://github.com/w3c/web-platform-tests/pull/3472>.
2016-08-18 16:37:26 +03:00
Ben Tian
7d5abfc007 Bug 1264769 - Part 1: Dispatch loadend event for image loading. r=hsivonen
--HG--
extra : rebase_source : 8843a2a3c56c74dc1838f2da3c8251783e20f295
2016-08-16 12:01:12 +08:00
Nicholas Nethercote
a54e0fd248 Bug 1295053 (part 9) - Don't use NS_METHOD for dom/ functions. r=froydnj.
These don't need __stdcall on Win32.

--HG--
extra : rebase_source : 93aa569789dab107137c5493d1c86acc6701329b
2016-08-16 12:12:30 +10:00
Wes Kocher
2253eb9510 Merge m-c to inbound, a=merge 2016-08-15 14:53:49 -07:00
Wes Kocher
d602abb016 Merge inbound to central, a=merge 2016-08-15 14:20:38 -07:00
Igor
175543fda8 Bug 1293384 - Part 2: Rename Snprintf.h header to Sprintf.h. r=froydnj 2016-08-14 23:43:21 -07:00
Igor
a57972337d Bug 1293384 - Part 1: Rename snprintf_literal to SprintfLiteral. r=froydnj 2016-08-14 23:44:00 -07:00
Wes Kocher
4aec37ca6e Merge m-c to autoland, a=merge 2016-08-12 16:30:03 -07:00
Wes Kocher
e9097643d5 Merge inbound to central, a=merge 2016-08-12 13:44:29 -07:00
Jan de Mooij
0ad12515f4 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Stone Shih
02e9d4e17a Bug 1180188 - Some pointer events mochitests fails on Linux platform. r=smaug 2016-08-04 11:02:50 +08:00
Masayuki Nakano
a000f807cb Bug 1286464 part.19 ContentEventHandler::OnQueryTextRect() should handle the case when queried range starts from the end of mRootContent r=smaug
First, when the first node causing text is invisible, OnQueryTextRect() still fails even with this patch. We shouldn't fix it in this bug because it's unusual case but this bug is very important especially for some web service using HTML editor like Gmail.

This patch fixes all cases when the start offset of queried range reaches the end of mRootContent.

1. When the last node causing text is a <br> element (either content <br> element or moz-<br> element), its frame is a placeholder for empty line.  Therefore, this patch sets the rect to the frame rect.

2. When the last node causing text is a text node, the last frame generated for it represents its line (including empty line).  Therefore, this patch sets the rect to the result of GetLineBreakerRectAfter().

3. When the last node causes a line breaker before it, the frame may be a placeholder for it (this is not usual case, when user types Enter key at the end of <p> element, <p><br></p> is generated by Gecko).  In this case, this patch sets a possible caret rect which is guessed from the content box of the frame and its font height.

4. When there are no nodes causing text in mRootContent, this patch sets a possible caret rect like case #3.

MozReview-Commit-ID: FS9cWJQ39DK

--HG--
extra : rebase_source : cb2ea4cfb4c8d5c85a4dd7498aa11bd86b61c2ef
2016-08-12 14:57:33 +09:00
Masayuki Nakano
95ad200286 Bug 1286464 part.18 ContentEventHandler::OnQueryTextRectArray() should compute line breaker's rect with the last character's node when the start of queried range is a line breaker and it's caused by a block frame r=smaug
Similar to OnQueryTextRect(), OnQueryTextRectArray() should compute a line breaker's rect with the last character when it's the first character in queried range and not caused by <br> frame.

MozReview-Commit-ID: CGDHbcrc6zB

--HG--
extra : rebase_source : 7e7cad1aebc4b1c675360a1a1ff6e704d17c4e5c
2016-08-08 19:05:35 +09:00
Masayuki Nakano
2408130832 Bug 1286464 part.17 ContentEventHandler::OnQueryTextRect() should compute a line breaker's rect from the last text frame if the queried range starts with a block frame r=smaug
When queried range starts with a block frame, we cannot compute proper line breaker's rect at its open tag only with the frame's rect because the proper rect should be at the end of previous text frame.

Therefore, this patch makes SetRangeFromFlatTextOffset() return the last text node found at scanning the range. Then, OnQueryTextRect() can compute the first line breaker's rect with it (if there is at least one text node).

However, if the last text node is hidden by CSS or something, this patch won't work. We need to do something in another bug for hidden frame's issue, though. But note that IME typically doesn't request hidden text's rect because neither selection nor composition string is in such range.

MozReview-Commit-ID: 2FFzNoubJ1y

--HG--
extra : rebase_source : b9c4af40b8747f19da8e55434d580e29322c9601
2016-08-08 18:11:11 +09:00
Masayuki Nakano
7b45431d6c Bug 1286464 part.16 Rename ContentEventHandler::Get*FrameHavingFlatTextInRange() to ContentEventHandler::Get*FrameInRangeForTextRect() and make them treat a moz-<br> element as a normal <br> element because it doesn't cause text but needs to compute text rect in the last empty line r=smaug
In plain text editor, moz-<br> element is appended for a placeholder of empty line when the text ends with a line breaker. Therefore, when we compute text rects, we need to handle it same as a normal <br> element even though it doesn't cause any text.

MozReview-Commit-ID: 4IXLafU6o0W

--HG--
extra : rebase_source : 5db9c70e3acd40e4f47f35fcf293702ce0fb0295
2016-08-02 14:00:32 +09:00
Masayuki Nakano
b933e7c9bb Bug 1286464 part.15 Rewrite ContentEventHandler::OnQueryTextRect() with new utilities like ContentEventHandler::OnQueryTextRectArray() r=smaug
Although, this patch is pretty big and complicated, but I have no idea to separate this since this rewrites all over the OnQueryTextRect() with new utility methods which are implemented for OnQueryTextRectArray().

Currently, OnQueryTextRect() doesn't support line breaks before block level elements. Therefore, in HTML editors, eQueryTextRect may not work fine if the range includes open tags of block level elements. This causes odd positioning of IME's candidate window in non-e10s mode.

This implements ContentEventHandler::GetLastFrameHavingFlatTextInRange() which scans the given range from last to first. However, this hits wrong NS_ASSERTION() in nsContentIterator::Last().  mLast can be nullptr if there is no content but Init() returns NS_OK even in such case.  I think that returning NS_OK is fine because it's not illegal case.  Therefore this patch fixes the wrong assertion.

MozReview-Commit-ID: E6OnIA1eMou

--HG--
extra : rebase_source : e44114b6fb0024c2ab7f9101b12335de4b5cc4aa
2016-08-12 14:11:33 +09:00
Masayuki Nakano
3734289fe2 Bug 1286464 part.14 When ContentEventHandler::OnQueryTextRectArray() reaches the end of query range, it should append caret rect at the end of the content r=smaug
When the loop in ContentEventHandler::OnQueryTextRectArray() reaches at the end of contents, it should append a caret rect at the end of the contents. That helps deciding popup position of IME when caret is at the end of the contents.

This patch guesses the caret rect with eQueryTextRect event (for avoiding the dependency of native caret position of eQueryCaretRect event handler).

MozReview-Commit-ID: 8cGeHpkzX9g

--HG--
extra : rebase_source : c7adc65ccf0fefa7cb1c3bd0b056dc04f8a85b3e
2016-08-05 16:51:49 +09:00
Masayuki Nakano
65203b7481 Bug 1286464 part.13 ContentEventHandler::OnQueryTextRectArray() should guess a line breaker's rect with previous character's rect if it's available r=smaug
This is hack for returning better rect for a line breaker caused by non-<br> element. E.g., if a block frame causes a line break, after the last visible character is the best position, i.e., there is |<p>ABC</p><p>DEF</p>| and the caret is after "C", querying next character's rect should be computed with "C"'s rect, rather than computed with next <p> element's border rect.

MozReview-Commit-ID: 7nXt74GGpNf

--HG--
extra : rebase_source : 14807e98cc9a6be22e6168570a299abf0ecaf267
2016-08-05 14:31:37 +09:00
Masayuki Nakano
0ee732da0b Bug 1286464 part.12 ContentEventHandler::GetFirstFrameHavingFlatTextInRange() should return only frames whose content causes text r=smaug
If it returns frames which don't cause text, the caller needs complicated loop. So, it should return only frames which causes some text.

MozReview-Commit-ID: 9gny0w1PUMa

--HG--
extra : rebase_source : 423c7b57355d659e1a5bd96dac35060cae38801c
2016-07-21 17:45:17 +09:00
Masayuki Nakano
dd3468f808 Bug 1286464 part.10 ContentEventHandler::OnQueryTextRectArray() should append same rects for following characters of a line breaker in nsTextFrame r=smaug
If line breakers in a text node works as is, e.g., |white-space: pre;| is specified, we need to handle line breakers in text frames too.

This patch handles "\n" in text nodes same as line breakers caused by some elements.

MozReview-Commit-ID: JmXesusFxzR

--HG--
extra : rebase_source : dca28a6e4661eef3c8a102916c451e0f021bf6d5
2016-08-05 14:06:30 +09:00
Masayuki Nakano
2a4ac3b7fa Bug 1286464 part.9 ContentEventHandler::OnQueryTextRectArray() shouldn't append same rect for following character of a lien breaker when the query range starts from middle of the line breaker r=smaug
If the query range starts middle of a line breaker, i.e., "\r[\n", ContentEventHandler::OnQueryTextRectArray() does not need to (in other words, should not) append same rect anymore.

This patch checks if the range starts middle of a line breaker and in such case, skip to append same rect.

MozReview-Commit-ID: H5gdtAakGcP

--HG--
extra : rebase_source : 3afaca4d6e9f09e2054c4a6bd876635cfef6c58c
2016-08-05 13:53:08 +09:00
Masayuki Nakano
7826a090ce Bug 1286464 part.8 ContentEventHandler::OnQueryTextRectArray() should handle line break before a node r=smaug
Some elements causes a line break before itself. In such case, OnQueryTextRectArray() should append one or two rects for such line breakers.

This patch also implements GetLineBreakerRectBefore(). It computes line breaker rect for the given frame. Even if it's a <br> frame, we cannot use its rect because <br> frame height is computed with line height but we need text's height (i.e., font height) and both height and width are 0 if it's in quirks mode and in non-empty line.  Therefore, this patch computes it with frame's baseline, font's max-ascent and max-descent.

Although, this patch computes a line breaker rect caused by a open tag of a block level element with block frame's rect. However, it shouldn't be used actually as far as possible.  Following patches will kill the path to the hack.

MozReview-Commit-ID: 9cym04j9NH9

--HG--
extra : rebase_source : 3117d68f056dc69550a16f52adade82049ba8277
2016-08-05 13:36:22 +09:00