Index: Source/core/css/resolver/StyleResolver.cpp |
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp |
index 791c2bdd1cad423b28347ad35ffb020f816ae303..0bda8461f864fdcb1c81ffa32623c6873f0abf15 100644 |
--- a/Source/core/css/resolver/StyleResolver.cpp |
+++ b/Source/core/css/resolver/StyleResolver.cpp |
@@ -522,12 +522,16 @@ PassRefPtr<RenderStyle> StyleResolver::styleForDocument(Document& document) |
const LocalFrame* frame = document.frame(); |
RefPtr<RenderStyle> documentStyle = RenderStyle::create(); |
- documentStyle->setDisplay(BLOCK); |
documentStyle->setRTLOrdering(document.visuallyOrdered() ? VisualOrder : LogicalOrder); |
documentStyle->setZoom(frame && !document.printing() ? frame->pageZoomFactor() : 1); |
documentStyle->setLocale(document.contentLanguage()); |
documentStyle->setZIndex(0); |
documentStyle->setUserModify(document.inDesignMode() ? READ_WRITE : READ_ONLY); |
+ // These are designed to match the user-agent stylesheet values for the document element |
+ // so that the common case doesn't need to create a new RenderStyle in |
+ // Document::inheritHtmlAndBodyElementStyles. |
+ documentStyle->setDisplay(BLOCK); |
+ documentStyle->setScrollBlocksOn(WebScrollBlocksOnStartTouch | WebScrollBlocksOnWheelEvent); |
document.setupFontBuilder(documentStyle.get()); |