Changeset 156256 in webkit for trunk/Source/WebCore/editing/markup.cpp
- Timestamp:
- Sep 22, 2013, 8:40:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/editing/markup.cpp
r156253 r156256 1066 1066 } 1067 1067 1068 void replaceChildrenWithFragment(ContainerNode* container, PassRefPtr<DocumentFragment> fragment, ExceptionCode& ec) 1069 { 1070 RefPtr<ContainerNode> containerNode(container); 1071 1068 void replaceChildrenWithFragment(ContainerNode& container, PassRefPtr<DocumentFragment> fragment, ExceptionCode& ec) 1069 { 1070 Ref<ContainerNode> containerNode(container); 1072 1071 ChildListMutationScope mutation(containerNode.get()); 1073 1072 … … 1077 1076 } 1078 1077 1079 if (hasOneTextChild( containerNode.get()) && hasOneTextChild(fragment.get())) {1078 if (hasOneTextChild(&containerNode.get()) && hasOneTextChild(fragment.get())) { 1080 1079 toText(containerNode->firstChild())->setData(toText(fragment->firstChild())->data(), ec); 1081 1080 return; 1082 1081 } 1083 1082 1084 if (hasOneChild( containerNode.get())) {1083 if (hasOneChild(&containerNode.get())) { 1085 1084 containerNode->replaceChild(fragment, containerNode->firstChild(), ec); 1086 1085 return; … … 1091 1090 } 1092 1091 1093 void replaceChildrenWithText(ContainerNode* container, const String& text, ExceptionCode& ec) 1094 { 1095 RefPtr<ContainerNode> containerNode(container); 1096 1092 void replaceChildrenWithText(ContainerNode& container, const String& text, ExceptionCode& ec) 1093 { 1094 Ref<ContainerNode> containerNode(container); 1097 1095 ChildListMutationScope mutation(containerNode.get()); 1098 1096 1099 if (hasOneTextChild( containerNode.get())) {1097 if (hasOneTextChild(&containerNode.get())) { 1100 1098 toText(containerNode->firstChild())->setData(text, ec); 1101 1099 return; … … 1104 1102 RefPtr<Text> textNode = Text::create(containerNode->document(), text); 1105 1103 1106 if (hasOneChild( containerNode.get())) {1104 if (hasOneChild(&containerNode.get())) { 1107 1105 containerNode->replaceChild(textNode.release(), containerNode->firstChild(), ec); 1108 1106 return;
Note:
See TracChangeset
for help on using the changeset viewer.