summaryrefslogtreecommitdiffstats
path: root/layout/generic/ReflowOutput.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/generic/ReflowOutput.cpp
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/generic/ReflowOutput.cpp')
-rw-r--r--layout/generic/ReflowOutput.cpp67
1 files changed, 67 insertions, 0 deletions
diff --git a/layout/generic/ReflowOutput.cpp b/layout/generic/ReflowOutput.cpp
new file mode 100644
index 000000000..e64e41dc5
--- /dev/null
+++ b/layout/generic/ReflowOutput.cpp
@@ -0,0 +1,67 @@
+/* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/* struct containing the output from nsIFrame::Reflow */
+
+#include "mozilla/ReflowOutput.h"
+#include "mozilla/ReflowInput.h"
+
+void
+nsOverflowAreas::UnionWith(const nsOverflowAreas& aOther)
+{
+ // FIXME: We should probably change scrollable overflow to use
+ // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
+ NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
+ mRects[otype].UnionRect(mRects[otype], aOther.mRects[otype]);
+ }
+}
+
+void
+nsOverflowAreas::UnionAllWith(const nsRect& aRect)
+{
+ // FIXME: We should probably change scrollable overflow to use
+ // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
+ NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
+ mRects[otype].UnionRect(mRects[otype], aRect);
+ }
+}
+
+void
+nsOverflowAreas::SetAllTo(const nsRect& aRect)
+{
+ NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
+ mRects[otype] = aRect;
+ }
+}
+
+ReflowOutput::ReflowOutput(const ReflowInput& aState,
+ uint32_t aFlags)
+ : mISize(0)
+ , mBSize(0)
+ , mBlockStartAscent(ASK_FOR_BASELINE)
+ , mFlags(aFlags)
+ , mWritingMode(aState.GetWritingMode())
+{
+}
+
+void
+ReflowOutput::SetOverflowAreasToDesiredBounds()
+{
+ NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
+ mOverflowAreas.Overflow(otype).SetRect(0, 0, Width(), Height());
+ }
+}
+
+void
+ReflowOutput::UnionOverflowAreasWithDesiredBounds()
+{
+ // FIXME: We should probably change scrollable overflow to use
+ // UnionRectIncludeEmpty (but leave visual overflow using UnionRect).
+ nsRect rect(0, 0, Width(), Height());
+ NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
+ nsRect& o = mOverflowAreas.Overflow(otype);
+ o.UnionRect(o, rect);
+ }
+}