2017-10-27 17:33:53 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* 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/. */
|
2000-01-27 12:31:12 +00:00
|
|
|
|
|
|
|
#ifndef nsMathMLmspaceFrame_h___
|
|
|
|
#define nsMathMLmspaceFrame_h___
|
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-01-27 12:31:12 +00:00
|
|
|
#include "nsMathMLContainerFrame.h"
|
|
|
|
|
2019-04-16 07:24:49 +00:00
|
|
|
namespace mozilla {
|
|
|
|
class PresShell;
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2000-01-27 12:31:12 +00:00
|
|
|
//
|
|
|
|
// <mspace> -- space
|
|
|
|
//
|
|
|
|
|
2018-09-06 01:23:14 +00:00
|
|
|
class nsMathMLmspaceFrame final : public nsMathMLContainerFrame {
|
2000-01-27 12:31:12 +00:00
|
|
|
public:
|
2017-05-26 10:11:11 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsMathMLmspaceFrame)
|
2009-09-12 16:49:24 +00:00
|
|
|
|
2019-04-16 07:24:49 +00:00
|
|
|
friend nsIFrame* NS_NewMathMLmspaceFrame(mozilla::PresShell* aPresShell,
|
2018-03-22 18:20:41 +00:00
|
|
|
ComputedStyle* aStyle);
|
2000-01-27 12:31:12 +00:00
|
|
|
|
2011-03-25 03:38:59 +00:00
|
|
|
NS_IMETHOD
|
2015-03-21 16:28:04 +00:00
|
|
|
TransmitAutomaticData() override {
|
2011-03-25 03:38:59 +00:00
|
|
|
// The REC defines the following elements to be space-like:
|
|
|
|
// * an mtext, mspace, maligngroup, or malignmark element;
|
|
|
|
mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2004-07-31 23:15:21 +00:00
|
|
|
virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
|
2016-07-21 10:36:39 +00:00
|
|
|
const ReflowInput& aReflowInput,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsReflowStatus& aStatus) override;
|
2017-07-06 12:00:35 +00:00
|
|
|
|
2000-01-27 12:31:12 +00:00
|
|
|
protected:
|
2019-02-05 16:45:54 +00:00
|
|
|
explicit nsMathMLmspaceFrame(ComputedStyle* aStyle,
|
|
|
|
nsPresContext* aPresContext)
|
|
|
|
: nsMathMLContainerFrame(aStyle, aPresContext, kClassID),
|
2018-03-22 18:20:41 +00:00
|
|
|
mWidth(0),
|
|
|
|
mHeight(0),
|
|
|
|
mDepth(0) {}
|
2000-01-27 12:31:12 +00:00
|
|
|
virtual ~nsMathMLmspaceFrame();
|
|
|
|
|
2015-12-15 21:56:41 +00:00
|
|
|
virtual nsresult MeasureForWidth(DrawTarget* aDrawTarget,
|
2016-07-21 10:36:38 +00:00
|
|
|
ReflowOutput& aDesiredSize) override;
|
2012-11-29 22:52:02 +00:00
|
|
|
|
2000-01-27 12:31:12 +00:00
|
|
|
private:
|
|
|
|
nscoord mWidth;
|
|
|
|
nscoord mHeight;
|
|
|
|
nscoord mDepth;
|
2002-02-07 04:38:08 +00:00
|
|
|
|
|
|
|
// helper method to initialize our member data
|
2004-07-31 23:15:21 +00:00
|
|
|
void ProcessAttributes(nsPresContext* aPresContext);
|
2000-01-27 12:31:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmspaceFrame_h___ */
|