return removed;
}
-void ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes(HTMLElement*& elem)
+void ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes(HTMLElement* elem)
{
if (hasNoAttributeOrOnlyStyleAttribute(elem, StyleAttributeShouldBeEmpty))
removeNodePreservingChildren(elem);
- else {
- HTMLElement* newSpanElement = replaceElementWithSpanPreservingChildrenAndAttributes(elem);
- ASSERT(newSpanElement && newSpanElement->inDocument());
- elem = newSpanElement;
- }
+ else
+ replaceElementWithSpanPreservingChildrenAndAttributes(elem);
}
bool ApplyStyleCommand::removeImplicitlyStyledElement(EditingStyle* style, HTMLElement* element, InlineStyleRemovalMode mode, EditingStyle* extractedStyle)
if (!style)
return 0;
+ // FIXME: oilpan: Change to RefPtrWillBeRawPtr when changing CSSValue.
RefPtr<CSSPrimitiveValue> value = static_pointer_cast<CSSPrimitiveValue>(style->getPropertyCSSValue(CSSPropertyFontSize));
if (!value)
return 0;