WebKit Bugzilla
Attachment 362207 Details for
Bug 194705
: [LFC][BFC] Add support for block replaced intrinsic width.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
Patch.txt (text/plain), 4.48 KB, created by
zalan
on 2019-02-15 21:44:20 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-02-15 21:44:20 PST
Size:
4.48 KB
patch
obsolete
>diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index f9334cc598d..960c7400c8e 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2019-02-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] Add support for block replaced intrinsic width. >+ https://bugs.webkit.org/show_bug.cgi?id=194705 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/block/block-only/replaced-intrinsic-width-simple-expected.html: Added. >+ * fast/block/block-only/replaced-intrinsic-width-simple.html: Added. >+ > 2019-02-15 Zalan Bujtas <zalan@apple.com> > > [LFC] Apply min/max width constraints to preferred width computation >diff --git a/LayoutTests/fast/block/block-only/replaced-intrinsic-width-simple-expected.html b/LayoutTests/fast/block/block-only/replaced-intrinsic-width-simple-expected.html >new file mode 100644 >index 00000000000..ce8a25ddb4c >--- /dev/null >+++ b/LayoutTests/fast/block/block-only/replaced-intrinsic-width-simple-expected.html >@@ -0,0 +1,6 @@ >+<style> >+img { >+ display: block; >+} >+</style> >+<img src="../resources/50x50.gif"> >\ No newline at end of file >diff --git a/LayoutTests/fast/block/block-only/replaced-intrinsic-width-simple.html b/LayoutTests/fast/block/block-only/replaced-intrinsic-width-simple.html >new file mode 100644 >index 00000000000..fd11d54975b >--- /dev/null >+++ b/LayoutTests/fast/block/block-only/replaced-intrinsic-width-simple.html >@@ -0,0 +1,12 @@ >+<style> >+div { >+ float: left; >+ width: auto; >+ height: auto; >+ background-color: green; >+} >+img { >+ display: block; >+} >+</style> >+<div><img src="../resources/50x50.gif"></div> >\ No newline at end of file >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 04d09f98fea..6772beee8df 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-02-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] Add support for block replaced intrinsic width. >+ https://bugs.webkit.org/show_bug.cgi?id=194705 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Replaced boxes should report their intrinsic width as preferred widths. >+ >+ Test: fast/block/block-only/replaced-intrinsic-width-simple.html >+ >+ * layout/blockformatting/BlockFormattingContextGeometry.cpp: >+ (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints): >+ > 2019-02-15 Zalan Bujtas <zalan@apple.com> > > [LFC] Apply min/max width constraints to preferred width computation >diff --git a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >index 256269708af..e49326cb8ad 100644 >--- a/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >+++ b/Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp >@@ -299,6 +299,15 @@ FormattingContext::IntrinsicWidthConstraints BlockFormattingContext::Geometry::i > if (!style.logicalWidth().isAuto()) > return { }; > >+ if (layoutBox.isReplaced()) { >+ auto& replaced = *layoutBox.replaced(); >+ if (replaced.hasIntrinsicWidth()) { >+ auto replacedWidth = replaced.intrinsicWidth(); >+ return { replacedWidth, replacedWidth }; >+ } >+ return { }; >+ } >+ > if (!is<Container>(layoutBox)) > return { }; > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 7c114d2052d..189a19cd8ea 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,12 @@ >+2019-02-15 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][BFC] Add support for block replaced intrinsic width. >+ https://bugs.webkit.org/show_bug.cgi?id=194705 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * LayoutReloaded/misc/LFC-passing-tests.txt: >+ > 2019-02-15 Zalan Bujtas <zalan@apple.com> > > [LFC] Apply min/max width constraints to preferred width computation >diff --git a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >index 97885cfcea6..9c46254cb07 100644 >--- a/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >+++ b/Tools/LayoutReloaded/misc/LFC-passing-tests.txt >@@ -113,6 +113,7 @@ fast/block/block-only/relative-position-when-containing-block-is-not-in-the-form > fast/block/block-only/relative-right.html > fast/block/block-only/relative-siblings.html > fast/block/block-only/relative-simple.html >+fast/block/block-only/replaced-intrinsic-width-simple-expected.html > fast/block/float/001.html > fast/block/float/003.html > fast/block/float/007.html
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
simon.fraser
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194705
: 362207