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

84 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin c508a968ca Bug 1612983 - Disable APZ only when AccessibleCaret's position is changed. r=botond
`mIsCaretPositionChanged` is used in `UpdateShouldDisableApz()` to
determine whether to disable APZ during scrolling or pinch-zooming.

Suppose the selection is on position:static elements. When
pinch-zooming, the zoom level is changed, but the position is not. We
split `PositionChangedResult::Changed` into two separate states, and set
`mIsCaretPositionChanged` only when the position is changed.

Differential Revision: https://phabricator.services.mozilla.com/D61516

--HG--
extra : moz-landing-system : lando
2020-02-07 22:31:40 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Jean-Yves Avenard 022c57caf3 Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

Differential Revision: https://phabricator.services.mozilla.com/D31468

--HG--
extra : moz-landing-system : lando
2019-05-26 14:31:53 +00:00
Gurzau Raul 967bc2a754 Backed out 31 changesets (bug 1552643, bug 1550422) for xpcshell crash on a CLOSED TREE.
Backed out changeset e30c1aa75529 (bug 1552643)
Backed out changeset caadcd7e02d3 (bug 1552643)
Backed out changeset aa7086ab09be (bug 1552643)
Backed out changeset 0b4029671710 (bug 1550422)
Backed out changeset a16295296035 (bug 1550422)
Backed out changeset 3b70307c0db5 (bug 1550422)
Backed out changeset 69df7818d4a3 (bug 1550422)
Backed out changeset d98dfc565927 (bug 1550422)
Backed out changeset 6f0997976944 (bug 1550422)
Backed out changeset 0edd264464c2 (bug 1550422)
Backed out changeset 9ea6da7a74ec (bug 1550422)
Backed out changeset f855f9309c8b (bug 1550422)
Backed out changeset 1033546224a7 (bug 1550422)
Backed out changeset ade7384c6186 (bug 1550422)
Backed out changeset 75b04de7e99c (bug 1550422)
Backed out changeset 91c3acdb2454 (bug 1550422)
Backed out changeset 77d2f80257d1 (bug 1550422)
Backed out changeset e0cd10d35327 (bug 1550422)
Backed out changeset 097091082423 (bug 1550422)
Backed out changeset 2f328853c1ab (bug 1550422)
Backed out changeset f92f2cc29cb1 (bug 1550422)
Backed out changeset 6dc82f88333d (bug 1550422)
Backed out changeset c20f66494d69 (bug 1550422)
Backed out changeset 2ba22cddeb6f (bug 1550422)
Backed out changeset 3aa72f89e295 (bug 1550422)
Backed out changeset ab4c4e806977 (bug 1550422)
Backed out changeset 72e5de040dda (bug 1550422)
Backed out changeset 7d3c2d486706 (bug 1550422)
Backed out changeset 132e0b8d8468 (bug 1550422)
Backed out changeset 54c85ac75dd0 (bug 1550422)
Backed out changeset d7ba4a18dd54 (bug 1550422)
2019-05-25 09:07:49 +03:00
Jean-Yves Avenard 074aea57fe Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

Differential Revision: https://phabricator.services.mozilla.com/D31468

--HG--
extra : moz-landing-system : lando
2019-05-24 11:37:50 +00:00
Gurzau Raul 74c555539e Backed out 28 changesets (bug 1550422) for marionette AssertionError and failing browser_policy_hardware_acceleration.js on a CLOSED TREE.
Backed out changeset 5dd10a365ba9 (bug 1550422)
Backed out changeset 529f5be01ab9 (bug 1550422)
Backed out changeset b6861d3badf8 (bug 1550422)
Backed out changeset 059cff1a3dde (bug 1550422)
Backed out changeset 6ada1116b241 (bug 1550422)
Backed out changeset ca67e8e45262 (bug 1550422)
Backed out changeset a1961a51ae44 (bug 1550422)
Backed out changeset 1c90b9cb3ad4 (bug 1550422)
Backed out changeset 285fa46e4f26 (bug 1550422)
Backed out changeset e2938a444234 (bug 1550422)
Backed out changeset 7a930fc51125 (bug 1550422)
Backed out changeset 898ed02804fe (bug 1550422)
Backed out changeset e1b7abc99ae9 (bug 1550422)
Backed out changeset f781d415cef6 (bug 1550422)
Backed out changeset 2fef10a7cce5 (bug 1550422)
Backed out changeset ea64b4d8d4ff (bug 1550422)
Backed out changeset 86a8ba1b755c (bug 1550422)
Backed out changeset 9c0c9e80f309 (bug 1550422)
Backed out changeset 10c153ddbaea (bug 1550422)
Backed out changeset 60fe635ec2c9 (bug 1550422)
Backed out changeset a38796266b28 (bug 1550422)
Backed out changeset 2db647dcdf1c (bug 1550422)
Backed out changeset 952ddac02972 (bug 1550422)
Backed out changeset ba46b53643ec (bug 1550422)
Backed out changeset ca47ef6c59f7 (bug 1550422)
Backed out changeset f45f471a1a40 (bug 1550422)
Backed out changeset 371b4da5b771 (bug 1550422)
Backed out changeset 02fc78890032 (bug 1550422)
2019-05-23 05:59:44 +03:00
Jean-Yves Avenard d59781ac33 Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

