Diff
Modified: trunk/Source/WebCore/ChangeLog (147892 => 147893)
--- trunk/Source/WebCore/ChangeLog 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/ChangeLog 2013-04-08 04:20:38 UTC (rev 147893)
@@ -1,3 +1,38 @@
+2013-04-07 Benjamin Poulain <[email protected]>
+
+ Remove the android code from WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=114136
+
+ Reviewed by Anders Carlsson.
+
+ * WebCore.exp.in:
+ * dom/ViewportArguments.cpp:
+ (WebCore):
+ (WebCore::setViewportFeature):
+ (WebCore::viewportErrorMessageTemplate):
+ (WebCore::viewportErrorMessageLevel):
+ * dom/ViewportArguments.h:
+ (WebCore::ViewportArguments::ViewportArguments):
+ (ViewportArguments):
+ (WebCore::ViewportArguments::operator==):
+ * editing/EditingBehavior.h:
+ (WebCore::EditingBehavior::shouldMoveCaretToHorizontalBoundaryWhenPastTopOrBottom):
+ (WebCore::EditingBehavior::shouldAllowSpellingSuggestionsWithoutSelection):
+ (WebCore::EditingBehavior::shouldNavigateBackOnBackspace):
+ * editing/EditingBehaviorTypes.h:
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleGestureLongTap):
+ (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
+ * page/Settings.cpp:
+ (WebCore):
+ (WebCore::editingBehaviorTypeForPlatform):
+ * platform/graphics/FontCache.h:
+ (FontCache):
+ * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
+ (WebCore::FontPlatformData::getRenderStyleForStrike):
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::setEditingBehavior):
+
2013-04-07 Oliver Hunt <[email protected]>
Add bounds checking for WTF::Vector::operator[]
Modified: trunk/Source/WebCore/WebCore.exp.in (147892 => 147893)
--- trunk/Source/WebCore/WebCore.exp.in 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/WebCore.exp.in 2013-04-08 04:20:38 UTC (rev 147893)
@@ -561,7 +561,6 @@
__ZN7WebCore17RegularExpressionC1ERKN3WTF6StringENS1_19TextCaseSensitivityENS_13MultilineModeE
__ZN7WebCore17RegularExpressionD1Ev
__ZN7WebCore17SubresourceLoader6createEPNS_5FrameEPNS_14CachedResourceERKNS_15ResourceRequestERKNS_21ResourceLoaderOptionsE
-__ZN7WebCore17ViewportArguments19deprecatedTargetDPIE
__ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE
__ZN7WebCore17openTemporaryFileERKN3WTF6StringERi
__ZN7WebCore17userVisibleStringEP5NSURL
Modified: trunk/Source/WebCore/dom/ViewportArguments.cpp (147892 => 147893)
--- trunk/Source/WebCore/dom/ViewportArguments.cpp 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/dom/ViewportArguments.cpp 2013-04-08 04:20:38 UTC (rev 147893)
@@ -42,7 +42,9 @@
namespace WebCore {
+#if PLATFORM(BLACKBERRY) || PLATFORM(EFL) || PLATFORM(GTK) || PLATFORM(QT)
const float ViewportArguments::deprecatedTargetDPI = 160;
+#endif
static const float& compareIgnoringAuto(const float& value1, const float& value2, const float& (*compare) (const float&, const float&))
{
@@ -382,25 +384,6 @@
return 1;
}
-static float findTargetDensityDPIValue(const String& keyString, const String& valueString, Document* document)
-{
- if (equalIgnoringCase(valueString, "device-dpi"))
- return ViewportArguments::ValueDeviceDPI;
- if (equalIgnoringCase(valueString, "low-dpi"))
- return ViewportArguments::ValueLowDPI;
- if (equalIgnoringCase(valueString, "medium-dpi"))
- return ViewportArguments::ValueMediumDPI;
- if (equalIgnoringCase(valueString, "high-dpi"))
- return ViewportArguments::ValueHighDPI;
-
- bool ok;
- float value = numericPrefix(keyString, valueString, document, &ok);
- if (!ok || value < 70 || value > 400)
- return ViewportArguments::ValueAuto;
-
- return value;
-}
-
void setViewportFeature(const String& keyString, const String& valueString, Document* document, void* data)
{
ViewportArguments* arguments = static_cast<ViewportArguments*>(data);
@@ -417,10 +400,7 @@
arguments->maxZoom = findScaleValue(keyString, valueString, document);
else if (keyString == "user-scalable")
arguments->userZoom = findUserScalableValue(keyString, valueString, document);
- else if (keyString == "target-densitydpi") {
- arguments->deprecatedTargetDensityDPI = findTargetDensityDPIValue(keyString, valueString, document);
- reportViewportWarning(document, TargetDensityDpiUnsupported, String(), String());
- } else
+ else
reportViewportWarning(document, UnrecognizedViewportArgumentKeyError, keyString, String());
}
@@ -430,8 +410,7 @@
"Viewport argument key \"%replacement1\" not recognized and ignored.",
"Viewport argument value \"%replacement1\" for key \"%replacement2\" is invalid, and has been ignored.",
"Viewport argument value \"%replacement1\" for key \"%replacement2\" was truncated to its numeric prefix.",
- "Viewport maximum-scale cannot be larger than 10.0. The maximum-scale will be set to 10.0.",
- "Viewport target-densitydpi is not supported.",
+ "Viewport maximum-scale cannot be larger than 10.0. The maximum-scale will be set to 10.0."
};
return errors[errorCode];
@@ -441,7 +420,6 @@
{
switch (errorCode) {
case TruncatedViewportArgumentValueError:
- case TargetDensityDpiUnsupported:
return WarningMessageLevel;
case UnrecognizedViewportArgumentKeyError:
case UnrecognizedViewportArgumentValueError:
Modified: trunk/Source/WebCore/dom/ViewportArguments.h (147892 => 147893)
--- trunk/Source/WebCore/dom/ViewportArguments.h 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/dom/ViewportArguments.h 2013-04-08 04:20:38 UTC (rev 147893)
@@ -39,8 +39,7 @@
UnrecognizedViewportArgumentKeyError,
UnrecognizedViewportArgumentValueError,
TruncatedViewportArgumentValueError,
- MaximumScaleTooLargeError,
- TargetDensityDpiUnsupported
+ MaximumScaleTooLargeError
};
struct ViewportAttributes {
@@ -93,7 +92,6 @@
, maxZoom(ValueAuto)
, userZoom(ValueAuto)
, orientation(ValueAuto)
- , deprecatedTargetDensityDPI(ValueAuto)
{
}
@@ -111,7 +109,6 @@
float maxZoom;
float userZoom;
float orientation;
- float deprecatedTargetDensityDPI; // Only used for Android WebView
bool operator==(const ViewportArguments& other) const
{
@@ -127,8 +124,7 @@
&& minZoom == other.minZoom
&& maxZoom == other.maxZoom
&& userZoom == other.userZoom
- && orientation == other.orientation
- && deprecatedTargetDensityDPI == other.deprecatedTargetDensityDPI;
+ && orientation == other.orientation;
}
bool operator!=(const ViewportArguments& other) const
@@ -136,9 +132,11 @@
return !(*this == other);
}
+#if PLATFORM(BLACKBERRY) || PLATFORM(EFL) || PLATFORM(GTK) || PLATFORM(QT)
// FIXME: We're going to keep this constant around until all embedders
// refactor their code to no longer need it.
static const float deprecatedTargetDPI;
+#endif
};
ViewportAttributes computeViewportAttributes(ViewportArguments args, int desktopWidth, int deviceWidth, int deviceHeight, float devicePixelRatio, IntSize visibleViewport);
Modified: trunk/Source/WebCore/editing/EditingBehavior.h (147892 => 147893)
--- trunk/Source/WebCore/editing/EditingBehavior.h 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/editing/EditingBehavior.h 2013-04-08 04:20:38 UTC (rev 147893)
@@ -41,7 +41,7 @@
// content on Mac.
bool shouldMoveCaretToHorizontalBoundaryWhenPastTopOrBottom() const
{
- return m_type != EditingWindowsBehavior && m_type != EditingAndroidBehavior;
+ return m_type != EditingWindowsBehavior;
}
// On Windows, selections should always be considered as directional, regardless if it is
@@ -66,13 +66,13 @@
// On Linux, should be able to get and insert spelling suggestions without selecting the misspelled word.
bool shouldAllowSpellingSuggestionsWithoutSelection() const
{
- return m_type == EditingUnixBehavior || m_type == EditingAndroidBehavior;
+ return m_type == EditingUnixBehavior;
}
// On Mac and Windows, pressing backspace (when it isn't handled otherwise) should navigate back.
bool shouldNavigateBackOnBackspace() const
{
- return m_type != EditingUnixBehavior && m_type != EditingAndroidBehavior;
+ return m_type != EditingUnixBehavior;
}
// On Mac, selecting backwards by word/line from the middle of a word/line, and then going
Modified: trunk/Source/WebCore/editing/EditingBehaviorTypes.h (147892 => 147893)
--- trunk/Source/WebCore/editing/EditingBehaviorTypes.h 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/editing/EditingBehaviorTypes.h 2013-04-08 04:20:38 UTC (rev 147893)
@@ -39,8 +39,7 @@
enum EditingBehaviorType {
EditingMacBehavior,
EditingWindowsBehavior,
- EditingUnixBehavior,
- EditingAndroidBehavior
+ EditingUnixBehavior
};
} // WebCore namespace
Modified: trunk/Source/WebCore/page/EventHandler.cpp (147892 => 147893)
--- trunk/Source/WebCore/page/EventHandler.cpp 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2013-04-08 04:20:38 UTC (rev 147893)
@@ -2675,25 +2675,15 @@
bool EventHandler::handleGestureLongTap(const PlatformGestureEvent& gestureEvent)
{
-#if ENABLE(CONTEXT_MENUS) && !OS(ANDROID)
+#if ENABLE(CONTEXT_MENUS)
if (!m_didLongPressInvokeContextMenu)
return sendContextMenuEventForGesture(gestureEvent);
-#endif
+#endif // ENABLE(CONTEXT_MENUS)
return false;
}
bool EventHandler::handleGestureForTextSelectionOrContextMenu(const PlatformGestureEvent& gestureEvent)
{
-#if OS(ANDROID)
- IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.position());
- HitTestResult result = hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
- Node* innerNode = result.targetNode();
- if (!result.isLiveLink() && innerNode && (innerNode->isContentEditable() || innerNode->isTextNode())) {
- selectClosestWordFromHitTestResult(result, DontAppendTrailingWhitespace);
- if (m_frame->selection()->isRange())
- return true;
- }
-#endif
#if ENABLE(CONTEXT_MENUS)
m_didLongPressInvokeContextMenu = (gestureEvent.type() == PlatformEvent::GestureLongPress);
return sendContextMenuEventForGesture(gestureEvent);
Modified: trunk/Source/WebCore/page/Settings.cpp (147892 => 147893)
--- trunk/Source/WebCore/page/Settings.cpp 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/page/Settings.cpp 2013-04-08 04:20:38 UTC (rev 147893)
@@ -112,8 +112,7 @@
// NOTEs
// 1) EditingMacBehavior comprises Tiger, Leopard, SnowLeopard and iOS builds, as well as QtWebKit when built on Mac;
// 2) EditingWindowsBehavior comprises Win32 and WinCE builds, as well as QtWebKit and Chromium when built on Windows;
-// 3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS/Android (and then abusing the terminology);
-// 4) EditingAndroidBehavior comprises Android builds.
+// 3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS (and then abusing the terminology);
// 99) MacEditingBehavior is used as a fallback.
static EditingBehaviorType editingBehaviorTypeForPlatform()
{
@@ -122,8 +121,6 @@
EditingMacBehavior
#elif OS(WINDOWS)
EditingWindowsBehavior
-#elif OS(ANDROID)
- EditingAndroidBehavior
#elif OS(UNIX)
EditingUnixBehavior
#else
Modified: trunk/Source/WebCore/platform/graphics/FontCache.h (147892 => 147893)
--- trunk/Source/WebCore/platform/graphics/FontCache.h 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/platform/graphics/FontCache.h 2013-04-08 04:20:38 UTC (rev 147893)
@@ -155,7 +155,7 @@
// Don't purge if this count is > 0;
int m_purgePreventCount;
-#if PLATFORM(MAC) || OS(ANDROID)
+#if PLATFORM(MAC)
friend class ComplexTextController;
#endif
friend class SimpleFontData; // For getCachedFontData(const FontPlatformData*)
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp (147892 => 147893)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp 2013-04-08 04:20:38 UTC (rev 147893)
@@ -269,16 +269,12 @@
{
WebKit::WebFontRenderStyle style;
-#if OS(ANDROID)
- style.setDefaults();
-#else
if (!font || !*font)
style.setDefaults(); // It's probably a webfont. Take the system defaults.
else if (WebKit::Platform::current()->sandboxSupport())
WebKit::Platform::current()->sandboxSupport()->getRenderStyleForStrike(font, sizeAndStyle, &style);
else
WebKit::WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style);
-#endif
style.toFontRenderStyle(&m_style);
}
Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (147892 => 147893)
--- trunk/Source/WebCore/testing/InternalSettings.cpp 2013-04-08 04:14:50 UTC (rev 147892)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp 2013-04-08 04:20:38 UTC (rev 147893)
@@ -387,8 +387,6 @@
settings()->setEditingBehaviorType(EditingMacBehavior);
else if (equalIgnoringCase(editingBehavior, "unix"))
settings()->setEditingBehaviorType(EditingUnixBehavior);
- else if (equalIgnoringCase(editingBehavior, "android"))
- settings()->setEditingBehaviorType(EditingAndroidBehavior);
else
ec = SYNTAX_ERR;
}