Commit 85c3a50e authored by darin's avatar darin
Browse files

Reviewed by Eric and Justin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7310
          fix leaks by using RefPtr more

        * bindings/objc/DOM.mm:
        (-[DOMDocument adoptNode:]):
        (-[DOMDocument createElement:]):
        (-[DOMDocument createDocumentFragment]):
        (-[DOMDocument createTextNode:]):
        (-[DOMDocument createComment:]):
        (-[DOMDocument createCDATASection:]):
        (-[DOMDocument createProcessingInstruction::]):
        (-[DOMDocument createEntityReference:]):
        (-[DOMDocument importNode::]):
        (-[DOMDocument createElementNS::]):
        (-[DOMDocument createRange]):
        (-[DOMDocument createCSSStyleDeclaration]):
        (-[DOMDocument createNodeIterator::::]):
        (-[DOMDocument createTreeWalker::::]):
        * bindings/objc/DOMCSS.mm:
        (-[DOMCSSStyleDeclaration getPropertyCSSValue:]):
        * bindings/objc/DOMEvents.mm:
        (-[DOMDocument createEvent:]):
        * bridge/mac/MacFrame.h:
        * bridge/mac/MacFrame.mm:
        (WebCore::MacFrame::MacFrame):
        (WebCore::MacFrame::freeClipboard):
        (WebCore::MacFrame::setView):
        (WebCore::MacFrame::wheelEvent):
        (WebCore::MacFrame::openURLFromPageCache):
        (WebCore::MacFrame::mouseDownViewIfStillGood):
        (WebCore::MacFrame::khtmlMouseMoveEvent):
        (WebCore::MacFrame::dispatchCPPEvent):
        (WebCore::MacFrame::mouseDown):
        (WebCore::MacFrame::mouseDragged):
        (WebCore::MacFrame::mouseUp):
        (WebCore::MacFrame::mouseMoved):
        (WebCore::MacFrame::sendContextMenuEvent):
        (WebCore::MacFrame::dispatchDragSrcEvent):
        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge convertToDOMRange:]):
        (-[WebCoreFrameBridge convertNSRangeToDOMRange:]):
        (-[WebCoreFrameBridge selectNSRange:]):
        (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]):
        (-[WebCoreFrameBridge typingStyle]):
        (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
        (-[WebCoreFrameBridge dragExitedWithDraggingInfo:]):
        (-[WebCoreFrameBridge concludeDragForDraggingInfo:]):
        * css/css_computedstyle.cpp:
        (WebCore::CSSComputedStyleDeclarationImpl::CSSComputedStyleDeclarationImpl):
        (WebCore::CSSComputedStyleDeclarationImpl::cssText):
        (WebCore::CSSComputedStyleDeclarationImpl::setCssText):
        (WebCore::CSSComputedStyleDeclarationImpl::getPropertyCSSValue):
        (WebCore::CSSComputedStyleDeclarationImpl::getPropertyValue):
        (WebCore::CSSComputedStyleDeclarationImpl::removeProperty):
        (WebCore::CSSComputedStyleDeclarationImpl::setProperty):
        (WebCore::CSSComputedStyleDeclarationImpl::item):
        (WebCore::CSSComputedStyleDeclarationImpl::copyInheritableProperties):
        (WebCore::CSSComputedStyleDeclarationImpl::copy):
        (WebCore::CSSComputedStyleDeclarationImpl::makeMutable):
        * css/css_computedstyle.h:
        * css/css_grammar.y:
        * css/css_ruleimpl.cpp:
        (WebCore::CSSStyleRuleImpl::~CSSStyleRuleImpl):
        (WebCore::CSSStyleRuleImpl::setDeclaration):
        * css/css_ruleimpl.h:
        (DOM::CSSStyleRuleImpl::style):
        (DOM::CSSStyleRuleImpl::declaration):
        * css/css_valueimpl.cpp:
        (WebCore::propertyID):
        (WebCore::quoteStringIfNeeded):
        (WebCore::CSSStyleDeclarationImpl::getPropertyCSSValue):
        (WebCore::CSSStyleDeclarationImpl::getPropertyValue):
        (WebCore::CSSStyleDeclarationImpl::getPropertyPriority):
        (WebCore::CSSStyleDeclarationImpl::getPropertyShorthand):
        (WebCore::CSSStyleDeclarationImpl::isPropertyImplicit):
        (WebCore::CSSStyleDeclarationImpl::setProperty):
        (WebCore::CSSStyleDeclarationImpl::removeProperty):
        (WebCore::CSSStyleDeclarationImpl::isPropertyName):
        (WebCore::CSSMutableStyleDeclarationImpl::getPropertyValue):
        (WebCore::CSSMutableStyleDeclarationImpl::get4Values):
        (WebCore::CSSMutableStyleDeclarationImpl::getShortHandValue):
        (WebCore::CSSMutableStyleDeclarationImpl::getPropertyCSSValue):
        (WebCore::CSSMutableStyleDeclarationImpl::removeProperty):
        (WebCore::CSSMutableStyleDeclarationImpl::setProperty):
        (WebCore::CSSMutableStyleDeclarationImpl::setStringProperty):
        (WebCore::CSSMutableStyleDeclarationImpl::setImageProperty):
        (WebCore::CSSMutableStyleDeclarationImpl::parseDeclaration):
        (WebCore::CSSMutableStyleDeclarationImpl::setLengthProperty):
        (WebCore::CSSMutableStyleDeclarationImpl::item):
        (WebCore::CSSMutableStyleDeclarationImpl::cssText):
        (WebCore::CSSMutableStyleDeclarationImpl::setCssText):
        (WebCore::CSSMutableStyleDeclarationImpl::copyBlockProperties):
        (WebCore::CSSStyleDeclarationImpl::copyPropertiesInSet):
        (WebCore::CSSMutableStyleDeclarationImpl::removePropertiesInSet):
        (WebCore::CSSMutableStyleDeclarationImpl::makeMutable):
        (WebCore::CSSMutableStyleDeclarationImpl::copy):
        (WebCore::CSSInheritedValueImpl::cssText):
        (WebCore::CSSInitialValueImpl::cssText):
        (WebCore::CSSValueListImpl::append):
        (WebCore::CSSValueListImpl::cssText):
        (WebCore::CSSPrimitiveValueImpl::CSSPrimitiveValueImpl):
        (WebCore::CSSPrimitiveValueImpl::cleanup):
        (WebCore::CSSPrimitiveValueImpl::setStringValue):
        (WebCore::CSSPrimitiveValueImpl::getStringValue):
        (WebCore::CSSPrimitiveValueImpl::parseString):
        (WebCore::CSSPrimitiveValueImpl::cssText):
        (WebCore::CSSImageValueImpl::CSSImageValueImpl):
        (WebCore::CSSBorderImageValueImpl::CSSBorderImageValueImpl):
        (WebCore::CSSBorderImageValueImpl::cssText):
        (WebCore::FontFamilyValueImpl::FontFamilyValueImpl):
        (WebCore::FontFamilyValueImpl::cssText):
        (WebCore::FontValueImpl::cssText):
        (WebCore::ShadowValueImpl::ShadowValueImpl):
        (WebCore::ShadowValueImpl::cssText):
        (WebCore::CSSProperty::cssText):
        * css/css_valueimpl.h:
        (WebCore::CSSValueImpl::setCssText):
        (WebCore::CSSValueListImpl::item):
        (WebCore::CSSPrimitiveValueImpl::getFloatValue):
        (WebCore::CSSPrimitiveValueImpl::getCounterValue):
        (WebCore::CSSPrimitiveValueImpl::getRectValue):
        (WebCore::CSSPrimitiveValueImpl::getRGBColorValue):
        (WebCore::CSSPrimitiveValueImpl::getPairValue):
        (WebCore::CSSPrimitiveValueImpl::getDashboardRegionValue):
        (WebCore::CSSPrimitiveValueImpl::):
        (WebCore::CSSQuirkPrimitiveValueImpl::CSSQuirkPrimitiveValueImpl):
        (WebCore::CounterImpl::identifier):
        (WebCore::CounterImpl::listStyle):
        (WebCore::CounterImpl::separator):
        (WebCore::RectImpl::top):
        (WebCore::RectImpl::right):
        (WebCore::RectImpl::bottom):
        (WebCore::RectImpl::left):
        (WebCore::RectImpl::setTop):
        (WebCore::RectImpl::setRight):
        (WebCore::RectImpl::setBottom):
        (WebCore::RectImpl::setLeft):
        (WebCore::PairImpl::first):
        (WebCore::PairImpl::second):
        (WebCore::PairImpl::setFirst):
        (WebCore::PairImpl::setSecond):
        (WebCore::DashboardRegionImpl::DashboardRegionImpl):
        (WebCore::FontFamilyValueImpl::fontName):
        (WebCore::CSSProperty::CSSProperty):
        (WebCore::CSSProperty::value):
        (WebCore::CSSMutableStyleDeclarationImpl::setNode):
        (WebCore::CSSMutableStyleDeclarationImpl::setProperty):
        (WebCore::CSSMutableStyleDeclarationImpl::removeProperty):
        * css/cssparser.cpp:
        (CSSParser::createStyleDeclaration):
        (CSSParser::parseDashboardRegions):
        * css/cssparser.h:
        (WebCore::Value::):
        (WebCore::qString):
        (WebCore::domString):
        (WebCore::atomicString):
        (WebCore::ValueList::current):
        (WebCore::ValueList::next):
        (WebCore::CSSParser::current):
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::applyProperty):
        * dom/DOMImplementationImpl.cpp:
        (DOM::DOMImplementationImpl::createDocument):
        (DOM::DOMImplementationImpl::instance):
        * dom/DOMImplementationImpl.h:
        * dom/DocumentImpl.cpp:
        (WebCore::DocumentImpl::DocumentImpl):
        (WebCore::DocumentImpl::~DocumentImpl):
        (WebCore::DocumentImpl::setDocType):
        (WebCore::DocumentImpl::createElement):
        (WebCore::DocumentImpl::createDocumentFragment):
        (WebCore::DocumentImpl::createTextNode):
        (WebCore::DocumentImpl::createComment):
        (WebCore::DocumentImpl::createCDATASection):
        (WebCore::DocumentImpl::createProcessingInstruction):
        (WebCore::DocumentImpl::createEntityReference):
        (WebCore::DocumentImpl::createEditingTextNode):
        (WebCore::DocumentImpl::createCSSStyleDeclaration):
        (WebCore::DocumentImpl::importNode):
        (WebCore::DocumentImpl::adoptNode):
        (WebCore::DocumentImpl::createElementNS):
        (WebCore::DocumentImpl::setTitle):
        (WebCore::DocumentImpl::createRange):
        (WebCore::DocumentImpl::createNodeIterator):
        (WebCore::DocumentImpl::createTreeWalker):
        (WebCore::DocumentImpl::setStyleSheet):
        (WebCore::DocumentImpl::setHoverNode):
        (WebCore::DocumentImpl::setActiveNode):
        (WebCore::DocumentImpl::setFocusNode):
        (WebCore::DocumentImpl::defaultView):
        (WebCore::DocumentImpl::createEvent):
        (WebCore::DocumentImpl::setHTMLWindowEventListener):
        (WebCore::DocumentImpl::addWindowEventListener):
        (WebCore::DocumentImpl::createHTMLEventListener):
        (WebCore::DocumentImpl::images):
        (WebCore::DocumentImpl::applets):
        (WebCore::DocumentImpl::embeds):
        (WebCore::DocumentImpl::objects):
        (WebCore::DocumentImpl::links):
        (WebCore::DocumentImpl::forms):
        (WebCore::DocumentImpl::anchors):
        (WebCore::DocumentImpl::all):
        (WebCore::DocumentImpl::windowNamedItems):
        (WebCore::DocumentImpl::documentNamedItems):
        (WebCore::DocumentImpl::getElementsByName):
        * dom/DocumentImpl.h:
        (WebCore::DocumentImpl::realDocType):
        (WebCore::DocumentImpl::createAttribute):
        (WebCore::DocumentImpl::title):
        (WebCore::DocumentImpl::styleSelector):
        (WebCore::DocumentImpl::setRestoreState):
        (WebCore::DocumentImpl::restoreState):
        (WebCore::DocumentImpl::view):
        (WebCore::DocumentImpl::docLoader):
        (WebCore::DocumentImpl::tokenizer):
        (WebCore::DocumentImpl::focusNode):
        (WebCore::DocumentImpl::hoverNode):
        (WebCore::DocumentImpl::activeNode):
        (WebCore::DocumentImpl::policyBaseURL):
        (WebCore::DocumentImpl::setPolicyBaseURL):
        (WebCore::DocumentImpl::):
        (WebCore::DocumentImpl::transformSourceDocument):
        (WebCore::DocumentImpl::domTreeVersion):
        (WebCore::DocumentImpl::decoder):
        * dom/NodeListImpl.cpp:
        (DOM::NodeListImpl::NodeListImpl):
        (DOM::NodeListImpl::~NodeListImpl):
        (DOM::NodeListImpl::recursiveLength):
        (DOM::NodeListImpl::recursiveItem):
        (DOM::NodeListImpl::itemById):
        * dom/NodeListImpl.h:
        * dom/dom2_eventsimpl.cpp:
        (WebCore::RegisteredEventListener::RegisteredEventListener):
        * dom/dom2_eventsimpl.h:
        (WebCore::operator!=):
        * dom/dom2_traversalimpl.cpp:
        (DOM::TraversalImpl::TraversalImpl):
        (DOM::NodeIteratorImpl::NodeIteratorImpl):
        (DOM::TreeWalkerImpl::TreeWalkerImpl):
        * dom/dom2_traversalimpl.h:
        (WebCore::TraversalImpl::root):
        (WebCore::TraversalImpl::filter):
        (WebCore::NodeIteratorImpl::referenceNode):
        (WebCore::NodeIteratorImpl::setPointerBeforeReferenceNode):
        (WebCore::NodeIteratorImpl::setDetached):
        (WebCore::NodeIteratorImpl::document):
        (WebCore::TreeWalkerImpl::currentNode):
        * dom/dom_position.cpp:
        (WebCore::Position::computedStyle):
        * dom/dom_position.h:
        * dom/xml_tokenizer.cpp:
        (WebCore::XMLTokenizer::insertErrorMessageBlock):
        * editing/ApplyStyleCommand.cpp:
        (WebCore::createFontElement):
        (WebCore::createStyleSpanElement):
        (WebCore::ApplyStyleCommand::ApplyStyleCommand):
        (WebCore::ApplyStyleCommand::updateStartEnd):
        (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
        (WebCore::ApplyStyleCommand::extractTextDecorationStyle):
        (WebCore::ApplyStyleCommand::extractAndNegateTextDecorationStyle):
        (WebCore::ApplyStyleCommand::applyTextDecorationStyle):
        (WebCore::ApplyStyleCommand::removeInlineStyle):
        (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
        (WebCore::ApplyStyleCommand::computedFontSize):
        * editing/ApplyStyleCommand.h:
        (WebCore::ApplyStyleCommand::style):
        * editing/EditCommand.cpp:
        (WebCore::EditCommandPtr::setTypingStyle):
        (WebCore::EditCommand::setTypingStyle):
        (WebCore::EditCommand::styleAtPosition):
        * editing/EditCommand.h:
        (WebCore::EditCommand::document):
        (WebCore::EditCommand::typingStyle):
        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::InsertLineBreakCommand):
        (WebCore::InsertLineBreakCommand::doApply):
        * editing/InsertTextCommand.cpp:
        (WebCore::InsertTextCommand::prepareForTextInsertion):
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::computeAndStoreNodeDesiredStyle):
        (WebCore::NodeDesiredStyle::NodeDesiredStyle):
        (WebCore::ReplaceSelectionCommand::doApply):
        * editing/ReplaceSelectionCommand.h:
        (WebCore::NodeDesiredStyle::node):
        (WebCore::NodeDesiredStyle::style):
        (WebCore::ReplacementFragment::root):
        * editing/WrapContentsInDummySpanCommand.cpp:
        (WebCore::WrapContentsInDummySpanCommand::doApply):
        * editing/htmlediting.cpp:
        (WebCore::createDefaultParagraphElement):
        (WebCore::createBreakElement):
        * editing/markup.cpp:
        (WebCore::createFragmentFromMarkup):
        (WebCore::createParagraphContentsFromString):
        * editing/visible_text.cpp:
        (khtml::TextIterator::rangeFromLocationAndLength):
        * editing/visible_text.h:
        (WebCore::isCollapsibleWhitespace):
        (WebCore::WordAwareIterator::range):
        * khtml/ecma/kjs_css.cpp:
        (KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
        (KJS::DOMCSSStyleDeclarationProtoFunc::callAsFunction):
        * khtml/ecma/kjs_dom.cpp:
        (KJS::DOMDocumentProtoFunc::callAsFunction):
        * khtml/ecma/kjs_html.cpp:
        (KJS::KJS::HTMLSelectCollection::put):
        (KJS::OptionConstructorImp::construct):
        * khtml/html/HTMLElementImpl.cpp:
        (WebCore::HTMLElementImpl::createContextualFragment):
        (WebCore::HTMLElementImpl::setInnerHTML):
        (WebCore::HTMLElementImpl::setOuterHTML):
        (WebCore::HTMLElementImpl::setOuterText):
        * khtml/html/HTMLElementImpl.h:
        * khtml/html/HTMLNameCollectionImpl.cpp:
        (WebCore::HTMLNameCollectionImpl::HTMLNameCollectionImpl):
        (WebCore::HTMLNameCollectionImpl::traverseNextItem):
        * khtml/html/HTMLNameCollectionImpl.h:
        * khtml/html/html_documentimpl.cpp:
        (WebCore::HTMLDocumentImpl::createElement):
        * khtml/html/html_documentimpl.h:
        (WebCore::HTMLDocumentImpl::collectionInfo):
        * khtml/html/htmlfactory.cpp:
        (DOM::htmlConstructor):
        (DOM::headConstructor):
        (DOM::bodyConstructor):
        (DOM::baseConstructor):
        (DOM::linkConstructor):
        (DOM::metaConstructor):
        (DOM::styleConstructor):
        (DOM::titleConstructor):
        (DOM::frameConstructor):
        (DOM::framesetConstructor):
        (DOM::iframeConstructor):
        (DOM::formConstructor):
        (DOM::buttonConstructor):
        (DOM::inputConstructor):
        (DOM::isindexConstructor):
        (DOM::fieldsetConstructor):
        (DOM::labelConstructor):
        (DOM::legendConstructor):
        (DOM::optgroupConstructor):
        (DOM::optionConstructor):
        (DOM::selectConstructor):
        (DOM::textareaConstructor):
        (DOM::dlConstructor):
        (DOM::ulConstructor):
        (DOM::olConstructor):
        (DOM::dirConstructor):
        (DOM::menuConstructor):
        (DOM::liConstructor):
        (DOM::blockquoteConstructor):
        (DOM::divConstructor):
        (DOM::headingConstructor):
        (DOM::hrConstructor):
        (DOM::paragraphConstructor):
        (DOM::preConstructor):
        (DOM::basefontConstructor):
        (DOM::fontConstructor):
        (DOM::modConstructor):
        (DOM::anchorConstructor):
        (DOM::imageConstructor):
        (DOM::mapConstructor):
        (DOM::areaConstructor):
        (DOM::canvasConstructor):
        (DOM::appletConstructor):
        (DOM::embedConstructor):
        (DOM::objectConstructor):
        (DOM::paramConstructor):
        (DOM::scriptConstructor):
        (DOM::tableConstructor):
        (DOM::tableCaptionConstructor):
        (DOM::tableColConstructor):
        (DOM::tableRowConstructor):
        (DOM::tableCellConstructor):
        (DOM::tableSectionConstructor):
        (DOM::brConstructor):
        (DOM::quoteConstructor):
        (DOM::marqueeConstructor):
        (DOM::HTMLElementFactory::createHTMLElement):
        * khtml/html/htmlfactory.h:
        * khtml/html/htmlparser.cpp:
        (HTMLParser::parseToken):
        (HTMLParser::textCreateErrorCheck):
        (HTMLParser::commentCreateErrorCheck):
        (HTMLParser::headCreateErrorCheck):
        (HTMLParser::bodyCreateErrorCheck):
        (HTMLParser::framesetCreateErrorCheck):
        (HTMLParser::iframeCreateErrorCheck):
        (HTMLParser::formCreateErrorCheck):
        (HTMLParser::isindexCreateErrorCheck):
        (HTMLParser::selectCreateErrorCheck):
        (HTMLParser::ddCreateErrorCheck):
        (HTMLParser::dtCreateErrorCheck):
        (HTMLParser::nestedCreateErrorCheck):
        (HTMLParser::nestedStyleCreateErrorCheck):
        (HTMLParser::tableCellCreateErrorCheck):
        (HTMLParser::tableSectionCreateErrorCheck):
        (HTMLParser::noembedCreateErrorCheck):
        (HTMLParser::noframesCreateErrorCheck):
        (HTMLParser::noscriptCreateErrorCheck):
        (HTMLParser::mapCreateErrorCheck):
        (HTMLParser::getNode):
        * khtml/html/htmlparser.h:
        * khtml/html/htmltokenizer.cpp:
        (WebCore::HTMLTokenizer::parseTag):
        (WebCore::HTMLTokenizer::processToken):
        * khtml/html/htmltokenizer.h:
        * ksvg2/misc/SVGDocumentExtensions.cpp:
        (WebCore::SVGDocumentExtensions::createSVGEventListener):
        * ksvg2/misc/SVGDocumentExtensions.h:
        * ksvg2/svg/SVGDOMImplementationImpl.cpp:
        (SVGDOMImplementationImpl::createDocumentType):
        (SVGDOMImplementationImpl::createDocument):
        (SVGDOMImplementationImpl::createCSSStyleSheet):
        * ksvg2/svg/SVGDOMImplementationImpl.h:
        * ksvg2/svg/SVGDocumentImpl.cpp:
        (WebCore::SVGDocumentImpl::createElement):
        (WebCore::SVGDocumentImpl::dispatchZoomEvent):
        (WebCore::SVGDocumentImpl::dispatchKeyEvent):
        (WebCore::SVGDocumentImpl::dispatchUIEvent):
        (WebCore::SVGDocumentImpl::dispatchMouseEvent):
        * ksvg2/svg/SVGDocumentImpl.h:
        * ksvg2/svg/SVGElementImpl.cpp:
        (WebCore::SVGElementImpl::addSVGEventListener):
        * ksvg2/svg/SVGSVGElementImpl.cpp:
        (WebCore::SVGSVGElementImpl::addSVGWindowEventListner):
        * page/Frame.cpp:
        (WebCore::Frame::view):
        (WebCore::Frame::begin):
        (WebCore::Frame::computeAndSetTypingStyle):
        (WebCore::Frame::selectionHasStyle):
        (WebCore::Frame::selectionStartHasStyle):
        (WebCore::Frame::selectionStartStylePropertyValue):
        (WebCore::Frame::selectionComputedStyle):
        (WebCore::Frame::forceLayout):
        (WebCore::Frame::sendResizeEvent):
        (WebCore::Frame::sendScrollEvent):
        (WebCore::Frame::clearTimers):
        (WebCore::Frame::styleForSelectionStart):
        * page/FramePrivate.h:
        * page/FrameTree.h:
        (WebCore::FrameTree::name):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@12865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bf7ae82d
This diff is collapsed.
......@@ -968,7 +968,7 @@ static ListenerMap *listenerMap;
- (DOMNode *)adoptNode:(DOMNode *)source
{
int exceptionCode = 0;
DOMNode *result = [DOMNode _nodeWithImpl:[self _documentImpl]->adoptNode([source _nodeImpl], exceptionCode)];
DOMNode *result = [DOMNode _nodeWithImpl:[self _documentImpl]->adoptNode([source _nodeImpl], exceptionCode).get()];
raiseOnDOMError(exceptionCode);
return result;
}
......@@ -993,33 +993,33 @@ static ListenerMap *listenerMap;
ASSERT(tagName);
int exceptionCode = 0;
DOMElement *result = static_cast<DOMElement *>([DOMNode _nodeWithImpl:[self _documentImpl]->createElement(tagName, exceptionCode)]);
DOMElement *result = static_cast<DOMElement *>([DOMNode _nodeWithImpl:[self _documentImpl]->createElement(tagName, exceptionCode).get()]);
raiseOnDOMError(exceptionCode);
return result;
}
- (DOMDocumentFragment *)createDocumentFragment
{
return static_cast<DOMDocumentFragment *>([DOMNode _nodeWithImpl:[self _documentImpl]->createDocumentFragment()]);
return static_cast<DOMDocumentFragment *>([DOMNode _nodeWithImpl:[self _documentImpl]->createDocumentFragment().get()]);
}
- (DOMText *)createTextNode:(NSString *)data
{
ASSERT(data);
return static_cast<DOMText *>([DOMNode _nodeWithImpl:[self _documentImpl]->createTextNode(data)]);
return static_cast<DOMText *>([DOMNode _nodeWithImpl:[self _documentImpl]->createTextNode(data).get()]);
}
- (DOMComment *)createComment:(NSString *)data
{
ASSERT(data);
return static_cast<DOMComment *>([DOMNode _nodeWithImpl:[self _documentImpl]->createComment(data)]);
return static_cast<DOMComment *>([DOMNode _nodeWithImpl:[self _documentImpl]->createComment(data).get()]);
}
- (DOMCDATASection *)createCDATASection:(NSString *)data
{
ASSERT(data);
int exception = 0;
DOMCDATASection *result = static_cast<DOMCDATASection *>([DOMNode _nodeWithImpl:[self _documentImpl]->createCDATASection(data, exception)]);
DOMCDATASection *result = static_cast<DOMCDATASection *>([DOMNode _nodeWithImpl:[self _documentImpl]->createCDATASection(data, exception).get()]);
raiseOnDOMError(exception);
return result;
}
......@@ -1029,7 +1029,7 @@ static ListenerMap *listenerMap;
ASSERT(target);
ASSERT(data);
int exception = 0;
DOMProcessingInstruction *result = static_cast<DOMProcessingInstruction *>([DOMNode _nodeWithImpl:[self _documentImpl]->createProcessingInstruction(target, data, exception)]);
DOMProcessingInstruction *result = static_cast<DOMProcessingInstruction *>([DOMNode _nodeWithImpl:[self _documentImpl]->createProcessingInstruction(target, data, exception).get()]);
raiseOnDOMError(exception);
return result;
}
......@@ -1047,7 +1047,7 @@ static ListenerMap *listenerMap;
{
ASSERT(name);
int exception = 0;
DOMEntityReference *result = static_cast<DOMEntityReference *>([DOMNode _nodeWithImpl:[self _documentImpl]->createEntityReference(name, exception)]);
DOMEntityReference *result = static_cast<DOMEntityReference *>([DOMNode _nodeWithImpl:[self _documentImpl]->createEntityReference(name, exception).get()]);
raiseOnDOMError(exception);
return result;
}
......@@ -1061,7 +1061,7 @@ static ListenerMap *listenerMap;
- (DOMNode *)importNode:(DOMNode *)importedNode :(BOOL)deep
{
int exceptionCode = 0;
DOMNode *result = [DOMNode _nodeWithImpl:[self _documentImpl]->importNode([importedNode _nodeImpl], deep, exceptionCode)];
DOMNode *result = [DOMNode _nodeWithImpl:[self _documentImpl]->importNode([importedNode _nodeImpl], deep, exceptionCode).get()];
raiseOnDOMError(exceptionCode);
return result;
}
......@@ -1072,7 +1072,7 @@ static ListenerMap *listenerMap;
ASSERT(qualifiedName);
int exceptionCode = 0;
DOMNode *result = [DOMNode _nodeWithImpl:[self _documentImpl]->createElementNS(namespaceURI, qualifiedName, exceptionCode)];
DOMNode *result = [DOMNode _nodeWithImpl:[self _documentImpl]->createElementNS(namespaceURI, qualifiedName, exceptionCode).get()];
raiseOnDOMError(exceptionCode);
return static_cast<DOMElement *>(result);
}
......@@ -1109,7 +1109,7 @@ static ListenerMap *listenerMap;
- (DOMRange *)createRange
{
return [DOMRange _rangeWithImpl:[self _documentImpl]->createRange()];
return [DOMRange _rangeWithImpl:[self _documentImpl]->createRange().get()];
}
@end
......@@ -1138,7 +1138,7 @@ static ListenerMap *listenerMap;
- (DOMCSSStyleDeclaration *)createCSSStyleDeclaration
{
return [DOMCSSStyleDeclaration _styleDeclarationWithImpl:[self _documentImpl]->createCSSStyleDeclaration()];
return [DOMCSSStyleDeclaration _styleDeclarationWithImpl:[self _documentImpl]->createCSSStyleDeclaration().get()];
}
@end
......@@ -2276,34 +2276,24 @@ short ObjCNodeFilterCondition::acceptNode(NodeImpl* node) const
- (DOMNodeIterator *)createNodeIterator:(DOMNode *)root :(unsigned)whatToShow :(id <DOMNodeFilter>)filter :(BOOL)expandEntityReferences
{
NodeFilterImpl *cppFilter = 0;
if (filter) {
RefPtr<NodeFilterImpl> cppFilter;
if (filter)
cppFilter = new NodeFilterImpl(new ObjCNodeFilterCondition(filter));
cppFilter->ref();
}
int exceptionCode = 0;
NodeIteratorImpl *impl = [self _documentImpl]->createNodeIterator([root _nodeImpl], whatToShow, cppFilter, expandEntityReferences, exceptionCode);
if (cppFilter) {
cppFilter->deref();
}
RefPtr<NodeIteratorImpl> impl = [self _documentImpl]->createNodeIterator([root _nodeImpl], whatToShow, cppFilter, expandEntityReferences, exceptionCode);
raiseOnDOMError(exceptionCode);
return [DOMNodeIterator _nodeIteratorWithImpl:impl filter:filter];
return [DOMNodeIterator _nodeIteratorWithImpl:impl.get() filter:filter];
}
- (DOMTreeWalker *)createTreeWalker:(DOMNode *)root :(unsigned)whatToShow :(id <DOMNodeFilter>)filter :(BOOL)expandEntityReferences
{
NodeFilterImpl *cppFilter = 0;
if (filter) {
RefPtr<NodeFilterImpl> cppFilter;
if (filter)
cppFilter = new NodeFilterImpl(new ObjCNodeFilterCondition(filter));
cppFilter->ref();
}
int exceptionCode = 0;
TreeWalkerImpl *impl = [self _documentImpl]->createTreeWalker([root _nodeImpl], whatToShow, cppFilter, expandEntityReferences, exceptionCode);
if (cppFilter) {
cppFilter->deref();
}
RefPtr<TreeWalkerImpl> impl = [self _documentImpl]->createTreeWalker([root _nodeImpl], whatToShow, cppFilter, expandEntityReferences, exceptionCode);
raiseOnDOMError(exceptionCode);
return [DOMTreeWalker _treeWalkerWithImpl:impl filter:filter];
return [DOMTreeWalker _treeWalkerWithImpl:impl.get() filter:filter];
}
@end
......
......@@ -741,7 +741,7 @@ using namespace DOM;
- (DOMCSSValue *)getPropertyCSSValue:(NSString *)propertyName
{
return [DOMCSSValue _valueWithImpl:[self _styleDeclarationImpl]->getPropertyCSSValue(propertyName)];
return [DOMCSSValue _valueWithImpl:[self _styleDeclarationImpl]->getPropertyCSSValue(propertyName).get()];
}
- (NSString *)removeProperty:(NSString *)propertyName
......
......@@ -276,9 +276,9 @@ ALLOW_DOM_CAST(EventImpl)
- (DOMEvent *)createEvent:(NSString *)eventType
{
int exceptionCode = 0;
EventImpl *event = [self _documentImpl]->createEvent(eventType, exceptionCode);
RefPtr<EventImpl> event = [self _documentImpl]->createEvent(eventType, exceptionCode);
raiseOnDOMError(exceptionCode);
return [DOMEvent _eventWithImpl:event];
return [DOMEvent _eventWithImpl:event.get()];
}
@end
......@@ -380,7 +380,7 @@ private:
bool _dragSrcInSelection;
bool _dragSrcMayBeDHTML, _dragSrcMayBeUA; // Are DHTML and/or the UserAgent allowed to drag out?
bool _dragSrcIsDHTML;
KWQClipboard *_dragClipboard; // used on only the source side of dragging
RefPtr<KWQClipboard> _dragClipboard; // used on only the source side of dragging
RefPtr<RangeImpl> m_markedTextRange;
};
......
......@@ -147,7 +147,6 @@ MacFrame::MacFrame(Page* page, RenderPart* ownerRenderer)
, _bindingRoot(0)
, _windowScriptObject(0)
, _windowScriptNPObject(0)
, _dragClipboard(0)
{
mutableInstances().prepend(this);
......@@ -170,11 +169,8 @@ MacFrame::~MacFrame()
void MacFrame::freeClipboard()
{
if (_dragClipboard) {
if (_dragClipboard)
_dragClipboard->setAccessPolicy(KWQClipboard::Numb);
_dragClipboard->deref();
_dragClipboard = 0;
}
}
DOMString MacFrame::generateFrameName()
......@@ -647,10 +643,6 @@ void MacFrame::setView(FrameView *view)
if (d->m_doc && view == 0)
d->m_doc->detach();
if (view)
view->ref();
if (d->m_view)
d->m_view->deref();
d->m_view = view;
// Delete old PlugIn data structures
......@@ -819,7 +811,7 @@ QString MacFrame::advanceToNextMisspelling(bool startBeforeSelection)
bool MacFrame::wheelEvent(NSEvent *event)
{
FrameView *v = d->m_view;
FrameView *v = d->m_view.get();
if (v) {
NSEvent *oldCurrentEvent = _currentEvent;
......@@ -1239,16 +1231,8 @@ void MacFrame::openURLFromPageCache(KWQPageState *state)
setView(doc->view());
d->m_doc = doc;
d->m_doc->ref();
d->m_mousePressNode = mousePressNode;
Decoder *decoder = doc->decoder();
if (decoder)
decoder->ref();
if (d->m_decoder)
d->m_decoder->deref();
d->m_decoder = decoder;
d->m_decoder = doc->decoder();
updatePolicyBaseURL();
......@@ -1617,7 +1601,7 @@ NSView *MacFrame::mouseDownViewIfStillGood()
if (!mouseDownView) {
return nil;
}
FrameView *topFrameView = d->m_view;
FrameView *topFrameView = d->m_view.get();
NSView *topView = topFrameView ? topFrameView->getView() : nil;
if (!topView || !findViewInSubviews(topView, mouseDownView)) {
_mouseDownView = nil;
......@@ -1757,7 +1741,6 @@ void MacFrame::khtmlMouseMoveEvent(MouseMoveEvent *event)
freeClipboard(); // would only happen if we missed a dragEnd. Do it anyway, just
// to make sure it gets numbified
_dragClipboard = new KWQClipboard(true, pasteboard, KWQClipboard::Writable, this);
_dragClipboard->ref();
// If this is drag of an element, get set up to generate a default image. Otherwise
// WebKit will generate the default, the element doesn't override.
......@@ -1836,27 +1819,21 @@ void MacFrame::khtmlMouseMoveEvent(MouseMoveEvent *event)
// the event handler NOT setting the return value to false
bool MacFrame::dispatchCPPEvent(const AtomicString &eventType, KWQClipboard::AccessPolicy policy)
{
NodeImpl *target = d->m_selection.start().element();
if (!target && document()) {
NodeImpl* target = d->m_selection.start().element();
if (!target && document())
target = document()->body();
}
if (!target) {
if (!target)
return true;
}
KWQClipboard *clipboard = new KWQClipboard(false, [NSPasteboard generalPasteboard], (KWQClipboard::AccessPolicy)policy);
clipboard->ref();
RefPtr<KWQClipboard> clipboard = new KWQClipboard(false, [NSPasteboard generalPasteboard], (KWQClipboard::AccessPolicy)policy);
int exceptioncode = 0;
EventImpl *evt = new ClipboardEventImpl(eventType, true, true, clipboard);
evt->ref();
RefPtr<EventImpl> evt = new ClipboardEventImpl(eventType, true, true, clipboard.get());
target->dispatchEvent(evt, exceptioncode, true);
bool noDefaultProcessing = evt->defaultPrevented();
evt->deref();
// invalidate clipboard here for security
clipboard->setAccessPolicy(KWQClipboard::Numb);
clipboard->deref();
return !noDefaultProcessing;
}
......@@ -2034,7 +2011,7 @@ bool MacFrame::passWheelEventToChildWidget(NodeImpl *node)
void MacFrame::mouseDown(NSEvent *event)
{
FrameView *v = d->m_view;
FrameView *v = d->m_view.get();
if (!v || _sendingEventToSubview) {
return;
}
......@@ -2069,7 +2046,7 @@ void MacFrame::mouseDown(NSEvent *event)
void MacFrame::mouseDragged(NSEvent *event)
{
FrameView *v = d->m_view;
FrameView *v = d->m_view.get();
if (!v || _sendingEventToSubview) {
return;
}
......@@ -2091,7 +2068,7 @@ void MacFrame::mouseDragged(NSEvent *event)
void MacFrame::mouseUp(NSEvent *event)
{
FrameView *v = d->m_view;
FrameView *v = d->m_view.get();
if (!v || _sendingEventToSubview) {
return;
}
......@@ -2189,7 +2166,7 @@ void MacFrame::sendFakeEventsAfterWidgetTracking(NSEvent *initiatingEvent)
void MacFrame::mouseMoved(NSEvent *event)
{
FrameView *v = d->m_view;
FrameView *v = d->m_view.get();
// Reject a mouse moved if the button is down - screws up tracking during autoscroll
// These happen because WebKit sometimes has to fake up moved events.
if (!v || d->m_bMousePressed || _sendingEventToSubview) {
......@@ -2231,7 +2208,7 @@ bool MacFrame::shouldDragAutoNode(NodeImpl* node, int x, int y) const
bool MacFrame::sendContextMenuEvent(NSEvent *event)
{
DocumentImpl* doc = d->m_doc.get();
FrameView* v = d->m_view;
FrameView* v = d->m_view.get();
if (!doc || !v) {
return false;
}
......@@ -3584,7 +3561,7 @@ void MacFrame::dragSourceEndedAt(const IntPoint &loc, NSDragOperation operation)
// returns if we should continue "default processing", i.e., whether eventhandler canceled
bool MacFrame::dispatchDragSrcEvent(const AtomicString &eventType, const IntPoint &loc) const
{
bool noDefaultProc = d->m_view->dispatchDragEvent(eventType, _dragSrc.get(), loc, _dragClipboard);
bool noDefaultProc = d->m_view->dispatchDragEvent(eventType, _dragSrc.get(), loc, _dragClipboard.get());
return !noDefaultProc;
}
......
......@@ -1965,7 +1965,7 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
return NSMakeRange(startPosition, endPosition - startPosition);
}
- (RangeImpl *)convertToDOMRange:(NSRange)nsrange
- (PassRefPtr<RangeImpl>)convertToDOMRange:(NSRange)nsrange
{
if (nsrange.location > INT_MAX)
return 0;
......@@ -1977,7 +1977,7 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
- (DOMRange *)convertNSRangeToDOMRange:(NSRange)nsrange
{
return [DOMRange _rangeWithImpl:[self convertToDOMRange:nsrange]];
return [DOMRange _rangeWithImpl:[self convertToDOMRange:nsrange].get()];
}
- (NSRange)convertDOMRangeToNSRange:(DOMRange *)range
......@@ -1987,7 +1987,7 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
- (void)selectNSRange:(NSRange)range
{
m_frame->setSelection(SelectionController([self convertToDOMRange:range], SEL_DEFAULT_AFFINITY));
m_frame->setSelection(SelectionController([self convertToDOMRange:range].get(), SEL_DEFAULT_AFFINITY));
}
- (NSRange)selectedNSRange
......@@ -2086,11 +2086,11 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
if (newEnd.isNull())
newEnd = end;
RangeImpl *range = m_frame->document()->createRange();
RefPtr<RangeImpl> range = m_frame->document()->createRange();
int exception = 0;
range->setStart(newStart.node(), newStart.offset(), exception);
range->setEnd(newStart.node(), newStart.offset(), exception);
return [DOMRange _rangeWithImpl:range];
return [DOMRange _rangeWithImpl:range.get()];
}
// Determines whether whitespace needs to be added around aString to preserve proper spacing and
......@@ -2357,7 +2357,7 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
{
if (!m_frame || !m_frame->typingStyle())
return nil;
return [DOMCSSStyleDeclaration _styleDeclarationWithImpl:m_frame->typingStyle()->copy()];
return [DOMCSSStyleDeclaration _styleDeclarationWithImpl:m_frame->typingStyle()->copy().get()];
}
- (void)setTypingStyle:(DOMCSSStyleDeclaration *)style withUndoAction:(WebUndoAction)undoAction
......@@ -2490,18 +2490,14 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
{
NSDragOperation op = NSDragOperationNone;
if (m_frame) {
FrameView *v = m_frame->view();
RefPtr<FrameView> v = m_frame->view();
if (v) {
// Sending an event can result in the destruction of the view and part.
v->ref();
KWQClipboard::AccessPolicy policy = m_frame->baseURL().isLocalFile() ? KWQClipboard::Readable : KWQClipboard::TypesReadable;
KWQClipboard *clipboard = new KWQClipboard(true, [info draggingPasteboard], policy);
clipboard->ref();
RefPtr<KWQClipboard> clipboard = new KWQClipboard(true, [info draggingPasteboard], policy);
NSDragOperation srcOp = [info draggingSourceOperationMask];
clipboard->setSourceOperation(srcOp);
if (v->updateDragAndDrop(IntPoint([info draggingLocation]), clipboard)) {
if (v->updateDragAndDrop(IntPoint([info draggingLocation]), clipboard.get())) {
// *op unchanged if no source op was set
if (!clipboard->destinationOperation(&op)) {
// The element accepted but they didn't pick an operation, so we pick one for them
......@@ -2522,9 +2518,6 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
}
}
clipboard->setAccessPolicy(KWQClipboard::Numb); // invalidate clipboard here for security
clipboard->deref();
v->deref();
return op;
}
}
......@@ -2534,21 +2527,14 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
- (void)dragExitedWithDraggingInfo:(id <NSDraggingInfo>)info
{
if (m_frame) {
FrameView *v = m_frame->view();
RefPtr<FrameView> v = m_frame->view();
if (v) {
// Sending an event can result in the destruction of the view and part.
v->ref();
KWQClipboard::AccessPolicy policy = m_frame->baseURL().isLocalFile() ? KWQClipboard::Readable : KWQClipboard::TypesReadable;
KWQClipboard *clipboard = new KWQClipboard(true, [info draggingPasteboard], policy);
clipboard->ref();
clipboard->setSourceOperation([info draggingSourceOperationMask]);
v->cancelDragAndDrop(IntPoint([info draggingLocation]), clipboard);
RefPtr<KWQClipboard> clipboard = new KWQClipboard(true, [info draggingPasteboard], policy);
clipboard->setSourceOperation([info draggingSourceOperationMask]);
v->cancelDragAndDrop(IntPoint([info draggingLocation]), clipboard.get());
clipboard->setAccessPolicy(KWQClipboard::Numb); // invalidate clipboard here for security
clipboard->deref();
v->deref();
}
}
}
......@@ -2556,21 +2542,13 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
- (BOOL)concludeDragForDraggingInfo:(id <NSDraggingInfo>)info
{
if (m_frame) {
FrameView *v = m_frame->view();
RefPtr<FrameView> v = m_frame->view();
if (v) {
// Sending an event can result in the destruction of the view and part.
v->ref();
KWQClipboard *clipboard = new KWQClipboard(true, [info draggingPasteboard], KWQClipboard::Readable);
clipboard->ref();
RefPtr<KWQClipboard> clipboard = new KWQClipboard(true, [info draggingPasteboard], KWQClipboard::Readable);
clipboard->setSourceOperation([info draggingSourceOperationMask]);
BOOL result = v->performDragAndDrop(IntPoint([info draggingLocation]), clipboard);
BOOL result = v->performDragAndDrop(IntPoint([info draggingLocation]), clipboard.get());
clipboard->setAccessPolicy(KWQClipboard::Numb); // invalidate clipboard here for security
clipboard->deref();
v->deref();
return result;
}
}
......
......@@ -23,25 +23,22 @@
#include "config.h"
#include "css_computedstyle.h"
#include "cssproperties.h"
#include "cssvalues.h"
#include "AtomicString.h"
#include "CachedImage.h"
#include "DocumentImpl.h"
#include "dom_exception.h"
#include "PlatformString.h"
#include "cssproperties.h"
#include "cssvalues.h"
#include "dom_exception.h"
#include "font.h"
#include "khtmllayout.h"
#include "CachedImage.h"
#include "rendering/render_style.h"
#include "rendering/render_object.h"
#include "render_object.h"
#include "render_style.h"
#include <kxmlcore/Assertions.h>
using namespace khtml;
extern WebCore::String getPropertyName(unsigned short id);
extern DOM::DOMString getPropertyName(unsigned short id);
namespace DOM {
namespace WebCore {
// List of all properties we know how to compute, omitting shorthands.
static const int computedProperties[] = {
......@@ -270,7 +267,7 @@ static CSSValueImpl *getPositionOffsetValue(RenderObject *renderer, int property
return new CSSPrimitiveValueImpl(CSS_VAL_AUTO);
}
CSSComputedStyleDeclarationImpl::CSSComputedStyleDeclarationImpl(NodeImpl *n)
CSSComputedStyleDeclarationImpl::CSSComputedStyleDeclarationImpl(PassRefPtr<NodeImpl> n)
: m_node(n)
{
}
......@@ -279,9 +276,9 @@ CSSComputedStyleDeclarationImpl::~CSSComputedStyleDeclarationImpl()
{
}
DOMString CSSComputedStyleDeclarationImpl::cssText() const
String CSSComputedStyleDeclarationImpl::cssText() const
{
DOMString result;
String result("");
for (unsigned i = 0; i < numComputedProperties; i++) {
if (i != 0)
......@@ -295,7 +292,7 @@ DOMString CSSComputedStyleDeclarationImpl::cssText() const
return result;
}
void CSSComputedStyleDeclarationImpl::setCssText(const DOMString &, int &exceptionCode)
void CSSComputedStyleDeclarationImpl::setCssText(const String&, int &exceptionCode)
{
exceptionCode = DOMException::NO_MODIFICATION_ALLOWED_ERR;
}
......@@ -307,14 +304,14 @@ static QString numberAsString(double n)
return i == n ? QString::number(i) : QString::number(n);
}
CSSValueImpl *CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyID) const
PassRefPtr<CSSValueImpl> CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyID) const
{
return getPropertyCSSValue(propertyID, UpdateLayout);
}
CSSValueImpl *CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyID, EUpdateLayout updateLayout) const
PassRefPtr<CSSValueImpl> CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyID, EUpdateLayout updateLayout) const
{
NodeImpl *node = m_node.get();
NodeImpl* node = m_node.get();
if (!node)
return 0;
......@@ -323,10 +320,10 @@ CSSValueImpl *CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyI
if (docimpl && updateLayout)
docimpl->updateLayout();
RenderObject *renderer = node->renderer();
RenderObject* renderer = node->renderer();
if (!renderer)
return 0;
RenderStyle *style = renderer->style();
RenderStyle* style = renderer->style();
if (!style)
return 0;
......@@ -366,7 +363,7 @@ CSSValueImpl *CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyI
}
case CSS_PROP_BACKGROUND_POSITION:
{
DOMString string;
String string;
Length length(style->backgroundXPosition());
if (length.isPercent())
string = numberAsString(length.length()) + "%";
......@@ -1183,29 +1180,32 @@ CSSValueImpl *CSSComputedStyleDeclarationImpl::getPropertyCSSValue(int propertyI
#if __APPLE__
case CSS_PROP__KHTML_DASHBOARD_REGION: {
QValueList<StyleDashboardRegion> regions = style->dashboardRegions();
uint i, count = regions.count();
unsigned count = regions.count();
if (count == 1 && regions[0].type == StyleDashboardRegion::None)
return new CSSPrimitiveValueImpl (CSS_VAL_NONE);
DashboardRegionImpl *firstRegion = new DashboardRegionImpl(), *region;
region = firstRegion;
for (i = 0; i < count; i++) {
return new CSSPrimitiveValueImpl(CSS_VAL_NONE);
RefPtr<DashboardRegionImpl> firstRegion;