Differential Revision: https://phabricator.services.mozilla.com/D31468

--HG--
extra : moz-landing-system : lando
2019-05-22 12:46:30 +00:00
Srujana Peddinti b44e48bff4 Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.

Differential Revision: https://phabricator.services.mozilla.com/D25325

--HG--
extra : moz-landing-system : lando
2019-04-21 20:13:34 +00:00
Srujana Peddinti 5f185eb5aa Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::button to WidgetMouseEventBase::mButton. r=masayuki
Renamed all class member instances from WidgetMouseEventBase::button to WidgetMouseEventBase::mButton.

Differential Revision: https://phabricator.services.mozilla.com/D25309

--HG--
extra : moz-landing-system : lando
2019-04-21 18:17:10 +00:00
Ting-Yu Lin e09e7702e0 Bug 1545230 - Enable AccessibleCaret gtests on Android. r=dholbert
These gtests are designed under the default preferences in mind. On
Android, some of the preferences have different values, so we need to
set them back to default value at the beginning of the tests so they
don't fail on Android.

Differential Revision: https://phabricator.services.mozilla.com/D28268

--HG--
extra : moz-landing-system : lando
2019-04-20 20:27:32 +00:00
Geoff Brown 8d88b9a596 Bug 1318091 - Disable failing android gtests; r=bc
Disable gtests observed to fail on Android. Some of these are simple build
failures and failures due to file permissions or paths, while other failures
are more obscure.
Once Android gtests are running on mozilla-central, I will file follow-up
bugs inviting teams to investigate the failures and re-enable Android gtests
that are important to them.

Differential Revision: https://phabricator.services.mozilla.com/D26606

--HG--
extra : moz-landing-system : lando
2019-04-08 20:58:21 +00:00
Boris Zbarsky 5bf2e408e6 Bug 1534608. MOZ_CAN_RUN_SCRIPT should disallow non-stack refptr arguments. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23217

--HG--
extra : moz-landing-system : lando
2019-03-13 00:30:11 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Steve Fink b5b78d5525 Bug 1321014 - Respect MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS for the purpose of identifying GC types and pointers, r=jonco
--HG--
extra : topic : hazard
extra : rebase_source : bdaf0ae60a6b45c9d44294aa9c2bc31a8811bdbd
extra : source : c7b32ffa822e353b5479b6224194e3cdfd135e65
2018-07-20 18:36:20 -07:00
Ting-Yu Lin b5d9e05828 Bug 1485063 Part 4 - Move preferences used in AccessibleCaretManager to StaticPrefList.h r=mats
Differential Revision: https://phabricator.services.mozilla.com/D5474

--HG--
extra : moz-landing-system : lando
2018-09-21 21:59:52 +00:00
Ryan VanderMeulen 649c54f993 Backed out 4 changesets (bug 1485063) for breaking text selection on Android (bug 1490818).
Backed out changeset 8ad3af468d26 (bug 1485063)
Backed out changeset 8f53e771094d (bug 1485063)
Backed out changeset 99456cff7313 (bug 1485063)
Backed out changeset d43869851540 (bug 1485063)
2018-09-13 10:21:46 -04:00
Ting-Yu Lin 6ab0f8df35 Bug 1485063 Part 4 - Move preferences used in AccessibleCaretManager to StaticPrefList.h. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D5474
2018-09-11 14:21:42 -07:00
Ting-Yu Lin 6f4a25f896 Bug 1347048 - Remove AccessibleCaret's selection bar support. r=mats
This UI feature was used by B2G only.

