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 nsMathMLmoFrame_h___
|
|
|
|
#define nsMathMLmoFrame_h___
|
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2002-08-17 01:36:31 +04:00
|
|
|
#include "nsMathMLTokenFrame.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
|
|
|
//
|
|
|
|
// <mo> -- operator, fence, or separator
|
|
|
|
//
|
|
|
|
|
2018-09-06 04:23:14 +03:00
|
|
|
class nsMathMLmoFrame final : public nsMathMLTokenFrame {
|
1999-09-21 06:12:01 +04:00
|
|
|
public:
|
2017-05-26 13:11:11 +03:00
|
|
|
NS_DECL_FRAMEARENA_HELPERS(nsMathMLmoFrame)
|
2009-09-12 20:49:24 +04:00
|
|
|
|
2019-04-16 10:24:49 +03:00
|
|
|
friend nsIFrame* NS_NewMathMLmoFrame(mozilla::PresShell* aPresShell,
|
2018-03-22 21:20:41 +03:00
|
|
|
ComputedStyle* aStyle);
|
2000-03-28 13:38:24 +04:00
|
|
|
|
2020-07-22 01:35:46 +03:00
|
|
|
eMathMLFrameType GetMathMLFrameType() override;
|
2002-08-13 03:30:35 +04:00
|
|
|
|
2020-07-22 01:35:46 +03:00
|
|
|
void DidSetComputedStyle(ComputedStyle* aOldStyle) override;
|
2000-03-28 13:38:24 +04:00
|
|
|
|
2020-07-22 01:35:46 +03:00
|
|
|
void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|
|
|
const nsDisplayListSet& aLists) override;
|
1999-09-21 06:12:01 +04:00
|
|
|
|
2002-04-02 08:15:22 +04:00
|
|
|
NS_IMETHOD
|
2015-03-21 19:28:04 +03:00
|
|
|
InheritAutomaticData(nsIFrame* aParent) override;
|
2002-04-02 08:15:22 +04:00
|
|
|
|
2002-02-07 07:38:08 +03:00
|
|
|
NS_IMETHOD
|
2015-03-21 19:28:04 +03:00
|
|
|
TransmitAutomaticData() override;
|
2002-02-07 07:38:08 +03:00
|
|
|
|
2013-12-02 20:50:10 +04:00
|
|
|
virtual void SetInitialChildList(ChildListID aListID,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsFrameList& aChildList) override;
|
2013-12-02 20:50:10 +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;
|
2014-12-05 04:31:00 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void MarkIntrinsicISizesDirty() override;
|
2002-02-02 08:43:03 +03:00
|
|
|
|
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-02-27 13:47:43 +03:00
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t aModType) override;
|
2002-02-08 03:57:39 +03:00
|
|
|
|
1999-09-21 06:12:01 +04:00
|
|
|
// This method is called by the parent frame to ask <mo>
|
|
|
|
// to stretch itself.
|
|
|
|
NS_IMETHOD
|
1999-11-17 03:49:37 +03:00
|
|
|
Stretch(DrawTarget* aDrawTarget, nsStretchDirection aStretchDirection,
|
2000-03-28 13:38:24 +04:00
|
|
|
nsBoundingMetrics& aContainerSize,
|
2016-07-21 13:36:38 +03:00
|
|
|
ReflowOutput& aDesiredStretchSize) override;
|
1999-09-21 06:12:01 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsresult ChildListChanged(int32_t aModType) override {
|
2013-12-02 20:50:10 +04:00
|
|
|
ProcessTextData();
|
|
|
|
return nsMathMLContainerFrame::ChildListChanged(aModType);
|
|
|
|
}
|
|
|
|
|
1999-09-21 06:12:01 +04:00
|
|
|
protected:
|
2019-02-05 19:45:54 +03:00
|
|
|
explicit nsMathMLmoFrame(ComputedStyle* aStyle, nsPresContext* aPresContext)
|
|
|
|
: nsMathMLTokenFrame(aStyle, aPresContext, kClassID),
|
2018-03-22 21:20:41 +03:00
|
|
|
mFlags(0),
|
|
|
|
mMinSize(0),
|
|
|
|
mMaxSize(0) {}
|
1999-09-21 06:12:01 +04:00
|
|
|
virtual ~nsMathMLmoFrame();
|
2017-07-06 15:00:35 +03:00
|
|
|
|
2000-03-28 13:38:24 +04:00
|
|
|
nsMathMLChar
|
|
|
|
mMathMLChar; // Here is the MathMLChar that will deal with the operator.
|
|
|
|
nsOperatorFlags mFlags;
|
|
|
|
float mMinSize;
|
|
|
|
float mMaxSize;
|
2002-02-07 07:38:08 +03:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool UseMathMLChar();
|
2008-03-14 07:05:43 +03:00
|
|
|
|
2002-08-17 01:36:31 +04:00
|
|
|
// overload the base method so that we can setup our nsMathMLChar
|
2013-12-02 20:50:10 +04:00
|
|
|
void ProcessTextData();
|
2002-02-07 07:38:08 +03:00
|
|
|
|
|
|
|
// helper to get our 'form' and lookup in the Operator Dictionary to fetch
|
|
|
|
// our default data that may come from there, and to complete the setup
|
|
|
|
// using attributes that we may have
|
2005-02-07 04:57:50 +03:00
|
|
|
void ProcessOperatorData();
|
2002-04-02 08:15:22 +04:00
|
|
|
|
|
|
|
// helper to double check thar our char should be rendered as a selected char
|
2005-02-07 04:57:50 +03:00
|
|
|
bool IsFrameInSelection(nsIFrame* aFrame);
|
1999-09-21 06:12:01 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsMathMLmoFrame_h___ */
|