зеркало из https://github.com/mozilla/pjs.git
Bug 581536 - Part 2: Reconstruct the document element frames when the dir attribute is set on the document; r=bzbarsky a=blocking-betaN+
--HG-- rename : layout/reftests/forms/textarea-rtl.html => layout/reftests/forms/textarea-in-dynamic-rtl-doc.html extra : rebase_source : 444e9dfa75be1e880679c405afd90cfc4031131c
This commit is contained in:
Родитель
0da4dab89c
Коммит
4426a68bb6
|
@ -984,7 +984,9 @@ CaptureChange(nsStyleContext* aOldContext, nsStyleContext* aNewContext,
|
|||
|
||||
NS_UpdateHint(ourChange, aChangeToAssume);
|
||||
if (NS_UpdateHint(aMinChange, ourChange)) {
|
||||
aChangeList->AppendChange(aFrame, aContent, ourChange);
|
||||
if (!(ourChange & nsChangeHint_ReconstructFrame) || aContent) {
|
||||
aChangeList->AppendChange(aFrame, aContent, ourChange);
|
||||
}
|
||||
}
|
||||
return aMinChange;
|
||||
}
|
||||
|
|
|
@ -1462,8 +1462,11 @@ nsPresContext::SetBidi(PRUint32 aSource, PRBool aForceRestyle)
|
|||
SetVisualMode(IsVisualCharset(doc->GetDocumentCharacterSet()));
|
||||
}
|
||||
}
|
||||
if (aForceRestyle) {
|
||||
RebuildAllStyleData(NS_STYLE_HINT_REFLOW);
|
||||
if (aForceRestyle && mShell) {
|
||||
// Reconstruct the root document element's frame and its children,
|
||||
// because we need to trigger frame reconstruction for direction change.
|
||||
RebuildUserFontSet();
|
||||
mShell->ReconstructFrames();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ skip-if(winWidget) == textarea-resize-background.html textarea-resize-background
|
|||
!= textarea-rtl.html textarea-no-resize.html
|
||||
== textarea-rtl.html textarea-rtl-dynamic-attr.html
|
||||
== textarea-rtl.html textarea-rtl-dynamic-style.html
|
||||
== textarea-rtl.html textarea-in-dynamic-rtl-doc.html
|
||||
== textarea-setvalue-framereconstruction-1.html textarea-setvalue-framereconstruction-ref.html
|
||||
|
||||
== radio-label-dynamic.html radio-label-dynamic-ref.html
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title></title>
|
||||
</head>
|
||||
<body style="text-align: left">
|
||||
<textarea cols=20 rows=4></textarea>
|
||||
<script>
|
||||
onload = function() {
|
||||
setTimeout(function() {
|
||||
document.dir = "rtl";
|
||||
document.documentElement.removeAttribute("class");
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче