diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h')
-rw-r--r-- | Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h b/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h index 4cb3ec93c..6d4850094 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h +++ b/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h @@ -23,63 +23,68 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef InjectedBundleNodeHandle_h -#define InjectedBundleNodeHandle_h +#pragma once #include "APIObject.h" #include "ImageOptions.h" #include <JavaScriptCore/JSBase.h> #include <wtf/Forward.h> -#include <wtf/PassRefPtr.h> #include <wtf/RefPtr.h> namespace WebCore { - class IntRect; - class Node; +class IntRect; +class Node; +enum class AutoFillButtonType : uint8_t; } namespace WebKit { +class InjectedBundleRangeHandle; class InjectedBundleScriptWorld; class WebFrame; class WebImage; class InjectedBundleNodeHandle : public API::ObjectImpl<API::Object::Type::BundleNodeHandle> { public: - static PassRefPtr<InjectedBundleNodeHandle> getOrCreate(JSContextRef, JSObjectRef); - static PassRefPtr<InjectedBundleNodeHandle> getOrCreate(WebCore::Node*); + static RefPtr<InjectedBundleNodeHandle> getOrCreate(JSContextRef, JSObjectRef); + static RefPtr<InjectedBundleNodeHandle> getOrCreate(WebCore::Node*); + static Ref<InjectedBundleNodeHandle> getOrCreate(WebCore::Node&); virtual ~InjectedBundleNodeHandle(); - WebCore::Node* coreNode() const; + WebCore::Node* coreNode(); // Convenience DOM Operations - PassRefPtr<InjectedBundleNodeHandle> document(); + Ref<InjectedBundleNodeHandle> document(); // Additional DOM Operations // Note: These should only be operations that are not exposed to JavaScript. - WebCore::IntRect elementBounds() const; - WebCore::IntRect renderRect(bool*) const; - PassRefPtr<WebImage> renderedImage(SnapshotOptions); + WebCore::IntRect elementBounds(); + WebCore::IntRect renderRect(bool*); + RefPtr<WebImage> renderedImage(SnapshotOptions); + RefPtr<InjectedBundleRangeHandle> visibleRange(); void setHTMLInputElementValueForUser(const String&); - bool isHTMLInputElementAutofilled() const; - void setHTMLInputElementAutofilled(bool); + void setHTMLInputElementSpellcheckEnabled(bool); + bool isHTMLInputElementAutoFilled() const; + void setHTMLInputElementAutoFilled(bool); + bool isHTMLInputElementAutoFillButtonEnabled() const; + void setHTMLInputElementAutoFillButtonEnabled(WebCore::AutoFillButtonType); + WebCore::IntRect htmlInputElementAutoFillButtonBounds(); bool htmlInputElementLastChangeWasUserEdit(); bool htmlTextAreaElementLastChangeWasUserEdit(); + bool isTextField() const; - PassRefPtr<InjectedBundleNodeHandle> htmlTableCellElementCellAbove(); + RefPtr<InjectedBundleNodeHandle> htmlTableCellElementCellAbove(); - PassRefPtr<WebFrame> documentFrame(); - PassRefPtr<WebFrame> htmlFrameElementContentFrame(); - PassRefPtr<WebFrame> htmlIFrameElementContentFrame(); + RefPtr<WebFrame> documentFrame(); + RefPtr<WebFrame> htmlFrameElementContentFrame(); + RefPtr<WebFrame> htmlIFrameElementContentFrame(); private: - static PassRefPtr<InjectedBundleNodeHandle> create(WebCore::Node*); - InjectedBundleNodeHandle(WebCore::Node*); + static Ref<InjectedBundleNodeHandle> create(WebCore::Node&); + InjectedBundleNodeHandle(WebCore::Node&); - RefPtr<WebCore::Node> m_node; + Ref<WebCore::Node> m_node; }; } // namespace WebKit - -#endif // InjectedBundleNodeHandle_h |