Changeset 200789 in webkit
- Timestamp:
- May 12, 2016, 2:13:13 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r200788 r200789 1 2016-05-12 Chris Dumez <cdumez@apple.com> 2 3 Drop toJS() overload taking a PassRefPtr<> parameter 4 https://bugs.webkit.org/show_bug.cgi?id=157627 5 6 Reviewed by Alex Christensen. 7 8 Update our implementation stop stop returning PassRefPtrs to the 9 JS bindings and drop the toJS() overload taking a PassRefPtr<> 10 parameter 11 12 * Modules/mediasource/SourceBuffer.cpp: 13 (WebCore::SourceBuffer::buffered): 14 * Modules/mediasource/SourceBuffer.h: 15 * Modules/webaudio/AudioBuffer.cpp: 16 (WebCore::AudioBuffer::getChannelData): 17 * Modules/webaudio/AudioBuffer.h: 18 * animation/DocumentTimeline.cpp: 19 (WebCore::DocumentTimeline::create): 20 * animation/DocumentTimeline.h: 21 * bindings/js/JSDOMBinding.h: 22 (WebCore::toJS): Deleted. 23 (WebCore::toJSNewlyCreated): Deleted. 24 * css/CSSPrimitiveValue.cpp: 25 (WebCore::CSSPrimitiveValue::getRGBColorValue): 26 * css/CSSPrimitiveValue.h: 27 * html/HTMLMediaElement.cpp: 28 (WebCore::HTMLMediaElement::error): 29 * html/HTMLMediaElement.h: 30 * html/LabelableElement.cpp: 31 (WebCore::LabelableElement::labels): 32 * html/LabelableElement.h: 33 * html/canvas/WebGLGetInfo.cpp: 34 (WebCore::WebGLGetInfo::getWebGLBuffer): 35 (WebCore::WebGLGetInfo::getWebGLFloatArray): 36 (WebCore::WebGLGetInfo::getWebGLFramebuffer): 37 (WebCore::WebGLGetInfo::getWebGLIntArray): 38 (WebCore::WebGLGetInfo::getWebGLProgram): 39 (WebCore::WebGLGetInfo::getWebGLRenderbuffer): 40 (WebCore::WebGLGetInfo::getWebGLTexture): 41 (WebCore::WebGLGetInfo::getWebGLUnsignedByteArray): 42 (WebCore::WebGLGetInfo::getWebGLUnsignedIntArray): 43 (WebCore::WebGLGetInfo::getWebGLVertexArrayObjectOES): 44 (WebCore::WebGLGetInfo::getWebGLVertexArrayObject): 45 * html/canvas/WebGLGetInfo.h: 46 * html/canvas/WebGLRenderingContextBase.cpp: 47 (WebCore::WebGLRenderingContextBase::paintRenderingResultsToImageData): 48 (WebCore::WebGLRenderingContextBase::createBuffer): 49 (WebCore::WebGLRenderingContextBase::createFramebuffer): 50 (WebCore::WebGLRenderingContextBase::createTexture): 51 (WebCore::WebGLRenderingContextBase::createProgram): 52 (WebCore::WebGLRenderingContextBase::createRenderbuffer): 53 (WebCore::WebGLRenderingContextBase::createShader): 54 (WebCore::WebGLRenderingContextBase::getActiveAttrib): 55 (WebCore::WebGLRenderingContextBase::getActiveUniform): 56 (WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat): 57 (WebCore::WebGLRenderingContextBase::getUniformLocation): 58 (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer): 59 (WebCore::WebGLRenderingContextBase::videoFrameToImage): 60 * html/canvas/WebGLRenderingContextBase.h: 61 * html/track/TextTrackCue.cpp: 62 (WebCore::TextTrackCue::create): 63 * html/track/TextTrackCue.h: 64 * html/track/VTTCue.cpp: 65 (WebCore::VTTCueBox::create): 66 * html/track/VTTCue.h: 67 * page/DOMSelection.cpp: 68 (WebCore::DOMSelection::getRangeAt): 69 * page/DOMSelection.h: 70 * page/DOMWindow.cpp: 71 (WebCore::DOMWindow::matchMedia): 72 (WebCore::DOMWindow::styleMedia): 73 (WebCore::DOMWindow::getComputedStyle): 74 (WebCore::DOMWindow::getMatchedCSSRules): 75 (WebCore::DOMWindow::webkitConvertPointFromNodeToPage): 76 (WebCore::DOMWindow::webkitConvertPointFromPageToNode): 77 (WebCore::DOMWindow::open): 78 * page/DOMWindow.h: 79 * page/Location.cpp: 80 (WebCore::Location::ancestorOrigins): 81 * page/Location.h: 82 1 83 2016-05-12 Ryosuke Niwa <rniwa@webkit.org> 2 84 -
trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp
r200626 r200789 131 131 } 132 132 133 PassRefPtr<TimeRanges> SourceBuffer::buffered(ExceptionCode& ec) const133 RefPtr<TimeRanges> SourceBuffer::buffered(ExceptionCode& ec) const 134 134 { 135 135 // Section 3.1 buffered attribute steps. -
trunk/Source/WebCore/Modules/mediasource/SourceBuffer.h
r200361 r200789 67 67 // SourceBuffer.idl methods 68 68 bool updating() const { return m_updating; } 69 PassRefPtr<TimeRanges> buffered(ExceptionCode&) const;69 RefPtr<TimeRanges> buffered(ExceptionCode&) const; 70 70 const RefPtr<TimeRanges>& buffered() const; 71 71 double timestampOffset() const; -
trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.cpp
r199007 r200789 54 54 } 55 55 56 const PassRefPtr<RTCStatsReport>RTCStatsReport::local()56 RTCStatsReport& RTCStatsReport::local() 57 57 { 58 return this;58 return *this; 59 59 } 60 60 61 const PassRefPtr<RTCStatsReport>RTCStatsReport::remote()61 RTCStatsReport& RTCStatsReport::remote() 62 62 { 63 return this;63 return *this; 64 64 } 65 65 -
trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.h
r184940 r200789 46 46 47 47 // DEPRECATED 48 const PassRefPtr<RTCStatsReport>local();48 RTCStatsReport& local(); 49 49 // DEPRECATED 50 const PassRefPtr<RTCStatsReport>remote();50 RTCStatsReport& remote(); 51 51 52 52 void addStatistic(const String& name, const String& value); -
trunk/Source/WebCore/Modules/webaudio/AudioBuffer.cpp
r185316 r200789 96 96 } 97 97 98 PassRefPtr<Float32Array> AudioBuffer::getChannelData(unsigned channelIndex, ExceptionCode& ec)98 RefPtr<Float32Array> AudioBuffer::getChannelData(unsigned channelIndex, ExceptionCode& ec) 99 99 { 100 100 if (channelIndex >= m_channels.size()) { -
trunk/Source/WebCore/Modules/webaudio/AudioBuffer.h
r177733 r200789 56 56 // Channel data access 57 57 unsigned numberOfChannels() const { return m_channels.size(); } 58 PassRefPtr<Float32Array> getChannelData(unsigned channelIndex, ExceptionCode&);58 RefPtr<Float32Array> getChannelData(unsigned channelIndex, ExceptionCode&); 59 59 Float32Array* getChannelData(unsigned channelIndex); 60 60 void zero(); -
trunk/Source/WebCore/animation/DocumentTimeline.cpp
r197058 r200789 34 34 namespace WebCore { 35 35 36 PassRefPtr<DocumentTimeline> DocumentTimeline::create(double originTime)36 Ref<DocumentTimeline> DocumentTimeline::create(double originTime) 37 37 { 38 return adoptRef( new DocumentTimeline(originTime));38 return adoptRef(*new DocumentTimeline(originTime)); 39 39 } 40 40 -
trunk/Source/WebCore/animation/DocumentTimeline.h
r197058 r200789 38 38 class DocumentTimeline final : public AnimationTimeline { 39 39 public: 40 static PassRefPtr<DocumentTimeline> create(double);40 static Ref<DocumentTimeline> create(double); 41 41 ~DocumentTimeline(); 42 42 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.h
r200775 r200789 253 253 JSC::JSValue toJS(JSC::ExecState*, JSC::JSGlobalObject*, JSC::ArrayBufferView*); 254 254 template<typename T> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const RefPtr<T>&); 255 template<typename T> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const PassRefPtr<T>&);256 255 template<typename T> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const Ref<T>&); 257 256 template<typename T> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, const RefPtr<T>&); 258 template<typename T> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, const PassRefPtr<T>&);259 257 template<typename T> JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, const Ref<T>&); 260 258 template<typename T> JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, const Vector<T>&); … … 550 548 } 551 549 552 template<typename T> inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const PassRefPtr<T>& ptr)553 {554 return toJS(exec, globalObject, ptr.get());555 }556 557 550 template<typename T> inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Ref<T>& ptr) 558 551 { … … 561 554 562 555 template<typename T> inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const RefPtr<T>& ptr) 563 {564 return toJSNewlyCreated(exec, globalObject, ptr.get());565 }566 567 template<typename T> inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const PassRefPtr<T>& ptr)568 556 { 569 557 return toJSNewlyCreated(exec, globalObject, ptr.get()); -
trunk/Source/WebCore/css/CSSPrimitiveValue.cpp
r199884 r200789 941 941 #endif 942 942 943 PassRefPtr<RGBColor> CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) const 944 { 945 ec = 0; 943 RefPtr<RGBColor> CSSPrimitiveValue::getRGBColorValue(ExceptionCode& ec) const 944 { 946 945 if (m_primitiveUnitType != CSS_RGBCOLOR) { 947 946 ec = INVALID_ACCESS_ERR; 948 return 0;947 return nullptr; 949 948 } 950 949 -
trunk/Source/WebCore/css/CSSPrimitiveValue.h
r197617 r200789 348 348 #endif 349 349 350 PassRefPtr<RGBColor> getRGBColorValue(ExceptionCode&) const;350 RefPtr<RGBColor> getRGBColorValue(ExceptionCode&) const; 351 351 RGBA32 getRGBA32Value() const { return m_primitiveUnitType != CSS_RGBCOLOR ? 0 : m_value.rgbcolor; } 352 352 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r200775 r200789 968 968 } 969 969 970 PassRefPtr<MediaError> HTMLMediaElement::error() const 971 { 972 return m_error ;970 MediaError* HTMLMediaElement::error() const 971 { 972 return m_error.get(); 973 973 } 974 974 -
trunk/Source/WebCore/html/HTMLMediaElement.h
r200768 r200789 158 158 // DOM API 159 159 // error state 160 PassRefPtr<MediaError>error() const;160 MediaError* error() const; 161 161 162 162 void setSrc(const String&); -
trunk/Source/WebCore/html/LabelableElement.cpp
r166377 r200789 41 41 } 42 42 43 PassRefPtr<NodeList> LabelableElement::labels()43 RefPtr<NodeList> LabelableElement::labels() 44 44 { 45 45 if (!supportLabels()) 46 return 0;46 return nullptr; 47 47 48 48 return ensureRareData().ensureNodeLists().addCacheWithAtomicName<LabelsNodeList>(*this, starAtom); -
trunk/Source/WebCore/html/LabelableElement.h
r197566 r200789 41 41 virtual ~LabelableElement(); 42 42 43 PassRefPtr<NodeList> labels();43 RefPtr<NodeList> labels(); 44 44 virtual bool supportLabels() const { return false; } 45 45 -
trunk/Source/WebCore/html/canvas/WebGLGetInfo.cpp
r186198 r200789 299 299 } 300 300 301 PassRefPtr<WebGLBuffer>WebGLGetInfo::getWebGLBuffer() const301 WebGLBuffer* WebGLGetInfo::getWebGLBuffer() const 302 302 { 303 303 ASSERT(getType() == kTypeWebGLBuffer); 304 return m_webglBuffer ;305 } 306 307 PassRefPtr<Float32Array>WebGLGetInfo::getWebGLFloatArray() const304 return m_webglBuffer.get(); 305 } 306 307 Float32Array* WebGLGetInfo::getWebGLFloatArray() const 308 308 { 309 309 ASSERT(getType() == kTypeWebGLFloatArray); 310 return m_webglFloatArray ;311 } 312 313 PassRefPtr<WebGLFramebuffer>WebGLGetInfo::getWebGLFramebuffer() const310 return m_webglFloatArray.get(); 311 } 312 313 WebGLFramebuffer* WebGLGetInfo::getWebGLFramebuffer() const 314 314 { 315 315 ASSERT(getType() == kTypeWebGLFramebuffer); 316 return m_webglFramebuffer ;317 } 318 319 PassRefPtr<Int32Array>WebGLGetInfo::getWebGLIntArray() const316 return m_webglFramebuffer.get(); 317 } 318 319 Int32Array* WebGLGetInfo::getWebGLIntArray() const 320 320 { 321 321 ASSERT(getType() == kTypeWebGLIntArray); 322 return m_webglIntArray ;323 } 324 325 PassRefPtr<WebGLProgram>WebGLGetInfo::getWebGLProgram() const322 return m_webglIntArray.get(); 323 } 324 325 WebGLProgram* WebGLGetInfo::getWebGLProgram() const 326 326 { 327 327 ASSERT(getType() == kTypeWebGLProgram); 328 return m_webglProgram ;329 } 330 331 PassRefPtr<WebGLRenderbuffer>WebGLGetInfo::getWebGLRenderbuffer() const328 return m_webglProgram.get(); 329 } 330 331 WebGLRenderbuffer* WebGLGetInfo::getWebGLRenderbuffer() const 332 332 { 333 333 ASSERT(getType() == kTypeWebGLRenderbuffer); 334 return m_webglRenderbuffer ;335 } 336 337 PassRefPtr<WebGLTexture>WebGLGetInfo::getWebGLTexture() const334 return m_webglRenderbuffer.get(); 335 } 336 337 WebGLTexture* WebGLGetInfo::getWebGLTexture() const 338 338 { 339 339 ASSERT(getType() == kTypeWebGLTexture); 340 return m_webglTexture ;341 } 342 343 PassRefPtr<Uint8Array>WebGLGetInfo::getWebGLUnsignedByteArray() const340 return m_webglTexture.get(); 341 } 342 343 Uint8Array* WebGLGetInfo::getWebGLUnsignedByteArray() const 344 344 { 345 345 ASSERT(getType() == kTypeWebGLUnsignedByteArray); 346 return m_webglUnsignedByteArray ;347 } 348 349 PassRefPtr<Uint32Array>WebGLGetInfo::getWebGLUnsignedIntArray() const346 return m_webglUnsignedByteArray.get(); 347 } 348 349 Uint32Array* WebGLGetInfo::getWebGLUnsignedIntArray() const 350 350 { 351 351 ASSERT(getType() == kTypeWebGLUnsignedIntArray); 352 return m_webglUnsignedIntArray ;353 } 354 355 PassRefPtr<WebGLVertexArrayObjectOES>WebGLGetInfo::getWebGLVertexArrayObjectOES() const352 return m_webglUnsignedIntArray.get(); 353 } 354 355 WebGLVertexArrayObjectOES* WebGLGetInfo::getWebGLVertexArrayObjectOES() const 356 356 { 357 357 ASSERT(getType() == kTypeWebGLVertexArrayObjectOES); 358 return m_webglVertexArrayObjectOES ;358 return m_webglVertexArrayObjectOES.get(); 359 359 } 360 360 361 361 #if ENABLE(WEBGL2) 362 PassRefPtr<WebGLVertexArrayObject>WebGLGetInfo::getWebGLVertexArrayObject() const362 WebGLVertexArrayObject* WebGLGetInfo::getWebGLVertexArrayObject() const 363 363 { 364 364 ASSERT(getType() == kTypeWebGLVertexArrayObject); 365 return m_webglVertexArrayObject ;365 return m_webglVertexArrayObject.get(); 366 366 } 367 367 #endif -
trunk/Source/WebCore/html/canvas/WebGLGetInfo.h
r186198 r200789 113 113 unsigned int getUnsignedInt() const; 114 114 long long getInt64() const; 115 PassRefPtr<WebGLBuffer>getWebGLBuffer() const;116 PassRefPtr<Float32Array>getWebGLFloatArray() const;117 PassRefPtr<WebGLFramebuffer>getWebGLFramebuffer() const;118 PassRefPtr<Int32Array>getWebGLIntArray() const;115 WebGLBuffer* getWebGLBuffer() const; 116 Float32Array* getWebGLFloatArray() const; 117 WebGLFramebuffer* getWebGLFramebuffer() const; 118 Int32Array* getWebGLIntArray() const; 119 119 // FIXME: implement WebGLObjectArray 120 // PassRefPtr<WebGLObjectArray>getWebGLObjectArray() const;121 PassRefPtr<WebGLProgram>getWebGLProgram() const;122 PassRefPtr<WebGLRenderbuffer>getWebGLRenderbuffer() const;123 PassRefPtr<WebGLTexture>getWebGLTexture() const;124 PassRefPtr<Uint8Array>getWebGLUnsignedByteArray() const;125 PassRefPtr<Uint32Array>getWebGLUnsignedIntArray() const;126 PassRefPtr<WebGLVertexArrayObjectOES>getWebGLVertexArrayObjectOES() const;120 // WebGLObjectArray* getWebGLObjectArray() const; 121 WebGLProgram* getWebGLProgram() const; 122 WebGLRenderbuffer* getWebGLRenderbuffer() const; 123 WebGLTexture* getWebGLTexture() const; 124 Uint8Array* getWebGLUnsignedByteArray() const; 125 Uint32Array* getWebGLUnsignedIntArray() const; 126 WebGLVertexArrayObjectOES* getWebGLVertexArrayObjectOES() const; 127 127 #if ENABLE(WEBGL2) 128 PassRefPtr<WebGLVertexArrayObject>getWebGLVertexArrayObject() const;128 WebGLVertexArrayObject* getWebGLVertexArrayObject() const; 129 129 #endif 130 130 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
r200626 r200789 753 753 } 754 754 755 PassRefPtr<ImageData> WebGLRenderingContextBase::paintRenderingResultsToImageData()755 RefPtr<ImageData> WebGLRenderingContextBase::paintRenderingResultsToImageData() 756 756 { 757 757 if (isContextLostOrPending()) … … 1387 1387 } 1388 1388 1389 PassRefPtr<WebGLBuffer> WebGLRenderingContextBase::createBuffer()1389 RefPtr<WebGLBuffer> WebGLRenderingContextBase::createBuffer() 1390 1390 { 1391 1391 if (isContextLostOrPending()) 1392 1392 return nullptr; 1393 RefPtr<WebGLBuffer> o= WebGLBuffer::create(this);1394 addSharedObject( o.get());1395 return o;1396 } 1397 1398 PassRefPtr<WebGLFramebuffer> WebGLRenderingContextBase::createFramebuffer()1393 auto buffer = WebGLBuffer::create(this); 1394 addSharedObject(buffer.ptr()); 1395 return WTFMove(buffer); 1396 } 1397 1398 RefPtr<WebGLFramebuffer> WebGLRenderingContextBase::createFramebuffer() 1399 1399 { 1400 1400 if (isContextLostOrPending()) 1401 1401 return nullptr; 1402 RefPtr<WebGLFramebuffer> o= WebGLFramebuffer::create(this);1403 addContextObject( o.get());1404 return o;1405 } 1406 1407 PassRefPtr<WebGLTexture> WebGLRenderingContextBase::createTexture()1402 auto buffer = WebGLFramebuffer::create(this); 1403 addContextObject(buffer.ptr()); 1404 return WTFMove(buffer); 1405 } 1406 1407 RefPtr<WebGLTexture> WebGLRenderingContextBase::createTexture() 1408 1408 { 1409 1409 if (isContextLostOrPending()) 1410 1410 return nullptr; 1411 RefPtr<WebGLTexture> o= WebGLTexture::create(this);1412 addSharedObject( o.get());1413 return o;1414 } 1415 1416 PassRefPtr<WebGLProgram> WebGLRenderingContextBase::createProgram()1411 auto texture = WebGLTexture::create(this); 1412 addSharedObject(texture.ptr()); 1413 return WTFMove(texture); 1414 } 1415 1416 RefPtr<WebGLProgram> WebGLRenderingContextBase::createProgram() 1417 1417 { 1418 1418 if (isContextLostOrPending()) 1419 1419 return nullptr; 1420 RefPtr<WebGLProgram> o= WebGLProgram::create(this);1421 addSharedObject( o.get());1422 return o;1423 } 1424 1425 PassRefPtr<WebGLRenderbuffer> WebGLRenderingContextBase::createRenderbuffer()1420 auto program = WebGLProgram::create(this); 1421 addSharedObject(program.ptr()); 1422 return WTFMove(program); 1423 } 1424 1425 RefPtr<WebGLRenderbuffer> WebGLRenderingContextBase::createRenderbuffer() 1426 1426 { 1427 1427 if (isContextLostOrPending()) 1428 1428 return nullptr; 1429 RefPtr<WebGLRenderbuffer> o= WebGLRenderbuffer::create(this);1430 addSharedObject( o.get());1431 return o;1432 } 1433 1434 PassRefPtr<WebGLShader> WebGLRenderingContextBase::createShader(GC3Denum type, ExceptionCode&)1429 auto buffer = WebGLRenderbuffer::create(this); 1430 addSharedObject(buffer.ptr()); 1431 return WTFMove(buffer); 1432 } 1433 1434 RefPtr<WebGLShader> WebGLRenderingContextBase::createShader(GC3Denum type, ExceptionCode&) 1435 1435 { 1436 1436 if (isContextLostOrPending()) … … 1441 1441 } 1442 1442 1443 RefPtr<WebGLShader> o= WebGLShader::create(this, type);1444 addSharedObject( o.get());1445 return o;1443 auto shader = WebGLShader::create(this, type); 1444 addSharedObject(shader.ptr()); 1445 return WTFMove(shader); 1446 1446 } 1447 1447 … … 2117 2117 } 2118 2118 2119 PassRefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveAttrib(WebGLProgram* program, GC3Duint index, ExceptionCode&)2119 RefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveAttrib(WebGLProgram* program, GC3Duint index, ExceptionCode&) 2120 2120 { 2121 2121 if (isContextLostOrPending() || !validateWebGLObject("getActiveAttrib", program)) … … 2130 2130 } 2131 2131 2132 PassRefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveUniform(WebGLProgram* program, GC3Duint index, ExceptionCode&)2132 RefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveUniform(WebGLProgram* program, GC3Duint index, ExceptionCode&) 2133 2133 { 2134 2134 if (isContextLostOrPending() || !validateWebGLObject("getActiveUniform", program)) 2135 return 0;2135 return nullptr; 2136 2136 ActiveInfo info; 2137 2137 if (!m_context->getActiveUniform(objectOrZero(program), index, info)) … … 2353 2353 } 2354 2354 2355 PassRefPtr<WebGLShaderPrecisionFormat> WebGLRenderingContextBase::getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType, ExceptionCode&)2355 RefPtr<WebGLShaderPrecisionFormat> WebGLRenderingContextBase::getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType, ExceptionCode&) 2356 2356 { 2357 2357 if (isContextLostOrPending()) … … 2546 2546 } 2547 2547 2548 PassRefPtr<WebGLUniformLocation> WebGLRenderingContextBase::getUniformLocation(WebGLProgram* program, const String& name, ExceptionCode&)2548 RefPtr<WebGLUniformLocation> WebGLRenderingContextBase::getUniformLocation(WebGLProgram* program, const String& name, ExceptionCode&) 2549 2549 { 2550 2550 if (isContextLostOrPending() || !validateWebGLObject("getUniformLocation", program)) … … 3153 3153 } 3154 3154 3155 PassRefPtr<Image> WebGLRenderingContextBase::drawImageIntoBuffer(Image& image, int width, int height, int deviceScaleFactor)3155 RefPtr<Image> WebGLRenderingContextBase::drawImageIntoBuffer(Image& image, int width, int height, int deviceScaleFactor) 3156 3156 { 3157 3157 IntSize size(width, height); … … 3221 3221 3222 3222 #if ENABLE(VIDEO) 3223 PassRefPtr<Image> WebGLRenderingContextBase::videoFrameToImage(HTMLVideoElement* video, BackingStoreCopy backingStoreCopy, ExceptionCode&)3223 RefPtr<Image> WebGLRenderingContextBase::videoFrameToImage(HTMLVideoElement* video, BackingStoreCopy backingStoreCopy, ExceptionCode&) 3224 3224 { 3225 3225 IntSize size(video->videoWidth(), video->videoHeight()); -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h
r200626 r200789 159 159 void copyTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height); 160 160 161 PassRefPtr<WebGLBuffer> createBuffer();162 PassRefPtr<WebGLFramebuffer> createFramebuffer();163 PassRefPtr<WebGLProgram> createProgram();164 PassRefPtr<WebGLRenderbuffer> createRenderbuffer();165 PassRefPtr<WebGLShader> createShader(GC3Denum type, ExceptionCode&);166 PassRefPtr<WebGLTexture> createTexture();161 RefPtr<WebGLBuffer> createBuffer(); 162 RefPtr<WebGLFramebuffer> createFramebuffer(); 163 RefPtr<WebGLProgram> createProgram(); 164 RefPtr<WebGLRenderbuffer> createRenderbuffer(); 165 RefPtr<WebGLShader> createShader(GC3Denum type, ExceptionCode&); 166 RefPtr<WebGLTexture> createTexture(); 167 167 168 168 void cullFace(GC3Denum mode); … … 193 193 void generateMipmap(GC3Denum target); 194 194 195 PassRefPtr<WebGLActiveInfo> getActiveAttrib(WebGLProgram*, GC3Duint index, ExceptionCode&);196 PassRefPtr<WebGLActiveInfo> getActiveUniform(WebGLProgram*, GC3Duint index, ExceptionCode&);195 RefPtr<WebGLActiveInfo> getActiveAttrib(WebGLProgram*, GC3Duint index, ExceptionCode&); 196 RefPtr<WebGLActiveInfo> getActiveUniform(WebGLProgram*, GC3Duint index, ExceptionCode&); 197 197 bool getAttachedShaders(WebGLProgram*, Vector<RefPtr<WebGLShader>>&, ExceptionCode&); 198 198 GC3Dint getAttribLocation(WebGLProgram*, const String& name); … … 208 208 WebGLGetInfo getShaderParameter(WebGLShader*, GC3Denum pname, ExceptionCode&); 209 209 String getShaderInfoLog(WebGLShader*, ExceptionCode&); 210 PassRefPtr<WebGLShaderPrecisionFormat> getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType, ExceptionCode&);210 RefPtr<WebGLShaderPrecisionFormat> getShaderPrecisionFormat(GC3Denum shaderType, GC3Denum precisionType, ExceptionCode&); 211 211 String getShaderSource(WebGLShader*, ExceptionCode&); 212 212 virtual Vector<String> getSupportedExtensions() = 0; 213 213 WebGLGetInfo getTexParameter(GC3Denum target, GC3Denum pname, ExceptionCode&); 214 214 WebGLGetInfo getUniform(WebGLProgram*, const WebGLUniformLocation*, ExceptionCode&); 215 PassRefPtr<WebGLUniformLocation> getUniformLocation(WebGLProgram*, const String&, ExceptionCode&);215 RefPtr<WebGLUniformLocation> getUniformLocation(WebGLProgram*, const String&, ExceptionCode&); 216 216 WebGLGetInfo getVertexAttrib(GC3Duint index, GC3Denum pname, ExceptionCode&); 217 217 long long getVertexAttribOffset(GC3Duint index, GC3Denum pname); … … 347 347 void markLayerComposited(); 348 348 void paintRenderingResultsToCanvas() override; 349 PassRefPtr<ImageData> paintRenderingResultsToImageData();349 RefPtr<ImageData> paintRenderingResultsToImageData(); 350 350 351 351 void removeSharedObject(WebGLSharedObject*); … … 427 427 void addCompressedTextureFormat(GC3Denum); 428 428 429 PassRefPtr<Image> drawImageIntoBuffer(Image&, int width, int height, int deviceScaleFactor);429 RefPtr<Image> drawImageIntoBuffer(Image&, int width, int height, int deviceScaleFactor); 430 430 431 431 #if ENABLE(VIDEO) 432 PassRefPtr<Image> videoFrameToImage(HTMLVideoElement*, BackingStoreCopy, ExceptionCode&);432 RefPtr<Image> videoFrameToImage(HTMLVideoElement*, BackingStoreCopy, ExceptionCode&); 433 433 #endif 434 434 -
trunk/Source/WebCore/html/track/TextTrackCue.cpp
r200361 r200789 56 56 static const int invalidCueIndex = -1; 57 57 58 PassRefPtr<TextTrackCue> TextTrackCue::create(ScriptExecutionContext& context, double start, double end, const String& content)58 Ref<TextTrackCue> TextTrackCue::create(ScriptExecutionContext& context, double start, double end, const String& content) 59 59 { 60 60 return create(context, MediaTime::createWithDouble(start), MediaTime::createWithDouble(end), content); 61 61 } 62 62 63 PassRefPtr<TextTrackCue> TextTrackCue::create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, const String& content)63 Ref<TextTrackCue> TextTrackCue::create(ScriptExecutionContext& context, const MediaTime& start, const MediaTime& end, const String& content) 64 64 { 65 65 return VTTCue::create(context, start, end, content); -
trunk/Source/WebCore/html/track/TextTrackCue.h
r197566 r200789 47 47 class TextTrackCue : public RefCounted<TextTrackCue>, public EventTargetWithInlineData { 48 48 public: 49 static PassRefPtr<TextTrackCue> create(ScriptExecutionContext&, double start, double end, const String& content);50 static PassRefPtr<TextTrackCue> create(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, const String& content);49 static Ref<TextTrackCue> create(ScriptExecutionContext&, double start, double end, const String& content); 50 static Ref<TextTrackCue> create(ScriptExecutionContext&, const MediaTime& start, const MediaTime& end, const String& content); 51 51 52 52 static const AtomicString& cueShadowPseudoId() -
trunk/Source/WebCore/html/track/VTTCue.cpp
r200696 r200789 120 120 // ---------------------------- 121 121 122 PassRefPtr<VTTCueBox> VTTCueBox::create(Document& document, VTTCue& cue)123 { 124 VTTCueBox * cueBox =new VTTCueBox(document, cue);125 cueBox ->setPseudo(VTTCueBox::vttCueBoxShadowPseudoId());122 Ref<VTTCueBox> VTTCueBox::create(Document& document, VTTCue& cue) 123 { 124 VTTCueBox& cueBox = *new VTTCueBox(document, cue); 125 cueBox.setPseudo(VTTCueBox::vttCueBoxShadowPseudoId()); 126 126 return adoptRef(cueBox); 127 127 } -
trunk/Source/WebCore/html/track/VTTCue.h
r200626 r200789 54 54 class VTTCueBox : public HTMLElement { 55 55 public: 56 static PassRefPtr<VTTCueBox> create(Document&, VTTCue&);56 static Ref<VTTCueBox> create(Document&, VTTCue&); 57 57 58 58 VTTCue* getCue() const; -
trunk/Source/WebCore/page/DOMSelection.cpp
r199969 r200789 345 345 } 346 346 347 PassRefPtr<Range> DOMSelection::getRangeAt(int index, ExceptionCode& ec)348 { 349 if (!m_frame) 350 return 0;347 RefPtr<Range> DOMSelection::getRangeAt(int index, ExceptionCode& ec) 348 { 349 if (!m_frame) 350 return nullptr; 351 351 352 352 if (index < 0 || index >= rangeCount()) { 353 353 ec = INDEX_SIZE_ERR; 354 return 0;354 return nullptr; 355 355 } 356 356 -
trunk/Source/WebCore/page/DOMSelection.h
r199969 r200789 81 81 void collapseToStart(ExceptionCode&); 82 82 void extend(Node&, int offset, ExceptionCode&); 83 PassRefPtr<Range> getRangeAt(int, ExceptionCode&);83 RefPtr<Range> getRangeAt(int, ExceptionCode&); 84 84 void removeAllRanges(); 85 85 void addRange(Range*); -
trunk/Source/WebCore/page/DOMWindow.cpp
r199642 r200789 464 464 } 465 465 466 PassRefPtr<MediaQueryList> DOMWindow::matchMedia(const String& media)467 { 468 return document() ? document()->mediaQueryMatcher().matchMedia(media) : 0;466 RefPtr<MediaQueryList> DOMWindow::matchMedia(const String& media) 467 { 468 return document() ? document()->mediaQueryMatcher().matchMedia(media) : nullptr; 469 469 } 470 470 … … 1406 1406 } 1407 1407 1408 PassRefPtr<StyleMedia> DOMWindow::styleMedia() const1408 RefPtr<StyleMedia> DOMWindow::styleMedia() const 1409 1409 { 1410 1410 if (!isCurrentlyDisplayedInFrame()) … … 1412 1412 if (!m_media) 1413 1413 m_media = StyleMedia::create(m_frame); 1414 return m_media .get();1415 } 1416 1417 PassRefPtr<CSSStyleDeclaration> DOMWindow::getComputedStyle(Element* element, const String& pseudoElt) const1414 return m_media; 1415 } 1416 1417 RefPtr<CSSStyleDeclaration> DOMWindow::getComputedStyle(Element* element, const String& pseudoElt) const 1418 1418 { 1419 1419 if (!element) … … 1423 1423 } 1424 1424 1425 PassRefPtr<CSSRuleList> DOMWindow::getMatchedCSSRules(Element* element, const String& pseudoElement, bool authorOnly) const1426 { 1427 if (!isCurrentlyDisplayedInFrame()) 1428 return 0;1425 RefPtr<CSSRuleList> DOMWindow::getMatchedCSSRules(Element* element, const String& pseudoElement, bool authorOnly) const 1426 { 1427 if (!isCurrentlyDisplayedInFrame()) 1428 return nullptr; 1429 1429 1430 1430 unsigned colonStart = pseudoElement[0] == ':' ? (pseudoElement[1] == ':' ? 2 : 1) : 0; 1431 1431 CSSSelector::PseudoElementType pseudoType = CSSSelector::parsePseudoElementType(pseudoElement.substringSharingImpl(colonStart)); 1432 1432 if (pseudoType == CSSSelector::PseudoElementUnknown && !pseudoElement.isEmpty()) 1433 return 0;1433 return nullptr; 1434 1434 1435 1435 unsigned rulesToInclude = StyleResolver::AuthorCSSRules; … … 1443 1443 auto matchedRules = m_frame->document()->ensureStyleResolver().pseudoStyleRulesForElement(element, pseudoId, rulesToInclude); 1444 1444 if (matchedRules.isEmpty()) 1445 return 0;1445 return nullptr; 1446 1446 1447 1447 RefPtr<StaticCSSRuleList> ruleList = StaticCSSRuleList::create(); … … 1449 1449 ruleList->rules().append(rule->createCSSOMWrapper()); 1450 1450 1451 return ruleList .release();1452 } 1453 1454 PassRefPtr<WebKitPoint> DOMWindow::webkitConvertPointFromNodeToPage(Node* node, const WebKitPoint* p) const1451 return ruleList; 1452 } 1453 1454 RefPtr<WebKitPoint> DOMWindow::webkitConvertPointFromNodeToPage(Node* node, const WebKitPoint* p) const 1455 1455 { 1456 1456 if (!node || !p) 1457 return 0;1457 return nullptr; 1458 1458 1459 1459 if (!document()) 1460 return 0;1460 return nullptr; 1461 1461 1462 1462 document()->updateLayoutIgnorePendingStylesheets(); … … 1467 1467 } 1468 1468 1469 PassRefPtr<WebKitPoint> DOMWindow::webkitConvertPointFromPageToNode(Node* node, const WebKitPoint* p) const1469 RefPtr<WebKitPoint> DOMWindow::webkitConvertPointFromPageToNode(Node* node, const WebKitPoint* p) const 1470 1470 { 1471 1471 if (!node || !p) 1472 return 0;1472 return nullptr; 1473 1473 1474 1474 if (!document()) 1475 return 0;1475 return nullptr; 1476 1476 1477 1477 document()->updateLayoutIgnorePendingStylesheets(); … … 2141 2141 } 2142 2142 2143 PassRefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicString& frameName, const String& windowFeaturesString,2143 RefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicString& frameName, const String& windowFeaturesString, 2144 2144 DOMWindow& activeWindow, DOMWindow& firstWindow) 2145 2145 { -
trunk/Source/WebCore/page/DOMWindow.h
r199112 r200789 124 124 void resumeFromDocumentSuspension(); 125 125 126 PassRefPtr<MediaQueryList> matchMedia(const String&);126 RefPtr<MediaQueryList> matchMedia(const String&); 127 127 128 128 WEBCORE_EXPORT unsigned pendingUnloadEventListeners() const; … … 168 168 void stop(); 169 169 170 WEBCORE_EXPORT PassRefPtr<DOMWindow> open(const String& urlString, const AtomicString& frameName, const String& windowFeaturesString,170 WEBCORE_EXPORT RefPtr<DOMWindow> open(const String& urlString, const AtomicString& frameName, const String& windowFeaturesString, 171 171 DOMWindow& activeWindow, DOMWindow& firstWindow); 172 172 … … 224 224 // CSSOM View Module 225 225 226 PassRefPtr<StyleMedia> styleMedia() const;226 RefPtr<StyleMedia> styleMedia() const; 227 227 228 228 // DOM Level 2 Style Interface 229 229 230 PassRefPtr<CSSStyleDeclaration> getComputedStyle(Element*, const String& pseudoElt) const;230 RefPtr<CSSStyleDeclaration> getComputedStyle(Element*, const String& pseudoElt) const; 231 231 232 232 // WebKit extensions 233 233 234 PassRefPtr<CSSRuleList> getMatchedCSSRules(Element*, const String& pseudoElt, bool authorOnly = true) const;234 RefPtr<CSSRuleList> getMatchedCSSRules(Element*, const String& pseudoElt, bool authorOnly = true) const; 235 235 double devicePixelRatio() const; 236 236 237 PassRefPtr<WebKitPoint> webkitConvertPointFromPageToNode(Node*, const WebKitPoint*) const;238 PassRefPtr<WebKitPoint> webkitConvertPointFromNodeToPage(Node*, const WebKitPoint*) const;237 RefPtr<WebKitPoint> webkitConvertPointFromPageToNode(Node*, const WebKitPoint*) const; 238 RefPtr<WebKitPoint> webkitConvertPointFromNodeToPage(Node*, const WebKitPoint*) const; 239 239 240 240 PageConsoleClient* console() const; -
trunk/Source/WebCore/page/Location.cpp
r190017 r200789 125 125 } 126 126 127 PassRefPtr<DOMStringList> Location::ancestorOrigins() const128 { 129 RefPtr<DOMStringList>origins = DOMStringList::create();130 if (!m_frame) 131 return origins .release();127 Ref<DOMStringList> Location::ancestorOrigins() const 128 { 129 auto origins = DOMStringList::create(); 130 if (!m_frame) 131 return origins; 132 132 for (Frame* frame = m_frame->tree().parent(); frame; frame = frame->tree().parent()) 133 133 origins->append(frame->document()->securityOrigin()->toString()); 134 return origins .release();134 return origins; 135 135 } 136 136 -
trunk/Source/WebCore/page/Location.h
r190017 r200789 74 74 String toString() const { return href(); } 75 75 76 PassRefPtr<DOMStringList> ancestorOrigins() const;76 Ref<DOMStringList> ancestorOrigins() const; 77 77 78 78 private:
Note:
See TracChangeset
for help on using the changeset viewer.