[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:12:43 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 208d379547a8ba475ccf638d8dc2f1631e3613cd
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 17 02:31:10 2003 +0000
Fix for 3485779, <input type=image> and <button> should not be mouse focusable.
Fix for 3485795, <input type=image> and <button> are being treated like links when they should not be.
Fix for 3485817, <input type=image> and <button> should obey full keyboard access mode.
Fix for 3485802, fieldset/legend/option/optgroup/label should not be focusable at all.
Reviewed by kocienda
* ChangeLog:
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::isKeyboardFocusable):
(HTMLGenericFormElementImpl::isMouseFocusable):
(HTMLFieldSetElementImpl::isFocusable):
(HTMLLabelElementImpl::isFocusable):
(HTMLLegendElementImpl::isFocusable):
(HTMLOptGroupElementImpl::isFocusable):
(HTMLOptionElementImpl::HTMLOptionElementImpl):
(HTMLOptionElementImpl::isFocusable):
* khtml/html/html_formimpl.h:
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::isMouseFocusable):
(HTMLAnchorElementImpl::isKeyboardFocusable):
* khtml/html/html_inlineimpl.h:
* khtml/khtml_part.cpp:
(KHTMLPart::tabsToLinks):
(KHTMLPart::tabsToAllControls):
* khtml/khtml_part.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewInFrame):
(KWQKHTMLPart::tabsToLinks):
(KWQKHTMLPart::tabsToAllControls):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2693d71..ca0d674 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,40 @@
+2003-11-16 David Hyatt <hyatt at apple.com>
+
+ Fix for 3485779, <input type=image> and <button> should not be mouse focusable.
+
+ Fix for 3485795, <input type=image> and <button> are being treated like links when they should not be.
+
+ Fix for 3485817, <input type=image> and <button> should obey full keyboard access mode.
+
+ Fix for 3485802, fieldset/legend/option/optgroup/label should not be focusable at all.
+
+ Reviewed by kocienda
+
+ * ChangeLog:
+ * khtml/html/html_formimpl.cpp:
+ (HTMLGenericFormElementImpl::isKeyboardFocusable):
+ (HTMLGenericFormElementImpl::isMouseFocusable):
+ (HTMLFieldSetElementImpl::isFocusable):
+ (HTMLLabelElementImpl::isFocusable):
+ (HTMLLegendElementImpl::isFocusable):
+ (HTMLOptGroupElementImpl::isFocusable):
+ (HTMLOptionElementImpl::HTMLOptionElementImpl):
+ (HTMLOptionElementImpl::isFocusable):
+ * khtml/html/html_formimpl.h:
+ * khtml/html/html_inlineimpl.cpp:
+ (HTMLAnchorElementImpl::isMouseFocusable):
+ (HTMLAnchorElementImpl::isKeyboardFocusable):
+ * khtml/html/html_inlineimpl.h:
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::tabsToLinks):
+ (KHTMLPart::tabsToAllControls):
+ * khtml/khtml_part.h:
+ * kwq/KWQKHTMLPart.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::nextKeyViewInFrame):
+ (KWQKHTMLPart::tabsToLinks):
+ (KWQKHTMLPart::tabsToAllControls):
+
2003-11-16 Maciej Stachowiak <mjs at apple.com>
Reviewed by Dave.
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index a032bc5..b5c221b 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -857,7 +857,7 @@ bool HTMLGenericFormElementImpl::isKeyboardFocusable() const
((static_cast<RenderWidget*>(m_render)->widget()->focusPolicy() == QWidget::TabFocus) ||
(static_cast<RenderWidget*>(m_render)->widget()->focusPolicy() == QWidget::StrongFocus));
}
- return true;
+ return getDocument()->view()->part()->tabsToAllControls();
}
return false;
}
@@ -870,7 +870,13 @@ bool HTMLGenericFormElementImpl::isMouseFocusable() const
((static_cast<RenderWidget*>(m_render)->widget()->focusPolicy() == QWidget::ClickFocus) ||
(static_cast<RenderWidget*>(m_render)->widget()->focusPolicy() == QWidget::StrongFocus));
}
+#if APPLE_CHANGES
+ // For <input type=image> and <button>, we will assume no mouse focusability. This is
+ // consistent with OS X behavior for buttons.
+ return false;
+#else
return true;
+#endif
}
return false;
}
@@ -1126,6 +1132,11 @@ HTMLFieldSetElementImpl::~HTMLFieldSetElementImpl()
{
}
+bool HTMLFieldSetElementImpl::isFocusable() const
+{
+ return false;
+}
+
NodeImpl::Id HTMLFieldSetElementImpl::id() const
{
return ID_FIELDSET;
@@ -1842,6 +1853,11 @@ HTMLLabelElementImpl::~HTMLLabelElementImpl()
{
}
+bool HTMLLabelElementImpl::isFocusable() const
+{
+ return false;
+}
+
NodeImpl::Id HTMLLabelElementImpl::id() const
{
return ID_LABEL;
@@ -1883,6 +1899,11 @@ HTMLLegendElementImpl::~HTMLLegendElementImpl()
{
}
+bool HTMLLegendElementImpl::isFocusable() const
+{
+ return false;
+}
+
NodeImpl::Id HTMLLegendElementImpl::id() const
{
return ID_LEGEND;
@@ -2411,6 +2432,11 @@ HTMLOptGroupElementImpl::~HTMLOptGroupElementImpl()
{
}
+bool HTMLOptGroupElementImpl::isFocusable() const
+{
+ return false;
+}
+
NodeImpl::Id HTMLOptGroupElementImpl::id() const
{
return ID_OPTGROUP;
@@ -2483,6 +2509,11 @@ HTMLOptionElementImpl::HTMLOptionElementImpl(DocumentPtr *doc, HTMLFormElementIm
m_selected = false;
}
+bool HTMLOptionElementImpl::isFocusable() const
+{
+ return false;
+}
+
NodeImpl::Id HTMLOptionElementImpl::id() const
{
return ID_OPTION;
diff --git a/WebCore/khtml/html/html_formimpl.h b/WebCore/khtml/html/html_formimpl.h
index 2642de2..83deeed 100644
--- a/WebCore/khtml/html/html_formimpl.h
+++ b/WebCore/khtml/html/html_formimpl.h
@@ -242,6 +242,8 @@ public:
virtual Id id() const;
+ virtual bool isFocusable() const;
+
virtual khtml::RenderObject *createRenderer(RenderArena *, khtml::RenderStyle *);
virtual DOMString type() const;
@@ -354,6 +356,8 @@ public:
HTMLLabelElementImpl(DocumentPtr *doc);
virtual ~HTMLLabelElementImpl();
+ virtual bool isFocusable() const;
+
virtual Id id() const;
virtual void parseAttribute(AttributeImpl *attr);
@@ -374,6 +378,8 @@ public:
HTMLLegendElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f = 0);
virtual ~HTMLLegendElementImpl();
+ virtual bool isFocusable() const;
+
virtual Id id() const;
virtual khtml::RenderObject *createRenderer(RenderArena *, khtml::RenderStyle *);
@@ -498,6 +504,8 @@ public:
virtual Id id() const;
DOMString type() const;
+ virtual bool isFocusable() const;
+
virtual NodeImpl *insertBefore ( NodeImpl *newChild, NodeImpl *refChild, int &exceptioncode );
virtual NodeImpl *replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, int &exceptioncode );
virtual NodeImpl *removeChild ( NodeImpl *oldChild, int &exceptioncode );
@@ -519,6 +527,8 @@ class HTMLOptionElementImpl : public HTMLGenericFormElementImpl
public:
HTMLOptionElementImpl(DocumentPtr *doc, HTMLFormElementImpl *f = 0);
+ virtual bool isFocusable() const;
+
virtual Id id() const;
DOMString type() const;
diff --git a/WebCore/khtml/html/html_inlineimpl.cpp b/WebCore/khtml/html/html_inlineimpl.cpp
index e91ffee..ded9e43 100644
--- a/WebCore/khtml/html/html_inlineimpl.cpp
+++ b/WebCore/khtml/html/html_inlineimpl.cpp
@@ -60,6 +60,26 @@ bool HTMLAnchorElementImpl::isFocusable() const
m_render->style() && m_render->style()->visibility() == VISIBLE;
}
+bool HTMLAnchorElementImpl::isMouseFocusable() const
+{
+ if (!isFocusable())
+ return false;
+
+#ifdef APPLE_CHANGES
+ return false; // FIXME: This behavior is being debated currently. We might want to make links be mouse focusable.
+#else
+ return true;
+#endif
+}
+
+bool HTMLAnchorElementImpl::isKeyboardFocusable() const
+{
+ if (!isFocusable())
+ return false;
+
+ return getDocument()->view()->part()->tabsToLinks();
+}
+
NodeImpl::Id HTMLAnchorElementImpl::id() const
{
return ID_A;
diff --git a/WebCore/khtml/html/html_inlineimpl.h b/WebCore/khtml/html/html_inlineimpl.h
index ce5525b..95876e7 100644
--- a/WebCore/khtml/html/html_inlineimpl.h
+++ b/WebCore/khtml/html/html_inlineimpl.h
@@ -37,7 +37,8 @@ public:
~HTMLAnchorElementImpl();
#if APPLE_CHANGES
- virtual bool isMouseFocusable() const { return false; } // FIXME: Could perhaps obey a pref for this some day.
+ virtual bool isMouseFocusable() const;
+ virtual bool isKeyboardFocusable() const;
#endif
virtual bool isFocusable() const;
virtual Id id() const;
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 80f80f0..c2cb731 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -5493,6 +5493,16 @@ int KHTMLPart::topLevelFrameCount()
return frameCount;
}
+bool KHTMLPart::tabsToLinks() const
+{
+ return true;
+}
+
+bool KHTMLPart::tabsToAllControls() const
+{
+ return true;
+}
+
using namespace KParts;
#include "khtml_part.moc"
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index b226b53..145ab8f 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -728,6 +728,9 @@ public:
bool isPointInsideSelection(int x, int y);
+ virtual bool tabsToLinks() const;
+ virtual bool tabsToAllControls() const;
+
/**
* @internal
*/
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index e78ff10..337e113 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -149,7 +149,9 @@ public:
static NSView *nextKeyViewForWidget(QWidget *startingPoint, KWQSelectionDirection);
static bool currentEventIsKeyboardOptionTab();
static bool handleKeyboardOptionTabInView(NSView *view);
- bool tabsToLinks();
+
+ virtual bool tabsToLinks() const;
+ virtual bool tabsToAllControls() const;
static bool currentEventIsMouseDownInWidget(QWidget *candidate);
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index f81b2d6..0a934b1 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -950,7 +950,7 @@ NSView *KWQKHTMLPart::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirection d
}
}
}
- else if (tabsToLinks()) {
+ else {
doc->setFocusNode(node);
if (view()) {
QRect rect = node->getRect();
@@ -1080,7 +1080,7 @@ bool KWQKHTMLPart::handleKeyboardOptionTabInView(NSView *view)
return NO;
}
-bool KWQKHTMLPart::tabsToLinks()
+bool KWQKHTMLPart::tabsToLinks() const
{
if ([_bridge keyboardUIMode] & WebCoreKeyboardAccessTabsToLinks)
return !KWQKHTMLPart::currentEventIsKeyboardOptionTab();
@@ -1088,6 +1088,11 @@ bool KWQKHTMLPart::tabsToLinks()
return KWQKHTMLPart::currentEventIsKeyboardOptionTab();
}
+bool KWQKHTMLPart::tabsToAllControls() const
+{
+ return ([_bridge keyboardUIMode] & WebCoreKeyboardAccessFull);
+}
+
QMap<int, ScheduledAction*> *KWQKHTMLPart::pauseActions(const void *key)
{
if (d->m_doc && d->m_jscript) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list