https://bugs.webkit.org/show_bug.cgi?id=43022
Patch by Terry Anderson <tdanderson@chromium.org> on 2012-03-16
Reviewed by Julien Chaffraix.
Source/WebCore:
Test: fast/replaced/vertical-resize-100percent-element.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
For the case where a replaced element has a percentage height,
we update the entries in RenderBlock::gPercentHeightDescendantsMap
corresponding to all ancestors of the replaced element.
LayoutTests:
* fast/replaced/resources/vertical-resize-100percent-contents.html: Added.
* fast/replaced/vertical-resize-100percent-element-expected.txt: Added.
* fast/replaced/vertical-resize-100percent-element.html: Added.
Layout test to ensure that an image with 100% height is resized when
its containing iframe is vertically resized to be larger or smaller.
* platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
* platform/chromium-win/tables/mozilla_expected_failures/bugs/bug85016-expected.txt:
Rebaseline for chromium. This patch causes a progression in this layout test. In the
diff, note that the viewport has height 585, which is 600 minus 15 pixels to account for
the horizontal scrollbar. In the old expected output the first image to be displayed
has height 600, which is incorrect because it should be 100% of the viewport height.
The new expected output shows the first image with the correct height of 585.
* platform/chromium/test_expectations.txt:
WIN will need a regenerated image, and MAC will need a regenerated image+text.
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
Skip the rebaselined test on all other platforms.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111064
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-16 Terry Anderson <tdanderson@chromium.org>
+
+ 100% height elements to not respond to vertical browser rescaling
+ https://bugs.webkit.org/show_bug.cgi?id=43022
+
+ Reviewed by Julien Chaffraix.
+
+ * fast/replaced/resources/vertical-resize-100percent-contents.html: Added.
+ * fast/replaced/vertical-resize-100percent-element-expected.txt: Added.
+ * fast/replaced/vertical-resize-100percent-element.html: Added.
+ Layout test to ensure that an image with 100% height is resized when
+ its containing iframe is vertically resized to be larger or smaller.
+ * platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug85016-expected.png:
+ * platform/chromium-win/tables/mozilla_expected_failures/bugs/bug85016-expected.txt:
+ Rebaseline for chromium. This patch causes a progression in this layout test. In the
+ diff, note that the viewport has height 585, which is 600 minus 15 pixels to account for
+ the horizontal scrollbar. In the old expected output the first image to be displayed
+ has height 600, which is incorrect because it should be 100% of the viewport height.
+ The new expected output shows the first image with the correct height of 585.
+ * platform/chromium/test_expectations.txt:
+ WIN will need a regenerated image, and MAC will need a regenerated image+text.
+ * platform/gtk/Skipped:
+ * platform/mac/Skipped:
+ * platform/qt/Skipped:
+ * platform/win/Skipped:
+ Skip the rebaselined test on all other platforms.
+
2012-03-16 Levi Weintraub <leviw@chromium.org>
Unreviewed gardening. Marking media/track/track-active-cues.html as flaky timeout on windows.
--- /dev/null
+<html>
+<head>
+<style>
+html, body {
+ border: 0;
+ margin: 0;
+ height: 100%;
+}
+
+#container {
+ position: relative;
+ margin: 0 auto;
+ height: auto !important;
+ min-height: 100%;
+}
+
+#footer {
+ position: absolute;
+ width: 100%;
+ bottom: 0;
+ background: gray;
+}
+</style>
+</head>
+<body>
+<div id="container">
+ <div><img id="img" src="compass.jpg" style="width: 100%; height: 100%;"></div>
+ <div id="footer">
+ Layout test for <a href="https://bugs.webkit.org/show_bug.cgi?id=43022">https://bugs.webkit.org/show_bug.cgi?id=43022</a>
+ </div>
+</div>
+</body>
+</html>
--- /dev/null
+
+Layout test for https://bugs.webkit.org/show_bug.cgi?id=43022. Checks to see if an image having a percentage height is resized when its containing iframe is vertically resized. This test only works in DumpRenderTree since it involves accessing the internal elements of an iframe.
+
+Original frame height was 500
+Original image height was 500
+Vertically resizing the frame to be larger
+New frame height is 600
+New image height is 600
+PASSED: Image size is correct
+Vertically resizing the frame to be smaller
+New frame height is 450
+New image height is 450
+PASSED: Image size is correct
+
--- /dev/null
+<html>
+<head>
+<script>
+var theFrame, theImage;
+
+function log(msg)
+{
+ var console = document.getElementById('console');
+ console.appendChild(document.createTextNode(msg));
+ console.appendChild(document.createElement('br'));
+}
+
+function resizeAndCheck(newSize)
+{
+ theFrame.height = newSize;
+
+ log("New frame height is " + theFrame.height);
+ log("New image height is " + theImage.height);
+
+ if (theImage.height == newSize)
+ log("PASSED: Image size is correct");
+ else
+ log("FAILED: Image size is not correct");
+}
+
+function run()
+{
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ theFrame = document.getElementById('frame');
+ var frContents = theFrame.contentWindow.document;
+ theImage = frContents.getElementById('img');
+
+ log("Original frame height was " + theFrame.height);
+ log("Original image height was " + theImage.height);
+
+ log("Vertically resizing the frame to be larger");
+ resizeAndCheck(600);
+
+ log("Vertically resizing the frame to be smaller");
+ resizeAndCheck(450);
+}
+
+</script>
+</head>
+
+<body onload="run()">
+<iframe height="500" width="500" id="frame" src="resources/vertical-resize-100percent-contents.html"></iframe>
+<p>Layout test for https://bugs.webkit.org/show_bug.cgi?id=43022. Checks to see if an image having a percentage height is resized when its containing iframe is vertically resized. This test only works in DumpRenderTree since it involves accessing the internal elements of an iframe.</p>
+<p id="console"></p>
+</body>
+
+</html>
-layer at (0,0) size 983x3048
+layer at (0,0) size 961x2988
RenderView at (0,0) size 785x585
-layer at (0,0) size 785x3048
- RenderBlock {HTML} at (0,0) size 785x3048
- RenderBody {BODY} at (32,32) size 721x2984
- RenderBlock {DIV} at (32,0) size 657x668 [border: (1px solid #008000)]
- RenderBlock {DIV} at (33,33) size 591x602 [border: (1px solid #FF0000)]
- RenderImage {IMG} at (1,1) size 589x600
+layer at (0,0) size 785x2988
+ RenderBlock {HTML} at (0,0) size 785x2988
+ RenderBody {BODY} at (32,32) size 721x2924
+ RenderBlock {DIV} at (32,0) size 657x653 [border: (1px solid #008000)]
+ RenderBlock {DIV} at (33,33) size 591x587 [border: (1px solid #FF0000)]
+ RenderImage {IMG} at (1,1) size 589x585
RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,700) size 721x20
+ RenderBlock {P} at (0,685) size 721x20
RenderText {#text} at (0,0) size 506x19
text run at (0,0) width 506: "percentage height images in DIV with no height (red) in a DIV with no height (green)"
- RenderBlock {DIV} at (32,752) size 657x672 [border: (3px dotted #008000)]
- RenderBlock {DIV} at (35,35) size 587x602 [border: (1px solid #FF0000)]
- RenderImage {IMG} at (1,1) size 883x600
+ RenderBlock {DIV} at (32,737) size 657x657 [border: (3px dotted #008000)]
+ RenderBlock {DIV} at (35,35) size 587x587 [border: (1px solid #FF0000)]
+ RenderImage {IMG} at (1,1) size 861x585
RenderText {#text} at (0,0) size 0x0
- RenderBlock {P} at (0,1456) size 721x20
+ RenderBlock {P} at (0,1426) size 721x20
RenderText {#text} at (0,0) size 443x19
text run at (0,0) width 443: "percentage height image in table cell (red), in a DIV with no height (green)"
- RenderBlock {DIV} at (32,1508) size 657x1476
- RenderTable {TABLE} at (0,0) size 260x1476 [border: (1px solid #FF0000)]
- RenderTableSection {TBODY} at (1,1) size 258x1474
- RenderTableRow {TR} at (0,2) size 258x1470
- RenderTableCell {TD} at (2,650) size 254x174 [border: (1px solid #FF0000)] [r=0 c=0 rs=1 cs=1]
+ RenderBlock {DIV} at (32,1478) size 657x1446
+ RenderTable {TABLE} at (0,0) size 260x1446 [border: (1px solid #FF0000)]
+ RenderTableSection {TBODY} at (1,1) size 258x1444
+ RenderTableRow {TR} at (0,2) size 258x1440
+ RenderTableCell {TD} at (2,635) size 254x174 [border: (1px solid #FF0000)] [r=0 c=0 rs=1 cs=1]
RenderImage {IMG} at (2,2) size 250x170
BUGYANGGUO WIN : svg/css/stars-with-shadow.html = TEXT
BUGWK81325 : fast/canvas/webgl/context-lost.html = TEXT
+
+// Needs rebaseline due to a progression
+BUGWK43022 WIN : tables/mozilla_expected_failures/bugs/bug85016.html = IMAGE
+BUGWK43022 MAC : tables/mozilla_expected_failures/bugs/bug85016.html = IMAGE+TEXT
editing/selection/move-by-word-visually-single-space-one-element.html
editing/selection/move-by-word-visually-textarea.html
editing/selection/move-by-word-visually-wrong-left-right.html
+
+# https://bugs.webkit.org/show_bug.cgi?id=43022
+tables/mozilla_expected_failures/bugs/bug85016.html
# https://bugs.webkit.org/show_bug.cgi?id=62698
# Needs BatteryClient implementation.
batterystatus/
+
+# https://bugs.webkit.org/show_bug.cgi?id=43022
+tables/mozilla_expected_failures/bugs/bug85016.html
tables/mozilla/bugs/bug14929.html
tables/mozilla/bugs/bug2947.html
+# Needs a rebaseline, caused by https://bugs.webkit.org/show_bug.cgi?id=43022
+tables/mozilla_expected_failures/bugs/bug85016.html
+
# ============================================================================= #
# Failed canvas tests from http://philip.html5.org/tests/canvas/suite/tests/
# ============================================================================= #
# http://bugs.webkit.org/show_bug.cgi?id=81006
svg/custom/delete-text-crash.html
+
+# https://bugs.webkit.org/show_bug.cgi?id=43022
+tables/mozilla_expected_failures/bugs/bug85016.html
+2012-03-16 Terry Anderson <tdanderson@chromium.org>
+
+ 100% height elements to not respond to vertical browser rescaling
+ https://bugs.webkit.org/show_bug.cgi?id=43022
+
+ Reviewed by Julien Chaffraix.
+
+ Test: fast/replaced/vertical-resize-100percent-element.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
+ For the case where a replaced element has a percentage height,
+ we update the entries in RenderBlock::gPercentHeightDescendantsMap
+ corresponding to all ancestors of the replaced element.
+
2012-03-15 Daniel Cheng <dcheng@chromium.org>
[chromium] Refactor ClipboardChromium and DataTransferItemList/DataTransferItem to support HTML spec
return logicalHeight.calcValue(availableHeight - borderAndPaddingLogicalHeight());
}
cb = cb->containingBlock();
+ toRenderBlock(cb)->addPercentHeightDescendant(const_cast<RenderBox*>(this));
}
}
return computeContentBoxLogicalHeight(logicalHeight.calcValue(availableHeight));