summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-16 16:26:20 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-12-16 16:26:20 +0100
commitdd7fd6f8760f14081648860715fb320cbc3bb7dd (patch)
tree1a92a0b7d75ce14629eb72a85950ad65c4d6385f /Source
parent68f2a053e7ae67540ee557b5832f74361f3826f4 (diff)
parent40c371c0deac92e46cdc3302d00ab304bcbca505 (diff)
downloadqtwebkit-dd7fd6f8760f14081648860715fb320cbc3bb7dd.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ic22a6afb0f21d6b716e17cf11d33e56fa873880e
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/page/FrameView.cpp18
-rw-r--r--Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp8
-rw-r--r--Source/WebCore/plugins/win/PluginViewWin.cpp7
-rw-r--r--Source/WebCore/rendering/RenderLayerBacking.cpp8
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp4
5 files changed, 19 insertions, 26 deletions
diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp
index 209030309..4823b48d0 100644
--- a/Source/WebCore/page/FrameView.cpp
+++ b/Source/WebCore/page/FrameView.cpp
@@ -4147,24 +4147,6 @@ void FrameView::removeChild(Widget* widget)
bool FrameView::wheelEvent(const PlatformWheelEvent& wheelEvent)
{
- // Note that to allow for rubber-band over-scroll behavior, even non-scrollable views
- // should handle wheel events.
-#if !ENABLE(RUBBER_BANDING)
- if (!isScrollable())
- return false;
-#endif
-
- if (delegatesScrolling()) {
- IntSize offset = scrollOffset();
- IntSize newOffset = IntSize(offset.width() - wheelEvent.deltaX(), offset.height() - wheelEvent.deltaY());
- if (offset != newOffset) {
- ScrollView::scrollTo(newOffset);
- scrollPositionChanged();
- frame()->loader()->client()->didChangeScrollOffset();
- }
- return true;
- }
-
// We don't allow mouse wheeling to happen in a ScrollView that has had its scrollbars explicitly disabled.
if (!canHaveScrollbars())
return false;
diff --git a/Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp b/Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp
index f89945771..d8c440b90 100644
--- a/Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp
+++ b/Source/WebCore/platform/qt/ScrollbarThemeQStyle.cpp
@@ -34,6 +34,8 @@
#include "ScrollView.h"
#include "Scrollbar.h"
+#include <QGuiApplication>
+
namespace WebCore {
ScrollbarThemeQStyle::ScrollbarThemeQStyle()
@@ -93,8 +95,10 @@ static QStyleFacadeOption initSliderStyleOption(ScrollbarThemeClient* scrollbar,
opt.palette = widget->property("palette").value<QPalette>();
opt.rect = widget->property("rect").value<QRect>();
opt.direction = static_cast<Qt::LayoutDirection>(widget->property("layoutDirection").toInt());
- } else
+ } else {
opt.state |= QStyleFacade::State_Active;
+ opt.direction = QGuiApplication::layoutDirection();
+ }
opt.state &= ~QStyleFacade::State_HasFocus;
@@ -116,6 +120,8 @@ static QStyleFacadeOption initSliderStyleOption(ScrollbarThemeClient* scrollbar,
opt.slider.singleStep = scrollbar->lineStep();
opt.slider.minimum = 0;
opt.slider.maximum = qMax(0, scrollbar->maximum());
+ if (opt.slider.orientation == Qt::Horizontal && opt.direction == Qt::RightToLeft)
+ opt.slider.upsideDown = true;
ScrollbarPart pressedPart = scrollbar->pressedPart();
ScrollbarPart hoveredPart = scrollbar->hoveredPart();
if (pressedPart != NoPart) {
diff --git a/Source/WebCore/plugins/win/PluginViewWin.cpp b/Source/WebCore/plugins/win/PluginViewWin.cpp
index fae3c4415..d1f99bed7 100644
--- a/Source/WebCore/plugins/win/PluginViewWin.cpp
+++ b/Source/WebCore/plugins/win/PluginViewWin.cpp
@@ -350,11 +350,10 @@ static inline IntPoint contentsToNativeWindow(FrameView* view, const IntPoint& p
#if PLATFORM(QT)
// Our web view's QWidget isn't necessarily a native window itself. Map the position
// all the way up to the QWidget associated with the HWND returned as NPNVnetscapeWindow.
- PlatformPageClient client = view->hostWindow()->platformPageClient();
- return client->mapToOwnerWindow(view->contentsToWindow(point));
-#else
- return view->contentsToWindow(point);
+ if (PlatformPageClient client = view->hostWindow()->platformPageClient())
+ return client->mapToOwnerWindow(view->contentsToWindow(point));
#endif
+ return view->contentsToWindow(point);
}
static inline IntRect contentsToNativeWindow(FrameView* view, const IntRect& rect)
diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp
index 955315eef..143c7d32c 100644
--- a/Source/WebCore/rendering/RenderLayerBacking.cpp
+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp
@@ -1447,6 +1447,14 @@ bool canCreateTiledImage(const RenderStyle* style)
if (!image->isBitmapImage())
return false;
+#if USE(COORDINATED_GRAPHICS)
+ // Direct compositing becomes slow when the images are too
+ // large and the UIProcess asserts if one of the dimensions
+ // is larger than 2000.
+ if (2000 < std::max(image->width(), image->height()))
+ return false;
+#endif
+
return true;
}
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index 0c02f31e5..657a25dcc 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -1202,11 +1202,9 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
m_frameCameFromPageCache = false;
- ScrollbarMode defaultScrollbarMode = shouldHideScrollbars ? ScrollbarAlwaysOff : ScrollbarAuto;
-
m_frame->coreFrame()->createView(webPage->size(), backgroundColor, isTransparent,
IntSize(), currentFixedVisibleContentRect, shouldUseFixedLayout,
- defaultScrollbarMode, /* lock */ shouldHideScrollbars, defaultScrollbarMode, /* lock */ shouldHideScrollbars);
+ ScrollbarAuto, /* lock */ shouldHideScrollbars, ScrollbarAuto, /* lock */ shouldHideScrollbars);
if (int minimumLayoutWidth = webPage->minimumLayoutSize().width()) {
int minimumLayoutHeight = std::max(webPage->minimumLayoutSize().height(), 1);