[LFC][IFC] Inline replaced width should default to 300px only if width is auto.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Oct 2018 17:00:12 +0000 (17:00 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Oct 2018 17:00:12 +0000 (17:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190722

Reviewed by Antti Koivisto.

See #5

// 5. Otherwise, if 'width' has a computed value of 'auto', but none of the conditions above are met, then the used value of 'width' becomes 300px.

* layout/FormattingContextGeometry.cpp:
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237291 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/layout/FormattingContextGeometry.cpp

index f221111..9e3221f 100644 (file)
@@ -1,5 +1,19 @@
 2018-10-19  Zalan Bujtas  <zalan@apple.com>
 
+        [LFC][IFC] Inline replaced width should default to 300px only if width is auto.
+        https://bugs.webkit.org/show_bug.cgi?id=190722
+
+        Reviewed by Antti Koivisto.
+
+        See #5
+
+        // 5. Otherwise, if 'width' has a computed value of 'auto', but none of the conditions above are met, then the used value of 'width' becomes 300px.
+
+        * layout/FormattingContextGeometry.cpp:
+        (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
+
+2018-10-19  Zalan Bujtas  <zalan@apple.com>
+
         [LFC][IFC] Add inline runs to showLayoutTree
         https://bugs.webkit.org/show_bug.cgi?id=190718
 
index 45090f8..e49f77b 100644 (file)
@@ -887,7 +887,7 @@ WidthAndMargin FormattingContext::Geometry::inlineReplacedWidthAndMargin(const L
     } else if (!width && replaced->hasIntrinsicWidth()) {
         // #4
         width = replaced->intrinsicWidth();
-    } else {
+    } else if (!width) {
         // #5
         width = { 300 };
     }