Remove even more EFL from WebCore
authormcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 04:07:12 +0000 (04:07 +0000)
committermcatanzaro@igalia.com <mcatanzaro@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 04:07:12 +0000 (04:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=168485

Reviewed by Alex Christensen.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
(atkRole):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::copy):
* platform/ContextMenuItem.h:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::createPlatformDisplay):
* platform/graphics/PlatformDisplay.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::Font::platformInit):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToImage):
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::ResourceError::timeoutError):
* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::setProxySettingsFromEnvironment): Deleted.
* platform/network/soup/SoupNetworkSession.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212521 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Source/WebCore/css/StyleRule.cpp
Source/WebCore/platform/ContextMenuItem.h
Source/WebCore/platform/graphics/OpenGLESShims.h
Source/WebCore/platform/graphics/PlatformDisplay.cpp
Source/WebCore/platform/graphics/PlatformDisplay.h
Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp
Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h
Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp
Source/WebCore/platform/network/soup/SoupNetworkSession.cpp
Source/WebCore/platform/network/soup/SoupNetworkSession.h

index 1f8f518..3888f8b 100644 (file)
@@ -1,3 +1,35 @@
+2017-02-16  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        Remove even more EFL from WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=168485
+
+        Reviewed by Alex Christensen.
+
+        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
+        (webkitAccessibleGetAttributes):
+        (atkRole):
+        * css/StyleRule.cpp:
+        (WebCore::StyleRuleBase::copy):
+        * platform/ContextMenuItem.h:
+        * platform/graphics/OpenGLESShims.h:
+        * platform/graphics/PlatformDisplay.cpp:
+        (WebCore::PlatformDisplay::createPlatformDisplay):
+        * platform/graphics/PlatformDisplay.h:
+        * platform/graphics/cairo/ImageBufferCairo.cpp:
+        * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
+        (WebCore::Font::platformInit):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+        (WebCore::GraphicsLayerTextureMapper::setContentsToImage):
+        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
+        * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
+        * platform/network/soup/ResourceErrorSoup.cpp:
+        (WebCore::ResourceError::timeoutError):
+        * platform/network/soup/SoupNetworkSession.cpp:
+        (WebCore::SoupNetworkSession::setProxySettingsFromEnvironment): Deleted.
+        * platform/network/soup/SoupNetworkSession.h:
+
 2017-02-16  Daniel Bates  <dabates@apple.com>
 
         Remove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
index f7b05f1..86cee4e 100644 (file)
@@ -357,8 +357,6 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
     AtkAttributeSet* attributeSet = nullptr;
 #if PLATFORM(GTK)
     attributeSet = addToAtkAttributeSet(attributeSet, "toolkit", "WebKitGtk");
-#elif PLATFORM(EFL)
-    attributeSet = addToAtkAttributeSet(attributeSet, "toolkit", "WebKitEfl");
 #endif
 
     AccessibilityObject* coreObject = core(object);
@@ -532,8 +530,6 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
 #if PLATFORM(GTK)
         // ATK_ROLE_COLOR_CHOOSER is defined as a dialog (i.e. it's what appears when you push the button).
         return ATK_ROLE_PUSH_BUTTON;
-#elif PLATFORM(EFL)
-        return ATK_ROLE_COLOR_CHOOSER;
 #endif
     case ListRole:
         return ATK_ROLE_LIST;
index 23767d8..60d1dbb 100644 (file)
@@ -146,8 +146,6 @@ Ref<StyleRuleBase> StyleRuleBase::copy() const
         break;
     }
     CRASH();
-    // HACK: EFL won't build without this (old GCC with crappy -Werror=return-type)
-    return Ref<StyleRuleBase>(*static_cast<StyleRuleBase*>(nullptr));
 }
 
 RefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet, CSSRule* parentRule) const
