Title: [173235] trunk/Source
Revision
173235
Author
[email protected]
Date
2014-09-03 15:15:29 -0700 (Wed, 03 Sep 2014)

Log Message

Remove PLATFORM(IOS) from WebCore/editing (Part 1).
https://bugs.webkit.org/show_bug.cgi?id=136474

Reviewed by Tim Horton.

Source/WebCore:

This is the first part of the work to remove PLATFORM(IOS) everywhere
in the editing code.

* dom/Range.cpp:
(WebCore::Range::create): Adding create function that takes VisiblePosition.
* dom/Range.h:
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::apply):
(WebCore::CompositeEditCommand::inputText):
* editing/CompositeEditCommand.h:
* editing/DeleteButton.h: No need for the platform guard since it is already under
DELETION_UI
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::enable):
(WebCore::DeleteButtonController::disable):
* editing/EditAction.h:
* editing/EditCommand.h:
(WebCore::EditCommand::isInsertTextCommand):
* editing/Editor.cpp:
(WebCore::ClearTextCommand::CreateAndApply):
* editing/Editor.h:
* editing/EditorCommand.cpp:
(WebCore::executeClearText):
(WebCore::enabledCopy):
(WebCore::enabledCut):
(WebCore::enabledClearText):
(WebCore::createCommandMap):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::modifyExtendingRight):
(WebCore::FrameSelection::modifyExtendingForward):
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingForward):
(WebCore::FrameSelection::modifyExtendingLeft):
(WebCore::FrameSelection::modifyExtendingBackward):
(WebCore::FrameSelection::modifyMovingLeft):
(WebCore::FrameSelection::modifyMovingBackward):
* editing/InsertTextCommand.h:
* editing/TextCheckingHelper.cpp:
* editing/TextGranularity.h:
* editing/VisiblePosition.h:
(WebCore::operator>=):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
* editing/VisibleUnits.cpp:
* editing/VisibleUnits.h:

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.mm:
(undoNameForEditAction):

Source/WebKit2:

* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173234 => 173235)


--- trunk/Source/WebCore/ChangeLog	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/ChangeLog	2014-09-03 22:15:29 UTC (rev 173235)
@@ -1,3 +1,56 @@
+2014-09-03  Enrica Casucci  <[email protected]>
+
+        Remove PLATFORM(IOS) from WebCore/editing (Part 1).
+        https://bugs.webkit.org/show_bug.cgi?id=136474
+
+        Reviewed by Tim Horton.
+
+        This is the first part of the work to remove PLATFORM(IOS) everywhere
+        in the editing code.
+
+        * dom/Range.cpp:
+        (WebCore::Range::create): Adding create function that takes VisiblePosition.
+        * dom/Range.h:
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::CompositeEditCommand::apply):
+        (WebCore::CompositeEditCommand::inputText):
+        * editing/CompositeEditCommand.h:
+        * editing/DeleteButton.h: No need for the platform guard since it is already under
+        DELETION_UI
+        * editing/DeleteButtonController.cpp:
+        (WebCore::DeleteButtonController::enable):
+        (WebCore::DeleteButtonController::disable):
+        * editing/EditAction.h:
+        * editing/EditCommand.h:
+        (WebCore::EditCommand::isInsertTextCommand):
+        * editing/Editor.cpp:
+        (WebCore::ClearTextCommand::CreateAndApply):
+        * editing/Editor.h:
+        * editing/EditorCommand.cpp:
+        (WebCore::executeClearText):
+        (WebCore::enabledCopy):
+        (WebCore::enabledCut):
+        (WebCore::enabledClearText):
+        (WebCore::createCommandMap):
+        * editing/FrameSelection.cpp:
+        (WebCore::FrameSelection::modifyExtendingRight):
+        (WebCore::FrameSelection::modifyExtendingForward):
+        (WebCore::FrameSelection::modifyMovingRight):
+        (WebCore::FrameSelection::modifyMovingForward):
+        (WebCore::FrameSelection::modifyExtendingLeft):
+        (WebCore::FrameSelection::modifyExtendingBackward):
+        (WebCore::FrameSelection::modifyMovingLeft):
+        (WebCore::FrameSelection::modifyMovingBackward):
+        * editing/InsertTextCommand.h:
+        * editing/TextCheckingHelper.cpp:
+        * editing/TextGranularity.h:
+        * editing/VisiblePosition.h:
+        (WebCore::operator>=):
+        * editing/VisibleSelection.cpp:
+        (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
+        * editing/VisibleUnits.cpp:
+        * editing/VisibleUnits.h:
+
 2014-09-03  Anders Carlsson  <[email protected]>
 
         Get rid of some uses of OwnPtr

Modified: trunk/Source/WebCore/dom/Range.cpp (173234 => 173235)


--- trunk/Source/WebCore/dom/Range.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/dom/Range.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -109,14 +109,12 @@
     return adoptRef(new Range(toDocument(context)));
 }
 
