#include "RuntimeEnabledFeatures.h"
#include "SVGNames.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
-#include "core/dom/Clipboard.h"
-#include "core/dom/DataObject.h"
+#include "core/clipboard/Clipboard.h"
+#include "core/clipboard/DataObject.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentMarkerController.h"
#include "core/dom/FullscreenElementStack.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/RenderFlowThread.h"
#include "core/rendering/RenderLayer.h"
-#include "core/rendering/RenderRegion.h"
#include "core/rendering/RenderTextControlSingleLine.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/RenderWidget.h"
return true;
}
- // FIXME: This should probably move to a virtual method on RenderBox, something like
- // RenderBox::scrollAncestor, and specialized for RenderFlowThread
curBox = curBox->containingBlock();
- if (curBox && curBox->isRenderNamedFlowThread()) {
- RenderBox* flowedBox = curBox;
-
- if (RenderBox* startBox = node->renderBox())
- flowedBox = startBox;
-
- curBox = toRenderFlowThread(curBox)->regionFromAbsolutePointAndBox(absolutePoint, flowedBox);
- }
}
return false;
// clear swallowEvent if the page already set it (e.g., by canceling
// default behavior).
if (element) {
- if (!page->focusController().setFocusedElement(element, m_frame, FocusDirectionMouse))
+ if (!page->focusController().setFocusedElement(element, m_frame, FocusTypeMouse))
swallowEvent = true;
} else {
// We call setFocusedElement even with !element in order to blur
return keydownResult || keypress->defaultPrevented() || keypress->defaultHandled();
}
-static FocusDirection focusDirectionForKey(const AtomicString& keyIdentifier)
+static FocusType focusDirectionForKey(const AtomicString& keyIdentifier)
{
DEFINE_STATIC_LOCAL(AtomicString, Down, ("Down", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(AtomicString, Up, ("Up", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(AtomicString, Left, ("Left", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(AtomicString, Right, ("Right", AtomicString::ConstructFromLiteral));
- FocusDirection retVal = FocusDirectionNone;
+ FocusType retVal = FocusTypeNone;
if (keyIdentifier == Down)
- retVal = FocusDirectionDown;
+ retVal = FocusTypeDown;
else if (keyIdentifier == Up)
- retVal = FocusDirectionUp;
+ retVal = FocusTypeUp;
else if (keyIdentifier == Left)
- retVal = FocusDirectionLeft;
+ retVal = FocusTypeLeft;
else if (keyIdentifier == Right)
- retVal = FocusDirectionRight;
+ retVal = FocusTypeRight;
return retVal;
}
else if (event->keyIdentifier() == "U+001B")
defaultEscapeEventHandler(event);
else {
- FocusDirection direction = focusDirectionForKey(AtomicString(event->keyIdentifier()));
- if (direction != FocusDirectionNone)
- defaultArrowEventHandler(direction, event);
+ FocusType type = focusDirectionForKey(AtomicString(event->keyIdentifier()));
+ if (type != FocusTypeNone)
+ defaultArrowEventHandler(type, event);
}
}
if (event->type() == EventTypeNames::keypress) {
event->setDefaultHandled();
}
-void EventHandler::defaultArrowEventHandler(FocusDirection focusDirection, KeyboardEvent* event)
+void EventHandler::defaultArrowEventHandler(FocusType focusType, KeyboardEvent* event)
{
ASSERT(event->type() == EventTypeNames::keydown);
if (m_frame->document()->inDesignMode())
return;
- if (page->focusController().advanceFocus(focusDirection))
+ if (page->focusController().advanceFocus(focusType))
event->setDefaultHandled();
}
if (!page->tabKeyCyclesThroughElements())
return;
- FocusDirection focusDirection = event->shiftKey() ? FocusDirectionBackward : FocusDirectionForward;
+ FocusType focusType = event->shiftKey() ? FocusTypeBackward : FocusTypeForward;
// Tabs can be used in design mode editing.
if (m_frame->document()->inDesignMode())
return;
- if (page->focusController().advanceFocus(focusDirection))
+ if (page->focusController().advanceFocus(focusType))
event->setDefaultHandled();
}
// Ensure this target's touch list exists, even if it ends up empty, so it can always be passed to TouchEvent::Create below.
TargetTouchesMap::iterator targetTouchesIterator = touchesByTarget.find(touchTarget.get());
- if (targetTouchesIterator == touchesByTarget.end())
- targetTouchesIterator = touchesByTarget.set(touchTarget.get(), TouchList::create()).iterator;
+ if (targetTouchesIterator == touchesByTarget.end()) {
+ touchesByTarget.set(touchTarget.get(), TouchList::create());
+ targetTouchesIterator = touchesByTarget.find(touchTarget.get());
+ }
// touches and targetTouches should only contain information about touches still on the screen, so if this point is
// released or cancelled it will only appear in the changedTouches list.