LayoutTests/ChangeLog

 12011-04-14 Andy Estes <aestes@apple.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 REGRESSION (r72141): Acid3 rendering is not pixel perfect.
 6 https://bugs.webkit.org/show_bug.cgi?id=55734
 7
 8 * fast/text/zero-font-size.html: Added.
 9 * platform/mac/fast/text/zero-font-size-expected.checksum: Added.
 10 * platform/mac/fast/text/zero-font-size-expected.png: Added.
 11 * platform/mac/fast/text/zero-font-size-expected.txt: Added.
 12
1132011-04-14 Renata Hodovan <reni@webkit.org>
214
315 Reviewed by Nikolas Zimmermann.

LayoutTests/fast/text/zero-font-size.html

 1<script>
 2 if (window.layoutTestController)
 3 layoutTestController.overridePreference("WebKitMinimumFontSize", "12");
 4</script>
 5<p>Test that text with 0px font size is not displayed, even if a non-zero minimum font size setting is specified. On success, this paragraph should be the only text visible on the page.</p>
 6<div style="font-size:0px; color:red">FAIL</div>
 7<div style="font-size:0%; color:red">FAIL</div>

LayoutTests/platform/mac/fast/text/zero-font-size-expected.checksum

 1d9a8576ec1e0399169c9e59d9184043f
02\ No newline at end of file

LayoutTests/platform/mac/fast/text/zero-font-size-expected.png

Exception raised during decoding git binary patch:
Error running git apply --directory=/tmp
with patch:
diff --git a/PrettyPatch20260609-157285-thu8r1.bin b/PrettyPatch20260609-157285-thu8r1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 0
HcmV?d00001

...
error: invalid path '/tmp/PrettyPatch20260609-157285-thu8r1.bin'

/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:924:in `run_git_apply_on_patch'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:935:in `extract_contents_from_git_binary_literal_chunk'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:950:in `extract_contents_from_remote'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:713:in `initialize'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `new'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `block in parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `collect'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:845:in `parse'
/var/www/bugs.webkit.org/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb:21:in `prettify'
/var/www/html/PrettyPatch/prettify.rb:30:in `<main>'

LayoutTests/platform/mac/fast/text/zero-font-size-expected.txt

 1layer at (0,0) size 800x600
 2 RenderView at (0,0) size 800x600
 3layer at (0,0) size 800x600
 4 RenderBlock {HTML} at (0,0) size 800x600
 5 RenderBody {BODY} at (8,8) size 784x584
 6 RenderBlock {P} at (0,0) size 784x36
 7 RenderText {#text} at (0,0) size 771x36
 8 text run at (0,0) width 771: "Test that text with 0px font size is not displayed, even if a non-zero minimum font size setting is specified. On success, this"
 9 text run at (0,18) width 336: "paragraph should be the only text visible on the page."
 10 RenderBlock {DIV} at (0,52) size 784x0 [color=#FF0000]
 11 RenderText {#text} at (0,0) size 0x0
 12 text run at (0,0) width 0: "FAIL"
 13 RenderBlock {DIV} at (0,52) size 784x0 [color=#FF0000]
 14 RenderText {#text} at (0,0) size 0x0
 15 text run at (0,0) width 0: "FAIL"

Source/WebCore/ChangeLog

 12011-04-14 Andy Estes <aestes@apple.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 REGRESSION (r72141): Acid3 rendering is not pixel perfect.
 6 https://bugs.webkit.org/show_bug.cgi?id=55734
 7
 8 WebCore should render text with a 0px font size at 0px regardless of
 9 minimum font size settings. This is compatible with other browsers that
 10 have a minimum font size preference and ensures pixel-perfect rendering
 11 on Acid3.
 12
 13 Test: fast/text/zero-font-size.html
 14
 15 * css/CSSStyleSelector.cpp:
 16 (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize): If
 17 specifiedSize is 0, return specified size regardless of zoom factor or
 18 minimum font size.
 19
1202011-04-14 Renata Hodovan <reni@webkit.org>
221
322 Reviewed by Nikolas Zimmermann.

Source/WebCore/css/CSSStyleSelector.cpp

@@void CSSStyleSelector::setFontSize(FontDescription& fontDescription, float size)
68016801
68026802float CSSStyleSelector::getComputedSizeFromSpecifiedSize(Document* document, RenderStyle* style, bool isAbsoluteSize, float specifiedSize, bool useSVGZoomRules)
68036803{
 6804 // Text with a 0px font size should not be visible and therefore needs to be
 6805 // exempt from minimum font size rules. Acid3 relies on this for pixel-perfect
 6806 // rendering. This is also compatible with other browsers that have minimum
 6807 // font size settings (e.g. Firefox).
 6808 if (fabsf(specifiedSize - 0.0f) < std::numeric_limits<float>::epsilon())
 6809 return specifiedSize;
 6810
68046811 float zoomFactor = 1.0f;
68056812 if (!useSVGZoomRules) {
68066813 zoomFactor = style->effectiveZoom();