Title: [173669] trunk/Source
Revision
173669
Author
[email protected]
Date
2014-09-16 13:38:46 -0700 (Tue, 16 Sep 2014)

Log Message

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

Reviewed by Benjamin Poulain.

This is the updated version of the patch that was landed in r173340.
This patch removes the use of PLATFORM(IOS) from TextAffinity.h
and removes the assumption that EAffinity values match NSSelectionAffinity
values. It also removes the includes in TextAffinity.h, creating the need to
include explicitly the files when necessary.

Source/WebCore:

* editing/TextAffinity.h:
(kit): Deleted.
(core): Deleted.
* editing/cocoa/HTMLConverter.mm:
* page/mac/WebCoreFrameView.h:

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.h:
(kit):
(core):

Source/WebKit2:

* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (173668 => 173669)


--- trunk/Source/WebCore/ChangeLog	2014-09-16 20:32:29 UTC (rev 173668)
+++ trunk/Source/WebCore/ChangeLog	2014-09-16 20:38:46 UTC (rev 173669)
@@ -1,3 +1,22 @@
+2014-09-16  Enrica Casucci  <[email protected]>
+
+        Remove PLATFORM(IOS) from WebCore/editing (Part 3).
+        https://bugs.webkit.org/show_bug.cgi?id=136474
+
+        Reviewed by Benjamin Poulain.
+
+        This is the updated version of the patch that was landed in r173340.
+        This patch removes the use of PLATFORM(IOS) from TextAffinity.h
+        and removes the assumption that EAffinity values match NSSelectionAffinity
+        values. It also removes the includes in TextAffinity.h, creating the need to
+        include explicitly the files when necessary.
+
+        * editing/TextAffinity.h:
+        (kit): Deleted.
+        (core): Deleted.
+        * editing/cocoa/HTMLConverter.mm:
+        * page/mac/WebCoreFrameView.h:
+
 2014-09-16  Beth Dakin  <[email protected]>
 
         overflow:scroll should not leave space for a scroll corner with overlay scrollbars

Modified: trunk/Source/WebCore/editing/TextAffinity.h (173668 => 173669)


--- trunk/Source/WebCore/editing/TextAffinity.h	2014-09-16 20:32:29 UTC (rev 173668)
+++ trunk/Source/WebCore/editing/TextAffinity.h	2014-09-16 20:38:46 UTC (rev 173669)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004 Apple Inc.  All rights reserved.
+ * Copyright (C) 2004-2014 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,36 +26,10 @@
 #ifndef TextAffinity_h
 #define TextAffinity_h
 
-#ifdef __OBJC__
-#if !PLATFORM(IOS)
-#include <AppKit/NSTextView.h>
-#else
-#include "WAKAppKitStubs.h"
-#endif // !PLATFORM(IOS)
-#endif
-
 namespace WebCore {
 
-// These match the AppKit values for these concepts.
-// From NSTextView.h:
-// NSSelectionAffinityUpstream = 0
-// NSSelectionAffinityDownstream = 1
 enum EAffinity { UPSTREAM = 0, DOWNSTREAM = 1 };
 
 } // namespace WebCore
 
-#ifdef __OBJC__
-
-inline NSSelectionAffinity kit(WebCore::EAffinity affinity)
-{
-    return static_cast<NSSelectionAffinity>(affinity);
-}
-
-inline WebCore::EAffinity core(NSSelectionAffinity affinity)
-{
-    return static_cast<WebCore::EAffinity>(affinity);
-}
-
-#endif
-
 #endif // TextAffinity_h

Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (173668 => 173669)


--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm	2014-09-16 20:32:29 UTC (rev 173668)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm	2014-09-16 20:38:46 UTC (rev 173669)
@@ -62,6 +62,8 @@
 
 #if PLATFORM(IOS)
 
+#import "WAKAppKitStubs.h"
+
 SOFT_LINK_FRAMEWORK(UIKit)
 SOFT_LINK_CLASS(UIKit, UIColor)
 

Modified: trunk/Source/WebCore/page/mac/WebCoreFrameView.h (173668 => 173669)


--- trunk/Source/WebCore/page/mac/WebCoreFrameView.h	2014-09-16 20:32:29 UTC (rev 173668)
+++ trunk/Source/WebCore/page/mac/WebCoreFrameView.h	2014-09-16 20:38:46 UTC (rev 173669)
@@ -25,6 +25,12 @@
 
 #include "ScrollTypes.h"
 
