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/. */
|
1999-09-21 02:12:01 +00:00
|
|
|
|
|
|
|
#ifndef nsMathMLmrootFrame_h___
|
|
|
|
#define nsMathMLmrootFrame_h___
|
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
1999-09-21 02:12:01 +00:00
|
|
|
#include "nsMathMLContainerFrame.h"
|
2013-08-30 21:37:12 +00:00
|
|
|
#include "nsMathMLChar.h"
|
1999-09-21 02:12:01 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// <msqrt> and <mroot> -- form a radical
|
|
|
|
//
|
|
|
|
|
|
|
|
class nsMathMLmrootFrame : public nsMathMLContainerFrame {
|
|
|
|
public:
|
2017-05-26 10:11:11 +00:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsMathMLmrootFrame)
|
2009-09-12 16:49:24 +00:00
|
|
|
|
2018-03-22 18:20:41 +00:00
|
|
|
friend nsIFrame* NS_NewMathMLmrootFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle);
|
2000-03-28 09:38:24 +00:00
|
|
|
|
2003-02-22 00:32:13 +00:00
|
|
|
virtual void
|
2018-03-22 18:20:41 +00:00
|
|
|
SetAdditionalComputedStyle(int32_t aIndex,
|
|
|
|
ComputedStyle* aComputedStyle) override;
|
|
|
|
virtual ComputedStyle*
|
|
|
|
GetAdditionalComputedStyle(int32_t aIndex) const override;
|
2000-03-28 09:38:24 +00:00
|
|
|
|
2013-03-20 01:47:48 +00:00
|
|
|
virtual void
|
2014-05-24 22:20:40 +00:00
|
|
|
Init(nsIContent* aContent,
|
|
|
|
nsContainerFrame* aParent,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsIFrame* aPrevInFlow) override;
|
1999-09-21 02:12:01 +00:00
|
|
|
|
|
|
|
NS_IMETHOD
|
2015-03-21 16:28:04 +00:00
|
|
|
TransmitAutomaticData() override;
|
1999-09-21 02:12:01 +00:00
|
|
|
|
2014-05-13 00:47:52 +00:00
|
|
|
virtual void
|
2004-07-31 23:15:21 +00:00
|
|
|
Reflow(nsPresContext* aPresContext,
|
2016-07-21 10:36:38 +00:00
|
|
|
ReflowOutput& aDesiredSize,
|
2016-07-21 10:36:39 +00:00
|
|
|
const ReflowInput& aReflowInput,
|
2015-03-21 16:28:04 +00:00
|
|
|
nsReflowStatus& aStatus) override;
|
1999-11-22 12:35:36 +00:00
|
|
|
|
2014-06-17 06:40:00 +00:00
|
|
|
void
|
|
|
|
GetRadicalXOffsets(nscoord aIndexWidth, nscoord aSqrWidth,
|
|
|
|
nsFontMetrics* aFontMetrics,
|
|
|
|
nscoord* aIndexOffset,
|
|
|
|
nscoord* aSqrOffset);
|
|
|
|
|
2013-11-25 14:20:20 +00:00
|
|
|
virtual void
|
2017-06-09 19:14:53 +00:00
|
|
|
GetIntrinsicISizeMetrics(gfxContext* aRenderingContext,
|
2016-07-21 10:36:38 +00:00
|
|
|
ReflowOutput& aDesiredSize) override;
|
2008-03-14 05:02:49 +00:00
|
|
|
|
2013-02-14 11:12:27 +00:00
|
|
|
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
2015-03-21 16:28:04 +00:00
|
|
|
const nsDisplayListSet& aLists) override;
|
1999-11-22 12:35:36 +00:00
|
|
|
|
2014-01-15 14:49:00 +00:00
|
|
|
uint8_t
|
2015-03-21 16:28:04 +00:00
|
|
|
ScriptIncrement(nsIFrame* aFrame) override
|
2014-01-15 14:49:00 +00:00
|
|
|
{
|
|
|
|
return (aFrame && aFrame == mFrames.LastChild()) ? 2 : 0;
|
|
|
|
}
|
|
|
|
|
1999-09-21 02:12:01 +00:00
|
|
|
protected:
|
2018-03-22 18:20:41 +00:00
|
|
|
explicit nsMathMLmrootFrame(ComputedStyle* aStyle);
|
1999-09-21 02:12:01 +00:00
|
|
|
virtual ~nsMathMLmrootFrame();
|
2017-07-06 12:00:35 +00:00
|
|
|
|
2000-03-28 09:38:24 +00:00
|
|
|
nsMathMLChar mSqrChar;
|
|
|
|
nsRect mBarRect;
|
1999-09-21 02:12:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmrootFrame_h___ */
|