Title: [110091] trunk/Source/WebCore
Revision
110091
Author
[email protected]
Date
2012-03-07 13:02:44 -0800 (Wed, 07 Mar 2012)

Log Message

RenderImage ignores its percent width/height when setContainerSizeForRenderer
https://bugs.webkit.org/show_bug.cgi?id=80431

Patch by Yong Li <[email protected]> on 2012-03-07
Reviewed by George Staikos.

Not only respect fixed width/height explicitly specified in img element, but also
respect percent width/height when determining container size for images.

No new tests because there is no functional change but only internal buffer sizes.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::computeReplacedLogicalWidth):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110090 => 110091)


--- trunk/Source/WebCore/ChangeLog	2012-03-07 20:57:51 UTC (rev 110090)
+++ trunk/Source/WebCore/ChangeLog	2012-03-07 21:02:44 UTC (rev 110091)
@@ -1,3 +1,18 @@
+2012-03-07  Yong Li  <[email protected]>
+
+        RenderImage ignores its percent width/height when setContainerSizeForRenderer
+        https://bugs.webkit.org/show_bug.cgi?id=80431
+
+        Reviewed by George Staikos.
+
+        Not only respect fixed width/height explicitly specified in img element, but also
+        respect percent width/height when determining container size for images.
+
+        No new tests because there is no functional change but only internal buffer sizes.
+
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::computeReplacedLogicalWidth):
+
 2012-03-06  Benjamin Poulain  <[email protected]>
 
         [Mac] Update the configuration files for iOS

Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (110090 => 110091)


--- trunk/Source/WebCore/rendering/RenderImage.cpp	2012-03-07 20:57:51 UTC (rev 110090)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp	2012-03-07 21:02:44 UTC (rev 110091)
@@ -504,8 +504,8 @@
 
 LayoutUnit RenderImage::computeReplacedLogicalWidth(bool includeMaxWidth) const
 {
-    // If we've got an explicit width/height assigned, propagate it to the image resource.    
-    if (style()->logicalWidth().isFixed() && style()->logicalHeight().isFixed()) {
+    // If we've got an explicit width/height assigned, propagate it to the image resource.
+    if (style()->logicalWidth().isSpecified() && style()->logicalHeight().isSpecified()) {
         LayoutUnit width = RenderReplaced::computeReplacedLogicalWidth(includeMaxWidth);
         m_imageResource->setContainerSizeForRenderer(IntSize(width, computeReplacedLogicalHeight()));
         return width;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to