Fix copy methods for CharacterData and DocumentType nodes

This commit is contained in:
iska
2016-12-31 16:26:06 +01:00
parent 9795172c9c
commit ea17eeef9d
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ NS_INLINE void CheckValidOffset(HTMLCharacterData *node, NSUInteger offset, NSSt
- (id)copyWithZone:(NSZone *)zone
{
HTMLCharacterData *copy = [super copyWithZone:zone];
copy->_data = _data;
copy->_data = [_data mutableCopy];
return copy;
}
+2 -2
View File
@@ -139,8 +139,8 @@ NS_INLINE BOOL nilOrEqual(id first, id second) {
- (id)copyWithZone:(NSZone *)zone
{
HTMLDocumentType *copy = [super copyWithZone:zone];
copy->_publicIdentifier = self.publicIdentifier;
copy->_systemIdentifier = self.systemIdentifier;
copy->_publicIdentifier = [_publicIdentifier copy];
copy->_systemIdentifier = [_systemIdentifier copy];
return copy;
}