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

71 Коммитов

Автор SHA1 Сообщение Дата
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 07b6f24132 Bug 1259657 Rename WidgetGUIEvent::widget to WidgetGUIEvent::mWidget r=smaug
MozReview-Commit-ID: 167PQWJDEHW

--HG--
extra : rebase_source : 6cd44095b9f33e03190972f043087786cbd772f2
2016-04-14 17:03:14 +09:00
Xidorn Quan 60bcaa5c0b Bug 1257121 part 4 - Use return value rather than out param to return font metrics. r=jfkthame
MozReview-Commit-ID: 6xrHYbgHGVd

--HG--
extra : rebase_source : 4d0cea24689588d8a1daa1869502e31ac7c3dc56
2016-03-17 13:55:48 +08:00
Xidorn Quan 8acf32453c Bug 1257121 part 3 - Add GetInflatedFontMetricsForFrame function to simplify a common use pattern. r=jfkthame
MozReview-Commit-ID: 4KMLCz6wQHQ

--HG--
extra : rebase_source : 08964aef3b335163985dd6818b4a6ae3a4e34fce
2016-03-17 12:07:47 +08:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Nicholas Nethercote 26360d6c45 Bug 1239864 (part 9) - Use the new rect iterators in layout/ and ipc/. r=dholbert.
--HG--
extra : rebase_source : d5558c39bd3cfe85ee6f247eea8bab33f2f5027f
2016-01-18 17:20:59 -08:00
dominique vincent 2395f9937f Bug 1190541 - PositionedEventTargeting doesn’t take into account the zoom in/out actions. r=kats
--HG--
extra : commitid : Lv4FDAhPbRF
2016-01-05 23:07:49 -05:00
Nicholas Nethercote 3ba02d7a9b Bug 1232852 (part 3) - Remove unused parameters from some accessibility code. r=tbsaunde.
--HG--
extra : rebase_source : 7cdef8244e2b44b89e8061f66d45d40cbf245041
2015-12-15 21:24:06 -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
dominique vincent 5ae3c65766 Bug 1208370 - Deactivate the size heuristic in cluster detection. r=mcomella
--HG--
extra : commitid : 6PHrtUzoaU5
extra : rebase_source : fd90c4652af704f40deaa6dba2e4d34360d02578
2015-09-30 12:31:29 +02:00
dominique vincent 599e8238ff Bug 1191041 - Increase the likelihood of zoomed view triggering for small elements but decreased the likelihood for large elements. r=kats 2015-08-28 22:54:41 +02:00
dominique vincent e32719478d Bug 1192075 - Change copy in Settings for Zoomed View/ magnifying glass preference. r=mcomella
--HG--
extra : source : e32341309d701cb6fb360accd3afe937be10ba20
2015-08-20 13:44:18 -07:00
Wes Kocher a7cefecb3e Backed out changeset e32341309d70 (bug 1992075) for landing with the wrong bug number
--HG--
extra : amend_source : be5b170b5b8030a856b2873846bc6f0c447f93f3
2015-08-20 13:50:27 -07:00
dominique vincent df8503e81a Bug 1992075 - Change copy in Settings for Zoomed View/ magnifying glass preference. r=mcomella 2015-08-20 13:44:18 -07:00
Kartikaya Gupta 36f86db358 Bug 1191277 - Ensure that we don't find clusters of clickable elements when there is no possible way for the heuristic to actually target those elements. r=domivinc
--HG--
extra : commitid : BcmblW2Avbd
2015-08-15 11:15:29 -04:00
dominique vincent 39f0f8b5d2 Bug 1188185 - Zoomed View appears when the two links are the same link. r=kats 2015-07-31 15:22:46 +02:00
Kartikaya Gupta 1e93086521 Bug 1181763 - Allow the target fluffing code to fluff even when directly hitting something clickable. r=roc
There is a common pattern on the web where a click listener is registered on a
container element high up in the DOM tree, and based on the target of the click
events, it performs the appropriate action. In such cases, our existing fluffing
code was not getting activated anywhere inside the container, because the entire
container was considered clickable. However, this is not user-friendly because
often the actual targets inside the container are small and hard to hit. Also,
the fluffing code will often take the container element itself as the target,
even if the user actually hit something inside the container.

