summaryrefslogtreecommitdiffstats
path: root/WebCore/html/HTMLOptGroupElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/html/HTMLOptGroupElement.cpp')
-rw-r--r--WebCore/html/HTMLOptGroupElement.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/WebCore/html/HTMLOptGroupElement.cpp b/WebCore/html/HTMLOptGroupElement.cpp
index af81b07..90156da 100644
--- a/WebCore/html/HTMLOptGroupElement.cpp
+++ b/WebCore/html/HTMLOptGroupElement.cpp
@@ -44,9 +44,15 @@ HTMLOptGroupElement::HTMLOptGroupElement(const QualifiedName& tagName, Document*
ASSERT(hasTagName(optgroupTag));
}
+bool HTMLOptGroupElement::supportsFocus() const
+{
+ return HTMLElement::supportsFocus();
+}
+
bool HTMLOptGroupElement::isFocusable() const
{
- return HTMLElement::isFocusable();
+ // Optgroup elements do not have a renderer so we check the renderStyle instead.
+ return supportsFocus() && renderStyle() && renderStyle()->display() != NONE;
}
const AtomicString& HTMLOptGroupElement::formControlType() const