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

15 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin 3b594c3216 Bug 1298704 - Use flag to avoid calling AccessibleCaretEventHub::Reflow() recursively. r=mats
MozReview-Commit-ID: Jkf7sSqxG2d

--HG--
extra : rebase_source : f606f09e9fe88bde39f73690771cdde091f1b8c8
2016-08-29 15:36:45 +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
Ting-Yu Lin 6346d9e755 Bug 1293950 - Update mozilla wiki link in AccessibleCaret headers. r=mtseng
Change only comments so DONTBUILD (NPOTB).

MozReview-Commit-ID: 3UOtYyOxg3

--HG--
extra : rebase_source : 242ed41c006ce13c3f148a4d165f5c64f43b7cbb
2016-08-10 15:46:27 +08:00
Ting-Yu Lin b48a4c37c2 Bug 1225701 - Update comments in AccessibleCaret files. r=mtseng
DONTBUILD NPOTB

--HG--
extra : commitid : LWzB3w73OeN
extra : rebase_source : 4e359bda2a8c005eedf2ebf972182111094e809e
2015-11-18 11:44:00 +08:00
Ting-Yu Lin 3d15f9d1ae Bug 1206545 - Store nsIPresShell pointer in constructor instead of Init(). r=roc
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
2015-11-16 18:16:43 +08:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
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
2015-10-18 01:24:48 -04:00
Ting-Yu Lin 1a9cfec14b Bug 1211365 - Delete wheel event handling. r=mtseng
All desktop platforms support APZ now. eWheelOperationStart and
eWheelOperationEnd are superseded by AsyncPanZoomStarted and
AsyncPanZoomStopped respectively.

--HG--
extra : commitid : 7jsXCgpWZ7U
extra : rebase_source : 744d17707220ee602a4607239e7bb0d642839da6
2015-10-05 16:52:29 +08:00
Ting-Yu Lin 8b2f93bec1 Bug 1211365 - Make deleted functions in class State public. r=mtseng
Compilers might generate better error messages. See Effective Modern C++
item 11.

--HG--
extra : commitid : 7jsXCgpWZ7U
extra : rebase_source : a8102ea161031047e93f4bb68e11e62d32566ef7
2015-10-05 16:52:29 +08:00
Ting-Yu Lin 2c11c71f3b Bug 1211365 - Remove NS_IMPL_STATE_UTILITIES. r=mtseng
This macro was used to implement Name() and Singleton() for state
classes. Instead of enforcing the state class to be a singleton, we can
implement singleton pattern in MOZ_IMPL_STATE_CLASS_GETTER directly.

--HG--
extra : commitid : 7jsXCgpWZ7U
extra : rebase_source : f03530931e3d27e7532022c9c11b834ccea9fc0e
2015-10-05 16:52:29 +08:00
Ting-Yu Lin d7357db411 Bug 1210315 - Use preference to control whether to use long tap injector. r=roc
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
2015-10-02 23:10:29 +08:00
Ting-Yu Lin 903d6e6bff Bug 1194063 - Update link to point to the diagram directly. r=mtseng
--HG--
extra : commitid : 6QKaQjcgR74
2015-08-17 21:22:00 +08:00
Ting-Yu Lin 6bbb4e6fcd Bug 1189353 - Change NS_ macro prefix to MOZ_ in AccessibleCaretEventHub. r=mtseng 2015-07-30 08:07:00 -04:00
Bobby Holley 97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Daniel Holbert c238591c2f Bug 1110039 followup: Add 'override' keyword to Name() decl in AccessibleCaretEventHub's macro NS_IMPL_STATE_UTILITIES. rs=ehsan 2015-05-12 10:00:10 -07:00
Ting-Yu Lin 30e280820a Bug 1110039 - Part 2.4 - Add AccessibleCaretEventHub. r=roc
See AccessibleCaretEventHub.h for the class description.

Both TouchCaret and SelectionCarets have their event handling mechanism,
which lead to a lot of code duplication. Now AccessibleCaretEventHub
serves as the single entry point for all events and callbacks.

We also encountered performance issues in SelectionCarets because many
unnecessary events might be dispatched to Gaia driven by the selection
changed events. SelectionCarets did not have clear internal states to
avoid this. To solve it, AccessibleCaretEventHub implements state
classes, and rely on the current states to call the CopyPasteManager's
handler only when it's needed.

For example, when dragging a caret, we do not interest in
NotifySelectionChanged() for updating the carets. Since we've known a
caret is being dragging, we can call UpdateCarets() directly. Hence
DragCaretState does not override OnSelectionChanged().
2015-05-03 23:37:00 +02:00