| Index: Source/core/editing/SplitElementCommand.cpp
|
| diff --git a/Source/core/editing/SplitElementCommand.cpp b/Source/core/editing/SplitElementCommand.cpp
|
| index 128c37097edf83107af7d220dc03e76eaf48d020..02a2761812444d0cca8f7c7ecac733923fd87042 100644
|
| --- a/Source/core/editing/SplitElementCommand.cpp
|
| +++ b/Source/core/editing/SplitElementCommand.cpp
|
| @@ -93,8 +93,9 @@ void SplitElementCommand::doUnapply()
|
| m_element2->insertBefore(children[i].get(), refChild.get(), IGNORE_EXCEPTION);
|
|
|
| // Recover the id attribute of the original element.
|
| - if (m_element1->hasAttribute(HTMLNames::idAttr))
|
| - m_element2->setAttribute(HTMLNames::idAttr, m_element1->getAttribute(HTMLNames::idAttr));
|
| + const AtomicString& id = m_element1->getAttribute(HTMLNames::idAttr);
|
| + if (!id.isNull())
|
| + m_element2->setAttribute(HTMLNames::idAttr, id);
|
|
|
| m_element1->remove(IGNORE_EXCEPTION);
|
| }
|
|
|