OSDN Git Service

Use upstream version of ANDROID_HITTEST_WITHSIZE
authorSteve Block <steveblock@google.com>
Thu, 12 Aug 2010 11:11:09 +0000 (12:11 +0100)
committerSteve Block <steveblock@google.com>
Fri, 27 Aug 2010 11:08:54 +0000 (12:08 +0100)
commit08c1068d9fd18289b9812c3d1fbcfccb8dfa3e60
tree469af86f91a7ff00b9a9294b825f79ba7cea824d
parentd6a678bd9ba533f341e478d39d4d37328e56edc0
Use upstream version of ANDROID_HITTEST_WITHSIZE

This change removes the last occurrences of ANDROID_HITTEST_WITHSIZE
and updates WebKit to use the upstream version of this logic. This
follows on from https://android-git.corp.google.com/g/#change,60166 which
merged the upstream logic into the Android tree but maintained the existing
behaviour for Android, guarded with ANDROID_HITTEST_WITHSIZE.

This change introduces the following functional changes ...

- HitTestResult::addNodeToRectBasedTestResult()
  The Android version proceeded with the containment test if the node is null.
  We now early out and continue the hit test. We also record the node's
  shadowAncestorNode, rather than the node itself.

- RenderLayer::hitTestList()
  The android version always updates the result, but only updates the
  result layer if the result is not a rect based result.
  We now always update result layer, but only update the result if the
  result is not a rect based result.

- RenderSVGRoot::nodeAtPoint()
  The Android version returned true only if it's not a rect based hit test.
  Now we return true always.

- HitTestResult::m_isRectBased
  In the Android version, a padding must have positive width and height.
  Now we allow one of the two to be zero, provided the other is positive

All other changes are non-functional and should probably have been done as
part of https://android-git.corp.google.com/g/#change,60166

Note that the change to RenderBlock::nodeAtPoint() is a non-functional change
because we don't pass a rect to addNodeToRectBasedTestResult(), so the default
zero rect is used and the hit test always fails.

Change-Id: I4163fddad59ad6485df40cd48794aa262f76ced7
WebCore/config.h
WebCore/rendering/HitTestResult.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderLayer.cpp
WebCore/rendering/RenderLineBoxList.cpp
WebCore/rendering/RenderSVGRoot.cpp
WebKit/android/jni/WebViewCore.cpp