https://bugs.webkit.org/show_bug.cgi?id=86942
Patch by Joe Thomas <joethomas@motorola.com> on 2012-06-26
Reviewed by Eric Seidel.
As per the specification http://www.w3.org/TR/css3-background/#background-size, if the background image's width or height resolves to zero,
this causes the image not to be displayed. The effect should be the same as if it had been a transparent image.
This is also mentioned in http://www.w3.org/TR/2002/WD-css3-background-
20020802/#background-size.
Source/WebCore:
Test: fast/backgrounds/zero-background-size.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateFillTileSize):
LayoutTests:
* fast/backgrounds/size/zero.html:
* fast/backgrounds/zero-background-size-expected.html: Added.
* fast/backgrounds/zero-background-size.html: Added.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/fast/backgrounds/size/zero-expected.png:
* platform/mac/fast/backgrounds/size/zero-expected.txt:
* platform/qt/TestExpectations:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121296
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-06-26 Joe Thomas <joethomas@motorola.com>
+
+ background-size:0 shows as 1px instead of invisible
+ https://bugs.webkit.org/show_bug.cgi?id=86942
+
+ Reviewed by Eric Seidel.
+
+ As per the specification http://www.w3.org/TR/css3-background/#background-size, if the background image's width or height resolves to zero,
+ this causes the image not to be displayed. The effect should be the same as if it had been a transparent image.
+ This is also mentioned in http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size.
+
+ * fast/backgrounds/size/zero.html:
+ * fast/backgrounds/zero-background-size-expected.html: Added.
+ * fast/backgrounds/zero-background-size.html: Added.
+ * platform/chromium/TestExpectations:
+ * platform/efl/TestExpectations:
+ * platform/gtk/TestExpectations:
+ * platform/mac/fast/backgrounds/size/zero-expected.png:
+ * platform/mac/fast/backgrounds/size/zero-expected.txt:
+ * platform/qt/TestExpectations:
+
2012-06-26 Ryosuke Niwa <rniwa@webkit.org>
Fix a test after r121286.
Test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=15750">REGRESSION(r27173): Web Inspector freezes beneath Image::drawPattern()</a> Bug</i>.
</p>
<p>
- There should be four blue squares with black borders. WebKit should not hang or assert.
+ There should be four empty squares with black borders. WebKit should not hang or assert.
</p>
-<div style="-webkit-background-size: 0 0;"></div>
-<div style="-webkit-background-size: 0 32px;"></div>
-<div style="-webkit-background-size: 2px 0;"></div>
-<div style="-webkit-background-size: auto 8px;"></div>
+<div style="background-size: 0 0;"></div>
+<div style="background-size: 0 32px;"></div>
+<div style="background-size: 2px 0;"></div>
+<div style="background-size: auto 8px;"></div>
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+<style type="text/css">
+div {
+ width: 200px;
+ height: 200px;
+}
+</style>
+<div></div>
+<div></div>
+<div></div>
+<div></div>
+<div></div>
+<div></div>
+<div></div>
+<div></div>
+</html>
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+<style type="text/css">
+div {
+ width: 200px;
+ height: 200px;
+}
+</style>
+<div style="background: url('./resources/dot.png') center / 0px 50px repeat-x"></div>
+<div style="background: url('./resources/dot.png') center / 50px 0px repeat-x"></div>
+<div style="background: url('./resources/dot.png') center / 0px repeat-x"></div>
+<div style="background: url('./resources/dot.png') center / 0px 0px repeat-x"></div>
+<div style="background: url('./resources/dot.png') center / 0% 50% repeat-x"></div>
+<div style="background: url('./resources/dot.png') center / 50% 0% repeat-x"></div>
+<div style="background: url('./resources/dot.png') center / 0% repeat-x"></div>
+<div style="background: url('./resources/dot.png') center / 0% 0% repeat-x"></div>
+</html>
BUGWK89166 : http/tests/messaging/cross-domain-message-event-dispatch.html = TEXT
BUGWK89167 : media/track/track-cue-rendering-snap-to-lines-not-set.html = TEXT
+// Needs Rebaseline after bug 86942
+BUGWK86942 : fast/backgrounds/size/zero.html = IMAGE+TEXT
+
// Timing out on some Windows bots
BUGWK89510 WIN : gamepad/gamepad-polling-access.html = PASS TIMEOUT
BUGWK88729 SKIP : userscripts/window-onerror-for-isolated-world-1.html = PASS
BUGWK88729 SKIP : userscripts/window-onerror-for-isolated-world-2.html = PASS
+// Needs Rebaseline after bug 86942
+BUGWK86942 : fast/backgrounds/size/zero.html = IMAGE+TEXT
+
// Needs rebaseline after the bots cycle.
BUG_OJAN : tables/mozilla/bugs/bug131020.html = TEXT IMAGE IMAGE+TEXT
BUGWK57346 : fast/text/justify-ideograph-leading-expansion.html = TEXT
+// Needs Rebaseline after bug 86942
+BUGWK86942 : fast/backgrounds/size/zero.html = TEXT
+
BUGWK83800 : plugins/get-url-with-blank-target.html = TEXT
BUGWK84037 : fast/text/international/spaces-combined-in-vertical-text.html = TEXT
RenderText {#text} at (580,0) size 4x18
text run at (580,0) width 4: "."
RenderBlock {P} at (0,34) size 784x18
- RenderText {#text} at (0,0) size 558x18
- text run at (0,0) width 558: "There should be four blue squares with black borders. WebKit should not hang or assert."
+ RenderText {#text} at (0,0) size 570x18
+ text run at (0,0) width 570: "There should be four empty squares with black borders. WebKit should not hang or assert."
RenderBlock {DIV} at (8,68) size 106x106 [border: (3px solid #000000)]
RenderBlock {DIV} at (8,182) size 106x106 [border: (3px solid #000000)]
RenderBlock {DIV} at (8,296) size 106x106 [border: (3px solid #000000)]
// Paletted PNG with ICC color profiles not working.
BUGWK86722 SKIP : fast/images/paletted-png-with-color-profile.html = PASS
+// Needs Rebaseline after bug 86942
+BUGWK86942 : fast/backgrounds/size/zero.html = TEXT
+
// Needs rebaseline after the bots cycle.
BUG_OJAN : tables/mozilla/bugs/bug131020.html = PASS TEXT IMAGE IMAGE+TEXT
+2012-06-26 Joe Thomas <joethomas@motorola.com>
+
+ background-size:0 shows as 1px instead of invisible
+ https://bugs.webkit.org/show_bug.cgi?id=86942
+
+ Reviewed by Eric Seidel.
+
+ As per the specification http://www.w3.org/TR/css3-background/#background-size, if the background image's width or height resolves to zero,
+ this causes the image not to be displayed. The effect should be the same as if it had been a transparent image.
+ This is also mentioned in http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size.
+
+ Test: fast/backgrounds/zero-background-size.html
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::calculateFillTileSize):
+
2012-06-26 Adam Klein <adamk@chromium.org>
[v8] Clean up generated Dictionary-handling code
h = imageIntrinsicSize.height();
}
- return IntSize(max(1, w), max(1, h));
+ return IntSize(max(0, w), max(0, h));
}
case SizeNone: {
// If both values are ‘auto’ then the intrinsic width and/or height of the image should be used, if any.