Commit 1c6f6d70 authored by weinig@apple.com's avatar weinig@apple.com

EditorInternalCommand should use Frame& where possible

https://bugs.webkit.org/show_bug.cgi?id=120340

Reviewed by Andreas Kling.

Only isSupportedFromDOM still takes a Frame*, as it still has callers that expect null to work.

* dom/UserTypingGestureIndicator.cpp:
* dom/UserTypingGestureIndicator.h:
* editing/Editor.cpp:
* editing/EditorCommand.cpp:
* page/EventHandler.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fbb44563
2013-08-26 Sam Weinig <sam@webkit.org>
EditorInternalCommand should use Frame& where possible
https://bugs.webkit.org/show_bug.cgi?id=120340
Reviewed by Andreas Kling.
Only isSupportedFromDOM still takes a Frame*, as it still has callers that expect null to work.
* dom/UserTypingGestureIndicator.cpp:
* dom/UserTypingGestureIndicator.h:
* editing/Editor.cpp:
* editing/EditorCommand.cpp:
* page/EventHandler.cpp:
2013-08-26 Ryosuke Niwa <rniwa@webkit.org>
Elements in a node list of the form element's name getter should not be added to the past names map
......@@ -50,12 +50,12 @@ Node* UserTypingGestureIndicator::focusedElementAtGestureStart()
return focusedNode().get();
}
UserTypingGestureIndicator::UserTypingGestureIndicator(Frame* frame)
UserTypingGestureIndicator::UserTypingGestureIndicator(Frame& frame)
: m_previousProcessingUserTypingGesture(s_processingUserTypingGesture)
, m_previousFocusedNode(focusedNode())
{
s_processingUserTypingGesture = true;
focusedNode() = frame->document() ? frame->document()->focusedElement() : 0;
focusedNode() = frame.document() ? frame.document()->focusedElement() : 0;
}
UserTypingGestureIndicator::~UserTypingGestureIndicator()
......
......@@ -40,7 +40,7 @@ public:
static bool processingUserTypingGesture();
static Node* focusedElementAtGestureStart();
explicit UserTypingGestureIndicator(Frame*);
explicit UserTypingGestureIndicator(Frame&);
~UserTypingGestureIndicator();
private:
......
......@@ -1450,7 +1450,7 @@ void Editor::confirmComposition(const String& text)
void Editor::setComposition(const String& text, SetCompositionMode mode)
{
ASSERT(mode == ConfirmComposition || mode == CancelComposition);
UserTypingGestureIndicator typingGestureIndicator(&m_frame);
UserTypingGestureIndicator typingGestureIndicator(m_frame);
setIgnoreCompositionSelectionChange(true);
......@@ -1492,7 +1492,7 @@ void Editor::setComposition(const String& text, SetCompositionMode mode)
void Editor::setComposition(const String& text, const Vector<CompositionUnderline>& underlines, unsigned selectionStart, unsigned selectionEnd)
{
UserTypingGestureIndicator typingGestureIndicator(&m_frame);
UserTypingGestureIndicator typingGestureIndicator(m_frame);
setIgnoreCompositionSelectionChange(true);
......
This diff is collapsed.
......@@ -3302,7 +3302,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
return false;
UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
UserTypingGestureIndicator typingGestureIndicator(m_frame);
UserTypingGestureIndicator typingGestureIndicator(*m_frame);
if (FrameView* view = m_frame->view())
view->resetDeferredRepaintDelay();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment