Commit 3e042026 authored by tkent@chromium.org's avatar tkent@chromium.org

Unindent namespace content of WebElement.h, WebFormElement.h, and WebInputElement.h

These are the last instances of namespace indentation in public/.

BUG=none
TEST=none; no behavior changes.

Review URL: https://codereview.chromium.org/476633002

git-svn-id: svn://svn.chromium.org/blink/trunk@180271 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a08916b1
......@@ -39,55 +39,55 @@ namespace blink {
class Element;
struct WebRect;
// Provides access to some properties of a DOM element node.
class WebElement : public WebNode {
public:
WebElement() : WebNode() { }
WebElement(const WebElement& e) : WebNode(e) { }
// Provides access to some properties of a DOM element node.
class WebElement : public WebNode {
public:
WebElement() : WebNode() { }
WebElement(const WebElement& e) : WebNode(e) { }
WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *this; }
void assign(const WebElement& e) { WebNode::assign(e); }
WebElement& operator=(const WebElement& e) { WebNode::assign(e); return *this; }
void assign(const WebElement& e) { WebNode::assign(e); }
BLINK_EXPORT bool isFormControlElement() const;
BLINK_EXPORT bool isTextFormControlElement() const;
// Returns the qualified name, which may contain a prefix and a colon.
BLINK_EXPORT WebString tagName() const;
// Check if this element has the specified local tag name, and the HTML
// namespace. Tag name matching is case-insensitive.
BLINK_EXPORT bool hasHTMLTagName(const WebString&) const;
BLINK_EXPORT bool hasAttribute(const WebString&) const;
BLINK_EXPORT void removeAttribute(const WebString&);
BLINK_EXPORT WebString getAttribute(const WebString&) const;
BLINK_EXPORT bool setAttribute(const WebString& name, const WebString& value);
BLINK_EXPORT WebString innerText();
BLINK_EXPORT void requestFullScreen();
BLINK_EXPORT WebString attributeLocalName(unsigned index) const;
BLINK_EXPORT WebString attributeValue(unsigned index) const;
BLINK_EXPORT unsigned attributeCount() const;
BLINK_EXPORT WebNode shadowRoot() const;
BLINK_EXPORT bool isFormControlElement() const;
BLINK_EXPORT bool isTextFormControlElement() const;
// Returns the qualified name, which may contain a prefix and a colon.
BLINK_EXPORT WebString tagName() const;
// Check if this element has the specified local tag name, and the HTML
// namespace. Tag name matching is case-insensitive.
BLINK_EXPORT bool hasHTMLTagName(const WebString&) const;
BLINK_EXPORT bool hasAttribute(const WebString&) const;
BLINK_EXPORT void removeAttribute(const WebString&);
BLINK_EXPORT WebString getAttribute(const WebString&) const;
BLINK_EXPORT bool setAttribute(const WebString& name, const WebString& value);
BLINK_EXPORT WebString innerText();
BLINK_EXPORT void requestFullScreen();
BLINK_EXPORT WebString attributeLocalName(unsigned index) const;
BLINK_EXPORT WebString attributeValue(unsigned index) const;
BLINK_EXPORT unsigned attributeCount() const;
BLINK_EXPORT WebNode shadowRoot() const;
// Returns the language code specified for this element. This attribute
// is inherited, so the returned value is drawn from the closest parent
// element that has the lang attribute set, or from the HTTP
// "Content-Language" header as a fallback.
BLINK_EXPORT WebString computeInheritedLanguage() const;
// Returns the language code specified for this element. This attribute
// is inherited, so the returned value is drawn from the closest parent
// element that has the lang attribute set, or from the HTTP
// "Content-Language" header as a fallback.
BLINK_EXPORT WebString computeInheritedLanguage() const;
// Returns the bounds of the element in viewport space. The bounds
// have been adjusted to include any transformations. This view is
// also called the Root View in WebKit.
// This function will update the layout if required.
BLINK_EXPORT WebRect boundsInViewportSpace();
// Returns the bounds of the element in viewport space. The bounds
// have been adjusted to include any transformations. This view is
// also called the Root View in Blink.
// This function will update the layout if required.
BLINK_EXPORT WebRect boundsInViewportSpace();
// Returns the image contents of this element or a null WebImage
// if there isn't any.
BLINK_EXPORT WebImage imageContents();
// Returns the image contents of this element or a null WebImage
// if there isn't any.
BLINK_EXPORT WebImage imageContents();
#if BLINK_IMPLEMENTATION
WebElement(const PassRefPtrWillBeRawPtr<Element>&);
WebElement& operator=(const PassRefPtrWillBeRawPtr<Element>&);
operator PassRefPtrWillBeRawPtr<Element>() const;
WebElement(const PassRefPtrWillBeRawPtr<Element>&);
WebElement& operator=(const PassRefPtrWillBeRawPtr<Element>&);
operator PassRefPtrWillBeRawPtr<Element>() const;
#endif
};
};
} // namespace blink
......
......@@ -40,49 +40,50 @@ class HTMLFormElement;
class WebInputElement;
class WebFormControlElement;
// A container for passing around a reference to a form element. Provides
// some information about the form.
class WebFormElement : public WebElement {
public:
~WebFormElement() { reset(); }
// A container for passing around a reference to a form element. Provides some
// information about the form.
class WebFormElement : public WebElement {
public:
~WebFormElement() { reset(); }
WebFormElement() : WebElement() { }
WebFormElement(const WebFormElement& element) : WebElement(element) { }
WebFormElement() : WebElement() { }
WebFormElement(const WebFormElement& element) : WebElement(element) { }
WebFormElement& operator=(const WebFormElement& element)
{
WebElement::assign(element);
return *this;
}
void assign(const WebFormElement& element) { WebElement::assign(element); }
WebFormElement& operator=(const WebFormElement& element)
{
WebElement::assign(element);
return *this;
}
void assign(const WebFormElement& element) { WebElement::assign(element); }
BLINK_EXPORT bool autoComplete() const;
BLINK_EXPORT WebString action() const;
BLINK_EXPORT WebString name() const;
BLINK_EXPORT WebString method() const;
BLINK_EXPORT bool wasUserSubmitted() const;
BLINK_EXPORT void submit();
// FIXME: Deprecate and replace with WebVector<WebElement>.
BLINK_EXPORT void getNamedElements(const WebString&, WebVector<WebNode>&);
BLINK_EXPORT void getFormControlElements(WebVector<WebFormControlElement>&) const;
BLINK_EXPORT bool autoComplete() const;
BLINK_EXPORT WebString action() const;
BLINK_EXPORT WebString name() const;
BLINK_EXPORT WebString method() const;
BLINK_EXPORT bool wasUserSubmitted() const;
BLINK_EXPORT void submit();
// FIXME: Deprecate and replace with WebVector<WebElement>.
BLINK_EXPORT void getNamedElements(const WebString&, WebVector<WebNode>&);
BLINK_EXPORT void getFormControlElements(WebVector<WebFormControlElement>&) const;
// NOTE: This function dispatches "invalid" events. Only call this if required by a specification (e.g. requestAutocomplete()).
BLINK_EXPORT bool checkValidity();
// NOTE: This function dispatches "invalid" events. Only call this if
// required by a specification (e.g. requestAutocomplete()).
BLINK_EXPORT bool checkValidity();
enum AutocompleteResult {
AutocompleteResultSuccess,
AutocompleteResultErrorDisabled,
AutocompleteResultErrorCancel,
AutocompleteResultErrorInvalid,
};
BLINK_EXPORT void finishRequestAutocomplete(WebFormElement::AutocompleteResult);
enum AutocompleteResult {
AutocompleteResultSuccess,
AutocompleteResultErrorDisabled,
AutocompleteResultErrorCancel,
AutocompleteResultErrorInvalid,
};
BLINK_EXPORT void finishRequestAutocomplete(WebFormElement::AutocompleteResult);
#if BLINK_IMPLEMENTATION
WebFormElement(const PassRefPtrWillBeRawPtr<HTMLFormElement>&);
WebFormElement& operator=(const PassRefPtrWillBeRawPtr<HTMLFormElement>&);
operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const;
WebFormElement(const PassRefPtrWillBeRawPtr<HTMLFormElement>&);
WebFormElement& operator=(const PassRefPtrWillBeRawPtr<HTMLFormElement>&);
operator PassRefPtrWillBeRawPtr<HTMLFormElement>() const;
#endif
};
};
} // namespace blink
......
......@@ -38,65 +38,66 @@ namespace blink {
class HTMLInputElement;
class WebElementCollection;
// Provides readonly access to some properties of a DOM input element node.
class WebInputElement : public WebFormControlElement {
public:
WebInputElement() : WebFormControlElement() { }
WebInputElement(const WebInputElement& element) : WebFormControlElement(element) { }
// Provides readonly access to some properties of a DOM input element node.
class WebInputElement : public WebFormControlElement {
public:
WebInputElement() : WebFormControlElement() { }
WebInputElement(const WebInputElement& element) : WebFormControlElement(element) { }
WebInputElement& operator=(const WebInputElement& element)
{
WebFormControlElement::assign(element);
return *this;
}
void assign(const WebInputElement& element) { WebFormControlElement::assign(element); }
// This returns true for all of textfield-looking types such as text,
// password, search, email, url, and number.
BLINK_EXPORT bool isTextField() const;
// This returns true only for type=text.
BLINK_EXPORT bool isText() const;
BLINK_EXPORT bool isEmailField() const;
BLINK_EXPORT bool isPasswordField() const;
BLINK_EXPORT bool isImageButton() const;
BLINK_EXPORT bool isRadioButton() const;
BLINK_EXPORT bool isCheckbox() const;
BLINK_EXPORT int maxLength() const;
BLINK_EXPORT void setActivatedSubmit(bool);
BLINK_EXPORT int size() const;
BLINK_EXPORT void setChecked(bool, bool sendEvents = false);
// Sets the value inside the text field without being sanitized.
// Can't be used if a renderer doesn't exist or on a non text field type.
// Caret will be moved to the end.
BLINK_EXPORT void setEditingValue(const WebString&);
BLINK_EXPORT bool isValidValue(const WebString&) const;
BLINK_EXPORT bool isChecked() const;
BLINK_EXPORT bool isMultiple() const;
BLINK_EXPORT WebElementCollection dataListOptions() const;
// Return the localized value for this input type.
BLINK_EXPORT WebString localizeValue(const WebString&) const;
// Exposes the default value of the maxLength attribute.
BLINK_EXPORT static int defaultMaxLength();
// If true, forces the text of the element to be visible.
BLINK_EXPORT void setShouldRevealPassword(bool value);
WebInputElement& operator=(const WebInputElement& element)
{
WebFormControlElement::assign(element);
return *this;
}
void assign(const WebInputElement& element) { WebFormControlElement::assign(element); }
// This returns true for all of textfield-looking types such as text,
// password, search, email, url, and number.
BLINK_EXPORT bool isTextField() const;
// This returns true only for type=text.
BLINK_EXPORT bool isText() const;
BLINK_EXPORT bool isEmailField() const;
BLINK_EXPORT bool isPasswordField() const;
BLINK_EXPORT bool isImageButton() const;
BLINK_EXPORT bool isRadioButton() const;
BLINK_EXPORT bool isCheckbox() const;
BLINK_EXPORT int maxLength() const;
BLINK_EXPORT void setActivatedSubmit(bool);
BLINK_EXPORT int size() const;
BLINK_EXPORT void setChecked(bool, bool sendEvents = false);
// Sets the value inside the text field without being sanitized. Can't be
// used if a renderer doesn't exist or on a non text field type. Caret will
// be moved to the end.
BLINK_EXPORT void setEditingValue(const WebString&);
BLINK_EXPORT bool isValidValue(const WebString&) const;
BLINK_EXPORT bool isChecked() const;
BLINK_EXPORT bool isMultiple() const;
BLINK_EXPORT WebElementCollection dataListOptions() const;
// Return the localized value for this input type.
BLINK_EXPORT WebString localizeValue(const WebString&) const;
// Exposes the default value of the maxLength attribute.
BLINK_EXPORT static int defaultMaxLength();
// If true, forces the text of the element to be visible.
BLINK_EXPORT void setShouldRevealPassword(bool value);
#if BLINK_IMPLEMENTATION
WebInputElement(const PassRefPtrWillBeRawPtr<HTMLInputElement>&);
WebInputElement& operator=(const PassRefPtrWillBeRawPtr<HTMLInputElement>&);
operator PassRefPtrWillBeRawPtr<HTMLInputElement>() const;
WebInputElement(const PassRefPtrWillBeRawPtr<HTMLInputElement>&);
WebInputElement& operator=(const PassRefPtrWillBeRawPtr<HTMLInputElement>&);
operator PassRefPtrWillBeRawPtr<HTMLInputElement>() const;
#endif
};
BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*);
inline const WebInputElement* toWebInputElement(const WebElement* element)
{
return toWebInputElement(const_cast<WebElement*>(element));
}
};
// This returns 0 if the specified WebElement is not a WebInputElement.
BLINK_EXPORT WebInputElement* toWebInputElement(WebElement*);
// This returns 0 if the specified WebElement is not a WebInputElement.
inline const WebInputElement* toWebInputElement(const WebElement* element)
{
return toWebInputElement(const_cast<WebElement*>(element));
}
} // namespace blink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment