Refactor WebViewImpl::BestTapNode

This patch refactors |WebViewImpl::BestTapNode| to export the
parts of the logic, so that we can use it in the culled inline
code.

|ShowsHandCursor| and part of |FindCursorDefiningAncestor| are
merged into |Node::GetHandCursorType|. It avoids calling
|EventHandler::UsesHandCursor| twice, as it's an expensive
function that traverses the tree up to root.

There should be no behavior changes.

Bug: 1196549
Change-Id: I5fddbef50c15df27b74e4ab42ad033b0c0c5eac6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2810538
Auto-Submit: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#871244}
GitOrigin-RevId: 08d83affbd4dcfc8c470ddcf4806013ddd0ac908
5 files changed
tree: 2238105f6622889d632b37d4294eea8ce307893b
  1. abseil-cpp/
  2. accessibility-audit/
  3. accessibility_test_framework/
  4. afl/
  5. android_build_tools/
  6. android_crazy_linker/
  7. android_data_chart/
  8. android_deps/
  9. android_deps_autorolled/
  10. android_media/
  11. android_opengl/
  12. android_platform/
  13. android_protobuf/
  14. android_protoc/
  15. android_provider/
  16. android_sdk/
  17. android_support_test_runner/
  18. android_swipe_refresh/
  19. android_system_sdk/
  20. androidx/
  21. apache-mac/
  22. apache-portable-runtime/
  23. apache-win32/
  24. apple_apsl/
  25. arcore-android-sdk/
  26. arcore-android-sdk-client/
  27. ashmem/
  28. axe-core/
  29. bazel/
  30. blanketjs/
  31. blink/
  32. boringssl/
  33. bouncycastle/
  34. breakpad/
  35. brotli/
  36. bspatch/
  37. byte_buddy/
  38. ced/
  39. chaijs/
  40. checkstyle/
  41. chromevox/
  42. cld_3/
  43. cldr/
  44. closure_compiler/
  45. colorama/
  46. crashpad/
  47. crc32c/
  48. d3/
  49. dav1d/
  50. decklink/
  51. devscripts/
  52. dom_distiller_js/
  53. dpkg-shlibdeps/
  54. eigen3/
  55. emoji-metadata/
  56. emoji-segmenter/
  57. espresso/
  58. expat/
  59. farmhash/
  60. fdlibm/
  61. feed_library/
  62. fft2d/
  63. flatbuffers/
  64. fontconfig/
  65. fp16/
  66. freetype/
  67. freetype-testing/
  68. fuchsia-sdk/
  69. fusejs/
  70. gemmlowp/
  71. gif_player/
  72. glfw/
  73. google-closure-library/
  74. google-truth/
  75. google_android_play_core/
  76. google_appengine_cloudstorage/
  77. google_benchmark/
  78. google_input_tools/
  79. google_toolbox_for_mac/
  80. google_trust_services/
  81. googletest/
  82. gradle_wrapper/
  83. grpc/
  84. gvr-android-keyboard/
  85. gvr-android-sdk/
  86. hamcrest/
  87. harfbuzz-ng/
  88. highway/
  89. hunspell/
  90. hyphenation-patterns/
  91. iaccessible2/
  92. iccjpeg/
  93. icu4j/
  94. ijar/
  95. ink/
  96. inspector_protocol/
  97. instrumented_libraries/
  98. isimpledom/
  99. jacoco/
  100. javalang/
  101. jdk/
  102. jinja2/
  103. jsoncpp/
  104. jstemplate/
  105. junit/
  106. khronos/
  107. lcov/
  108. leveldatabase/
  109. libaddressinput/
  110. libaom/
  111. libavif/
  112. libbrlapi/
  113. libdrm/
  114. libFuzzer/
  115. libgav1/
  116. libipp/
  117. libjingle_xmpp/
  118. libjxl/
  119. liblouis/
  120. libphonenumber/
  121. libpng/
  122. libprotobuf-mutator/
  123. libsecret/
  124. libsync/
  125. libudev/
  126. liburlpattern/
  127. libusb/
  128. libva_protected_content/
  129. libvpx/
  130. libwebm/
  131. libwebp/
  132. libx11/
  133. libxcb-keysyms/
  134. libxml/
  135. libXNVCtrl/
  136. libxslt/
  137. libzip/
  138. logilab/
  139. lottie/
  140. lzma_sdk/
  141. mako/
  142. markdown/
  143. markupsafe/
  144. material_design_icons/
  145. mesa_headers/
  146. metrics_proto/
  147. microsoft_webauthn/
  148. minigbm/
  149. minizip/
  150. mocha/
  151. mockito/
  152. modp_b64/
  153. motemplate/
  154. mozilla/
  155. nearby/
  156. neon_2_sse/
  157. netty-tcnative/
  158. netty4/
  159. node/
  160. objenesis/
  161. ocmock/
  162. one_euro_filter/
  163. opencv/
  164. openh264/
  165. openscreen/
  166. openxr/
  167. opus/
  168. ots/
  169. ow2_asm/
  170. pexpect/
  171. pffft/
  172. ply/
  173. polymer/
  174. private-join-and-compute/
  175. private_membership/
  176. proguard/
  177. protobuf/
  178. protoc_javalite/
  179. pycoverage/
  180. pyjson5/
  181. pylint/
  182. pystache/
  183. Python-Markdown/
  184. pywebsocket3/
  185. qcms/
  186. quic_trace/
  187. qunit/
  188. r8/
  189. re2/
  190. requests/
  191. rnnoise/
  192. robolectric/
  193. ruy/
  194. s2cellid/
  195. securemessage/
  196. setupdesign/
  197. shaderc/
  198. shell-encryption/
  199. simplejson/
  200. sinonjs/
  201. six/
  202. smhasher/
  203. snappy/
  204. speech-dispatcher/
  205. sqlite/
  206. sqlite4java/
  207. subresource-filter-ruleset/
  208. sudden_motion_sensor/
  209. tcmalloc/
  210. tensorflow-text/
  211. test_fonts/
  212. text-fragments-polyfill/
  213. tflite/
  214. tflite-support/
  215. tint/
  216. tlslite/
  217. turbine/
  218. ub-uiautomator/
  219. ukey2/
  220. unrar/
  221. updater/
  222. usb_ids/
  223. usrsctp/
  224. utf/
  225. v4l-utils/
  226. wayland/
  227. wayland-protocols/
  228. web-animations-js/
  229. webdriver/
  230. webgl/
  231. webgpu-cts/
  232. webpagereplay/
  233. webrtc_overrides/
  234. webxr_test_pages/
  235. weston/
  236. widevine/
  237. win_build_output/
  238. woff2/
  239. wpt_tools/
  240. wtl/
  241. wuffs/
  242. x11proto/
  243. xcbproto/
  244. xstream/
  245. zlib/
  246. zxcvbn-cpp/
  247. .gitignore
  248. BUILD.gn
  249. DEPS
  250. libjpeg.gni
  251. OWNERS
  252. PRESUBMIT.py
  253. README.chromium
  254. README.chromium.template