+#ifdef __cplusplus
+#if PLATFORM(IOS)
+#include "WAKAppKitStubs.h"
+#endif
+#endif
+
 // WTF_PLATFORM_IOS
 #ifdef __cplusplus
 namespace WebCore {

Modified: trunk/Source/WebKit/mac/ChangeLog (173668 => 173669)


--- trunk/Source/WebKit/mac/ChangeLog	2014-09-16 20:32:29 UTC (rev 173668)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-09-16 20:38:46 UTC (rev 173669)
@@ -1,3 +1,20 @@
+2014-09-16  Enrica Casucci  <[email protected]>
+
+        Remove PLATFORM(IOS) from WebCore/editing (Part 3).
+        https://bugs.webkit.org/show_bug.cgi?id=136474
+
+        Reviewed by Benjamin Poulain.
+
+        This is the updated version of the patch that was landed in r173340.
+        This patch removes the use of PLATFORM(IOS) from TextAffinity.h
+        and removes the assumption that EAffinity values match NSSelectionAffinity
+        values. It also removes the includes in TextAffinity.h, creating the need to
+        include explicitly the files when necessary.
+
+        * WebCoreSupport/WebEditorClient.h:
+        (kit):
+        (core):
+
 2014-09-14  Daniel Bates  <[email protected]>
 
         [iOS] Attempt to fix the iOS build after <http://trac.webkit.org/changeset/173606>

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h (173668 => 173669)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h	2014-09-16 20:32:29 UTC (rev 173668)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h	2014-09-16 20:38:46 UTC (rev 173669)
@@ -34,6 +34,10 @@
 #import <wtf/Vector.h>
 #import <wtf/text/StringView.h>
 
+#if PLATFORM(IOS)
+#import <WebCore/WAKAppKitStubs.h>
+#endif
+
 @class WebView;
 @class WebEditorUndoTarget;
 
@@ -176,6 +180,32 @@
 #endif
 };
 
+#if PLATFORM(COCOA)
+inline NSSelectionAffinity kit(WebCore::EAffinity affinity)
+{
+    switch (affinity) {
+        case WebCore::EAffinity::UPSTREAM:
+            return NSSelectionAffinityUpstream;
+        case WebCore::EAffinity::DOWNSTREAM:
+            return NSSelectionAffinityDownstream;
+    }
+    ASSERT_NOT_REACHED();
+    return NSSelectionAffinityUpstream;
+}
+
+inline WebCore::EAffinity core(NSSelectionAffinity affinity)
+{
+    switch (affinity) {
+    case NSSelectionAffinityUpstream:
+        return WebCore::EAffinity::UPSTREAM;
+    case NSSelectionAffinityDownstream:
+        return WebCore::EAffinity::DOWNSTREAM;
+    }
+    ASSERT_NOT_REACHED();
+    return WebCore::EAffinity::UPSTREAM;
+}
+#endif
+
 #if PLATFORM(IOS)
 
 inline bool WebEditorClient::isGrammarCheckingEnabled()

Modified: trunk/Source/WebKit2/ChangeLog (173668 => 173669)


--- trunk/Source/WebKit2/ChangeLog	2014-09-16 20:32:29 UTC (rev 173668)
+++ trunk/Source/WebKit2/ChangeLog	2014-09-16 20:38:46 UTC (rev 173669)
@@ -1,3 +1,19 @@
+2014-09-16  Enrica Casucci  <[email protected]>
+
+        Remove PLATFORM(IOS) from WebCore/editing (Part 3).
+        https://bugs.webkit.org/show_bug.cgi?id=136474
+
+        Reviewed by Benjamin Poulain.
+
+        This is the updated version of the patch that was landed in r173340.
+        This patch removes the use of PLATFORM(IOS) from TextAffinity.h
+        and removes the assumption that EAffinity values match NSSelectionAffinity
+        values. It also removes the includes in TextAffinity.h, creating the need to
+        include explicitly the files when necessary.
+
+        * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
+        * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
+
 2014-09-16  Dan Bernstein  <[email protected]>
 
         Standardized the return type of a delegate method.

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm (173668 => 173669)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm	2014-09-16 20:32:29 UTC (rev 173668)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm	2014-09-16 20:38:46 UTC (rev 173669)
@@ -40,6 +40,10 @@
 #import "WKDOMDocument.h"
 #import "WKDOMText.h"
 
+#if PLATFORM(IOS)
+#import <WebCore/WAKAppKitStubs.h>
+#endif
+
 namespace WebKit {
 
 template<typename WebCoreType, typename WKDOMType>

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm (173668 => 173669)


--- trunk/Source/WebKit2/WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm	2014-09-16 20:32:29 UTC (rev 173668)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm	2014-09-16 20:38:46 UTC (rev 173669)
@@ -34,6 +34,7 @@
 #import <WebCore/MainFrame.h>
 #import <WebCore/FrameView.h>
 #import <WebCore/Page.h>
+#import <WebCore/WAKAppKitStubs.h>
 
 /* 
  The implementation of this class will be augmented by an accesibility bundle that is loaded only when accessibility is requested to be enabled.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to