RESOLVED FIXED 87050
REGRESSION (r105513): CSS max-width is not applied to SVG element
https://bugs.webkit.org/show_bug.cgi?id=87050
Summary REGRESSION (r105513): CSS max-width is not applied to SVG element
mitz
Reported 2012-05-21 15:00:48 PDT
Created attachment 143108 [details] Test case <rdar://problem/11331943> To reproduce, open the test case. The square should be 100 pixels wide, but instead it is 400 pixels wide. This seems to have been caused by <http://trac.webkit.org/r105513>
Attachments
Test case (252 bytes, text/html)
2012-05-21 15:00 PDT, mitz
no flags
Check if max-width and max-height were specified in RenderSVGRoot::computeReplacedLogical{Width,Height} (33.87 KB, patch)
2012-05-22 15:38 PDT, mitz
darin: review+
mitz
Comment 1 2012-05-22 07:36:22 PDT
Firefox and Opera match WebKit’s pre-r105513 behavior.
mitz
Comment 2 2012-05-22 14:46:55 PDT
The same is true for max-height.
mitz
Comment 3 2012-05-22 15:38:46 PDT
Created attachment 143379 [details] Check if max-width and max-height were specified in RenderSVGRoot::computeReplacedLogical{Width,Height}
mitz
Comment 4 2012-05-22 15:52:12 PDT
Nikolas Zimmermann
Comment 5 2012-05-23 00:27:22 PDT
Thanks for the quick fix Dan! Why was the call to hasReplacedLogicalHeight() removed? bool RenderReplaced::hasReplacedLogicalHeight() const { if (style()->logicalHeight().isAuto()) return false; if (style()->logicalHeight().isSpecified()) { if (hasAutoHeightOrContainingBlockWithAutoHeight(this)) return false; return true; } return false; } It contains extra logic, for auto height containing blocks. Is that not needed or wrong for RenderSVGRoot? It's been a while since I looked at this. CC'ing Florin, who added this IIRC.
Florin Malita
Comment 6 2012-05-23 11:21:47 PDT
(In reply to comment #5) > Thanks for the quick fix Dan! > Why was the call to hasReplacedLogicalHeight() removed? > [...] > CC'ing Florin, who added this IIRC. I'm not familiar with it either - you're probably recalling me adding hasRelativeLogicalHeight, not hasReplacedLogicalHeight :)
Note You need to log in before you can comment on or make changes to this bug.