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