mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 960312 - Rename TEXT_IS_IN_SINGLE_CHAR_MI to NS_FRAME_IS_IN_SINGLE_CHAR_MI to make it clear it's global. r=roc
This commit is contained in:
parent
58cbd88166
commit
7e8cb6aa8a
@ -256,7 +256,7 @@ typedef uint64_t nsFrameState;
|
||||
// split, and this piece is the continuation, or (2) the entire float
|
||||
// didn't fit on the page.
|
||||
// Note that this bit is also shared by text frames for
|
||||
// TEXT_FORCE_TRIM_WHITESPACE. That's OK because we only check the
|
||||
// TEXT_IS_IN_TOKEN_MATHML. That's OK because we only check the
|
||||
// NS_FRAME_IS_PUSHED_FLOAT bit on frames which we already know are
|
||||
// out-of-flow.
|
||||
#define NS_FRAME_IS_PUSHED_FLOAT NS_FRAME_STATE_BIT(32)
|
||||
@ -342,6 +342,11 @@ typedef uint64_t nsFrameState;
|
||||
// base frame) to indicate that the SSTY font feature should be used.
|
||||
#define NS_FRAME_MATHML_SCRIPT_DESCENDANT NS_FRAME_STATE_BIT(58)
|
||||
|
||||
// This state bit is set on token MathML elements if the token represents an
|
||||
// <mi> tag whose inner HTML consists of a single non-whitespace character
|
||||
// to allow special rendering behaviour.
|
||||
#define NS_FRAME_IS_IN_SINGLE_CHAR_MI NS_FRAME_STATE_BIT(59)
|
||||
|
||||
// Box layout bits
|
||||
#define NS_STATE_IS_HORIZONTAL NS_FRAME_STATE_BIT(22)
|
||||
#define NS_STATE_IS_DIRECTION_NORMAL NS_FRAME_STATE_BIT(31)
|
||||
|
@ -249,9 +249,6 @@ NS_DECLARE_FRAME_PROPERTY(TextFrameGlyphObservers, DestroyGlyphObserverList);
|
||||
// nsTextFrame.h has
|
||||
// #define TEXT_IS_IN_TOKEN_MATHML NS_FRAME_STATE_BIT(32)
|
||||
|
||||
// nsTextFrame.h has
|
||||
// #define TEXT_IS_IN_SINGLE_CHAR_MI NS_FRAME_STATE_BIT(59)
|
||||
|
||||
// Set when this text frame is mentioned in the userdata for the
|
||||
// uninflated textrun property
|
||||
#define TEXT_IN_UNINFLATED_TEXTRUN_USER_DATA NS_FRAME_STATE_BIT(60)
|
||||
@ -1327,8 +1324,8 @@ BuildTextRuns(gfxContext* aContext, nsTextFrame* aForFrame,
|
||||
"Wrong line container hint");
|
||||
}
|
||||
|
||||
if (aForFrame && aForFrame->HasAnyStateBits(TEXT_IS_IN_SINGLE_CHAR_MI)) {
|
||||
aLineContainer->AddStateBits(TEXT_IS_IN_SINGLE_CHAR_MI);
|
||||
if (aForFrame && aForFrame->HasAnyStateBits(NS_FRAME_IS_IN_SINGLE_CHAR_MI)) {
|
||||
aLineContainer->AddStateBits(NS_FRAME_IS_IN_SINGLE_CHAR_MI);
|
||||
}
|
||||
if (aForFrame && aForFrame->HasAnyStateBits(NS_FRAME_MATHML_SCRIPT_DESCENDANT)) {
|
||||
aLineContainer->AddStateBits(NS_FRAME_MATHML_SCRIPT_DESCENDANT);
|
||||
@ -1978,7 +1975,7 @@ BuildTextRunsScanner::BuildTextRunForFrames(void* aTextBuffer)
|
||||
}
|
||||
if (NS_MATHML_MATHVARIANT_NONE != fontStyle->mMathVariant) {
|
||||
anyMathMLStyling = true;
|
||||
} else if (mLineContainer->GetStateBits() & TEXT_IS_IN_SINGLE_CHAR_MI) {
|
||||
} else if (mLineContainer->GetStateBits() & NS_FRAME_IS_IN_SINGLE_CHAR_MI) {
|
||||
textFlags |= nsTextFrameUtils::TEXT_IS_SINGLE_CHAR_MI;
|
||||
anyMathMLStyling = true;
|
||||
}
|
||||
|
@ -24,11 +24,6 @@ class PropertyProvider;
|
||||
// This state bit is set on children of token MathML elements
|
||||
#define TEXT_IS_IN_TOKEN_MATHML NS_FRAME_STATE_BIT(32)
|
||||
|
||||
// This state bit is set on token MathML elements if the token represents an
|
||||
// <mi> tag whose inner HTML consists of a single non-whitespace character
|
||||
// to allow special rendering behaviour.
|
||||
#define TEXT_IS_IN_SINGLE_CHAR_MI NS_FRAME_STATE_BIT(59)
|
||||
|
||||
#define TEXT_HAS_FONT_INFLATION NS_FRAME_STATE_BIT(61)
|
||||
|
||||
typedef nsFrame nsTextFrameBase;
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
TEXT_HAS_TRAILING_BREAK = 0x4000000,
|
||||
|
||||
// This is set if the textrun was created for a textframe whose
|
||||
// TEXT_IS_IN_SINGLE_CHAR_MI flag is set. This occurs if the textframe
|
||||
// NS_FRAME_IS_IN_SINGLE_CHAR_MI flag is set. This occurs if the textframe
|
||||
// belongs to a MathML <mi> element whose embedded text consists of a
|
||||
// single character.
|
||||
TEXT_IS_SINGLE_CHAR_MI = 0x8000000
|
||||
|
@ -42,7 +42,7 @@ nsMathMLTokenFrame::GetMathMLFrameType()
|
||||
uint8_t mathVariant = StyleFont()->mMathVariant;
|
||||
if ((mathVariant == NS_MATHML_MATHVARIANT_NONE &&
|
||||
(StyleFont()->mFont.style == NS_STYLE_FONT_STYLE_ITALIC ||
|
||||
HasAnyStateBits(TEXT_IS_IN_SINGLE_CHAR_MI))) ||
|
||||
HasAnyStateBits(NS_FRAME_IS_IN_SINGLE_CHAR_MI))) ||
|
||||
mathVariant == NS_MATHML_MATHVARIANT_ITALIC ||
|
||||
mathVariant == NS_MATHML_MATHVARIANT_BOLD_ITALIC ||
|
||||
mathVariant == NS_MATHML_MATHVARIANT_SANS_SERIF_ITALIC ||
|
||||
@ -83,7 +83,7 @@ nsMathMLTokenFrame::MarkTextFramesAsTokenMathML()
|
||||
(length == 2 && NS_IS_HIGH_SURROGATE(data[0]));
|
||||
|
||||
if (isSingleCharacter) {
|
||||
child->AddStateBits(TEXT_IS_IN_SINGLE_CHAR_MI);
|
||||
child->AddStateBits(NS_FRAME_IS_IN_SINGLE_CHAR_MI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user