https://bugs.webkit.org/show_bug.cgi?id=121511
Reviewed by Andreas Kling.
Source/WebCore:
* dom/ElementRareData.h:
(WebCore::ElementRareData::setClassList):
* html/ButtonInputType.cpp:
(WebCore::ButtonInputType::create):
* html/ButtonInputType.h:
* html/CheckboxInputType.cpp:
(WebCore::CheckboxInputType::create):
(WebCore::CheckboxInputType::willDispatchClick):
* html/CheckboxInputType.h:
* html/ClassList.cpp:
(WebCore::ClassList::create):
* html/ClassList.h:
* html/ColorInputType.cpp:
(WebCore::ColorInputType::create):
* html/ColorInputType.h:
* html/DateInputType.cpp:
(WebCore::DateInputType::create):
* html/DateInputType.h:
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::create):
* html/DateTimeInputType.h:
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::create):
* html/DateTimeLocalInputType.h:
* html/EmailInputType.cpp:
(WebCore::EmailInputType::create):
* html/EmailInputType.h:
* html/FileInputType.cpp:
(WebCore::FileInputType::create):
* html/FileInputType.h:
* html/FormAssociatedElement.cpp:
(WebCore::FormAttributeTargetObserver::create):
* html/FormController.cpp:
(WebCore::SavedFormState::create):
(WebCore::SavedFormState::deserialize):
(WebCore::FormKeyGenerator::create):
(WebCore::FormController::createSavedFormStateMap):
* html/FormController.h:
(WebCore::FormController::create):
* html/HTMLInputElement.cpp:
(WebCore::ListAttributeTargetObserver::create):
* html/HiddenInputType.cpp:
(WebCore::HiddenInputType::create):
* html/HiddenInputType.h:
* html/ImageInputType.cpp:
(WebCore::ImageInputType::create):
* html/ImageInputType.h:
* html/InputType.cpp:
(WebCore::InputType::create):
(WebCore::InputType::createText):
(WebCore::InputType::willDispatchClick):
* html/InputType.h:
* html/MonthInputType.cpp:
(WebCore::MonthInputType::create):
* html/MonthInputType.h:
* html/NumberInputType.cpp:
(WebCore::NumberInputType::create):
* html/NumberInputType.h:
* html/PasswordInputType.cpp:
(WebCore::PasswordInputType::create):
* html/PasswordInputType.h:
* html/PublicURLManager.h:
(WebCore::PublicURLManager::create):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::create):
(WebCore::RadioInputType::willDispatchClick):
* html/RadioInputType.h:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::create):
* html/RangeInputType.h:
* html/ResetInputType.cpp:
(WebCore::ResetInputType::create):
* html/ResetInputType.h:
* html/SearchInputType.cpp:
(WebCore::SearchInputType::create):
* html/SearchInputType.h:
* html/SubmitInputType.cpp:
(WebCore::SubmitInputType::create):
* html/SubmitInputType.h:
* html/TelephoneInputType.cpp:
(WebCore::TelephoneInputType::create):
* html/TelephoneInputType.h:
* html/TextInputType.cpp:
(WebCore::TextInputType::create):
* html/TextInputType.h:
* html/TimeInputType.cpp:
(WebCore::TimeInputType::create):
* html/TimeInputType.h:
* html/URLInputType.cpp:
(WebCore::URLInputType::create):
* html/URLInputType.h:
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::create):
* html/ValidationMessage.h:
* html/ValidityState.h:
(WebCore::ValidityState::create):
* html/WeekInputType.cpp:
(WebCore::WeekInputType::create):
* html/WeekInputType.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createCompositingBuffer):
* html/canvas/CanvasRenderingContext2D.h:
(WebCore::CanvasRenderingContext2D::create):
* html/canvas/EXTDrawBuffers.cpp:
(WebCore::EXTDrawBuffers::create):
* html/canvas/EXTDrawBuffers.h:
* html/canvas/EXTTextureFilterAnisotropic.cpp:
(WebCore::EXTTextureFilterAnisotropic::create):
* html/canvas/EXTTextureFilterAnisotropic.h:
* html/canvas/OESElementIndexUint.cpp:
(WebCore::OESElementIndexUint::create):
* html/canvas/OESElementIndexUint.h:
* html/canvas/OESStandardDerivatives.cpp:
(WebCore::OESStandardDerivatives::create):
* html/canvas/OESStandardDerivatives.h:
* html/canvas/OESTextureFloat.cpp:
(WebCore::OESTextureFloat::create):
* html/canvas/OESTextureFloat.h:
* html/canvas/OESTextureHalfFloat.cpp:
(WebCore::OESTextureHalfFloat::create):
* html/canvas/OESTextureHalfFloat.h:
* html/canvas/OESVertexArrayObject.cpp:
(WebCore::OESVertexArrayObject::create):
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGLCompressedTextureATC.cpp:
(WebCore::WebGLCompressedTextureATC::create):
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTexturePVRTC.cpp:
(WebCore::WebGLCompressedTexturePVRTC::create):
* html/canvas/WebGLCompressedTexturePVRTC.h:
* html/canvas/WebGLCompressedTextureS3TC.cpp:
(WebCore::WebGLCompressedTextureS3TC::create):
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLDebugRendererInfo.cpp:
(WebCore::WebGLDebugRendererInfo::create):
* html/canvas/WebGLDebugRendererInfo.h:
* html/canvas/WebGLDebugShaders.cpp:
(WebCore::WebGLDebugShaders::create):
* html/canvas/WebGLDebugShaders.h:
* html/canvas/WebGLDepthTexture.cpp:
(WebCore::WebGLDepthTexture::create):
* html/canvas/WebGLDepthTexture.h:
* html/canvas/WebGLLoseContext.cpp:
(WebCore::WebGLLoseContext::create):
* html/canvas/WebGLLoseContext.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
* html/canvas/WebGLRenderingContext.h:
* html/parser/BackgroundHTMLParser.cpp:
(WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
(WebCore::BackgroundHTMLParser::resumeFrom):
* html/parser/BackgroundHTMLParser.h:
(WebCore::BackgroundHTMLParser::create):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
(WebCore::HTMLDocumentParser::validateSpeculations):
(WebCore::HTMLDocumentParser::discardSpeculationsAndResumeFrom):
(WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLElementStack::ElementRecord::ElementRecord):
* html/parser/HTMLElementStack.h:
(WebCore::HTMLElementStack::ElementRecord::releaseNext):
(WebCore::HTMLElementStack::ElementRecord::setNext):
* html/parser/HTMLMetaCharsetParser.h:
(WebCore::HTMLMetaCharsetParser::create):
* html/parser/HTMLParserScheduler.h:
(WebCore::HTMLParserScheduler::create):
* html/parser/HTMLParserThread.h:
(WebCore::HTMLParserThread::create):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::HTMLResourcePreloader::preload):
* html/parser/HTMLResourcePreloader.h:
(WebCore::PreloadRequest::create):
* html/parser/HTMLScriptRunner.h:
(WebCore::HTMLScriptRunner::create):
* html/parser/HTMLToken.h:
(WebCore::HTMLToken::releaseDoctypeData):
* html/parser/HTMLTokenizer.h:
(WebCore::HTMLTokenizer::create):
* html/parser/HTMLTreeBuilder.h:
(WebCore::HTMLTreeBuilder::create):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterToken):
* html/parser/XSSAuditor.h:
* html/parser/XSSAuditorDelegate.h:
(WebCore::XSSInfo::create):
* html/track/WebVTTParser.h:
(WebCore::WebVTTParser::create):
* html/track/WebVTTTokenizer.h:
(WebCore::WebVTTTokenizer::create):
Source/WTF:
Make operator= work work for different types of OwnPtrs.
* wtf/OwnPtr.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156004
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-09-17 Anders Carlsson <andersca@apple.com>
+
+ Stop explicitly using PassOwnPtr in WebCore/html
+ https://bugs.webkit.org/show_bug.cgi?id=121511
+
+ Reviewed by Andreas Kling.
+
+ Make operator= work work for different types of OwnPtrs.
+
+ * wtf/OwnPtr.h:
+
2013-09-17 Sam Weinig <sam@webkit.org>
Add make_unique and start using it
return *this;
}
-#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
template<typename T> inline OwnPtr<T>::OwnPtr(OwnPtr<T>&& o)
: m_ptr(o.leakPtr())
{
{
}
- template<typename T> inline OwnPtr<T>& OwnPtr<T>::operator=(OwnPtr<T>&& o)
+ template<typename T> inline auto OwnPtr<T>::operator=(OwnPtr&& o) -> OwnPtr&
{
ASSERT(!o || o != m_ptr);
- auto ptr = std::move(o);
+ OwnPtr ptr = std::move(o);
swap(ptr);
return *this;
}
- template<typename T> template<typename U> inline OwnPtr<T>& OwnPtr<T>::operator=(OwnPtr<U>&& o)
+ template<typename T> template<typename U> inline auto OwnPtr<T>::operator=(OwnPtr<U>&& o) -> OwnPtr&
{
ASSERT(!o || o != m_ptr);
- auto ptr = std::move(o);
+ OwnPtr ptr = std::move(o);
swap(ptr);
return *this;
}
-#endif
template<typename T> inline void swap(OwnPtr<T>& a, OwnPtr<T>& b)
{
+2013-09-17 Anders Carlsson <andersca@apple.com>
+
+ Stop explicitly using PassOwnPtr in WebCore/html
+ https://bugs.webkit.org/show_bug.cgi?id=121511
+
+ Reviewed by Andreas Kling.
+
+ * dom/ElementRareData.h:
+ (WebCore::ElementRareData::setClassList):
+ * html/ButtonInputType.cpp:
+ (WebCore::ButtonInputType::create):
+ * html/ButtonInputType.h:
+ * html/CheckboxInputType.cpp:
+ (WebCore::CheckboxInputType::create):
+ (WebCore::CheckboxInputType::willDispatchClick):
+ * html/CheckboxInputType.h:
+ * html/ClassList.cpp:
+ (WebCore::ClassList::create):
+ * html/ClassList.h:
+ * html/ColorInputType.cpp:
+ (WebCore::ColorInputType::create):
+ * html/ColorInputType.h:
+ * html/DateInputType.cpp:
+ (WebCore::DateInputType::create):
+ * html/DateInputType.h:
+ * html/DateTimeInputType.cpp:
+ (WebCore::DateTimeInputType::create):
+ * html/DateTimeInputType.h:
+ * html/DateTimeLocalInputType.cpp:
+ (WebCore::DateTimeLocalInputType::create):
+ * html/DateTimeLocalInputType.h:
+ * html/EmailInputType.cpp:
+ (WebCore::EmailInputType::create):
+ * html/EmailInputType.h:
+ * html/FileInputType.cpp:
+ (WebCore::FileInputType::create):
+ * html/FileInputType.h:
+ * html/FormAssociatedElement.cpp:
+ (WebCore::FormAttributeTargetObserver::create):
+ * html/FormController.cpp:
+ (WebCore::SavedFormState::create):
+ (WebCore::SavedFormState::deserialize):
+ (WebCore::FormKeyGenerator::create):
+ (WebCore::FormController::createSavedFormStateMap):
+ * html/FormController.h:
+ (WebCore::FormController::create):
+ * html/HTMLInputElement.cpp:
+ (WebCore::ListAttributeTargetObserver::create):
+ * html/HiddenInputType.cpp:
+ (WebCore::HiddenInputType::create):
+ * html/HiddenInputType.h:
+ * html/ImageInputType.cpp:
+ (WebCore::ImageInputType::create):
+ * html/ImageInputType.h:
+ * html/InputType.cpp:
+ (WebCore::InputType::create):
+ (WebCore::InputType::createText):
+ (WebCore::InputType::willDispatchClick):
+ * html/InputType.h:
+ * html/MonthInputType.cpp:
+ (WebCore::MonthInputType::create):
+ * html/MonthInputType.h:
+ * html/NumberInputType.cpp:
+ (WebCore::NumberInputType::create):
+ * html/NumberInputType.h:
+ * html/PasswordInputType.cpp:
+ (WebCore::PasswordInputType::create):
+ * html/PasswordInputType.h:
+ * html/PublicURLManager.h:
+ (WebCore::PublicURLManager::create):
+ * html/RadioInputType.cpp:
+ (WebCore::RadioInputType::create):
+ (WebCore::RadioInputType::willDispatchClick):
+ * html/RadioInputType.h:
+ * html/RangeInputType.cpp:
+ (WebCore::RangeInputType::create):
+ * html/RangeInputType.h:
+ * html/ResetInputType.cpp:
+ (WebCore::ResetInputType::create):
+ * html/ResetInputType.h:
+ * html/SearchInputType.cpp:
+ (WebCore::SearchInputType::create):
+ * html/SearchInputType.h:
+ * html/SubmitInputType.cpp:
+ (WebCore::SubmitInputType::create):
+ * html/SubmitInputType.h:
+ * html/TelephoneInputType.cpp:
+ (WebCore::TelephoneInputType::create):
+ * html/TelephoneInputType.h:
+ * html/TextInputType.cpp:
+ (WebCore::TextInputType::create):
+ * html/TextInputType.h:
+ * html/TimeInputType.cpp:
+ (WebCore::TimeInputType::create):
+ * html/TimeInputType.h:
+ * html/URLInputType.cpp:
+ (WebCore::URLInputType::create):
+ * html/URLInputType.h:
+ * html/ValidationMessage.cpp:
+ (WebCore::ValidationMessage::create):
+ * html/ValidationMessage.h:
+ * html/ValidityState.h:
+ (WebCore::ValidityState::create):
+ * html/WeekInputType.cpp:
+ (WebCore::WeekInputType::create):
+ * html/WeekInputType.h:
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::createCompositingBuffer):
+ * html/canvas/CanvasRenderingContext2D.h:
+ (WebCore::CanvasRenderingContext2D::create):
+ * html/canvas/EXTDrawBuffers.cpp:
+ (WebCore::EXTDrawBuffers::create):
+ * html/canvas/EXTDrawBuffers.h:
+ * html/canvas/EXTTextureFilterAnisotropic.cpp:
+ (WebCore::EXTTextureFilterAnisotropic::create):
+ * html/canvas/EXTTextureFilterAnisotropic.h:
+ * html/canvas/OESElementIndexUint.cpp:
+ (WebCore::OESElementIndexUint::create):
+ * html/canvas/OESElementIndexUint.h:
+ * html/canvas/OESStandardDerivatives.cpp:
+ (WebCore::OESStandardDerivatives::create):
+ * html/canvas/OESStandardDerivatives.h:
+ * html/canvas/OESTextureFloat.cpp:
+ (WebCore::OESTextureFloat::create):
+ * html/canvas/OESTextureFloat.h:
+ * html/canvas/OESTextureHalfFloat.cpp:
+ (WebCore::OESTextureHalfFloat::create):
+ * html/canvas/OESTextureHalfFloat.h:
+ * html/canvas/OESVertexArrayObject.cpp:
+ (WebCore::OESVertexArrayObject::create):
+ * html/canvas/OESVertexArrayObject.h:
+ * html/canvas/WebGLCompressedTextureATC.cpp:
+ (WebCore::WebGLCompressedTextureATC::create):
+ * html/canvas/WebGLCompressedTextureATC.h:
+ * html/canvas/WebGLCompressedTexturePVRTC.cpp:
+ (WebCore::WebGLCompressedTexturePVRTC::create):
+ * html/canvas/WebGLCompressedTexturePVRTC.h:
+ * html/canvas/WebGLCompressedTextureS3TC.cpp:
+ (WebCore::WebGLCompressedTextureS3TC::create):
+ * html/canvas/WebGLCompressedTextureS3TC.h:
+ * html/canvas/WebGLDebugRendererInfo.cpp:
+ (WebCore::WebGLDebugRendererInfo::create):
+ * html/canvas/WebGLDebugRendererInfo.h:
+ * html/canvas/WebGLDebugShaders.cpp:
+ (WebCore::WebGLDebugShaders::create):
+ * html/canvas/WebGLDebugShaders.h:
+ * html/canvas/WebGLDepthTexture.cpp:
+ (WebCore::WebGLDepthTexture::create):
+ * html/canvas/WebGLDepthTexture.h:
+ * html/canvas/WebGLLoseContext.cpp:
+ (WebCore::WebGLLoseContext::create):
+ * html/canvas/WebGLLoseContext.h:
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::create):
+ * html/canvas/WebGLRenderingContext.h:
+ * html/parser/BackgroundHTMLParser.cpp:
+ (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
+ (WebCore::BackgroundHTMLParser::resumeFrom):
+ * html/parser/BackgroundHTMLParser.h:
+ (WebCore::BackgroundHTMLParser::create):
+ * html/parser/HTMLDocumentParser.cpp:
+ (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
+ (WebCore::HTMLDocumentParser::validateSpeculations):
+ (WebCore::HTMLDocumentParser::discardSpeculationsAndResumeFrom):
+ (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
+ * html/parser/HTMLDocumentParser.h:
+ * html/parser/HTMLElementStack.cpp:
+ (WebCore::HTMLElementStack::ElementRecord::ElementRecord):
+ * html/parser/HTMLElementStack.h:
+ (WebCore::HTMLElementStack::ElementRecord::releaseNext):
+ (WebCore::HTMLElementStack::ElementRecord::setNext):
+ * html/parser/HTMLMetaCharsetParser.h:
+ (WebCore::HTMLMetaCharsetParser::create):
+ * html/parser/HTMLParserScheduler.h:
+ (WebCore::HTMLParserScheduler::create):
+ * html/parser/HTMLParserThread.h:
+ (WebCore::HTMLParserThread::create):
+ * html/parser/HTMLPreloadScanner.cpp:
+ (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
+ * html/parser/HTMLResourcePreloader.cpp:
+ (WebCore::HTMLResourcePreloader::preload):
+ * html/parser/HTMLResourcePreloader.h:
+ (WebCore::PreloadRequest::create):
+ * html/parser/HTMLScriptRunner.h:
+ (WebCore::HTMLScriptRunner::create):
+ * html/parser/HTMLToken.h:
+ (WebCore::HTMLToken::releaseDoctypeData):
+ * html/parser/HTMLTokenizer.h:
+ (WebCore::HTMLTokenizer::create):
+ * html/parser/HTMLTreeBuilder.h:
+ (WebCore::HTMLTreeBuilder::create):
+ * html/parser/XSSAuditor.cpp:
+ (WebCore::XSSAuditor::filterToken):
+ * html/parser/XSSAuditor.h:
+ * html/parser/XSSAuditorDelegate.h:
+ (WebCore::XSSInfo::create):
+ * html/track/WebVTTParser.h:
+ (WebCore::WebVTTParser::create):
+ * html/track/WebVTTTokenizer.h:
+ (WebCore::WebVTTTokenizer::create):
+
2013-09-17 Enrica Casucci <enrica@apple.com>
Upstream changes to WebHTMLConverter to support HTML
void setComputedStyle(PassRefPtr<RenderStyle> computedStyle) { m_computedStyle = computedStyle; }
ClassList* classList() const { return m_classList.get(); }
- void setClassList(PassOwnPtr<ClassList> classList) { m_classList = classList; }
+ void setClassList(OwnPtr<ClassList> classList) { m_classList = std::move(classList); }
void clearClassListValueForQuirksMode()
{
if (!m_classList)
namespace WebCore {
-PassOwnPtr<InputType> ButtonInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> ButtonInputType::create(HTMLInputElement& element)
{
return adoptPtr(new ButtonInputType(element));
}
class ButtonInputType : public BaseButtonInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
ButtonInputType(HTMLInputElement& element) : BaseButtonInputType(element) { }
namespace WebCore {
-PassOwnPtr<InputType> CheckboxInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> CheckboxInputType::create(HTMLInputElement& element)
{
return adoptPtr(new CheckboxInputType(element));
}
dispatchSimulatedClickIfActive(event);
}
-PassOwnPtr<ClickHandlingState> CheckboxInputType::willDispatchClick()
+OwnPtr<ClickHandlingState> CheckboxInputType::willDispatchClick()
{
// An event handler can use preventDefault or "return false" to reverse the checking we do here.
// The ClickHandlingState object contains what we need to undo what we did here in didDispatchClick.
class CheckboxInputType : public BaseCheckableInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
CheckboxInputType(HTMLInputElement& element) : BaseCheckableInputType(element) { }
virtual bool valueMissing(const String&) const OVERRIDE;
virtual String valueMissingText() const OVERRIDE;
virtual void handleKeyupEvent(KeyboardEvent*) OVERRIDE;
- virtual PassOwnPtr<ClickHandlingState> willDispatchClick() OVERRIDE;
+ virtual OwnPtr<ClickHandlingState> willDispatchClick() OVERRIDE;
virtual void didDispatchClick(Event*, const ClickHandlingState&) OVERRIDE;
virtual bool isCheckbox() const OVERRIDE;
virtual bool supportsIndeterminateAppearance() const OVERRIDE;
namespace WebCore {
-PassOwnPtr<ClassList> ClassList::create(Element* element)
+OwnPtr<ClassList> ClassList::create(Element* element)
{
return adoptPtr(new ClassList(element));
}
class ClassList : public DOMTokenList {
public:
- static PassOwnPtr<ClassList> create(Element*);
+ static OwnPtr<ClassList> create(Element*);
virtual void ref() OVERRIDE FINAL;
virtual void deref() OVERRIDE FINAL;
return color.isValid() && !color.hasAlpha();
}
-PassOwnPtr<InputType> ColorInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> ColorInputType::create(HTMLInputElement& element)
{
return adoptPtr(new ColorInputType(element));
}
class ColorInputType : public BaseClickableWithKeyInputType, public ColorChooserClient {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
virtual ~ColorInputType();
// ColorChooserClient implementation.
{
}
-PassOwnPtr<InputType> DateInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> DateInputType::create(HTMLInputElement& element)
{
return adoptPtr(new DateInputType(element));
}
class DateInputType : public BaseChooserOnlyDateAndTimeInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit DateInputType(HTMLInputElement&);
static const int dateTimeDefaultStepBase = 0;
static const int dateTimeStepScaleFactor = 1000;
-PassOwnPtr<InputType> DateTimeInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> DateTimeInputType::create(HTMLInputElement& element)
{
return adoptPtr(new DateTimeInputType(element));
}
class DateTimeInputType : public BaseChooserOnlyDateAndTimeInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit DateTimeInputType(HTMLInputElement& element) : BaseDateTimeInputType(element) { }
static const int dateTimeLocalDefaultStepBase = 0;
static const int dateTimeLocalStepScaleFactor = 1000;
-PassOwnPtr<InputType> DateTimeLocalInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> DateTimeLocalInputType::create(HTMLInputElement& element)
{
return adoptPtr(new DateTimeLocalInputType(element));
}
class DateTimeLocalInputType : public BaseChooserOnlyDateAndTimeInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit DateTimeLocalInputType(HTMLInputElement& element) : BaseDateTimeLocalInputType(element) { }
return !matchOffset && matchLength == addressLength;
}
-PassOwnPtr<InputType> EmailInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> EmailInputType::create(HTMLInputElement& element)
{
return adoptPtr(new EmailInputType(element));
}
class EmailInputType : public BaseTextInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit EmailInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
return pseudoId;
}
-PassOwnPtr<InputType> FileInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> FileInputType::create(HTMLInputElement& element)
{
return adoptPtr(new FileInputType(element));
}
class FileInputType : public BaseClickableWithKeyInputType, private FileChooserClient, private FileIconLoaderClient {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
virtual ~FileInputType();
static Vector<FileChooserFileInfo> filesFromFormControlState(const FormControlState&);
class FormAttributeTargetObserver : IdTargetObserver {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<FormAttributeTargetObserver> create(const AtomicString& id, FormAssociatedElement*);
+ static OwnPtr<FormAttributeTargetObserver> create(const AtomicString& id, FormAssociatedElement*);
virtual void idTargetChanged() OVERRIDE;
private:
return false;
}
-PassOwnPtr<FormAttributeTargetObserver> FormAttributeTargetObserver::create(const AtomicString& id, FormAssociatedElement* element)
+OwnPtr<FormAttributeTargetObserver> FormAttributeTargetObserver::create(const AtomicString& id, FormAssociatedElement* element)
{
return adoptPtr(new FormAttributeTargetObserver(id, element));
}
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<SavedFormState> create();
- static PassOwnPtr<SavedFormState> deserialize(const Vector<String>&, size_t& index);
+ static OwnPtr<SavedFormState> create();
+ static OwnPtr<SavedFormState> deserialize(const Vector<String>&, size_t& index);
void serializeTo(Vector<String>&) const;
bool isEmpty() const { return m_stateForNewFormElements.isEmpty(); }
void appendControlState(const AtomicString& name, const AtomicString& type, const FormControlState&);
size_t m_controlStateCount;
};
-PassOwnPtr<SavedFormState> SavedFormState::create()
+OwnPtr<SavedFormState> SavedFormState::create()
{
return adoptPtr(new SavedFormState);
}
return ch != '-' && (ch > 'z' || ch < 'a');
}
-PassOwnPtr<SavedFormState> SavedFormState::deserialize(const Vector<String>& stateVector, size_t& index)
+OwnPtr<SavedFormState> SavedFormState::deserialize(const Vector<String>& stateVector, size_t& index)
{
if (index >= stateVector.size())
return nullptr;
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<FormKeyGenerator> create() { return adoptPtr(new FormKeyGenerator); }
+ static OwnPtr<FormKeyGenerator> create() { return adoptPtr(new FormKeyGenerator); }
AtomicString formKey(const HTMLFormControlElementWithState&);
void willDeleteForm(HTMLFormElement*);
return signature;
}
-PassOwnPtr<FormController::SavedFormStateMap> FormController::createSavedFormStateMap(const FormElementListHashSet& controlList)
+OwnPtr<FormController::SavedFormStateMap> FormController::createSavedFormStateMap(const FormElementListHashSet& controlList)
{
OwnPtr<FormKeyGenerator> keyGenerator = FormKeyGenerator::create();
OwnPtr<SavedFormStateMap> stateMap = adoptPtr(new SavedFormStateMap);
class FormController {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<FormController> create()
+ static OwnPtr<FormController> create()
{
return adoptPtr(new FormController);
}
typedef HashMap<RefPtr<AtomicStringImpl>, OwnPtr<SavedFormState> > SavedFormStateMap;
FormController();
- static PassOwnPtr<SavedFormStateMap> createSavedFormStateMap(const FormElementListHashSet&);
+ static OwnPtr<SavedFormStateMap> createSavedFormStateMap(const FormElementListHashSet&);
FormControlState takeStateForFormElement(const HTMLFormControlElementWithState&);
static void formStatesFromStateVector(const Vector<String>&, SavedFormStateMap&);
class ListAttributeTargetObserver : IdTargetObserver {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<ListAttributeTargetObserver> create(const AtomicString& id, HTMLInputElement*);
+ static OwnPtr<ListAttributeTargetObserver> create(const AtomicString& id, HTMLInputElement*);
virtual void idTargetChanged() OVERRIDE;
private:
}
#if ENABLE(DATALIST_ELEMENT)
-PassOwnPtr<ListAttributeTargetObserver> ListAttributeTargetObserver::create(const AtomicString& id, HTMLInputElement* element)
+OwnPtr<ListAttributeTargetObserver> ListAttributeTargetObserver::create(const AtomicString& id, HTMLInputElement* element)
{
return adoptPtr(new ListAttributeTargetObserver(id, element));
}
using namespace HTMLNames;
-PassOwnPtr<InputType> HiddenInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> HiddenInputType::create(HTMLInputElement& element)
{
return adoptPtr(new HiddenInputType(element));
}
class HiddenInputType : public InputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit HiddenInputType(HTMLInputElement& element) : InputType(element) { }
{
}
-PassOwnPtr<InputType> ImageInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> ImageInputType::create(HTMLInputElement& element)
{
return adoptPtr(new ImageInputType(element));
}
class ImageInputType : public BaseButtonInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit ImageInputType(HTMLInputElement&);
using namespace HTMLNames;
using namespace std;
-typedef PassOwnPtr<InputType> (*InputTypeFactoryFunction)(HTMLInputElement&);
+typedef OwnPtr<InputType> (*InputTypeFactoryFunction)(HTMLInputElement&);
typedef HashMap<AtomicString, InputTypeFactoryFunction, CaseFoldingHash> InputTypeFactoryMap;
static OwnPtr<InputTypeFactoryMap> createInputTypeFactoryMap()
return map;
}
-PassOwnPtr<InputType> InputType::create(HTMLInputElement& element, const AtomicString& typeName)
+OwnPtr<InputType> InputType::create(HTMLInputElement& element, const AtomicString& typeName)
{
static const InputTypeFactoryMap* factoryMap = createInputTypeFactoryMap().leakPtr();
- PassOwnPtr<InputType> (*factory)(HTMLInputElement&) = typeName.isEmpty() ? 0 : factoryMap->get(typeName);
+ OwnPtr<InputType> (*factory)(HTMLInputElement&) = typeName.isEmpty() ? 0 : factoryMap->get(typeName);
if (!factory)
factory = TextInputType::create;
return factory(element);
}
-PassOwnPtr<InputType> InputType::createText(HTMLInputElement& element)
+OwnPtr<InputType> InputType::createText(HTMLInputElement& element)
{
return TextInputType::create(element);
}
return true;
}
-PassOwnPtr<ClickHandlingState> InputType::willDispatchClick()
+OwnPtr<ClickHandlingState> InputType::willDispatchClick()
{
return nullptr;
}
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&, const AtomicString&);
- static PassOwnPtr<InputType> createText(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&, const AtomicString&);
+ static OwnPtr<InputType> createText(HTMLInputElement&);
virtual ~InputType();
static bool themeSupportsDataListUI(InputType*);
virtual void handleClickEvent(MouseEvent*);
virtual void handleMouseDownEvent(MouseEvent*);
- virtual PassOwnPtr<ClickHandlingState> willDispatchClick();
+ virtual OwnPtr<ClickHandlingState> willDispatchClick();
virtual void didDispatchClick(Event*, const ClickHandlingState&);
virtual void handleDOMActivateEvent(Event*);
virtual void handleKeydownEvent(KeyboardEvent*);
static const int monthDefaultStepBase = 0;
static const int monthStepScaleFactor = 1;
-PassOwnPtr<InputType> MonthInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> MonthInputType::create(HTMLInputElement& element)
{
return adoptPtr(new MonthInputType(element));
}
class MonthInputType : public BaseChooserOnlyDateAndTimeInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit MonthInputType(HTMLInputElement& element) : BaseMonthInputType(element) { }
return RealNumberRenderSize(sizeOfSign + sizeOfZero , numberOfZeroAfterDecimalPoint + sizeOfDigits);
}
-PassOwnPtr<InputType> NumberInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> NumberInputType::create(HTMLInputElement& element)
{
return adoptPtr(new NumberInputType(element));
}
class NumberInputType : public TextFieldInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
NumberInputType(HTMLInputElement& element) : TextFieldInputType(element) { }
namespace WebCore {
-PassOwnPtr<InputType> PasswordInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> PasswordInputType::create(HTMLInputElement& element)
{
return adoptPtr(new PasswordInputType(element));
}
class PasswordInputType : public BaseTextInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
PasswordInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
class PublicURLManager {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURLManager); }
+ static OwnPtr<PublicURLManager> create() { return adoptPtr(new PublicURLManager); }
void contextDestroyed()
{
HashSet<String>::iterator blobURLsEnd = m_blobURLs.end();
using namespace HTMLNames;
-PassOwnPtr<InputType> RadioInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> RadioInputType::create(HTMLInputElement& element)
{
return adoptPtr(new RadioInputType(element));
}
return element().checked();
}
-PassOwnPtr<ClickHandlingState> RadioInputType::willDispatchClick()
+OwnPtr<ClickHandlingState> RadioInputType::willDispatchClick()
{
// An event handler can use preventDefault or "return false" to reverse the selection we do here.
// The ClickHandlingState object contains what we need to undo what we did here in didDispatchClick.
class RadioInputType : public BaseCheckableInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit RadioInputType(HTMLInputElement& element) : BaseCheckableInputType(element) { }
virtual void handleKeyupEvent(KeyboardEvent*) OVERRIDE;
virtual bool isKeyboardFocusable(KeyboardEvent*) const OVERRIDE;
virtual bool shouldSendChangeEventAfterCheckedChanged() OVERRIDE;
- virtual PassOwnPtr<ClickHandlingState> willDispatchClick() OVERRIDE;
+ virtual OwnPtr<ClickHandlingState> willDispatchClick() OVERRIDE;
virtual void didDispatchClick(Event*, const ClickHandlingState&) OVERRIDE;
virtual bool isRadioButton() const OVERRIDE;
virtual bool supportsIndeterminateAppearance() const OVERRIDE;
return proposedValue >= minimum ? proposedValue : std::max(minimum, fallbackValue);
}
-PassOwnPtr<InputType> RangeInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> RangeInputType::create(HTMLInputElement& element)
{
return adoptPtr(new RangeInputType(element));
}
class RangeInputType : public InputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit RangeInputType(HTMLInputElement&);
namespace WebCore {
-PassOwnPtr<InputType> ResetInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> ResetInputType::create(HTMLInputElement& element)
{
return adoptPtr(new ResetInputType(element));
}
class ResetInputType : public BaseButtonInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit ResetInputType(HTMLInputElement& element) : BaseButtonInputType(element) { }
{
}
-PassOwnPtr<InputType> SearchInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> SearchInputType::create(HTMLInputElement& element)
{
return adoptPtr(new SearchInputType(element));
}
class SearchInputType : public BaseTextInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
void stopSearchEventTimer();
namespace WebCore {
-PassOwnPtr<InputType> SubmitInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> SubmitInputType::create(HTMLInputElement& element)
{
return adoptPtr(new SubmitInputType(element));
}
class SubmitInputType : public BaseButtonInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit SubmitInputType(HTMLInputElement& element) : BaseButtonInputType(element) { }
namespace WebCore {
-PassOwnPtr<InputType> TelephoneInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> TelephoneInputType::create(HTMLInputElement& element)
{
return adoptPtr(new TelephoneInputType(element));
}
class TelephoneInputType : public BaseTextInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit TelephoneInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
using namespace HTMLNames;
-PassOwnPtr<InputType> TextInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> TextInputType::create(HTMLInputElement& element)
{
return adoptPtr(new TextInputType(element));
}
class TextInputType : public BaseTextInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit TextInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
{
}
-PassOwnPtr<InputType> TimeInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> TimeInputType::create(HTMLInputElement& element)
{
return adoptPtr(new TimeInputType(element));
}
class TimeInputType : public BaseChooserOnlyDateAndTimeInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit TimeInputType(HTMLInputElement&);
namespace WebCore {
-PassOwnPtr<InputType> URLInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> URLInputType::create(HTMLInputElement& element)
{
return adoptPtr(new URLInputType(element));
}
class URLInputType : public BaseTextInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit URLInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
deleteBubbleTree();
}
-PassOwnPtr<ValidationMessage> ValidationMessage::create(HTMLFormControlElement* element)
+OwnPtr<ValidationMessage> ValidationMessage::create(HTMLFormControlElement* element)
{
return adoptPtr(new ValidationMessage(element));
}
class ValidationMessage {
WTF_MAKE_NONCOPYABLE(ValidationMessage); WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<ValidationMessage> create(HTMLFormControlElement*);
+ static OwnPtr<ValidationMessage> create(HTMLFormControlElement*);
~ValidationMessage();
void updateValidationMessage(const String&);
void requestToHideMessage();
class ValidityState : public ScriptWrappable {
WTF_MAKE_NONCOPYABLE(ValidityState); WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<ValidityState> create(FormAssociatedElement* control)
+ static OwnPtr<ValidityState> create(FormAssociatedElement* control)
{
return adoptPtr(new ValidityState(control));
}
static const int weekDefaultStep = 1;
static const int weekStepScaleFactor = 604800000;
-PassOwnPtr<InputType> WeekInputType::create(HTMLInputElement& element)
+OwnPtr<InputType> WeekInputType::create(HTMLInputElement& element)
{
return adoptPtr(new WeekInputType(element));
}
class WeekInputType : public BaseChooserOnlyDateAndTimeInputType {
public:
- static PassOwnPtr<InputType> create(HTMLInputElement&);
+ static OwnPtr<InputType> create(HTMLInputElement&);
private:
explicit WeekInputType(HTMLInputElement& element) : BaseChooserOnlyDateAndTimeInputType(element) { }
return bufferRect;
}
-PassOwnPtr<ImageBuffer> CanvasRenderingContext2D::createCompositingBuffer(const IntRect& bufferRect)
+OwnPtr<ImageBuffer> CanvasRenderingContext2D::createCompositingBuffer(const IntRect& bufferRect)
{
RenderingMode renderMode = isAccelerated() ? Accelerated : Unaccelerated;
return ImageBuffer::create(bufferRect.size(), 1, ColorSpaceDeviceRGB, renderMode);
class CanvasRenderingContext2D : public CanvasRenderingContext, public CanvasPathMethods {
public:
- static PassOwnPtr<CanvasRenderingContext2D> create(HTMLCanvasElement* canvas, bool usesCSSCompatibilityParseMode, bool usesDashboardCompatibilityMode)
+ static OwnPtr<CanvasRenderingContext2D> create(HTMLCanvasElement* canvas, bool usesCSSCompatibilityParseMode, bool usesDashboardCompatibilityMode)
{
return adoptPtr(new CanvasRenderingContext2D(canvas, usesCSSCompatibilityParseMode, usesDashboardCompatibilityMode));
}
bool rectContainsCanvas(const FloatRect&) const;
template<class T> IntRect calculateCompositingBufferRect(const T&, IntSize*);
- PassOwnPtr<ImageBuffer> createCompositingBuffer(const IntRect&);
+ OwnPtr<ImageBuffer> createCompositingBuffer(const IntRect&);
void compositeBuffer(ImageBuffer*, const IntRect&, CompositeOperator);
void inflateStrokeRect(FloatRect&) const;
return WebGLExtension::EXTDrawBuffersName;
}
-PassOwnPtr<EXTDrawBuffers> EXTDrawBuffers::create(WebGLRenderingContext* context)
+OwnPtr<EXTDrawBuffers> EXTDrawBuffers::create(WebGLRenderingContext* context)
{
return adoptPtr(new EXTDrawBuffers(context));
}
class EXTDrawBuffers : public WebGLExtension {
public:
- static PassOwnPtr<EXTDrawBuffers> create(WebGLRenderingContext*);
+ static OwnPtr<EXTDrawBuffers> create(WebGLRenderingContext*);
static bool supported(WebGLRenderingContext*);
return EXTTextureFilterAnisotropicName;
}
-PassOwnPtr<EXTTextureFilterAnisotropic> EXTTextureFilterAnisotropic::create(WebGLRenderingContext* context)
+OwnPtr<EXTTextureFilterAnisotropic> EXTTextureFilterAnisotropic::create(WebGLRenderingContext* context)
{
return adoptPtr(new EXTTextureFilterAnisotropic(context));
}
class EXTTextureFilterAnisotropic : public WebGLExtension {
public:
- static PassOwnPtr<EXTTextureFilterAnisotropic> create(WebGLRenderingContext*);
+ static OwnPtr<EXTTextureFilterAnisotropic> create(WebGLRenderingContext*);
virtual ~EXTTextureFilterAnisotropic();
virtual ExtensionName getName() const;
return OESElementIndexUintName;
}
-PassOwnPtr<OESElementIndexUint> OESElementIndexUint::create(WebGLRenderingContext* context)
+OwnPtr<OESElementIndexUint> OESElementIndexUint::create(WebGLRenderingContext* context)
{
return adoptPtr(new OESElementIndexUint(context));
}
class OESElementIndexUint : public WebGLExtension {
public:
- static PassOwnPtr<OESElementIndexUint> create(WebGLRenderingContext*);
+ static OwnPtr<OESElementIndexUint> create(WebGLRenderingContext*);
virtual ~OESElementIndexUint();
virtual ExtensionName getName() const;
return OESStandardDerivativesName;
}
-PassOwnPtr<OESStandardDerivatives> OESStandardDerivatives::create(WebGLRenderingContext* context)
+OwnPtr<OESStandardDerivatives> OESStandardDerivatives::create(WebGLRenderingContext* context)
{
return adoptPtr(new OESStandardDerivatives(context));
}
class OESStandardDerivatives : public WebGLExtension {
public:
- static PassOwnPtr<OESStandardDerivatives> create(WebGLRenderingContext*);
+ static OwnPtr<OESStandardDerivatives> create(WebGLRenderingContext*);
virtual ~OESStandardDerivatives();
virtual ExtensionName getName() const;
return OESTextureFloatName;
}
-PassOwnPtr<OESTextureFloat> OESTextureFloat::create(WebGLRenderingContext* context)
+OwnPtr<OESTextureFloat> OESTextureFloat::create(WebGLRenderingContext* context)
{
return adoptPtr(new OESTextureFloat(context));
}
class OESTextureFloat : public WebGLExtension {
public:
- static PassOwnPtr<OESTextureFloat> create(WebGLRenderingContext*);
+ static OwnPtr<OESTextureFloat> create(WebGLRenderingContext*);
virtual ~OESTextureFloat();
virtual ExtensionName getName() const;
return OESTextureHalfFloatName;
}
-PassOwnPtr<OESTextureHalfFloat> OESTextureHalfFloat::create(WebGLRenderingContext* context)
+OwnPtr<OESTextureHalfFloat> OESTextureHalfFloat::create(WebGLRenderingContext* context)
{
return adoptPtr(new OESTextureHalfFloat(context));
}
class OESTextureHalfFloat : public WebGLExtension {
public:
- static PassOwnPtr<OESTextureHalfFloat> create(WebGLRenderingContext*);
+ static OwnPtr<OESTextureHalfFloat> create(WebGLRenderingContext*);
virtual ~OESTextureHalfFloat();
virtual ExtensionName getName() const;
return OESVertexArrayObjectName;
}
-PassOwnPtr<OESVertexArrayObject> OESVertexArrayObject::create(WebGLRenderingContext* context)
+OwnPtr<OESVertexArrayObject> OESVertexArrayObject::create(WebGLRenderingContext* context)
{
return adoptPtr(new OESVertexArrayObject(context));
}
class OESVertexArrayObject : public WebGLExtension {
public:
- static PassOwnPtr<OESVertexArrayObject> create(WebGLRenderingContext*);
+ static OwnPtr<OESVertexArrayObject> create(WebGLRenderingContext*);
virtual ~OESVertexArrayObject();
virtual ExtensionName getName() const;
return WebGLCompressedTextureATCName;
}
-PassOwnPtr<WebGLCompressedTextureATC> WebGLCompressedTextureATC::create(WebGLRenderingContext* context)
+OwnPtr<WebGLCompressedTextureATC> WebGLCompressedTextureATC::create(WebGLRenderingContext* context)
{
return adoptPtr(new WebGLCompressedTextureATC(context));
}
class WebGLCompressedTextureATC : public WebGLExtension {
public:
- static PassOwnPtr<WebGLCompressedTextureATC> create(WebGLRenderingContext*);
+ static OwnPtr<WebGLCompressedTextureATC> create(WebGLRenderingContext*);
static bool supported(WebGLRenderingContext*);
return WebGLCompressedTexturePVRTCName;
}
-PassOwnPtr<WebGLCompressedTexturePVRTC> WebGLCompressedTexturePVRTC::create(WebGLRenderingContext* context)
+OwnPtr<WebGLCompressedTexturePVRTC> WebGLCompressedTexturePVRTC::create(WebGLRenderingContext* context)
{
return adoptPtr(new WebGLCompressedTexturePVRTC(context));
}
class WebGLCompressedTexturePVRTC : public WebGLExtension {
public:
- static PassOwnPtr<WebGLCompressedTexturePVRTC> create(WebGLRenderingContext*);
+ static OwnPtr<WebGLCompressedTexturePVRTC> create(WebGLRenderingContext*);
static bool supported(WebGLRenderingContext*);
return WebGLCompressedTextureS3TCName;
}
-PassOwnPtr<WebGLCompressedTextureS3TC> WebGLCompressedTextureS3TC::create(WebGLRenderingContext* context)
+OwnPtr<WebGLCompressedTextureS3TC> WebGLCompressedTextureS3TC::create(WebGLRenderingContext* context)
{
return adoptPtr(new WebGLCompressedTextureS3TC(context));
}
class WebGLCompressedTextureS3TC : public WebGLExtension {
public:
- static PassOwnPtr<WebGLCompressedTextureS3TC> create(WebGLRenderingContext*);
+ static OwnPtr<WebGLCompressedTextureS3TC> create(WebGLRenderingContext*);
static bool supported(WebGLRenderingContext*);
return WebGLDebugRendererInfoName;
}
-PassOwnPtr<WebGLDebugRendererInfo> WebGLDebugRendererInfo::create(WebGLRenderingContext* context)
+OwnPtr<WebGLDebugRendererInfo> WebGLDebugRendererInfo::create(WebGLRenderingContext* context)
{
return adoptPtr(new WebGLDebugRendererInfo(context));
}
UNMASKED_RENDERER_WEBGL = 0x9246
};
- static PassOwnPtr<WebGLDebugRendererInfo> create(WebGLRenderingContext*);
+ static OwnPtr<WebGLDebugRendererInfo> create(WebGLRenderingContext*);
virtual ~WebGLDebugRendererInfo();
virtual ExtensionName getName() const;
return WebGLDebugShadersName;
}
-PassOwnPtr<WebGLDebugShaders> WebGLDebugShaders::create(WebGLRenderingContext* context)
+OwnPtr<WebGLDebugShaders> WebGLDebugShaders::create(WebGLRenderingContext* context)
{
return adoptPtr(new WebGLDebugShaders(context));
}
class WebGLDebugShaders : public WebGLExtension {
public:
- static PassOwnPtr<WebGLDebugShaders> create(WebGLRenderingContext*);
+ static OwnPtr<WebGLDebugShaders> create(WebGLRenderingContext*);
virtual ~WebGLDebugShaders();
virtual ExtensionName getName() const;
return WebGLDepthTextureName;
}
-PassOwnPtr<WebGLDepthTexture> WebGLDepthTexture::create(WebGLRenderingContext* context)
+OwnPtr<WebGLDepthTexture> WebGLDepthTexture::create(WebGLRenderingContext* context)
{
return adoptPtr(new WebGLDepthTexture(context));
}
class WebGLDepthTexture : public WebGLExtension {
public:
- static PassOwnPtr<WebGLDepthTexture> create(WebGLRenderingContext*);
+ static OwnPtr<WebGLDepthTexture> create(WebGLRenderingContext*);
static bool supported(GraphicsContext3D*);
return WebGLLoseContextName;
}
-PassOwnPtr<WebGLLoseContext> WebGLLoseContext::create(WebGLRenderingContext* context)
+OwnPtr<WebGLLoseContext> WebGLLoseContext::create(WebGLRenderingContext* context)
{
return adoptPtr(new WebGLLoseContext(context));
}
class WebGLLoseContext : public WebGLExtension {
public:
- static PassOwnPtr<WebGLLoseContext> create(WebGLRenderingContext*);
+ static OwnPtr<WebGLLoseContext> create(WebGLRenderingContext*);
virtual ~WebGLLoseContext();
virtual ExtensionName getName() const;
WebGLRenderingContext* m_context;
};
-PassOwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElement* canvas, WebGLContextAttributes* attrs)
+OwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElement* canvas, WebGLContextAttributes* attrs)
{
Document& document = canvas->document();
Frame* frame = document.frame();
class WebGLRenderingContext : public CanvasRenderingContext, public ActiveDOMObject {
public:
- static PassOwnPtr<WebGLRenderingContext> create(HTMLCanvasElement*, WebGLContextAttributes*);
+ static OwnPtr<WebGLRenderingContext> create(HTMLCanvasElement*, WebGLContextAttributes*);
virtual ~WebGLRenderingContext();
virtual bool is3d() const { return true; }
#endif
-BackgroundHTMLParser::BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> > reference, PassOwnPtr<Configuration> config)
+BackgroundHTMLParser::BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> > reference, OwnPtr<Configuration> config)
: m_weakFactory(reference, this)
, m_token(adoptPtr(new HTMLToken))
, m_tokenizer(HTMLTokenizer::create(config->options))
pumpTokenizer();
}
-void BackgroundHTMLParser::resumeFrom(PassOwnPtr<Checkpoint> checkpoint)
+void BackgroundHTMLParser::resumeFrom(OwnPtr<Checkpoint> checkpoint)
{
m_parser = checkpoint->parser;
m_token = checkpoint->token.release();
OwnPtr<TokenPreloadScanner> preloadScanner;
};
- static void create(PassRefPtr<WeakReference<BackgroundHTMLParser> > reference, PassOwnPtr<Configuration> config)
+ static void create(PassRefPtr<WeakReference<BackgroundHTMLParser> > reference, OwnPtr<Configuration> config)
{
new BackgroundHTMLParser(reference, config);
// Caller must free by calling stop().
};
void append(const String&);
- void resumeFrom(PassOwnPtr<Checkpoint>);
+ void resumeFrom(OwnPtr<Checkpoint>);
void startedChunkWithCheckpoint(HTMLInputCheckpoint);
void finish();
void stop();
void forcePlaintextForTextDocument();
private:
- BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> >, PassOwnPtr<Configuration>);
+ BackgroundHTMLParser(PassRefPtr<WeakReference<BackgroundHTMLParser> >, OwnPtr<Configuration>);
void markEndOfFile();
void pumpTokenizer();
#if ENABLE(THREADED_HTML_PARSER)
-void HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk> chunk)
+void HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser(OwnPtr<ParsedChunk> chunk)
{
if (isWaitingForScripts() || !m_speculations.isEmpty()) {
m_preloader->takeAndPreload(chunk->preloads);
InspectorInstrumentation::didWriteHTML(cookie, lineNumber().zeroBasedInt());
}
-void HTMLDocumentParser::validateSpeculations(PassOwnPtr<ParsedChunk> chunk)
+void HTMLDocumentParser::validateSpeculations(OwnPtr<ParsedChunk> chunk)
{
ASSERT(chunk);
if (isWaitingForScripts()) {
discardSpeculationsAndResumeFrom(chunk, token.release(), tokenizer.release());
}
-void HTMLDocumentParser::discardSpeculationsAndResumeFrom(PassOwnPtr<ParsedChunk> lastChunkBeforeScript, PassOwnPtr<HTMLToken> token, PassOwnPtr<HTMLTokenizer> tokenizer)
+void HTMLDocumentParser::discardSpeculationsAndResumeFrom(OwnPtr<ParsedChunk> lastChunkBeforeScript, OwnPtr<HTMLToken> token, OwnPtr<HTMLTokenizer> tokenizer)
{
m_weakFactory.revokeAll();
m_speculations.clear();
HTMLParserThread::shared()->postTask(bind(&BackgroundHTMLParser::resumeFrom, m_backgroundParser, checkpoint.release()));
}
-void HTMLDocumentParser::processParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk> popChunk)
+void HTMLDocumentParser::processParsedChunkFromBackgroundParser(OwnPtr<ParsedChunk> popChunk)
{
// ASSERT that this object is both attached to the Document and protected.
ASSERT(refCount() >= 2);
HTMLInputCheckpoint inputCheckpoint;
TokenPreloadScannerCheckpoint preloadScannerCheckpoint;
};
- void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>);
+ void didReceiveParsedChunkFromBackgroundParser(OwnPtr<ParsedChunk>);
#endif
protected:
#if ENABLE(THREADED_HTML_PARSER)
void startBackgroundParser();
void stopBackgroundParser();
- void validateSpeculations(PassOwnPtr<ParsedChunk> lastChunk);
- void discardSpeculationsAndResumeFrom(PassOwnPtr<ParsedChunk> lastChunk, PassOwnPtr<HTMLToken>, PassOwnPtr<HTMLTokenizer>);
- void processParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>);
+ void validateSpeculations(OwnPtr<ParsedChunk> lastChunk);
+ void discardSpeculationsAndResumeFrom(OwnPtr<ParsedChunk> lastChunk, OwnPtr<HTMLToken>, OwnPtr<HTMLTokenizer>);
+ void processParsedChunkFromBackgroundParser(OwnPtr<ParsedChunk>);
void pumpPendingSpeculations();
#endif
}
-HTMLElementStack::ElementRecord::ElementRecord(PassRefPtr<HTMLStackItem> item, PassOwnPtr<ElementRecord> next)
+HTMLElementStack::ElementRecord::ElementRecord(PassRefPtr<HTMLStackItem> item, OwnPtr<ElementRecord> next)
: m_item(item)
- , m_next(next)
+ , m_next(std::move(next))
{
ASSERT(m_item);
}
private:
friend class HTMLElementStack;
- ElementRecord(PassRefPtr<HTMLStackItem>, PassOwnPtr<ElementRecord>);
+ ElementRecord(PassRefPtr<HTMLStackItem>, OwnPtr<ElementRecord>);
- PassOwnPtr<ElementRecord> releaseNext() { return m_next.release(); }
- void setNext(PassOwnPtr<ElementRecord> next) { m_next = next; }
+ OwnPtr<ElementRecord> releaseNext() { return m_next.release(); }
+ void setNext(OwnPtr<ElementRecord> next) { m_next = std::move(next); }
RefPtr<HTMLStackItem> m_item;
OwnPtr<ElementRecord> m_next;
class HTMLMetaCharsetParser {
WTF_MAKE_NONCOPYABLE(HTMLMetaCharsetParser); WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<HTMLMetaCharsetParser> create() { return adoptPtr(new HTMLMetaCharsetParser()); }
+ static OwnPtr<HTMLMetaCharsetParser> create() { return adoptPtr(new HTMLMetaCharsetParser()); }
~HTMLMetaCharsetParser();
class HTMLParserScheduler {
WTF_MAKE_NONCOPYABLE(HTMLParserScheduler); WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<HTMLParserScheduler> create(HTMLDocumentParser* parser)
+ static OwnPtr<HTMLParserScheduler> create(HTMLDocumentParser* parser)
{
return adoptPtr(new HTMLParserScheduler(parser));
}
class HTMLParserThread {
public:
- static PassOwnPtr<HTMLParserThread> create()
+ static OwnPtr<HTMLParserThread> create()
{
return adoptPtr(new HTMLParserThread());
}
}
#endif
- PassOwnPtr<PreloadRequest> createPreloadRequest(const KURL& predictedBaseURL)
+ OwnPtr<PreloadRequest> createPreloadRequest(const KURL& predictedBaseURL)
{
if (!shouldPreload())
return nullptr;
return mediaQueryEvaluator.eval(mediaQueries.get());
}
-void HTMLResourcePreloader::preload(PassOwnPtr<PreloadRequest> preload)
+void HTMLResourcePreloader::preload(OwnPtr<PreloadRequest> preload)
{
ASSERT(m_document->frame());
ASSERT(m_document->renderView());
class PreloadRequest {
public:
- static PassOwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute)
+ static OwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType, const String& mediaAttribute)
{
return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, mediaAttribute));
}
- static PassOwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType)
+ static OwnPtr<PreloadRequest> create(const String& initiator, const String& resourceURL, const KURL& baseURL, CachedResource::Type resourceType)
{
return adoptPtr(new PreloadRequest(initiator, resourceURL, baseURL, resourceType, String()));
}
}
void takeAndPreload(PreloadRequestStream&);
- void preload(PassOwnPtr<PreloadRequest>);
+ void preload(OwnPtr<PreloadRequest>);
WeakPtr<HTMLResourcePreloader> createWeakPtr() { return m_weakFactory.createWeakPtr(); }
class HTMLScriptRunner {
WTF_MAKE_NONCOPYABLE(HTMLScriptRunner); WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<HTMLScriptRunner> create(Document* document, HTMLScriptRunnerHost* host)
+ static OwnPtr<HTMLScriptRunner> create(Document* document, HTMLScriptRunnerHost* host)
{
return adoptPtr(new HTMLScriptRunner(document, host));
}
m_doctypeData->m_systemIdentifier.append(character);
}
- PassOwnPtr<DoctypeData> releaseDoctypeData()
+ OwnPtr<DoctypeData> releaseDoctypeData()
{
return m_doctypeData.release();
}
WTF_MAKE_NONCOPYABLE(HTMLTokenizer);
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<HTMLTokenizer> create(const HTMLParserOptions& options) { return adoptPtr(new HTMLTokenizer(options)); }
+ static OwnPtr<HTMLTokenizer> create(const HTMLParserOptions& options) { return adoptPtr(new HTMLTokenizer(options)); }
~HTMLTokenizer();
void reset();
class HTMLTreeBuilder {
WTF_MAKE_NONCOPYABLE(HTMLTreeBuilder); WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser* parser, HTMLDocument* document, ParserContentPolicy parserContentPolicy, bool reportErrors, const HTMLParserOptions& options)
+ static OwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser* parser, HTMLDocument* document, ParserContentPolicy parserContentPolicy, bool reportErrors, const HTMLParserOptions& options)
{
return adoptPtr(new HTMLTreeBuilder(parser, document, parserContentPolicy, reportErrors, options));
}
- static PassOwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser* parser, DocumentFragment* fragment, Element* contextElement, ParserContentPolicy parserContentPolicy, const HTMLParserOptions& options)
+ static OwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser* parser, DocumentFragment* fragment, Element* contextElement, ParserContentPolicy parserContentPolicy, const HTMLParserOptions& options)
{
return adoptPtr(new HTMLTreeBuilder(parser, fragment, contextElement, parserContentPolicy, options));
}
}
}
-PassOwnPtr<XSSInfo> XSSAuditor::filterToken(const FilterTokenRequest& request)
+OwnPtr<XSSInfo> XSSAuditor::filterToken(const FilterTokenRequest& request)
{
ASSERT(m_state == Initialized);
if (!m_isEnabled || m_xssProtection == ContentSecurityPolicy::AllowReflectedXSS)
void init(Document*, XSSAuditorDelegate*);
void initForFragment();
- PassOwnPtr<XSSInfo> filterToken(const FilterTokenRequest&);
+ OwnPtr<XSSInfo> filterToken(const FilterTokenRequest&);
bool isSafeToSendToAnotherThread() const;
private:
class XSSInfo {
public:
- static PassOwnPtr<XSSInfo> create(bool didBlockEntirePage, bool didSendXSSProtectionHeader, bool didSendCSPHeader)
+ static OwnPtr<XSSInfo> create(bool didBlockEntirePage, bool didSendXSSProtectionHeader, bool didSendCSPHeader)
{
return adoptPtr(new XSSInfo(didBlockEntirePage, didSendXSSProtectionHeader, didSendCSPHeader));
}
BadCue
};
- static PassOwnPtr<WebVTTParser> create(WebVTTParserClient* client, ScriptExecutionContext* context)
+ static OwnPtr<WebVTTParser> create(WebVTTParserClient* client, ScriptExecutionContext* context)
{
return adoptPtr(new WebVTTParser(client, context));
}
WTF_MAKE_NONCOPYABLE(WebVTTTokenizer);
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<WebVTTTokenizer> create() { return adoptPtr(new WebVTTTokenizer); }
+ static OwnPtr<WebVTTTokenizer> create() { return adoptPtr(new WebVTTTokenizer); }
typedef WebVTTTokenizerState State;