summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-11-17 09:55:51 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-17 09:55:51 -0800
commit928a43ae51e06ad20ac9dcae2b35182fc32dc84e (patch)
treec3deab1331650f1c139d7788f0b80526c2371b5c /Source
parentf22053c74835d7bee23b3b89f85f56b0b2e9ee90 (diff)
parent6f7f240b12091a6aa7305952771cc8a32d8e3a47 (diff)
downloadexternal_webkit-928a43ae51e06ad20ac9dcae2b35182fc32dc84e.zip
external_webkit-928a43ae51e06ad20ac9dcae2b35182fc32dc84e.tar.gz
external_webkit-928a43ae51e06ad20ac9dcae2b35182fc32dc84e.tar.bz2
Merge "Audit misuse of PassRefPtr"
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp4
-rw-r--r--Source/WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp2
-rw-r--r--Source/WebKit/android/jni/WebCoreFrameBridge.cpp10
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp10
4 files changed, 13 insertions, 13 deletions
diff --git a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
index 3e062f8..387c3e0 100644
--- a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -733,7 +733,7 @@ bool GraphicsLayerAndroid::createAnimationFromKeyframes(const KeyframeValueList&
KeyframeValueList* operationsList = new KeyframeValueList(AnimatedPropertyOpacity);
for (unsigned int i = 0; i < valueList.size(); i++) {
FloatAnimationValue* originalValue = (FloatAnimationValue*)valueList.at(i);
- PassRefPtr<TimingFunction> timingFunction(const_cast<TimingFunction*>(originalValue->timingFunction()));
+ RefPtr<TimingFunction> timingFunction(const_cast<TimingFunction*>(originalValue->timingFunction()));
FloatAnimationValue* value = new FloatAnimationValue(originalValue->keyTime(),
originalValue->value(),
timingFunction);
@@ -775,7 +775,7 @@ bool GraphicsLayerAndroid::createTransformAnimationsFromKeyframes(const Keyframe
KeyframeValueList* operationsList = new KeyframeValueList(AnimatedPropertyWebkitTransform);
for (unsigned int i = 0; i < valueList.size(); i++) {
TransformAnimationValue* originalValue = (TransformAnimationValue*)valueList.at(i);
- PassRefPtr<TimingFunction> timingFunction(const_cast<TimingFunction*>(originalValue->timingFunction()));
+ RefPtr<TimingFunction> timingFunction(const_cast<TimingFunction*>(originalValue->timingFunction()));
TransformAnimationValue* value = new TransformAnimationValue(originalValue->keyTime(),
originalValue->value(),
timingFunction);
diff --git a/Source/WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp b/Source/WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp
index e837244..2969252 100644
--- a/Source/WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp
+++ b/Source/WebKit/android/WebCoreSupport/autofill/FormManagerAndroid.cpp
@@ -562,7 +562,7 @@ void FormManager::ExtractForms(Frame* frame) {
ResetFrame(frame);
- WTF::PassRefPtr<HTMLCollection> web_forms = frame->document()->forms();
+ WTF::RefPtr<HTMLCollection> web_forms = frame->document()->forms();
for (size_t i = 0; i < web_forms->length(); ++i) {
// Owned by |form_elements|.
diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
index 609ac79..79494e6 100644
--- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -492,7 +492,7 @@ WebFrame::startLoadingResource(WebCore::ResourceHandle* loader,
if (checkException(env))
return 0;
- PassRefPtr<WebCore::ResourceLoaderAndroid> h;
+ RefPtr<WebCore::ResourceLoaderAndroid> h;
if (jLoadListener)
h = WebCoreResourceLoader::create(env, jLoadListener);
env->DeleteLocalRef(jLoadListener);
@@ -1085,7 +1085,7 @@ void WebFrame::maybeSavePassword(WebCore::Frame* frame, const WebCore::ResourceR
bool WebFrame::getUsernamePasswordFromDom(WebCore::Frame* frame, WTF::String& username, WTF::String& password)
{
bool found = false;
- WTF::PassRefPtr<WebCore::HTMLCollection> form = frame->document()->forms();
+ WTF::RefPtr<WebCore::HTMLCollection> form = frame->document()->forms();
WebCore::Node* node = form->firstItem();
while (node && !found && !node->namespaceURI().isNull() &&
!node->namespaceURI().isEmpty()) {
@@ -1400,7 +1400,7 @@ static void LoadData(JNIEnv *env, jobject obj, jstring baseUrl, jstring data,
// Setup the substituteData
const char* dataStr = env->GetStringUTFChars(data, NULL);
- WTF::PassRefPtr<WebCore::SharedBuffer> sharedBuffer =
+ WTF::RefPtr<WebCore::SharedBuffer> sharedBuffer =
WebCore::SharedBuffer::create();
LOG_ASSERT(dataStr, "nativeLoadData has a null data string.");
sharedBuffer->append(dataStr, strlen(dataStr));
@@ -1821,7 +1821,7 @@ static jboolean HasPasswordField(JNIEnv *env, jobject obj)
LOG_ASSERT(pFrame, "HasPasswordField must take a valid frame pointer!");
bool found = false;
- WTF::PassRefPtr<WebCore::HTMLCollection> form = pFrame->document()->forms();
+ WTF::RefPtr<WebCore::HTMLCollection> form = pFrame->document()->forms();
WebCore::Node* node = form->firstItem();
// Null/Empty namespace means that node is not created in HTMLFormElement
// class, but just normal Element class.
@@ -1868,7 +1868,7 @@ static void SetUsernamePassword(JNIEnv *env, jobject obj,
WebCore::HTMLInputElement* usernameEle = NULL;
WebCore::HTMLInputElement* passwordEle = NULL;
bool found = false;
- WTF::PassRefPtr<WebCore::HTMLCollection> form = pFrame->document()->forms();
+ WTF::RefPtr<WebCore::HTMLCollection> form = pFrame->document()->forms();
WebCore::Node* node = form->firstItem();
while (node && !found && !node->namespaceURI().isNull() &&
!node->namespaceURI().isEmpty()) {
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 3e377cb..d2a6c0a 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -2218,7 +2218,7 @@ String WebViewCore::modifySelectionTextNavigationAxis(DOMSelection* selection, i
if (m_currentNodeDomNavigationAxis
&& CacheBuilder::validNode(m_mainFrame,
m_mainFrame, m_currentNodeDomNavigationAxis)) {
- PassRefPtr<Range> rangeRef =
+ RefPtr<Range> rangeRef =
selection->frame()->document()->createRange();
rangeRef->selectNode(m_currentNodeDomNavigationAxis, ec);
m_currentNodeDomNavigationAxis = 0;
@@ -2230,7 +2230,7 @@ String WebViewCore::modifySelectionTextNavigationAxis(DOMSelection* selection, i
} else if (m_cursorNode
&& CacheBuilder::validNode(m_mainFrame,
m_mainFrame, m_cursorNode)) {
- PassRefPtr<Range> rangeRef =
+ RefPtr<Range> rangeRef =
selection->frame()->document()->createRange();
rangeRef->selectNode(reinterpret_cast<Node*>(m_cursorNode), ec);
if (ec)
@@ -2434,7 +2434,7 @@ String WebViewCore::modifySelectionTextNavigationAxis(DOMSelection* selection, i
scrollNodeIntoView(m_mainFrame, selection->anchorNode());
// format markup for the visible content
- PassRefPtr<Range> range = selection->getRangeAt(0, ec);
+ RefPtr<Range> range = selection->getRangeAt(0, ec);
if (ec)
return String();
IntRect bounds = range->boundingBox();
@@ -2761,7 +2761,7 @@ String WebViewCore::formatMarkup(DOMSelection* selection)
{
ExceptionCode ec = 0;
String markup = String();
- PassRefPtr<Range> wholeRange = selection->getRangeAt(0, ec);
+ RefPtr<Range> wholeRange = selection->getRangeAt(0, ec);
if (ec)
return String();
if (!wholeRange->startContainer() || !wholeRange->startContainer())
@@ -2771,7 +2771,7 @@ String WebViewCore::formatMarkup(DOMSelection* selection)
Node* firstNode = wholeRange->firstNode();
Node* pastLastNode = wholeRange->pastLastNode();
Node* currentNode = firstNode;
- PassRefPtr<Range> currentRange;
+ RefPtr<Range> currentRange;
while (currentNode != pastLastNode) {
Node* nextNode = currentNode->traverseNextNode();