Changeset 147893 in webkit
- Timestamp:
- Apr 7, 2013 9:20:38 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r147892 r147893 1 2013-04-07 Benjamin Poulain <benjamin@webkit.org> 2 3 Remove the android code from WebCore 4 https://bugs.webkit.org/show_bug.cgi?id=114136 5 6 Reviewed by Anders Carlsson. 7 8 * WebCore.exp.in: 9 * dom/ViewportArguments.cpp: 10 (WebCore): 11 (WebCore::setViewportFeature): 12 (WebCore::viewportErrorMessageTemplate): 13 (WebCore::viewportErrorMessageLevel): 14 * dom/ViewportArguments.h: 15 (WebCore::ViewportArguments::ViewportArguments): 16 (ViewportArguments): 17 (WebCore::ViewportArguments::operator==): 18 * editing/EditingBehavior.h: 19 (WebCore::EditingBehavior::shouldMoveCaretToHorizontalBoundaryWhenPastTopOrBottom): 20 (WebCore::EditingBehavior::shouldAllowSpellingSuggestionsWithoutSelection): 21 (WebCore::EditingBehavior::shouldNavigateBackOnBackspace): 22 * editing/EditingBehaviorTypes.h: 23 * page/EventHandler.cpp: 24 (WebCore::EventHandler::handleGestureLongTap): 25 (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu): 26 * page/Settings.cpp: 27 (WebCore): 28 (WebCore::editingBehaviorTypeForPlatform): 29 * platform/graphics/FontCache.h: 30 (FontCache): 31 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: 32 (WebCore::FontPlatformData::getRenderStyleForStrike): 33 * testing/InternalSettings.cpp: 34 (WebCore::InternalSettings::setEditingBehavior): 35 1 36 2013-04-07 Oliver Hunt <oliver@apple.com> 2 37 -
trunk/Source/WebCore/WebCore.exp.in
r147892 r147893 562 562 __ZN7WebCore17RegularExpressionD1Ev 563 563 __ZN7WebCore17SubresourceLoader6createEPNS_5FrameEPNS_14CachedResourceERKNS_15ResourceRequestERKNS_21ResourceLoaderOptionsE 564 __ZN7WebCore17ViewportArguments19deprecatedTargetDPIE565 564 __ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE 566 565 __ZN7WebCore17openTemporaryFileERKN3WTF6StringERi -
trunk/Source/WebCore/dom/ViewportArguments.cpp
r147529 r147893 43 43 namespace WebCore { 44 44 45 #if PLATFORM(BLACKBERRY) || PLATFORM(EFL) || PLATFORM(GTK) || PLATFORM(QT) 45 46 const float ViewportArguments::deprecatedTargetDPI = 160; 47 #endif 46 48 47 49 static const float& compareIgnoringAuto(const float& value1, const float& value2, const float& (*compare) (const float&, const float&)) … … 381 383 382 384 return 1; 383 }384 385 static float findTargetDensityDPIValue(const String& keyString, const String& valueString, Document* document)386 {387 if (equalIgnoringCase(valueString, "device-dpi"))388 return ViewportArguments::ValueDeviceDPI;389 if (equalIgnoringCase(valueString, "low-dpi"))390 return ViewportArguments::ValueLowDPI;391 if (equalIgnoringCase(valueString, "medium-dpi"))392 return ViewportArguments::ValueMediumDPI;393 if (equalIgnoringCase(valueString, "high-dpi"))394 return ViewportArguments::ValueHighDPI;395 396 bool ok;397 float value = numericPrefix(keyString, valueString, document, &ok);398 if (!ok || value < 70 || value > 400)399 return ViewportArguments::ValueAuto;400 401 return value;402 385 } 403 386 … … 418 401 else if (keyString == "user-scalable") 419 402 arguments->userZoom = findUserScalableValue(keyString, valueString, document); 420 else if (keyString == "target-densitydpi") { 421 arguments->deprecatedTargetDensityDPI = findTargetDensityDPIValue(keyString, valueString, document); 422 reportViewportWarning(document, TargetDensityDpiUnsupported, String(), String()); 423 } else 403 else 424 404 reportViewportWarning(document, UnrecognizedViewportArgumentKeyError, keyString, String()); 425 405 } … … 431 411 "Viewport argument value \"%replacement1\" for key \"%replacement2\" is invalid, and has been ignored.", 432 412 "Viewport argument value \"%replacement1\" for key \"%replacement2\" was truncated to its numeric prefix.", 433 "Viewport maximum-scale cannot be larger than 10.0. The maximum-scale will be set to 10.0.", 434 "Viewport target-densitydpi is not supported.", 413 "Viewport maximum-scale cannot be larger than 10.0. The maximum-scale will be set to 10.0." 435 414 }; 436 415 … … 442 421 switch (errorCode) { 443 422 case TruncatedViewportArgumentValueError: 444 case TargetDensityDpiUnsupported:445 423 return WarningMessageLevel; 446 424 case UnrecognizedViewportArgumentKeyError: -
trunk/Source/WebCore/dom/ViewportArguments.h
r147529 r147893 40 40 UnrecognizedViewportArgumentValueError, 41 41 TruncatedViewportArgumentValueError, 42 MaximumScaleTooLargeError, 43 TargetDensityDpiUnsupported 42 MaximumScaleTooLargeError 44 43 }; 45 44 … … 94 93 , userZoom(ValueAuto) 95 94 , orientation(ValueAuto) 96 , deprecatedTargetDensityDPI(ValueAuto)97 95 { 98 96 } … … 112 110 float userZoom; 113 111 float orientation; 114 float deprecatedTargetDensityDPI; // Only used for Android WebView115 112 116 113 bool operator==(const ViewportArguments& other) const … … 128 125 && maxZoom == other.maxZoom 129 126 && userZoom == other.userZoom 130 && orientation == other.orientation 131 && deprecatedTargetDensityDPI == other.deprecatedTargetDensityDPI; 127 && orientation == other.orientation; 132 128 } 133 129 … … 137 133 } 138 134 135 #if PLATFORM(BLACKBERRY) || PLATFORM(EFL) || PLATFORM(GTK) || PLATFORM(QT) 139 136 // FIXME: We're going to keep this constant around until all embedders 140 137 // refactor their code to no longer need it. 141 138 static const float deprecatedTargetDPI; 139 #endif 142 140 }; 143 141 -
trunk/Source/WebCore/editing/EditingBehavior.h
r147721 r147893 42 42 bool shouldMoveCaretToHorizontalBoundaryWhenPastTopOrBottom() const 43 43 { 44 return m_type != EditingWindowsBehavior && m_type != EditingAndroidBehavior;44 return m_type != EditingWindowsBehavior; 45 45 } 46 46 … … 67 67 bool shouldAllowSpellingSuggestionsWithoutSelection() const 68 68 { 69 return m_type == EditingUnixBehavior || m_type == EditingAndroidBehavior;69 return m_type == EditingUnixBehavior; 70 70 } 71 71 … … 73 73 bool shouldNavigateBackOnBackspace() const 74 74 { 75 return m_type != EditingUnixBehavior && m_type != EditingAndroidBehavior;75 return m_type != EditingUnixBehavior; 76 76 } 77 77 -
trunk/Source/WebCore/editing/EditingBehaviorTypes.h
r141837 r147893 40 40 EditingMacBehavior, 41 41 EditingWindowsBehavior, 42 EditingUnixBehavior, 43 EditingAndroidBehavior 42 EditingUnixBehavior 44 43 }; 45 44 -
trunk/Source/WebCore/page/EventHandler.cpp
r147749 r147893 2676 2676 bool EventHandler::handleGestureLongTap(const PlatformGestureEvent& gestureEvent) 2677 2677 { 2678 #if ENABLE(CONTEXT_MENUS) && !OS(ANDROID)2678 #if ENABLE(CONTEXT_MENUS) 2679 2679 if (!m_didLongPressInvokeContextMenu) 2680 2680 return sendContextMenuEventForGesture(gestureEvent); 2681 #endif 2681 #endif // ENABLE(CONTEXT_MENUS) 2682 2682 return false; 2683 2683 } … … 2685 2685 bool EventHandler::handleGestureForTextSelectionOrContextMenu(const PlatformGestureEvent& gestureEvent) 2686 2686 { 2687 #if OS(ANDROID)2688 IntPoint hitTestPoint = m_frame->view()->windowToContents(gestureEvent.position());2689 HitTestResult result = hitTestResultAtPoint(hitTestPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);2690 Node* innerNode = result.targetNode();2691 if (!result.isLiveLink() && innerNode && (innerNode->isContentEditable() || innerNode->isTextNode())) {2692 selectClosestWordFromHitTestResult(result, DontAppendTrailingWhitespace);2693 if (m_frame->selection()->isRange())2694 return true;2695 }2696 #endif2697 2687 #if ENABLE(CONTEXT_MENUS) 2698 2688 m_didLongPressInvokeContextMenu = (gestureEvent.type() == PlatformEvent::GestureLongPress); -
trunk/Source/WebCore/page/Settings.cpp
r147795 r147893 113 113 // 1) EditingMacBehavior comprises Tiger, Leopard, SnowLeopard and iOS builds, as well as QtWebKit when built on Mac; 114 114 // 2) EditingWindowsBehavior comprises Win32 and WinCE builds, as well as QtWebKit and Chromium when built on Windows; 115 // 3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS/Android (and then abusing the terminology); 116 // 4) EditingAndroidBehavior comprises Android builds. 115 // 3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS (and then abusing the terminology); 117 116 // 99) MacEditingBehavior is used as a fallback. 118 117 static EditingBehaviorType editingBehaviorTypeForPlatform() … … 123 122 #elif OS(WINDOWS) 124 123 EditingWindowsBehavior 125 #elif OS(ANDROID)126 EditingAndroidBehavior127 124 #elif OS(UNIX) 128 125 EditingUnixBehavior -
trunk/Source/WebCore/platform/graphics/FontCache.h
r147888 r147893 156 156 int m_purgePreventCount; 157 157 158 #if PLATFORM(MAC) || OS(ANDROID)158 #if PLATFORM(MAC) 159 159 friend class ComplexTextController; 160 160 #endif -
trunk/Source/WebCore/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp
r146456 r147893 270 270 WebKit::WebFontRenderStyle style; 271 271 272 #if OS(ANDROID)273 style.setDefaults();274 #else275 272 if (!font || !*font) 276 273 style.setDefaults(); // It's probably a webfont. Take the system defaults. … … 279 276 else 280 277 WebKit::WebFontInfo::renderStyleForStrike(font, sizeAndStyle, &style); 281 #endif282 278 283 279 style.toFontRenderStyle(&m_style); -
trunk/Source/WebCore/testing/InternalSettings.cpp
r147034 r147893 388 388 else if (equalIgnoringCase(editingBehavior, "unix")) 389 389 settings()->setEditingBehaviorType(EditingUnixBehavior); 390 else if (equalIgnoringCase(editingBehavior, "android"))391 settings()->setEditingBehaviorType(EditingAndroidBehavior);392 390 else 393 391 ec = SYNTAX_ERR;
Note: See TracChangeset
for help on using the changeset viewer.