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 : 2e68786e09046967f7c6af16fa6b393f133dc12c
This is a regression by "Bug 1121468 - Go to NoActionState after
receiving release on LongTapState."
When receiving a scroll event in LongTapState, i.e. apz starts, we
should call OnScrollStart() and move to the ScrollState.
--HG--
extra : commitid : GsQNnTtqhzh
extra : rebase_source : 0a6ad44a4bf97ed15b374094929df5409deeba41
This makes the state change match the user action. No functionality
changes is expected.
--HG--
extra : commitid : 4MyRasp0lRE
extra : rebase_source : 611819cb3419ffdf76a002d937f3541dc285ef4d
When constructing AccessibleCaretEventHub, bypass and store the
nsIPresShell pointer. This is a preparation for later patches.
Also, remove 'virtual' for Init() and Terminate() since the mock object
in gtest does not need to override them.
--HG--
extra : commitid : 4D5733d5Xr8
extra : rebase_source : ff934904a6144a3408746574a5534ab44731192d
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout. The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.
CLOSED TREE makes big refactorings like this a piece of cake.
# The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
xargs perl -p -i -e '
s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
s/nsRefPtr ?</RefPtr</g; # handle declarations and variables
'
# Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h
# Handle nsRefPtr.h itself, a couple places that define constructors
# from nsRefPtr, and code generators specially. We do this here, rather
# than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
# things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
mfbt/nsRefPtr.h \
xpcom/glue/nsCOMPtr.h \
xpcom/base/OwningNonNull.h \
ipc/ipdl/ipdl/lower.py \
ipc/ipdl/ipdl/builtin.py \
dom/bindings/Codegen.py \
python/lldbutils/lldbutils/utils.py
# In our indiscriminate substitution above, we renamed
# nsRefPtrGetterAddRefs, the class behind getter_AddRefs. Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'
if [ -d .git ]; then
git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
Currently, the caret in cursor mode is always hide after scrolling. I
think it's better to restore its appearance if it's logically visible
before scrolling. That is:
1) If the caret is logically visible (Normal or NormalNotShown) before
scrolling, update carets on scroll-end to show the caret again.
2) If the caret is hide due to timeout or blur, it should remain hidden
on scroll-end.
--HG--
extra : transplant_source : %40%2C%95%CB%EDzt%FB%F0CpK%C94TN2%27%2A%A3
All desktop platforms support APZ now. eWheelOperationStart and
eWheelOperationEnd are superseded by AsyncPanZoomStarted and
AsyncPanZoomStopped respectively.
--HG--
extra : commitid : 7jsXCgpWZ7U
extra : rebase_source : 744d17707220ee602a4607239e7bb0d642839da6
In AccessibleCaretEventHub, it is not accurate to use APZ enabled to
determine whether to use long tap injector. On desktop browser, there's
no long tap events even if APZ is enabled. We should use a preference to
control that.
Since it's a fact the APZ on b2g has long tap events, we should use
preference to disable long tap injector so that when long tap events
stop dispatching to AccessibleCaretEventHub, we'll know immediately.
Delete SetUseAsyncPanZoom() usage in gtest since APZ is not related to
scrolling in AccessibleCaretEventHub.
--HG--
extra : commitid : KgAxEFNYaeb
extra : rebase_source : 1f0eb87354be8d97f946ea2b1f2a5425521bcf12
After HideCaret() is called via keyboard event,
OnScrollPositionChanged() still fire another CaretStateChanged event
even if the caret is hidden. We follow OnReflow() to update carets only
when carets are logically visible.
A test case:
1. Type a string on the rocketbar until the text is long enough to scroll.
2. Copy arbitrary string.
3. Tap on rocketbar to show caret, and move it to the end (within 15
seconds timeout)
4. Type a character.
The text selection dialog should not show.
--HG--
extra : transplant_source : %CB%AE%D4%3D%9A%E8vp%E9%90%5C%3Cl%0Ar%19%A2E%2B%B8
We should dispatch CaretStateChanged event in OnReflow() in cursor mode
when the first caret's appearance is NormalNotShown. Otherwise the text
selection dialog won't update its position.
--HG--
extra : transplant_source : TP%06%82Q%E9%A2%11C7%10H%B0B%EA%80%1D%21%2A%CF
SelectionCaret had been hiding carets upon receiving mouse down reason.
In this way, text selection dialog won't show, hide, and show again.
--HG--
extra : transplant_source : %EE%0C%C5%25%E9%00%F4%3D%3C%96%13%D0o%23R%AA%D5x%E5%29
I now think that mLastUpdateCaretMode is an implementation detail. Test
it will make test and implementation coupled.
It's better to call EXPECT_EQ directly in test functions so that the
line number in test result will be accurate when things go wrong.
--HG--
extra : transplant_source : %1C%CF%CF%9B%06%92x%0E%19%F6%B7%82%B1%B7%B3uS%5CA%DF
Add basic gtest to ensure AccessibleCaret and AccessibleCaretManager are
both testable. More tests to come.
Allow -Winconsistent-missing-override warning in gtest since MOCK_METHOD
does not have 'override' keyword. See bug 1169974.
--HG--
extra : commitid : 38ZTtolb0X9
extra : rebase_source : 52b93d89dddc3913dc3acab1f60971f80c009346
This functions is for hiding caret in cursor mode on desktop browser
when receiving NS_WHEEL_WHEEL, which is never used on B2G in production.
On desktop browser, a proper wheel scroll cycle begins by NS_WHEEL_START
and ends by NS_WHEEL_STOP, which was covered by gtest. Move the three
marionette test for TouchCaret only.
--HG--
extra : commitid : KCG4QMsPhdY
extra : rebase_source : b33ca79699cfffe33da1890aed10935fa7565e1c
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
The bulk of this commit was generated by running:
run-clang-tidy.py \
-checks='-*,llvm-namespace-comment' \
-header-filter=^/.../mozilla-central/.* \
-fix