| 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());
|
|
|