From 64a3f7435c0cd058a0f5e00cb160c7c32ecdf8eb Mon Sep 17 00:00:00 2001 From: "dbaron@dbaron.org" Date: Sat, 9 Feb 2008 11:15:09 -0800 Subject: [PATCH] Make the minimum font size preference leave font-size:0 untouched. b=401046 r+sr=bzbarsky a=schrep --- layout/style/nsRuleNode.cpp | 6 +- layout/style/test/Makefile.in | 1 + layout/style/test/test_bug401046.html | 120 ++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 layout/style/test/test_bug401046.html diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index a03d010643d..aaa4b00393e 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -2401,7 +2401,11 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext, #endif // enforce the user' specified minimum font-size on the value that we expose - aFont->mFont.size = PR_MAX(aFont->mSize, aMinFontSize); + // (but don't change font-size:0) + if (0 < aFont->mSize && aFont->mSize < aMinFontSize) + aFont->mFont.size = aMinFontSize; + else + aFont->mFont.size = aFont->mSize; // font-size-adjust: number, none, inherit if (eCSSUnit_Number == aFontData.mSizeAdjust.GetUnit()) { diff --git a/layout/style/test/Makefile.in b/layout/style/test/Makefile.in index b980d1e11f6..c9f3a559418 100644 --- a/layout/style/test/Makefile.in +++ b/layout/style/test/Makefile.in @@ -87,6 +87,7 @@ _TEST_FILES = test_bug74880.html \ test_bug391034.html \ test_bug391221.html \ test_bug397427.html \ + test_bug401046.html \ test_bug405818.html \ test_bug412901.html \ test_compute_data_with_start_struct.html \ diff --git a/layout/style/test/test_bug401046.html b/layout/style/test/test_bug401046.html new file mode 100644 index 00000000000..22d79c0a4c8 --- /dev/null +++ b/layout/style/test/test_bug401046.html @@ -0,0 +1,120 @@ + + + + + Test for Bug 401046 + + + + + + + +Mozilla Bug 401046 + + +

+ Ép + Ép + Ép + Ép +

+ +
+
+
+ + +