Diff
Modified: trunk/Source/WebCore/ChangeLog (210108 => 210109)
--- trunk/Source/WebCore/ChangeLog 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/ChangeLog 2016-12-22 21:10:26 UTC (rev 210109)
@@ -1,3 +1,42 @@
+2016-12-22 Andy Estes <[email protected]>
+
+ Make WebCore::EditorInsertAction an enum class
+ https://bugs.webkit.org/show_bug.cgi?id=166424
+
+ Reviewed by Brent Fulgham.
+
+ * editing/AlternativeTextController.cpp:
+ (WebCore::AlternativeTextController::applyDictationAlternative):
+ * editing/Editor.cpp:
+ (WebCore::Editor::pasteAsPlainTextWithPasteboard):
+ (WebCore::Editor::shouldInsertText):
+ (WebCore::Editor::insertTextWithoutSendingTextEvent):
+ (WebCore::Editor::insertLineBreak):
+ (WebCore::Editor::insertParagraphSeparator):
+ (WebCore::Editor::markMisspellingsAfterTypingToWord):
+ (WebCore::Editor::markAndReplaceFor):
+ (WebCore::Editor::changeBackToReplacedString):
+ (WebCore::Editor::transpose):
+ (WebCore::Editor::handleAcceptedCandidate):
+ * editing/EditorInsertAction.h:
+ (): Deleted.
+ * editing/gtk/EditorGtk.cpp:
+ (WebCore::Editor::pasteWithPasteboard):
+ * editing/ios/EditorIOS.mm:
+ (WebCore::Editor::pasteWithPasteboard):
+ (WebCore::Editor::replaceSelectionWithAttributedString):
+ * editing/mac/EditorMac.mm:
+ (WebCore::Editor::pasteWithPasteboard):
+ (WebCore::Editor::replaceNodeFromPasteboard):
+ (WebCore::Editor::replaceSelectionWithAttributedString):
+ * editing/win/EditorWin.cpp:
+ (WebCore::Editor::pasteWithPasteboard):
+ * page/ContextMenuController.cpp:
+ (WebCore::insertUnicodeCharacter):
+ (WebCore::ContextMenuController::contextMenuItemSelected):
+ * page/DragController.cpp:
+ (WebCore::DragController::concludeEditDrag):
+
2016-12-22 Jer Noble <[email protected]>
Only include those parts of AVFoundation.framework which are strictly needed.
Modified: trunk/Source/WebCore/editing/AlternativeTextController.cpp (210108 => 210109)
--- trunk/Source/WebCore/editing/AlternativeTextController.cpp 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/editing/AlternativeTextController.cpp 2016-12-22 21:10:26 UTC (rev 210109)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2008, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2016 Apple Inc. All rights reserved.
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
@@ -729,7 +729,7 @@
#if USE(DICTATION_ALTERNATIVES)
Editor& editor = m_frame.editor();
RefPtr<Range> selection = editor.selectedRange();
- if (!selection || !editor.shouldInsertText(alternativeString, selection.get(), EditorInsertActionPasted))
+ if (!selection || !editor.shouldInsertText(alternativeString, selection.get(), EditorInsertAction::Pasted))
return;
DocumentMarkerController& markers = selection->startContainer().document().markers();
Vector<RenderedDocumentMarker*> dictationAlternativesMarkers = markers.markersInRange(selection.get(), DocumentMarker::DictationAlternatives);
Modified: trunk/Source/WebCore/editing/Editor.cpp (210108 => 210109)
--- trunk/Source/WebCore/editing/Editor.cpp 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/editing/Editor.cpp 2016-12-22 21:10:26 UTC (rev 210109)
@@ -443,7 +443,7 @@
void Editor::pasteAsPlainTextWithPasteboard(Pasteboard& pasteboard)
{
String text = readPlainTextFromPasteboard(pasteboard);
- if (client() && client()->shouldInsertText(text, selectedRange().get(), EditorInsertActionPasted))
+ if (client() && client()->shouldInsertText(text, selectedRange().get(), EditorInsertAction::Pasted))
pasteAsPlainText(text, canSmartReplaceWithPasteboard(pasteboard));
}
@@ -575,7 +575,7 @@
bool Editor::shouldInsertText(const String& text, Range* range, EditorInsertAction action) const
{
- if (m_frame.loader().shouldSuppressKeyboardInput() && action == EditorInsertActionTyped)
+ if (m_frame.loader().shouldSuppressKeyboardInput() && action == EditorInsertAction::Typed)
return false;
return client() && client()->shouldInsertText(text, range, action);
@@ -1091,7 +1091,7 @@
return false;
RefPtr<Range> range = selection.toNormalizedRange();
- if (!shouldInsertText(text, range.get(), EditorInsertActionTyped))
+ if (!shouldInsertText(text, range.get(), EditorInsertAction::Typed))
return true;
updateMarkersForWordsAffectedByEditing(isSpaceOrNewline(text[0]));
@@ -1148,7 +1148,7 @@
if (!canEdit())
return false;
- if (!shouldInsertText("\n", m_frame.selection().toNormalizedRange().get(), EditorInsertActionTyped))
+ if (!shouldInsertText("\n", m_frame.selection().toNormalizedRange().get(), EditorInsertAction::Typed))
return true;
VisiblePosition caret = m_frame.selection().selection().visibleStart();
@@ -1168,7 +1168,7 @@
if (!canEditRichly())
return insertLineBreak();
- if (!shouldInsertText("\n", m_frame.selection().toNormalizedRange().get(), EditorInsertActionTyped))
+ if (!shouldInsertText("\n", m_frame.selection().toNormalizedRange().get(), EditorInsertAction::Typed))
return true;
VisiblePosition caret = m_frame.selection().selection().visibleStart();
@@ -2263,7 +2263,7 @@
m_frame.selection().setSelection(newSelection);
}
- if (!m_frame.editor().shouldInsertText(autocorrectedString, misspellingRange.get(), EditorInsertActionTyped))
+ if (!m_frame.editor().shouldInsertText(autocorrectedString, misspellingRange.get(), EditorInsertAction::Typed))
return;
m_frame.editor().replaceSelectionWithText(autocorrectedString, false, false, EditActionInsert);
@@ -2560,7 +2560,7 @@
restoreSelectionAfterChange = false;
if (canEditRichly())
applyCommand(CreateLinkCommand::create(document(), replacement));
- } else if (canEdit() && shouldInsertText(replacement, rangeToReplace.get(), EditorInsertActionTyped)) {
+ } else if (canEdit() && shouldInsertText(replacement, rangeToReplace.get(), EditorInsertAction::Typed)) {
correctSpellcheckingPreservingTextCheckingParagraph(paragraph, rangeToReplace, replacement, resultLocation, resultLength);
if (AXObjectCache* cache = document().existingAXObjectCache()) {
@@ -2610,7 +2610,7 @@
return;
RefPtr<Range> selection = selectedRange();
- if (!shouldInsertText(replacedString, selection.get(), EditorInsertActionPasted))
+ if (!shouldInsertText(replacedString, selection.get(), EditorInsertAction::Pasted))
return;
m_alternativeTextController->recordAutocorrectionResponseReversed(replacedString, selection);
@@ -2853,7 +2853,7 @@
}
// Insert the transposed characters.
- if (!shouldInsertText(transposed, range.get(), EditorInsertActionTyped))
+ if (!shouldInsertText(transposed, range.get(), EditorInsertAction::Typed))
return;
replaceSelectionWithText(transposed, false, false, EditActionInsert);
}
@@ -3601,7 +3601,7 @@
m_isHandlingAcceptedCandidate = true;
if (auto range = rangeForTextCheckingResult(acceptedCandidate)) {
- if (shouldInsertText(acceptedCandidate.replacement, range.get(), EditorInsertActionTyped)) {
+ if (shouldInsertText(acceptedCandidate.replacement, range.get(), EditorInsertAction::Typed)) {
Ref<ReplaceRangeWithTextCommand> replaceCommand = ReplaceRangeWithTextCommand::create(range.get(), acceptedCandidate.replacement);
applyCommand(replaceCommand.ptr());
}
Modified: trunk/Source/WebCore/editing/EditorInsertAction.h (210108 => 210109)
--- trunk/Source/WebCore/editing/EditorInsertAction.h 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/editing/EditorInsertAction.h 2016-12-22 21:10:26 UTC (rev 210109)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,11 +27,10 @@
namespace WebCore {
-// This must be kept in sync with WebViewInsertAction defined in WebEditingDelegate.h
-enum EditorInsertAction {
- EditorInsertActionTyped,
- EditorInsertActionPasted,
- EditorInsertActionDropped
+enum class EditorInsertAction {
+ Typed,
+ Pasted,
+ Dropped,
};
} // namespace WebCore
Modified: trunk/Source/WebCore/editing/gtk/EditorGtk.cpp (210108 => 210109)
--- trunk/Source/WebCore/editing/gtk/EditorGtk.cpp 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/editing/gtk/EditorGtk.cpp 2016-12-22 21:10:26 UTC (rev 210109)
@@ -76,7 +76,7 @@
bool chosePlainText;
RefPtr<DocumentFragment> fragment = createFragmentFromPasteboardData(*pasteboard, m_frame, *range, allowPlainText, chosePlainText);
- if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPasted))
+ if (fragment && shouldInsertFragment(fragment, range, EditorInsertAction::Pasted))
pasteAsFragment(fragment.releaseNonNull(), canSmartReplaceWithPasteboard(*pasteboard), chosePlainText, mailBlockquoteHandling);
}
Modified: trunk/Source/WebCore/editing/ios/EditorIOS.mm (210108 => 210109)
--- trunk/Source/WebCore/editing/ios/EditorIOS.mm 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/editing/ios/EditorIOS.mm 2016-12-22 21:10:26 UTC (rev 210109)
@@ -530,7 +530,7 @@
fragment = webContentFromPasteboard(*pasteboard, *range, allowPlainText, chosePlainTextIgnored);
}
- if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPasted))
+ if (fragment && shouldInsertFragment(fragment, range, EditorInsertAction::Pasted))
pasteAsFragment(fragment.releaseNonNull(), canSmartReplaceWithPasteboard(*pasteboard), false, mailBlockquoteHandling);
}
@@ -596,11 +596,11 @@
if (m_frame.selection().selection().isContentRichlyEditable()) {
RefPtr<DocumentFragment> fragment = createFragmentAndAddResources(attributedString);
- if (fragment && shouldInsertFragment(fragment, selectedRange(), EditorInsertActionPasted))
+ if (fragment && shouldInsertFragment(fragment, selectedRange(), EditorInsertAction::Pasted))
pasteAsFragment(fragment.releaseNonNull(), false, false, mailBlockquoteHandling);
} else {
String text = [attributedString string];
- if (shouldInsertText(text, selectedRange().get(), EditorInsertActionPasted))
+ if (shouldInsertText(text, selectedRange().get(), EditorInsertAction::Pasted))
pasteAsPlainText(text, false);
}
}
Modified: trunk/Source/WebCore/editing/mac/EditorMac.mm (210108 => 210109)
--- trunk/Source/WebCore/editing/mac/EditorMac.mm 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/editing/mac/EditorMac.mm 2016-12-22 21:10:26 UTC (rev 210109)
@@ -99,7 +99,7 @@
bool chosePlainText;
RefPtr<DocumentFragment> fragment = webContentFromPasteboard(*pasteboard, *range, allowPlainText, chosePlainText);
- if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPasted))
+ if (fragment && shouldInsertFragment(fragment, range, EditorInsertAction::Pasted))
pasteAsFragment(fragment.releaseNonNull(), canSmartReplaceWithPasteboard(*pasteboard), false, mailBlockquoteHandling);
client()->setInsertionPasteboard(String());
@@ -279,7 +279,7 @@
bool chosePlainText;
if (RefPtr<DocumentFragment> fragment = webContentFromPasteboard(pasteboard, *range, true, chosePlainText)) {
maybeCopyNodeAttributesToFragment(*node, *fragment);
- if (shouldInsertFragment(fragment, range, EditorInsertActionPasted))
+ if (shouldInsertFragment(fragment, range, EditorInsertAction::Pasted))
pasteAsFragment(fragment.releaseNonNull(), canSmartReplaceWithPasteboard(pasteboard), false, MailBlockquoteHandling::IgnoreBlockquote);
}
@@ -724,11 +724,11 @@
if (m_frame.selection().selection().isContentRichlyEditable()) {
RefPtr<DocumentFragment> fragment = createFragmentAndAddResources(attributedString);
- if (fragment && shouldInsertFragment(fragment, selectedRange(), EditorInsertActionPasted))
+ if (fragment && shouldInsertFragment(fragment, selectedRange(), EditorInsertAction::Pasted))
pasteAsFragment(fragment.releaseNonNull(), false, false, mailBlockquoteHandling);
} else {
String text = [attributedString string];
- if (shouldInsertText(text, selectedRange().get(), EditorInsertActionPasted))
+ if (shouldInsertText(text, selectedRange().get(), EditorInsertAction::Pasted))
pasteAsPlainText(text, false);
}
}
Modified: trunk/Source/WebCore/editing/win/EditorWin.cpp (210108 => 210109)
--- trunk/Source/WebCore/editing/win/EditorWin.cpp 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/editing/win/EditorWin.cpp 2016-12-22 21:10:26 UTC (rev 210109)
@@ -43,7 +43,7 @@
bool chosePlainText;
RefPtr<DocumentFragment> fragment = pasteboard->documentFragment(m_frame, *range, allowPlainText, chosePlainText);
- if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPasted))
+ if (fragment && shouldInsertFragment(fragment, range, EditorInsertAction::Pasted))
pasteAsFragment(fragment.releaseNonNull(), canSmartReplaceWithPasteboard(*pasteboard), chosePlainText, mailBlockquoteHandling);
}
Modified: trunk/Source/WebCore/page/ContextMenuController.cpp (210108 => 210109)
--- trunk/Source/WebCore/page/ContextMenuController.cpp 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/page/ContextMenuController.cpp 2016-12-22 21:10:26 UTC (rev 210109)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006-2007, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2016 Apple Inc. All rights reserved.
* Copyright (C) 2010 Igalia S.L
*
* Redistribution and use in source and binary forms, with or without
@@ -202,7 +202,7 @@
static void insertUnicodeCharacter(UChar character, Frame* frame)
{
String text(&character, 1);
- if (!frame->editor().shouldInsertText(text, frame->selection().toNormalizedRange().get(), EditorInsertActionTyped))
+ if (!frame->editor().shouldInsertText(text, frame->selection().toNormalizedRange().get(), EditorInsertAction::Typed))
return;
ASSERT(frame->document());
@@ -356,7 +356,7 @@
#endif
case ContextMenuItemTagSpellingGuess: {
VisibleSelection selection = frame->selection().selection();
- if (frame->editor().shouldInsertText(title, selection.toNormalizedRange().get(), EditorInsertActionPasted)) {
+ if (frame->editor().shouldInsertText(title, selection.toNormalizedRange().get(), EditorInsertAction::Pasted)) {
ReplaceSelectionCommand::CommandOptions replaceOptions = ReplaceSelectionCommand::MatchStyle | ReplaceSelectionCommand::PreventNesting;
if (frame->editor().behavior().shouldAllowSpellingSuggestionsWithoutSelection()) {
Modified: trunk/Source/WebCore/page/DragController.cpp (210108 => 210109)
--- trunk/Source/WebCore/page/DragController.cpp 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebCore/page/DragController.cpp 2016-12-22 21:10:26 UTC (rev 210109)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007, 2009-2010, 2013, 2015-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -514,7 +514,7 @@
if (dragIsMove(innerFrame->selection(), dragData) || dragCaret.isContentRichlyEditable()) {
bool chosePlainText = false;
RefPtr<DocumentFragment> fragment = documentFragmentFromDragData(dragData, *innerFrame, *range, true, chosePlainText);
- if (!fragment || !innerFrame->editor().shouldInsertFragment(fragment, range, EditorInsertActionDropped)) {
+ if (!fragment || !innerFrame->editor().shouldInsertFragment(fragment, range, EditorInsertAction::Dropped)) {
return false;
}
@@ -537,7 +537,7 @@
}
} else {
String text = dragData.asPlainText();
- if (text.isEmpty() || !innerFrame->editor().shouldInsertText(text, range.get(), EditorInsertActionDropped)) {
+ if (text.isEmpty() || !innerFrame->editor().shouldInsertText(text, range.get(), EditorInsertAction::Dropped)) {
return false;
}
Modified: trunk/Source/WebKit/mac/ChangeLog (210108 => 210109)
--- trunk/Source/WebKit/mac/ChangeLog 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebKit/mac/ChangeLog 2016-12-22 21:10:26 UTC (rev 210109)
@@ -1,3 +1,13 @@
+2016-12-22 Andy Estes <[email protected]>
+
+ Make WebCore::EditorInsertAction an enum class
+ https://bugs.webkit.org/show_bug.cgi?id=166424
+
+ Reviewed by Brent Fulgham.
+
+ * WebCoreSupport/WebEditorClient.mm:
+ (kit):
+
2016-12-21 Beth Dakin <[email protected]>
Holding down on candidates in the TouchBar should show panel on screen
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (210108 => 210109)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm 2016-12-22 21:10:26 UTC (rev 210109)
@@ -102,9 +102,16 @@
- (DOMDocumentFragment *)_documentFromRange:(NSRange)range document:(DOMDocument *)document documentAttributes:(NSDictionary *)attributes subresources:(NSArray **)subresources;
@end
-static WebViewInsertAction kit(EditorInsertAction coreAction)
+static WebViewInsertAction kit(EditorInsertAction action)
{
- return static_cast<WebViewInsertAction>(coreAction);
+ switch (action) {
+ case EditorInsertAction::Typed:
+ return WebViewInsertActionTyped;
+ case EditorInsertAction::Pasted:
+ return WebViewInsertActionPasted;
+ case EditorInsertAction::Dropped:
+ return WebViewInsertActionDropped;
+ }
}
@interface WebUndoStep : NSObject
Modified: trunk/Source/WebKit/win/ChangeLog (210108 => 210109)
--- trunk/Source/WebKit/win/ChangeLog 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebKit/win/ChangeLog 2016-12-22 21:10:26 UTC (rev 210109)
@@ -1,3 +1,15 @@
+2016-12-22 Andy Estes <[email protected]>
+
+ Make WebCore::EditorInsertAction an enum class
+ https://bugs.webkit.org/show_bug.cgi?id=166424
+
+ Reviewed by Brent Fulgham.
+
+ * WebCoreSupport/WebEditorClient.cpp:
+ (kit):
+ (WebEditorClient::shouldInsertNode):
+ (WebEditorClient::shouldInsertText):
+
2016-12-19 Yusuke Suzuki <[email protected]>
[ES6] Enable ES6 Modules
Modified: trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp (210108 => 210109)
--- trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp 2016-12-22 21:10:26 UTC (rev 210109)
@@ -284,6 +284,21 @@
return shouldDelete;
}
+static WebViewInsertAction kit(EditorInsertAction action)
+{
+ switch (action) {
+ case EditorInsertAction::Typed:
+ return WebViewInsertActionTyped;
+ case EditorInsertAction::Pasted:
+ return WebViewInsertActionPasted;
+ case EditorInsertAction::Dropped:
+ return WebViewInsertActionDropped;
+ }
+
+ ASSERT_NOT_REACHED();
+ return WebViewInsertActionTyped;
+}
+
bool WebEditorClient::shouldInsertNode(Node* node, Range* insertingRange, EditorInsertAction givenAction)
{
COMPtr<IWebEditingDelegate> editingDelegate;
@@ -301,7 +316,7 @@
BOOL shouldInsert = FALSE;
COMPtr<IWebEditingDelegate2> editingDelegate2(Query, editingDelegate);
if (editingDelegate2) {
- if (FAILED(editingDelegate2->shouldInsertNode(m_webView, insertDOMNode.get(), insertingDOMRange.get(), static_cast<WebViewInsertAction>(givenAction), &shouldInsert)))
+ if (FAILED(editingDelegate2->shouldInsertNode(m_webView, insertDOMNode.get(), insertingDOMRange.get(), kit(givenAction), &shouldInsert)))
return true;
}
@@ -320,7 +335,7 @@
BString text(str);
BOOL shouldInsert = FALSE;
- if (FAILED(editingDelegate->shouldInsertText(m_webView, text, insertingDOMRange.get(), static_cast<WebViewInsertAction>(givenAction), &shouldInsert)))
+ if (FAILED(editingDelegate->shouldInsertText(m_webView, text, insertingDOMRange.get(), kit(givenAction), &shouldInsert)))
return true;
return shouldInsert;
Modified: trunk/Source/WebKit2/ChangeLog (210108 => 210109)
--- trunk/Source/WebKit2/ChangeLog 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebKit2/ChangeLog 2016-12-22 21:10:26 UTC (rev 210109)
@@ -1,3 +1,15 @@
+2016-12-22 Andy Estes <[email protected]>
+
+ Make WebCore::EditorInsertAction an enum class
+ https://bugs.webkit.org/show_bug.cgi?id=166424
+
+ Reviewed by Brent Fulgham.
+
+ * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
+ (WebKit::toAPI):
+ * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
+ (toWK):
+
2016-12-22 Zhuo Li <[email protected]>
[Cocoa] SPI for setloadsImagesAutomatically
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h (210108 => 210109)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h 2016-12-22 21:10:26 UTC (rev 210109)
@@ -23,8 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WKBundleAPICast_h
-#define WKBundleAPICast_h
+#pragma once
#include "WKSharedAPICast.h"
#include "WKBundlePage.h"
@@ -74,11 +73,11 @@
inline WKInsertActionType toAPI(WebCore::EditorInsertAction action)
{
switch (action) {
- case WebCore::EditorInsertActionTyped:
+ case WebCore::EditorInsertAction::Typed:
return kWKInsertActionTyped;
- case WebCore::EditorInsertActionPasted:
+ case WebCore::EditorInsertAction::Pasted:
return kWKInsertActionPasted;
- case WebCore::EditorInsertActionDropped:
+ case WebCore::EditorInsertAction::Dropped:
return kWKInsertActionDropped;
}
ASSERT_NOT_REACHED();
@@ -98,5 +97,3 @@
}
} // namespace WebKit
-
-#endif // WKBundleAPICast_h
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm (210108 => 210109)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm 2016-12-22 20:45:09 UTC (rev 210108)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm 2016-12-22 21:10:26 UTC (rev 210109)
@@ -576,11 +576,11 @@
static inline WKEditorInsertAction toWK(EditorInsertAction action)
{
switch (action) {
- case EditorInsertActionTyped:
+ case EditorInsertAction::Typed:
return WKEditorInsertActionTyped;
- case EditorInsertActionPasted:
+ case EditorInsertAction::Pasted:
return WKEditorInsertActionPasted;
- case EditorInsertActionDropped:
+ case EditorInsertAction::Dropped:
return WKEditorInsertActionDropped;
}
}