2017-10-27 20:33:53 +03: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 15:12:37 +04: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/. */
|
1999-09-21 06:12:01 +04:00
|
|
|
|
2002-08-17 01:36:31 +04:00
|
|
|
#ifndef nsMathMLTokenFrame_h___
|
|
|
|
#define nsMathMLTokenFrame_h___
|
1999-09-21 06:12:01 +04:00
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
1999-09-21 06:12:01 +04:00
|
|
|
#include "nsMathMLContainerFrame.h"
|
|
|
|
|
2019-04-16 10:24:49 +03:00
|
|
|
namespace mozilla {
|
|
|
|
class PresShell;
|
|
|
|
} // namespace mozilla
|
|
|
|
|
1999-09-21 06:12:01 +04:00
|
|
|
//
|
2002-08-17 01:36:31 +04:00
|
|
|
// Base class to handle token elements
|
1999-09-21 06:12:01 +04:00
|
|
|
//
|
|
|
|
|
2002-08-17 01:36:31 +04:00
|
|
|
class nsMathMLTokenFrame : public nsMathMLContainerFrame {
|
1999-09-21 06:12:01 +04:00
|
|
|
public:
|
2017-05-26 13:11:11 +03:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsMathMLTokenFrame)
|
2009-09-12 20:49:24 +04:00
|
|
|
|
2019-04-16 10:24:49 +03:00
|
|
|
friend nsIFrame* NS_NewMathMLTokenFrame(mozilla::PresShell* aPresShell,
|
2018-03-22 21:20:41 +03:00
|
|
|
ComputedStyle* aStyle);
|
1999-09-21 06:12:01 +04:00
|
|
|
|
2011-03-25 06:38:59 +03:00
|
|
|
NS_IMETHOD
|
2015-03-21 19:28:04 +03:00
|
|
|
TransmitAutomaticData() override {
|
2011-03-25 06:38:59 +03:00
|
|
|
// The REC defines the following elements to be space-like:
|
|
|
|
// * an mtext, mspace, maligngroup, or malignmark element;
|
2015-03-03 14:09:00 +03:00
|
|
|
if (mContent->IsMathMLElement(nsGkAtoms::mtext_)) {
|
2011-03-25 06:38:59 +03:00
|
|
|
mPresentationData.flags |= NS_MATHML_SPACE_LIKE;
|
|
|
|
}
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2011-05-13 01:37:03 +04:00
|
|
|
NS_IMETHOD
|
2015-03-21 19:28:04 +03:00
|
|
|
InheritAutomaticData(nsIFrame* aParent) override;
|
2011-05-13 01:37:03 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual eMathMLFrameType GetMathMLFrameType() override;
|
2002-08-17 01:36:31 +04:00
|
|
|
|
2011-08-25 00:54:30 +04:00
|
|
|
virtual void SetInitialChildList(ChildListID aListID,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsFrameList& aChildList) override;
|
2000-01-07 17:49:46 +03:00
|
|
|
|
2012-08-31 05:32:02 +04:00
|
|
|
virtual void AppendFrames(ChildListID aListID,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsFrameList& aChildList) override;
|
2012-08-31 05:32:02 +04:00
|
|
|
|
|
|
|
virtual void InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame,
|
2019-07-18 02:34:45 +03:00
|
|
|
const nsLineList::iterator* aPrevFrameLine,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsFrameList& aChildList) override;
|
2012-08-31 05:32:02 +04:00
|
|
|
|
2004-08-01 03:15:21 +04:00
|
|
|
virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
|
2016-07-21 13:36:39 +03:00
|
|
|
const ReflowInput& aReflowInput,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsReflowStatus& aStatus) override;
|
2000-01-07 17:49:46 +03:00
|
|
|
|
2015-12-16 00:56:41 +03:00
|
|
|
virtual nsresult Place(DrawTarget* aDrawTarget, bool aPlaceOrigin,
|
2016-07-21 13:36:38 +03:00
|
|
|
ReflowOutput& aDesiredSize) override;
|
2000-01-07 17:49:46 +03:00
|
|
|
|
1999-09-21 06:12:01 +04:00
|
|
|
protected:
|
2019-02-05 19:45:54 +03:00
|
|
|
explicit nsMathMLTokenFrame(ComputedStyle* aStyle,
|
|
|
|
nsPresContext* aPresContext,
|
|
|
|
ClassID aID = kClassID)
|
|
|
|
: nsMathMLContainerFrame(aStyle, aPresContext, aID) {}
|
2002-08-17 01:36:31 +04:00
|
|
|
virtual ~nsMathMLTokenFrame();
|
2002-02-07 07:38:08 +03:00
|
|
|
|
2013-09-30 19:55:51 +04:00
|
|
|
void MarkTextFramesAsTokenMathML();
|
1999-09-21 06:12:01 +04:00
|
|
|
};
|
|
|
|
|
2002-08-17 01:36:31 +04:00
|
|
|
#endif /* nsMathMLTokentFrame_h___ */
|