Commit Graph

743 Commits

Author SHA1 Message Date
Kartikaya Gupta
927782a371 Bug 1223296 - Clear element activation if a contextmenu is displayed. r=botond 2015-11-13 15:10:52 -05:00
Kartikaya Gupta
272cd4b619 Bug 1223296 - Fire a Gesture:SingleTap message to browser.js even on the C++ APZ codepath. r=rbarker 2015-11-13 15:10:52 -05:00
Kartikaya Gupta
8bbbaa5889 Bug 1223296 - Fire the MozMouseHittest event even if the C++ APZ is enabled. r=rbarker,botond 2015-11-13 15:10:52 -05:00
Kartikaya Gupta
bc9d55c915 Bug 1223296 - Turn HandlePanStart into a more generic function that can be called from other places. r=botond 2015-11-13 15:10:52 -05:00
Timothy Nikkel
54e904ba50 Bug 1223639. Rename ForceInside to MoveInsideAndClamp so it's clearer what it does. r=botond
This has led to confusion at least twice.
2015-11-11 16:38:25 -06:00
Botond Ballo
c16d0046cf Bug 1222661 - Replace ToUntyped(obj) calls with obj.ToUnknown*(). r=nical 2015-11-06 22:13:40 -05:00
Kartikaya Gupta
aff0bd88ad Bug 898075 - Remove the mozbrowserasyncscroll event from Gecko. r=botond,kanru,sicking 2015-11-11 10:17:47 -05:00
Randall Barker
d4aac2b75e Bug 1223440 - Implement NativePanZoomController::setIsLongpressEnabled so long-press detection can be disabled during testing. r=kats 2015-11-10 12:47:48 -05:00
Kartikaya Gupta
b84ed986fc Bug 1174532 - Even if the APZC is not pannable, have a small slop area to consume touchmove events. r=botond 2015-11-09 16:42:34 -05:00
Kevin Wern
d634b1e29f Bug 1199798 - Use more generic tree traversal algorithms in APZCTreeManager. r=botond
Extend the tree traversal algorithms in TreeTraversal.h, and use them
instead of manual loops in APZCTreeManager.

- Create function ForEachNode(), which calls a function on each node
  of a tree. The function must return a TraversalFlag to indicate
  whether the node's children should be visited or skipped.
- Modify DepthFirstSearch() and BreadthFirstSearch() to operate on
  pointers that are not (necessarily) const. This makes them more
  general.
- Refactor functions in APZCTreeManager: Collect, FlushRepaints,
  FlushRepaintsRecursively, FlushPendingRepaint,
  FlushPendingRepaintRecursively, UpdateZoomConstraints,
  UpdateZoomConstraintsRecursively, ClearTree, FindScrollNode.
