| Index: third_party/WebKit/Source/core/html/HTMLMenuItemElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLMenuItemElement.cpp b/third_party/WebKit/Source/core/html/HTMLMenuItemElement.cpp
|
| index 20502c4aa363ecfaa2afd8ae0a63951b059b6cc8..5675f11cec1e9f54f25c78019dec6d4cf1cf7d89 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMenuItemElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMenuItemElement.cpp
|
| @@ -8,6 +8,7 @@
|
| #include "core/dom/ElementTraversal.h"
|
| #include "core/events/Event.h"
|
| #include "core/frame/UseCounter.h"
|
| +#include "core/html/parser/HTMLParserIdioms.h"
|
|
|
| namespace blink {
|
|
|
| @@ -57,6 +58,26 @@ void HTMLMenuItemElement::DefaultEventHandler(Event* event) {
|
| }
|
| }
|
|
|
| +String HTMLMenuItemElement::label() const {
|
| + const AtomicString label = FastGetAttribute(labelAttr);
|
| + if (!label.IsNull())
|
| + return label;
|
| + return conceptualLabel();
|
| +}
|
| +
|
| +void HTMLMenuItemElement::setLabel(const AtomicString& label) {
|
| + setAttribute(labelAttr, label);
|
| +}
|
| +
|
| +String HTMLMenuItemElement::conceptualLabel() const {
|
| + const AtomicString label = FastGetAttribute(labelAttr);
|
| + if (!label.IsEmpty())
|
| + return label;
|
| + return this->textContent(false)
|
| + .StripWhiteSpace(IsHTMLSpace<UChar>)
|
| + .SimplifyWhiteSpace(IsHTMLSpace<UChar>);
|
| +}
|
| +
|
| DEFINE_NODE_FACTORY(HTMLMenuItemElement)
|
|
|
| } // namespace blink
|
|
|