Diff
Modified: trunk/ChangeLog (137387 => 137388)
--- trunk/ChangeLog 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/ChangeLog 2012-12-12 00:56:44 UTC (rev 137388)
@@ -1,3 +1,14 @@
+2012-12-11 Xianzhu Wang <[email protected]>
+
+ Add window.internals.mainThreadScrollReasonsAsText for testing slow scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=104714
+
+ Reviewed by Eric Seidel.
+
+ Export symbol Page::mainThreadScrollingReasonsAsText().
+
+ * Source/autotools/symbols.filter:
+
2012-12-11 Michael Pruett <[email protected]>
[JSC] Add tests for explicit serialization values
Modified: trunk/LayoutTests/ChangeLog (137387 => 137388)
--- trunk/LayoutTests/ChangeLog 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/LayoutTests/ChangeLog 2012-12-12 00:56:44 UTC (rev 137388)
@@ -1,3 +1,12 @@
+2012-12-11 Xianzhu Wang <[email protected]>
+
+ Add window.internals.mainThreadScrollReasonsAsText for testing slow scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=104714
+
+ Reviewed by Eric Seidel.
+
+ * platform/mac/tiled-drawing/scrolling-tree-slow-scrolling-expected.txt: Updated according to the change of mainThreadScrollingReasons about the trailing comma.
+
2012-12-11 Beth Dakin <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=104735
Modified: trunk/LayoutTests/platform/mac/tiled-drawing/scrolling-tree-slow-scrolling-expected.txt (137387 => 137388)
--- trunk/LayoutTests/platform/mac/tiled-drawing/scrolling-tree-slow-scrolling-expected.txt 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/LayoutTests/platform/mac/tiled-drawing/scrolling-tree-slow-scrolling-expected.txt 2012-12-12 00:56:44 UTC (rev 137388)
@@ -1,6 +1,6 @@
(Scrolling node
(viewport rect 0 0 800 600)
(contents size 800 600)
- (Scrolling on main thread because: Has slow repaint objects, )
+ (Scrolling on main thread because: Has slow repaint objects)
)
Modified: trunk/Source/WebCore/ChangeLog (137387 => 137388)
--- trunk/Source/WebCore/ChangeLog 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/ChangeLog 2012-12-12 00:56:44 UTC (rev 137388)
@@ -1,3 +1,31 @@
+2012-12-11 Xianzhu Wang <[email protected]>
+
+ Add window.internals.mainThreadScrollReasonsAsText for testing slow scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=104714
+
+ Reviewed by Eric Seidel.
+
+ No new tests. Adds test api for bug 102543 and other bugs.
+
+ * WebCore.exp.in:
+ * page/Page.cpp:
+ (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText): Extracted from ScrollingStateScrollingNode::dumpProperties for layout tests.
+ (WebCore):
+ * page/Page.h:
+ (Page):
+ * page/scrolling/ScrollingCoordinator.cpp:
+ (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText):
+ (WebCore):
+ * page/scrolling/ScrollingCoordinator.h:
+ (ScrollingCoordinator):
+ * page/scrolling/ScrollingStateScrollingNode.cpp:
+ (WebCore::ScrollingStateScrollingNode::dumpProperties): Moved code for mainThreadScrollingReasons to ScrollingCoordinator.cpp.
+ * testing/Internals.cpp:
+ (WebCore::Internals::mainThreadScrollingReasons):
+ (WebCore):
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2012-12-11 Simon Fraser <[email protected]>
Enhance the TileCache to cache more tiles
Modified: trunk/Source/WebCore/WebCore.exp.in (137387 => 137388)
--- trunk/Source/WebCore/WebCore.exp.in 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/WebCore.exp.in 2012-12-12 00:56:44 UTC (rev 137388)
@@ -763,6 +763,7 @@
__ZN7WebCore4Page25suspendScriptedAnimationsEv
__ZN7WebCore4Page31setCustomHTMLTokenizerChunkSizeEi
__ZN7WebCore4Page31setCustomHTMLTokenizerTimeDelayEd
+__ZN7WebCore4Page32mainThreadScrollingReasonsAsTextEv
__ZN7WebCore4Page32setMemoryCacheClientCallsEnabledEb
__ZN7WebCore4Page35resumeActiveDOMObjectsAndAnimationsEv
__ZN7WebCore4Page36setShouldSuppressScrollbarAnimationsEb
Modified: trunk/Source/WebCore/page/Page.cpp (137387 => 137388)
--- trunk/Source/WebCore/page/Page.cpp 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/page/Page.cpp 2012-12-12 00:56:44 UTC (rev 137388)
@@ -258,6 +258,17 @@
return String();
}
+String Page::mainThreadScrollingReasonsAsText()
+{
+ if (Document* document = m_mainFrame->document())
+ document->updateLayout();
+
+ if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ return scrollingCoordinator->mainThreadScrollingReasonsAsText();
+
+ return String();
+}
+
struct ViewModeInfo {
const char* name;
Page::ViewMode type;
Modified: trunk/Source/WebCore/page/Page.h (137387 => 137388)
--- trunk/Source/WebCore/page/Page.h 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/page/Page.h 2012-12-12 00:56:44 UTC (rev 137388)
@@ -199,6 +199,7 @@
ScrollingCoordinator* scrollingCoordinator();
String scrollingStateTreeAsText();
+ String mainThreadScrollingReasonsAsText();
Settings* settings() const { return m_settings.get(); }
ProgressTracker* progress() const { return m_progress.get(); }
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (137387 => 137388)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2012-12-12 00:56:44 UTC (rev 137388)
@@ -393,4 +393,29 @@
return String();
}
+String ScrollingCoordinator::mainThreadScrollingReasonsAsText(MainThreadScrollingReasons reasons)
+{
+ StringBuilder stringBuilder;
+
+ if (reasons & ScrollingCoordinator::ForcedOnMainThread)
+ stringBuilder.append("Forced on main thread, ");
+ if (reasons & ScrollingCoordinator::HasSlowRepaintObjects)
+ stringBuilder.append("Has slow repaint objects, ");
+ if (reasons & ScrollingCoordinator::HasViewportConstrainedObjectsWithoutSupportingFixedLayers)
+ stringBuilder.append("Has viewport constrained objects without supporting fixed layers, ");
+ if (reasons & ScrollingCoordinator::HasNonLayerFixedObjects)
+ stringBuilder.append("Has non-layer fixed objects, ");
+ if (reasons & ScrollingCoordinator::IsImageDocument)
+ stringBuilder.append("Is image document, ");
+
+ if (stringBuilder.length())
+ stringBuilder.resize(stringBuilder.length() - 2);
+ return stringBuilder.toString();
+}
+
+String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const
+{
+ return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons());
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h (137387 => 137388)
--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2012-12-12 00:56:44 UTC (rev 137388)
@@ -150,6 +150,9 @@
virtual void setLayerIsContainerForFixedPositionLayers(GraphicsLayer*, bool) { }
virtual void setLayerIsFixedToContainerLayer(GraphicsLayer*, bool) { }
+ static String mainThreadScrollingReasonsAsText(MainThreadScrollingReasons);
+ String mainThreadScrollingReasonsAsText() const;
+
protected:
explicit ScrollingCoordinator(Page*);
Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp (137387 => 137388)
--- trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp 2012-12-12 00:56:44 UTC (rev 137388)
@@ -227,18 +227,7 @@
if (m_shouldUpdateScrollLayerPositionOnMainThread) {
writeIndent(ts, indent + 1);
- ts << "(Scrolling on main thread because: ";
- if (m_shouldUpdateScrollLayerPositionOnMainThread & ScrollingCoordinator::ForcedOnMainThread)
- ts << "Forced on main thread, ";
- if (m_shouldUpdateScrollLayerPositionOnMainThread & ScrollingCoordinator::HasSlowRepaintObjects)
- ts << "Has slow repaint objects, ";
- if (m_shouldUpdateScrollLayerPositionOnMainThread & ScrollingCoordinator::HasViewportConstrainedObjectsWithoutSupportingFixedLayers)
- ts << "Has viewport constrained objects without supporting fixed layers, ";
- if (m_shouldUpdateScrollLayerPositionOnMainThread & ScrollingCoordinator::HasNonLayerFixedObjects)
- ts << "Has non-layer fixed objects, ";
- if (m_shouldUpdateScrollLayerPositionOnMainThread & ScrollingCoordinator::IsImageDocument)
- ts << "Is image document";
- ts << ")\n";
+ ts << "(Scrolling on main thread because: " << ScrollingCoordinator::mainThreadScrollingReasonsAsText(m_shouldUpdateScrollLayerPositionOnMainThread) << ")\n";
}
if (m_requestedScrollPosition != IntPoint()) {
Modified: trunk/Source/WebCore/testing/Internals.cpp (137387 => 137388)
--- trunk/Source/WebCore/testing/Internals.cpp 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/testing/Internals.cpp 2012-12-12 00:56:44 UTC (rev 137388)
@@ -1460,6 +1460,20 @@
return page->scrollingStateTreeAsText();
}
+String Internals::mainThreadScrollingReasons(Document* document, ExceptionCode& ec) const
+{
+ if (!document || !document->frame()) {
+ ec = INVALID_ACCESS_ERR;
+ return String();
+ }
+
+ Page* page = document->page();
+ if (!page)
+ return String();
+
+ return page->mainThreadScrollingReasonsAsText();
+}
+
void Internals::garbageCollectDocumentResources(Document* document, ExceptionCode& ec) const
{
if (!document) {
Modified: trunk/Source/WebCore/testing/Internals.h (137387 => 137388)
--- trunk/Source/WebCore/testing/Internals.h 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/testing/Internals.h 2012-12-12 00:56:44 UTC (rev 137388)
@@ -208,6 +208,8 @@
String repaintRectsAsText(Document*, ExceptionCode&) const;
String scrollingStateTreeAsText(Document*, ExceptionCode&) const;
+ String mainThreadScrollingReasons(Document*, ExceptionCode&) const;
+
void garbageCollectDocumentResources(Document*, ExceptionCode&) const;
void allowRoundingHacks() const;
Modified: trunk/Source/WebCore/testing/Internals.idl (137387 => 137388)
--- trunk/Source/WebCore/testing/Internals.idl 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebCore/testing/Internals.idl 2012-12-12 00:56:44 UTC (rev 137388)
@@ -165,6 +165,7 @@
DOMString layerTreeAsText(in Document document, in [Optional] unsigned short flags) raises (DOMException);
DOMString scrollingStateTreeAsText(in Document document) raises (DOMException);
+ DOMString mainThreadScrollingReasons(in Document document) raises (DOMException);
DOMString repaintRectsAsText(in Document document) raises (DOMException);
Modified: trunk/Source/WebKit2/ChangeLog (137387 => 137388)
--- trunk/Source/WebKit2/ChangeLog 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebKit2/ChangeLog 2012-12-12 00:56:44 UTC (rev 137388)
@@ -1,3 +1,14 @@
+2012-12-11 Xianzhu Wang <[email protected]>
+
+ Add window.internals.mainThreadScrollReasonsAsText for testing slow scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=104714
+
+ Reviewed by Eric Seidel.
+
+ Export symbol Page::mainThreadScrollingReasonsAsText().
+
+ * win/WebKit2.def.in:
+
2012-12-11 Gwang Yoon Hwang <[email protected]>
Coordinated Graphics: Rename LayerTreeCoordinator to CoordinatedLayerTreeHost
Modified: trunk/Source/WebKit2/win/WebKit2.def.in (137387 => 137388)
--- trunk/Source/WebKit2/win/WebKit2.def.in 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/WebKit2/win/WebKit2.def.in 2012-12-12 00:56:44 UTC (rev 137388)
@@ -228,6 +228,7 @@
?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
?jsArray@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@V?$PassRefPtr@VDOMStringList@WebCore@@@WTF@@@Z
?lastChangeWasUserEdit@HTMLTextFormControlElement@WebCore@@QBE_NXZ
+ ?mainThreadScrollingReasonsAsText@Page@WebCore@@QAE?AVString@WTF@@XZ
?markersFor@DocumentMarkerController@WebCore@@QAE?AV?$Vector@PAVDocumentMarker@WebCore@@$0A@@WTF@@PAVNode@2@VMarkerTypes@DocumentMarker@2@@Z
?nextSibling@ComposedShadowTreeWalker@WebCore@@QAEXXZ
?firstChild@ComposedShadowTreeWalker@WebCore@@QAEXXZ
Modified: trunk/Source/autotools/symbols.filter (137387 => 137388)
--- trunk/Source/autotools/symbols.filter 2012-12-12 00:47:24 UTC (rev 137387)
+++ trunk/Source/autotools/symbols.filter 2012-12-12 00:56:44 UTC (rev 137388)
@@ -31,6 +31,7 @@
_ZN7WebCore4Page18setPageScaleFactorEfRKNS_8IntPointE;
_ZN7WebCore4Page20setDeviceScaleFactorEf;
_ZN7WebCore4Page24scrollingStateTreeAsTextEv;
+_ZN7WebCore4Page32mainThreadScrollingReasonsAsTextEv;
_ZN7WebCore4Page16setCanStartMediaEb;
_ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ClientRectE;
_ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ShadowRootE;