Differential Revision: https://phabricator.services.mozilla.com/D4040

--HG--
extra : moz-landing-system : lando
2018-08-31 13:51:51 +00:00
Masayuki Nakano 9c349ade9b Bug 1487591 - Make Selection treat AccessibleCaretEventHub as concrete class rather than nsISelectionListener r=smaug
AccessibleCaretEventHub is an nsISelectionListener of Selection whose type is
"normal".  This is added only when nsFrameSelection::Init() is called and
accessible caret is enabled.  Additionally, nsFrameSelection::Init() is
always called immediately after creating nsFrameSelection.

Therefore, when AccessibleCaretEventHub is installed to Selection, this is
always second selection listener and won't be installed multiple times.  So,
Selection can store pointer of AccessibleCaretEventHub directly only when
it's enabled and the Selection needs to notify it of selection change.

This patch makes Selection stores AccessibleCaretEventHub with RefPtr, then,
makes Selection::NotifySelectionListeners() call its OnSelectionChange()
immediately after AutoCopyListener.

Unfortunately, this patch includes making of MOZ_CAN_RUN_SCRIPT_BOUNDARY and
MOZ_CAN_RUN_SCRIPT a lot since some methods of AccessibleCaretEventHub are
marked as MOZ_CAN_RUN_SCRIPT and including AccessibleCaretEventHub.h into
Selection.h causes compile the compile errors.

Differential Revision: https://phabricator.services.mozilla.com/D4733

--HG--
extra : moz-landing-system : lando
2018-08-31 21:19:44 +00:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

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

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

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

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Ting-Yu Lin b8ed325fb0 Bug 1347049 - Remove the ability to hide AccessibleCaret when scrolling. r=mats
This feature is B2G only. Remove it to make AccessibleCaret simpler to
maintain.

MozReview-Commit-ID: 7JZw5XtaUeU

--HG--
extra : rebase_source : aba249d361723feeaf769a3b802564dbcd6ca9ea
2018-04-04 15:45:52 +08:00
Emilio Cobos Álvarez a4486328c8 Bug 1433671: Add MOZ_CAN_RUN_SCRIPT annotations to AccessibleCaret and other stuff. r=bz
MozReview-Commit-ID: Js0CF7WQM73
2018-03-14 23:32:22 +01:00
Chris Peterson 73675ec9f2 Bug 1443402 - Fix some -Wmissing-prototypes warnings in layout. r=dholbert
-Wmissing-prototypes is a new optional warning available in clang ToT. It warns about global functions that have no previous function declaration (e.g. from an #included header file). These functions can probably be made static (allowing the compiler to better optimize them) or they may be unused.

Confusingly, clang's -Wmissing-prototypes is equivalent to gcc's -Wmissing-declarations, not gcc's -Wmissing-prototypes. A function prototype is a function declaration that specifies the function's argument types. C++ requires that all function declarations specify their argument types, but C does not. As such, gcc's -Wmissing-prototypes is a C-only warning about C functions that have no previous function *prototypes* (with argument types), even if a previous function *declaration* (without argument types) was seen.

MozReview-Commit-ID: FGKVLzeQ2oK

--HG--
extra : rebase_source : 81e62163bf41a5d5dd87abf5397e6e8c62ed4096
extra : source : 653a9fc279e2f6a6d066474a94a70d65ac703d6b
2018-02-22 21:03:45 -08:00
Ting-Yu Lin 4415223066 Bug 1432017 - Remove AccessibleCaretEventHub::PostScrollState. r=mats
In the era of B2G, we wanted to hide the carets during scrolling, and
PostScrollState was designed to avoid carets flicking during momentum
scrolling.

These days, we no longer hide carets during scrolling, so PostScrollState
can be removed to make the code simpler and easier to maintain.

MozReview-Commit-ID: Bf6ZgYVlt1q

--HG--
extra : rebase_source : 272bf91b8acaae6d81a3291b6ad85703ff2696dc
2018-02-23 22:05:49 +08:00
Emilio Cobos Álvarez 1528ebee1c Backout changeset 5ca278d8c1af (Bug 1433671) for not handling all callers in all platforms. r=backout
This reverts commit 795018bb21eb9fa906128d0a15cf773643878585.
2018-01-30 12:17:04 +01:00
Emilio Cobos Álvarez b0b4e4a39a Bug 1433671: Add MOZ_CAN_RUN_SCRIPT annotations to AccessibleCaret. r=bz
MozReview-Commit-ID: Js0CF7WQM73
2018-01-30 11:50:35 +01:00
Emilio Cobos Álvarez 9af8f870d0 Bug 1433671: Make AccessibleCaretManager flushes a bit more sound. r=TYLin
The accessible caret manager is owned by the event hub, that is owned by the
shell.

All the callers of methods that call FlushLayout on the AccessibleCaretManager
should hold an external reference to the event hub.

Flushing pending notifications can run arbitrary script, that can call Destroy()
on the pres shell (and thus tear down the accessible caret event hub, and the
manager with him).

I don't know why before my change this wasn't crashing badly, but the code as it
was just doesn't look sound to me at all either (maybe I'm misunderstanding
something and I should just revert that patch and give up on having nice
invariants during our flushes..., but I don't think it's the case).

