diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 744224453274..e1c5f82ad7ff 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -3987,7 +3987,7 @@ nsCSSFrameConstructor::BuildBlockScrollFrame (nsIPresContext* aPresC { // Create an area container for the frame nsIFrame* scrolledFrame; - NS_NewAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP); + NS_NewAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP | NS_BLOCK_MARGIN_ROOT); nsresult rv = BuildScrollFrame(aPresContext, aState, aContent, scrolledFrame, aParentFrame, diff --git a/layout/html/style/src/nsCSSFrameConstructor.cpp b/layout/html/style/src/nsCSSFrameConstructor.cpp index 744224453274..e1c5f82ad7ff 100644 --- a/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -3987,7 +3987,7 @@ nsCSSFrameConstructor::BuildBlockScrollFrame (nsIPresContext* aPresC { // Create an area container for the frame nsIFrame* scrolledFrame; - NS_NewAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP); + NS_NewAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP | NS_BLOCK_MARGIN_ROOT); nsresult rv = BuildScrollFrame(aPresContext, aState, aContent, scrolledFrame, aParentFrame,