-#if PLATFORM(IOS)
 PassRefPtr<Range> Range::create(Document& ownerDocument, const VisiblePosition& visibleStart, const VisiblePosition& visibleEnd)
 {
     Position start = visibleStart.deepEquivalent().parentAnchoredEquivalent();
     Position end = visibleEnd.deepEquivalent().parentAnchoredEquivalent();
     return adoptRef(new Range(ownerDocument, start.anchorNode(), start.deprecatedEditingOffset(), end.anchorNode(), end.deprecatedEditingOffset()));
 }
-#endif
 
 Range::~Range()
 {

Modified: trunk/Source/WebCore/dom/Range.h (173234 => 173235)


--- trunk/Source/WebCore/dom/Range.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/dom/Range.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -45,9 +45,9 @@
 class Node;
 class NodeWithIndex;
 class Text;
+class VisiblePosition;
 #if PLATFORM(IOS)
 class SelectionRect;
-class VisiblePosition;
 #endif
 
 class Range : public RefCounted<Range> {
@@ -56,10 +56,7 @@
     WEBCORE_EXPORT static PassRefPtr<Range> create(Document&, PassRefPtr<Node> startContainer, int startOffset, PassRefPtr<Node> endContainer, int endOffset);
     WEBCORE_EXPORT static PassRefPtr<Range> create(Document&, const Position&, const Position&);
     WEBCORE_EXPORT static PassRefPtr<Range> create(ScriptExecutionContext&);
-#if PLATFORM(IOS)
-    // FIXME: Consider making this a static non-member, non-friend function.
     WEBCORE_EXPORT static PassRefPtr<Range> create(Document&, const VisiblePosition&, const VisiblePosition&);
-#endif
     WEBCORE_EXPORT ~Range();
 
     Document& ownerDocument() const { return const_cast<Document&>(m_ownerDocument.get()); }

Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (173234 => 173235)


--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -28,6 +28,7 @@
 
 #include "AppendNodeCommand.h"
 #include "ApplyStyleCommand.h"
+#include "BreakBlockquoteCommand.h"
 #include "DeleteFromTextNodeCommand.h"
 #include "DeleteSelectionCommand.h"
 #include "Document.h"
@@ -72,9 +73,6 @@
 #include "DeleteButtonController.h"
 #endif
 
-#if PLATFORM(IOS)
-#include "BreakBlockquoteCommand.h"
-#endif
 
 namespace WebCore {
 
@@ -202,10 +200,8 @@
         case EditActionSetWritingDirection:
         case EditActionCut:
         case EditActionUnspecified:
-#if PLATFORM(IOS)
         case EditActionDelete:
         case EditActionDictation:
-#endif
             break;
         default:
             ASSERT_NOT_REACHED();
@@ -502,7 +498,6 @@
     applyCommandToComposite(SplitTextNodeContainingElementCommand::create(text, offset));
 }
 
-#if PLATFORM(IOS)
 void CompositeEditCommand::inputText(const String& text, bool selectInsertedText)
 {
     unsigned offset = 0;
@@ -543,7 +538,6 @@
     if (selectInsertedText)
         setEndingSelection(VisibleSelection(visiblePositionForIndex(startIndex, scope.get()), visiblePositionForIndex(startIndex + length, scope.get())));
 }
-#endif
 
 void CompositeEditCommand::insertTextIntoNode(PassRefPtr<Text> node, unsigned offset, const String& text)
 {

Modified: trunk/Source/WebCore/editing/CompositeEditCommand.h (173234 => 173235)


--- trunk/Source/WebCore/editing/CompositeEditCommand.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -104,9 +104,7 @@
     void deleteSelection(bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = true, bool sanitizeMarkup = true);
     void deleteSelection(const VisibleSelection&, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool replace = false, bool expandForSpecialElements = true, bool sanitizeMarkup = true);
     virtual void deleteTextFromNode(PassRefPtr<Text>, unsigned offset, unsigned count);
-#if PLATFORM(IOS)
     void inputText(const String&, bool selectInsertedText = false);
-#endif
     bool isRemovableBlock(const Node*);
     void insertNodeAfter(PassRefPtr<Node>, PassRefPtr<Node> refChild);
     void insertNodeAt(PassRefPtr<Node>, const Position&);

Modified: trunk/Source/WebCore/editing/DeleteButton.h (173234 => 173235)


--- trunk/Source/WebCore/editing/DeleteButton.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/DeleteButton.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -34,9 +34,7 @@
 public:
     static PassRefPtr<DeleteButton> create(Document&);
 
-#if !PLATFORM(IOS)
     virtual bool willRespondToMouseClickEvents() override { return true; }
-#endif // !PLATFORM(IOS)
 
 private:
     explicit DeleteButton(Document&);

Modified: trunk/Source/WebCore/editing/DeleteButtonController.cpp (173234 => 173235)


--- trunk/Source/WebCore/editing/DeleteButtonController.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/DeleteButtonController.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -330,7 +330,6 @@
 
 void DeleteButtonController::enable()
 {
-#if !PLATFORM(IOS)
     ASSERT(m_disableStack > 0);
     if (m_disableStack > 0)
         m_disableStack--;
@@ -341,16 +340,13 @@
         m_frame.document()->updateStyleIfNeeded();
         show(enclosingDeletableElement(m_frame.selection().selection()));
     }
-#endif
 }
 
 void DeleteButtonController::disable()
 {
-#if !PLATFORM(IOS)
     if (enabled())
         hide();
     m_disableStack++;
-#endif
 }
 
 class RemoveTargetCommand : public CompositeEditCommand {

Modified: trunk/Source/WebCore/editing/EditAction.h (173234 => 173235)


--- trunk/Source/WebCore/editing/EditAction.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/EditAction.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -57,10 +57,8 @@
         EditActionCut,
         EditActionBold,
         EditActionItalics,
-#if PLATFORM(IOS)
         EditActionDelete,
         EditActionDictation,
-#endif
         EditActionPaste,
         EditActionPasteFont,
         EditActionPasteRuler,

Modified: trunk/Source/WebCore/editing/EditCommand.h (173234 => 173235)


--- trunk/Source/WebCore/editing/EditCommand.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/EditCommand.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -51,10 +51,7 @@
     const VisibleSelection& startingSelection() const { return m_startingSelection; }
     const VisibleSelection& endingSelection() const { return m_endingSelection; }
 
-#if PLATFORM(IOS)
-    virtual bool isInsertTextCommand() const { return false; }
-#endif
-    
+    virtual bool isInsertTextCommand() const { return false; }    
     virtual bool isSimpleEditCommand() const { return false; }
     virtual bool isCompositeEditCommand() const { return false; }
     virtual bool isEditCommandComposition() const { return false; }

Modified: trunk/Source/WebCore/editing/Editor.cpp (173234 => 173235)


--- trunk/Source/WebCore/editing/Editor.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/Editor.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -104,7 +104,6 @@
 
 namespace WebCore {
 
-#if PLATFORM(IOS)
 class ClearTextCommand : public DeleteSelectionCommand {
 public:
     ClearTextCommand(Document& document);
@@ -138,7 +137,6 @@
     clearCommand->setStartingSelection(oldSelection);
     applyCommand(clearCommand.release());
 }
-#endif
 
 using namespace HTMLNames;
 using namespace WTF;
@@ -442,12 +440,12 @@
     applyCommand(DeleteSelectionCommand::create(document(), smartDelete));
 }
 
-#if PLATFORM(IOS)
 void Editor::clearText()
 {
     ClearTextCommand::CreateAndApply(&m_frame);
 }
 
+#if PLATFORM(IOS)
 void Editor::insertDictationPhrases(PassOwnPtr<Vector<Vector<String> > > dictationPhrases, RetainPtr<id> metadata)
 {
     if (m_frame.selection().isNone())

Modified: trunk/Source/WebCore/editing/Editor.h (173234 => 173235)


--- trunk/Source/WebCore/editing/Editor.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/Editor.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -175,8 +175,8 @@
 
     WEBCORE_EXPORT bool deleteWithDirection(SelectionDirection, TextGranularity, bool killRing, bool isTypingAction);
     WEBCORE_EXPORT void deleteSelectionWithSmartDelete(bool smartDelete);
+    void clearText();
 #if PLATFORM(IOS)
-    void clearText();
     WEBCORE_EXPORT void removeUnchangeableStyles();
 #endif
     

Modified: trunk/Source/WebCore/editing/EditorCommand.cpp (173234 => 173235)


--- trunk/Source/WebCore/editing/EditorCommand.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/EditorCommand.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -302,13 +302,11 @@
     return true;
 }
 
-#if PLATFORM(IOS)
 static bool executeClearText(Frame& frame, Event*, EditorCommandSource, const String&)
 {
     frame.editor().clearText();
     return true;
 }
-#endif
 
 static bool executeDefaultParagraphSeparator(Frame& frame, Event*, EditorCommandSource, const String& value)
 {
@@ -1245,29 +1243,19 @@
 
 static bool enabledCopy(Frame& frame, Event*, EditorCommandSource)
 {
-#if !PLATFORM(IOS)
     return frame.editor().canDHTMLCopy() || frame.editor().canCopy();
-#else
-    return frame.editor().canCopy();
-#endif
 }
 
 static bool enabledCut(Frame& frame, Event*, EditorCommandSource)
 {
-#if !PLATFORM(IOS)
     return frame.editor().canDHTMLCut() || frame.editor().canCut();
-#else
-    return frame.editor().canCut();
-#endif
 }
 
-#if PLATFORM(IOS)
 static bool enabledClearText(Frame& frame, Event*, EditorCommandSource)
 {
     UNUSED_PARAM(frame);
     return false;
 }
-#endif
 
 static bool enabledInEditableText(Frame& frame, Event* event, EditorCommandSource)
 {
@@ -1492,6 +1480,7 @@
         { "AlignRight", { executeJustifyRight, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
         { "BackColor", { executeBackColor, supported, enabledInRichlyEditableText, stateNone, valueBackColor, notTextInsertion, doNotAllowExecutionWhenDisabled } },
         { "Bold", { executeToggleBold, supported, enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
+        { "ClearText", { executeClearText, supported, enabledClearText, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
         { "Copy", { executeCopy, supportedCopyCut, enabledCopy, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
         { "CreateLink", { executeCreateLink, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
         { "Cut", { executeCut, supportedCopyCut, enabledCut, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
@@ -1630,9 +1619,6 @@
 #if PLATFORM(MAC)
         { "TakeFindStringFromSelection", { executeTakeFindStringFromSelection, supportedFromMenuOrKeyBinding, enabledTakeFindStringFromSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
 #endif
-#if PLATFORM(IOS)
-        { "ClearText", { executeClearText, supported, enabledClearText, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
-#endif
     };
 
     // These unsupported commands are listed here since they appear in the Microsoft

Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (173234 => 173235)


--- trunk/Source/WebCore/editing/FrameSelection.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -700,11 +700,9 @@
         // FIXME: implement all of the above?
         pos = modifyExtendingForward(granularity);
         break;
-#if PLATFORM(IOS)
     case DocumentGranularity:
         ASSERT_NOT_REACHED();
         break;
-#endif
     }
 #if ENABLE(USERSELECT_ALL)
     adjustPositionForUserSelectAll(pos, directionOfEnclosingBlock() == LTR);
@@ -731,11 +729,9 @@
     case ParagraphGranularity:
         pos = nextParagraphPosition(pos, lineDirectionPointForBlockDirectionNavigation(EXTENT));
         break;
-#if PLATFORM(IOS)
     case DocumentGranularity:
         ASSERT_NOT_REACHED();
         break;
-#endif
     case SentenceBoundary:
         pos = endOfSentence(endForPlatform());
         break;
@@ -791,11 +787,9 @@
     case LineBoundary:
         pos = rightBoundaryOfLine(startForPlatform(), directionOfEnclosingBlock());
         break;
-#if PLATFORM(IOS)
     case DocumentGranularity:
         ASSERT_NOT_REACHED();
         break;
-#endif
     }
     return pos;
 }
@@ -828,11 +822,9 @@
     case ParagraphGranularity:
         pos = nextParagraphPosition(endForPlatform(), lineDirectionPointForBlockDirectionNavigation(START));
         break;
-#if PLATFORM(IOS)
     case DocumentGranularity:
         ASSERT_NOT_REACHED();
         break;
-#endif
     case SentenceBoundary:
         pos = endOfSentence(endForPlatform());
         break;
@@ -889,11 +881,9 @@
     case DocumentBoundary:
         pos = modifyExtendingBackward(granularity);
         break;
-#if PLATFORM(IOS)
     case DocumentGranularity:
         ASSERT_NOT_REACHED();
         break;
-#endif
     }
 #if ENABLE(USERSELECT_ALL)
     adjustPositionForUserSelectAll(pos, !(directionOfEnclosingBlock() == LTR));
@@ -941,11 +931,9 @@
         else
             pos = startOfDocument(pos);
         break;
-#if PLATFORM(IOS)
     case DocumentGranularity:
         ASSERT_NOT_REACHED();
         break;
-#endif
     }
 #if ENABLE(USERSELECT_ALL)
     adjustPositionForUserSelectAll(pos, !(directionOfEnclosingBlock() == LTR));
@@ -983,11 +971,9 @@
     case LineBoundary:
         pos = leftBoundaryOfLine(startForPlatform(), directionOfEnclosingBlock());
         break;
-#if PLATFORM(IOS)
     case DocumentGranularity:
         ASSERT_NOT_REACHED();
         break;
-#endif
     }
     return pos;
 }
@@ -1030,11 +1016,9 @@
         else
             pos = startOfDocument(pos);
         break;
-#if PLATFORM(IOS)
     case DocumentGranularity:
         ASSERT_NOT_REACHED();
         break;
-#endif
     }
     return pos;
 }

Modified: trunk/Source/WebCore/editing/InsertTextCommand.h (173234 => 173235)


--- trunk/Source/WebCore/editing/InsertTextCommand.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/InsertTextCommand.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -68,9 +68,7 @@
 
     virtual void doApply();
 
-#if PLATFORM(IOS)
     virtual bool isInsertTextCommand() const override { return true; }
-#endif
 
     Position positionInsideTextNode(const Position&);
     Position insertTab(const Position&);

Modified: trunk/Source/WebCore/editing/TextCheckingHelper.cpp (173234 => 173235)


--- trunk/Source/WebCore/editing/TextCheckingHelper.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/TextCheckingHelper.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -240,8 +240,6 @@
 {
 }
 
-#if !PLATFORM(IOS)
-
 String TextCheckingHelper::findFirstMisspelling(int& firstMisspellingOffset, bool markAll, RefPtr<Range>& firstMisspellingRange)
 {
     firstMisspellingOffset = 0;
@@ -421,8 +419,6 @@
     return firstFoundItem;
 }
 
-#endif // !PLATFORM(IOS)
-
 #if USE(GRAMMAR_CHECKING)
 
 int TextCheckingHelper::findFirstGrammarDetail(const Vector<GrammarDetail>& grammarDetails, int badGrammarPhraseLocation, int startOffset, int endOffset, bool markAll) const
@@ -622,8 +618,6 @@
     return guesses;
 }
 
-#if !PLATFORM(IOS)
-
 void TextCheckingHelper::markAllMisspellings(RefPtr<Range>& firstMisspellingRange)
 {
     // Use the "markAll" feature of findFirstMisspelling. Ignore the return value and the "out parameter";
@@ -643,8 +637,6 @@
 }
 #endif
 
-#endif // !PLATFORM(IOS)
-
 bool TextCheckingHelper::unifiedTextCheckerEnabled() const
 {
     return m_range && WebCore::unifiedTextCheckerEnabled(m_range->ownerDocument().frame());

Modified: trunk/Source/WebCore/editing/TextGranularity.h (173234 => 173235)


--- trunk/Source/WebCore/editing/TextGranularity.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/TextGranularity.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -36,9 +36,7 @@
     SentenceGranularity,
     LineGranularity,
     ParagraphGranularity,
-#if PLATFORM(IOS)
     DocumentGranularity,
-#endif
     SentenceBoundary,
     LineBoundary,
     ParagraphBoundary,

Modified: trunk/Source/WebCore/editing/VisiblePosition.h (173234 => 173235)


--- trunk/Source/WebCore/editing/VisiblePosition.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/VisiblePosition.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -128,7 +128,6 @@
     return !(a == b);
 }
     
-#if PLATFORM(IOS)
 inline bool operator<(const VisiblePosition& a, const VisiblePosition& b)
 {
     return a.deepEquivalent() < b.deepEquivalent();
@@ -148,7 +147,6 @@
 {
     return a.deepEquivalent() >= b.deepEquivalent();
 }    
-#endif
 
 WEBCORE_EXPORT PassRefPtr<Range> makeRange(const VisiblePosition&, const VisiblePosition&);
 bool setStart(Range*, const VisiblePosition&);

Modified: trunk/Source/WebCore/editing/VisibleSelection.cpp (173234 => 173235)


--- trunk/Source/WebCore/editing/VisibleSelection.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/VisibleSelection.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -393,11 +393,9 @@
             m_start = startOfSentence(VisiblePosition(m_start, m_affinity)).deepEquivalent();
             m_end = endOfSentence(VisiblePosition(m_end, m_affinity)).deepEquivalent();
             break;
-#if PLATFORM(IOS)
         case DocumentGranularity:
             ASSERT_NOT_REACHED();
             break;
-#endif
     }
     
     // Make sure we do not have a dangling start or end.

Modified: trunk/Source/WebCore/editing/VisibleUnits.cpp (173234 => 173235)


--- trunk/Source/WebCore/editing/VisibleUnits.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/VisibleUnits.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -1445,8 +1445,6 @@
     return direction == LTR ? logicalEndOfLine(c) : logicalStartOfLine(c);
 }
 
-#if PLATFORM(IOS)
-
 static bool directionIsDownstream(SelectionDirection direction)
 {
     if (direction == DirectionBackward)
@@ -1921,6 +1919,4 @@
     return result;
 }
 
-#endif
-
 }

Modified: trunk/Source/WebCore/editing/VisibleUnits.h (173234 => 173235)


--- trunk/Source/WebCore/editing/VisibleUnits.h	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebCore/editing/VisibleUnits.h	2014-09-03 22:15:29 UTC (rev 173235)
@@ -96,7 +96,6 @@
 WEBCORE_EXPORT VisiblePosition endOfEditableContent(const VisiblePosition&);
 WEBCORE_EXPORT bool isEndOfEditableOrNonEditableContent(const VisiblePosition&);
 
-#if PLATFORM(IOS)
 WEBCORE_EXPORT bool atBoundaryOfGranularity(const VisiblePosition&, TextGranularity, SelectionDirection);
 WEBCORE_EXPORT bool withinTextUnitOfGranularity(const VisiblePosition&, TextGranularity, SelectionDirection);
 WEBCORE_EXPORT VisiblePosition positionOfNextBoundaryOfGranularity(const VisiblePosition&, TextGranularity, SelectionDirection);
@@ -105,7 +104,6 @@
 WEBCORE_EXPORT PassRefPtr<Range> wordRangeFromPosition(const VisiblePosition& position);
 WEBCORE_EXPORT VisiblePosition closestWordBoundaryForPosition(const VisiblePosition& position);
 WEBCORE_EXPORT void charactersAroundPosition(const VisiblePosition&, UChar32& oneAfter, UChar32& oneBefore, UChar32& twoBefore);
-#endif
 } // namespace WebCore
 
 #endif // VisibleUnits_h

Modified: trunk/Source/WebKit/mac/ChangeLog (173234 => 173235)


--- trunk/Source/WebKit/mac/ChangeLog	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-09-03 22:15:29 UTC (rev 173235)
@@ -1,3 +1,13 @@
+2014-09-03  Enrica Casucci  <[email protected]>
+
+        Remove PLATFORM(IOS) from WebCore/editing (Part 1).
+        https://bugs.webkit.org/show_bug.cgi?id=136474
+
+        Reviewed by Tim Horton.
+
+        * WebCoreSupport/WebEditorClient.mm:
+        (undoNameForEditAction):
+
 2014-09-02  Maciej Stachowiak  <[email protected]>
 
         Clean up naming for and slightly refactor legacy video fullscreen support

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm (173234 => 173235)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm	2014-09-03 22:15:29 UTC (rev 173235)
@@ -586,10 +586,8 @@
         case EditActionOutdent: return UI_STRING_KEY_INTERNAL("Outdent", "Outdent (Undo action name)", "Undo action name");
         case EditActionBold: return UI_STRING_KEY_INTERNAL("Bold", "Bold (Undo action name)", "Undo action name");
         case EditActionItalics: return UI_STRING_KEY_INTERNAL("Italics", "Italics (Undo action name)", "Undo action name");
-#if PLATFORM(IOS)
         case EditActionDelete: return UI_STRING_KEY_INTERNAL("Delete", "Delete (Undo action name)", "Undo action name (Used only by PLATFORM(IOS) code)");
         case EditActionDictation: return UI_STRING_KEY_INTERNAL("Dictation", "Dictation (Undo action name)", "Undo action name (Used only by PLATFORM(IOS) code)");
-#endif
     }
     return nil;
 }

Modified: trunk/Source/WebKit2/ChangeLog (173234 => 173235)


--- trunk/Source/WebKit2/ChangeLog	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebKit2/ChangeLog	2014-09-03 22:15:29 UTC (rev 173235)
@@ -1,3 +1,13 @@
+2014-09-03  Enrica Casucci  <[email protected]>
+
+        Remove PLATFORM(IOS) from WebCore/editing (Part 1).
+        https://bugs.webkit.org/show_bug.cgi?id=136474
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/WebEditCommandProxy.cpp:
+        (WebKit::WebEditCommandProxy::nameForEditAction):
+
 2014-09-03  Yongjun Zhang  <[email protected]>
 
         https://bugs.webkit.org/show_bug.cgi?id=136395

Modified: trunk/Source/WebKit2/UIProcess/WebEditCommandProxy.cpp (173234 => 173235)


--- trunk/Source/WebKit2/UIProcess/WebEditCommandProxy.cpp	2014-09-03 22:02:08 UTC (rev 173234)
+++ trunk/Source/WebKit2/UIProcess/WebEditCommandProxy.cpp	2014-09-03 22:15:29 UTC (rev 173235)
@@ -129,12 +129,10 @@
         return WEB_UI_STRING_KEY("Bold", "Bold (Undo action name)", "Undo action name");
     case EditActionItalics:
         return WEB_UI_STRING_KEY("Italics", "Italics (Undo action name)", "Undo action name");
-#if PLATFORM(IOS)
     case EditActionDelete:
         return WEB_UI_STRING_KEY("Delete", "Delete (Undo action name)", "Undo action name");
     case EditActionDictation:
         return WEB_UI_STRING_KEY("Dictation", "Dictation (Undo action name)", "Undo action name");
-#endif
     case EditActionPaste:
         return WEB_UI_STRING_KEY("Paste", "Paste (Undo action name)", "Undo action name");
     case EditActionPasteFont:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to