Remove Qt-specific code in common WebCore/{html,dom} files.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 18:07:21 +0000 (18:07 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Oct 2013 18:07:21 +0000 (18:07 +0000)
<https://webkit.org/b/122219>

Reviewed by Anders Carlsson.

Purge PLATFORM(QT) blocks.

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

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/ViewportArguments.cpp
Source/WebCore/dom/ViewportArguments.h
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/HTMLCanvasElement.h
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/canvas/CanvasStyle.cpp
Source/WebCore/html/canvas/WebGLContextGroup.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp

index 334d8f7..bdf81d5 100644 (file)
@@ -1,3 +1,12 @@
+2013-10-02  Andreas Kling  <akling@apple.com>
+
+        Remove Qt-specific code in common WebCore/{html,dom} files.
+        <https://webkit.org/b/122219>
+
+        Reviewed by Anders Carlsson.
+
+        Purge PLATFORM(QT) blocks.
+
 2013-10-01  Sam Weinig  <sam@webkit.org>
 
         CTTE: DOMWrapperWorlds should be passed around by reference
index 918bb9c..591a1e8 100644 (file)
@@ -42,7 +42,7 @@ using namespace std;
 
 namespace WebCore {
 
-#if PLATFORM(BLACKBERRY) || PLATFORM(GTK) || PLATFORM(QT)
+#if PLATFORM(BLACKBERRY) || PLATFORM(GTK)
 const float ViewportArguments::deprecatedTargetDPI = 160;
 #endif
 
index 333c997..c649375 100644 (file)
@@ -128,7 +128,7 @@ struct ViewportArguments {
         return !(*this == other);
     }
 
-#if PLATFORM(BLACKBERRY) || PLATFORM(GTK) || PLATFORM(QT)
+#if PLATFORM(BLACKBERRY) || PLATFORM(GTK)
     // FIXME: We're going to keep this constant around until all embedders
     // refactor their code to no longer need it.
     static const float deprecatedTargetDPI;
index 19d65d6..e1796b9 100644 (file)
@@ -95,7 +95,7 @@ bool HTMLAnchorElement::supportsFocus() const
 
 bool HTMLAnchorElement::isMouseFocusable() const
 {
-#if !(PLATFORM(EFL) || PLATFORM(GTK) || PLATFORM(QT))
+#if !(PLATFORM(EFL) || PLATFORM(GTK))
     // Only allow links with tabIndex or contentEditable to be mouse focusable.
     // This is our rule for the Mac platform; on many other platforms we focus any link you click on.
     if (isLink())
index aad83ad..1c8857c 100644 (file)
@@ -164,7 +164,7 @@ void HTMLCanvasElement::setWidth(int value)
 #if ENABLE(WEBGL)
 static bool requiresAcceleratedCompositingForWebGL()
 {
-#if PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(QT)
+#if PLATFORM(GTK) || PLATFORM(EFL)
     return false;
 #else
     return true;
index d18d16a..947ad37 100644 (file)
@@ -33,9 +33,7 @@
 #include "IntSize.h"
 #include <wtf/Forward.h>
 
-#if PLATFORM(QT)
-#define DefaultInterpolationQuality InterpolationMedium
-#elif USE(CG)
+#if USE(CG)
 #define DefaultInterpolationQuality InterpolationLow
 #else
 #define DefaultInterpolationQuality InterpolationDefault
index fbbe51d..a912cd9 100644 (file)
@@ -327,7 +327,7 @@ bool HTMLFormControlElement::isKeyboardFocusable(KeyboardEvent* event) const
 
 bool HTMLFormControlElement::isMouseFocusable() const
 {
-#if PLATFORM(GTK) || PLATFORM(QT)
+#if PLATFORM(GTK)
     return HTMLElement::isMouseFocusable();
 #else
     return false;
index 2fd38bc..9c0be28 100644 (file)
@@ -254,11 +254,6 @@ bool HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk()
     
 bool HTMLObjectElement::hasValidClassId()
 {
-#if PLATFORM(QT)
-    if (equalIgnoringCase(serviceType(), "application/x-qt-plugin") || equalIgnoringCase(serviceType(), "application/x-qt-styled-widget"))
-        return true;
-#endif
-
     if (MIMETypeRegistry::isJavaAppletMIMEType(serviceType()) && classId().startsWith("java:", false))
         return true;
     
index 6b7e7e9..d770a02 100755 (executable)
@@ -2145,18 +2145,8 @@ PassRefPtr<TextMetrics> CanvasRenderingContext2D::measureText(const String& text
     String normalizedText = text;
     normalizeSpaces(normalizedText);
 
-#if PLATFORM(QT)
-    // We always use complex text shaping since it can't be turned off for QPainterPath::addText().
-    Font::CodePath oldCodePath = Font::codePath();
-    Font::setCodePath(Font::Complex);
-#endif
-
     metrics->setWidth(accessFont().width(TextRun(normalizedText)));
 
-#if PLATFORM(QT)
-    Font::setCodePath(oldCodePath);
-#endif
-
     return metrics.release();
 }
 
@@ -2283,12 +2273,6 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
 
     c->setTextDrawingMode(fill ? TextModeFill : TextModeStroke);
 
-#if PLATFORM(QT)
-    // We always use complex text shaping since it can't be turned off for QPainterPath::addText().
-    Font::CodePath oldCodePath = Font::codePath();
-    Font::setCodePath(Font::Complex);
-#endif
-
     if (useMaxWidth) {
         GraphicsContextStateSaver stateSaver(*c);
         c->translate(location.x(), location.y());
@@ -2299,10 +2283,6 @@ void CanvasRenderingContext2D::drawTextInternal(const String& text, float x, flo
         c->drawBidiText(font, textRun, location, Font::UseFallbackIfFontNotReady);
 
     didDraw(textRect);
-
-#if PLATFORM(QT)
-    Font::setCodePath(oldCodePath);
-#endif
 }
 
 void CanvasRenderingContext2D::inflateStrokeRect(FloatRect& rect) const
index 5b5e005..d4afa50 100644 (file)
 #include <CoreGraphics/CGContext.h>
 #endif
 
-#if PLATFORM(QT)
-#include <QPainter>
-#include <QBrush>
-#include <QPen>
-#include <QColor>
-#endif
-
 namespace WebCore {
 
 enum ColorParseResult { ParsedRGBA, ParsedCurrentColor, ParsedSystemColor, ParseFailed };
@@ -257,12 +250,6 @@ void CanvasStyle::applyStrokeColor(GraphicsContext* context) const
         // We'll need a fancier Color abstraction to support CMYKA correctly
 #if USE(CG)
         CGContextSetCMYKStrokeColor(context->platformContext(), m_cmyka->c, m_cmyka->m, m_cmyka->y, m_cmyka->k, m_cmyka->a);
-#elif PLATFORM(QT)
-        QPen currentPen = context->platformContext()->pen();
-        QColor clr;
-        clr.setCmykF(m_cmyka->c, m_cmyka->m, m_cmyka->y, m_cmyka->k, m_cmyka->a);
-        currentPen.setColor(clr);
-        context->platformContext()->setPen(currentPen);
 #else
         context->setStrokeColor(m_cmyka->rgba, ColorSpaceDeviceRGB);
 #endif
@@ -295,12 +282,6 @@ void CanvasStyle::applyFillColor(GraphicsContext* context) const
         // We'll need a fancier Color abstraction to support CMYKA correctly
 #if USE(CG)
         CGContextSetCMYKFillColor(context->platformContext(), m_cmyka->c, m_cmyka->m, m_cmyka->y, m_cmyka->k, m_cmyka->a);
-#elif PLATFORM(QT)
-        QBrush currentBrush = context->platformContext()->brush();
-        QColor clr;
-        clr.setCmykF(m_cmyka->c, m_cmyka->m, m_cmyka->y, m_cmyka->k, m_cmyka->a);
-        currentBrush.setColor(clr);
-        context->platformContext()->setBrush(currentBrush);
 #else
         context->setFillColor(m_cmyka->rgba, ColorSpaceDeviceRGB);
 #endif
index d3af2bb..6f182e2 100644 (file)
 #include "WebGLRenderingContext.h"
 #include "WebGLSharedObject.h"
 
-#if PLATFORM(QT)
-#undef emit
-#endif
-
 namespace WebCore {
 
 PassRefPtr<WebGLContextGroup> WebGLContextGroup::create()
index c0f2883..3e8bafb 100644 (file)
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 
-#if PLATFORM(QT)
-#undef emit
-#endif
-
 namespace WebCore {
 
 const double secondsBetweenRestoreAttempts = 1.0;