Commit 70c7d4da authored by rniwa@webkit.org's avatar rniwa@webkit.org

Remove Chromium code from WebCore/page

https://bugs.webkit.org/show_bug.cgi?id=114013

Reviewed by Anders Carlsson.

Removed.

* page/Console.cpp:
(WebCore::Console::time):
(WebCore::Console::timeEnd):
* page/EventHandler.cpp:
(WebCore::shouldGesturesTriggerActive):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore):
(WebCore::EventHandler::sendScrollEventToView):
* page/FeatureObserver.cpp:
(WebCore::FeatureObserver::updateMeasurements):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::useSlowRepaints):
* page/PageConsole.cpp:
* page/PageGroup.cpp:
(WebCore::PageGroup::isLinkVisited):
(WebCore::PageGroup::addVisitedLink):
* page/Settings.cpp:
(WebCore):
* page/android: Removed.
* page/chromium: Removed.
* page/chromium/ChromeClientChromium.h: Removed.
* page/chromium/DragControllerChromium.cpp: Removed.
* page/chromium/EventHandlerChromium.cpp: Removed.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
(WebCore):
* page/scrolling/ScrollingCoordinator.h:
(ScrollingCoordinator):
* page/scrolling/ScrollingTree.cpp:
(WebCore):
* page/scrolling/ScrollingTree.h:
(ScrollingTree):
* page/scrolling/chromium: Removed.
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: Removed.
* page/scrolling/chromium/ScrollingCoordinatorChromium.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent be2ede1f
2013-04-05 Ryosuke Niwa <rniwa@webkit.org>
Remove Chromium code from WebCore/page
https://bugs.webkit.org/show_bug.cgi?id=114013
Reviewed by Anders Carlsson.
Removed.
* page/Console.cpp:
(WebCore::Console::time):
(WebCore::Console::timeEnd):
* page/EventHandler.cpp:
(WebCore::shouldGesturesTriggerActive):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore):
(WebCore::EventHandler::sendScrollEventToView):
* page/FeatureObserver.cpp:
(WebCore::FeatureObserver::updateMeasurements):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::useSlowRepaints):
* page/PageConsole.cpp:
* page/PageGroup.cpp:
(WebCore::PageGroup::isLinkVisited):
(WebCore::PageGroup::addVisitedLink):
* page/Settings.cpp:
(WebCore):
* page/android: Removed.
* page/chromium: Removed.
* page/chromium/ChromeClientChromium.h: Removed.
* page/chromium/DragControllerChromium.cpp: Removed.
* page/chromium/EventHandlerChromium.cpp: Removed.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::create):
(WebCore):
* page/scrolling/ScrollingCoordinator.h:
(ScrollingCoordinator):
* page/scrolling/ScrollingTree.cpp:
(WebCore):
* page/scrolling/ScrollingTree.h:
(ScrollingTree):
* page/scrolling/chromium: Removed.
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp: Removed.
* page/scrolling/chromium/ScrollingCoordinatorChromium.h: Removed.
2013-04-05 Ryosuke Niwa <rniwa@webkit.org>
Remove Chromium code from WebCore/rendering
......@@ -56,10 +56,6 @@
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
#if PLATFORM(CHROMIUM)
#include "TraceEvent.h"
#endif
namespace WebCore {
Console::Console(Frame* frame)
......@@ -231,16 +227,10 @@ void Console::profileEnd(const String& title, ScriptState* state)
void Console::time(const String& title)
{
InspectorInstrumentation::startConsoleTiming(m_frame, title);
#if PLATFORM(CHROMIUM)
TRACE_EVENT_COPY_ASYNC_BEGIN0("webkit", title.utf8().data(), this);
#endif
}
void Console::timeEnd(ScriptState* state, const String& title)
{
#if PLATFORM(CHROMIUM)
TRACE_EVENT_COPY_ASYNC_END0("webkit", title.utf8().data(), this);
#endif
RefPtr<ScriptCallStack> callStack(createScriptCallStackForConsole(state));
InspectorInstrumentation::stopConsoleTiming(m_frame, title, callStack.release());
}
......
......@@ -287,11 +287,7 @@ static inline bool shouldGesturesTriggerActive()
// If the platform we're on supports GestureTapDown and GestureTapCancel then we'll
// rely on them to set the active state. Unfortunately there's no generic way to
// know in advance what event types are supported.
#if PLATFORM(CHROMIUM)
return true;
#else
return false;
#endif
}
#endif
......@@ -1940,11 +1936,6 @@ bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
bool swallowMouseUpEvent = !dispatchMouseEvent(eventNames().mouseupEvent, mev.targetNode(), true, m_clickCount, mouseEvent, false);
bool contextMenuEvent = mouseEvent.button() == RightButton;
#if PLATFORM(CHROMIUM) && OS(DARWIN)
// FIXME: The Mac port achieves the same behavior by checking whether the context menu is currently open in WebPage::mouseEvent(). Consider merging the implementations.
if (mouseEvent.button() == LeftButton && mouseEvent.modifiers() & PlatformEvent::CtrlKey)
contextMenuEvent = true;
#endif
bool swallowClickEvent = m_clickCount > 0 && !contextMenuEvent && mouseIsReleasedOnPressedElement(mev.targetNode(), m_clickNode.get()) && !dispatchMouseEvent(eventNames().clickEvent, mev.targetNode(), true, m_clickCount, mouseEvent, true);
......@@ -2400,7 +2391,7 @@ bool EventHandler::isInsideScrollbar(const IntPoint& windowPoint) const
return false;
}
#if !PLATFORM(GTK) && !(PLATFORM(CHROMIUM) && (OS(UNIX) && !OS(DARWIN)))
#if !PLATFORM(GTK)
bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, const PlatformWheelEvent&) const
{
return false;
......@@ -2823,7 +2814,7 @@ bool EventHandler::sendScrollEventToView(const PlatformGestureEvent& gestureEven
scaledDelta.width() / tickDivisor, scaledDelta.height() / tickDivisor,
ScrollByPixelWheelEvent,
gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey());
#if PLATFORM(MAC) || PLATFORM(CHROMIUM)
#if PLATFORM(MAC)
syntheticWheelEvent.setHasPreciseScrollingDeltas(true);
#endif
......
......@@ -49,20 +49,9 @@ FeatureObserver::~FeatureObserver()
void FeatureObserver::updateMeasurements()
{
#if PLATFORM(CHROMUM)
HistogramSupport::histogramEnumeration("WebCore.FeatureObserver", PageVisits, NumberOfFeatures);
#endif
if (!m_featureBits)
return;
#if PLATFORM(CHROMUM)
for (unsigned i = 0; i < NumberOfFeatures; ++i) {
if (m_featureBits->quickGet(i))
HistogramSupport::histogramEnumeration("WebCore.FeatureObserver", i, NumberOfFeatures);
}
#endif
// Clearing feature bits is timing sensitive. Ports other than chromium do not use HistogramSupport,
// and pull the results on certain navigation events instead.
m_featureBits->clearAll();
......
......@@ -94,10 +94,6 @@
#include "TextAutosizer.h"
#endif
#if PLATFORM(CHROMIUM)
#include "TraceEvent.h"
#endif
namespace WebCore {
using namespace HTMLNames;
......@@ -1110,10 +1106,6 @@ void FrameView::layout(bool allowSubtree)
if (m_inLayout)
return;
#if PLATFORM(CHROMIUM)
TRACE_EVENT0("webkit", "FrameView::layout");
#endif
// Protect the view from being deleted during layout (in recalcStyle)
RefPtr<FrameView> protector(this);
......@@ -1335,7 +1327,7 @@ void FrameView::layout(bool allowSubtree)
m_layoutCount++;
#if PLATFORM(MAC) || PLATFORM(CHROMIUM)
#if PLATFORM(MAC)
if (AXObjectCache* cache = root->document()->existingAXObjectCache())
cache->postNotification(root, AXObjectCache::AXLayoutComplete, true);
#endif
......@@ -1473,13 +1465,6 @@ bool FrameView::useSlowRepaints(bool considerOverlap) const
if (contentsInCompositedLayer() && !platformWidget())
return mustBeSlow;
#if PLATFORM(CHROMIUM)
// The chromium compositor does not support scrolling a non-composited frame within a composited page through
// the fast scrolling path, so force slow scrolling in that case.
if (m_frame->ownerElement() && !hasCompositedContent() && m_frame->page() && m_frame->page()->mainFrame()->view()->hasCompositedContent())
return true;
#endif
bool isOverlapped = m_isOverlapped && considerOverlap;
if (mustBeSlow || m_cannotBlitToWindow || isOverlapped || !m_contentIsOpaque)
......
......@@ -49,10 +49,6 @@
#include <wtf/text/CString.h>
#include <wtf/text/WTFString.h>
#if PLATFORM(CHROMIUM)
#include "TraceEvent.h"
#endif
namespace WebCore {
namespace {
......
......@@ -46,10 +46,6 @@
#endif
#endif
#if PLATFORM(CHROMIUM)
#include "VisitedLinks.h"
#endif
namespace WebCore {
static unsigned getUniqueIdentifier()
......@@ -195,17 +191,12 @@ void PageGroup::removePage(Page* page)
bool PageGroup::isLinkVisited(LinkHash visitedLinkHash)
{
#if PLATFORM(CHROMIUM)
// Use Chromium's built-in visited link database.
return VisitedLinks::isLinkVisited(visitedLinkHash);
#else
if (!m_visitedLinksPopulated) {
m_visitedLinksPopulated = true;
ASSERT(!m_pages.isEmpty());
(*m_pages.begin())->chrome()->client()->populateVisitedLinks();
}
return m_visitedLinkHashes.contains(visitedLinkHash);
#endif
}
void PageGroup::addVisitedLinkHash(LinkHash hash)
......@@ -217,10 +208,8 @@ void PageGroup::addVisitedLinkHash(LinkHash hash)
inline void PageGroup::addVisitedLink(LinkHash hash)
{
ASSERT(shouldTrackVisitedLinks);
#if !PLATFORM(CHROMIUM)
if (!m_visitedLinkHashes.add(hash).isNewEntry)
return;
#endif
Page::visitedStateChanged(this, hash);
pageCache()->markPagesForVistedLinkStyleRecalc();
}
......
......@@ -112,11 +112,11 @@ bool Settings::gShouldRespectPriorityInCSSAttributeSetters = false;
#endif
// NOTEs
// 1) EditingMacBehavior comprises Tiger, Leopard, SnowLeopard and iOS builds, as well QtWebKit and Chromium when built on Mac;
// 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.
// 99) MacEditingBehavior is used a fallback.
// 99) MacEditingBehavior is used as a fallback.
static EditingBehaviorType editingBehaviorTypeForPlatform()
{
return
......@@ -141,21 +141,8 @@ static const bool defaultUnifiedTextCheckerEnabled = true;
#else
static const bool defaultUnifiedTextCheckerEnabled = false;
#endif
#if PLATFORM(CHROMIUM)
#if OS(MAC_OS_X)
static const bool defaultSmartInsertDeleteEnabled = true;
#else
static const bool defaultSmartInsertDeleteEnabled = false;
#endif
#if OS(WINDOWS)
static const bool defaultSelectTrailingWhitespaceEnabled = true;
#else
static const bool defaultSelectTrailingWhitespaceEnabled = false;
#endif
#else
static const bool defaultSmartInsertDeleteEnabled = true;
static const bool defaultSelectTrailingWhitespaceEnabled = false;
#endif
Settings::Settings(Page* page)
: m_page(0)
......
/*
* Copyright (c) 2008, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ChromeClientChromium_h
#define ChromeClientChromium_h
#include "ChromeClient.h"
#include <wtf/Forward.h>
namespace WebCore {
class IntRect;
class PopupContainer;
// Contains Chromium-specific extensions to the ChromeClient. Only put
// things here that don't make sense for other ports.
class ChromeClientChromium : public ChromeClient {
public:
// Notifies the client of a new popup widget. The client should place
// and size the widget with the given bounds, relative to the screen.
// If handleExternal is true, then drawing and input handling for the
// popup will be handled by the external embedder.
virtual void popupOpened(PopupContainer* popupContainer, const IntRect& bounds,
bool handleExternal) = 0;
// Notifies the client a popup was closed.
virtual void popupClosed(PopupContainer* popupContainer) = 0;
};
} // namespace WebCore
#endif
/*
* Copyright (C) 2007 Apple Inc. All rights reserved.
* Copyright (C) 2008 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "DragController.h"
#include "DragData.h"
#include "FrameSelection.h"
#include <wtf/RefPtr.h>
#if OS(WINDOWS)
#include <windows.h>
#endif
namespace WebCore {
const int DragController::LinkDragBorderInset = 2;
const int DragController::MaxOriginalImageArea = 1500 * 1500;
const int DragController::DragIconRightInset = 7;
const int DragController::DragIconBottomInset = 3;
const float DragController::DragImageAlpha = 0.75f;
DragOperation DragController::dragOperation(DragData* dragData)
{
// FIXME: To match the MacOS behaviour we should return DragOperationNone
// if we are a modal window, we are the drag source, or the window is an
// attached sheet If this can be determined from within WebCore
// operationForDrag can be pulled into WebCore itself
ASSERT(dragData);
return dragData->containsURL(0) && !m_didInitiateDrag ? DragOperationCopy : DragOperationNone;
}
bool DragController::isCopyKeyDown(DragData*)
{
// FIXME: This should not be OS specific. Delegate to the embedder instead.
#if OS(WINDOWS)
return ::GetAsyncKeyState(VK_CONTROL);
#else
return false;
#endif
}
const IntSize& DragController::maxDragImageSize()
{
#if OS(DARWIN)
// Match Safari's drag image size.
static const IntSize maxDragImageSize(400, 400);
#else
static const IntSize maxDragImageSize(200, 200);
#endif
return maxDragImageSize;
}
void DragController::cleanupAfterSystemDrag()
{
}
} // namespace WebCore
/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "EventHandler.h"
#include "ChromiumDataObject.h"
#include "ClipboardChromium.h"
#include "Cursor.h"
#include "FloatPoint.h"
#include "FocusController.h"
#include "Frame.h"
#include "FrameSelection.h"
#include "FrameView.h"
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "MouseEventWithHitTestResults.h"
#include "NotImplemented.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformWheelEvent.h"
#include "RenderWidget.h"
namespace WebCore {
#if OS(DARWIN)
const double EventHandler::TextDragDelay = 0.15;
#else
const double EventHandler::TextDragDelay = 0.0;
#endif
bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
// If we're clicking into a frame that is selected, the frame will appear
// greyed out even though we're clicking on the selection. This looks
// really strange (having the whole frame be greyed out), so we deselect the
// selection.
IntPoint p = m_frame->view()->windowToContents(mev.event().position());
if (m_frame->selection()->contains(p)) {
VisiblePosition visiblePos(
mev.targetNode()->renderer()->positionForPoint(mev.localPoint()));
VisibleSelection newSelection(visiblePos);
if (m_frame->selection()->shouldChangeSelection(newSelection))
m_frame->selection()->setSelection(newSelection);
}
subframe->eventHandler()->handleMousePressEvent(mev.event());
return true;
}
bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode)
{
if (m_mouseDownMayStartDrag && !m_mouseDownWasInSubframe)
return false;
subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hoveredNode);
return true;
}
bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
subframe->eventHandler()->handleMouseReleaseEvent(mev.event());
return true;
}
bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& wheelEvent, Widget* widget)
{
// We can sometimes get a null widget! EventHandlerMac handles a null
// widget by returning false, so we do the same.
if (!widget)
return false;
// If not a FrameView, then probably a plugin widget. Those will receive
// the event via an EventTargetNode dispatch when this returns false.
if (!widget->isFrameView())
return false;
return toFrameView(widget)->frame()->eventHandler()->handleWheelEvent(wheelEvent);
}
bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
{
// Figure out which view to send the event to.
if (!event.targetNode() || !event.targetNode()->renderer() || !event.targetNode()->renderer()->isWidget())
return false;
return passMouseDownEventToWidget(toRenderWidget(event.targetNode()->renderer())->widget());
}
bool EventHandler::passMouseDownEventToWidget(Widget* widget)
{
notImplemented();
return false;
}
bool EventHandler::tabsToAllFormControls(KeyboardEvent*) const
{
return true;
}
bool EventHandler::eventActivatedView(const PlatformMouseEvent& event) const
{
// FIXME: EventHandlerWin.cpp does the following:
// return event.activatedWebView();
return false;
}
PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
{
RefPtr<ChromiumDataObject> dataObject = ChromiumDataObject::create();
return ClipboardChromium::create(Clipboard::DragAndDrop, dataObject.get(), ClipboardWritable, m_frame);
}
void EventHandler::focusDocumentView()
{
Page* page = m_frame->page();
if (!page)
return;
page->focusController()->setFocusedFrame(m_frame);
}
bool EventHandler::passWidgetMouseDownEventToWidget(RenderWidget* renderWidget)
{
return passMouseDownEventToWidget(renderWidget->widget());
}
unsigned EventHandler::accessKeyModifiers()
{
#if OS(DARWIN)
return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
#else
return PlatformEvent::AltKey;
#endif
}
#if OS(UNIX) && !OS(DARWIN)
// GTK+ must scroll horizontally if the mouse pointer is on top of the
// horizontal scrollbar while scrolling with the wheel.
// This code comes from gtk/EventHandlerGtk.cpp.
bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult& result, const PlatformWheelEvent& event) const
{
return !event.hasPreciseScrollingDeltas() && result.scrollbar() && result.scrollbar()->orientation() == HorizontalScrollbar;
}
#endif
} // namespace WebCore
......@@ -48,10 +48,6 @@
#include "ScrollingCoordinatorMac.h"
#endif
#if PLATFORM(CHROMIUM)
#include "ScrollingCoordinatorChromium.h"
#endif
#if USE(COORDINATED_GRAPHICS)
#include "ScrollingCoordinatorCoordinatedGraphics.h"
#endif
......@@ -68,10 +64,6 @@ PassRefPtr<ScrollingCoordinator> ScrollingCoordinator::create(Page* page)
return adoptRef(new ScrollingCoordinatorMac(page));
#endif
#if PLATFORM(CHROMIUM)
return adoptRef(new ScrollingCoordinatorChromium(page));
#endif
#if USE(COORDINATED_GRAPHICS)
return adoptRef(new ScrollingCoordinatorCoordinatedGraphics(page));
#endif
......@@ -412,7 +404,7 @@ void ScrollingCoordinator::updateMainFrameScrollPosition(const IntPoint& scrollP
#endif
}
#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#if PLATFORM(MAC)
void ScrollingCoordinator::handleWheelEventPhase(PlatformWheelEventPhase phase)
{
ASSERT(isMainThread());
......
......@@ -103,7 +103,7 @@ public:
// containers while scrolling.
virtual bool supportsFixedPositionLayers() const { return false; }
#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#if PLATFORM(MAC)
// Dispatched by the scrolling tree during handleWheelEvent. This is required as long as scrollbars are painted on the main thread.
void handleWheelEventPhase(PlatformWheelEventPhase);
#endif
......
......@@ -258,7 +258,7 @@ IntPoint ScrollingTree::mainFrameScrollPosition()
return m_mainFrameScrollPosition;
}
#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#if PLATFORM(MAC)
void ScrollingTree::handleWheelEventPhase(PlatformWheelEventPhase phase)
{
if (!m_scrollingCoordinator)
......
......@@ -90,7 +90,7 @@ public:
void updateMainFrameScrollPosition(const IntPoint& scrollPosition, SetOrSyncScrollingLayerPosition = SyncScrollingLayerPosition);
IntPoint mainFrameScrollPosition();
#if PLATFORM(MAC) || (PLATFORM(CHROMIUM) && OS(DARWIN))
#if PLATFORM(MAC)
void handleWheelEventPhase(PlatformWheelEventPhase);
#endif
......
/*
* Copyright (C) 2012 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ScrollingCoordinatorChromium_h
#define ScrollingCoordinatorChromium_h
#include "ScrollingCoordinator.h"