summaryrefslogtreecommitdiffstats
path: root/WebCore/wml/WMLFormControlElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/wml/WMLFormControlElement.cpp')
-rw-r--r--WebCore/wml/WMLFormControlElement.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/WebCore/wml/WMLFormControlElement.cpp b/WebCore/wml/WMLFormControlElement.cpp
index 15c3f68..4e76cb8 100644
--- a/WebCore/wml/WMLFormControlElement.cpp
+++ b/WebCore/wml/WMLFormControlElement.cpp
@@ -23,6 +23,10 @@
#if ENABLE(WML)
#include "WMLFormControlElement.h"
+#include "RenderBox.h"
+#include "RenderObject.h"
+#include "RenderStyle.h"
+
namespace WebCore {
// WMLFormControlElement
@@ -36,6 +40,22 @@ WMLFormControlElement::~WMLFormControlElement()
{
}
+bool WMLFormControlElement::isFocusable() const
+{
+ if (!renderer() || !renderer()->isBox())
+ return false;
+
+ if (toRenderBox(renderer())->size().isEmpty())
+ return false;
+
+ if (RenderStyle* style = renderer()->style()) {
+ if (style->visibility() != VISIBLE)
+ return false;
+ }
+
+ return true;
+}
+
// WMLFormControlElementWithState
WMLFormControlElementWithState::WMLFormControlElementWithState(const QualifiedName& tagName, Document* document)
: WMLFormControlElement(tagName, document)