index cec7e65..291916f 100644 (file)
@@ -56,11 +56,7 @@ enum ContextMenuAction {
     ContextMenuItemTagPaste,
 #if PLATFORM(GTK)
     ContextMenuItemTagDelete,
-#endif
-#if PLATFORM(GTK) || PLATFORM (EFL)
     ContextMenuItemTagSelectAll,
-#endif
-#if PLATFORM(GTK)
     ContextMenuItemTagInputMethods,
     ContextMenuItemTagUnicode,
     ContextMenuItemTagUnicodeInsertLRMMark,
index ef4703a..b4e9515 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef OpenGLESShims_h
 #define OpenGLESShims_h
 
-#if PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN)
+#if PLATFORM(GTK) || PLATFORM(WIN)
 #define glBindFramebufferEXT glBindFramebuffer
 #define glFramebufferTexture2DEXT glFramebufferTexture2D
 #define glBindRenderbufferEXT glBindRenderbuffer
index ecccce9..e387bf9 100644 (file)
 #include <gdk/gdkwayland.h>
 #endif
 
-#if PLATFORM(EFL) && defined(HAVE_ECORE_X)
-#include <Ecore_X.h>
-#endif
-
 #if USE(EGL)
 #include <EGL/egl.h>
 #include <wtf/HashSet.h>
@@ -82,8 +78,6 @@ std::unique_ptr<PlatformDisplay> PlatformDisplay::createPlatformDisplay()
         return std::make_unique<PlatformDisplayWayland>(gdk_wayland_display_get_wl_display(display));
 #endif
 #endif
-#elif PLATFORM(EFL) && defined(HAVE_ECORE_X)
-    return std::make_unique<PlatformDisplayX11>(static_cast<Display*>(ecore_x_display_get()));
 #elif PLATFORM(WIN)
     return std::make_unique<PlatformDisplayWin>();
 #endif
@@ -154,7 +148,7 @@ PlatformDisplay::~PlatformDisplay()
 #endif
 }
 
-#if !PLATFORM(EFL) && (USE(EGL) || USE(GLX))
+#if USE(EGL) || USE(GLX)
 GLContext* PlatformDisplay::sharingGLContext()
 {
     if (!m_sharingGLContext)
index a55cdb3..680b43a 100644 (file)
@@ -58,9 +58,7 @@ public:
 
     virtual Type type() const = 0;
 
-#if !PLATFORM(EFL) && (USE(EGL) || USE(GLX))
-    // FIXME: This should not have any platform ifdef, but EFL has its own EGLContext class
-    // instead of using the GLContext common API.
+#if USE(EGL) || USE(GLX)
     GLContext* sharingGLContext();
 #endif
 
index 7b185d0..c978d78 100644 (file)
@@ -536,7 +536,7 @@ void ImageBuffer::putByteArray(Multiply multiplied, Uint8ClampedArray* source, c
     }
 }
 
