summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderTable.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-05 11:07:27 +0100
committerSteve Block <steveblock@google.com>2010-08-09 13:25:51 +0100
commitad3386af2204fbbc9033a6dcced2f9b0adcd6f10 (patch)
tree093ada87dd1caff6efd1f3118e533c159c43256a /WebCore/rendering/RenderTable.cpp
parentdb14019a23d96bc8a444b6576a5da8bd1cfbc8b0 (diff)
downloadexternal_webkit-ad3386af2204fbbc9033a6dcced2f9b0adcd6f10.zip
external_webkit-ad3386af2204fbbc9033a6dcced2f9b0adcd6f10.tar.gz
external_webkit-ad3386af2204fbbc9033a6dcced2f9b0adcd6f10.tar.bz2
Merge WebKit at r64523 : Fix conflicts due to ANDROID_HITTEST_WITHSIZE
A modified version of this Android-specific code was upstreamed in http://trac.webkit.org/changeset/64272 For the most part, the differences between the Android and upstreamed versions are syntactic only. In these cases, we take the upstream version. In a small number of cases, logical changes exist. In these cases, the Android logic has been retained, guarded with ANDROID_HITTEST_WITHSIZE, but using the new syntax. In particular ... - Android's HitTestResult::intersects(x, y, rect) is logically equivalent to the uspstream IntRect::intersects(HitTestPoint::rectFromPoint(x, y))). - Android's HitTestResult::addRawNode() is logically equivalent to the upstream HitTestResult::m_rectBasedTestResult.add(). - Android's HitTestResult::isRegionTest() is slightly different from the upstream HitTestResult::isRectBasedTest(). The latter is modified with a new ANDROID_HITTEST_WITHSIZE guard in HitTestResult::HitTestResult() to maintain the same behaviour. - The upstreamed code uses HitTestResult::addNodeToRectBasedTestResult() as a helper method in place of inline logic in the Android version. The slight difference in behaviour between this helper and the Android logic is reflected in the new ANDROID_HITTEST_WITHSIZE guard in the helper. This change should introduce no change in behaviour. Change-Id: I974d68e3ac963f18334418e32b08c3fd9ab1182e
Diffstat (limited to 'WebCore/rendering/RenderTable.cpp')
-rw-r--r--WebCore/rendering/RenderTable.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp
index 7c54837..f9f0f56 100644
--- a/WebCore/rendering/RenderTable.cpp
+++ b/WebCore/rendering/RenderTable.cpp
@@ -31,13 +31,7 @@
#include "Document.h"
#include "FixedTableLayout.h"
#include "FrameView.h"
-<<<<<<< HEAD
-#ifdef ANDROID_HITTEST_WITHSIZE
#include "HitTestResult.h"
-#endif
-=======
-#include "HitTestResult.h"
->>>>>>> webkit.org at r64523
#include "HTMLNames.h"
#include "RenderLayer.h"
#include "RenderTableCell.h"
@@ -1187,15 +1181,7 @@ bool RenderTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
ty += y();
// Check kids first.
-<<<<<<< HEAD
-#ifdef ANDROID_HITTEST_WITHSIZE
- if (!hasOverflowClip() || result.intersects(xPos, yPos, overflowClipRect(tx, ty))) {
-#else
- if (!hasOverflowClip() || overflowClipRect(tx, ty).contains(xPos, yPos)) {
-#endif
-=======
if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectFromPoint(xPos, yPos))) {
->>>>>>> webkit.org at r64523
for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption) &&
child->nodeAtPoint(request, result, xPos, yPos, tx, ty, action)) {
@@ -1206,30 +1192,11 @@ bool RenderTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
}
// Check our bounds next.
-<<<<<<< HEAD
-#ifdef ANDROID_HITTEST_WITHSIZE
- IntRect boundsRect = IntRect(tx, ty, width(), height());
- if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && result.intersects(xPos, yPos, boundsRect)) {
-#else
- if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && IntRect(tx, ty, width(), height()).contains(xPos, yPos)) {
-#endif
- updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty));
-#ifdef ANDROID_HITTEST_WITHSIZE
- if (result.isRegionTest()) {
- ASSERT(node() || isAnonymous());
- result.addRawNode(node());
- if (!result.containedBy(xPos, yPos, boundsRect))
- return false;
- }
-#endif
- return true;
-=======
IntRect boundsRect = IntRect(tx, ty, width(), height());
if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectFromPoint(xPos, yPos))) {
updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty));
if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect))
return true;
->>>>>>> webkit.org at r64523
}
return false;