This also adds some sanity-checking that we don't die under our flush.

MozReview-Commit-ID: 4s0UT0fD3TI
2018-01-30 11:50:32 +01:00
Sylvestre Ledru 4591d82b23 Bug 1394734 - Replace CONFIG['CLANG*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: HbF5oT5HW6f

--HG--
extra : rebase_source : eca479b6ae4bff7f600d1cdb39e11ac2057e4e79
2017-12-07 22:09:38 +01:00
Ting-Yu Lin b184c78625 Bug 1417796 - Mark virtual methods 'override' r=mtseng
Fix warning: annotate this function with 'override' or (rarely) 'final'

MozReview-Commit-ID: GovhMo2V2q5

--HG--
extra : rebase_source : eb901d9771f7d1d1221d075f236d9b894a6d257d
2017-11-16 14:31:57 +08:00
Ting-Yu Lin 5be3fdc284 Bug 1417796 - Remove 'virtual' qualifiers for 'override' methods. r=mtseng
Fix warning: 'virtual' is redundant since the function is already declared
'override'

MozReview-Commit-ID: Kps9ZZoFniI

--HG--
extra : rebase_source : aed811d199ed9d977648656ef9175ccac26206b8
2017-11-16 13:59:48 +08:00
Astley Chen 4126cab5bb Bug 1355752 - Remove B2G wording in AccessibleCaret. r=TYLin
MozReview-Commit-ID: JOv2caZc8J0

--HG--
extra : rebase_source : 48a14052cc8dc0b3f7054465cec81ae322a59899
2017-04-20 13:16:42 +08:00
Ting-Yu Lin 7bd47fa30a Bug 1273045 Part 2 - Update carets when scrolling in subframes without APZ. r=mtseng
Override OnScrollPositionChanged() in ScrollState because we want to update
carets during scrolling in subframes without APZ.

Due to the observation in bug 1273045 comment 8, we do not distinguish
PositionChangedResult::NotChanged and PositionChangedResult::Changed.
Instead, we always update caret even if its position is not changed.

To avoid excessive CaretStateChangedEvents are dispatched in
OnScrollPositionChanged(), we add IsScrollStarted to distinguish whether
OnScrollStart() is called or not.

MozReview-Commit-ID: KNi9Mct4dSk

--HG--
extra : rebase_source : 61d29fb0e1b6b91971217d3f45a791c456fa4f07
2017-03-14 17:50:03 +08:00
Ting-Yu Lin 723732ff7f Bug 1336388 - Use overlapping tilt mechanism in always tilt mode. r=mtseng
MozReview-Commit-ID: LwWnAbHiTBH

--HG--
extra : rebase_source : fb71526b2205edcaa40c5f6d2ace863ad7831a2a
2017-02-08 15:51:28 +08:00
Ting-Yu Lin 1ef637a036 Bug 1292904 Part 3 - Use only caret image for touch area if event is a mouse type. r=mtseng
That is, exclude the text overlay to fix the double clicking and triple
clicking on a word in editable text area.

MozReview-Commit-ID: 5bELcNSRo2A

--HG--
extra : rebase_source : 4664e186b13b3170022c0fe294f580cd15650271
2016-08-14 21:39:30 +08:00
Kartikaya Gupta ea0f7627b9 Bug 1195722 - On desktop, allow the context menu to pop up concurrently with text selection. r=tylin
On desktop, the context menu is shown when the user lifts their finger after
a long press, but only if the eMouseLongTap event is not cancelled. So by
not cancelling it, we allow both the text selection and the context menu.

On Android, the context menu takes priority over text selection, so this
has no effect (i.e. if the context menu is shown, then the AccessibleCaret
code never even gets the eMouseLongTap event). Also on Android nothing
else relies on the cancellation of the eMouseLongTap event, so this change
is a no-op.

MozReview-Commit-ID: peFzB2afha
2016-08-03 12:00:19 -04:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Ting-Yu Lin bcbf8175b8 Bug 1249201 Part 2 - Show carets continuously when panning or zooming. r=mats,sebastian
Add a pref "layout.accessiblecaret.always_show_when_scrolling" defaults
to true on all platforms except b2g. When it is set to false, the carets
will be hidden during scrolling, which is the current behavior before
applying this change.

The pref "layout.accessiblecaret.extendedvisibility" was added for
Fennec to keep ActionBar open when carets temporarily hiding during
panning or zooming. Now we make carets always show by default, so the
pref can be removed. However, the floating toolbar still need to be
notified when the scrolling begins, so we dispatch "scroll" instead.

In gtest, the preference changes were in the middle of the test
function. To make the preference change clearer, I add new pref changes
or move the existing ones to the beginning of the test functions.

The 250ms transition effect added in ua.css is per request of UX
designer in bug 1249201 comment 12.

MozReview-Commit-ID: 8NGvDLPbtNY

--HG--
extra : rebase_source : 3f7a9ebdf4c70b0282dbf9e8f18cbe5cca656dbe
2016-04-21 16:53:40 +08:00
Masayuki Nakano cbe8f5268a Bug 1259656 part.1 Rename WidgetEvent::refPoint to WidgetEvent::mRefPoint r=smaug
MozReview-Commit-ID: ESWM5ZyBpSR

--HG--
extra : rebase_source : c5e1e3f60bcdde2a7f6c399e72430b29a3e552cd
2016-04-18 23:09:02 +09:00
Masayuki Nakano 57445d0047 Bug 1259668 Rename WidgetTouchEvent::touches to WidgetTouchEvent::mTouches r=smaug
MozReview-Commit-ID: FLbows8davI

--HG--
extra : rebase_source : b564d09aa76311793a78d80b6c78c91e232edc47
2016-03-30 18:44:28 +09:00
Ting-Yu Lin b063b0cec5 Bug 1097398 Part 2 - Add preferences to make carets always tilt. r=roc
This is to support Firefox Android L style carets assets that the two
carets always look like tilt.

This patch is derived from a WIP patch by Mark Capella
<markcapella@twcny.rr.com>

MozReview-Commit-ID: H3nKLz6HcpM

--HG--
extra : rebase_source : b3a77b0bb8aaea8f010002f54fde075c9d469711
2016-02-16 16:55:28 +08:00
Ting-Yu Lin a423fc51d3 Bug 1251915 - Ignore handling eTouchCancel events. r=roc
In my original design, I treat eTouchCancel to be like eTouchEnd for
ending a caret dragging procedure.

However when pointer events is enabled, it sents an eTouchCancel event
after the eTouchStart event whose primary usage is to be converted to
pointer events, which then cancels the normal caret dragging procedure.

Moreover, when pointer events is disabled, we don't get eTouchCancel
during a normal caret dragging scenario, so we don't really need to
handle eTouchCancel anyway.

MozReview-Commit-ID: GKju2Tp0q3Q

--HG--
extra : rebase_source : 31da189fc5543c7df0d748df004fc67c87f4da7f
2016-02-29 15:51:44 +08:00
Ting-Yu Lin 52bb178c2f Bug 1248847 - Assert AccessibleCaretEventHub mRefCnt > 1 in all its entry points. r=mats
Also I removed the 'explicit' keywords from the constructor since they have no
argument so nothing can be implicited converted to them.

MozReview-Commit-ID: GrFcqO0Uf1o

--HG--
extra : rebase_source : 5994787b7feccf409db1faf6359676b5170ea203
extra : source : a27cd3e26cc146006db501efb86b54b097f28b57
2016-02-19 18:21:16 +08:00
Carsten "Tomcat" Book 1fec837eb9 Backed out changeset a27cd3e26cc1 (bug 1248847) for bustage 2016-02-19 09:38:59 +01:00
Ting-Yu Lin 4a4798d88b Bug 1248847 - Assert AccessibleCaretEventHub mRefCnt > 1 in all its entry points. r=mats
Also I removed the 'explicit' keywords from the constructor since they have no
argument so nothing can be implicited converted to them.

MozReview-Commit-ID: GrFcqO0Uf1o

--HG--
extra : rebase_source : c4747c5e3ea09ddfc08bfc1b0c8e4bcedb1d75ce
extra : amend_source : 6289aaff79b22956b72956734e4d99bdd3b7977d
2016-02-18 18:38:44 +08:00
Ting-Yu Lin 9410058023 Bug 1246918 - Handle PresShell gone after FlushLayout(). r=roc
After calling FlushLayout(), PresShell::Destroy() might be called and we
should consider PresShell and other resources will be no longer valid.

Before this patch, AccessibleCaretManager and AccessibleCaret(s) are
deallocated in PresShell::Destroy(). However FlushLayout() are all
invoked in AccessibleCaretManager, we need to keep manager alive to
clean up after PresShell::Destroy().

This patch makes AccessibleCaretManager live after PresShell::Destroy(),
and use IsTerminated() to check whether PreShell is vaild after each
FlushLayout() calls.

Note that event though AccessibleCaretEventHub will be unref in
PresShell::Destroy(), all the callers to AccessibleCaretEventHub's
public methods already add a ref to AccessibleCaretEventHub. So we don't
need to worry about AccessibleCaretEventHub and AccessibleCaretManager
die immediately after PresShell::Destroy().

MozReview-Commit-ID: DDpXZ7v3zyo

--HG--
extra : rebase_source : 280e2512fb9f28d933f5b8d65a9f303ac81c58e5
extra : source : 10e71da98b144fbf42aaa81a1056910a3766a6cb
2016-02-15 15:12:35 +08:00
Ting-Yu Lin 860487f7f6 Bug 1246918 - Fix carets missing after scrolling down in selection mode on Fennec. r=roc
Fennec enables sCaretsExtendedVisibility which uses
Appearance::NormalNotShown instead of Appearance::None to keep actionbar
shown during scrolling. This breaks selection mode update when the
positions of the carets are not changed after scrolling.

To fix this, we need to implement appearance recovering for selection
mode scrolling like we did for cursor mode in bug 1212732, and make
UpdateCaretsForSelectionMode() respects UpdateCaretsHint.

MozReview-Commit-ID: LkfUIGKHL0h

--HG--
extra : rebase_source : 0ef8d28ce55c3ddd29ea32ee6888ee7fe14c34ad
extra : source : bc3e37b63defca87d0de165fe167ef7f8a7db651
2016-02-11 16:22:57 +08:00
Carsten "Tomcat" Book 436f1bf747 Backed out changeset bc3e37b63def (bug 1246918) for fix frequent android c1 test failures 2016-02-17 14:35:10 +01:00
Carsten "Tomcat" Book 8cbc76d2fd Backed out changeset 10e71da98b14 (bug 1246918) 2016-02-17 14:34:49 +01:00
Ting-Yu Lin 585b41e8b5 Bug 1246918 - Handle PresShell gone after FlushLayout(). r=roc
After calling FlushLayout(), PresShell::Destroy() might be called and we
should consider PresShell and other resources will be no longer valid.

Before this patch, AccessibleCaretManager and AccessibleCaret(s) are
deallocated in PresShell::Destroy(). However FlushLayout() are all
invoked in AccessibleCaretManager, we need to keep manager alive to
clean up after PresShell::Destroy().

This patch makes AccessibleCaretManager live after PresShell::Destroy(),
and use IsTerminated() to check whether PreShell is vaild after each
FlushLayout() calls.

Note that event though AccessibleCaretEventHub will be unref in
PresShell::Destroy(), all the callers to AccessibleCaretEventHub's
public methods already add a ref to AccessibleCaretEventHub. So we don't
need to worry about AccessibleCaretEventHub and AccessibleCaretManager
die immediately after PresShell::Destroy().

MozReview-Commit-ID: DDpXZ7v3zyo

--HG--
extra : rebase_source : 2698f0313e394b64ff8caacf21493c874510a7ce
2016-02-15 15:12:35 +08:00