Diff
Modified: trunk/Source/WebCore/ChangeLog (170971 => 170972)
--- trunk/Source/WebCore/ChangeLog 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/ChangeLog 2014-07-10 20:04:42 UTC (rev 170972)
@@ -1,3 +1,33 @@
+2014-07-10 Beth Dakin <[email protected]>
+
+ Need Setting/WKPreference that allows clients to prevent scrollbars from drawing
+ on a secondary thread
+ https://bugs.webkit.org/show_bug.cgi?id=134778
+ -and corresponding-
+ <rdar://problem/17595333>
+
+ Reviewed by Tim Horton.
+
+ This is a requirement for some types of performance tests. The patch adds a new
+ virtual function to ScrollableArea that forces subclasses to indicate the value of
+ the Setting. This is required because Scrollbar and ScrollableArea can’t get to
+ Settings on their own.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
+ * page/FrameView.h:
+ * page/Settings.in:
+ * platform/ScrollableArea.h:
+ * platform/Scrollbar.cpp:
+ (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
+ * platform/win/PopupMenuWin.h:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
+ * rendering/RenderLayer.h:
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
+ * rendering/RenderListBox.h:
+
2014-07-10 Brady Eidson <[email protected]>
Phone number highlights should always be visible if the mouse hovers over.
Modified: trunk/Source/WebCore/page/FrameView.cpp (170971 => 170972)
--- trunk/Source/WebCore/page/FrameView.cpp 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/page/FrameView.cpp 2014-07-10 20:04:42 UTC (rev 170972)
@@ -3152,6 +3152,12 @@
return true;
}
+bool FrameView::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const
+{
+ Page* page = frame().page();
+ return page && page->settings().forceUpdateScrollbarsOnMainThreadForPerformanceTesting();
+}
+
void FrameView::scrollTo(const IntSize& newOffset)
{
LayoutSize offset = scrollOffset();
Modified: trunk/Source/WebCore/page/FrameView.h (170971 => 170972)
--- trunk/Source/WebCore/page/FrameView.h 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/page/FrameView.h 2014-07-10 20:04:42 UTC (rev 170972)
@@ -452,6 +452,7 @@
virtual bool isActive() const override;
virtual bool updatesScrollLayerPositionOnMainThread() const override;
+ virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override;
#if ENABLE(RUBBER_BANDING)
GraphicsLayer* setWantsLayerForTopOverHangArea(bool) const;
Modified: trunk/Source/WebCore/page/Settings.in (170971 => 170972)
--- trunk/Source/WebCore/page/Settings.in 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/page/Settings.in 2014-07-10 20:04:42 UTC (rev 170972)
@@ -134,6 +134,7 @@
scrollingCoordinatorEnabled initial=false
scrollingTreeIncludesFrames initial=defaultScrollingTreeIncludesFrames
scrollAnimatorEnabled initial=true, conditional=SMOOTH_SCROLLING
+forceUpdateScrollbarsOnMainThreadForPerformanceTesting initial=false
notificationsEnabled initial=true
# Some apps needs isLoadingInAPISense to account for active subresource loaders.
Modified: trunk/Source/WebCore/platform/ScrollableArea.h (170971 => 170972)
--- trunk/Source/WebCore/platform/ScrollableArea.h 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/platform/ScrollableArea.h 2014-07-10 20:04:42 UTC (rev 170972)
@@ -125,6 +125,8 @@
virtual bool updatesScrollLayerPositionOnMainThread() const = 0;
+ virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const = 0;
+
// Convert points and rects between the scrollbar and its containing view.
// The client needs to implement these in order to be aware of layout effects
// like CSS transforms.
Modified: trunk/Source/WebCore/platform/Scrollbar.cpp (170971 => 170972)
--- trunk/Source/WebCore/platform/Scrollbar.cpp 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/platform/Scrollbar.cpp 2014-07-10 20:04:42 UTC (rev 170972)
@@ -551,7 +551,8 @@
// It's unfortunate that this needs to be done with an ifdef. Ideally there would be a way to feature-detect
// the necessary support within AppKit.
#if ENABLE(ASYNC_SCROLLING) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
- return m_scrollableArea->hasLayerForVerticalScrollbar() || m_scrollableArea->hasLayerForHorizontalScrollbar();
+ return !m_scrollableArea->forceUpdateScrollbarsOnMainThreadForPerformanceTesting()
+ && (m_scrollableArea->hasLayerForVerticalScrollbar() || m_scrollableArea->hasLayerForHorizontalScrollbar());
#else
return false;
#endif
Modified: trunk/Source/WebCore/platform/win/PopupMenuWin.h (170971 => 170972)
--- trunk/Source/WebCore/platform/win/PopupMenuWin.h 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/platform/win/PopupMenuWin.h 2014-07-10 20:04:42 UTC (rev 170972)
@@ -102,6 +102,7 @@
virtual IntSize contentsSize() const override;
virtual IntRect scrollableAreaBoundingBox() const override;
virtual bool updatesScrollLayerPositionOnMainThread() const override { return true; }
+ virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override { return false; }
// NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea.
void scrollTo(int offset);
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (170971 => 170972)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2014-07-10 20:04:42 UTC (rev 170972)
@@ -1361,6 +1361,12 @@
return renderer().absoluteBoundingBoxRect();
}
+bool RenderLayer::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const
+{
+ Page* page = renderer().frame().page();
+ return page && page->settings().forceUpdateScrollbarsOnMainThreadForPerformanceTesting();
+}
+
RenderLayer* RenderLayer::enclosingTransformedAncestor() const
{
RenderLayer* curr = parent();
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (170971 => 170972)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2014-07-10 20:04:42 UTC (rev 170972)
@@ -1082,6 +1082,7 @@
virtual bool shouldSuspendScrollAnimations() const override;
virtual IntRect scrollableAreaBoundingBox() const override;
virtual bool updatesScrollLayerPositionOnMainThread() const override { return true; }
+ virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override;
#if PLATFORM(IOS)
void registerAsTouchEventListenerForScrolling();
Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (170971 => 170972)
--- trunk/Source/WebCore/rendering/RenderListBox.cpp 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp 2014-07-10 20:04:42 UTC (rev 170972)
@@ -56,6 +56,7 @@
#include "RenderView.h"
#include "Scrollbar.h"
#include "ScrollbarTheme.h"
+#include "Settings.h"
#include "SpatialNavigation.h"
#include "StyleResolver.h"
#include <math.h>
@@ -774,6 +775,12 @@
return view().frameView().shouldSuspendScrollAnimations();
}
+bool RenderListBox::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const
+{
+ Page* page = frame().page();
+ return page && page->settings().forceUpdateScrollbarsOnMainThreadForPerformanceTesting();
+}
+
ScrollableArea* RenderListBox::enclosingScrollableArea() const
{
// FIXME: Return a RenderLayer that's scrollable.
Modified: trunk/Source/WebCore/rendering/RenderListBox.h (170971 => 170972)
--- trunk/Source/WebCore/rendering/RenderListBox.h 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebCore/rendering/RenderListBox.h 2014-07-10 20:04:42 UTC (rev 170972)
@@ -127,6 +127,7 @@
virtual bool isHandlingWheelEvent() const override;
virtual bool shouldSuspendScrollAnimations() const override;
virtual bool updatesScrollLayerPositionOnMainThread() const override { return true; }
+ virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const override;
virtual ScrollableArea* enclosingScrollableArea() const override;
virtual IntRect scrollableAreaBoundingBox() const override;
Modified: trunk/Source/WebKit2/ChangeLog (170971 => 170972)
--- trunk/Source/WebKit2/ChangeLog 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebKit2/ChangeLog 2014-07-10 20:04:42 UTC (rev 170972)
@@ -1,3 +1,28 @@
+2014-07-10 Beth Dakin <[email protected]>
+
+ Need Setting/WKPreference that allows clients to prevent scrollbars from drawing
+ on a secondary thread
+ https://bugs.webkit.org/show_bug.cgi?id=134778
+ -and corresponding-
+ <rdar://problem/17595333>
+
+ Reviewed by Tim Horton.
+
+ This is a requirement for some types of performance tests.
+
+ New pref.
+ * Shared/WebPreferencesDefinitions.h:
+
+ PDFPlugin has to implement this new ScrollableArea virtual function to indicate
+ the Setting’s value.
+ * WebProcess/Plugins/PDF/PDFPlugin.h:
+ * WebProcess/Plugins/PDF/PDFPlugin.mm:
+ (WebKit::PDFPlugin::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
+
+ New pref.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
2014-07-10 Tim Horton <[email protected]>
[iOS] Frequent assertion failures when swiping back
Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (170971 => 170972)
--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2014-07-10 20:04:42 UTC (rev 170972)
@@ -162,6 +162,7 @@
macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, false) \
macro(ScrollingPerformanceLoggingEnabled, scrollingPerformanceLoggingEnabled, Bool, bool, false) \
macro(ScrollAnimatorEnabled, scrollAnimatorEnabled, Bool, bool, DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED) \
+ macro(ForceUpdateScrollbarsOnMainThreadForPerformanceTesting, forceUpdateScrollbarsOnMainThreadForPerformanceTesting, Bool, bool, false) \
macro(ScreenFontSubstitutionEnabled, screenFontSubstitutionEnabled, Bool, bool, DEFAULT_SCREEN_FONT_SUBSTITUTION_ENABLED) \
macro(CookieEnabled, cookieEnabled, Bool, bool, true) \
macro(PlugInSnapshottingEnabled, plugInSnapshottingEnabled, Bool, bool, false) \
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h (170971 => 170972)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h 2014-07-10 20:04:42 UTC (rev 170972)
@@ -198,6 +198,7 @@
virtual WebCore::IntPoint convertFromScrollbarToContainingView(const WebCore::Scrollbar*, const WebCore::IntPoint& scrollbarPoint) const override;
virtual WebCore::IntPoint convertFromContainingViewToScrollbar(const WebCore::Scrollbar*, const WebCore::IntPoint& parentPoint) const override;
virtual bool updatesScrollLayerPositionOnMainThread() const override { return true; }
+ virtual bool forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const;
// PDFPlugin functions.
void updateScrollbars();
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (170971 => 170972)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm 2014-07-10 20:04:42 UTC (rev 170972)
@@ -73,6 +73,7 @@
#import <WebCore/PluginDocument.h>
#import <WebCore/RenderBoxModelObject.h>
#import <WebCore/ScrollbarTheme.h>
+#import <WebCore/Settings.h>
#import <WebCore/UUID.h>
#import <WebKitSystemInterface.h>
#import <wtf/CurrentTime.h>
@@ -748,6 +749,16 @@
return false;
}
+bool PDFPlugin::forceUpdateScrollbarsOnMainThreadForPerformanceTesting() const
+{
+ if (Frame* coreFrame = m_frame->coreFrame()) {
+ if (Page* page = coreFrame->page())
+ return page->settings().forceUpdateScrollbarsOnMainThreadForPerformanceTesting();
+ }
+
+ return false;
+}
+
int PDFPlugin::scrollPosition(Scrollbar* scrollbar) const
{
if (scrollbar->orientation() == HorizontalScrollbar)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (170971 => 170972)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-07-10 19:31:54 UTC (rev 170971)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-07-10 20:04:42 UTC (rev 170972)
@@ -2637,6 +2637,7 @@
#if ENABLE(SMOOTH_SCROLLING)
settings.setScrollAnimatorEnabled(store.getBoolValueForKey(WebPreferencesKey::scrollAnimatorEnabledKey()));
#endif
+ settings.setForceUpdateScrollbarsOnMainThreadForPerformanceTesting(store.getBoolValueForKey(WebPreferencesKey::forceUpdateScrollbarsOnMainThreadForPerformanceTestingKey()));
settings.setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
settings.setSpatialNavigationEnabled(store.getBoolValueForKey(WebPreferencesKey::spatialNavigationEnabledKey()));