I'm not 100% sure about this, but as per my reading of http://dev.w3.org/csswg/css3-writing-modes/#orthogonal-flows, we do the wrong thing with the following case: <div style="height:300px; -webkit-writing-mode: horizontal-tb"> <div style="height: auto; -webkit-writing-mode: vertical-rl; border: 1px solid">asdf</div> </div> The physical height of the inner div should be shrink-wrapped to it's content, instead it's 300px. http://plexode.com/eval3/#ht=%3Cdiv%20style%3D%22height%3A300px%3B%20-webkit-writing-mode%3A%20horizontal-tb%22%3E%0A%20%20%20%20%3Cdiv%20style%3D%22height%3A%20auto%3B%20-webkit-writing-mode%3A%20vertical-rl%3B%20border%3A%201px%20solid%22%3Easdf%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A&ohh=1&ohj=1&jt=&ojh=1&ojj=1&ms=100&oth=0&otj=0&cex=1 Am I misreading the spec? Is the spec stupid?
I'm proposing that the spec change so that we use the available height of the containing block if it exists and use the height of the initial containing block otherwise: http://lists.w3.org/Archives/Public/www-style/2011Sep/0375.html Test case for both height: auto and height: 100% in a fixed height containing block and in a height:auto containing block: http://plexode.com/eval3/#ht=%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20height%3A%20300px%3B%20-webkit-writing-mode%3A%20horizontal-tb%3Bbackground-color%3Aorange%22%3E%0A%20%20%20%20%3Cdiv%20style%3D%22height%3A%20auto%3B%20-webkit-writing-mode%3A%20vertical-rl%3B%20background-color%3A%20red%22%3Easdf%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20style%3D%22height%3A%20100%25%3B%20-webkit-writing-mode%3A%20vertical-rl%3B%20background-color%3A%20green%22%3Easdf%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%0A%3Cdiv%20style%3D%22display%3A%20inline-block%3B%20-webkit-writing-mode%3A%20horizontal-tb%3Bbackground-color%3Aorange%22%3E%0A%20%20%20%20%3Cdiv%20style%3D%22height%3A%20auto%3B%20-webkit-writing-mode%3A%20vertical-rl%3B%20background-color%3A%20red%22%3Easdf%3C%2Fdiv%3E%0A%20%20%20%20%3Cdiv%20style%3D%22height%3A%20100%25%3B%20-webkit-writing-mode%3A%20vertical-rl%3B%20background-color%3A%20green%22%3Easdf%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A&ohh=1&ohj=1&jt=&ojh=1&ojj=1&ms=100&oth=0&otj=0&cex=1
Created attachment 108402 [details] Patch
Here's a patch that implements the shrink-wrapping using the containing block size and falling back to the initial containing block size. I'll mark it for review once the writing modes spec changes to require this behavior.
Comment on attachment 108402 [details] Patch On second thought, this patch brings us closer to the current spec in that we shrink-wrap height:auto. Should the spec text wrt containing block not change, we can always change the shrink-wrapping to always use the initial containing block.
Comment on attachment 108402 [details] Patch Attachment 108402 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/9815143 New failing tests: fast/table/028-vertical.html fast/table/height-percent-test-vertical.html
Comment on attachment 108402 [details] Patch r=me, make sure you get all tests though.
Created attachment 111085 [details] Patch for landing
Comment on attachment 111085 [details] Patch for landing Woah. Land-safely did something crazy with the ChangeLog entry. :(
Created attachment 111086 [details] Patch for landing
Comment on attachment 111086 [details] Patch for landing Rejecting attachment 111086 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 1 NOBODY (OOPS!) found in /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog does not appear to be a valid reviewer according to committers.py. ERROR: /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://queues.webkit.org/results/10073279
Created attachment 111147 [details] Patch for landing
Comment on attachment 111147 [details] Patch for landing Rejecting attachment 111147 [details] from commit-queue. New failing tests: fast/table/028-vertical.html fast/table/height-percent-test-vertical.html Full output: http://queues.webkit.org/results/10080178
Committed r97654: <http://trac.webkit.org/changeset/97654>
Reverted r97654 for reason: Caused a number of Chromium failures. Committed r97662: <http://trac.webkit.org/changeset/97662>
Committed r97707: <http://trac.webkit.org/changeset/97707>