[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
chang.shu at nokia.com
chang.shu at nokia.com
Wed Dec 22 15:32:33 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2883b77899096d71637cbc4facdf17325a2beb0f
Author: chang.shu at nokia.com <chang.shu at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Nov 7 09:24:27 2010 +0000
2010-11-07 Chang Shu <chang.shu at nokia.com>
Reviewed by Antonio Gomes.
Add a helper function to avoid duplicated code.
https://bugs.webkit.org/show_bug.cgi?id=49085
* dom/SelectElement.cpp:
* editing/SelectionController.cpp:
(WebCore::SelectionController::modify):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isKeyboardFocusable):
* page/EventHandler.cpp:
(WebCore::EventHandler::defaultArrowEventHandler):
* page/SpatialNavigation.cpp:
(WebCore::isSpatialNavigationEnabled):
* page/SpatialNavigation.h:
2010-11-07 Chang Shu <chang.shu at nokia.com>
Reviewed by Antonio Gomes.
Add a helper function to avoid duplicated code.
https://bugs.webkit.org/show_bug.cgi?id=49085
* WebCoreSupport/EditorClientQt.cpp:
(WebCore::EditorClientQt::handleKeyboardEvent):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index df25c27..e8f0e69 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-07 Chang Shu <chang.shu at nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ Add a helper function to avoid duplicated code.
+ https://bugs.webkit.org/show_bug.cgi?id=49085
+
+ * dom/SelectElement.cpp:
+ * editing/SelectionController.cpp:
+ (WebCore::SelectionController::modify):
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::isKeyboardFocusable):
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::defaultArrowEventHandler):
+ * page/SpatialNavigation.cpp:
+ (WebCore::isSpatialNavigationEnabled):
+ * page/SpatialNavigation.h:
+
2010-11-06 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Simon Fraser.
diff --git a/WebCore/dom/SelectElement.cpp b/WebCore/dom/SelectElement.cpp
index 115f480..886eee7 100644
--- a/WebCore/dom/SelectElement.cpp
+++ b/WebCore/dom/SelectElement.cpp
@@ -41,7 +41,7 @@
#include "Page.h"
#include "RenderListBox.h"
#include "RenderMenuList.h"
-#include "Settings.h"
+#include "SpatialNavigation.h"
#include <wtf/Assertions.h>
#if ENABLE(WML)
@@ -71,14 +71,6 @@ namespace WebCore {
static const DOMTimeStamp typeAheadTimeout = 1000;
-static bool isSpatialNavigationEnabled(const Frame* frame)
-{
- if (frame && frame->settings() && frame->settings()->isSpatialNavigationEnabled())
- return true;
-
- return false;
-}
-
void SelectElement::selectAll(SelectElementData& data, Element* element)
{
ASSERT(!data.usesMenuList());
diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp
index 0098d37..bb42662 100644
--- a/WebCore/editing/SelectionController.cpp
+++ b/WebCore/editing/SelectionController.cpp
@@ -675,7 +675,7 @@ bool SelectionController::modify(EAlteration alter, EDirection direction, TextGr
if (position.isNull())
return false;
- if (m_frame && m_frame->settings() && m_frame->settings()->isSpatialNavigationEnabled())
+ if (isSpatialNavigationEnabled(m_frame))
if (!wasRange && alter == AlterationMove && position == originalStartPosition)
return false;
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index b03065c..361a8c9 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -335,7 +335,7 @@ bool HTMLInputElement::isKeyboardFocusable(KeyboardEvent* event) const
if (deprecatedInputType() == RADIO) {
// When using Spatial Navigation, every radio button should be focusable.
- if (document()->frame() && document()->frame()->settings() && document()->frame()->settings()->isSpatialNavigationEnabled())
+ if (isSpatialNavigationEnabled(document()->frame()))
return true;
// Never allow keyboard tabbing to leave you in the same radio group. Always
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 2970259..faf0b78 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -2705,7 +2705,7 @@ void EventHandler::defaultArrowEventHandler(FocusDirection focusDirection, Keybo
if (!page)
return;
- if (!page->settings() || !page->settings()->isSpatialNavigationEnabled())
+ if (!isSpatialNavigationEnabled(m_frame))
return;
// Arrows and other possible directional navigation keys can be used in design
diff --git a/WebCore/page/SpatialNavigation.cpp b/WebCore/page/SpatialNavigation.cpp
index 40aa52b..a42435f 100644
--- a/WebCore/page/SpatialNavigation.cpp
+++ b/WebCore/page/SpatialNavigation.cpp
@@ -35,8 +35,9 @@
#include "HTMLFrameOwnerElement.h"
#include "IntRect.h"
#include "Node.h"
-#include "RenderLayer.h"
#include "Page.h"
+#include "RenderLayer.h"
+#include "Settings.h"
namespace WebCore {
@@ -49,6 +50,11 @@ static bool isRectInDirection(FocusDirection, const IntRect&, const IntRect&);
static void deflateIfOverlapped(IntRect&, IntRect&);
static bool checkNegativeCoordsForNode(Node*, const IntRect&);
+bool isSpatialNavigationEnabled(const Frame* frame)
+{
+ return (frame && frame->settings() && frame->settings()->isSpatialNavigationEnabled());
+}
+
void distanceDataForNode(FocusDirection direction, Node* start, FocusCandidate& candidate)
{
RenderObject* startRender = start->renderer();
diff --git a/WebCore/page/SpatialNavigation.h b/WebCore/page/SpatialNavigation.h
index d3dcaba..45b0155 100644
--- a/WebCore/page/SpatialNavigation.h
+++ b/WebCore/page/SpatialNavigation.h
@@ -45,6 +45,8 @@ inline int fudgeFactor()
return 2;
}
+bool isSpatialNavigationEnabled(const Frame*);
+
// Spatially speaking, two given elements in a web page can be:
// 1) Fully aligned: There is a full intersection between the rects, either
// vertically or horizontally.
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index bc005d2..8483d95 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-07 Chang Shu <chang.shu at nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ Add a helper function to avoid duplicated code.
+ https://bugs.webkit.org/show_bug.cgi?id=49085
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::handleKeyboardEvent):
+
2010-11-05 Chris Marrin <cmarrin at apple.com>
Reviewed by Simon Fraser.
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 3338065..91a0cc6 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -362,7 +362,7 @@ void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event)
// FIXME: refactor all of this to use Actions or something like them
if (start->isContentEditable()) {
bool doSpatialNavigation = false;
- if (frame->settings() && frame->settings()->isSpatialNavigationEnabled()) {
+ if (isSpatialNavigationEnabled(frame)) {
if (!kevent->modifiers()) {
switch (kevent->windowsVirtualKeyCode()) {
case VK_LEFT:
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list