Index: Source/core/rendering/HitTestResult.cpp |
diff --git a/Source/core/rendering/HitTestResult.cpp b/Source/core/rendering/HitTestResult.cpp |
index 2e112287ed8d5d3050c65a42f7bf6c225216acbf..88234cf1c22f0522f6e710be2c5151a490b4b10f 100644 |
--- a/Source/core/rendering/HitTestResult.cpp |
+++ b/Source/core/rendering/HitTestResult.cpp |
@@ -47,7 +47,6 @@ using namespace HTMLNames; |
HitTestResult::HitTestResult() |
: m_isOverWidget(false) |
- , m_isFirstLetter(false) |
{ |
} |
@@ -55,7 +54,6 @@ HitTestResult::HitTestResult(const LayoutPoint& point) |
: m_hitTestLocation(point) |
, m_pointInInnerNodeFrame(point) |
, m_isOverWidget(false) |
- , m_isFirstLetter(false) |
{ |
} |
@@ -63,7 +61,6 @@ HitTestResult::HitTestResult(const LayoutPoint& centerPoint, unsigned topPadding |
: m_hitTestLocation(centerPoint, topPadding, rightPadding, bottomPadding, leftPadding) |
, m_pointInInnerNodeFrame(centerPoint) |
, m_isOverWidget(false) |
- , m_isFirstLetter(false) |
{ |
} |
@@ -71,7 +68,6 @@ HitTestResult::HitTestResult(const HitTestLocation& other) |
: m_hitTestLocation(other) |
, m_pointInInnerNodeFrame(m_hitTestLocation.point()) |
, m_isOverWidget(false) |
- , m_isFirstLetter(false) |
{ |
} |
@@ -85,7 +81,6 @@ HitTestResult::HitTestResult(const HitTestResult& other) |
, m_innerURLElement(other.URLElement()) |
, m_scrollbar(other.scrollbar()) |
, m_isOverWidget(other.isOverWidget()) |
- , m_isFirstLetter(other.m_isFirstLetter) |
{ |
// Only copy the NodeSet in case of rect hit test. |
m_rectBasedTestResult = adoptPtrWillBeNoop(other.m_rectBasedTestResult ? new NodeSet(*other.m_rectBasedTestResult) : 0); |
@@ -105,7 +100,6 @@ HitTestResult& HitTestResult::operator=(const HitTestResult& other) |
m_localPoint = other.localPoint(); |
m_innerURLElement = other.URLElement(); |
m_scrollbar = other.scrollbar(); |
- m_isFirstLetter = other.m_isFirstLetter; |
m_isOverWidget = other.isOverWidget(); |
// Only copy the NodeSet in case of rect hit test. |
@@ -140,12 +134,7 @@ PositionWithAffinity HitTestResult::position() const |
RenderObject* HitTestResult::renderer() const |
{ |
- if (!m_innerNode) |
- return 0; |
- RenderObject* renderer = m_innerNode->renderer(); |
- if (!m_isFirstLetter || !renderer || !renderer->isText() || !toRenderText(renderer)->isTextFragment()) |
- return renderer; |
- return toRenderTextFragment(renderer)->firstRenderTextInFirstLetter(); |
+ return m_innerNode ? m_innerNode->renderer() : 0; |
} |
void HitTestResult::setToShadowHostIfInUserAgentShadowRoot() |