Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: Source/core/rendering/HitTestResult.cpp

Issue 571603003: Convert first letter into a pseudo element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/HitTestResult.h ('k') | Source/core/rendering/RenderBlock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « Source/core/rendering/HitTestResult.h ('k') | Source/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698