This patch changes this behaviour so when an event hits inside a clickable
container, fluffing still occurs, but is restricted to DOM descendants of the
container. This allows fluffing to work in the above scenarios, and since the
events will bubble up to the container, the listeners on the container are
guaranteed to still trigger.
2015-07-17 08:36:00 -04:00
Ryan VanderMeulen 7034fc6976 Backed out changeset ec3acc5237a8 (bug 1181763) for WinXP test_event_target_radius.html failures.
CLOSED TREE
2015-07-17 10:46:31 -04:00
Kartikaya Gupta e3c8c5a562 Bug 1181763 - Allow the target fluffing code to fluff even when directly hitting something clickable. r=roc
There is a common pattern on the web where a click listener is registered on a
container element high up in the DOM tree, and based on the target of the click
events, it performs the appropriate action. In such cases, our existing fluffing
code was not getting activated anywhere inside the container, because the entire
container was considered clickable. However, this is not user-friendly because
often the actual targets inside the container are small and hard to hit. Also,
the fluffing code will often take the container element itself as the target,
even if the user actually hit something inside the container.

This patch changes this behaviour so when an event hits inside a clickable
container, fluffing still occurs, but is restricted to DOM descendants of the
container. This allows fluffing to work in the above scenarios, and since the
events will bubble up to the container, the listeners on the container are
guaranteed to still trigger.
2015-07-17 08:36:00 -04:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
dominique vincent 6edc702182 Bug 1176453 - Do not increment the cluster counter for input elements with label. r=kats 2015-07-02 21:16:25 +02:00
dominique vincent a67b660b65 Bug 1172488 - Small clickable text nodes are wrongly detected in cluster detection process. r=kats 2015-06-12 22:05:21 +02:00
dominique vincent 87099b21d2 Bug 1171731 - Ignore elements with 0 font size in cluster detection. r=kats 2015-06-05 16:25:16 +02:00
dominique vincent 678e6dea01 Bug 1165128 - Enable zoomedview by default. r=mcomella 2015-05-15 22:20:12 +02:00
Botond Ballo 2eb9751320 Bug 1139675 - Simplify the APIs for getting and setting the pres shell resolution. r=mstange,mattwoodrow
--HG--
extra : rebase_source : 18444e5f9304bbf9c2c14903be6aa4ebf8a08af3
extra : source : 60fe56e752d984a8d074af1bec1dfcd40a41e5f6
2015-03-06 18:07:59 -05:00
Andrea Marchesini e09c883eef Bug 1134280 - Get rid of Tag() - patch 2.6 - layout/base and layout/form - Fix all the occurrences, m=smaug, r=surkov 2015-03-03 11:09:00 +00:00
Andrea Marchesini 2c4f63331f Bug 1134280 - Get rid of Tag() - patch 1 - Is{HTML,XUL,MathML,SVG}Element and IsAnyOf{HTML,XUL,MathML,SVG}Elements, r=smaug 2015-03-03 11:08:59 +00:00
dominique vincent ef75e137d9 Bug 1126989 - Detect not readable links to pop up the zoomed view. r=kats, r=mcomella 2015-02-07 12:17:12 +01:00
David Zbarsky c73ec42d2d Bug 1125040: Use LayoutDeviceIntPoint for nsIWidget::WidgetToScreen r=botond 2015-02-04 15:21:03 -05:00
dominique vincent d15b47438e Bug 663803 - Add hitCluster flag to detect touch in cluster links area r=smaug,kats 2014-11-24 15:33:06 +01:00
Kartikaya Gupta 371ecd8746 Bug 1093686 - Add some debug logging code for PositionedEventTargeting.cpp. r=roc 2014-11-06 08:05:51 -05:00
Kartikaya Gupta 6afff5ec62 Bug 1093686 - Ignore body-level touch/mouse listeners when assessing element clickability. r=roc
When walking up the content tree to assess if an element is contained inside a
clickable element, we should stop before hitting the body element. This is a
heuristic based on pages in the wild, because a lot of pages have mouse/touch
listeners on the body. Without this patch all elements end up getting treated
as clickable which makes the event retargeting code useless.
2014-11-06 08:05:51 -05:00
Kartikaya Gupta 7644286079 Bug 1078029 - Add code to reposition input event coordinates into the target frame. r=roc
The PositionedEventTargeting code allows input events to be dispatched to a
target not directly under the input event point. However, the coordinates of the
input event can then end up outside the bounding rect of the event target. This
state is generally unexpected by web content and may cause compatibility issues.
Fennec's front-end code used to deal with this by repositioning the input event
coordinates to be inside the bounding rect; now that Fennec is using the shared
C++ code we need to have that code here. This behaviour is guarded by a pref and
disabled by default (but enabled on Fennec).
2014-11-04 09:52:16 -05:00
Kartikaya Gupta ec83bae817 Bug 1092139 - Make the PositionedEventTargeting code respect the flag to ignore root scroll frames. r=roc
The ignore-root-scroll-frame flag is used on mobile platforms in order to allow
hit-testing outside the viewport area. This is needed because the user can zoom
out and make visible an area larger than the viewport (i.e. the displayport) but
layout generally restricts hit-testing to the viewport. The code to retarget
events to nearby clickable elements also needs to respect this flag, otherwise
the retargeting fails to work outside the viewport area.
2014-11-03 09:43:52 -05:00
Masayuki Nakano fbbc8bd11e Bug 1046101 part.18 Rename NS_TOUCH_EVENT to eTouchEventClass r=smaug 2014-08-04 14:28:53 +09:00
Masayuki Nakano 5a96c29b49 Bug 1046101 part.11 Rename NS_MOUSE_EVENT to eMouseEventClass r=smaug 2014-08-04 14:28:50 +09:00
Masayuki Nakano 00f048e7cd Bug 1046101 part.1 Rename nsEventStructType to mozilla::EventClassID r=smaug 2014-08-04 14:28:46 +09:00
Masayuki Nakano 3cc4e99fc0 Bug 989212 Rename nsEventStates to mozilla::EventStates r=smaug
--HG--
rename : dom/events/nsEventStates.h => dom/events/EventStates.h
2014-04-03 13:18:36 +09:00
Masayuki Nakano fbf7cdeb19 Bug 981261 part.5 Rename nsEventListenerManager to mozilla::EventListenerManager r=smaug
--HG--
rename : dom/events/nsEventListenerManager.cpp => dom/events/EventListenerManager.cpp
rename : dom/events/nsEventListenerManager.h => dom/events/EventListenerManager.h
2014-03-17 15:56:53 +09:00
Ryan VanderMeulen 462dd28f4a Bug 981651 - Remove unused presShell variable to fix Werror bustage. r=kats
CLOSED TREE
2014-03-11 11:35:32 -04:00
Kartikaya Gupta 88038d24ec Bug 981651 - Don't scale the touch radius up by the resolution amount since it is usually canceled by layer transforms. r=roc 2014-03-11 11:14:51 -04:00
Etienne Segonzac 3b5a19f7a3 Bug 961776 - Add role=key to the event fluffing heuristics. r=roc 2014-02-26 09:03:32 -05:00
"Kan-Ru Chen (陳侃如)" caedc4da28 Bug 950225 - Restrict event fluffing in visible area with test case. r=roc 2014-01-29 21:54:25 +08:00
Phil Ringnalda 81b53bd666 Back out 7bfec63e417b (bug 950225) for test failures
CLOSED TREE
2014-01-27 23:12:54 -08:00
"Kan-Ru Chen (陳侃如)" 4c775f81e5 Bug 950225 - Restrict event fluffing in visible area with test case. r=roc 2014-01-28 11:37:36 +08:00
Alexandre Lissy e84165be73 Bug 921928 - Make <iframe mozbrower remote> a preferred target when fluffing r=roc
In bug 921928, the user places a call and then tries to do other actions
(calls, SMS, contacts, ...) with actions very close to the attention
screen. When trying to do those other actions, event fluffing is
prioritizing the attention screen rather than user apps.
---
 layout/base/PositionedEventTargeting.cpp           |  10 ++
 layout/base/tests/Makefile.in                      |   2 +
 .../bug921928_event_target_iframe_apps_oop.html    |   8 +
 .../base/tests/test_event_target_iframe_oop.html   | 178 +++++++++++++++++++++
 4 files changed, 198 insertions(+)
 create mode 100644 layout/base/tests/bug921928_event_target_iframe_apps_oop.html
 create mode 100644 layout/base/tests/test_event_target_iframe_oop.html
2013-10-28 11:38:03 -07:00
Kyle Huey 9ab68d6b69 Bug 915757: Split GetListenerManager into two functions for more const-correctness. r=smaug 2013-10-23 07:32:04 +08:00
Masayuki Nakano c2d6606a1c Bug 920425 part.28 Use mozilla::WidgetEvent::AsMouseEvent() r=smaug 2013-10-22 17:55:20 +09:00