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

Unified Diff: Source/core/dom/Position.cpp

Issue 672953002: Convert first letter into a pseudo element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/dom/Node.cpp ('k') | Source/core/dom/PseudoElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Position.cpp
diff --git a/Source/core/dom/Position.cpp b/Source/core/dom/Position.cpp
index 8b60a7c1dcf271ada29ee545a853ae7e7583469b..f453d3be667ddd71d5e151bdcb99b164a4f9ab3b 100644
--- a/Source/core/dom/Position.cpp
+++ b/Source/core/dom/Position.cpp
@@ -85,7 +85,7 @@ Position::Position(PassRefPtrWillBeRawPtr<Node> anchorNode, LegacyEditingOffset
, m_anchorType(anchorTypeForLegacyEditingPosition(m_anchorNode.get(), m_offset))
, m_isLegacyEditingPosition(true)
{
- ASSERT(!m_anchorNode || !m_anchorNode->isPseudoElement());
+ ASSERT(!m_anchorNode || !m_anchorNode->isPseudoElement() || m_anchorNode->isFirstLetterPseudoElement());
}
Position::Position(PassRefPtrWillBeRawPtr<Node> anchorNode, AnchorType anchorType)
@@ -94,7 +94,7 @@ Position::Position(PassRefPtrWillBeRawPtr<Node> anchorNode, AnchorType anchorTyp
, m_anchorType(anchorType)
, m_isLegacyEditingPosition(false)
{
- ASSERT(!m_anchorNode || !m_anchorNode->isPseudoElement());
+ ASSERT(!m_anchorNode || !m_anchorNode->isPseudoElement() || m_anchorNode->isFirstLetterPseudoElement());
ASSERT(anchorType != PositionIsOffsetInAnchor);
ASSERT(!((anchorType == PositionIsBeforeChildren || anchorType == PositionIsAfterChildren)
@@ -107,7 +107,7 @@ Position::Position(PassRefPtrWillBeRawPtr<Node> anchorNode, int offset, AnchorTy
, m_anchorType(anchorType)
, m_isLegacyEditingPosition(false)
{
- ASSERT(!m_anchorNode || !m_anchorNode->isPseudoElement());
+ ASSERT(!m_anchorNode || !m_anchorNode->isPseudoElement() || m_anchorNode->isFirstLetterPseudoElement());
ASSERT(anchorType == PositionIsOffsetInAnchor);
}
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/dom/PseudoElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698