From 51a77b21ba7209e3cf15cdc75e94bc9b2fd40aa3 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Fri, 15 Jun 2012 17:49:53 -0400 Subject: [PATCH] Bug 763570 - Part 2 - Add a scrollframe from frameset documents on Fennec, so that they work with async pan/zoom and touch events. r=bz --- layout/base/nsCSSFrameConstructor.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index f62ca24866d..ec6504a280f 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -2545,7 +2545,8 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement) /* how the root frame hierarchy should look - Galley presentation, non-XUL, with scrolling (i.e. not a frameset): + Galley presentation, non-XUL, with scrolling (i.e. not a frameset, + or framesets with async pan/zoom like on Fennec): ViewportFrame [fixed-cb] nsHTMLScrollFrame @@ -2553,7 +2554,8 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement) root element frame (nsBlockFrame, nsSVGOuterSVGFrame, nsTableOuterFrame, nsPlaceholderFrame) - Galley presentation, non-XUL, without scrolling (i.e. a frameset): + Galley presentation, non-XUL, without scrolling (i.e. a frameset, + except when async pan/zoom is enabled): ViewportFrame [fixed-cb] nsCanvasFrame [abs-cb] @@ -2670,12 +2672,15 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement) // Never create scrollbars for XUL documents bool isScrollable = !isXUL; - // Never create scrollbars for frameset documents. +#ifndef MOZ_WIDGET_ANDROID + // Never create scrollbars for frameset documents, except on android + // where we have async pan/zoom and need a scrollable root frame. if (isHTML) { nsCOMPtr htmlDoc = do_QueryInterface(mDocument); if (htmlDoc && htmlDoc->GetIsFrameset()) isScrollable = false; } +#endif if (isPaginated) { isScrollable = presContext->HasPaginatedScrolling();