summaryrefslogtreecommitdiffstats
path: root/WebCore/editing/Editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/editing/Editor.cpp')
-rw-r--r--WebCore/editing/Editor.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 8041159..8ae1313 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -63,6 +63,7 @@
#include "RenderBlock.h"
#include "RenderPart.h"
#include "ReplaceSelectionCommand.h"
+#include "Settings.h"
#include "Sound.h"
#include "Text.h"
#include "TextIterator.h"
@@ -97,6 +98,15 @@ VisibleSelection Editor::selectionForCommand(Event* event)
return selection;
}
+// Function considers Mac editing behavior a fallback when Page or Settings is not available.
+EditingBehavior Editor::behavior() const
+{
+ if (!m_frame || !m_frame->settings())
+ return EditingBehavior(EditingMacBehavior);
+
+ return EditingBehavior(m_frame->settings()->editingBehaviorType());
+}
+
EditorClient* Editor::client() const
{
if (Page* page = m_frame->page())