-#if !PLATFORM(GTK) && !PLATFORM(EFL)
+#if !PLATFORM(GTK)
 static cairo_status_t writeFunction(void* output, const unsigned char* data, unsigned int length)
 {
     if (!reinterpret_cast<Vector<unsigned char>*>(output)->tryAppend(data, length))
index 16ab3c3..d528c7b 100644 (file)
@@ -89,12 +89,8 @@ void Font::platformInit()
     m_fontMetrics.setDescent(descent);
     m_fontMetrics.setCapHeight(capHeight);
 
-#if PLATFORM(EFL)
-    m_fontMetrics.setLineSpacing(ascent + descent + lineGap);
-#else
     // Match CoreGraphics metrics.
     m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
-#endif
     m_fontMetrics.setLineGap(lineGap);
 
     cairo_text_extents_t textExtents;
index cad1311..3d1f638 100644 (file)
@@ -175,7 +175,7 @@ MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer(MediaPlayer* player)
     , m_audioSourceProvider(std::make_unique<AudioSourceProviderGStreamer>())
 #endif
 {
-#if USE(GLIB) && !PLATFORM(EFL)
+#if USE(GLIB)
     m_readyTimerHandler.setPriority(G_PRIORITY_DEFAULT_IDLE);
 #endif
 }
index 78b4e14..78a0246 100644 (file)
@@ -288,7 +288,7 @@ void GraphicsLayerTextureMapper::setContentsToImage(Image* image)
     if (image) {
         // Make the decision about whether the image has changed.
         // This code makes the assumption that pointer equality on a NativeImagePtr is a valid way to tell if the image is changed.
-        // This assumption is true in Qt, GTK and EFL.
+        // This assumption is true for the GTK+ port.
         NativeImagePtr newNativeImagePtr = image->nativeImageForCurrentFrame();
         if (!newNativeImagePtr)
             return;
index fe0e6ea..c9f317f 100644 (file)
@@ -20,7 +20,7 @@
 #include "config.h"
 #include "TextureMapperGC3DPlatformLayer.h"
 
-#if USE(TEXTURE_MAPPER) && !PLATFORM(EFL)
+#if USE(TEXTURE_MAPPER)
 
 #if USE(OPENGL_ES_2)
 #include <GLES2/gl2.h>
@@ -128,4 +128,4 @@ void TextureMapperGC3DPlatformLayer::paintToTextureMapper(TextureMapper& texture
 
 } // namespace WebCore
 
-#endif // USE(TEXTURE_MAPPER) && !PLATFORM(EFL)
+#endif // USE(TEXTURE_MAPPER)
index 7ecd354..5b1e035 100644 (file)
@@ -19,7 +19,7 @@
 
 #pragma once
 
-#if USE(TEXTURE_MAPPER) && !PLATFORM(EFL)
+#if USE(TEXTURE_MAPPER)
 
 #include "GraphicsContext3D.h"
 #include "PlatformLayer.h"
@@ -61,4 +61,4 @@ private:
 
 } // namespace WebCore
 
-#endif // USE(TEXTURE_MAPPER) && !PLATFORM(EFL)
+#endif // USE(TEXTURE_MAPPER)
index ee43627..a608e7e 100644 (file)
@@ -86,8 +86,8 @@ ResourceError ResourceError::tlsError(SoupRequest* request, unsigned tlsErrors,
 
 ResourceError ResourceError::timeoutError(const URL& failingURL)
 {
-    // FIXME: This should probably either be integrated into Errors(Gtk/EFL).h or the
-    // networking errors from those files should be moved here.
+    // FIXME: This should probably either be integrated into ErrorsGtk.h or the
+    // networking errors from that file should be moved here.
 
     // Use the same value as in NSURLError.h
     static const int timeoutError = -1001;
index ef6c3bf..7c17e60 100644 (file)
@@ -255,28 +255,6 @@ void SoupNetworkSession::setupProxy()
     soup_session_abort(m_soupSession.get());
 }
 
-#if PLATFORM(EFL)
-// FIXME: This function should not exist at all and we don't want to accidentally use it in other ports.
-// The correct way to set proxy settings from the environment is to use a GProxyResolver that does so.
-// It also lacks the rather important https_proxy and ftp_proxy variables, and the uppercase versions of
-// all four variables, all of which you almost surely want to be respected if you're setting http_proxy,
-// and all of which would be supported via the default proxy resolver in non-GNOME/Ubuntu environments
-// (at least, I think that's right). Additionally, it is incorrect for WebKit to respect this environment
-// variable when running in a GNOME or Ubuntu environment, where GNOME proxy configuration should be
-// respected instead. The only reason to retain this function is to not alter the incorrect behavior for EFL.
-void SoupNetworkSession::setProxySettingsFromEnvironment()
-{
-    const char* httpProxy = getenv("http_proxy");
-    if (!httpProxy)
-        return;
-
-    gProxySettings.defaultProxyURL = httpProxy;
-    const char* httpProxyExceptions = getenv("no_proxy");
-    if (httpProxyExceptions)
-        gProxySettings.ignoreHosts.reset(g_strsplit(httpProxyExceptions, ",", -1));
-}
-#endif
-
 void SoupNetworkSession::setProxySettings(const SoupNetworkProxySettings& settings)
 {
     gProxySettings = settings;
index fa7b4b1..908b6cb 100644 (file)
@@ -58,9 +58,6 @@ public:
 
     static void clearOldSoupCache(const String& cacheDirectory);
 
-#if PLATFORM(EFL)
-    static void setProxySettingsFromEnvironment();
-#endif
     static void setProxySettings(const SoupNetworkProxySettings&);
     void setupProxy();