mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
Bug 504311. Don't reframe text when white-space changes between preformatted values, or between non-preformatted values. r=bz
--HG-- extra : rebase_source : 7f545ad1d85bcda74d18d9308539b45149a4a194
This commit is contained in:
parent
db83f27954
commit
3a0de712cc
24
layout/style/crashtests/504311-1.xul
Normal file
24
layout/style/crashtests/504311-1.xul
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="f()">
|
||||
|
||||
<script type="text/javascript">
|
||||
<![CDATA[
|
||||
function f ()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tb = document. getElementById ("tb01");
|
||||
var inputField = tb. inputField;
|
||||
var editor = inputField. QueryInterface (Components. interfaces. nsIDOMNSEditableElement). editor;
|
||||
editor = editor. QueryInterface (Components. interfaces. nsIEditor);
|
||||
editor = editor. QueryInterface (Components. interfaces. nsIPlaintextEditor);
|
||||
editor. wrapWidth = -1;
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<textbox id="tb01" multiline="true"/>
|
||||
|
||||
</window>
|
@ -39,3 +39,4 @@ load 473914-1.html
|
||||
skip load long-url-list-stack-overflow.html # skipped due to being slow (bug 477490)
|
||||
load 495269-1.html
|
||||
load 495269-2.html
|
||||
load 504311-1.xul
|
||||
|
@ -1873,13 +1873,14 @@ nsStyleText::~nsStyleText(void) { }
|
||||
|
||||
nsChangeHint nsStyleText::CalcDifference(const nsStyleText& aOther) const
|
||||
{
|
||||
if (mWhiteSpace != aOther.mWhiteSpace) {
|
||||
if (NewlineIsSignificant() != aOther.NewlineIsSignificant()) {
|
||||
// This may require construction of suppressed text frames
|
||||
return NS_STYLE_HINT_FRAMECHANGE;
|
||||
}
|
||||
|
||||
if ((mTextAlign != aOther.mTextAlign) ||
|
||||
(mTextTransform != aOther.mTextTransform) ||
|
||||
(mWhiteSpace != aOther.mWhiteSpace) ||
|
||||
(mWordWrap != aOther.mWordWrap) ||
|
||||
(mLetterSpacing != aOther.mLetterSpacing) ||
|
||||
(mLineHeight != aOther.mLineHeight) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user