mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Make unicode-bidi: [-moz-]plaintext apply to inline elements. Bug 746987, r=roc
This commit is contained in:
parent
a3da0c50ac
commit
2be0ebd6db
@ -164,12 +164,18 @@ struct BidiParagraphData {
|
||||
mPrevFrame = aBpd->mPrevFrame;
|
||||
mParagraphDepth = aBpd->mParagraphDepth + 1;
|
||||
|
||||
const nsStyleTextReset* text = aBDIFrame->GetStyleTextReset();
|
||||
bool isRTL = (NS_STYLE_DIRECTION_RTL ==
|
||||
aBDIFrame->GetStyleVisibility()->mDirection);
|
||||
|
||||
if (text->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_PLAINTEXT) {
|
||||
mParaLevel = NSBIDI_DEFAULT_LTR;
|
||||
} else {
|
||||
mParaLevel = mParagraphDepth * 2;
|
||||
if (isRTL) ++mParaLevel;
|
||||
}
|
||||
|
||||
if (aBDIFrame->GetStyleTextReset()->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_OVERRIDE) {
|
||||
if (text->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_OVERRIDE) {
|
||||
PushBidiControl(isRTL ? kRLO : kLRO);
|
||||
}
|
||||
}
|
||||
@ -1131,7 +1137,8 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
|
||||
nsIFrame* kid = frame->GetFirstPrincipalChild();
|
||||
if (kid) {
|
||||
const nsStyleTextReset* text = frame->GetStyleTextReset();
|
||||
if (text->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_ISOLATE) {
|
||||
if (text->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_ISOLATE ||
|
||||
text->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_PLAINTEXT) {
|
||||
// css "unicode-bidi: isolate" and html5 bdi:
|
||||
// resolve the element as a separate paragraph
|
||||
BidiParagraphData* subParagraph = aBpd->GetSubParagraph();
|
||||
|
Loading…
Reference in New Issue
Block a user