Diff
Modified: trunk/Source/WebCore/ChangeLog (89223 => 89224)
--- trunk/Source/WebCore/ChangeLog 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/ChangeLog 2011-06-20 02:26:37 UTC (rev 89224)
@@ -1,54 +1,3 @@
-2011-06-19 Darin Adler <[email protected]>
-
- Reviewed by Sam Weinig.
-
- RefPtr misused as argument type in a few classes
- https://bugs.webkit.org/show_bug.cgi?id=62955
-
- * dom/DataTransferItem.cpp:
- (WebCore::DataTransferItem::DataTransferItem):
- * dom/DataTransferItem.h:
- * dom/DataTransferItems.cpp:
- (WebCore::DataTransferItems::DataTransferItems):
- * dom/DataTransferItems.h:
- * editing/CompositeEditCommand.cpp:
- (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
- * editing/CompositeEditCommand.h:
- * inspector/InspectorConsoleInstrumentation.h:
- * inspector/InspectorInstrumentation.cpp:
- (WebCore::InspectorInstrumentation::addProfileImpl):
- * inspector/InspectorInstrumentation.h:
- * inspector/InspectorProfilerAgent.h:
- * inspector/InspectorStyleSheet.cpp:
- (WebCore::InspectorStyleSheet::inspectorStyleForId):
- (WebCore::InspectorStyleSheet::rememberInspectorStyle):
- * inspector/InspectorStyleSheet.h:
- * page/WebKitAnimationList.cpp:
- (WebCore::WebKitAnimationList::append):
- (WebCore::WebKitAnimationList::insertAnimation):
- * page/WebKitAnimationList.h:
- * svg/graphics/filters/SVGFEImage.cpp:
- (WebCore::FEImage::FEImage):
- (WebCore::FEImage::create):
- * svg/graphics/filters/SVGFEImage.h:
- * svg/graphics/filters/SVGFilterBuilder.cpp:
- (WebCore::SVGFilterBuilder::SVGFilterBuilder):
- (WebCore::SVGFilterBuilder::add):
- (WebCore::SVGFilterBuilder::appendEffectToEffectReferences):
- * svg/graphics/filters/SVGFilterBuilder.h:
- * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
- (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
- (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
- (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback):
- (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
- * websockets/ThreadableWebSocketChannelClientWrapper.h:
- * websockets/WorkerThreadableWebSocketChannel.cpp:
- (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
- (WebCore::WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel):
- (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel):
- * websockets/WorkerThreadableWebSocketChannel.h:
- Use PassRefPtr or raw pointer as appropriate for RefPtr arguments.
-
2011-06-19 Una Sabovic <[email protected]>
Reviewed by Darin Adler.
Modified: trunk/Source/WebCore/dom/DataTransferItem.cpp (89223 => 89224)
--- trunk/Source/WebCore/dom/DataTransferItem.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/dom/DataTransferItem.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -40,7 +40,7 @@
const char DataTransferItem::kindString[] = "string";
const char DataTransferItem::kindFile[] = "file";
-DataTransferItem::DataTransferItem(PassRefPtr<Clipboard> owner, const String& kind, const String& type)
+DataTransferItem::DataTransferItem(RefPtr<Clipboard> owner, const String& kind, const String& type)
: m_owner(owner)
, m_kind(kind)
, m_type(type)
Modified: trunk/Source/WebCore/dom/DataTransferItem.h (89223 => 89224)
--- trunk/Source/WebCore/dom/DataTransferItem.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/dom/DataTransferItem.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -60,7 +60,7 @@
virtual PassRefPtr<Blob> getAsFile() = 0;
protected:
- DataTransferItem(PassRefPtr<Clipboard> owner, const String& kind, const String& type);
+ DataTransferItem(RefPtr<Clipboard> owner, const String& kind, const String& type);
Clipboard* owner();
private:
Modified: trunk/Source/WebCore/dom/DataTransferItems.cpp (89223 => 89224)
--- trunk/Source/WebCore/dom/DataTransferItems.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/dom/DataTransferItems.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -39,7 +39,7 @@
namespace WebCore {
-DataTransferItems::DataTransferItems(PassRefPtr<Clipboard> clipboard, ScriptExecutionContext* context)
+DataTransferItems::DataTransferItems(RefPtr<Clipboard> clipboard, ScriptExecutionContext* context)
: m_owner(clipboard)
, m_context(context)
{
Modified: trunk/Source/WebCore/dom/DataTransferItems.h (89223 => 89224)
--- trunk/Source/WebCore/dom/DataTransferItems.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/dom/DataTransferItems.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -54,7 +54,7 @@
virtual void add(const String& data, const String& type, ExceptionCode&);
protected:
- DataTransferItems(PassRefPtr<Clipboard>, ScriptExecutionContext*);
+ DataTransferItems(RefPtr<Clipboard>, ScriptExecutionContext*);
protected:
RefPtr<Clipboard> m_owner;
Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (89223 => 89224)
--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -459,10 +459,8 @@
rebalanceWhitespaceOnTextSubstring(static_cast<Text*>(node), position.offsetInContainerNode(), position.offsetInContainerNode());
}
-void CompositeEditCommand::rebalanceWhitespaceOnTextSubstring(PassRefPtr<Text> prpTextNode, int startOffset, int endOffset)
+void CompositeEditCommand::rebalanceWhitespaceOnTextSubstring(RefPtr<Text> textNode, int startOffset, int endOffset)
{
- RefPtr<Text> textNode = prpTextNode;
-
String text = textNode->data();
ASSERT(!text.isEmpty());
@@ -490,7 +488,7 @@
isEndOfParagraph(visibleDownstreamPos) || (unsigned)downstream == text.length());
if (string != rebalancedString)
- replaceTextInNodePreservingMarkers(textNode.release(), upstream, length, rebalancedString);
+ replaceTextInNodePreservingMarkers(textNode, upstream, length, rebalancedString);
}
void CompositeEditCommand::prepareWhitespaceAtPositionForSplit(Position& position)
Modified: trunk/Source/WebCore/editing/CompositeEditCommand.h (89223 => 89224)
--- trunk/Source/WebCore/editing/CompositeEditCommand.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -69,7 +69,7 @@
void mergeIdenticalElements(PassRefPtr<Element>, PassRefPtr<Element>);
void rebalanceWhitespace();
void rebalanceWhitespaceAt(const Position&);
- void rebalanceWhitespaceOnTextSubstring(PassRefPtr<Text>, int startOffset, int endOffset);
+ void rebalanceWhitespaceOnTextSubstring(RefPtr<Text>, int startOffset, int endOffset);
void prepareWhitespaceAtPositionForSplit(Position&);
bool canRebalance(const Position&) const;
bool shouldRebalanceLeadingWhitespaceFor(const String&) const;
Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp (89223 => 89224)
--- trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -304,7 +304,7 @@
*errorString = "Internal error setting style sheet text";
}
-void InspectorCSSAgent::setPropertyText(ErrorString* errorString, InspectorObject* fullStyleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>* result)
+void InspectorCSSAgent::setPropertyText(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>* result)
{
InspectorCSSId compoundId(fullStyleId);
ASSERT(!compoundId.isEmpty());
@@ -318,7 +318,7 @@
*result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId));
}
-void InspectorCSSAgent::toggleProperty(ErrorString* errorString, InspectorObject* fullStyleId, int propertyIndex, bool disable, RefPtr<InspectorObject>* result)
+void InspectorCSSAgent::toggleProperty(ErrorString* errorString, const RefPtr<InspectorObject>& fullStyleId, int propertyIndex, bool disable, RefPtr<InspectorObject>* result)
{
InspectorCSSId compoundId(fullStyleId);
ASSERT(!compoundId.isEmpty());
@@ -332,7 +332,7 @@
*result = inspectorStyleSheet->buildObjectForStyle(inspectorStyleSheet->styleForId(compoundId));
}
-void InspectorCSSAgent::setRuleSelector(ErrorString* errorString, InspectorObject* fullRuleId, const String& selector, RefPtr<InspectorObject>* result)
+void InspectorCSSAgent::setRuleSelector(ErrorString* errorString, const RefPtr<InspectorObject>& fullRuleId, const String& selector, RefPtr<InspectorObject>* result)
{
InspectorCSSId compoundId(fullRuleId);
ASSERT(!compoundId.isEmpty());
Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.h (89223 => 89224)
--- trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -68,9 +68,9 @@
void getStyleSheet(ErrorString*, const String& styleSheetId, RefPtr<InspectorObject>* result);
void getStyleSheetText(ErrorString*, const String& styleSheetId, String* result);
void setStyleSheetText(ErrorString*, const String& styleSheetId, const String& text);
- void setPropertyText(ErrorString*, InspectorObject* styleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>* result);
- void toggleProperty(ErrorString*, InspectorObject* styleId, int propertyIndex, bool disable, RefPtr<InspectorObject>* result);
- void setRuleSelector(ErrorString*, InspectorObject* ruleId, const String& selector, RefPtr<InspectorObject>* result);
+ void setPropertyText(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, const String& text, bool overwrite, RefPtr<InspectorObject>* result);
+ void toggleProperty(ErrorString*, const RefPtr<InspectorObject>& styleId, int propertyIndex, bool disable, RefPtr<InspectorObject>* result);
+ void setRuleSelector(ErrorString*, const RefPtr<InspectorObject>& ruleId, const String& selector, RefPtr<InspectorObject>* result);
void addRule(ErrorString*, const int contextNodeId, const String& selector, RefPtr<InspectorObject>* result);
void getSupportedCSSProperties(ErrorString*, RefPtr<InspectorArray>* result);
Modified: trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h (89223 => 89224)
--- trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/inspector/InspectorConsoleInstrumentation.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -96,7 +96,7 @@
#endif
}
-inline void InspectorInstrumentation::addProfile(Page* page, PassRefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
+inline void InspectorInstrumentation::addProfile(Page* page, RefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
{
#if ENABLE(INSPECTOR)
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (89223 => 89224)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -698,7 +698,7 @@
profilerAgent->addStartProfilingMessageToConsole(title, lineNumber, sourceURL);
}
-void InspectorInstrumentation::addProfileImpl(InstrumentingAgents* instrumentingAgents, PassRefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
+void InspectorInstrumentation::addProfileImpl(InstrumentingAgents* instrumentingAgents, RefPtr<ScriptProfile> profile, PassRefPtr<ScriptCallStack> callStack)
{
if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent()) {
const ScriptCallFrame& lastCaller = callStack->at(0);
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (89223 => 89224)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -150,7 +150,7 @@
#if ENABLE(_javascript__DEBUGGER)
static void addStartProfilingMessageToConsole(Page*, const String& title, unsigned lineNumber, const String& sourceURL);
- static void addProfile(Page*, PassRefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
+ static void addProfile(Page*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
static String getCurrentUserInitiatedProfileName(Page*, bool incrementProfileNumber);
static bool profilerEnabled(Page*);
#endif
@@ -278,7 +278,7 @@
#if ENABLE(_javascript__DEBUGGER)
static void addStartProfilingMessageToConsoleImpl(InstrumentingAgents*, const String& title, unsigned lineNumber, const String& sourceURL);
- static void addProfileImpl(InstrumentingAgents*, PassRefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
+ static void addProfileImpl(InstrumentingAgents*, RefPtr<ScriptProfile>, PassRefPtr<ScriptCallStack>);
static String getCurrentUserInitiatedProfileNameImpl(InstrumentingAgents*, bool incrementProfileNumber);
static bool profilerEnabledImpl(InstrumentingAgents*);
#endif
Modified: trunk/Source/WebCore/inspector/InspectorProfilerAgent.h (89223 => 89224)
--- trunk/Source/WebCore/inspector/InspectorProfilerAgent.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/inspector/InspectorProfilerAgent.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -59,7 +59,7 @@
static PassOwnPtr<InspectorProfilerAgent> create(InstrumentingAgents*, InspectorConsoleAgent*, Page*, InspectorState*);
virtual ~InspectorProfilerAgent();
- void addProfile(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
+ void addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL);
void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
void collectGarbage(ErrorString*);
Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (89223 => 89224)
--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -875,17 +875,17 @@
if (!style)
return 0;
- if (RefPtr<InspectorStyle> inspectorStyle = m_inspectorStyles.get(style))
+ InspectorStyleMap::iterator it = m_inspectorStyles.find(style);
+ if (it == m_inspectorStyles.end()) {
+ RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(id, style, this);
return inspectorStyle.release();
-
- return InspectorStyle::create(id, style, this);
+ }
+ return it->second;
}
-void InspectorStyleSheet::rememberInspectorStyle(PassRefPtr<InspectorStyle> prpInspectorStyle)
+void InspectorStyleSheet::rememberInspectorStyle(RefPtr<InspectorStyle> inspectorStyle)
{
- RefPtr<InspectorStyle> inspectorStyle = prpInspectorStyle;
- CSSStyleDeclaration* cssStyle = inspectorStyle->cssStyle();
- m_inspectorStyles.set(cssStyle, inspectorStyle.release());
+ m_inspectorStyles.set(inspectorStyle->cssStyle(), inspectorStyle);
}
void InspectorStyleSheet::forgetInspectorStyle(CSSStyleDeclaration* style)
Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.h (89223 => 89224)
--- trunk/Source/WebCore/inspector/InspectorStyleSheet.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -55,7 +55,7 @@
public:
InspectorCSSId() { }
- explicit InspectorCSSId(InspectorObject* value)
+ explicit InspectorCSSId(RefPtr<InspectorObject> value)
{
if (!value->getString("styleSheetId", &m_styleSheetId))
return;
@@ -189,7 +189,7 @@
virtual unsigned ruleIndexByStyle(CSSStyleDeclaration*) const;
virtual bool ensureParsedDataReady();
virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&);
- virtual void rememberInspectorStyle(PassRefPtr<InspectorStyle>);
+ virtual void rememberInspectorStyle(RefPtr<InspectorStyle> inspectorStyle);
virtual void forgetInspectorStyle(CSSStyleDeclaration* style);
// Also accessed by friend class InspectorStyle.
@@ -238,7 +238,7 @@
virtual unsigned ruleIndexByStyle(CSSStyleDeclaration*) const { return 0; }
virtual bool ensureParsedDataReady();
virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&);
- virtual void rememberInspectorStyle(PassRefPtr<InspectorStyle>) { }
+ virtual void rememberInspectorStyle(RefPtr<InspectorStyle>) { }
virtual void forgetInspectorStyle(CSSStyleDeclaration*) { }
// Also accessed by friend class InspectorStyle.
Modified: trunk/Source/WebCore/page/WebKitAnimationList.cpp (89223 => 89224)
--- trunk/Source/WebCore/page/WebKitAnimationList.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/page/WebKitAnimationList.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -26,6 +26,9 @@
#include "config.h"
#include "WebKitAnimationList.h"
+#include "Animation.h"
+#include "AnimationBase.h"
+#include "RenderStyle.h"
#include "WebKitAnimation.h"
namespace WebCore {
@@ -58,12 +61,12 @@
m_animations.remove(index);
}
-void WebKitAnimationList::append(PassRefPtr<WebKitAnimation> animation)
+void WebKitAnimationList::append(RefPtr<WebKitAnimation> animation)
{
m_animations.append(animation);
}
-unsigned WebKitAnimationList::insertAnimation(PassRefPtr<WebKitAnimation> animation, unsigned index)
+unsigned WebKitAnimationList::insertAnimation(RefPtr<WebKitAnimation> animation, unsigned index)
{
if (!animation)
return 0;
@@ -76,3 +79,4 @@
}
} // namespace WebCore
+
Modified: trunk/Source/WebCore/page/WebKitAnimationList.h (89223 => 89224)
--- trunk/Source/WebCore/page/WebKitAnimationList.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/page/WebKitAnimationList.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -39,16 +39,16 @@
public:
static PassRefPtr<WebKitAnimationList> create()
{
- return adoptRef(new WebKitAnimationList);
+ return adoptRef(new WebKitAnimationList());
}
~WebKitAnimationList();
unsigned length() const;
WebKitAnimation* item(unsigned index);
- unsigned insertAnimation(PassRefPtr<WebKitAnimation>, unsigned index);
+ unsigned insertAnimation(RefPtr<WebKitAnimation>, unsigned index);
void deleteAnimation(unsigned index);
- void append(PassRefPtr<WebKitAnimation>);
+ void append(RefPtr<WebKitAnimation>);
private:
WebKitAnimationList();
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp (89223 => 89224)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -34,14 +34,14 @@
namespace WebCore {
-FEImage::FEImage(Filter* filter, PassRefPtr<Image> image, const SVGPreserveAspectRatio& preserveAspectRatio)
+FEImage::FEImage(Filter* filter, RefPtr<Image> image, const SVGPreserveAspectRatio& preserveAspectRatio)
: FilterEffect(filter)
, m_image(image)
, m_preserveAspectRatio(preserveAspectRatio)
{
}
-PassRefPtr<FEImage> FEImage::create(Filter* filter, PassRefPtr<Image> image, const SVGPreserveAspectRatio& preserveAspectRatio)
+PassRefPtr<FEImage> FEImage::create(Filter* filter, RefPtr<Image> image, const SVGPreserveAspectRatio& preserveAspectRatio)
{
return adoptRef(new FEImage(filter, image, preserveAspectRatio));
}
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h (89223 => 89224)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -33,7 +33,7 @@
class FEImage : public FilterEffect {
public:
- static PassRefPtr<FEImage> create(Filter*, PassRefPtr<Image>, const SVGPreserveAspectRatio&);
+ static PassRefPtr<FEImage> create(Filter*, RefPtr<Image>, const SVGPreserveAspectRatio&);
void setAbsoluteSubregion(const FloatRect& absoluteSubregion) { m_absoluteSubregion = absoluteSubregion; }
@@ -47,7 +47,7 @@
virtual TextStream& externalRepresentation(TextStream&, int indention) const;
private:
- FEImage(Filter*, PassRefPtr<Image>, const SVGPreserveAspectRatio&);
+ FEImage(Filter*, RefPtr<Image>, const SVGPreserveAspectRatio&);
RefPtr<Image> m_image;
SVGPreserveAspectRatio m_preserveAspectRatio;
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp (89223 => 89224)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -32,13 +32,14 @@
namespace WebCore {
SVGFilterBuilder::SVGFilterBuilder(Filter* filter)
+ : m_lastEffect(0)
{
m_builtinEffects.add(SourceGraphic::effectName(), SourceGraphic::create(filter));
m_builtinEffects.add(SourceAlpha::effectName(), SourceAlpha::create(filter));
addBuiltinEffects();
}
-void SVGFilterBuilder::add(const AtomicString& id, PassRefPtr<FilterEffect> effect)
+void SVGFilterBuilder::add(const AtomicString& id, RefPtr<FilterEffect> effect)
{
if (id.isEmpty()) {
m_lastEffect = effect;
@@ -67,21 +68,20 @@
return m_namedEffects.get(id).get();
}
-void SVGFilterBuilder::appendEffectToEffectReferences(PassRefPtr<FilterEffect> prpEffect, RenderObject* object)
+void SVGFilterBuilder::appendEffectToEffectReferences(RefPtr<FilterEffect> effectReference, RenderObject* object)
{
- RefPtr<FilterEffect> effect = prpEffect;
-
// The effect must be a newly created filter effect.
- ASSERT(!m_effectReferences.contains(effect));
+ ASSERT(!m_effectReferences.contains(effectReference));
ASSERT(object && !m_effectRenderer.contains(object));
- m_effectReferences.add(effect, FilterEffectSet());
+ m_effectReferences.add(effectReference, FilterEffectSet());
+ FilterEffect* effect = effectReference.get();
unsigned numberOfInputEffects = effect->inputEffects().size();
// It is not possible to add the same value to a set twice.
for (unsigned i = 0; i < numberOfInputEffects; ++i)
- effectReferences(effect->inputEffect(i)).add(effect.get());
- m_effectRenderer.add(object, effect.get());
+ effectReferences(effect->inputEffect(i)).add(effect);
+ m_effectRenderer.add(object, effectReference.get());
}
void SVGFilterBuilder::clearEffects()
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h (89223 => 89224)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -39,12 +39,12 @@
static PassRefPtr<SVGFilterBuilder> create(Filter* filter) { return adoptRef(new SVGFilterBuilder(filter)); }
- void add(const AtomicString& id, PassRefPtr<FilterEffect>);
+ void add(const AtomicString& id, RefPtr<FilterEffect> effect);
FilterEffect* getEffectById(const AtomicString& id) const;
FilterEffect* lastEffect() const { return m_lastEffect.get(); }
- void appendEffectToEffectReferences(PassRefPtr<FilterEffect>, RenderObject*);
+ void appendEffectToEffectReferences(RefPtr<FilterEffect>, RenderObject*);
inline FilterEffectSet& effectReferences(FilterEffect* effect)
{
Modified: trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.cpp (89223 => 89224)
--- trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -144,28 +144,28 @@
(*iter)->performTask(0);
}
-void ThreadableWebSocketChannelClientWrapper::didConnectCallback(ScriptExecutionContext* context, ThreadableWebSocketChannelClientWrapper* wrapper)
+void ThreadableWebSocketChannelClientWrapper::didConnectCallback(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> wrapper)
{
ASSERT_UNUSED(context, !context);
if (wrapper->m_client)
wrapper->m_client->didConnect();
}
-void ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback(ScriptExecutionContext* context, ThreadableWebSocketChannelClientWrapper* wrapper, String message)
+void ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> wrapper, String message)
{
ASSERT_UNUSED(context, !context);
if (wrapper->m_client)
wrapper->m_client->didReceiveMessage(message);
}
-void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback(ScriptExecutionContext* context, ThreadableWebSocketChannelClientWrapper* wrapper)
+void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshakeCallback(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> wrapper)
{
ASSERT_UNUSED(context, !context);
if (wrapper->m_client)
wrapper->m_client->didStartClosingHandshake();
}
-void ThreadableWebSocketChannelClientWrapper::didCloseCallback(ScriptExecutionContext* context, ThreadableWebSocketChannelClientWrapper* wrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion)
+void ThreadableWebSocketChannelClientWrapper::didCloseCallback(ScriptExecutionContext* context, RefPtr<ThreadableWebSocketChannelClientWrapper> wrapper, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion)
{
ASSERT_UNUSED(context, !context);
if (wrapper->m_client)
Modified: trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h (89223 => 89224)
--- trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/websockets/ThreadableWebSocketChannelClientWrapper.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -73,10 +73,10 @@
ThreadableWebSocketChannelClientWrapper(WebSocketChannelClient*);
void processPendingTasks();
- static void didConnectCallback(ScriptExecutionContext*, ThreadableWebSocketChannelClientWrapper*);
- static void didReceiveMessageCallback(ScriptExecutionContext*, ThreadableWebSocketChannelClientWrapper*, String message);
- static void didStartClosingHandshakeCallback(ScriptExecutionContext*, ThreadableWebSocketChannelClientWrapper*);
- static void didCloseCallback(ScriptExecutionContext*, ThreadableWebSocketChannelClientWrapper*, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus);
+ static void didConnectCallback(ScriptExecutionContext*, RefPtr<ThreadableWebSocketChannelClientWrapper>);
+ static void didReceiveMessageCallback(ScriptExecutionContext*, RefPtr<ThreadableWebSocketChannelClientWrapper>, String message);
+ static void didStartClosingHandshakeCallback(ScriptExecutionContext*, RefPtr<ThreadableWebSocketChannelClientWrapper>);
+ static void didCloseCallback(ScriptExecutionContext*, RefPtr<ThreadableWebSocketChannelClientWrapper>, unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus);
WebSocketChannelClient* m_client;
bool m_syncMethodDone;
Modified: trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp (89223 => 89224)
--- trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.cpp 2011-06-20 02:26:37 UTC (rev 89224)
@@ -114,7 +114,7 @@
m_bridge->resume();
}
-WorkerThreadableWebSocketChannel::Peer::Peer(PassRefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
+WorkerThreadableWebSocketChannel::Peer::Peer(RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
: m_workerClientWrapper(clientWrapper)
, m_loaderProxy(loaderProxy)
, m_mainWebSocketChannel(WebSocketChannel::create(context, this, url, protocol))
@@ -258,14 +258,14 @@
m_loaderProxy.postTaskForModeToWorkerContext(createCallbackTask(&workerContextDidClose, m_workerClientWrapper, unhandledBufferedAmount, closingHandshakeCompletion), m_taskMode);
}
-void WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, Peer* peer, PassRefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
+void WorkerThreadableWebSocketChannel::Bridge::setWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, Peer* peer, RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper)
{
ASSERT_UNUSED(context, context->isWorkerContext());
thisPtr->m_peer = peer;
workerClientWrapper->setSyncMethodDone();
}
-void WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, PassRefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, const String& taskMode, const KURL& url, const String& protocol)
+void WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel(ScriptExecutionContext* context, Bridge* thisPtr, RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, const String& taskMode, const KURL& url, const String& protocol)
{
ASSERT(isMainThread());
ASSERT_UNUSED(context, context->isDocument());
Modified: trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.h (89223 => 89224)
--- trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.h 2011-06-19 21:07:33 UTC (rev 89223)
+++ trunk/Source/WebCore/websockets/WorkerThreadableWebSocketChannel.h 2011-06-20 02:26:37 UTC (rev 89224)
@@ -82,7 +82,7 @@
class Peer : public WebSocketChannelClient {
WTF_MAKE_NONCOPYABLE(Peer); WTF_MAKE_FAST_ALLOCATED;
public:
- static Peer* create(PassRefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
+ static Peer* create(RefPtr<ThreadableWebSocketChannelClientWrapper> clientWrapper, WorkerLoaderProxy& loaderProxy, ScriptExecutionContext* context, const String& taskMode, const KURL& url, const String& protocol)
{
return new Peer(clientWrapper, loaderProxy, context, taskMode, url, protocol);
}
@@ -103,7 +103,7 @@
virtual void didClose(unsigned long unhandledBufferedAmount, ClosingHandshakeCompletionStatus);
private:
- Peer(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, WorkerLoaderProxy&, ScriptExecutionContext*, const String& taskMode, const KURL&, const String& protocol);
+ Peer(RefPtr<ThreadableWebSocketChannelClientWrapper>, WorkerLoaderProxy&, ScriptExecutionContext*, const String& taskMode, const KURL&, const String& protocol);
RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper;
WorkerLoaderProxy& m_loaderProxy;
@@ -134,10 +134,10 @@
private:
Bridge(PassRefPtr<ThreadableWebSocketChannelClientWrapper>, PassRefPtr<WorkerContext>, const String& taskMode, const KURL&, const String& protocol);
- static void setWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, Peer*, PassRefPtr<ThreadableWebSocketChannelClientWrapper>);
+ static void setWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, Peer*, RefPtr<ThreadableWebSocketChannelClientWrapper>);
// Executed on the main thread to create a Peer for this bridge.
- static void mainThreadCreateWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, PassRefPtr<ThreadableWebSocketChannelClientWrapper>, const String& taskMode, const KURL&, const String& protocol);
+ static void mainThreadCreateWebSocketChannel(ScriptExecutionContext*, Bridge* thisPtr, RefPtr<ThreadableWebSocketChannelClientWrapper>, const String& taskMode, const KURL&, const String& protocol);
// Executed on the worker context's thread.
void clearClientWrapper();