2015-11-06 12:31:36 -05:00
Benoit Girard
128f7059f8 Bug 1221593 - Don't reset other axis' scroll position during APZ drag. r=kats 2015-11-04 13:00:56 -05:00
Timothy Nikkel
5b874069f1 Bug 1208780. Set a zero-margin displayport on all scrollable ancestors of frames with displayports if they don't already have a displayport. r=botond 2015-11-05 18:57:17 -06:00
Kartikaya Gupta
9859e44130 Bug 1221186 - Don't clobber a fling-snap with a snap-to-where-we-are-now in the overscroll handoff chain. r=botond 2015-11-05 09:31:39 -05:00
Kartikaya Gupta
7134329af8 Bug 1216355 - Ensure that if a repaint request is ignored due to a stale generation number the next repaint request doesn't get dropped. r=botond 2015-11-05 09:31:39 -05:00
Chris Lord
457f3bcd31 Backout ed2fdc36728d (Bug 1177842) for undesirable behaviour. r=botond 2015-11-05 13:58:16 +00:00
Timothy Nikkel
83fa7b1a59 Bug 1215977. Add a flag for GetNearestScrollable that makes fixed pos frames return the root scroll frame of their document. And make APZCCallbackHelper use it to restore previous behaviour. r=botond
We may want to do this for fixed pos frames in all documents (not just root documents). However, this patch only maintains the previous behaviour on purpose.
2015-11-04 19:51:03 -06:00
Kartikaya Gupta
f52fe38d2a Bug 1141127 - When inside a slop area around the first touchstart, prevent touchmove events from going to content. r=botond 2015-11-04 17:09:52 -05:00
Kartikaya Gupta
779ee49536 Bug 1194546 - Ensure that the timeout to allow the transaction to expire waits long enough. r=botond 2015-11-04 14:23:14 -05:00
Kartikaya Gupta
b40e33207a Bug 1194546 - Wait for the layer tree to reach the compositor before starting to scroll. r=botond 2015-11-04 14:21:06 -05:00
Benoit Girard
99ae906cec Bug 1220853 - Notify wheel transaction of mouse move when using async dragging. r=kats 2015-11-03 14:21:35 -05:00
Kartikaya Gupta
1c255c218b Bug 1141884 - Rename ResetInputState and make it only apply to touch events. r=botond
In particular, we want to prevent requesting a snap in the scenario that a wheel
block gets prevent-defaulted. In general the function is really only relevant
for touch input and there's no need to run it for other types of input.
2015-11-03 14:21:40 -05:00
Birunthan Mohanathas
94998cf5fe Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Timothy Nikkel
36beff2b65 Bug 1220004. mozInnerScreenX/Y is in CSS pixels, not device pixels. Fix usage of it in apz test utils. r=botond 2015-11-01 11:45:40 -06:00
Kartikaya Gupta
b9078246e6 Bug 1219898 - Remove use of gPreventMouseEvents in APZ event state-tracking code. r=botond 2015-10-30 22:22:28 -04:00
Benoit Girard
65639b03cf Bug 1211612 - Add DragInputBlock for async scrollbars. r=kats 2015-10-26 16:06:49 -04:00
Benoit Girard
425882c2c0 Bug 1219929 - Fix bad MouseInputData case. r=me 2015-10-29 17:36:05 -04:00
Kartikaya Gupta
f12f90789b Bug 1219391 - Request snapping for the entire handoff chain when ending the fling animation. r=botond 2015-10-28 15:39:13 -04:00
Botond Ballo
c364b92135 Bug 1218618 - Assert that the hit-testing tree's root node doesn't have siblings. r=kats 2015-10-28 15:27:35 -04:00
Kartikaya Gupta
6e308571a4 Bug 1190469 - Request scroll snapping in a few places that animations are cancelled so that we don't leave things unsnapped. r=botond 2015-10-28 14:02:36 -04:00
Kartikaya Gupta
b291337c8d Bug 1190469 - Refactor some code to have a general-purpose snap function available in APZC. r=botond 2015-10-28 14:02:33 -04:00
Kartikaya Gupta
9b95b17f82 Bug 1217818 - Ignore injected touchstart events for the purposes of prevent-default notifications back to APZ. r=botond 2015-10-28 12:53:52 -04:00
Kartikaya Gupta
e64ec1c1ae Bug 1217818 - Add support for the mHandledByAPZ flag on touch events as well. r=botond 2015-10-28 12:53:34 -04:00
Kartikaya Gupta
e73636b6d6 Bug 1217818 - Add some more logging to more easily diagnose issues. r=botond 2015-10-28 12:52:54 -04:00
Kartikaya Gupta
7799e57acb Bug 1217818 - Minor refactoring to reuse a function. r=botond 2015-10-28 12:52:54 -04:00
Chris Lord
e2802f55df Bug 1177842 - Introduce separate friction for fling-snap. r=botond 2015-10-26 18:04:02 +00:00
Botond Ballo
b215ad8a3f Bug 1217251 - In TaskThrottler, dispatch the timeout task correctly from the Java UI thread on Android. r=kats 2015-10-22 16:46:11 -04:00
Botond Ballo
6835e0a78a Bug 1217251 - Add APZThreadUtils::RunDelayedTaskOnCurrentThread(). r=kats 2015-10-22 16:45:26 -04:00
David Anderson
dbb18481e6 Fix scrollbars on subframes not directing APZ events to the correct scrollframe. (bug 1213324, r=tn) 2015-10-20 02:39:34 -07:00
Botond Ballo
1c3d5def4b Bug 1213273 - Use a chromium Task instead of an nsITimer for the timeout in TaskThrottler. r=mstange 2015-10-16 19:00:15 -04:00
Ehsan Akhgari
8c81fdfe34 Bug 1216177 - Remove the remaining nsRefPtr forward declarations; r=froydnj 2015-10-19 12:02:14 -04:00
Chris Peterson
e9ed95a07c Bug 1215892 - Fix clang's -Wimplicit-fallthrough warnings in gfx. r=BenWa
gfx/gl/GLBlitHelper.cpp:395:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels

gfx/layers/apz/src/AsyncPanZoomController.cpp:1087:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
gfx/layers/apz/src/AsyncPanZoomController.cpp:1196:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
gfx/layers/apz/src/GestureEventListener.cpp:411:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
gfx/layers/apz/util/APZEventState.cpp:292:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
gfx/layers/apz/util/APZEventState.cpp:295:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels

widget/GfxInfoBase.cpp:1015:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
2015-10-17 22:57:38 -07:00
Nathan Froyd
e4e2da55c9 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
2015-10-18 01:24:48 -04:00
Nathan Froyd
5254890206 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Botond Ballo
502c35eafe Bug 1211506 - Respect the APZ lock ordering in AsyncPanZoomController::OnScrollWheel(). r=mstange 2015-10-16 16:33:41 -04:00
Ting-Yu Lin
2722c1577e Bug 1214662 - Fix compile error for enabling APZES_LOG. r=botond
I got this error: use of undeclared identifier 'Stringify'. Add the
necessary header.
2015-10-15 10:49:26 +08:00
Markus Stange
733701d783 Bug 1212876 - Fix a bug in UntransformVector and in code that was relying on that bug. r=botond 2015-10-09 12:57:56 +02:00
David Anderson
0011f60b88 Fix inactive scroll frames sometimes creating very large, incorrect hit regions. (bug 1190112, r=tn) 2015-10-07 12:08:53 -07:00
Benoit Girard
49f6bfe259 Bug 1199885 - Part 10: Add APZTeeManager API to start an async scroll. r=kats 2015-09-28 17:00:21 -04:00
Benoit Girard
24d0310d3f Bug 1199885 - Part 9: Let APZC handle the drag events. r=kats 2015-09-28 14:44:37 -04:00
Benoit Girard
2f4adb8867 Bug 1199885 - Part 8: Add FindScrollNode to locate the scrollbar thumb. r=kats 2015-09-28 14:44:37 -04:00