Diff
Modified: trunk/LayoutTests/ChangeLog (110926 => 110927)
--- trunk/LayoutTests/ChangeLog 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/LayoutTests/ChangeLog 2012-03-16 01:49:05 UTC (rev 110927)
@@ -1,3 +1,20 @@
+2012-03-15 Yoshifumi Inoue <yo...@chromium.org>
+
+ [Forms] The "meter" element should not be a form-associated element.
+ https://bugs.webkit.org/show_bug.cgi?id=80380
+
+ Reviewed by Kent Tamura.
+
+ This patch removes tests which checks non-existent "form" attribute
+ of the "meter" element. The "form" attribute is available only for
+ form-associated elements. However, the "meter" element isn't a
+ form-associated element.
+
+ * fast/dom/HTMLMeterElement/meter-element-form-expected.txt: Updated expectation for test output changes.
+ * fast/dom/HTMLMeterElement/meter-element-form.html: Changed for the "meter" element doesn't have IDL attribute "form".
+ * fast/forms/form-attribute-expected.txt: Updated expectation for test output changes.
+ * fast/forms/form-attribute.html: Removed lines for the "meter" element.
+
2012-03-15 Tim Horton <timothy_hor...@apple.com>
canvas/philip/tests/2d.line.cap.round.html fails on Mac Lion WK1
Modified: trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-element-form-expected.txt (110926 => 110927)
--- trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-element-form-expected.txt 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-element-form-expected.txt 2012-03-16 01:49:05 UTC (rev 110927)
@@ -1,3 +1,3 @@
-This test passes if the meter element can find its form.
+This test passes if the meter element doesn't have form attribute.
PASS
Modified: trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-element-form.html (110926 => 110927)
--- trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-element-form.html 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/LayoutTests/fast/dom/HTMLMeterElement/meter-element-form.html 2012-03-16 01:49:05 UTC (rev 110927)
@@ -9,11 +9,11 @@
<table><form id=form1>
<meter id=meter1></meter>
</form></table>
-<div>This test passes if the meter element can find its form.</div>
+<div>This test passes if the meter element doesn't have form attribute.</div>
<div id=console>FAIL</div>
<script>
-if (document.getElementById('meter1').form.id == "form1")
+if (document.getElementById('meter1').form === undefined)
document.getElementById('console').innerHTML = "PASS";
</script>
</body>
Modified: trunk/LayoutTests/fast/forms/form-attribute-expected.txt (110926 => 110927)
--- trunk/LayoutTests/fast/forms/form-attribute-expected.txt 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/LayoutTests/fast/forms/form-attribute-expected.txt 2012-03-16 01:49:05 UTC (rev 110927)
@@ -10,7 +10,6 @@
PASS document.getElementsByTagName("input")[0].form is owner
PASS document.getElementsByTagName("keygen")[0].form is owner
FAIL document.getElementsByTagName("label")[0].form should be [object HTMLFormElement]. Was null.
-PASS document.getElementsByTagName("meter")[0].form is owner
PASS document.getElementsByTagName("object")[0].form is owner
PASS document.getElementsByTagName("output")[0].form is owner
PASS document.getElementsByTagName("progress")[0].form is owner
Modified: trunk/LayoutTests/fast/forms/form-attribute.html (110926 => 110927)
--- trunk/LayoutTests/fast/forms/form-attribute.html 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/LayoutTests/fast/forms/form-attribute.html 2012-03-16 01:49:05 UTC (rev 110927)
@@ -20,7 +20,6 @@
'<input name=victim form=owner />' +
'<keygen name=victim form=owner />' +
'<label name=victim form=owner />' +
- '<meter name=victim form=owner />' +
'<object name=victim form=owner></object>' +
'<output name=victim form=owner />' +
'<progress name=victim form=owner />' +
@@ -33,7 +32,6 @@
shouldBe('document.getElementsByTagName("input")[0].form', 'owner');
shouldBe('document.getElementsByTagName("keygen")[0].form', 'owner');
shouldBe('document.getElementsByTagName("label")[0].form', 'owner');
-shouldBe('document.getElementsByTagName("meter")[0].form', 'owner');
shouldBe('document.getElementsByTagName("object")[0].form', 'owner');
shouldBe('document.getElementsByTagName("output")[0].form', 'owner');
shouldBe('document.getElementsByTagName("progress")[0].form', 'owner');
Modified: trunk/Source/WebCore/ChangeLog (110926 => 110927)
--- trunk/Source/WebCore/ChangeLog 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/ChangeLog 2012-03-16 01:49:05 UTC (rev 110927)
@@ -1,3 +1,67 @@
+2012-03-15 Yoshifumi Inoue <yo...@chromium.org>
+
+ [Forms] The "meter" element should not be a form-associated element.
+ https://bugs.webkit.org/show_bug.cgi?id=80380
+
+ Reviewed by Kent Tamura.
+
+ This patch changes base class of HTMLMeterElement to LabelableElement from
+ HTMLFormControlElement for saving memory space and iteration time of
+ extra "meter" elements in HTMLFormElement::m_formAssociatedElements
+ and matching the HTML5 specification for ease of maintenance.
+
+ This patch renames isLabelable method to supportLabels and makes isLabelable
+ as predicate of an instance of LabelableElement or not.
+
+ Changes of TextIterator is lead by usage of isFormControlElement. This
+ changes will be replaced with more meaningful predicate as part of
+ https://bugs.webkit.org/show_bug.cgi?id=80381
+
+ No new tests. Update existing tests to cover this change.
+
+ * editing/TextIterator.cpp:
+ (WebCore::TextIterator::advance): Check HTMLMeterElement in addition to isFormControlElement. This change is for text dump in LayoutTests implemented by document.innerText attribute.
+ * html/HTMLButton.h:
+ (WebCore::HTMLButtonElement::supportLabels): Renamed from isLabelable
+ * html/HTMLElement.h:
+ (WebCore::HTMLElement::isLabelable): Added. A predicate for an instance of LabelableElement.
+ * html/HTMLInputElement.h:
+ (WebCore::HTMLInputElement::supportLabels): Renamed from isLabelable
+ * html/HTMLKeygenElement.h:
+ (WebCore::HTMLKeygenElement::supportLabels): Renamed from isLabelable
+ * html/HTMLLabelElement.cpp:
+ (WebCore::nodeAsLabelableElement): Changed to return LabelableElement instead of HTMLFormControlElement.
+ (WebCore::HTMLLabelElement::control): Changed to return LabelableElement instead of HTMLFormControlElement.
+ * html/HTMLLabelElement.h:
+ (HTMLLabelElement):
+ * html/HTMLMeterElement.cpp:
+ (WebCore::HTMLMeterElement::HTMLMeterElement): Changed base class to LabelableElement.
+ (WebCore::HTMLMeterElement::create): Remove form parameter.
+ (WebCore::HTMLMeterElement::formControlType): Remove implementation of virtual method declared in HTMLFormControlElement.
+ (WebCore::HTMLMeterElement::parseAttribute): Replace HTMLFormControlElement to LabelableElement
+ (WebCore::HTMLMeterElement::attach): Replace HTMLFormControlElement to LabelableElement
+ * html/HTMLMeterElement.idl: Remove the "form" attribute which isn't listed in the HTML5 specification.
+ * html/HTMLMeterElement.h:
+ (HTMLMeterElement):
+ (WebCore::HTMLMeterElement::supportLabels): Renamed from isLabelable
+ * html/HTMLOutputElement.h:
+ (WebCore::HTMLOutputElement::supportLabels): Renamed from isLabelable
+ * html/HTMLProgressElement.h:
+ (WebCore::HTMLProgressElement::supportLabels): Renamed from isLabelable
+ * html/HTMLSelectElement.h:
+ (WebCore::HTMLSelectElement::supportLabels): Renamed from isLabelable
+ * html/HTMLTextAreaElement.h:
+ (WebCore::HTMLTextAreaElement::supportLabels): Renamed from isLabelable
+ * html/HiddenInputType.h:
+ (WebCore::HiddenInputType::supportLabels): Renamed from isLabelable
+ * html/InputType.h:
+ (WebCore::InputType::supportLabels): Renamed from isLabelable
+ * html/HTMLTagNames.in: Remove "constructorNeedsFormElement" for not passing "form" parameter in HTMLElementFactory.
+ * html/LabelableElement.cpp:
+ (WebCore::LabelableElement::labels): Replace isLabelable to supportLabels
+ * html/LabelableElement.h:
+ (LabelableElement):
+
2012-03-15 Adam Klein <ad...@chromium.org>
REGRESSION(r103452): 100% CPU usage and 5s pause after clicking on a link in Yahoo Mail
Modified: trunk/Source/WebCore/editing/TextIterator.cpp (110926 => 110927)
--- trunk/Source/WebCore/editing/TextIterator.cpp 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/editing/TextIterator.cpp 2012-03-16 01:49:05 UTC (rev 110927)
@@ -395,7 +395,8 @@
else if (renderer && (renderer->isImage() || renderer->isWidget() ||
(renderer->node() && renderer->node()->isElementNode() &&
(static_cast<Element*>(renderer->node())->isFormControlElement()
- || static_cast<Element*>(renderer->node())->hasTagName(legendTag)))))
+ || static_cast<Element*>(renderer->node())->hasTagName(legendTag)
+ || static_cast<Element*>(renderer->node())->hasTagName(meterTag)))))
m_handledNode = handleReplacedElement();
else
m_handledNode = handleNonTextNode();
Modified: trunk/Source/WebCore/html/HTMLButtonElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLButtonElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLButtonElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -49,7 +49,7 @@
virtual bool appendFormData(FormDataList&, bool);
virtual bool isEnumeratable() const { return true; }
- virtual bool isLabelable() const OVERRIDE { return true; }
+ virtual bool supportLabels() const OVERRIDE { return true; }
virtual bool isSuccessfulSubmitButton() const;
virtual bool isActivatedSubmit() const;
Modified: trunk/Source/WebCore/html/HTMLElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -102,6 +102,7 @@
#endif
virtual bool isInsertionPoint() const { return false; }
+ virtual bool isLabelable() const { return false; }
protected:
HTMLElement(const QualifiedName& tagName, Document*);
Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLInputElement.cpp 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp 2012-03-16 01:49:05 UTC (rev 110927)
@@ -1761,9 +1761,9 @@
return m_inputType->isEnumeratable();
}
-bool HTMLInputElement::isLabelable() const
+bool HTMLInputElement::supportLabels() const
{
- return m_inputType->isLabelable();
+ return m_inputType->supportLabels();
}
bool HTMLInputElement::shouldAppearChecked() const
Modified: trunk/Source/WebCore/html/HTMLInputElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLInputElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLInputElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -256,7 +256,7 @@
virtual bool isKeyboardFocusable(KeyboardEvent*) const;
virtual bool isMouseFocusable() const;
virtual bool isEnumeratable() const;
- virtual bool isLabelable() const OVERRIDE;
+ virtual bool supportLabels() const OVERRIDE;
virtual void updateFocusAppearance(bool restorePreviousSelection);
virtual void aboutToUnload();
virtual bool shouldUseInputMethod();
Modified: trunk/Source/WebCore/html/HTMLKeygenElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLKeygenElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLKeygenElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -48,7 +48,7 @@
virtual bool isOptionalFormControl() const { return false; }
virtual bool isEnumeratable() const { return true; }
- virtual bool isLabelable() const OVERRIDE { return true; }
+ virtual bool supportLabels() const OVERRIDE { return true; }
virtual void reset();
Modified: trunk/Source/WebCore/html/HTMLLabelElement.cpp (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLLabelElement.cpp 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLLabelElement.cpp 2012-03-16 01:49:05 UTC (rev 110927)
@@ -28,24 +28,27 @@
#include "Document.h"
#include "Event.h"
#include "EventNames.h"
-#include "HTMLFormControlElement.h"
-#include "HTMLFormElement.h"
+#include "LabelableElement.h"
#include "HTMLNames.h"
namespace WebCore {
using namespace HTMLNames;
-static HTMLFormControlElement* nodeAsLabelableFormControl(Node* node)
+static LabelableElement* nodeAsLabelableElement(Node* node)
{
- if (!node || !node->isElementNode() || !static_cast<Element*>(node)->isFormControlElement())
+ if (!node || !node->isHTMLElement())
return 0;
- HTMLFormControlElement* formControlElement = static_cast<HTMLFormControlElement*>(node);
- if (!formControlElement->isLabelable())
+ HTMLElement* element = static_cast<HTMLElement*>(node);
+ if (!element->isLabelable())
return 0;
- return formControlElement;
+ LabelableElement* labelableElement = static_cast<LabelableElement*>(element);
+ if (!labelableElement->supportLabels())
+ return 0;
+
+ return labelableElement;
}
inline HTMLLabelElement::HTMLLabelElement(const QualifiedName& tagName, Document* document)
@@ -64,7 +67,7 @@
return false;
}
-HTMLFormControlElement* HTMLLabelElement::control()
+LabelableElement* HTMLLabelElement::control()
{
const AtomicString& controlId = getAttribute(forAttr);
if (controlId.isNull()) {
@@ -73,15 +76,15 @@
// the form element must be "labelable form-associated element".
Node* node = this;
while ((node = node->traverseNextNode(this))) {
- if (HTMLFormControlElement* formControlElement = nodeAsLabelableFormControl(node))
- return formControlElement;
+ if (LabelableElement* element = nodeAsLabelableElement(node))
+ return element;
}
return 0;
}
// Find the first element whose id is controlId. If it is found and it is a labelable form control,
// return it, otherwise return 0.
- return nodeAsLabelableFormControl(treeScope()->getElementById(controlId));
+ return nodeAsLabelableElement(treeScope()->getElementById(controlId));
}
void HTMLLabelElement::setActive(bool down, bool pause)
Modified: trunk/Source/WebCore/html/HTMLLabelElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLLabelElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLLabelElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -25,7 +25,7 @@
#define HTMLLabelElement_h
#include "HTMLElement.h"
-#include "HTMLFormControlElement.h"
+#include "LabelableElement.h"
namespace WebCore {
@@ -33,7 +33,7 @@
public:
static PassRefPtr<HTMLLabelElement> create(const QualifiedName&, Document*);
- HTMLFormControlElement* control();
+ LabelableElement* control();
private:
HTMLLabelElement(const QualifiedName&, Document*);
Modified: trunk/Source/WebCore/html/HTMLMeterElement.cpp (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLMeterElement.cpp 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLMeterElement.cpp 2012-03-16 01:49:05 UTC (rev 110927)
@@ -39,8 +39,8 @@
using namespace HTMLNames;
-HTMLMeterElement::HTMLMeterElement(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
- : HTMLFormControlElement(tagName, document, form)
+HTMLMeterElement::HTMLMeterElement(const QualifiedName& tagName, Document* document)
+ : LabelableElement(tagName, document)
{
ASSERT(hasTagName(meterTag));
}
@@ -49,9 +49,9 @@
{
}
-PassRefPtr<HTMLMeterElement> HTMLMeterElement::create(const QualifiedName& tagName, Document* document, HTMLFormElement* form)
+PassRefPtr<HTMLMeterElement> HTMLMeterElement::create(const QualifiedName& tagName, Document* document)
{
- RefPtr<HTMLMeterElement> meter = adoptRef(new HTMLMeterElement(tagName, document, form));
+ RefPtr<HTMLMeterElement> meter = adoptRef(new HTMLMeterElement(tagName, document));
meter->createShadowSubtree();
return meter;
}
@@ -66,12 +66,6 @@
return childContext.isOnEncapsulationBoundary() && HTMLElement::childShouldCreateRenderer(childContext);
}
-const AtomicString& HTMLMeterElement::formControlType() const
-{
- DEFINE_STATIC_LOCAL(const AtomicString, meter, ("meter"));
- return meter;
-}
-
bool HTMLMeterElement::supportsFocus() const
{
return Node::supportsFocus() && !disabled();
@@ -82,12 +76,12 @@
if (attribute->name() == valueAttr || attribute->name() == minAttr || attribute->name() == maxAttr || attribute->name() == lowAttr || attribute->name() == highAttr || attribute->name() == optimumAttr)
didElementStateChange();
else
- HTMLFormControlElement::parseAttribute(attribute);
+ LabelableElement::parseAttribute(attribute);
}
void HTMLMeterElement::attach()
{
- HTMLFormControlElement::attach();
+ LabelableElement::attach();
didElementStateChange();
}
Modified: trunk/Source/WebCore/html/HTMLMeterElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLMeterElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLMeterElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -22,15 +22,15 @@
#define HTMLMeterElement_h
#if ENABLE(METER_TAG)
-#include "HTMLFormControlElement.h"
+#include "LabelableElement.h"
namespace WebCore {
class MeterValueElement;
-class HTMLMeterElement : public HTMLFormControlElement {
+class HTMLMeterElement : public LabelableElement {
public:
- static PassRefPtr<HTMLMeterElement> create(const QualifiedName&, Document*, HTMLFormElement*);
+ static PassRefPtr<HTMLMeterElement> create(const QualifiedName&, Document*);
enum GaugeRegion {
GaugeRegionOptimum,
@@ -62,15 +62,14 @@
bool canContainRangeEndPoint() const { return false; }
private:
- HTMLMeterElement(const QualifiedName&, Document*, HTMLFormElement*);
+ HTMLMeterElement(const QualifiedName&, Document*);
virtual ~HTMLMeterElement();
- virtual bool isLabelable() const OVERRIDE { return true; }
+ virtual bool supportLabels() const OVERRIDE { return true; }
virtual bool supportsFocus() const;
virtual bool recalcWillValidate() const { return false; }
- virtual const AtomicString& formControlType() const;
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
virtual bool childShouldCreateRenderer(const NodeRenderingContext&) const OVERRIDE;
virtual void parseAttribute(Attribute*) OVERRIDE;
Modified: trunk/Source/WebCore/html/HTMLMeterElement.idl (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLMeterElement.idl 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLMeterElement.idl 2012-03-16 01:49:05 UTC (rev 110927)
@@ -33,7 +33,6 @@
setter raises(DOMException);
attribute double optimum
setter raises(DOMException);
- readonly attribute HTMLFormElement form;
readonly attribute NodeList labels;
};
}
Modified: trunk/Source/WebCore/html/HTMLOutputElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLOutputElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLOutputElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -58,7 +58,7 @@
virtual void parseAttribute(Attribute*) OVERRIDE;
virtual const AtomicString& formControlType() const;
virtual bool isEnumeratable() const { return true; }
- virtual bool isLabelable() const OVERRIDE { return true; }
+ virtual bool supportLabels() const OVERRIDE { return true; }
virtual bool supportsFocus() const;
virtual void childrenChanged(bool createdByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
virtual void reset();
Modified: trunk/Source/WebCore/html/HTMLProgressElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLProgressElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLProgressElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -51,7 +51,7 @@
HTMLProgressElement(const QualifiedName&, Document*, HTMLFormElement*);
virtual ~HTMLProgressElement();
- virtual bool isLabelable() const OVERRIDE { return true; }
+ virtual bool supportLabels() const OVERRIDE { return true; }
virtual bool supportsFocus() const;
Modified: trunk/Source/WebCore/html/HTMLSelectElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLSelectElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLSelectElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -118,7 +118,7 @@
virtual bool canStartSelection() const { return false; }
virtual bool isEnumeratable() const { return true; }
- virtual bool isLabelable() const OVERRIDE { return true; }
+ virtual bool supportLabels() const OVERRIDE { return true; }
virtual bool saveFormControlState(String& value) const;
virtual void restoreFormControlState(const String&);
Modified: trunk/Source/WebCore/html/HTMLTagNames.in (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLTagNames.in 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLTagNames.in 2012-03-16 01:49:05 UTC (rev 110927)
@@ -83,7 +83,7 @@
marquee
menu
meta
-meter interfaceName=HTMLMeterElement, constructorNeedsFormElement, conditional=METER_TAG
+meter interfaceName=HTMLMeterElement, conditional=METER_TAG
nav interfaceName=HTMLElement
nobr interfaceName=HTMLElement
noembed interfaceName=HTMLElement
Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/HTMLTextAreaElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -84,7 +84,7 @@
virtual void subtreeHasChanged();
virtual bool isEnumeratable() const { return true; }
- virtual bool isLabelable() const OVERRIDE { return true; }
+ virtual bool supportLabels() const OVERRIDE { return true; }
virtual const AtomicString& formControlType() const;
Modified: trunk/Source/WebCore/html/HiddenInputType.h (110926 => 110927)
--- trunk/Source/WebCore/html/HiddenInputType.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/HiddenInputType.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -50,7 +50,7 @@
virtual bool rendererIsNeeded() OVERRIDE;
virtual bool storesValueSeparateFromAttribute() OVERRIDE;
virtual bool isHiddenType() const OVERRIDE;
- virtual bool isLabelable() const OVERRIDE { return false; }
+ virtual bool supportLabels() const OVERRIDE { return false; }
virtual bool shouldRespectHeightAndWidthAttributes() OVERRIDE;
virtual void setValue(const String&, bool, TextFieldEventBehavior) OVERRIDE;
virtual bool appendFormData(FormDataList&, bool) const OVERRIDE;
Modified: trunk/Source/WebCore/html/InputType.cpp (110926 => 110927)
--- trunk/Source/WebCore/html/InputType.cpp 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/InputType.cpp 2012-03-16 01:49:05 UTC (rev 110927)
@@ -658,7 +658,7 @@
return false;
}
-bool InputType::isLabelable() const
+bool InputType::supportLabels() const
{
return true;
}
Modified: trunk/Source/WebCore/html/InputType.h (110926 => 110927)
--- trunk/Source/WebCore/html/InputType.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/InputType.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -100,7 +100,7 @@
virtual bool isFileUpload() const;
virtual bool isHiddenType() const;
virtual bool isImageButton() const;
- virtual bool isLabelable() const;
+ virtual bool supportLabels() const;
virtual bool isNumberField() const;
virtual bool isPasswordField() const;
virtual bool isRadioButton() const;
Modified: trunk/Source/WebCore/html/LabelableElement.cpp (110926 => 110927)
--- trunk/Source/WebCore/html/LabelableElement.cpp 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/LabelableElement.cpp 2012-03-16 01:49:05 UTC (rev 110927)
@@ -42,7 +42,7 @@
PassRefPtr<NodeList> LabelableElement::labels()
{
- if (!isLabelable())
+ if (!supportLabels())
return 0;
if (!document())
return 0;
Modified: trunk/Source/WebCore/html/LabelableElement.h (110926 => 110927)
--- trunk/Source/WebCore/html/LabelableElement.h 2012-03-16 01:39:14 UTC (rev 110926)
+++ trunk/Source/WebCore/html/LabelableElement.h 2012-03-16 01:49:05 UTC (rev 110927)
@@ -40,11 +40,14 @@
class LabelableElement : public HTMLElement {
public:
virtual ~LabelableElement();
- virtual bool isLabelable() const { return false; }
PassRefPtr<NodeList> labels();
+ virtual bool supportLabels() const { return false; }
protected:
LabelableElement(const QualifiedName& tagName, Document*);
+
+private:
+ virtual bool isLabelable() const OVERRIDE FINAL { return true; }
};
} // namespace WebCore