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

Unified Diff: Source/core/editing/ApplyStyleCommand.cpp

Issue 189773005: Revert of Have Position deal with more references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/editing/ApplyBlockElementCommand.cpp ('k') | Source/core/editing/BreakBlockquoteCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ApplyStyleCommand.cpp
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp
index cdeb208a108bb36141bb389e5fb3119a78e28513..99b65f53100d8f13c69d012b32243b6f83002b87 100644
--- a/Source/core/editing/ApplyStyleCommand.cpp
+++ b/Source/core/editing/ApplyStyleCommand.cpp
@@ -848,7 +848,7 @@
// We don't consider m_isInlineElementToRemoveFunction here because we never apply style when m_isInlineElementToRemoveFunction is specified
if (!style->styleIsPresentInComputedStyleOfNode(node))
return true;
- if (m_styledInlineElement && !enclosingNodeWithTag(positionBeforeNode(*node), m_styledInlineElement->tagQName()))
+ if (m_styledInlineElement && !enclosingNodeWithTag(positionBeforeNode(node), m_styledInlineElement->tagQName()))
return true;
}
return false;
@@ -1213,7 +1213,7 @@
newEnd = end;
splitTextNodeContainingElement(start.containerText(), start.offsetInContainerNode());
- updateStartEnd(positionBeforeNode(*start.containerNode()), newEnd);
+ updateStartEnd(positionBeforeNode(start.containerNode()), newEnd);
}
void ApplyStyleCommand::splitTextElementAtEnd(const Position& start, const Position& end)
@@ -1231,7 +1231,7 @@
return;
Position newStart = shouldUpdateStart ? Position(toText(firstTextNode), start.offsetInContainerNode()) : start;
- updateStartEnd(newStart, positionAfterNode(*firstTextNode));
+ updateStartEnd(newStart, positionAfterNode(firstTextNode));
}
bool ApplyStyleCommand::shouldSplitTextElement(Element* element, EditingStyle* style)
@@ -1399,12 +1399,11 @@
Position ApplyStyleCommand::positionToComputeInlineStyleChange(PassRefPtr<Node> startNode, RefPtr<Node>& dummyElement)
{
- ASSERT(startNode);
// It's okay to obtain the style at the startNode because we've removed all relevant styles from the current run.
if (!startNode->isElementNode()) {
dummyElement = createStyleSpanElement(document());
- insertNodeAt(dummyElement, positionBeforeNode(*startNode));
- return positionBeforeNode(*dummyElement);
+ insertNodeAt(dummyElement, positionBeforeNode(startNode.get()));
+ return positionBeforeNode(dummyElement.get());
}
return firstPositionInOrBeforeNode(startNode.get());
« no previous file with comments | « Source/core/editing/ApplyBlockElementCommand.cpp ('k') | Source/core/editing/BreakBlockquoteCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698