[webkit-changes] cvs commit: WebCore/kwq KWQClipboard.h
KWQKHTMLPart.h KWQKHTMLPart.mm WebCoreBridge.mm
Maciej
mjs at opensource.apple.com
Thu Dec 1 02:32:34 PST 2005
mjs 05/12/01 02:32:34
Modified: . ChangeLog
JavaScriptCore.xcodeproj project.pbxproj
kjs function.cpp function.h function_object.cpp
internal.cpp internal.h nodes.h nodes2string.cpp
protect.h
. ChangeLog
khtml khtml_events.h khtml_part.cpp khtmlpart_p.h
khtmlview.cpp
khtml/css css_computedstyle.h
khtml/ecma XSLTProcessor.cpp XSLTProcessor.h domparser.h
kjs_css.h kjs_dom.cpp kjs_dom.h kjs_events.h
kjs_html.cpp kjs_html.h kjs_range.h kjs_traversal.h
kjs_views.h kjs_window.cpp xmlhttprequest.h
khtml/editing SelectionController.cpp SelectionController.h
apply_style_command.cpp apply_style_command.h
edit_command.cpp edit_command.h markup.cpp
visible_position.cpp visible_position.h
visible_range.h visible_text.cpp visible_text.h
visible_units.cpp
khtml/html html_elementimpl.cpp html_elementimpl.h
html_formimpl.cpp html_formimpl.h
html_imageimpl.cpp html_imageimpl.h
html_miscimpl.cpp html_miscimpl.h
html_tableimpl.cpp html_tableimpl.h htmlparser.cpp
khtml/misc shared.h
khtml/rendering bidi.cpp render_block.cpp render_line.h
render_text.cpp render_text.h
khtml/xml dom2_eventsimpl.h dom2_rangeimpl.cpp
dom2_rangeimpl.h dom_docimpl.cpp dom_docimpl.h
dom_elementimpl.cpp dom_elementimpl.h
dom_nodeimpl.cpp dom_nodeimpl.h dom_xmlimpl.h
khtml/xsl xslt_processorimpl.cpp xslt_processorimpl.h
kwq KWQClipboard.h KWQKHTMLPart.h KWQKHTMLPart.mm
WebCoreBridge.mm
Added: kxmlcore RefPtr.h
ForwardingHeaders/kxmlcore RefPtr.h
Removed: kxmlcore SharedPtr.h
ForwardingHeaders/kxmlcore SharedPtr.h
Log:
JavaScriptCore:
Rubber stamped by Eric.
- renamed SharedPtr to RefPtr via script
* JavaScriptCore.xcodeproj/project.pbxproj:
* kjs/function.cpp:
(KJS::GlobalFuncImp::callAsFunction):
* kjs/function.h:
* kjs/function_object.cpp:
(FunctionObjectImp::construct):
* kjs/internal.cpp:
(KJS::Parser::parse):
(KJS::InterpreterImp::checkSyntax):
(KJS::InterpreterImp::evaluate):
* kjs/internal.h:
* kjs/nodes.h:
* kjs/nodes2string.cpp:
(KJS::SourceStream::operator<<):
* kjs/protect.h:
* kxmlcore/RefPtr.h: Added.
(KXMLCore::RefPtr::RefPtr):
(KXMLCore::RefPtr::~RefPtr):
(KXMLCore::RefPtr::isNull):
(KXMLCore::RefPtr::notNull):
(KXMLCore::RefPtr::reset):
(KXMLCore::RefPtr::get):
(KXMLCore::RefPtr::operator*):
(KXMLCore::RefPtr::operator->):
(KXMLCore::RefPtr::operator!):
(KXMLCore::RefPtr::operator UnspecifiedBoolType):
(KXMLCore::::operator):
(KXMLCore::operator==):
(KXMLCore::operator!=):
(KXMLCore::static_pointer_cast):
(KXMLCore::const_pointer_cast):
* kxmlcore/SharedPtr.h: Removed.
WebCore:
Rubber stamped by Eric.
- renamed SharedPtr to RefPtr via script
* ForwardingHeaders/kxmlcore/RefPtr.h: Added.
* ForwardingHeaders/kxmlcore/SharedPtr.h: Removed.
* khtml/css/css_computedstyle.h:
* khtml/ecma/XSLTProcessor.cpp:
(KJS::XSLTProcessorProtoFunc::callAsFunction):
* khtml/ecma/XSLTProcessor.h:
* khtml/ecma/domparser.h:
* khtml/ecma/kjs_css.h:
* khtml/ecma/kjs_dom.cpp:
(KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
(KJS::DOMNamedNodesCollection::getOwnPropertySlot):
* khtml/ecma/kjs_dom.h:
* khtml/ecma/kjs_events.h:
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::namedItemGetter):
(KJS::KJS::HTMLCollection::getNamedItems):
(KJS::OptionConstructorImp::construct):
* khtml/ecma/kjs_html.h:
* khtml/ecma/kjs_range.h:
* khtml/ecma/kjs_traversal.h:
* khtml/ecma/kjs_views.h:
* khtml/ecma/kjs_window.cpp:
(KJS::Window::namedItemGetter):
* khtml/ecma/xmlhttprequest.h:
* khtml/editing/SelectionController.cpp:
(khtml::SelectionController::toRange):
* khtml/editing/SelectionController.h:
* khtml/editing/apply_style_command.cpp:
(khtml::StyleChange::init):
(khtml::StyleChange::currentlyHasStyle):
(khtml::ApplyStyleCommand::doApply):
(khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
(khtml::ApplyStyleCommand::removeCSSStyle):
(khtml::hasTextDecorationProperty):
(khtml::ApplyStyleCommand::extractTextDecorationStyle):
(khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle):
(khtml::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode):
(khtml::ApplyStyleCommand::removeInlineStyle):
(khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
(khtml::ApplyStyleCommand::computedFontSize):
* khtml/editing/apply_style_command.h:
* khtml/editing/edit_command.cpp:
(khtml::EditCommandPtr::EditCommandPtr):
(khtml::EditCommandPtr::operator=):
* khtml/editing/edit_command.h:
* khtml/editing/markup.cpp:
(khtml::startMarkup):
* khtml/editing/visible_position.cpp:
(khtml::makeRange):
* khtml/editing/visible_position.h:
* khtml/editing/visible_range.h:
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::range):
(khtml::SimplifiedBackwardsTextIterator::range):
(khtml::CharacterIterator::range):
(khtml::TextIterator::rangeFromLocationAndLength):
(khtml::findPlainText):
* khtml/editing/visible_text.h:
(khtml::WordAwareIterator::range):
* khtml/editing/visible_units.cpp:
(khtml::previousBoundary):
(khtml::nextBoundary):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::children):
* khtml/html/html_elementimpl.h:
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::elements):
(DOM::HTMLSelectElementImpl::add):
(DOM::HTMLSelectElementImpl::optionsHTMLCollection):
* khtml/html/html_formimpl.h:
* khtml/html/html_imageimpl.cpp:
(DOM::HTMLMapElementImpl::areas):
* khtml/html/html_imageimpl.h:
* khtml/html/html_miscimpl.cpp:
(DOM::HTMLCollectionImpl::namedItems):
* khtml/html/html_miscimpl.h:
* khtml/html/html_tableimpl.cpp:
(DOM::HTMLTableElementImpl::rows):
(DOM::HTMLTableElementImpl::tBodies):
(DOM::HTMLTableSectionElementImpl::insertRow):
(DOM::HTMLTableSectionElementImpl::deleteRow):
(DOM::HTMLTableSectionElementImpl::rows):
(DOM::HTMLTableRowElementImpl::insertCell):
(DOM::HTMLTableRowElementImpl::deleteCell):
(DOM::HTMLTableRowElementImpl::cells):
* khtml/html/html_tableimpl.h:
* khtml/html/htmlparser.cpp:
(HTMLParser::parseToken):
(HTMLParser::insertNode):
* khtml/khtml_events.h:
* khtml/khtml_part.cpp:
(KHTMLPart::selectionHasStyle):
(KHTMLPart::selectionStartHasStyle):
(KHTMLPart::selectionComputedStyle):
(KHTMLPart::applyEditingStyleToBodyElement):
(KHTMLPart::removeEditingStyleFromBodyElement):
* khtml/khtmlpart_p.h:
* khtml/khtmlview.cpp:
(KHTMLView::viewportMousePressEvent):
(KHTMLView::viewportMouseDoubleClickEvent):
(KHTMLView::viewportMouseReleaseEvent):
(KHTMLView::dispatchMouseEvent):
* khtml/misc/shared.h:
* khtml/rendering/bidi.cpp:
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::updateFirstLetter):
* khtml/rendering/render_line.h:
* khtml/rendering/render_text.cpp:
(RenderText::setStyle):
(RenderText::originalString):
(RenderTextFragment::originalString):
* khtml/rendering/render_text.h:
* khtml/xml/dom2_eventsimpl.h:
* khtml/xml/dom2_rangeimpl.cpp:
(DOM::rangeOfContents):
* khtml/xml/dom2_rangeimpl.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::adoptNode):
(DocumentImpl::setFocusNode):
(DocumentImpl::addMarker):
(DocumentImpl::removeMarkers):
(DocumentImpl::applyXSLTransform):
(DocumentImpl::images):
(DocumentImpl::applets):
(DocumentImpl::embeds):
(DocumentImpl::objects):
(DocumentImpl::links):
(DocumentImpl::forms):
(DocumentImpl::anchors):
(DocumentImpl::all):
(DocumentImpl::windowNamedItems):
(DocumentImpl::documentNamedItems):
(DocumentImpl::getElementsByName):
* khtml/xml/dom_docimpl.h:
(DOM::DocumentImpl::transformSourceDocument):
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::setAttributeNode):
(ElementImpl::removeAttributeNode):
(NamedAttrMapImpl::removeNamedItemNS):
(NamedAttrMapImpl::setNamedItem):
(NamedAttrMapImpl::removeNamedItem):
* khtml/xml/dom_elementimpl.h:
(DOM::ElementImpl::setAttributeNodeNS):
* khtml/xml/dom_nodeimpl.cpp:
(DOM::NodeImpl::childNodes):
(DOM::NodeImpl::dispatchWindowEvent):
(DOM::NodeImpl::dispatchMouseEvent):
(DOM::NodeImpl::getElementsByTagNameNS):
(DOM::ContainerNodeImpl::insertBefore):
(DOM::ContainerNodeImpl::replaceChild):
(DOM::ContainerNodeImpl::appendChild):
(DOM::ContainerNodeImpl::addChild):
* khtml/xml/dom_nodeimpl.h:
(DOM::NodeImpl::getElementsByTagName):
(DOM::NamedNodeMapImpl::removeNamedItem):
(DOM::NamedNodeMapImpl::setNamedItemNS):
* khtml/xml/dom_xmlimpl.h:
* khtml/xsl/xslt_processorimpl.cpp:
(DOM::XSLTProcessorImpl::createDocumentFromSource):
(DOM::createFragmentFromSource):
(DOM::xsltStylesheetPointer):
(DOM::xmlDocPtrFromNode):
(DOM::XSLTProcessorImpl::transformToString):
(DOM::XSLTProcessorImpl::transformToDocument):
(DOM::XSLTProcessorImpl::transformToFragment):
(DOM::XSLTProcessorImpl::getParameter):
* khtml/xsl/xslt_processorimpl.h:
* kwq/KWQClipboard.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::findString):
(KWQKHTMLPart::advanceToNextMisspelling):
(KWQKHTMLPart::fontForSelection):
(KWQKHTMLPart::markMisspellings):
(KWQKHTMLPart::shouldClose):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge convertToNSRange:DOM::]):
Revision Changes Path
1.888 +39 -0 JavaScriptCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
retrieving revision 1.887
retrieving revision 1.888
diff -u -r1.887 -r1.888
--- ChangeLog 1 Dec 2005 08:38:10 -0000 1.887
+++ ChangeLog 1 Dec 2005 10:31:56 -0000 1.888
@@ -1,3 +1,42 @@
+2005-12-01 Maciej Stachowiak <mjs at apple.com>
+
+ Rubber stamped by Eric.
+
+ - renamed SharedPtr to RefPtr via script
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * kjs/function.cpp:
+ (KJS::GlobalFuncImp::callAsFunction):
+ * kjs/function.h:
+ * kjs/function_object.cpp:
+ (FunctionObjectImp::construct):
+ * kjs/internal.cpp:
+ (KJS::Parser::parse):
+ (KJS::InterpreterImp::checkSyntax):
+ (KJS::InterpreterImp::evaluate):
+ * kjs/internal.h:
+ * kjs/nodes.h:
+ * kjs/nodes2string.cpp:
+ (KJS::SourceStream::operator<<):
+ * kjs/protect.h:
+ * kxmlcore/RefPtr.h: Added.
+ (KXMLCore::RefPtr::RefPtr):
+ (KXMLCore::RefPtr::~RefPtr):
+ (KXMLCore::RefPtr::isNull):
+ (KXMLCore::RefPtr::notNull):
+ (KXMLCore::RefPtr::reset):
+ (KXMLCore::RefPtr::get):
+ (KXMLCore::RefPtr::operator*):
+ (KXMLCore::RefPtr::operator->):
+ (KXMLCore::RefPtr::operator!):
+ (KXMLCore::RefPtr::operator UnspecifiedBoolType):
+ (KXMLCore::::operator):
+ (KXMLCore::operator==):
+ (KXMLCore::operator!=):
+ (KXMLCore::static_pointer_cast):
+ (KXMLCore::const_pointer_cast):
+ * kxmlcore/SharedPtr.h: Removed.
+
2005-11-30 Maciej Stachowiak <mjs at apple.com>
Reviewed by Dave Hyatt.
1.26 +4 -4 JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Index: project.pbxproj
===================================================================
RCS file: /cvs/root/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- project.pbxproj 23 Nov 2005 05:41:18 -0000 1.25
+++ project.pbxproj 1 Dec 2005 10:31:58 -0000 1.26
@@ -25,7 +25,6 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
- 65162EEB08E6A1FE007556CD /* SharedPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 65162EEA08E6A1FE007556CD /* SharedPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
652C107F08DA7B1E0020887D /* protected_reference.h in Headers */ = {isa = PBXBuildFile; fileRef = 652C107E08DA7B1E0020887D /* protected_reference.h */; };
6541BD7208E80A17002CBEE7 /* TCPageMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 6541BD6E08E80A17002CBEE7 /* TCPageMap.h */; };
6541BD7308E80A17002CBEE7 /* TCSpinLock.h in Headers */ = {isa = PBXBuildFile; fileRef = 6541BD6F08E80A17002CBEE7 /* TCSpinLock.h */; };
@@ -34,6 +33,7 @@
6557E8F808EA5D4D0049CDFC /* HashMapPtrSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 6557E8F708EA5D4D0049CDFC /* HashMapPtrSpec.h */; settings = {ATTRIBUTES = (Private, ); }; };
65621E6D089E859700760F35 /* property_slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65621E6B089E859700760F35 /* property_slot.cpp */; };
65621E6E089E859700760F35 /* property_slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 65621E6C089E859700760F35 /* property_slot.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 65C647B4093EF8D60022C380 /* RefPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C647B3093EF8D60022C380 /* RefPtr.h */; settings = {ATTRIBUTES = (Private, ); }; };
65D7D19C08F10B5B0015ABD8 /* FastMallocInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 65D7D19B08F10B5B0015ABD8 /* FastMallocInternal.h */; };
65DFC93008EA173A00F7300B /* HashFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92A08EA173A00F7300B /* HashFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; };
65DFC93108EA173A00F7300B /* HashMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92B08EA173A00F7300B /* HashMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -322,7 +322,6 @@
51F0EC9705C88DC700E6DF1B /* objc_utility.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = objc_utility.mm; path = bindings/objc/objc_utility.mm; sourceTree = "<group>"; };
650B68D80639033F009D42DE /* protected_values.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = protected_values.cpp; sourceTree = "<group>"; };
650B68D90639033F009D42DE /* protected_values.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = protected_values.h; sourceTree = "<group>"; };
- 65162EEA08E6A1FE007556CD /* SharedPtr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SharedPtr.h; sourceTree = "<group>"; };
651F6412039D5B5F0078395C /* dtoa.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dtoa.cpp; sourceTree = "<group>"; };
651F6413039D5B5F0078395C /* dtoa.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = dtoa.h; sourceTree = "<group>"; };
652C107E08DA7B1E0020887D /* protected_reference.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = protected_reference.h; sourceTree = "<group>"; };
@@ -339,6 +338,7 @@
65621E6B089E859700760F35 /* property_slot.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = property_slot.cpp; sourceTree = "<group>"; };
65621E6C089E859700760F35 /* property_slot.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = property_slot.h; sourceTree = "<group>"; };
65C02FBB0637462A003E7EE6 /* protect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = protect.h; sourceTree = "<group>"; };
+ 65C647B3093EF8D60022C380 /* RefPtr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RefPtr.h; sourceTree = "<group>"; };
65D7D19B08F10B5B0015ABD8 /* FastMallocInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FastMallocInternal.h; sourceTree = "<group>"; };
65DFC92A08EA173A00F7300B /* HashFunctions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashFunctions.h; sourceTree = "<group>"; };
65DFC92B08EA173A00F7300B /* HashMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashMap.h; sourceTree = "<group>"; };
@@ -662,6 +662,7 @@
65162EF108E6A21C007556CD /* kxmlcore */ = {
isa = PBXGroup;
children = (
+ 65C647B3093EF8D60022C380 /* RefPtr.h */,
65D7D19B08F10B5B0015ABD8 /* FastMallocInternal.h */,
6557E8F708EA5D4D0049CDFC /* HashMapPtrSpec.h */,
65DFC92A08EA173A00F7300B /* HashFunctions.h */,
@@ -674,7 +675,6 @@
6541BD6F08E80A17002CBEE7 /* TCSpinLock.h */,
6541BD7008E80A17002CBEE7 /* TCSystemAlloc.cpp */,
6541BD7108E80A17002CBEE7 /* TCSystemAlloc.h */,
- 65162EEA08E6A1FE007556CD /* SharedPtr.h */,
65E217B708E7EECC0023E5F6 /* Assertions.h */,
65E217B808E7EECC0023E5F6 /* Assertions.mm */,
65E217B908E7EECC0023E5F6 /* FastMalloc.cpp */,
@@ -833,7 +833,6 @@
93E26C1308B1523D00F85226 /* ucptable.c in Headers */,
93E26CCF08B2921900F85226 /* softlinking.h in Headers */,
652C107F08DA7B1E0020887D /* protected_reference.h in Headers */,
- 65162EEB08E6A1FE007556CD /* SharedPtr.h in Headers */,
65E217BD08E7EECC0023E5F6 /* Assertions.h in Headers */,
65E217C008E7EECC0023E5F6 /* FastMalloc.h in Headers */,
6541BD7208E80A17002CBEE7 /* TCPageMap.h in Headers */,
@@ -847,6 +846,7 @@
6557E8F808EA5D4D0049CDFC /* HashMapPtrSpec.h in Headers */,
65D7D19C08F10B5B0015ABD8 /* FastMallocInternal.h in Headers */,
65EA4C9C092AF9E20093D800 /* JSLock.h in Headers */,
+ 65C647B4093EF8D60022C380 /* RefPtr.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
1.61 +1 -1 JavaScriptCore/kjs/function.cpp
Index: function.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/function.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- function.cpp 3 Oct 2005 21:11:48 -0000 1.60
+++ function.cpp 1 Dec 2005 10:31:58 -0000 1.61
@@ -781,7 +781,7 @@
int sid;
int errLine;
UString errMsg;
- SharedPtr<ProgramNode> progNode(Parser::parse(UString(), 0, s.data(),s.size(),&sid,&errLine,&errMsg));
+ RefPtr<ProgramNode> progNode(Parser::parse(UString(), 0, s.data(),s.size(),&sid,&errLine,&errMsg));
Debugger *dbg = exec->dynamicInterpreter()->imp()->debugger();
if (dbg) {
1.36 +1 -1 JavaScriptCore/kjs/function.h
Index: function.h
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/function.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- function.h 27 Sep 2005 22:36:49 -0000 1.35
+++ function.h 1 Dec 2005 10:31:59 -0000 1.36
@@ -81,7 +81,7 @@
virtual Completion execute(ExecState *exec);
CodeType codeType() const { return FunctionCode; }
- SharedPtr<FunctionBodyNode> body;
+ RefPtr<FunctionBodyNode> body;
virtual const ClassInfo *classInfo() const { return &info; }
static const ClassInfo info;
1.34 +1 -1 JavaScriptCore/kjs/function_object.cpp
Index: function_object.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/function_object.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- function_object.cpp 3 Oct 2005 21:11:48 -0000 1.33
+++ function_object.cpp 1 Dec 2005 10:31:59 -0000 1.34
@@ -198,7 +198,7 @@
int sid;
int errLine;
UString errMsg;
- SharedPtr<ProgramNode> progNode = Parser::parse(sourceURL, lineNumber, body.data(),body.size(),&sid,&errLine,&errMsg);
+ RefPtr<ProgramNode> progNode = Parser::parse(sourceURL, lineNumber, body.data(),body.size(),&sid,&errLine,&errMsg);
// notify debugger that source has been parsed
Debugger *dbg = exec->dynamicInterpreter()->imp()->debugger();
1.80 +7 -7 JavaScriptCore/kjs/internal.cpp
Index: internal.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/internal.cpp,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- internal.cpp 27 Nov 2005 07:54:44 -0000 1.79
+++ internal.cpp 1 Dec 2005 10:31:59 -0000 1.80
@@ -314,7 +314,7 @@
// ------------------------------ Parser ---------------------------------------
-static SharedPtr<ProgramNode> *progNode;
+static RefPtr<ProgramNode> *progNode;
int Parser::sid = 0;
const int initialCapacity = 64;
@@ -346,7 +346,7 @@
newNodesCapacity = 0;
}
-SharedPtr<ProgramNode> Parser::parse(const UString &sourceURL, int startingLineNumber,
+RefPtr<ProgramNode> Parser::parse(const UString &sourceURL, int startingLineNumber,
const UChar *code, unsigned int length, int *sourceId,
int *errLine, UString *errMsg)
{
@@ -355,7 +355,7 @@
if (errMsg)
*errMsg = 0;
if (!progNode)
- progNode = new SharedPtr<ProgramNode>;
+ progNode = new RefPtr<ProgramNode>;
Lexer::curr()->setCode(sourceURL, startingLineNumber, code, length);
*progNode = 0;
@@ -368,7 +368,7 @@
int parseError = kjsyyparse();
bool lexError = Lexer::curr()->sawError();
Lexer::curr()->doneParsing();
- SharedPtr<ProgramNode> prog = *progNode;
+ RefPtr<ProgramNode> prog = *progNode;
*progNode = 0;
clearNewNodes();
@@ -379,7 +379,7 @@
*errLine = eline;
if (errMsg)
*errMsg = "Parse error";
- return SharedPtr<ProgramNode>();
+ return RefPtr<ProgramNode>();
}
return prog;
@@ -593,7 +593,7 @@
JSLock lock;
// Parser::parse() returns 0 in a syntax error occurs, so we just check for that
- SharedPtr<ProgramNode> progNode = Parser::parse(UString(), 0, code.data(),code.size(),0,0,0);
+ RefPtr<ProgramNode> progNode = Parser::parse(UString(), 0, code.data(),code.size(),0,0,0);
return progNode;
}
@@ -615,7 +615,7 @@
int sid;
int errLine;
UString errMsg;
- SharedPtr<ProgramNode> progNode = Parser::parse(sourceURL, startingLineNumber, code.data(),code.size(),&sid,&errLine,&errMsg);
+ RefPtr<ProgramNode> progNode = Parser::parse(sourceURL, startingLineNumber, code.data(),code.size(),&sid,&errLine,&errMsg);
// notify debugger that source has been parsed
if (dbg) {
1.46 +2 -2 JavaScriptCore/kjs/internal.h
Index: internal.h
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/internal.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- internal.h 23 Nov 2005 05:41:19 -0000 1.45
+++ internal.h 1 Dec 2005 10:31:59 -0000 1.46
@@ -31,7 +31,7 @@
#include "types.h"
#include "interpreter.h"
#include "scope_chain.h"
-#include <kxmlcore/SharedPtr.h>
+#include <kxmlcore/RefPtr.h>
#define I18N_NOOP(s) s
@@ -191,7 +191,7 @@
*/
class Parser {
public:
- static SharedPtr<ProgramNode> parse(const UString &sourceURL, int startingLineNumber,
+ static RefPtr<ProgramNode> parse(const UString &sourceURL, int startingLineNumber,
const UChar *code, unsigned int length, int *sourceId = 0,
int *errLine = 0, UString *errMsg = 0);
static void accept(ProgramNode *prog);
1.41 +115 -115 JavaScriptCore/kjs/nodes.h
Index: nodes.h
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/nodes.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- nodes.h 16 Oct 2005 00:46:22 -0000 1.40
+++ nodes.h 1 Dec 2005 10:31:59 -0000 1.41
@@ -25,7 +25,7 @@
#ifndef _NODES_H_
#define _NODES_H_
-#include <kxmlcore/SharedPtr.h>
+#include <kxmlcore/RefPtr.h>
#include "internal.h"
@@ -213,7 +213,7 @@
virtual void streamTo(SourceStream &s) const;
virtual bool isGroupNode() const { return true; }
private:
- SharedPtr<Node> group;
+ RefPtr<Node> group;
};
class ElementNode : public Node {
@@ -226,9 +226,9 @@
virtual void streamTo(SourceStream &s) const;
private:
friend class ArrayNode;
- SharedPtr<ElementNode> list;
+ RefPtr<ElementNode> list;
int elision;
- SharedPtr<Node> node;
+ RefPtr<Node> node;
};
class ArrayNode : public Node {
@@ -241,7 +241,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<ElementNode> element;
+ RefPtr<ElementNode> element;
int elision;
bool opt;
};
@@ -257,9 +257,9 @@
virtual void streamTo(SourceStream &s) const;
private:
friend class ObjectLiteralNode;
- SharedPtr<PropertyNode> name;
- SharedPtr<Node> assign;
- SharedPtr<PropertyValueNode> list;
+ RefPtr<PropertyNode> name;
+ RefPtr<Node> assign;
+ RefPtr<PropertyValueNode> list;
};
class ObjectLiteralNode : public Node {
@@ -269,7 +269,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<PropertyValueNode> list;
+ RefPtr<PropertyValueNode> list;
};
class PropertyNode : public Node {
@@ -295,8 +295,8 @@
Node *subscript() { return expr2.get(); }
private:
- SharedPtr<Node> expr1;
- SharedPtr<Node> expr2;
+ RefPtr<Node> expr1;
+ RefPtr<Node> expr2;
};
class DotAccessorNode : public Node {
@@ -311,7 +311,7 @@
const Identifier& identifier() const { return ident; }
private:
- SharedPtr<Node> expr;
+ RefPtr<Node> expr;
Identifier ident;
};
@@ -326,8 +326,8 @@
virtual void streamTo(SourceStream &s) const;
private:
friend class ArgumentsNode;
- SharedPtr<ArgumentListNode> list;
- SharedPtr<Node> expr;
+ RefPtr<ArgumentListNode> list;
+ RefPtr<Node> expr;
};
class ArgumentsNode : public Node {
@@ -339,7 +339,7 @@
List evaluateList(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<ArgumentListNode> list;
+ RefPtr<ArgumentListNode> list;
};
class NewExprNode : public Node {
@@ -349,8 +349,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
- SharedPtr<ArgumentsNode> args;
+ RefPtr<Node> expr;
+ RefPtr<ArgumentsNode> args;
};
class FunctionCallValueNode : public Node {
@@ -359,8 +359,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
- SharedPtr<ArgumentsNode> args;
+ RefPtr<Node> expr;
+ RefPtr<ArgumentsNode> args;
};
class FunctionCallResolveNode : public Node {
@@ -370,7 +370,7 @@
virtual void streamTo(SourceStream &s) const;
private:
Identifier ident;
- SharedPtr<ArgumentsNode> args;
+ RefPtr<ArgumentsNode> args;
};
class FunctionCallBracketNode : public Node {
@@ -379,9 +379,9 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
protected:
- SharedPtr<Node> base;
- SharedPtr<Node> subscript;
- SharedPtr<ArgumentsNode> args;
+ RefPtr<Node> base;
+ RefPtr<Node> subscript;
+ RefPtr<ArgumentsNode> args;
};
class FunctionCallParenBracketNode : public FunctionCallBracketNode {
@@ -396,9 +396,9 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
protected:
- SharedPtr<Node> base;
+ RefPtr<Node> base;
Identifier ident;
- SharedPtr<ArgumentsNode> args;
+ RefPtr<ArgumentsNode> args;
};
class FunctionCallParenDotNode : public FunctionCallDotNode {
@@ -423,8 +423,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> m_base;
- SharedPtr<Node> m_subscript;
+ RefPtr<Node> m_base;
+ RefPtr<Node> m_subscript;
Operator m_oper;
};
@@ -434,7 +434,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> m_base;
+ RefPtr<Node> m_base;
Identifier m_ident;
Operator m_oper;
};
@@ -454,8 +454,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> m_base;
- SharedPtr<Node> m_subscript;
+ RefPtr<Node> m_base;
+ RefPtr<Node> m_subscript;
};
class DeleteDotNode : public Node {
@@ -464,7 +464,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> m_base;
+ RefPtr<Node> m_base;
Identifier m_ident;
};
@@ -474,7 +474,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> m_expr;
+ RefPtr<Node> m_expr;
};
class VoidNode : public Node {
@@ -483,7 +483,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
+ RefPtr<Node> expr;
};
class TypeOfResolveNode : public Node {
@@ -501,7 +501,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> m_expr;
+ RefPtr<Node> m_expr;
};
class PrefixResolveNode : public Node {
@@ -520,8 +520,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> m_base;
- SharedPtr<Node> m_subscript;
+ RefPtr<Node> m_base;
+ RefPtr<Node> m_subscript;
Operator m_oper;
};
@@ -531,7 +531,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> m_base;
+ RefPtr<Node> m_base;
Identifier m_ident;
Operator m_oper;
};
@@ -542,7 +542,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
+ RefPtr<Node> expr;
};
class NegateNode : public Node {
@@ -551,7 +551,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
+ RefPtr<Node> expr;
};
class BitwiseNotNode : public Node {
@@ -560,7 +560,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
+ RefPtr<Node> expr;
};
class LogicalNotNode : public Node {
@@ -569,7 +569,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
+ RefPtr<Node> expr;
};
class MultNode : public Node {
@@ -578,8 +578,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> term1;
- SharedPtr<Node> term2;
+ RefPtr<Node> term1;
+ RefPtr<Node> term2;
char oper;
};
@@ -589,8 +589,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> term1;
- SharedPtr<Node> term2;
+ RefPtr<Node> term1;
+ RefPtr<Node> term2;
char oper;
};
@@ -601,8 +601,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> term1;
- SharedPtr<Node> term2;
+ RefPtr<Node> term1;
+ RefPtr<Node> term2;
Operator oper;
};
@@ -613,8 +613,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr1;
- SharedPtr<Node> expr2;
+ RefPtr<Node> expr1;
+ RefPtr<Node> expr2;
Operator oper;
};
@@ -625,8 +625,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr1;
- SharedPtr<Node> expr2;
+ RefPtr<Node> expr1;
+ RefPtr<Node> expr2;
Operator oper;
};
@@ -637,8 +637,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr1;
- SharedPtr<Node> expr2;
+ RefPtr<Node> expr1;
+ RefPtr<Node> expr2;
Operator oper;
};
@@ -652,8 +652,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr1;
- SharedPtr<Node> expr2;
+ RefPtr<Node> expr1;
+ RefPtr<Node> expr2;
Operator oper;
};
@@ -667,9 +667,9 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> logical;
- SharedPtr<Node> expr1;
- SharedPtr<Node> expr2;
+ RefPtr<Node> logical;
+ RefPtr<Node> expr1;
+ RefPtr<Node> expr2;
};
class AssignResolveNode : public Node {
@@ -681,7 +681,7 @@
protected:
Identifier m_ident;
Operator m_oper;
- SharedPtr<Node> m_right;
+ RefPtr<Node> m_right;
};
class AssignBracketNode : public Node {
@@ -691,10 +691,10 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
protected:
- SharedPtr<Node> m_base;
- SharedPtr<Node> m_subscript;
+ RefPtr<Node> m_base;
+ RefPtr<Node> m_subscript;
Operator m_oper;
- SharedPtr<Node> m_right;
+ RefPtr<Node> m_right;
};
class AssignDotNode : public Node {
@@ -704,10 +704,10 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
protected:
- SharedPtr<Node> m_base;
+ RefPtr<Node> m_base;
Identifier m_ident;
Operator m_oper;
- SharedPtr<Node> m_right;
+ RefPtr<Node> m_right;
};
class CommaNode : public Node {
@@ -716,8 +716,8 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr1;
- SharedPtr<Node> expr2;
+ RefPtr<Node> expr1;
+ RefPtr<Node> expr2;
};
class StatListNode : public StatementNode {
@@ -730,8 +730,8 @@
virtual void streamTo(SourceStream &s) const;
private:
friend class CaseClauseNode;
- SharedPtr<StatementNode> statement;
- SharedPtr<StatListNode> list;
+ RefPtr<StatementNode> statement;
+ RefPtr<StatListNode> list;
};
class AssignExprNode : public Node {
@@ -740,7 +740,7 @@
ValueImp *evaluate(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
+ RefPtr<Node> expr;
};
class VarDeclNode : public Node {
@@ -753,7 +753,7 @@
private:
Type varType;
Identifier ident;
- SharedPtr<AssignExprNode> init;
+ RefPtr<AssignExprNode> init;
};
class VarDeclListNode : public Node {
@@ -768,8 +768,8 @@
private:
friend class ForNode;
friend class VarStatementNode;
- SharedPtr<VarDeclListNode> list;
- SharedPtr<VarDeclNode> var;
+ RefPtr<VarDeclListNode> list;
+ RefPtr<VarDeclNode> var;
};
class VarStatementNode : public StatementNode {
@@ -779,7 +779,7 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<VarDeclListNode> list;
+ RefPtr<VarDeclListNode> list;
};
class BlockNode : public StatementNode {
@@ -789,7 +789,7 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
protected:
- SharedPtr<SourceElementsNode> source;
+ RefPtr<SourceElementsNode> source;
};
class EmptyStatementNode : public StatementNode {
@@ -805,7 +805,7 @@
virtual Completion execute(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
+ RefPtr<Node> expr;
};
class IfNode : public StatementNode {
@@ -816,9 +816,9 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
- SharedPtr<StatementNode> statement1;
- SharedPtr<StatementNode> statement2;
+ RefPtr<Node> expr;
+ RefPtr<StatementNode> statement1;
+ RefPtr<StatementNode> statement2;
};
class DoWhileNode : public StatementNode {
@@ -828,8 +828,8 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<StatementNode> statement;
- SharedPtr<Node> expr;
+ RefPtr<StatementNode> statement;
+ RefPtr<Node> expr;
};
class WhileNode : public StatementNode {
@@ -839,8 +839,8 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
- SharedPtr<StatementNode> statement;
+ RefPtr<Node> expr;
+ RefPtr<StatementNode> statement;
};
class ForNode : public StatementNode {
@@ -853,10 +853,10 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr1;
- SharedPtr<Node> expr2;
- SharedPtr<Node> expr3;
- SharedPtr<StatementNode> statement;
+ RefPtr<Node> expr1;
+ RefPtr<Node> expr2;
+ RefPtr<Node> expr3;
+ RefPtr<StatementNode> statement;
};
class ForInNode : public StatementNode {
@@ -868,11 +868,11 @@
virtual void streamTo(SourceStream &s) const;
private:
Identifier ident;
- SharedPtr<AssignExprNode> init;
- SharedPtr<Node> lexpr;
- SharedPtr<Node> expr;
- SharedPtr<VarDeclNode> varDecl;
- SharedPtr<StatementNode> statement;
+ RefPtr<AssignExprNode> init;
+ RefPtr<Node> lexpr;
+ RefPtr<Node> expr;
+ RefPtr<VarDeclNode> varDecl;
+ RefPtr<StatementNode> statement;
};
class ContinueNode : public StatementNode {
@@ -901,7 +901,7 @@
virtual Completion execute(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> value;
+ RefPtr<Node> value;
};
class WithNode : public StatementNode {
@@ -911,8 +911,8 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
- SharedPtr<StatementNode> statement;
+ RefPtr<Node> expr;
+ RefPtr<StatementNode> statement;
};
class CaseClauseNode : public Node {
@@ -925,8 +925,8 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
- SharedPtr<StatListNode> list;
+ RefPtr<Node> expr;
+ RefPtr<StatListNode> list;
};
class ClauseListNode : public Node {
@@ -942,8 +942,8 @@
virtual void streamTo(SourceStream &s) const;
private:
friend class CaseBlockNode;
- SharedPtr<CaseClauseNode> cl;
- SharedPtr<ClauseListNode> nx;
+ RefPtr<CaseClauseNode> cl;
+ RefPtr<ClauseListNode> nx;
};
class CaseBlockNode : public Node {
@@ -954,9 +954,9 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<ClauseListNode> list1;
- SharedPtr<CaseClauseNode> def;
- SharedPtr<ClauseListNode> list2;
+ RefPtr<ClauseListNode> list1;
+ RefPtr<CaseClauseNode> def;
+ RefPtr<ClauseListNode> list2;
};
class SwitchNode : public StatementNode {
@@ -966,8 +966,8 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
- SharedPtr<CaseBlockNode> block;
+ RefPtr<Node> expr;
+ RefPtr<CaseBlockNode> block;
};
class LabelNode : public StatementNode {
@@ -978,7 +978,7 @@
virtual void streamTo(SourceStream &s) const;
private:
Identifier label;
- SharedPtr<StatementNode> statement;
+ RefPtr<StatementNode> statement;
};
class ThrowNode : public StatementNode {
@@ -987,7 +987,7 @@
virtual Completion execute(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<Node> expr;
+ RefPtr<Node> expr;
};
class TryNode : public StatementNode {
@@ -998,10 +998,10 @@
virtual void processVarDecls(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
- SharedPtr<StatementNode> tryBlock;
+ RefPtr<StatementNode> tryBlock;
Identifier exceptionIdent;
- SharedPtr<StatementNode> catchBlock;
- SharedPtr<StatementNode> finallyBlock;
+ RefPtr<StatementNode> catchBlock;
+ RefPtr<StatementNode> finallyBlock;
};
class ParameterNode : public Node {
@@ -1018,7 +1018,7 @@
friend class FuncDeclNode;
friend class FuncExprNode;
Identifier id;
- SharedPtr<ParameterNode> next;
+ RefPtr<ParameterNode> next;
};
// inherited by ProgramNode
@@ -1038,8 +1038,8 @@
virtual void streamTo(SourceStream &) const;
private:
Identifier ident;
- SharedPtr<ParameterNode> param;
- SharedPtr<FunctionBodyNode> body;
+ RefPtr<ParameterNode> param;
+ RefPtr<FunctionBodyNode> body;
};
class FuncDeclNode : public StatementNode {
@@ -1053,8 +1053,8 @@
virtual void streamTo(SourceStream &) const;
private:
Identifier ident;
- SharedPtr<ParameterNode> param;
- SharedPtr<FunctionBodyNode> body;
+ RefPtr<ParameterNode> param;
+ RefPtr<FunctionBodyNode> body;
};
// A linked list of source element nodes
@@ -1070,8 +1070,8 @@
virtual void streamTo(SourceStream &s) const;
private:
friend class BlockNode;
- SharedPtr<StatementNode> element; // 'this' element
- SharedPtr<SourceElementsNode> elements; // pointer to next
+ RefPtr<StatementNode> element; // 'this' element
+ RefPtr<SourceElementsNode> elements; // pointer to next
};
class ProgramNode : public FunctionBodyNode {
1.21 +1 -1 JavaScriptCore/kjs/nodes2string.cpp
Index: nodes2string.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/nodes2string.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- nodes2string.cpp 3 Oct 2005 21:11:50 -0000 1.20
+++ nodes2string.cpp 1 Dec 2005 10:31:59 -0000 1.21
@@ -40,7 +40,7 @@
SourceStream& operator<<(char);
SourceStream& operator<<(Format f);
SourceStream& operator<<(const Node *);
- template <typename T> SourceStream& operator<<(SharedPtr<T> n) { return this->operator<<(n.get()); }
+ template <typename T> SourceStream& operator<<(RefPtr<T> n) { return this->operator<<(n.get()); }
private:
UString str; /* TODO: buffer */
UString ind;
1.14 +1 -1 JavaScriptCore/kjs/protect.h
Index: protect.h
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/protect.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- protect.h 1 Dec 2005 08:38:11 -0000 1.13
+++ protect.h 1 Dec 2005 10:31:59 -0000 1.14
@@ -51,7 +51,7 @@
if (val) gcUnprotect(val);
}
- // FIXME: Share more code with SharedPtr template? The only difference is the ref/deref operation.
+ // FIXME: Share more code with RefPtr template? The only difference is the ref/deref operation.
template <class T> class ProtectedPtr {
public:
ProtectedPtr() : m_ptr(NULL) { }
1.1 JavaScriptCore/kxmlcore/RefPtr.h
Index: RefPtr.h
===================================================================
// -*- mode: c++; c-basic-offset: 4 -*-
/*
* This file is part of the KDE libraries
* Copyright (C) 2005 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef KXMLCORE_SHARED_PTR_H
#define KXMLCORE_SHARED_PTR_H
namespace KXMLCore {
// FIXME: Change template name to RefPtr?
template <class T> class RefPtr
{
public:
RefPtr() : m_ptr(NULL) {}
RefPtr(T *ptr) : m_ptr(ptr) { if (ptr) ptr->ref(); }
RefPtr(const RefPtr &o) : m_ptr(o.m_ptr) { if (T *ptr = m_ptr) ptr->ref(); }
~RefPtr() { if (T *ptr = m_ptr) ptr->deref(); }
template <class U> RefPtr(const RefPtr<U> &o) : m_ptr(o.get()) { if (T *ptr = m_ptr) ptr->ref(); }
// FIXME: Deprecate in favor of operators below, then remove?
bool isNull() const { return m_ptr == NULL; }
bool notNull() const { return m_ptr != NULL; }
// FIXME: Deprecate in favor of operator=, then remove?
void reset() { if (T *ptr = m_ptr) ptr->deref(); m_ptr = NULL; }
void reset(T *o) { if (o) o->ref(); if (T *ptr = m_ptr) ptr->deref(); m_ptr = o; }
T *get() const { return m_ptr; }
T &operator*() const { return *m_ptr; }
T *operator->() const { return m_ptr; }
bool operator!() const { return m_ptr == NULL; }
// this type conversion operator allows implicit conversion to
// bool but not to other integer types
typedef T * (RefPtr::*UnspecifiedBoolType)() const;
operator UnspecifiedBoolType() const
{
return m_ptr ? &RefPtr::get : 0;
}
RefPtr &operator=(const RefPtr &);
RefPtr &operator=(T *);
private:
T *m_ptr;
};
template <class T> RefPtr<T> &RefPtr<T>::operator=(const RefPtr<T> &o)
{
T *optr = o.m_ptr;
if (optr)
optr->ref();
if (T *ptr = m_ptr)
ptr->deref();
m_ptr = optr;
return *this;
}
template <class T> inline RefPtr<T> &RefPtr<T>::operator=(T *optr)
{
if (optr)
optr->ref();
if (T *ptr = m_ptr)
ptr->deref();
m_ptr = optr;
return *this;
}
template <class T> inline bool operator==(const RefPtr<T> &a, const RefPtr<T> &b)
{
return a.get() == b.get();
}
template <class T> inline bool operator==(const RefPtr<T> &a, const T *b)
{
return a.get() == b;
}
template <class T> inline bool operator==(const T *a, const RefPtr<T> &b)
{
return a == b.get();
}
template <class T> inline bool operator!=(const RefPtr<T> &a, const RefPtr<T> &b)
{
return a.get() != b.get();
}
template <class T> inline bool operator!=(const RefPtr<T> &a, const T *b)
{
return a.get() != b;
}
template <class T> inline bool operator!=(const T *a, const RefPtr<T> &b)
{
return a != b.get();
}
template <class T, class U> inline RefPtr<T> static_pointer_cast(const RefPtr<U> &p)
{
return RefPtr<T>(static_cast<T *>(p.get()));
}
template <class T, class U> inline RefPtr<T> const_pointer_cast(const RefPtr<U> &p)
{
return RefPtr<T>(const_cast<T *>(p.get()));
}
} // namespace KXMLCore
using KXMLCore::RefPtr;
using KXMLCore::static_pointer_cast;
using KXMLCore::const_pointer_cast;
#endif // KXMLCORE_SHARED_PTR_H
1.444 +184 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.443
retrieving revision 1.444
diff -u -r1.443 -r1.444
--- ChangeLog 1 Dec 2005 08:38:12 -0000 1.443
+++ ChangeLog 1 Dec 2005 10:32:01 -0000 1.444
@@ -1,3 +1,187 @@
+2005-12-01 Maciej Stachowiak <mjs at apple.com>
+
+ Rubber stamped by Eric.
+
+ - renamed SharedPtr to RefPtr via script
+
+ * ForwardingHeaders/kxmlcore/RefPtr.h: Added.
+ * ForwardingHeaders/kxmlcore/SharedPtr.h: Removed.
+ * khtml/css/css_computedstyle.h:
+ * khtml/ecma/XSLTProcessor.cpp:
+ (KJS::XSLTProcessorProtoFunc::callAsFunction):
+ * khtml/ecma/XSLTProcessor.h:
+ * khtml/ecma/domparser.h:
+ * khtml/ecma/kjs_css.h:
+ * khtml/ecma/kjs_dom.cpp:
+ (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
+ (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
+ * khtml/ecma/kjs_dom.h:
+ * khtml/ecma/kjs_events.h:
+ * khtml/ecma/kjs_html.cpp:
+ (KJS::HTMLDocument::namedItemGetter):
+ (KJS::KJS::HTMLCollection::getNamedItems):
+ (KJS::OptionConstructorImp::construct):
+ * khtml/ecma/kjs_html.h:
+ * khtml/ecma/kjs_range.h:
+ * khtml/ecma/kjs_traversal.h:
+ * khtml/ecma/kjs_views.h:
+ * khtml/ecma/kjs_window.cpp:
+ (KJS::Window::namedItemGetter):
+ * khtml/ecma/xmlhttprequest.h:
+ * khtml/editing/SelectionController.cpp:
+ (khtml::SelectionController::toRange):
+ * khtml/editing/SelectionController.h:
+ * khtml/editing/apply_style_command.cpp:
+ (khtml::StyleChange::init):
+ (khtml::StyleChange::currentlyHasStyle):
+ (khtml::ApplyStyleCommand::doApply):
+ (khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
+ (khtml::ApplyStyleCommand::removeCSSStyle):
+ (khtml::hasTextDecorationProperty):
+ (khtml::ApplyStyleCommand::extractTextDecorationStyle):
+ (khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle):
+ (khtml::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode):
+ (khtml::ApplyStyleCommand::removeInlineStyle):
+ (khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
+ (khtml::ApplyStyleCommand::computedFontSize):
+ * khtml/editing/apply_style_command.h:
+ * khtml/editing/edit_command.cpp:
+ (khtml::EditCommandPtr::EditCommandPtr):
+ (khtml::EditCommandPtr::operator=):
+ * khtml/editing/edit_command.h:
+ * khtml/editing/markup.cpp:
+ (khtml::startMarkup):
+ * khtml/editing/visible_position.cpp:
+ (khtml::makeRange):
+ * khtml/editing/visible_position.h:
+ * khtml/editing/visible_range.h:
+ * khtml/editing/visible_text.cpp:
+ (khtml::TextIterator::range):
+ (khtml::SimplifiedBackwardsTextIterator::range):
+ (khtml::CharacterIterator::range):
+ (khtml::TextIterator::rangeFromLocationAndLength):
+ (khtml::findPlainText):
+ * khtml/editing/visible_text.h:
+ (khtml::WordAwareIterator::range):
+ * khtml/editing/visible_units.cpp:
+ (khtml::previousBoundary):
+ (khtml::nextBoundary):
+ * khtml/html/html_elementimpl.cpp:
+ (HTMLElementImpl::children):
+ * khtml/html/html_elementimpl.h:
+ * khtml/html/html_formimpl.cpp:
+ (DOM::HTMLFormElementImpl::elements):
+ (DOM::HTMLSelectElementImpl::add):
+ (DOM::HTMLSelectElementImpl::optionsHTMLCollection):
+ * khtml/html/html_formimpl.h:
+ * khtml/html/html_imageimpl.cpp:
+ (DOM::HTMLMapElementImpl::areas):
+ * khtml/html/html_imageimpl.h:
+ * khtml/html/html_miscimpl.cpp:
+ (DOM::HTMLCollectionImpl::namedItems):
+ * khtml/html/html_miscimpl.h:
+ * khtml/html/html_tableimpl.cpp:
+ (DOM::HTMLTableElementImpl::rows):
+ (DOM::HTMLTableElementImpl::tBodies):
+ (DOM::HTMLTableSectionElementImpl::insertRow):
+ (DOM::HTMLTableSectionElementImpl::deleteRow):
+ (DOM::HTMLTableSectionElementImpl::rows):
+ (DOM::HTMLTableRowElementImpl::insertCell):
+ (DOM::HTMLTableRowElementImpl::deleteCell):
+ (DOM::HTMLTableRowElementImpl::cells):
+ * khtml/html/html_tableimpl.h:
+ * khtml/html/htmlparser.cpp:
+ (HTMLParser::parseToken):
+ (HTMLParser::insertNode):
+ * khtml/khtml_events.h:
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::selectionHasStyle):
+ (KHTMLPart::selectionStartHasStyle):
+ (KHTMLPart::selectionComputedStyle):
+ (KHTMLPart::applyEditingStyleToBodyElement):
+ (KHTMLPart::removeEditingStyleFromBodyElement):
+ * khtml/khtmlpart_p.h:
+ * khtml/khtmlview.cpp:
+ (KHTMLView::viewportMousePressEvent):
+ (KHTMLView::viewportMouseDoubleClickEvent):
+ (KHTMLView::viewportMouseReleaseEvent):
+ (KHTMLView::dispatchMouseEvent):
+ * khtml/misc/shared.h:
+ * khtml/rendering/bidi.cpp:
+ * khtml/rendering/render_block.cpp:
+ (khtml::RenderBlock::updateFirstLetter):
+ * khtml/rendering/render_line.h:
+ * khtml/rendering/render_text.cpp:
+ (RenderText::setStyle):
+ (RenderText::originalString):
+ (RenderTextFragment::originalString):
+ * khtml/rendering/render_text.h:
+ * khtml/xml/dom2_eventsimpl.h:
+ * khtml/xml/dom2_rangeimpl.cpp:
+ (DOM::rangeOfContents):
+ * khtml/xml/dom2_rangeimpl.h:
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::adoptNode):
+ (DocumentImpl::setFocusNode):
+ (DocumentImpl::addMarker):
+ (DocumentImpl::removeMarkers):
+ (DocumentImpl::applyXSLTransform):
+ (DocumentImpl::images):
+ (DocumentImpl::applets):
+ (DocumentImpl::embeds):
+ (DocumentImpl::objects):
+ (DocumentImpl::links):
+ (DocumentImpl::forms):
+ (DocumentImpl::anchors):
+ (DocumentImpl::all):
+ (DocumentImpl::windowNamedItems):
+ (DocumentImpl::documentNamedItems):
+ (DocumentImpl::getElementsByName):
+ * khtml/xml/dom_docimpl.h:
+ (DOM::DocumentImpl::transformSourceDocument):
+ * khtml/xml/dom_elementimpl.cpp:
+ (ElementImpl::setAttributeNode):
+ (ElementImpl::removeAttributeNode):
+ (NamedAttrMapImpl::removeNamedItemNS):
+ (NamedAttrMapImpl::setNamedItem):
+ (NamedAttrMapImpl::removeNamedItem):
+ * khtml/xml/dom_elementimpl.h:
+ (DOM::ElementImpl::setAttributeNodeNS):
+ * khtml/xml/dom_nodeimpl.cpp:
+ (DOM::NodeImpl::childNodes):
+ (DOM::NodeImpl::dispatchWindowEvent):
+ (DOM::NodeImpl::dispatchMouseEvent):
+ (DOM::NodeImpl::getElementsByTagNameNS):
+ (DOM::ContainerNodeImpl::insertBefore):
+ (DOM::ContainerNodeImpl::replaceChild):
+ (DOM::ContainerNodeImpl::appendChild):
+ (DOM::ContainerNodeImpl::addChild):
+ * khtml/xml/dom_nodeimpl.h:
+ (DOM::NodeImpl::getElementsByTagName):
+ (DOM::NamedNodeMapImpl::removeNamedItem):
+ (DOM::NamedNodeMapImpl::setNamedItemNS):
+ * khtml/xml/dom_xmlimpl.h:
+ * khtml/xsl/xslt_processorimpl.cpp:
+ (DOM::XSLTProcessorImpl::createDocumentFromSource):
+ (DOM::createFragmentFromSource):
+ (DOM::xsltStylesheetPointer):
+ (DOM::xmlDocPtrFromNode):
+ (DOM::XSLTProcessorImpl::transformToString):
+ (DOM::XSLTProcessorImpl::transformToDocument):
+ (DOM::XSLTProcessorImpl::transformToFragment):
+ (DOM::XSLTProcessorImpl::getParameter):
+ * khtml/xsl/xslt_processorimpl.h:
+ * kwq/KWQClipboard.h:
+ * kwq/KWQKHTMLPart.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::findString):
+ (KWQKHTMLPart::advanceToNextMisspelling):
+ (KWQKHTMLPart::fontForSelection):
+ (KWQKHTMLPart::markMisspellings):
+ (KWQKHTMLPart::shouldClose):
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge convertToNSRange:DOM::]):
+
2005-11-30 Maciej Stachowiak <mjs at apple.com>
Reviewed by Dave Hyatt.
1.1 WebCore/ForwardingHeaders/kxmlcore/RefPtr.h
Index: RefPtr.h
===================================================================
#import <JavaScriptCore/RefPtr.h>
1.9 +1 -1 WebCore/khtml/khtml_events.h
Index: khtml_events.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/khtml_events.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- khtml_events.h 16 Sep 2005 22:42:00 -0000 1.8
+++ khtml_events.h 1 Dec 2005 10:32:06 -0000 1.9
@@ -58,7 +58,7 @@
int m_nodeAbsX, m_nodeAbsY;
DOM::DOMString m_url;
DOM::DOMString m_target;
- SharedPtr<DOM::NodeImpl> m_innerNode;
+ RefPtr<DOM::NodeImpl> m_innerNode;
class MouseEventPrivate;
MouseEventPrivate *d;
};
1.361 +6 -6 WebCore/khtml/khtml_part.cpp
Index: khtml_part.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/khtml_part.cpp,v
retrieving revision 1.360
retrieving revision 1.361
diff -u -r1.360 -r1.361
--- khtml_part.cpp 30 Nov 2005 11:49:38 -0000 1.360
+++ khtml_part.cpp 1 Dec 2005 10:32:06 -0000 1.361
@@ -3213,7 +3213,7 @@
TriState state = falseTriState;
CSSMutableStyleDeclarationImpl *mutableStyle = style->makeMutable();
- SharedPtr<CSSStyleDeclarationImpl> protectQueryStyle(mutableStyle);
+ RefPtr<CSSStyleDeclarationImpl> protectQueryStyle(mutableStyle);
if (!d->m_selection.isRange()) {
NodeImpl *nodeToRemove;
@@ -3255,8 +3255,8 @@
CSSMutableStyleDeclarationImpl *mutableStyle = style->makeMutable();
- SharedPtr<CSSStyleDeclarationImpl> protectSelectionStyle(selectionStyle);
- SharedPtr<CSSStyleDeclarationImpl> protectQueryStyle(mutableStyle);
+ RefPtr<CSSStyleDeclarationImpl> protectSelectionStyle(selectionStyle);
+ RefPtr<CSSStyleDeclarationImpl> protectQueryStyle(mutableStyle);
bool match = true;
QValueListConstIterator<CSSProperty> end;
@@ -3309,7 +3309,7 @@
if (d->m_selection.isNone())
return 0;
- SharedPtr<RangeImpl> range(d->m_selection.toRange());
+ RefPtr<RangeImpl> range(d->m_selection.toRange());
Position pos = range->editingStartPosition();
ElementImpl *elem = pos.element();
@@ -3370,7 +3370,7 @@
if (!d->m_doc)
return;
- SharedPtr<NodeListImpl> list = d->m_doc->getElementsByTagName("body");
+ RefPtr<NodeListImpl> list = d->m_doc->getElementsByTagName("body");
unsigned len = list->length();
for (unsigned i = 0; i < len; i++) {
applyEditingStyleToElement(static_cast<ElementImpl *>(list->item(i)));
@@ -3382,7 +3382,7 @@
if (!d->m_doc)
return;
- SharedPtr<NodeListImpl> list = d->m_doc->getElementsByTagName("body");
+ RefPtr<NodeListImpl> list = d->m_doc->getElementsByTagName("body");
unsigned len = list->length();
for (unsigned i = 0; i < len; i++) {
removeEditingStyleFromElement(static_cast<ElementImpl *>(list->item(i)));
1.62 +2 -2 WebCore/khtml/khtmlpart_p.h
Index: khtmlpart_p.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/khtmlpart_p.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- khtmlpart_p.h 21 Nov 2005 01:19:48 -0000 1.61
+++ khtmlpart_p.h 1 Dec 2005 10:32:07 -0000 1.62
@@ -216,7 +216,7 @@
long m_cacheId;
#endif
QString scheduledScript;
- SharedPtr<DOM::NodeImpl> scheduledScriptNode;
+ RefPtr<DOM::NodeImpl> scheduledScriptNode;
KJSProxy *m_jscript;
KLibrary *m_kjs_lib;
@@ -293,7 +293,7 @@
SubmitForm *m_submitForm;
bool m_bMousePressed;
- SharedPtr<DOM::NodeImpl> m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
+ RefPtr<DOM::NodeImpl> m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
khtml::ETextGranularity m_selectionGranularity;
bool m_beganSelectingText;
1.154 +5 -5 WebCore/khtml/khtmlview.cpp
Index: khtmlview.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/khtmlview.cpp,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -r1.153 -r1.154
--- khtmlview.cpp 21 Nov 2005 01:19:48 -0000 1.153
+++ khtmlview.cpp 1 Dec 2005 10:32:07 -0000 1.154
@@ -202,7 +202,7 @@
// after all layout has been completed.
QPtrList<RenderObject::RepaintInfo>* repaintRects;
- SharedPtr<NodeImpl> dragTarget;
+ RefPtr<NodeImpl> dragTarget;
};
#ifndef QT_NO_TOOLTIP
@@ -614,7 +614,7 @@
{
if(!m_part->xmlDocImpl()) return;
- SharedPtr<KHTMLView> protector(this);
+ RefPtr<KHTMLView> protector(this);
int xm, ym;
viewportToContents(_mouse->x(), _mouse->y(), xm, ym);
@@ -662,7 +662,7 @@
{
if(!m_part->xmlDocImpl()) return;
- SharedPtr<KHTMLView> protector(this);
+ RefPtr<KHTMLView> protector(this);
int xm, ym;
viewportToContents(_mouse->x(), _mouse->y(), xm, ym);
@@ -838,7 +838,7 @@
{
if ( !m_part->xmlDocImpl() ) return;
- SharedPtr<KHTMLView> protector(this);
+ RefPtr<KHTMLView> protector(this);
int xm, ym;
viewportToContents(_mouse->x(), _mouse->y(), xm, ym);
@@ -1224,7 +1224,7 @@
// it again. calculating is expensive! (Dirk)
// Also, there's no guarantee that the old under node is even around any more,
// so we could be sending a mouseout to a node that never got a mouseover.
- SharedPtr<NodeImpl> oldUnder;
+ RefPtr<NodeImpl> oldUnder;
if (d->prevMouseX >= 0 && d->prevMouseY >= 0) {
NodeImpl::MouseEvent mev( _mouse->stateAfter(), static_cast<NodeImpl::MouseEventType>(mouseEventType));
m_part->xmlDocImpl()->prepareMouseEvent( true, d->prevMouseX, d->prevMouseY, &mev );
1.10 +1 -1 WebCore/khtml/css/css_computedstyle.h
Index: css_computedstyle.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/css/css_computedstyle.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- css_computedstyle.h 16 Sep 2005 22:42:01 -0000 1.9
+++ css_computedstyle.h 1 Dec 2005 10:32:08 -0000 1.10
@@ -63,7 +63,7 @@
virtual DOMString removeProperty(int propertyID, int &exceptionCode);
virtual void setProperty(int propertyId, const DOMString &value, bool important, int &exceptionCode);
- SharedPtr<NodeImpl> m_node;
+ RefPtr<NodeImpl> m_node;
};
}
1.3 +1 -1 WebCore/khtml/ecma/XSLTProcessor.cpp
Index: XSLTProcessor.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/XSLTProcessor.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XSLTProcessor.cpp 28 Oct 2005 00:49:53 -0000 1.2
+++ XSLTProcessor.cpp 1 Dec 2005 10:32:08 -0000 1.3
@@ -103,7 +103,7 @@
ValueImp *nodeVal = args[0];
if (nodeVal->isObject(&DOMNode::info)) {
DOMNode *node = static_cast<DOMNode *>(nodeVal);
- SharedPtr<DocumentImpl> resultDocument = processor.transformToDocument(node->impl());
+ RefPtr<DocumentImpl> resultDocument = processor.transformToDocument(node->impl());
if (resultDocument)
return getDOMDocumentNode(exec, resultDocument.get());
return jsUndefined();
1.3 +2 -2 WebCore/khtml/ecma/XSLTProcessor.h
Index: XSLTProcessor.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/XSLTProcessor.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XSLTProcessor.h 28 Oct 2005 00:49:53 -0000 1.2
+++ XSLTProcessor.h 1 Dec 2005 10:32:09 -0000 1.3
@@ -28,7 +28,7 @@
#ifndef XSLTProcessor_H
#define XSLTProcessor_H
-#include <kxmlcore/SharedPtr.h>
+#include <kxmlcore/RefPtr.h>
#include "kjs_binding.h"
namespace DOM {
@@ -54,7 +54,7 @@
DOM::XSLTProcessorImpl *impl() const { return m_impl.get(); }
private:
- SharedPtr<DOM::XSLTProcessorImpl> m_impl;
+ RefPtr<DOM::XSLTProcessorImpl> m_impl;
};
class XSLTProcessorConstructorImp : public ObjectImp {
1.4 +1 -1 WebCore/khtml/ecma/domparser.h
Index: domparser.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/domparser.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- domparser.h 27 Sep 2005 22:37:03 -0000 1.3
+++ domparser.h 1 Dec 2005 10:32:09 -0000 1.4
@@ -33,7 +33,7 @@
virtual bool implementsConstruct() const;
virtual ObjectImp *construct(ExecState *exec, const List &args);
private:
- SharedPtr<DOM::DocumentImpl> doc;
+ RefPtr<DOM::DocumentImpl> doc;
};
class DOMParser : public DOMObject {
1.21 +10 -10 WebCore/khtml/ecma/kjs_css.h
Index: kjs_css.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_css.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- kjs_css.h 27 Sep 2005 22:37:03 -0000 1.20
+++ kjs_css.h 1 Dec 2005 10:32:09 -0000 1.21
@@ -63,7 +63,7 @@
static ValueImp *indexGetter(ExecState *, const Identifier&, const PropertySlot&);
static ValueImp *cssPropertyGetter(ExecState *, const Identifier&, const PropertySlot&);
- SharedPtr<DOM::CSSStyleDeclarationImpl> m_impl;
+ RefPtr<DOM::CSSStyleDeclarationImpl> m_impl;
};
ValueImp *getDOMCSSStyleDeclaration(ExecState *exec, DOM::CSSStyleDeclarationImpl *d);
@@ -84,7 +84,7 @@
// Constructor for derived classes; doesn't set up a prototype.
DOMStyleSheet(DOM::StyleSheetImpl *ss) : m_impl(ss) { }
private:
- SharedPtr<DOM::StyleSheetImpl> m_impl;
+ RefPtr<DOM::StyleSheetImpl> m_impl;
};
ValueImp *getDOMStyleSheet(ExecState *exec, DOM::StyleSheetImpl *ss);
@@ -106,8 +106,8 @@
static ValueImp *indexGetter(ExecState *, const Identifier&, const PropertySlot&);
static ValueImp *nameGetter(ExecState *, const Identifier&, const PropertySlot&);
- SharedPtr<DOM::StyleSheetListImpl> m_impl;
- SharedPtr<DOM::DocumentImpl> m_doc;
+ RefPtr<DOM::StyleSheetListImpl> m_impl;
+ RefPtr<DOM::DocumentImpl> m_doc;
};
// The document is only used for get-stylesheet-by-name (make optional if necessary)
@@ -128,7 +128,7 @@
DOM::MediaListImpl *impl() const { return m_impl.get(); }
private:
static ValueImp *indexGetter(ExecState *exec, const Identifier&, const PropertySlot& slot);
- SharedPtr<DOM::MediaListImpl> m_impl;
+ RefPtr<DOM::MediaListImpl> m_impl;
};
ValueImp *getDOMMediaList(ExecState *exec, DOM::MediaListImpl *ml);
@@ -159,7 +159,7 @@
private:
static ValueImp *indexGetter(ExecState *exec, const Identifier&, const PropertySlot& slot);
- SharedPtr<DOM::CSSRuleListImpl> m_impl;
+ RefPtr<DOM::CSSRuleListImpl> m_impl;
};
ValueImp *getDOMCSSRuleList(ExecState *exec, DOM::CSSRuleListImpl *rl);
@@ -181,7 +181,7 @@
Import_Href, Import_Media, Import_StyleSheet, Charset_Encoding };
DOM::CSSRuleImpl *impl() const { return m_impl.get(); }
private:
- SharedPtr<DOM::CSSRuleImpl> m_impl;
+ RefPtr<DOM::CSSRuleImpl> m_impl;
};
ValueImp *getDOMCSSRule(ExecState *exec, DOM::CSSRuleImpl *r);
@@ -215,7 +215,7 @@
// Constructor for derived classes; doesn't set up a prototype.
DOMCSSValue(DOM::CSSValueImpl *v) : m_impl(v) { }
private:
- SharedPtr<DOM::CSSValueImpl> m_impl;
+ RefPtr<DOM::CSSValueImpl> m_impl;
};
ValueImp *getDOMCSSValue(ExecState *exec, DOM::CSSValueImpl *v);
@@ -299,7 +299,7 @@
static const ClassInfo info;
enum { Top, Right, Bottom, Left };
private:
- SharedPtr<DOM::RectImpl> m_rect;
+ RefPtr<DOM::RectImpl> m_rect;
};
ValueImp *getDOMRect(ExecState *exec, DOM::RectImpl *r);
@@ -315,7 +315,7 @@
static const ClassInfo info;
enum { identifier, listStyle, separator };
protected:
- SharedPtr<DOM::CounterImpl> m_counter;
+ RefPtr<DOM::CounterImpl> m_counter;
};
ValueImp *getDOMCounter(ExecState *exec, DOM::CounterImpl *c);
1.115 +3 -3 WebCore/khtml/ecma/kjs_dom.cpp
Index: kjs_dom.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_dom.cpp,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- kjs_dom.cpp 29 Nov 2005 16:15:01 -0000 1.114
+++ kjs_dom.cpp 1 Dec 2005 10:32:09 -0000 1.115
@@ -1860,7 +1860,7 @@
// Such a collection is usually very short-lived, it only exists
// for constructs like document.forms.<name>[1],
// so it shouldn't be a problem that it's storing all the nodes (with the same name). (David)
-DOMNamedNodesCollection::DOMNamedNodesCollection(ExecState *, const QValueList< SharedPtr<NodeImpl> >& nodes )
+DOMNamedNodesCollection::DOMNamedNodesCollection(ExecState *, const QValueList< RefPtr<NodeImpl> >& nodes )
: m_nodes(nodes)
{
}
@@ -1895,9 +1895,9 @@
// For IE compatibility, we need to be able to look up elements in a
// document.formName.name result by id as well as be index.
- QValueListConstIterator< SharedPtr<NodeImpl> > end = m_nodes.end();
+ QValueListConstIterator< RefPtr<NodeImpl> > end = m_nodes.end();
int i = 0;
- for (QValueListConstIterator< SharedPtr<NodeImpl> > it = m_nodes.begin(); it != end; ++it, ++i) {
+ for (QValueListConstIterator< RefPtr<NodeImpl> > it = m_nodes.begin(); it != end; ++it, ++i) {
NodeImpl *node = (*it).get();
if (node->hasAttributes() &&
node->attributes()->id() == propertyName.domString()) {
1.61 +6 -6 WebCore/khtml/ecma/kjs_dom.h
Index: kjs_dom.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_dom.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- kjs_dom.h 29 Nov 2005 09:07:57 -0000 1.60
+++ kjs_dom.h 1 Dec 2005 10:32:09 -0000 1.61
@@ -83,7 +83,7 @@
protected:
// Constructor for inherited classes; doesn't set up a prototype.
DOMNode(DOM::NodeImpl *n);
- SharedPtr<DOM::NodeImpl> m_impl;
+ RefPtr<DOM::NodeImpl> m_impl;
};
DOM::NodeImpl *toNode(ValueImp *); // returns 0 if passed-in value is not a DOMNode object
@@ -109,7 +109,7 @@
static ValueImp *indexGetter(ExecState *exec, const Identifier&, const PropertySlot& slot);
static ValueImp *nameGetter(ExecState *exec, const Identifier&, const PropertySlot& slot);
- SharedPtr<DOM::NodeListImpl> m_impl;
+ RefPtr<DOM::NodeListImpl> m_impl;
};
class DOMDocument : public DOMNode {
@@ -190,7 +190,7 @@
enum { HasFeature, CreateDocumentType, CreateDocument, CreateCSSStyleSheet, CreateHTMLDocument };
DOM::DOMImplementationImpl *impl() const { return m_impl.get(); }
private:
- SharedPtr<DOM::DOMImplementationImpl> m_impl;
+ RefPtr<DOM::DOMImplementationImpl> m_impl;
};
class DOMDocumentType : public DOMNode {
@@ -223,7 +223,7 @@
static ValueImp *indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot);
static ValueImp *nameGetter(ExecState *exec, const Identifier&, const PropertySlot& slot);
- SharedPtr<DOM::NamedNodeMapImpl> m_impl;
+ RefPtr<DOM::NamedNodeMapImpl> m_impl;
};
class DOMProcessingInstruction : public DOMNode {
@@ -295,13 +295,13 @@
// when multiple nodes have the same name.
class DOMNamedNodesCollection : public DOMObject {
public:
- DOMNamedNodesCollection(ExecState *exec, const QValueList< SharedPtr<DOM::NodeImpl> >& nodes );
+ DOMNamedNodesCollection(ExecState *exec, const QValueList< RefPtr<DOM::NodeImpl> >& nodes );
virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
private:
static ValueImp *lengthGetter(ExecState* exec, const Identifier&, const PropertySlot& slot);
static ValueImp *indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot);
- QValueList< SharedPtr<DOM::NodeImpl> > m_nodes;
+ QValueList< RefPtr<DOM::NodeImpl> > m_nodes;
};
class DOMCharacterData : public DOMNode {
1.35 +1 -1 WebCore/khtml/ecma/kjs_events.h
Index: kjs_events.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_events.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- kjs_events.h 27 Sep 2005 22:37:03 -0000 1.34
+++ kjs_events.h 1 Dec 2005 10:32:09 -0000 1.35
@@ -127,7 +127,7 @@
SrcElement, ReturnValue, CancelBubble, ClipboardData, DataTransfer };
DOM::EventImpl *impl() const { return m_impl.get(); }
protected:
- SharedPtr<DOM::EventImpl> m_impl;
+ RefPtr<DOM::EventImpl> m_impl;
mutable Clipboard *clipboard;
};
1.147 +3 -3 WebCore/khtml/ecma/kjs_html.cpp
Index: kjs_html.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_html.cpp,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -r1.146 -r1.147
--- kjs_html.cpp 21 Nov 2005 01:19:55 -0000 1.146
+++ kjs_html.cpp 1 Dec 2005 10:32:09 -0000 1.147
@@ -269,7 +269,7 @@
HTMLDocumentImpl &doc = *static_cast<HTMLDocumentImpl *>(thisObj->impl());
DOMString name = propertyName.domString();
- SharedPtr<DOM::HTMLCollectionImpl> collection = doc.documentNamedItems(name);
+ RefPtr<DOM::HTMLCollectionImpl> collection = doc.documentNamedItems(name);
if (collection->length() == 1) {
NodeImpl *node = collection->firstItem();
@@ -3405,7 +3405,7 @@
#endif
DOM::DOMString pstr = propertyName.domString();
- QValueList< SharedPtr<NodeImpl> > namedItems = m_impl->namedItems(pstr);
+ QValueList< RefPtr<NodeImpl> > namedItems = m_impl->namedItems(pstr);
if (namedItems.isEmpty()) {
#ifdef KJS_VERBOSE
@@ -3564,7 +3564,7 @@
ObjectImp *OptionConstructorImp::construct(ExecState *exec, const List &args)
{
int exception = 0;
- SharedPtr<ElementImpl> el(m_doc->createElement("option", exception));
+ RefPtr<ElementImpl> el(m_doc->createElement("option", exception));
HTMLOptionElementImpl *opt = 0;
if (el.notNull()) {
opt = static_cast<HTMLOptionElementImpl *>(el.get());
1.60 +5 -5 WebCore/khtml/ecma/kjs_html.h
Index: kjs_html.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_html.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- kjs_html.h 21 Nov 2005 01:19:56 -0000 1.59
+++ kjs_html.h 1 Dec 2005 10:32:09 -0000 1.60
@@ -312,7 +312,7 @@
static const ClassInfo info;
DOM::HTMLCollectionImpl *impl() const { return m_impl.get(); }
protected:
- SharedPtr<DOM::HTMLCollectionImpl> m_impl;
+ RefPtr<DOM::HTMLCollectionImpl> m_impl;
private:
static ValueImp *lengthGetter(ExecState *exec, const Identifier&, const PropertySlot& slot);
static ValueImp *indexGetter(ExecState *exec, const Identifier&, const PropertySlot& slot);
@@ -327,7 +327,7 @@
private:
static ValueImp *selectedIndexGetter(ExecState *exec, const Identifier&, const PropertySlot& slot);
- SharedPtr<DOM::HTMLSelectElementImpl> m_element;
+ RefPtr<DOM::HTMLSelectElementImpl> m_element;
};
////////////////////// Option Object ////////////////////////
@@ -338,7 +338,7 @@
virtual bool implementsConstruct() const;
virtual ObjectImp *construct(ExecState *exec, const List &args);
private:
- SharedPtr<DOM::DocumentImpl> m_doc;
+ RefPtr<DOM::DocumentImpl> m_doc;
};
////////////////////// Image Object ////////////////////////
@@ -349,7 +349,7 @@
virtual bool implementsConstruct() const;
virtual ObjectImp *construct(ExecState *exec, const List &args);
private:
- SharedPtr<DOM::DocumentImpl> m_doc;
+ RefPtr<DOM::DocumentImpl> m_doc;
};
class Image : public DOMObject, public khtml::CachedObjectClient {
@@ -438,7 +438,7 @@
void setShadow(ExecState *exec);
- SharedPtr<DOM::HTMLElementImpl> _element;
+ RefPtr<DOM::HTMLElementImpl> _element;
bool _needsFlushRasterCache;
QPtrList<List> stateStack;
1.11 +1 -1 WebCore/khtml/ecma/kjs_range.h
Index: kjs_range.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_range.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- kjs_range.h 27 Sep 2005 22:37:04 -0000 1.10
+++ kjs_range.h 1 Dec 2005 10:32:10 -0000 1.11
@@ -47,7 +47,7 @@
Detach, CreateContextualFragment };
DOM::RangeImpl *impl() const { return m_impl.get(); }
private:
- SharedPtr<DOM::RangeImpl> m_impl;
+ RefPtr<DOM::RangeImpl> m_impl;
};
// Constructor object Range
1.13 +3 -3 WebCore/khtml/ecma/kjs_traversal.h
Index: kjs_traversal.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_traversal.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- kjs_traversal.h 27 Sep 2005 22:37:04 -0000 1.12
+++ kjs_traversal.h 1 Dec 2005 10:32:10 -0000 1.13
@@ -46,7 +46,7 @@
NextNode, PreviousNode, Detach };
DOM::NodeIteratorImpl *impl() const { return m_impl.get(); }
private:
- SharedPtr<DOM::NodeIteratorImpl> m_impl;
+ RefPtr<DOM::NodeIteratorImpl> m_impl;
};
// Constructor object NodeFilter
@@ -70,7 +70,7 @@
DOM::NodeFilterImpl *impl() const { return m_impl.get(); }
enum { AcceptNode };
private:
- SharedPtr<DOM::NodeFilterImpl> m_impl;
+ RefPtr<DOM::NodeFilterImpl> m_impl;
};
class DOMTreeWalker : public DOMObject {
@@ -87,7 +87,7 @@
PreviousNode, NextNode };
DOM::TreeWalkerImpl *impl() const { return m_impl.get(); }
private:
- SharedPtr<DOM::TreeWalkerImpl> m_impl;
+ RefPtr<DOM::TreeWalkerImpl> m_impl;
};
ValueImp *getDOMNodeIterator(ExecState *exec, DOM::NodeIteratorImpl *ni);
1.13 +1 -1 WebCore/khtml/ecma/kjs_views.h
Index: kjs_views.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_views.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- kjs_views.h 20 Nov 2005 21:34:14 -0000 1.12
+++ kjs_views.h 1 Dec 2005 10:32:10 -0000 1.13
@@ -41,7 +41,7 @@
DOM::AbstractViewImpl *impl() const { return m_impl.get(); }
enum { Document, GetComputedStyle };
private:
- SharedPtr<DOM::AbstractViewImpl> m_impl;
+ RefPtr<DOM::AbstractViewImpl> m_impl;
};
ValueImp *getDOMAbstractView(ExecState *exec, DOM::AbstractViewImpl *av);
1.191 +1 -1 WebCore/khtml/ecma/kjs_window.cpp
Index: kjs_window.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_window.cpp,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -r1.190 -r1.191
--- kjs_window.cpp 27 Nov 2005 07:54:50 -0000 1.190
+++ kjs_window.cpp 1 Dec 2005 10:32:10 -0000 1.191
@@ -953,7 +953,7 @@
assert(thisObj->isSafeScript(exec) && doc && doc->isHTMLDocument());
DOMString name = propertyName.domString();
- SharedPtr<DOM::HTMLCollectionImpl> collection = doc->windowNamedItems(name);
+ RefPtr<DOM::HTMLCollectionImpl> collection = doc->windowNamedItems(name);
if (collection->length() == 1)
return getDOMNode(exec, collection->firstItem());
else
1.22 +4 -4 WebCore/khtml/ecma/xmlhttprequest.h
Index: xmlhttprequest.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/xmlhttprequest.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- xmlhttprequest.h 21 Nov 2005 01:19:57 -0000 1.21
+++ xmlhttprequest.h 1 Dec 2005 10:32:10 -0000 1.22
@@ -58,7 +58,7 @@
virtual bool implementsConstruct() const;
virtual ObjectImp *construct(ExecState *exec, const List &args);
private:
- SharedPtr<DOM::DocumentImpl> doc;
+ RefPtr<DOM::DocumentImpl> doc;
};
class XMLHttpRequest : public DOMObject {
@@ -119,8 +119,8 @@
KIO::TransferJob * job;
XMLHttpRequestState state;
- SharedPtr<JSUnprotectedEventListener> onReadyStateChangeListener;
- SharedPtr<JSUnprotectedEventListener> onLoadListener;
+ RefPtr<JSUnprotectedEventListener> onReadyStateChangeListener;
+ RefPtr<JSUnprotectedEventListener> onLoadListener;
khtml::Decoder *decoder;
QString encoding;
@@ -130,7 +130,7 @@
QString response;
mutable bool createdDocument;
mutable bool typeIsXML;
- mutable SharedPtr<DOM::DocumentImpl> responseXML;
+ mutable RefPtr<DOM::DocumentImpl> responseXML;
bool aborted;
};
1.103 +5 -5 WebCore/khtml/editing/SelectionController.cpp
Index: SelectionController.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/SelectionController.cpp,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- SelectionController.cpp 21 Nov 2005 01:20:01 -0000 1.102
+++ SelectionController.cpp 1 Dec 2005 10:32:14 -0000 1.103
@@ -601,10 +601,10 @@
m_needsLayout = flag;
}
-SharedPtr<RangeImpl> SelectionController::toRange() const
+RefPtr<RangeImpl> SelectionController::toRange() const
{
if (isNone())
- return SharedPtr<RangeImpl>();
+ return RefPtr<RangeImpl>();
// Make sure we have an updated layout since this function is called
// in the course of running edit commands which modify the DOM.
@@ -647,16 +647,16 @@
}
int exceptionCode = 0;
- SharedPtr<RangeImpl> result(new RangeImpl(s.node()->getDocument()));
+ RefPtr<RangeImpl> result(new RangeImpl(s.node()->getDocument()));
result->setStart(s.node(), s.offset(), exceptionCode);
if (exceptionCode) {
ERROR("Exception setting Range start from SelectionController: %d", exceptionCode);
- return SharedPtr<RangeImpl>();
+ return RefPtr<RangeImpl>();
}
result->setEnd(e.node(), e.offset(), exceptionCode);
if (exceptionCode) {
ERROR("Exception setting Range end from SelectionController: %d", exceptionCode);
- return SharedPtr<RangeImpl>();
+ return RefPtr<RangeImpl>();
}
return result;
}
1.45 +1 -1 WebCore/khtml/editing/SelectionController.h
Index: SelectionController.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/SelectionController.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- SelectionController.h 1 Nov 2005 22:29:19 -0000 1.44
+++ SelectionController.h 1 Dec 2005 10:32:14 -0000 1.45
@@ -105,7 +105,7 @@
bool isRange() const { return state() == RANGE; }
bool isCaretOrRange() const { return state() != NONE; }
- SharedPtr<DOM::RangeImpl> toRange() const;
+ RefPtr<DOM::RangeImpl> toRange() const;
void debugPosition() const;
void debugRenderer(khtml::RenderObject *r, bool selected) const;
1.19 +19 -19 WebCore/khtml/editing/apply_style_command.cpp
Index: apply_style_command.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/apply_style_command.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- apply_style_command.cpp 21 Nov 2005 01:20:01 -0000 1.18
+++ apply_style_command.cpp 1 Dec 2005 10:32:14 -0000 1.19
@@ -120,7 +120,7 @@
void StyleChange::init(CSSStyleDeclarationImpl *style, const Position &position)
{
style->ref();
- SharedPtr<CSSMutableStyleDeclarationImpl> mutableStyle = style->makeMutable();
+ RefPtr<CSSMutableStyleDeclarationImpl> mutableStyle = style->makeMutable();
style->deref();
QString styleText("");
@@ -220,8 +220,8 @@
bool StyleChange::currentlyHasStyle(const Position &pos, const CSSProperty *property)
{
ASSERT(pos.isNotNull());
- SharedPtr<CSSComputedStyleDeclarationImpl> style = pos.computedStyle();
- SharedPtr<CSSValueImpl> value = style->getPropertyCSSValue(property->id(), DoNotUpdateLayout);
+ RefPtr<CSSComputedStyleDeclarationImpl> style = pos.computedStyle();
+ RefPtr<CSSValueImpl> value = style->getPropertyCSSValue(property->id(), DoNotUpdateLayout);
if (!value)
return false;
return strcasecmp(value->cssText(), property->value()->cssText()) == 0;
@@ -295,12 +295,12 @@
switch (m_propertyLevel) {
case PropertyDefault: {
// apply the block-centric properties of the style
- SharedPtr<CSSMutableStyleDeclarationImpl> blockStyle = m_style->copyBlockProperties();
+ RefPtr<CSSMutableStyleDeclarationImpl> blockStyle = m_style->copyBlockProperties();
applyBlockStyle(blockStyle.get());
// apply any remaining styles to the inline elements
// NOTE: hopefully, this string comparison is the same as checking for a non-null diff
if (blockStyle->length() < m_style->length()) {
- SharedPtr<CSSMutableStyleDeclarationImpl> inlineStyle = m_style->copy();
+ RefPtr<CSSMutableStyleDeclarationImpl> inlineStyle = m_style->copy();
applyRelativeFontStyleChange(inlineStyle.get());
blockStyle->diff(inlineStyle.get());
applyInlineStyle(inlineStyle.get());
@@ -370,7 +370,7 @@
void ApplyStyleCommand::applyRelativeFontStyleChange(CSSMutableStyleDeclarationImpl *style)
{
- SharedPtr<CSSValueImpl> value = style->getPropertyCSSValue(CSS_PROP_FONT_SIZE);
+ RefPtr<CSSValueImpl> value = style->getPropertyCSSValue(CSS_PROP_FONT_SIZE);
if (value) {
// Explicit font size overrides any delta.
style->removeProperty(CSS_PROP__KHTML_FONT_SIZE_DELTA);
@@ -470,7 +470,7 @@
CSSMutableStyleDeclarationImpl *inlineStyleDecl = elem->getInlineStyleDecl();
float currentFontSize = computedFontSize(node);
float desiredFontSize = kMax(MinimumFontSize, startingFontSizes[node] + adjustment);
- SharedPtr<CSSValueImpl> value = inlineStyleDecl->getPropertyCSSValue(CSS_PROP_FONT_SIZE);
+ RefPtr<CSSValueImpl> value = inlineStyleDecl->getPropertyCSSValue(CSS_PROP_FONT_SIZE);
if (value) {
inlineStyleDecl->removeProperty(CSS_PROP_FONT_SIZE, true);
currentFontSize = computedFontSize(node);
@@ -660,7 +660,7 @@
QValueListConstIterator<CSSProperty> end;
for (QValueListConstIterator<CSSProperty> it = style->valuesIterator(); it != end; ++it) {
int propertyID = (*it).id();
- SharedPtr<CSSValueImpl> value = decl->getPropertyCSSValue(propertyID);
+ RefPtr<CSSValueImpl> value = decl->getPropertyCSSValue(propertyID);
if (value && (propertyID != CSS_PROP_WHITE_SPACE || !isTabSpanNode(elem)))
removeCSSProperty(decl, propertyID);
}
@@ -686,7 +686,7 @@
ElementImpl *element = static_cast<ElementImpl *>(node);
CSSComputedStyleDeclarationImpl style(element);
- SharedPtr<CSSValueImpl> value = style.getPropertyCSSValue(CSS_PROP_TEXT_DECORATION, DoNotUpdateLayout);
+ RefPtr<CSSValueImpl> value = style.getPropertyCSSValue(CSS_PROP_TEXT_DECORATION, DoNotUpdateLayout);
return value && strcasecmp(value->cssText(), "none") != 0;
}
@@ -712,14 +712,14 @@
return 0;
HTMLElementImpl *element = static_cast<HTMLElementImpl *>(node);
- SharedPtr<CSSMutableStyleDeclarationImpl> style = element->inlineStyleDecl();
+ RefPtr<CSSMutableStyleDeclarationImpl> style = element->inlineStyleDecl();
if (!style)
return 0;
int properties[1] = { CSS_PROP_TEXT_DECORATION };
CSSMutableStyleDeclarationImpl *textDecorationStyle = style->copyPropertiesInSet(properties, 1);
- SharedPtr<CSSValueImpl> property = style->getPropertyCSSValue(CSS_PROP_TEXT_DECORATION);
+ RefPtr<CSSValueImpl> property = style->getPropertyCSSValue(CSS_PROP_TEXT_DECORATION);
if (property && strcasecmp(property->cssText(), "none") != 0)
removeCSSProperty(style.get(), CSS_PROP_TEXT_DECORATION);
@@ -736,15 +736,15 @@
return 0;
HTMLElementImpl *element = static_cast<HTMLElementImpl *>(node);
- SharedPtr<CSSComputedStyleDeclarationImpl> computedStyle = new CSSComputedStyleDeclarationImpl(element);
+ RefPtr<CSSComputedStyleDeclarationImpl> computedStyle = new CSSComputedStyleDeclarationImpl(element);
ASSERT(computedStyle);
int properties[1] = { CSS_PROP_TEXT_DECORATION };
CSSMutableStyleDeclarationImpl *textDecorationStyle = computedStyle->copyPropertiesInSet(properties, 1);
- SharedPtr<CSSValueImpl> property = computedStyle->getPropertyCSSValue(CSS_PROP_TEXT_DECORATION);
+ RefPtr<CSSValueImpl> property = computedStyle->getPropertyCSSValue(CSS_PROP_TEXT_DECORATION);
if (property && strcasecmp(property->cssText(), "none") != 0) {
- SharedPtr<CSSMutableStyleDeclarationImpl> newStyle = textDecorationStyle->copy();
+ RefPtr<CSSMutableStyleDeclarationImpl> newStyle = textDecorationStyle->copy();
newStyle->setProperty(CSS_PROP_TEXT_DECORATION, "none");
applyTextDecorationStyle(node, newStyle.get());
}
@@ -793,7 +793,7 @@
nextCurrent = NULL;
- SharedPtr<CSSMutableStyleDeclarationImpl> decoration = force ? extractAndNegateTextDecorationStyle(current) : extractTextDecorationStyle(current);
+ RefPtr<CSSMutableStyleDeclarationImpl> decoration = force ? extractAndNegateTextDecorationStyle(current) : extractTextDecorationStyle(current);
for (NodeImpl *child = current->firstChild(); child; child = nextChild) {
nextChild = child->nextSibling();
@@ -846,7 +846,7 @@
ASSERT(end.node()->inDocument());
ASSERT(RangeImpl::compareBoundaryPoints(start, end) < 0);
- SharedPtr<CSSValueImpl> textDecorationSpecialProperty = style->getPropertyCSSValue(CSS_PROP__KHTML_TEXT_DECORATIONS_IN_EFFECT);
+ RefPtr<CSSValueImpl> textDecorationSpecialProperty = style->getPropertyCSSValue(CSS_PROP__KHTML_TEXT_DECORATIONS_IN_EFFECT);
if (textDecorationSpecialProperty) {
pushDownTextDecorationStyleAtBoundaries(start.downstream(), end.upstream());
@@ -1220,7 +1220,7 @@
}
if (styleChange.cssStyle().length() > 0) {
- SharedPtr<ElementImpl> styleElement = createStyleSpanElement(document());
+ RefPtr<ElementImpl> styleElement = createStyleSpanElement(document());
styleElement->setAttribute(styleAttr, styleChange.cssStyle());
insertNodeBefore(styleElement.get(), startNode);
surroundNodeRangeWithElement(startNode, endNode, styleElement.get());
@@ -1247,11 +1247,11 @@
return 0;
Position pos(const_cast<NodeImpl *>(node), 0);
- SharedPtr<CSSComputedStyleDeclarationImpl> computedStyle = pos.computedStyle();
+ RefPtr<CSSComputedStyleDeclarationImpl> computedStyle = pos.computedStyle();
if (!computedStyle)
return 0;
- SharedPtr<CSSPrimitiveValueImpl> value = static_cast<CSSPrimitiveValueImpl *>(computedStyle->getPropertyCSSValue(CSS_PROP_FONT_SIZE));
+ RefPtr<CSSPrimitiveValueImpl> value = static_cast<CSSPrimitiveValueImpl *>(computedStyle->getPropertyCSSValue(CSS_PROP_FONT_SIZE));
if (!value)
return 0;
1.3 +1 -1 WebCore/khtml/editing/apply_style_command.h
Index: apply_style_command.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/apply_style_command.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- apply_style_command.h 2 Sep 2005 16:45:38 -0000 1.2
+++ apply_style_command.h 1 Dec 2005 10:32:14 -0000 1.3
@@ -81,7 +81,7 @@
float computedFontSize(const DOM::NodeImpl *);
void joinChildTextNodes(DOM::NodeImpl *, const DOM::Position &start, const DOM::Position &end);
- SharedPtr<DOM::CSSMutableStyleDeclarationImpl> m_style;
+ RefPtr<DOM::CSSMutableStyleDeclarationImpl> m_style;
EditAction m_editingAction;
EPropertyLevel m_propertyLevel;
};
1.12 +3 -3 WebCore/khtml/editing/edit_command.cpp
Index: edit_command.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/edit_command.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- edit_command.cpp 21 Nov 2005 01:20:02 -0000 1.11
+++ edit_command.cpp 1 Dec 2005 10:32:14 -0000 1.12
@@ -55,11 +55,11 @@
{
}
-EditCommandPtr::EditCommandPtr(EditCommand *impl) : SharedPtr<EditCommand>(impl)
+EditCommandPtr::EditCommandPtr(EditCommand *impl) : RefPtr<EditCommand>(impl)
{
}
-EditCommandPtr::EditCommandPtr(const EditCommandPtr &o) : SharedPtr<EditCommand>(o)
+EditCommandPtr::EditCommandPtr(const EditCommandPtr &o) : RefPtr<EditCommand>(o)
{
}
@@ -69,7 +69,7 @@
EditCommandPtr &EditCommandPtr::operator=(const EditCommandPtr &c)
{
- static_cast<SharedPtr<EditCommand> &>(*this) = c;
+ static_cast<RefPtr<EditCommand> &>(*this) = c;
return *this;
}
1.4 +1 -1 WebCore/khtml/editing/edit_command.h
Index: edit_command.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/edit_command.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- edit_command.h 24 Sep 2005 01:18:56 -0000 1.3
+++ edit_command.h 1 Dec 2005 10:32:14 -0000 1.4
@@ -100,7 +100,7 @@
EditCommand *m_parent;
};
-class EditCommandPtr : public SharedPtr<EditCommand>
+class EditCommandPtr : public RefPtr<EditCommand>
{
public:
EditCommandPtr();
1.42 +4 -4 WebCore/khtml/editing/markup.cpp
Index: markup.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/markup.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- markup.cpp 30 Nov 2005 02:06:33 -0000 1.41
+++ markup.cpp 1 Dec 2005 10:32:14 -0000 1.42
@@ -184,8 +184,8 @@
if (defaultStyle) {
NodeImpl *element = node->parentNode();
if (element) {
- SharedPtr<CSSComputedStyleDeclarationImpl> computedStyle = Position(element, 0).computedStyle();
- SharedPtr<CSSMutableStyleDeclarationImpl> style = computedStyle->copyInheritableProperties();
+ RefPtr<CSSComputedStyleDeclarationImpl> computedStyle = Position(element, 0).computedStyle();
+ RefPtr<CSSMutableStyleDeclarationImpl> style = computedStyle->copyInheritableProperties();
defaultStyle->diff(style.get());
if (style->length() > 0) {
// FIXME: Handle case where style->cssText() has illegal characters in it, like "
@@ -208,8 +208,8 @@
const ElementImpl *el = static_cast<const ElementImpl *>(node);
DOMString additionalStyle;
if (defaultStyle && el->isHTMLElement()) {
- SharedPtr<CSSComputedStyleDeclarationImpl> computedStyle = Position(const_cast<ElementImpl *>(el), 0).computedStyle();
- SharedPtr<CSSMutableStyleDeclarationImpl> style = computedStyle->copyInheritableProperties();
+ RefPtr<CSSComputedStyleDeclarationImpl> computedStyle = Position(const_cast<ElementImpl *>(el), 0).computedStyle();
+ RefPtr<CSSMutableStyleDeclarationImpl> style = computedStyle->copyInheritableProperties();
defaultStyle->diff(style.get());
if (style->length() > 0) {
CSSMutableStyleDeclarationImpl *inlineStyleDecl = static_cast<const HTMLElementImpl *>(el)->inlineStyleDecl();
1.65 +2 -2 WebCore/khtml/editing/visible_position.cpp
Index: visible_position.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/visible_position.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- visible_position.cpp 29 Nov 2005 01:35:07 -0000 1.64
+++ visible_position.cpp 1 Dec 2005 10:32:14 -0000 1.65
@@ -374,11 +374,11 @@
}
#endif
-SharedPtr<RangeImpl> makeRange(const VisiblePosition &start, const VisiblePosition &end)
+RefPtr<RangeImpl> makeRange(const VisiblePosition &start, const VisiblePosition &end)
{
Position s = start.position();
Position e = end.position();
- return SharedPtr<RangeImpl>(new RangeImpl(s.node()->getDocument(), s.node(), s.offset(), e.node(), e.offset()));
+ return RefPtr<RangeImpl>(new RangeImpl(s.node()->getDocument(), s.node(), s.offset(), e.node(), e.offset()));
}
VisiblePosition startVisiblePosition(const RangeImpl *r, EAffinity affinity)
1.34 +1 -1 WebCore/khtml/editing/visible_position.h
Index: visible_position.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/visible_position.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- visible_position.h 7 Oct 2005 01:21:42 -0000 1.33
+++ visible_position.h 1 Dec 2005 10:32:14 -0000 1.34
@@ -128,7 +128,7 @@
return !(a == b);
}
-SharedPtr<DOM::RangeImpl> makeRange(const VisiblePosition &start, const VisiblePosition &end);
+RefPtr<DOM::RangeImpl> makeRange(const VisiblePosition &start, const VisiblePosition &end);
bool setStart(DOM::RangeImpl *, const VisiblePosition &start);
bool setEnd(DOM::RangeImpl *, const VisiblePosition &start);
VisiblePosition startVisiblePosition(const DOM::RangeImpl *, EAffinity);
1.5 +1 -1 WebCore/khtml/editing/visible_range.h
Index: visible_range.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/visible_range.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- visible_range.h 16 Sep 2005 22:42:07 -0000 1.4
+++ visible_range.h 1 Dec 2005 10:32:14 -0000 1.5
@@ -52,7 +52,7 @@
VisiblePosition start() const { return m_start; }
VisiblePosition end() const { return m_end; }
- SharedPtr<RangeImpl> range() const;
+ RefPtr<RangeImpl> range() const;
void clear() { m_start.clear(); m_end.clear(); }
1.42 +14 -14 WebCore/khtml/editing/visible_text.cpp
Index: visible_text.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/visible_text.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- visible_text.cpp 8 Nov 2005 08:10:56 -0000 1.41
+++ visible_text.cpp 1 Dec 2005 10:32:15 -0000 1.42
@@ -454,7 +454,7 @@
m_lastCharacter = c;
}
-SharedPtr<RangeImpl> TextIterator::range() const
+RefPtr<RangeImpl> TextIterator::range() const
{
// use the current run information, if we have it
if (m_positionNode) {
@@ -464,16 +464,16 @@
m_positionEndOffset += index;
m_positionOffsetBaseNode = 0;
}
- return SharedPtr<RangeImpl>(new RangeImpl(m_positionNode->getDocument(),
+ return RefPtr<RangeImpl>(new RangeImpl(m_positionNode->getDocument(),
m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset));
}
// otherwise, return the end of the overall range we were given
if (m_endContainer)
- return SharedPtr<RangeImpl>(new RangeImpl(m_endContainer->getDocument(),
+ return RefPtr<RangeImpl>(new RangeImpl(m_endContainer->getDocument(),
m_endContainer, m_endOffset, m_endContainer, m_endOffset));
- return SharedPtr<RangeImpl>();
+ return RefPtr<RangeImpl>();
}
SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator() : m_positionNode(0)
@@ -707,12 +707,12 @@
}
}
-SharedPtr<RangeImpl> SimplifiedBackwardsTextIterator::range() const
+RefPtr<RangeImpl> SimplifiedBackwardsTextIterator::range() const
{
if (m_positionNode) {
- return SharedPtr<RangeImpl>(new RangeImpl(m_positionNode->getDocument(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset));
+ return RefPtr<RangeImpl>(new RangeImpl(m_positionNode->getDocument(), m_positionNode, m_positionStartOffset, m_positionNode, m_positionEndOffset));
} else {
- return SharedPtr<RangeImpl>(new RangeImpl(m_startNode->getDocument(), m_startNode, m_startOffset, m_startNode, m_startOffset));
+ return RefPtr<RangeImpl>(new RangeImpl(m_startNode->getDocument(), m_startNode, m_startOffset, m_startNode, m_startOffset));
}
}
@@ -729,9 +729,9 @@
}
}
-SharedPtr<RangeImpl> CharacterIterator::range() const
+RefPtr<RangeImpl> CharacterIterator::range() const
{
- SharedPtr<RangeImpl> r = m_textIterator.range();
+ RefPtr<RangeImpl> r = m_textIterator.range();
if (!m_textIterator.atEnd()) {
if (m_textIterator.length() <= 1) {
assert(m_runOffset == 0);
@@ -990,7 +990,7 @@
for (TextIterator it(rangeOfContents(doc).get()); !it.atEnd(); it.advance()) {
int len = it.length();
if (rangeLocation >= docTextPosition && rangeLocation <= docTextPosition + len) {
- SharedPtr<RangeImpl> textRunRange = it.range();
+ RefPtr<RangeImpl> textRunRange = it.range();
int exception = 0;
if (textRunRange->startContainer(exception)->isTextNode()) {
int offset = rangeLocation - docTextPosition;
@@ -1004,7 +1004,7 @@
}
}
if (rangeEnd >= docTextPosition && rangeEnd <= docTextPosition + len) {
- SharedPtr<RangeImpl> textRunRange = it.range();
+ RefPtr<RangeImpl> textRunRange = it.range();
int exception = 0;
if (textRunRange->startContainer(exception)->isTextNode()) {
int offset = rangeEnd - docTextPosition;
@@ -1035,7 +1035,7 @@
return result;
}
-SharedPtr<RangeImpl> findPlainText(const RangeImpl *r, const QString &s, bool forward, bool caseSensitive)
+RefPtr<RangeImpl> findPlainText(const RangeImpl *r, const QString &s, bool forward, bool caseSensitive)
{
// FIXME: Can we do Boyer-Moore or equivalent instead for speed?
@@ -1045,7 +1045,7 @@
int exception = 0;
RangeImpl *result = r->cloneRange(exception);
result->collapse(forward, exception);
- return SharedPtr<RangeImpl>(result);
+ return RefPtr<RangeImpl>(result);
}
CircularSearchBuffer buffer(s, caseSensitive);
@@ -1103,7 +1103,7 @@
it.advance(buffer.length() - 1);
result->setEnd(it.range()->endContainer(exception), it.range()->endOffset(exception), exception);
}
- return SharedPtr<RangeImpl>(result);
+ return RefPtr<RangeImpl>(result);
}
}
1.18 +6 -6 WebCore/khtml/editing/visible_text.h
Index: visible_text.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/visible_text.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- visible_text.h 16 Sep 2005 22:42:07 -0000 1.17
+++ visible_text.h 1 Dec 2005 10:32:15 -0000 1.18
@@ -51,7 +51,7 @@
}
QString plainText(const DOM::RangeImpl *);
-SharedPtr<DOM::RangeImpl> findPlainText(const DOM::RangeImpl *, const QString &, bool forward, bool caseSensitive);
+RefPtr<DOM::RangeImpl> findPlainText(const DOM::RangeImpl *, const QString &, bool forward, bool caseSensitive);
// Iterates through the DOM range, returning all the text, and 0-length boundaries
// at points where replaced elements break up the text flow. The text comes back in
@@ -71,7 +71,7 @@
int length() const { return m_textLength; }
const QChar *characters() const { return m_textCharacters; }
- SharedPtr<DOM::RangeImpl> range() const;
+ RefPtr<DOM::RangeImpl> range() const;
static int TextIterator::rangeLength(const DOM::RangeImpl *r);
static DOM::RangeImpl *TextIterator::rangeFromLocationAndLength(DOM::DocumentImpl *doc, int rangeLocation, int rangeLength);
@@ -136,7 +136,7 @@
int length() const { return m_textLength; }
const QChar *characters() const { return m_textCharacters; }
- SharedPtr<DOM::RangeImpl> range() const;
+ RefPtr<DOM::RangeImpl> range() const;
private:
void exitNode();
@@ -189,7 +189,7 @@
QString string(int numChars);
int characterOffset() const { return m_offset; }
- SharedPtr<DOM::RangeImpl> range() const;
+ RefPtr<DOM::RangeImpl> range() const;
private:
int m_offset;
@@ -213,7 +213,7 @@
const QChar *characters() const;
// Range of the text we're currently returning
- SharedPtr<DOM::RangeImpl> range() const { return m_range; }
+ RefPtr<DOM::RangeImpl> range() const { return m_range; }
private:
// text from the previous chunk from the textIterator
@@ -226,7 +226,7 @@
// Did we have to look ahead in the textIterator to confirm the current chunk?
bool m_didLookAhead;
- SharedPtr<DOM::RangeImpl> m_range;
+ RefPtr<DOM::RangeImpl> m_range;
TextIterator m_textIterator;
};
1.44 +6 -6 WebCore/khtml/editing/visible_units.cpp
Index: visible_units.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/visible_units.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- visible_units.cpp 29 Nov 2005 01:35:07 -0000 1.43
+++ visible_units.cpp 1 Dec 2005 10:32:15 -0000 1.44
@@ -67,7 +67,7 @@
boundary = boundary->parentNode();
}
- SharedPtr<RangeImpl> searchRange(d->createRange());
+ RefPtr<RangeImpl> searchRange(d->createRange());
int exception = 0;
searchRange->setStartBefore(boundary, exception);
Position end(pos.equivalentRangeCompliantPosition());
@@ -85,7 +85,7 @@
}
if (it.atEnd() && next == 0) {
- SharedPtr<RangeImpl> range(it.range());
+ RefPtr<RangeImpl> range(it.range());
pos = Position(range->startContainer(exception), range->startOffset(exception));
}
else if (!it.atEnd() && it.length() == 0) {
@@ -99,7 +99,7 @@
chars[1] = ' ';
string.prepend(chars, 2);
unsigned pastImage = searchFunction(string.unicode(), string.length());
- SharedPtr<RangeImpl> range(it.range());
+ RefPtr<RangeImpl> range(it.range());
if (pastImage == 0)
pos = Position(range->startContainer(exception), range->startOffset(exception));
else
@@ -144,7 +144,7 @@
boundary = boundary->parentNode();
}
- SharedPtr<RangeImpl> searchRange(d->createRange());
+ RefPtr<RangeImpl> searchRange(d->createRange());
Position start(pos.equivalentRangeCompliantPosition());
int exception = 0;
searchRange->setStart(start.node(), start.offset(), exception);
@@ -163,7 +163,7 @@
}
if (it.atEnd() && next == string.length()) {
- SharedPtr<RangeImpl> range(it.range());
+ RefPtr<RangeImpl> range(it.range());
int exception = 0;
pos = Position(range->startContainer(exception), range->startOffset(exception));
}
@@ -178,7 +178,7 @@
chars[1] = 'X';
string.append(chars, 2);
unsigned pastImage = searchFunction(string.unicode(), string.length());
- SharedPtr<RangeImpl> range(it.range());
+ RefPtr<RangeImpl> range(it.range());
int exception = 0;
if (next != pastImage)
pos = Position(range->endContainer(exception), range->endOffset(exception));
1.112 +2 -2 WebCore/khtml/html/html_elementimpl.cpp
Index: html_elementimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_elementimpl.cpp,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- html_elementimpl.cpp 15 Nov 2005 02:05:42 -0000 1.111
+++ html_elementimpl.cpp 1 Dec 2005 10:32:18 -0000 1.112
@@ -664,9 +664,9 @@
setAttribute(classAttr, value);
}
-SharedPtr<HTMLCollectionImpl> HTMLElementImpl::children()
+RefPtr<HTMLCollectionImpl> HTMLElementImpl::children()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::NODE_CHILDREN));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::NODE_CHILDREN));
}
// DOM Section 1.1.1
1.40 +1 -1 WebCore/khtml/html/html_elementimpl.h
Index: html_elementimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_elementimpl.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- html_elementimpl.h 8 Nov 2005 08:10:58 -0000 1.39
+++ html_elementimpl.h 1 Dec 2005 10:32:18 -0000 1.40
@@ -50,7 +50,7 @@
virtual NodeImpl* cloneNode(bool deep);
- SharedPtr<HTMLCollectionImpl> children();
+ RefPtr<HTMLCollectionImpl> children();
DOMString id() const;
void setId(const DOMString &value);
1.206 +5 -5 WebCore/khtml/html/html_formimpl.cpp
Index: html_formimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_formimpl.cpp,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -r1.205 -r1.206
--- html_formimpl.cpp 21 Nov 2005 01:20:12 -0000 1.205
+++ html_formimpl.cpp 1 Dec 2005 10:32:18 -0000 1.206
@@ -692,9 +692,9 @@
removeFromVector(imgElements, e);
}
-SharedPtr<HTMLCollectionImpl> HTMLFormElementImpl::elements()
+RefPtr<HTMLCollectionImpl> HTMLFormElementImpl::elements()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLFormCollectionImpl(this));
+ return RefPtr<HTMLCollectionImpl>(new HTMLFormCollectionImpl(this));
}
DOMString HTMLFormElementImpl::name() const
@@ -2671,7 +2671,7 @@
void HTMLSelectElementImpl::add( HTMLElementImpl *element, HTMLElementImpl *before, int &exceptioncode )
{
- SharedPtr<HTMLElementImpl> protectNewChild(element); // make sure the element is ref'd and deref'd so we don't leak it
+ RefPtr<HTMLElementImpl> protectNewChild(element); // make sure the element is ref'd and deref'd so we don't leak it
if (!element || !(element->hasLocalName(optionTag) || element->hasLocalName(hrTag)))
return;
@@ -2922,9 +2922,9 @@
}
// FIXME: Delete once the above function is working well enough to use for real.
-SharedPtr<HTMLCollectionImpl> HTMLSelectElementImpl::optionsHTMLCollection()
+RefPtr<HTMLCollectionImpl> HTMLSelectElementImpl::optionsHTMLCollection()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::SELECT_OPTIONS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::SELECT_OPTIONS));
}
void HTMLSelectElementImpl::recalcListItems()
1.97 +2 -2 WebCore/khtml/html/html_formimpl.h
Index: html_formimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_formimpl.h,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- html_formimpl.h 21 Nov 2005 01:20:13 -0000 1.96
+++ html_formimpl.h 1 Dec 2005 10:32:18 -0000 1.97
@@ -73,7 +73,7 @@
virtual void insertedIntoDocument();
virtual void removedFromDocument();
- SharedPtr<HTMLCollectionImpl> elements();
+ RefPtr<HTMLCollectionImpl> elements();
int length() const;
DOMString enctype() const { return m_enctype; }
@@ -568,7 +568,7 @@
void setValue(const DOMString &);
HTMLOptionsCollectionImpl *options();
- SharedPtr<HTMLCollectionImpl> optionsHTMLCollection(); // FIXME: Remove this and migrate to options().
+ RefPtr<HTMLCollectionImpl> optionsHTMLCollection(); // FIXME: Remove this and migrate to options().
virtual bool maintainsState() { return true; }
virtual QString state();
1.57 +2 -2 WebCore/khtml/html/html_imageimpl.cpp
Index: html_imageimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_imageimpl.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- html_imageimpl.cpp 29 Nov 2005 17:03:03 -0000 1.56
+++ html_imageimpl.cpp 1 Dec 2005 10:32:18 -0000 1.57
@@ -502,9 +502,9 @@
HTMLElementImpl::parseMappedAttribute(attr);
}
-SharedPtr<HTMLCollectionImpl> HTMLMapElementImpl::areas()
+RefPtr<HTMLCollectionImpl> HTMLMapElementImpl::areas()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::MAP_AREAS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::MAP_AREAS));
}
DOMString HTMLMapElementImpl::name() const
1.29 +1 -1 WebCore/khtml/html/html_imageimpl.h
Index: html_imageimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_imageimpl.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- html_imageimpl.h 29 Nov 2005 17:03:03 -0000 1.28
+++ html_imageimpl.h 1 Dec 2005 10:32:19 -0000 1.29
@@ -226,7 +226,7 @@
bool mapMouseEvent(int x_, int y_, int width_, int height_,
khtml::RenderObject::NodeInfo& info);
- SharedPtr<HTMLCollectionImpl> areas();
+ RefPtr<HTMLCollectionImpl> areas();
DOMString name() const;
void setName( const DOMString & );
1.40 +4 -4 WebCore/khtml/html/html_miscimpl.cpp
Index: html_miscimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_miscimpl.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- html_miscimpl.cpp 8 Nov 2005 08:11:00 -0000 1.39
+++ html_miscimpl.cpp 1 Dec 2005 10:32:19 -0000 1.40
@@ -460,9 +460,9 @@
info->hasNameCache = true;
}
-QValueList< SharedPtr<NodeImpl> > HTMLCollectionImpl::namedItems(const DOMString &name) const
+QValueList< RefPtr<NodeImpl> > HTMLCollectionImpl::namedItems(const DOMString &name) const
{
- QValueList< SharedPtr<NodeImpl> > result;
+ QValueList< RefPtr<NodeImpl> > result;
if (name.isEmpty())
return result;
@@ -474,11 +474,11 @@
QPtrVector<NodeImpl> *nameResults = info->nameCache.find(name.qstring());
for (unsigned i = 0; idResults && i < idResults->count(); ++i) {
- result.append(SharedPtr<NodeImpl>(idResults->at(i)));
+ result.append(RefPtr<NodeImpl>(idResults->at(i)));
}
for (unsigned i = 0; nameResults && i < nameResults->count(); ++i) {
- result.append(SharedPtr<NodeImpl>(nameResults->at(i)));
+ result.append(RefPtr<NodeImpl>(nameResults->at(i)));
}
return result;
1.24 +2 -2 WebCore/khtml/html/html_miscimpl.h
Index: html_miscimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_miscimpl.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- html_miscimpl.h 8 Nov 2005 08:11:00 -0000 1.23
+++ html_miscimpl.h 1 Dec 2005 10:32:19 -0000 1.24
@@ -99,7 +99,7 @@
// In case of multiple items named the same way
virtual NodeImpl *nextNamedItem(const DOMString &name) const;
- QValueList< SharedPtr<NodeImpl> > namedItems(const DOMString &name) const;
+ QValueList< RefPtr<NodeImpl> > namedItems(const DOMString &name) const;
NodeImpl *base() { return m_base.get(); }
@@ -125,7 +125,7 @@
virtual unsigned calcLength() const;
virtual void resetCollectionInfo() const;
// the base node, the collection refers to
- SharedPtr<NodeImpl> m_base;
+ RefPtr<NodeImpl> m_base;
// The collection list the following elements
int type;
mutable CollectionInfo *info;
1.69 +12 -12 WebCore/khtml/html/html_tableimpl.cpp
Index: html_tableimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_tableimpl.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- html_tableimpl.cpp 21 Nov 2005 01:20:14 -0000 1.68
+++ html_tableimpl.cpp 1 Dec 2005 10:32:19 -0000 1.69
@@ -567,14 +567,14 @@
return attr->name() == backgroundAttr;
}
-SharedPtr<HTMLCollectionImpl> HTMLTableElementImpl::rows()
+RefPtr<HTMLCollectionImpl> HTMLTableElementImpl::rows()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::TABLE_ROWS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::TABLE_ROWS));
}
-SharedPtr<HTMLCollectionImpl> HTMLTableElementImpl::tBodies()
+RefPtr<HTMLCollectionImpl> HTMLTableElementImpl::tBodies()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::TABLE_TBODIES));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::TABLE_TBODIES));
}
DOMString HTMLTableElementImpl::align() const
@@ -765,7 +765,7 @@
HTMLElementImpl *HTMLTableSectionElementImpl::insertRow( int index, int& exceptioncode )
{
HTMLTableRowElementImpl *r = 0L;
- SharedPtr<NodeListImpl> children = childNodes();
+ RefPtr<NodeListImpl> children = childNodes();
int numRows = children.notNull() ? (int)children->length() : 0;
//kdDebug(6030) << k_funcinfo << "index=" << index << " numRows=" << numRows << endl;
if ( index < -1 || index > numRows ) {
@@ -790,7 +790,7 @@
void HTMLTableSectionElementImpl::deleteRow( int index, int &exceptioncode )
{
- SharedPtr<NodeListImpl> children = childNodes();
+ RefPtr<NodeListImpl> children = childNodes();
int numRows = children.notNull() ? (int)children->length() : 0;
if ( index == -1 ) index = numRows - 1;
if( index >= 0 && index < numRows ) {
@@ -855,9 +855,9 @@
setAttribute(valignAttr, value);
}
-SharedPtr<HTMLCollectionImpl> HTMLTableSectionElementImpl::rows()
+RefPtr<HTMLCollectionImpl> HTMLTableSectionElementImpl::rows()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::TABLE_ROWS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::TABLE_ROWS));
}
// -------------------------------------------------------------------------
@@ -938,7 +938,7 @@
HTMLElementImpl *HTMLTableRowElementImpl::insertCell( int index, int &exceptioncode )
{
HTMLTableCellElementImpl *c = 0L;
- SharedPtr<NodeListImpl> children = childNodes();
+ RefPtr<NodeListImpl> children = childNodes();
int numCells = children.notNull() ? children->length() : 0;
if ( index < -1 || index > numCells )
exceptioncode = DOMException::INDEX_SIZE_ERR; // per the DOM
@@ -961,7 +961,7 @@
void HTMLTableRowElementImpl::deleteCell( int index, int &exceptioncode )
{
- SharedPtr<NodeListImpl> children = childNodes();
+ RefPtr<NodeListImpl> children = childNodes();
int numCells = children.notNull() ? children->length() : 0;
if ( index == -1 ) index = numCells-1;
if( index >= 0 && index < numCells ) {
@@ -973,9 +973,9 @@
exceptioncode = DOMException::INDEX_SIZE_ERR;
}
-SharedPtr<HTMLCollectionImpl> HTMLTableRowElementImpl::cells()
+RefPtr<HTMLCollectionImpl> HTMLTableRowElementImpl::cells()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::TR_CELLS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::TR_CELLS));
}
void HTMLTableRowElementImpl::setCells(HTMLCollectionImpl *, int &exception)
1.30 +4 -4 WebCore/khtml/html/html_tableimpl.h
Index: html_tableimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_tableimpl.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- html_tableimpl.h 8 Nov 2005 08:11:01 -0000 1.29
+++ html_tableimpl.h 1 Dec 2005 10:32:19 -0000 1.30
@@ -86,8 +86,8 @@
HTMLElementImpl *insertRow ( int index, int &exceptioncode );
void deleteRow ( int index, int &exceptioncode );
- SharedPtr<HTMLCollectionImpl> rows();
- SharedPtr<HTMLCollectionImpl> tBodies();
+ RefPtr<HTMLCollectionImpl> rows();
+ RefPtr<HTMLCollectionImpl> tBodies();
DOMString align() const;
void setAlign( const DOMString & );
@@ -188,7 +188,7 @@
DOMString vAlign() const;
void setVAlign( const DOMString & );
- SharedPtr<HTMLCollectionImpl> rows();
+ RefPtr<HTMLCollectionImpl> rows();
};
// -------------------------------------------------------------------------
@@ -215,7 +215,7 @@
void setSectionRowIndex( int );
- SharedPtr<HTMLCollectionImpl> cells();
+ RefPtr<HTMLCollectionImpl> cells();
void setCells(HTMLCollectionImpl *, int &exception);
DOMString align() const;
1.123 +3 -3 WebCore/khtml/html/htmlparser.cpp
Index: htmlparser.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/htmlparser.cpp,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- htmlparser.cpp 21 Nov 2005 01:20:14 -0000 1.122
+++ htmlparser.cpp 1 Dec 2005 10:32:19 -0000 1.123
@@ -90,7 +90,7 @@
AtomicString tagName;
int level;
bool strayTableContent;
- SharedPtr<NodeImpl> node;
+ RefPtr<NodeImpl> node;
HTMLStackElem* next;
};
@@ -215,7 +215,7 @@
if (!n)
return;
- SharedPtr<NodeImpl> protectNode(n);
+ RefPtr<NodeImpl> protectNode(n);
// set attributes
if (n->isHTMLElement()) {
@@ -264,7 +264,7 @@
bool HTMLParser::insertNode(NodeImpl *n, bool flat)
{
- SharedPtr<NodeImpl> protectNode(n);
+ RefPtr<NodeImpl> protectNode(n);
const AtomicString& localName = n->localName();
int tagPriority = n->isHTMLElement() ? static_cast<HTMLElementImpl*>(n)->tagPriority() : 0;
1.10 +1 -1 WebCore/khtml/misc/shared.h
Index: shared.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/misc/shared.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- shared.h 8 Nov 2005 08:11:10 -0000 1.9
+++ shared.h 1 Dec 2005 10:32:23 -0000 1.10
@@ -1,7 +1,7 @@
#ifndef SHARED_H
#define SHARED_H
-#include <kxmlcore/SharedPtr.h>
+#include <kxmlcore/RefPtr.h>
namespace khtml {
1.160 +1 -1 WebCore/khtml/rendering/bidi.cpp
Index: bidi.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/bidi.cpp,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -r1.159 -r1.160
--- bidi.cpp 30 Nov 2005 02:40:29 -0000 1.159
+++ bidi.cpp 1 Dec 2005 10:32:23 -0000 1.160
@@ -65,7 +65,7 @@
BidiIterator eor;
BidiIterator last;
BidiIterator current;
- SharedPtr<BidiContext> context;
+ RefPtr<BidiContext> context;
BidiStatus status;
QChar::Direction dir;
bool adjustEmbedding;
1.217 +1 -1 WebCore/khtml/rendering/render_block.cpp
Index: render_block.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_block.cpp,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -r1.216 -r1.217
--- render_block.cpp 30 Nov 2005 02:51:57 -0000 1.216
+++ render_block.cpp 1 Dec 2005 10:32:23 -0000 1.217
@@ -3347,7 +3347,7 @@
// The original string is going to be either a generated content string or a DOM node's
// string. We want the original string before it got transformed in case first-letter has
// no text-transform or a different text-transform applied to it.
- SharedPtr<DOMStringImpl> oldText = textObj->originalString();
+ RefPtr<DOMStringImpl> oldText = textObj->originalString();
KHTMLAssert(oldText);
if (oldText.notNull() && oldText->l > 0) {
1.34 +1 -1 WebCore/khtml/rendering/render_line.h
Index: render_line.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_line.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- render_line.h 27 Nov 2005 22:52:09 -0000 1.33
+++ render_line.h 1 Dec 2005 10:32:23 -0000 1.34
@@ -384,7 +384,7 @@
uint m_lineBreakPos;
BidiStatus m_lineBreakBidiStatus;
- SharedPtr<BidiContext> m_lineBreakContext;
+ RefPtr<BidiContext> m_lineBreakContext;
// The height of the block at the end of this line. This is where the next line starts.
int m_blockHeight;
1.208 +5 -5 WebCore/khtml/rendering/render_text.cpp
Index: render_text.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_text.cpp,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -r1.207 -r1.208
--- render_text.cpp 8 Nov 2005 00:49:09 -0000 1.207
+++ render_text.cpp 1 Dec 2005 10:32:23 -0000 1.208
@@ -810,7 +810,7 @@
RenderObject::setStyle( _style );
if (needToTransformText) {
- SharedPtr<DOMStringImpl> textToTransform = originalString();
+ RefPtr<DOMStringImpl> textToTransform = originalString();
if (textToTransform.notNull())
setText(textToTransform.get(), true);
}
@@ -903,9 +903,9 @@
return false;
}
-SharedPtr<DOMStringImpl> RenderText::originalString() const
+RefPtr<DOMStringImpl> RenderText::originalString() const
{
- return element() ? SharedPtr<DOMStringImpl>(element()->string()) : SharedPtr<DOMStringImpl>();
+ return element() ? RefPtr<DOMStringImpl>(element()->string()) : RefPtr<DOMStringImpl>();
}
void RenderText::absoluteRects(QValueList<QRect>& rects, int _tx, int _ty)
@@ -1860,7 +1860,7 @@
return true;
}
-SharedPtr<DOMStringImpl> RenderTextFragment::originalString() const
+RefPtr<DOMStringImpl> RenderTextFragment::originalString() const
{
DOM::DOMStringImpl* result = 0;
if (element())
@@ -1869,5 +1869,5 @@
result = contentString();
if (result && (start() > 0 || start() < result->l))
result = result->substring(start(), end());
- return SharedPtr<DOMStringImpl>(result);
+ return RefPtr<DOMStringImpl>(result);
}
1.94 +2 -2 WebCore/khtml/rendering/render_text.h
Index: render_text.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/rendering/render_text.h,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- render_text.h 21 Nov 2005 01:20:28 -0000 1.93
+++ render_text.h 1 Dec 2005 10:32:24 -0000 1.94
@@ -166,7 +166,7 @@
virtual ~RenderText();
virtual bool isTextFragment() const;
- virtual SharedPtr<DOM::DOMStringImpl> originalString() const;
+ virtual RefPtr<DOM::DOMStringImpl> originalString() const;
virtual const char *renderName() const { return "RenderText"; }
@@ -326,7 +326,7 @@
uint end() const { return m_end; }
DOM::DOMStringImpl* contentString() const { return m_generatedContentStr; }
- virtual SharedPtr<DOM::DOMStringImpl> originalString() const;
+ virtual RefPtr<DOM::DOMStringImpl> originalString() const;
private:
uint m_start;
1.35 +12 -12 WebCore/khtml/xml/dom2_eventsimpl.h
Index: dom2_eventsimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom2_eventsimpl.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- dom2_eventsimpl.h 19 Nov 2005 01:26:47 -0000 1.34
+++ dom2_eventsimpl.h 1 Dec 2005 10:32:25 -0000 1.35
@@ -99,7 +99,7 @@
NodeImpl *m_currentTarget; // ref > 0 maintained externally
unsigned short m_eventPhase;
- SharedPtr<NodeImpl> m_target;
+ RefPtr<NodeImpl> m_target;
DOMTimeStamp m_createTime;
};
@@ -133,7 +133,7 @@
virtual int which() const;
private:
- SharedPtr<AbstractViewImpl> m_view;
+ RefPtr<AbstractViewImpl> m_view;
int m_detail;
};
@@ -237,8 +237,8 @@
virtual int which() const;
private:
unsigned short m_button;
- SharedPtr<NodeImpl> m_relatedTarget;
- SharedPtr<ClipboardImpl> m_clipboard;
+ RefPtr<NodeImpl> m_relatedTarget;
+ RefPtr<ClipboardImpl> m_clipboard;
};
@@ -287,7 +287,7 @@
private:
QKeyEvent *m_keyEvent;
- SharedPtr<DOMStringImpl> m_keyIdentifier;
+ RefPtr<DOMStringImpl> m_keyIdentifier;
unsigned m_keyLocation;
bool m_altGraphKey : 1;
};
@@ -320,10 +320,10 @@
unsigned short attrChangeArg);
virtual bool isMutationEvent() const;
private:
- SharedPtr<NodeImpl> m_relatedNode;
- SharedPtr<DOMStringImpl> m_prevValue;
- SharedPtr<DOMStringImpl> m_newValue;
- SharedPtr<DOMStringImpl> m_attrName;
+ RefPtr<NodeImpl> m_relatedNode;
+ RefPtr<DOMStringImpl> m_prevValue;
+ RefPtr<DOMStringImpl> m_newValue;
+ RefPtr<DOMStringImpl> m_attrName;
unsigned short m_attrChange;
};
@@ -335,7 +335,7 @@
ClipboardImpl *clipboard() const { return m_clipboard.get(); }
virtual bool isClipboardEvent() const;
private:
- SharedPtr<ClipboardImpl> m_clipboard;
+ RefPtr<ClipboardImpl> m_clipboard;
};
// extension: mouse wheel event
@@ -367,7 +367,7 @@
private:
AtomicString m_eventType;
- SharedPtr<EventListener> m_listener;
+ RefPtr<EventListener> m_listener;
bool m_useCapture;
};
@@ -414,7 +414,7 @@
DOMString result() const { return m_result.get(); }
private:
- SharedPtr<DOMStringImpl> m_result;
+ RefPtr<DOMStringImpl> m_result;
};
} // namespace
1.47 +2 -2 WebCore/khtml/xml/dom2_rangeimpl.cpp
Index: dom2_rangeimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom2_rangeimpl.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- dom2_rangeimpl.cpp 8 Nov 2005 08:11:11 -0000 1.46
+++ dom2_rangeimpl.cpp 1 Dec 2005 10:32:25 -0000 1.47
@@ -1409,12 +1409,12 @@
&& a.endOffset(exception) == b.endOffset(exception);
}
-SharedPtr<RangeImpl> rangeOfContents(NodeImpl *node)
+RefPtr<RangeImpl> rangeOfContents(NodeImpl *node)
{
RangeImpl *range = new RangeImpl(node->getDocument());
int exception = 0;
range->selectNodeContents(node, exception);
- return SharedPtr<RangeImpl>(range);
+ return RefPtr<RangeImpl>(range);
}
}
1.31 +2 -2 WebCore/khtml/xml/dom2_rangeimpl.h
Index: dom2_rangeimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom2_rangeimpl.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- dom2_rangeimpl.h 8 Nov 2005 08:11:11 -0000 1.30
+++ dom2_rangeimpl.h 1 Dec 2005 10:32:25 -0000 1.31
@@ -106,7 +106,7 @@
#endif
protected:
- // FIXME - this could be a full-on SharedPtr in principle...
+ // FIXME - this could be a full-on RefPtr in principle...
DocPtr<DocumentImpl> m_ownerDocument;
NodeImpl *m_startContainer;
unsigned m_startOffset;
@@ -123,7 +123,7 @@
bool containedByReadOnly() const;
};
-SharedPtr<RangeImpl> rangeOfContents(NodeImpl *node);
+RefPtr<RangeImpl> rangeOfContents(NodeImpl *node);
bool operator==(const RangeImpl &, const RangeImpl &);
inline bool operator!=(const RangeImpl &a, const RangeImpl &b) { return !(a == b); }
1.280 +27 -27 WebCore/khtml/xml/dom_docimpl.cpp
Index: dom_docimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.cpp,v
retrieving revision 1.279
retrieving revision 1.280
diff -u -r1.279 -r1.280
--- dom_docimpl.cpp 29 Nov 2005 01:43:48 -0000 1.279
+++ dom_docimpl.cpp 1 Dec 2005 10:32:26 -0000 1.280
@@ -735,7 +735,7 @@
if (!source)
return 0;
- SharedPtr<NodeImpl> protect(source);
+ RefPtr<NodeImpl> protect(source);
switch (source->nodeType()) {
case Node::ENTITY_NODE:
@@ -2279,7 +2279,7 @@
return false;
bool focusChangeBlocked = false;
- SharedPtr<NodeImpl> oldFocusNode = m_focusNode;
+ RefPtr<NodeImpl> oldFocusNode = m_focusNode;
m_focusNode = 0;
clearSelectionIfNeeded(newFocusNode);
@@ -2900,7 +2900,7 @@
{
// Use a TextIterator to visit the potentially multiple nodes the range covers.
for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance()) {
- SharedPtr<RangeImpl> textPiece = markedText.range();
+ RefPtr<RangeImpl> textPiece = markedText.range();
int exception = 0;
DocumentMarker marker = {type, textPiece->startOffset(exception), textPiece->endOffset(exception)};
addMarker(textPiece->startContainer(exception), marker);
@@ -2911,7 +2911,7 @@
{
// Use a TextIterator to visit the potentially multiple nodes the range covers.
for (TextIterator markedText(range); !markedText.atEnd(); markedText.advance()) {
- SharedPtr<RangeImpl> textPiece = markedText.range();
+ RefPtr<RangeImpl> textPiece = markedText.range();
int exception = 0;
unsigned startOffset = textPiece->startOffset(exception);
unsigned length = textPiece->endOffset(exception) - startOffset + 1;
@@ -3142,7 +3142,7 @@
void DocumentImpl::applyXSLTransform(ProcessingInstructionImpl* pi)
{
- SharedPtr<XSLTProcessorImpl> processor = new XSLTProcessorImpl;
+ RefPtr<XSLTProcessorImpl> processor = new XSLTProcessorImpl;
processor->setXSLStylesheet(static_cast<XSLStyleSheetImpl*>(pi->sheet()));
QString resultMIMEType;
@@ -3275,59 +3275,59 @@
}
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::images()
+RefPtr<HTMLCollectionImpl> DocumentImpl::images()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_IMAGES));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_IMAGES));
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::applets()
+RefPtr<HTMLCollectionImpl> DocumentImpl::applets()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_APPLETS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_APPLETS));
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::embeds()
+RefPtr<HTMLCollectionImpl> DocumentImpl::embeds()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_EMBEDS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_EMBEDS));
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::objects()
+RefPtr<HTMLCollectionImpl> DocumentImpl::objects()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_OBJECTS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_OBJECTS));
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::links()
+RefPtr<HTMLCollectionImpl> DocumentImpl::links()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_LINKS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_LINKS));
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::forms()
+RefPtr<HTMLCollectionImpl> DocumentImpl::forms()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_FORMS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_FORMS));
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::anchors()
+RefPtr<HTMLCollectionImpl> DocumentImpl::anchors()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_ANCHORS));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_ANCHORS));
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::all()
+RefPtr<HTMLCollectionImpl> DocumentImpl::all()
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_ALL));
+ return RefPtr<HTMLCollectionImpl>(new HTMLCollectionImpl(this, HTMLCollectionImpl::DOC_ALL));
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::windowNamedItems(DOMString &name)
+RefPtr<HTMLCollectionImpl> DocumentImpl::windowNamedItems(DOMString &name)
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLNameCollectionImpl(this, HTMLCollectionImpl::WINDOW_NAMED_ITEMS, name));
+ return RefPtr<HTMLCollectionImpl>(new HTMLNameCollectionImpl(this, HTMLCollectionImpl::WINDOW_NAMED_ITEMS, name));
}
-SharedPtr<HTMLCollectionImpl> DocumentImpl::documentNamedItems(DOMString &name)
+RefPtr<HTMLCollectionImpl> DocumentImpl::documentNamedItems(DOMString &name)
{
- return SharedPtr<HTMLCollectionImpl>(new HTMLNameCollectionImpl(this, HTMLCollectionImpl::DOCUMENT_NAMED_ITEMS, name));
+ return RefPtr<HTMLCollectionImpl>(new HTMLNameCollectionImpl(this, HTMLCollectionImpl::DOCUMENT_NAMED_ITEMS, name));
}
-SharedPtr<NameNodeListImpl> DocumentImpl::getElementsByName(const DOMString &elementName)
+RefPtr<NameNodeListImpl> DocumentImpl::getElementsByName(const DOMString &elementName)
{
- return SharedPtr<NameNodeListImpl>(new NameNodeListImpl(this, elementName));
+ return RefPtr<NameNodeListImpl>(new NameNodeListImpl(this, elementName));
}
// ----------------------------------------------------------------------------
1.143 +21 -21 WebCore/khtml/xml/dom_docimpl.h
Index: dom_docimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_docimpl.h,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- dom_docimpl.h 23 Nov 2005 09:46:56 -0000 1.142
+++ dom_docimpl.h 1 Dec 2005 10:32:26 -0000 1.143
@@ -209,23 +209,23 @@
NodeImpl *adoptNode(NodeImpl *source, int &exceptioncode);
- SharedPtr<NameNodeListImpl> getElementsByName(const DOMString &elementName);
+ RefPtr<NameNodeListImpl> getElementsByName(const DOMString &elementName);
// Actually part of HTMLDocument, but used for giving XML documents a window title as well
DOMString title() const { return m_title; }
void setTitle(DOMString, NodeImpl *titleElement = 0);
void removeTitle(NodeImpl *titleElement);
- SharedPtr<HTMLCollectionImpl> images();
- SharedPtr<HTMLCollectionImpl> embeds();
- SharedPtr<HTMLCollectionImpl> applets();
- SharedPtr<HTMLCollectionImpl> links();
- SharedPtr<HTMLCollectionImpl> forms();
- SharedPtr<HTMLCollectionImpl> anchors();
- SharedPtr<HTMLCollectionImpl> all();
- SharedPtr<HTMLCollectionImpl> objects();
- SharedPtr<HTMLCollectionImpl> windowNamedItems(DOMString &name);
- SharedPtr<HTMLCollectionImpl> documentNamedItems(DOMString &name);
+ RefPtr<HTMLCollectionImpl> images();
+ RefPtr<HTMLCollectionImpl> embeds();
+ RefPtr<HTMLCollectionImpl> applets();
+ RefPtr<HTMLCollectionImpl> links();
+ RefPtr<HTMLCollectionImpl> forms();
+ RefPtr<HTMLCollectionImpl> anchors();
+ RefPtr<HTMLCollectionImpl> all();
+ RefPtr<HTMLCollectionImpl> objects();
+ RefPtr<HTMLCollectionImpl> windowNamedItems(DOMString &name);
+ RefPtr<HTMLCollectionImpl> documentNamedItems(DOMString &name);
// DOM methods overridden from parent classes
@@ -588,7 +588,7 @@
void applyXSLTransform(ProcessingInstructionImpl* pi);
void setTransformSource(void* doc) { m_transformSource = doc; }
const void* transformSource() { return m_transformSource; }
- SharedPtr<DocumentImpl> transformSourceDocument() { return m_transformSourceDocument; }
+ RefPtr<DocumentImpl> transformSourceDocument() { return m_transformSourceDocument; }
void setTransformSourceDocument(DocumentImpl *doc) { m_transformSourceDocument = doc; }
#endif
@@ -616,7 +616,7 @@
QString m_baseURL;
QString m_baseTarget;
- SharedPtr<DocumentTypeImpl> m_docType;
+ RefPtr<DocumentTypeImpl> m_docType;
DOMImplementationImpl *m_implementation;
StyleSheetImpl *m_sheet;
@@ -643,9 +643,9 @@
QColor m_textColor;
- SharedPtr<NodeImpl> m_focusNode;
- SharedPtr<NodeImpl> m_hoverNode;
- SharedPtr<NodeImpl> m_activeNode;
+ RefPtr<NodeImpl> m_focusNode;
+ RefPtr<NodeImpl> m_hoverNode;
+ RefPtr<NodeImpl> m_activeNode;
unsigned int m_domtree_version;
@@ -691,7 +691,7 @@
DOMString m_title;
bool m_titleSetExplicitly;
- SharedPtr<NodeImpl> m_titleElement;
+ RefPtr<NodeImpl> m_titleElement;
RenderArena* m_renderArena;
@@ -711,7 +711,7 @@
#ifdef KHTML_XSLT
void *m_transformSource;
- SharedPtr<DocumentImpl> m_transformSourceDocument;
+ RefPtr<DocumentImpl> m_transformSourceDocument;
#endif
#ifndef KHTML_NO_XBL
@@ -842,9 +842,9 @@
virtual DOMString toString() const;
private:
- SharedPtr<DOMImplementationImpl> m_implementation;
- SharedPtr<NamedNodeMapImpl> m_entities;
- SharedPtr<NamedNodeMapImpl> m_notations;
+ RefPtr<DOMImplementationImpl> m_implementation;
+ RefPtr<NamedNodeMapImpl> m_entities;
+ RefPtr<NamedNodeMapImpl> m_notations;
DOMString m_name;
DOMString m_publicId;
1.96 +18 -18 WebCore/khtml/xml/dom_elementimpl.cpp
Index: dom_elementimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_elementimpl.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- dom_elementimpl.cpp 30 Nov 2005 23:04:14 -0000 1.95
+++ dom_elementimpl.cpp 1 Dec 2005 10:32:26 -0000 1.96
@@ -737,25 +737,25 @@
}
#endif
-SharedPtr<AttrImpl> ElementImpl::setAttributeNode(AttrImpl *attr, int &exception)
+RefPtr<AttrImpl> ElementImpl::setAttributeNode(AttrImpl *attr, int &exception)
{
return static_pointer_cast<AttrImpl>(attributes(false)->setNamedItem(attr, exception));
}
-SharedPtr<AttrImpl> ElementImpl::removeAttributeNode(AttrImpl *attr, int &exception)
+RefPtr<AttrImpl> ElementImpl::removeAttributeNode(AttrImpl *attr, int &exception)
{
if (!attr || attr->ownerElement() != this) {
exception = DOMException::NOT_FOUND_ERR;
- return SharedPtr<AttrImpl>();
+ return RefPtr<AttrImpl>();
}
if (getDocument() != attr->getDocument()) {
exception = DOMException::WRONG_DOCUMENT_ERR;
- return SharedPtr<AttrImpl>();
+ return RefPtr<AttrImpl>();
}
NamedAttrMapImpl *attrs = attributes(true);
if (!attrs)
- return SharedPtr<AttrImpl>();
+ return RefPtr<AttrImpl>();
return static_pointer_cast<AttrImpl>(attrs->removeNamedItem(attr->m_attribute->name(), exception));
}
@@ -851,7 +851,7 @@
return getNamedItem(QualifiedName(nullAtom, ln.impl(), namespaceURI.impl()));
}
-SharedPtr<NodeImpl> NamedAttrMapImpl::removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName, int &exception)
+RefPtr<NodeImpl> NamedAttrMapImpl::removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName, int &exception)
{
DOMString ln(localName);
if (element->getDocument()->isHTMLDocument())
@@ -870,49 +870,49 @@
return a->attrImpl();
}
-SharedPtr<NodeImpl> NamedAttrMapImpl::setNamedItem ( NodeImpl* arg, int &exceptioncode )
+RefPtr<NodeImpl> NamedAttrMapImpl::setNamedItem ( NodeImpl* arg, int &exceptioncode )
{
if (!element) {
exceptioncode = DOMException::NOT_FOUND_ERR;
- return SharedPtr<NodeImpl>();
+ return RefPtr<NodeImpl>();
}
// NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
if (isReadOnly()) {
exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
- return SharedPtr<NodeImpl>();
+ return RefPtr<NodeImpl>();
}
// WRONG_DOCUMENT_ERR: Raised if arg was created from a different document than the one that created this map.
if (arg->getDocument() != element->getDocument()) {
exceptioncode = DOMException::WRONG_DOCUMENT_ERR;
- return SharedPtr<NodeImpl>();
+ return RefPtr<NodeImpl>();
}
// Not mentioned in spec: throw a HIERARCHY_REQUEST_ERROR if the user passes in a non-attribute node
if (!arg->isAttributeNode()) {
exceptioncode = DOMException::HIERARCHY_REQUEST_ERR;
- return SharedPtr<NodeImpl>();
+ return RefPtr<NodeImpl>();
}
AttrImpl *attr = static_cast<AttrImpl*>(arg);
AttributeImpl* a = attr->attrImpl();
AttributeImpl* old = getAttributeItem(a->name());
if (old == a)
- return SharedPtr<NodeImpl>(arg); // we know about it already
+ return RefPtr<NodeImpl>(arg); // we know about it already
// INUSE_ATTRIBUTE_ERR: Raised if arg is an Attr that is already an attribute of another Element object.
// The DOM user must explicitly clone Attr nodes to re-use them in other elements.
if (attr->ownerElement()) {
exceptioncode = DOMException::INUSE_ATTRIBUTE_ERR;
- return SharedPtr<NodeImpl>();
+ return RefPtr<NodeImpl>();
}
if (a->name() == idAttr)
element->updateId(old ? old->value() : nullAtom, a->value());
// ### slightly inefficient - resizes attribute array twice.
- SharedPtr<NodeImpl> r;
+ RefPtr<NodeImpl> r;
if (old) {
if (!old->attrImpl())
old->allocateImpl(element);
@@ -927,23 +927,23 @@
// The DOM2 spec doesn't say that removeAttribute[NS] throws NOT_FOUND_ERR
// if the attribute is not found, but at this level we have to throw NOT_FOUND_ERR
// because of removeNamedItem, removeNamedItemNS, and removeAttributeNode.
-SharedPtr<NodeImpl> NamedAttrMapImpl::removeNamedItem(const QualifiedName& name, int &exceptioncode)
+RefPtr<NodeImpl> NamedAttrMapImpl::removeNamedItem(const QualifiedName& name, int &exceptioncode)
{
// ### should this really be raised when the attribute to remove isn't there at all?
// NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly
if (isReadOnly()) {
exceptioncode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
- return SharedPtr<NodeImpl>();
+ return RefPtr<NodeImpl>();
}
AttributeImpl* a = getAttributeItem(name);
if (!a) {
exceptioncode = DOMException::NOT_FOUND_ERR;
- return SharedPtr<NodeImpl>();
+ return RefPtr<NodeImpl>();
}
if (!a->attrImpl()) a->allocateImpl(element);
- SharedPtr<NodeImpl> r(a->attrImpl());
+ RefPtr<NodeImpl> r(a->attrImpl());
if (name == idAttr)
element->updateId(a->value(), nullAtom);
1.64 +6 -6 WebCore/khtml/xml/dom_elementimpl.h
Index: dom_elementimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_elementimpl.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- dom_elementimpl.h 21 Nov 2005 04:01:58 -0000 1.63
+++ dom_elementimpl.h 1 Dec 2005 10:32:27 -0000 1.64
@@ -198,9 +198,9 @@
AttrImpl *getAttributeNode(const DOMString &name) { return getAttributeNodeNS(DOMString(), name); }
AttrImpl *getAttributeNodeNS(const DOMString &namespaceURI, const DOMString &localName);
- SharedPtr<AttrImpl> setAttributeNode(AttrImpl *newAttr, int &exception);
- SharedPtr<AttrImpl> setAttributeNodeNS(AttrImpl *newAttr, int &exception) { return setAttributeNode(newAttr, exception); }
- SharedPtr<AttrImpl> removeAttributeNode(AttrImpl *oldAttr, int &exception);
+ RefPtr<AttrImpl> setAttributeNode(AttrImpl *newAttr, int &exception);
+ RefPtr<AttrImpl> setAttributeNodeNS(AttrImpl *newAttr, int &exception) { return setAttributeNode(newAttr, exception); }
+ RefPtr<AttrImpl> removeAttributeNode(AttrImpl *oldAttr, int &exception);
virtual CSSStyleDeclarationImpl *style();
@@ -298,12 +298,12 @@
// DOM methods & attributes for NamedNodeMap
virtual NodeImpl *getNamedItemNS(const DOMString &namespaceURI, const DOMString &localName) const;
- virtual SharedPtr<NodeImpl> removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName, int &exception);
+ virtual RefPtr<NodeImpl> removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName, int &exception);
virtual AttrImpl* getNamedItem(const QualifiedName& name) const;
- virtual SharedPtr<NodeImpl> removeNamedItem(const QualifiedName& name, int &exceptioncode);
- virtual SharedPtr<NodeImpl> setNamedItem(NodeImpl* arg, int &exceptioncode);
+ virtual RefPtr<NodeImpl> removeNamedItem(const QualifiedName& name, int &exceptioncode);
+ virtual RefPtr<NodeImpl> setNamedItem(NodeImpl* arg, int &exceptioncode);
virtual AttrImpl *item ( unsigned index ) const;
unsigned length() const { return len; }
1.218 +12 -12 WebCore/khtml/xml/dom_nodeimpl.cpp
Index: dom_nodeimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.cpp,v
retrieving revision 1.217
retrieving revision 1.218
diff -u -r1.217 -r1.218
--- dom_nodeimpl.cpp 30 Nov 2005 00:29:11 -0000 1.217
+++ dom_nodeimpl.cpp 1 Dec 2005 10:32:27 -0000 1.218
@@ -178,9 +178,9 @@
// be default nodeValue is null, so setting it has no effect
}
-SharedPtr<NodeListImpl> NodeImpl::childNodes()
+RefPtr<NodeListImpl> NodeImpl::childNodes()
{
- return SharedPtr<NodeListImpl>(new ChildNodeListImpl(this));
+ return RefPtr<NodeListImpl>(new ChildNodeListImpl(this));
}
NodeImpl *NodeImpl::firstChild() const
@@ -649,8 +649,8 @@
{
assert(!eventDispatchForbidden());
int exceptioncode = 0;
- SharedPtr<EventImpl> evt = new EventImpl(eventType, canBubbleArg, cancelableArg);
- SharedPtr<DocumentImpl> doc = getDocument();
+ RefPtr<EventImpl> evt = new EventImpl(eventType, canBubbleArg, cancelableArg);
+ RefPtr<DocumentImpl> doc = getDocument();
evt->setTarget(doc.get());
bool r = dispatchGenericEvent(evt.get(), exceptioncode);
if (!evt->defaultPrevented() && doc)
@@ -762,7 +762,7 @@
// Dispatching the first event can easily result in this node being destroyed.
// Since we dispatch up to three events here, we need to make sure we're referenced
// so the pointer will be good for the two subsequent ones.
- SharedPtr<NodeImpl> protect(this);
+ RefPtr<NodeImpl> protect(this);
bool cancelable = eventType != mousemoveEvent;
@@ -1616,15 +1616,15 @@
// FIXME: End of obviously misplaced HTML editing functions. Try to move these out of NodeImpl.
-SharedPtr<NodeListImpl> NodeImpl::getElementsByTagNameNS(const DOMString &namespaceURI, const DOMString &localName)
+RefPtr<NodeListImpl> NodeImpl::getElementsByTagNameNS(const DOMString &namespaceURI, const DOMString &localName)
{
if (namespaceURI.isNull() || localName.isNull())
- return SharedPtr<NodeListImpl>(); // FIXME: Who cares about this additional check?
+ return RefPtr<NodeListImpl>(); // FIXME: Who cares about this additional check?
DOMString name = localName;
if (getDocument()->isHTMLDocument())
name = localName.lower();
- return SharedPtr<NodeListImpl>(new TagNodeListImpl(this, AtomicString(namespaceURI), AtomicString(name)));
+ return RefPtr<NodeListImpl>(new TagNodeListImpl(this, AtomicString(namespaceURI), AtomicString(name)));
}
bool NodeImpl::isSupported(const DOMString &feature, const DOMString &version)
@@ -2113,7 +2113,7 @@
if(!refChild)
return appendChild(newChild, exceptioncode);
- SharedPtr<NodeImpl> protectNewChild(newChild); // make sure the new child is ref'd and deref'd so we don't leak it
+ RefPtr<NodeImpl> protectNewChild(newChild); // make sure the new child is ref'd and deref'd so we don't leak it
// Make sure adding the new child is ok
checkAddChild(newChild, exceptioncode);
@@ -2184,7 +2184,7 @@
{
exceptioncode = 0;
- SharedPtr<NodeImpl> protectNewChild(newChild); // make sure the new child is ref'd and deref'd so we don't leak it
+ RefPtr<NodeImpl> protectNewChild(newChild); // make sure the new child is ref'd and deref'd so we don't leak it
if ( oldChild == newChild ) // nothing to do
return oldChild;
@@ -2386,7 +2386,7 @@
{
exceptioncode = 0;
- SharedPtr<NodeImpl> protectNewChild(newChild); // make sure the new child is ref'd and deref'd so we don't leak it
+ RefPtr<NodeImpl> protectNewChild(newChild); // make sure the new child is ref'd and deref'd so we don't leak it
// Make sure adding the new child is ok
checkAddChild(newChild, exceptioncode);
@@ -2491,7 +2491,7 @@
{
// do not add applyChanges here! This function is only used during parsing
- SharedPtr<NodeImpl> protectNewChild(newChild); // make sure the new child is ref'd and deref'd so we don't leak it
+ RefPtr<NodeImpl> protectNewChild(newChild); // make sure the new child is ref'd and deref'd so we don't leak it
// short check for consistency with DTD
if (getDocument()->isHTMLDocument() && !childAllowed(newChild))
1.117 +9 -9 WebCore/khtml/xml/dom_nodeimpl.h
Index: dom_nodeimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.h,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -r1.116 -r1.117
--- dom_nodeimpl.h 26 Nov 2005 22:35:45 -0000 1.116
+++ dom_nodeimpl.h 1 Dec 2005 10:32:27 -0000 1.117
@@ -78,7 +78,7 @@
NodeImpl *parentNode() const { return parent(); }
NodeImpl *previousSibling() const { return m_previous; }
NodeImpl *nextSibling() const { return m_next; }
- virtual SharedPtr<NodeListImpl> childNodes();
+ virtual RefPtr<NodeListImpl> childNodes();
virtual NodeImpl *firstChild() const;
virtual NodeImpl *lastChild() const;
virtual bool hasAttributes() const;
@@ -205,7 +205,7 @@
MouseEventType type;
DOMString url; // url under mouse or empty
DOMString target;
- SharedPtr<NodeImpl> innerNode;
+ RefPtr<NodeImpl> innerNode;
};
// for LINK and STYLE
@@ -472,8 +472,8 @@
void notifyNodeListsAttributeChanged();
void notifyLocalNodeListsAttributeChanged();
- SharedPtr<NodeListImpl> getElementsByTagName(const DOMString &name) { return getElementsByTagNameNS("*", name); }
- SharedPtr<NodeListImpl> getElementsByTagNameNS(const DOMString &namespaceURI, const DOMString &localName);
+ RefPtr<NodeListImpl> getElementsByTagName(const DOMString &name) { return getElementsByTagNameNS("*", name); }
+ RefPtr<NodeListImpl> getElementsByTagNameNS(const DOMString &namespaceURI, const DOMString &localName);
private: // members
DocPtr<DocumentImpl> document;
@@ -650,16 +650,16 @@
virtual ~NamedNodeMapImpl() {}
NodeImpl *getNamedItem(const DOMString &name) const { return getNamedItemNS(DOMString(), name); }
- SharedPtr<NodeImpl> removeNamedItem(const DOMString &name, int &exception) { return removeNamedItemNS(DOMString(), name, exception); }
+ RefPtr<NodeImpl> removeNamedItem(const DOMString &name, int &exception) { return removeNamedItemNS(DOMString(), name, exception); }
virtual NodeImpl *getNamedItemNS(const DOMString &namespaceURI, const DOMString &localName) const = 0;
- SharedPtr<NodeImpl> setNamedItemNS(NodeImpl *arg, int &exception) { return setNamedItem(arg, exception); }
- virtual SharedPtr<NodeImpl> removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName, int &exception) = 0;
+ RefPtr<NodeImpl> setNamedItemNS(NodeImpl *arg, int &exception) { return setNamedItem(arg, exception); }
+ virtual RefPtr<NodeImpl> removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName, int &exception) = 0;
// DOM methods & attributes for NamedNodeMap
virtual NodeImpl *getNamedItem(const QualifiedName& attrName) const = 0;
- virtual SharedPtr<NodeImpl> removeNamedItem (const QualifiedName& attrName, int &exceptioncode) = 0;
- virtual SharedPtr<NodeImpl> setNamedItem (NodeImpl* arg, int &exceptioncode) = 0;
+ virtual RefPtr<NodeImpl> removeNamedItem (const QualifiedName& attrName, int &exceptioncode) = 0;
+ virtual RefPtr<NodeImpl> setNamedItem (NodeImpl* arg, int &exceptioncode) = 0;
virtual NodeImpl *item ( unsigned index ) const = 0;
virtual unsigned length( ) const = 0;
1.17 +1 -1 WebCore/khtml/xml/dom_xmlimpl.h
Index: dom_xmlimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_xmlimpl.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- dom_xmlimpl.h 21 Nov 2005 01:20:42 -0000 1.16
+++ dom_xmlimpl.h 1 Dec 2005 10:32:27 -0000 1.17
@@ -165,7 +165,7 @@
DOMStringImpl *m_data;
DOMStringImpl *m_localHref;
khtml::CachedObject *m_cachedSheet;
- SharedPtr<StyleSheetImpl> m_sheet;
+ RefPtr<StyleSheetImpl> m_sheet;
bool m_loading;
#ifdef KHTML_XSLT
bool m_isXSL;
1.17 +12 -12 WebCore/khtml/xsl/xslt_processorimpl.cpp
Index: xslt_processorimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/xsl/xslt_processorimpl.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- xslt_processorimpl.cpp 21 Nov 2005 04:02:01 -0000 1.16
+++ xslt_processorimpl.cpp 1 Dec 2005 10:32:30 -0000 1.17
@@ -177,13 +177,13 @@
}
-SharedPtr<DocumentImpl> XSLTProcessorImpl::createDocumentFromSource(const QString &sourceString, const QString &sourceMIMEType, NodeImpl *sourceNode, KHTMLView *view)
+RefPtr<DocumentImpl> XSLTProcessorImpl::createDocumentFromSource(const QString &sourceString, const QString &sourceMIMEType, NodeImpl *sourceNode, KHTMLView *view)
{
- SharedPtr<DocumentImpl> ownerDocument = sourceNode->getDocument();
+ RefPtr<DocumentImpl> ownerDocument = sourceNode->getDocument();
bool sourceIsDocument = (sourceNode == ownerDocument.get());
QString documentSource = sourceString;
- SharedPtr<DocumentImpl> result;
+ RefPtr<DocumentImpl> result;
if (sourceMIMEType == "text/html")
result = ownerDocument->implementation()->createHTMLDocument(view);
else {
@@ -219,9 +219,9 @@
return result;
}
-static inline SharedPtr<DocumentFragmentImpl> createFragmentFromSource(QString sourceString, QString sourceMIMEType, NodeImpl *sourceNode, DocumentImpl *ouputDoc)
+static inline RefPtr<DocumentFragmentImpl> createFragmentFromSource(QString sourceString, QString sourceMIMEType, NodeImpl *sourceNode, DocumentImpl *ouputDoc)
{
- SharedPtr<DocumentFragmentImpl> fragment = new DocumentFragmentImpl(ouputDoc);
+ RefPtr<DocumentFragmentImpl> fragment = new DocumentFragmentImpl(ouputDoc);
if (sourceMIMEType == "text/html")
parseHTMLDocumentFragment(sourceString, fragment.get());
@@ -238,7 +238,7 @@
return fragment;
}
-static xsltStylesheetPtr xsltStylesheetPointer(SharedPtr<XSLStyleSheetImpl> &cachedStylesheet, NodeImpl *stylesheetRootNode)
+static xsltStylesheetPtr xsltStylesheetPointer(RefPtr<XSLStyleSheetImpl> &cachedStylesheet, NodeImpl *stylesheetRootNode)
{
if (!cachedStylesheet && stylesheetRootNode) {
cachedStylesheet = new XSLStyleSheetImpl(stylesheetRootNode->parent() ? stylesheetRootNode->parent() : stylesheetRootNode);
@@ -253,7 +253,7 @@
static inline xmlDocPtr xmlDocPtrFromNode(NodeImpl *sourceNode)
{
- SharedPtr<DocumentImpl> ownerDocument = sourceNode->getDocument();
+ RefPtr<DocumentImpl> ownerDocument = sourceNode->getDocument();
bool sourceIsDocument = (sourceNode == ownerDocument.get());
xmlDocPtr sourceDoc = 0;
@@ -285,8 +285,8 @@
bool XSLTProcessorImpl::transformToString(NodeImpl *sourceNode, QString &mimeType, QString &resultString)
{
- SharedPtr<DocumentImpl> ownerDocument = sourceNode->getDocument();
- SharedPtr<XSLStyleSheetImpl> cachedStylesheet = m_stylesheet;
+ RefPtr<DocumentImpl> ownerDocument = sourceNode->getDocument();
+ RefPtr<XSLStyleSheetImpl> cachedStylesheet = m_stylesheet;
setXSLTLoadCallBack(stylesheetLoadFunc, this, ownerDocument->docLoader());
xsltStylesheetPtr sheet = xsltStylesheetPointer(cachedStylesheet, m_stylesheetRootNode.get());
@@ -314,7 +314,7 @@
return true;
}
-SharedPtr<DocumentImpl> XSLTProcessorImpl::transformToDocument(NodeImpl *sourceNode)
+RefPtr<DocumentImpl> XSLTProcessorImpl::transformToDocument(NodeImpl *sourceNode)
{
QString resultMIMEType;
QString resultString;
@@ -323,7 +323,7 @@
return createDocumentFromSource(resultString, resultMIMEType, sourceNode);
}
-SharedPtr<DocumentFragmentImpl> XSLTProcessorImpl::transformToFragment(NodeImpl *sourceNode, DocumentImpl *outputDoc)
+RefPtr<DocumentFragmentImpl> XSLTProcessorImpl::transformToFragment(NodeImpl *sourceNode, DocumentImpl *outputDoc)
{
QString resultMIMEType;
QString resultString;
@@ -338,7 +338,7 @@
m_parameters.replace(DOMString(localName).qstring(), new DOMString(value));
}
-SharedPtr<DOMStringImpl> XSLTProcessorImpl::getParameter(DOMStringImpl *namespaceURI, DOMStringImpl *localName) const
+RefPtr<DOMStringImpl> XSLTProcessorImpl::getParameter(DOMStringImpl *namespaceURI, DOMStringImpl *localName) const
{
// FIXME: namespace support?
if (DOMString *value = m_parameters.find(DOMString(localName).qstring()))
1.6 +7 -7 WebCore/khtml/xsl/xslt_processorimpl.h
Index: xslt_processorimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/xsl/xslt_processorimpl.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- xslt_processorimpl.h 27 Oct 2005 22:34:52 -0000 1.5
+++ xslt_processorimpl.h 1 Dec 2005 10:32:30 -0000 1.6
@@ -49,15 +49,15 @@
void setXSLStylesheet(XSLStyleSheetImpl *styleSheet) { m_stylesheet = styleSheet; }
bool transformToString(NodeImpl *source, QString &resultMIMEType, QString &resultString);
- SharedPtr<DocumentImpl> createDocumentFromSource(const QString &source, const QString &sourceMIMEType, NodeImpl *sourceNode, KHTMLView *view = 0);
+ RefPtr<DocumentImpl> createDocumentFromSource(const QString &source, const QString &sourceMIMEType, NodeImpl *sourceNode, KHTMLView *view = 0);
// DOM methods
void importStylesheet(NodeImpl *style) { m_stylesheetRootNode = style; }
- SharedPtr<DocumentFragmentImpl> transformToFragment(NodeImpl *source, DocumentImpl *ouputDoc);
- SharedPtr<DocumentImpl> transformToDocument(NodeImpl *source);
+ RefPtr<DocumentFragmentImpl> transformToFragment(NodeImpl *source, DocumentImpl *ouputDoc);
+ RefPtr<DocumentImpl> transformToDocument(NodeImpl *source);
void setParameter(DOMStringImpl *namespaceURI, DOMStringImpl *localName, DOMStringImpl *value);
- SharedPtr<DOMStringImpl> getParameter(DOMStringImpl *namespaceURI, DOMStringImpl *localName) const;
+ RefPtr<DOMStringImpl> getParameter(DOMStringImpl *namespaceURI, DOMStringImpl *localName) const;
void removeParameter(DOMStringImpl *namespaceURI, DOMStringImpl *localName);
void clearParameters() { m_parameters.clear(); }
@@ -69,10 +69,10 @@
private:
// Convert a libxml doc ptr to a KHTML DOM Document
- SharedPtr<DocumentImpl> documentFromXMLDocPtr(xmlDocPtr resultDoc, xsltStylesheetPtr sheet, DocumentImpl *ownerDocument, bool sourceIsDocument);
+ RefPtr<DocumentImpl> documentFromXMLDocPtr(xmlDocPtr resultDoc, xsltStylesheetPtr sheet, DocumentImpl *ownerDocument, bool sourceIsDocument);
- SharedPtr<XSLStyleSheetImpl> m_stylesheet;
- SharedPtr<NodeImpl> m_stylesheetRootNode;
+ RefPtr<XSLStyleSheetImpl> m_stylesheet;
+ RefPtr<NodeImpl> m_stylesheetRootNode;
QDict<DOMString> m_parameters;
};
1.9 +1 -1 WebCore/kwq/KWQClipboard.h
Index: KWQClipboard.h
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQClipboard.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- KWQClipboard.h 27 Sep 2005 22:37:27 -0000 1.8
+++ KWQClipboard.h 1 Dec 2005 10:32:31 -0000 1.9
@@ -95,7 +95,7 @@
DOM::DOMString m_effectAllowed;
QPoint m_dragLoc;
QPixmap m_dragImage;
- SharedPtr<DOM::NodeImpl> m_dragImageElement;
+ RefPtr<DOM::NodeImpl> m_dragImageElement;
AccessPolicy m_policy;
int m_changeCount;
bool m_dragStarted;
1.234 +3 -3 WebCore/kwq/KWQKHTMLPart.h
Index: KWQKHTMLPart.h
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.h,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -r1.233 -r1.234
--- KWQKHTMLPart.h 19 Nov 2005 01:26:47 -0000 1.233
+++ KWQKHTMLPart.h 1 Dec 2005 10:32:31 -0000 1.234
@@ -476,7 +476,7 @@
WebScriptObject *_windowScriptObject;
NPObject *_windowScriptNPObject;
- SharedPtr<DOM::NodeImpl> _dragSrc; // element that may be a drag source, for the current mouse gesture
+ RefPtr<DOM::NodeImpl> _dragSrc; // element that may be a drag source, for the current mouse gesture
bool _dragSrcIsLink;
bool _dragSrcIsImage;
bool _dragSrcInSelection;
@@ -484,9 +484,9 @@
bool _dragSrcIsDHTML;
KWQClipboard *_dragClipboard; // used on only the source side of dragging
- mutable SharedPtr<DOM::NodeImpl> _elementToDraw;
+ mutable RefPtr<DOM::NodeImpl> _elementToDraw;
- SharedPtr<DOM::RangeImpl> m_markedTextRange;
+ RefPtr<DOM::RangeImpl> m_markedTextRange;
bool m_markedTextUsesUnderlines;
QValueList<MarkedTextUnderline> m_markedTextUnderlines;
1.691 +9 -9 WebCore/kwq/KWQKHTMLPart.mm
Index: KWQKHTMLPart.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQKHTMLPart.mm,v
retrieving revision 1.690
retrieving revision 1.691
diff -u -r1.690 -r1.691
--- KWQKHTMLPart.mm 27 Nov 2005 07:54:52 -0000 1.690
+++ KWQKHTMLPart.mm 1 Dec 2005 10:32:31 -0000 1.691
@@ -598,7 +598,7 @@
}
// Initially search from the start (if forward) or end (if backward) of the selection, and search to edge of document.
- SharedPtr<RangeImpl> searchRange(rangeOfContents(xmlDocImpl()));
+ RefPtr<RangeImpl> searchRange(rangeOfContents(xmlDocImpl()));
if (selectionStart()) {
if (forward) {
setStart(searchRange.get(), VisiblePosition(selection().start(), selection().endAffinity()));
@@ -606,7 +606,7 @@
setEnd(searchRange.get(), VisiblePosition(selection().end(), selection().startAffinity()));
}
}
- SharedPtr<RangeImpl> resultRange(findPlainText(searchRange.get(), target, forward, caseFlag));
+ RefPtr<RangeImpl> resultRange(findPlainText(searchRange.get(), target, forward, caseFlag));
// If we re-found the (non-empty) selected range, then search again starting just past the selected range.
if (selectionStart() && *resultRange == *selection().toRange()) {
@@ -932,7 +932,7 @@
// Start at the end of the selection, search to edge of document. Starting at the selection end makes
// repeated "check spelling" commands work.
- SharedPtr<RangeImpl> searchRange(rangeOfContents(xmlDocImpl()));
+ RefPtr<RangeImpl> searchRange(rangeOfContents(xmlDocImpl()));
bool startedWithSelection = false;
if (selectionStart()) {
startedWithSelection = true;
@@ -999,7 +999,7 @@
if (misspelling.length > 0) {
// Build up result range and string. Note the misspelling may span many text nodes,
// but the CharIterator insulates us from this complexity
- SharedPtr<RangeImpl> misspellingRange(rangeOfContents(xmlDocImpl()));
+ RefPtr<RangeImpl> misspellingRange(rangeOfContents(xmlDocImpl()));
CharacterIterator chars(it.range().get());
chars.advance(misspelling.location);
misspellingRange->setStart(chars.range()->startContainer(exception), chars.range()->startOffset(exception), exception);
@@ -3571,7 +3571,7 @@
NSFont *font = nil;
- SharedPtr<RangeImpl> range = d->m_selection.toRange();
+ RefPtr<RangeImpl> range = d->m_selection.toRange();
NodeImpl *startNode = range->editingStartPosition().node();
if (startNode != nil) {
NodeImpl *pastEnd = range->pastEndNode();
@@ -4068,7 +4068,7 @@
if (![_bridge isContinuousSpellCheckingEnabled])
return;
- SharedPtr<RangeImpl> searchRange(selection.toRange());
+ RefPtr<RangeImpl> searchRange(selection.toRange());
if (searchRange.isNull() || searchRange->isDetached())
return;
@@ -4100,7 +4100,7 @@
else {
// Build up result range and string. Note the misspelling may span many text nodes,
// but the CharIterator insulates us from this complexity
- SharedPtr<RangeImpl> misspellingRange(rangeOfContents(xmlDocImpl()));
+ RefPtr<RangeImpl> misspellingRange(rangeOfContents(xmlDocImpl()));
CharacterIterator chars(it.range().get());
chars.advance(misspelling.location);
misspellingRange->setStart(chars.range()->startContainer(exception), chars.range()->startOffset(exception), exception);
@@ -4366,14 +4366,14 @@
if (![_bridge canRunBeforeUnloadConfirmPanel])
return true;
- SharedPtr<DocumentImpl> document = xmlDocImpl();
+ RefPtr<DocumentImpl> document = xmlDocImpl();
if (!document)
return true;
HTMLElementImpl* body = document->body();
if (!body)
return true;
- SharedPtr<BeforeUnloadEventImpl> event = new BeforeUnloadEventImpl;
+ RefPtr<BeforeUnloadEventImpl> event = new BeforeUnloadEventImpl;
event->setTarget(document.get());
int exception = 0;
body->dispatchGenericEvent(event.get(), exception);
1.436 +1 -1 WebCore/kwq/WebCoreBridge.mm
Index: WebCoreBridge.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/WebCoreBridge.mm,v
retrieving revision 1.435
retrieving revision 1.436
diff -u -r1.435 -r1.436
--- WebCoreBridge.mm 30 Nov 2005 02:06:34 -0000 1.435
+++ WebCoreBridge.mm 1 Dec 2005 10:32:32 -0000 1.436
@@ -1664,7 +1664,7 @@
return NSMakeRange(NSNotFound, 0);
}
- SharedPtr<RangeImpl> fromStartRange(_part->xmlDocImpl()->createRange());
+ RefPtr<RangeImpl> fromStartRange(_part->xmlDocImpl()->createRange());
int exception = 0;
fromStartRange->setEnd(range->startContainer(exception), range->startOffset(exception), exception);
More information about the webkit-changes
mailing list