From 025f4148421032c53902816fe637e97e3e394262 Mon Sep 17 00:00:00 2001 From: "dbaron%fas.harvard.edu" Date: Sun, 6 Jan 2002 18:25:38 +0000 Subject: [PATCH] Get the visibility style struct to ensure that we check the 'direction' property and thus enable BIDI if necessary before beginning reflow. b=115921 r=smontagu sr=hyatt git-svn-id: svn://10.0.0.236/trunk@111450 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 9 +++++++++ mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 7601bc56ccb..ba88d70f361 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -6997,6 +6997,15 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe aContent, aParentFrame, styleContext, aFrameItems); + // Style resolution can normally happen lazily. However, getting the + // Visibility struct can cause |SetBidiEnabled| to be called on the + // pres context, and this needs to happen before we start reflow, so + // do it now, when constructing frames. See bug 115291. + { + const nsStyleVisibility *vis; + GetStyleData(styleContext, &vis); + } + nsIFrame* lastChild = aFrameItems.lastChild; // Handle specific frame types diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 7601bc56ccb..ba88d70f361 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -6997,6 +6997,15 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe aContent, aParentFrame, styleContext, aFrameItems); + // Style resolution can normally happen lazily. However, getting the + // Visibility struct can cause |SetBidiEnabled| to be called on the + // pres context, and this needs to happen before we start reflow, so + // do it now, when constructing frames. See bug 115291. + { + const nsStyleVisibility *vis; + GetStyleData(styleContext, &vis); + } + nsIFrame* lastChild = aFrameItems.lastChild; // Handle specific frame types