Flexbox does not apply correctly to summary element
Reported by
oliverj...@gmail.com,
Apr 15 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 Example URL: http://jsbin.com/dijeho/1/edit?html,css,js,output Steps to reproduce the problem: 1. Add display: flex to a summary element (inside of a details element) What is the expected behavior? The elements should be laid out horizontally. What went wrong? They are laid out vertically and it is not possible to change this. Does it occur on multiple sites: N/A Is it a problem with a plugin? N/A Did this work before? N/A Does this work in other browsers? N/A Chrome version: 49.0.2623.112 Channel: n/a OS Version: OS X 10.11.3 Flash Version: Shockwave Flash 21.0 r0
,
Apr 15 2016
Hmm, indeed: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/html/HTMLSummaryElement.cpp&q=htmlsummarye&sq=package:chromium&l=50 LayoutObject* HTMLSummaryElement::createLayoutObject(const ComputedStyle&) { return new LayoutBlockFlow(this); I wonder why it does that?
,
Apr 15 2016
Hmm it started out as a RenderSummary: https://chromium.googlesource.com/chromium/src/+/64a50a193fd4be1a65d28e974575b6d1cabb5ef5%5E%21/third_party/WebKit/Source/WebCore/html/HTMLSummaryElement.cpp But it got changed to RenderBlock in 2012: https://chromium.googlesource.com/chromium/src/+/1e9dd5e86df67dbf0ee95bf466bc92a475b13f39%5E%21/third_party/WebKit/Source/WebCore/html/HTMLSummaryElement.cpp I wonder what happens if we just let it use the generic createLayoutObject impl at this point?!
,
Apr 18 2016
,
May 10 2016
Is there any specific reason, for summary element to be considered as inline-block when declared display:inline ? https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/LayoutTests/fast/html/details-inline.html If it's ok to consider display:inline as inline, looks like we can use generic createObject.
,
May 11 2016
Oh, good point. We likely have to keep that. But we could always check style()->display() here and create flex if appropriate.
,
May 11 2016
Looks like we can't solve it with html.css because per that testcase, display: inline should become inline-block too.
,
Aug 8 2016
Discussion here: https://mobile.twitter.com/LeaVerou/status/762258892743184386
,
Aug 8 2016
,
Aug 8 2016
Issue 635284 has been merged into this issue.
,
Aug 8 2016
It has not been pointed out so far, so I feel free to do it. This worked on Iceweasel 38.8.0 (Debian Jessie 8.2) and Firefox 48.0 (Kubuntu 14.04). Of course Iceweasel is Firefox but I don't know which version it matches.
,
Oct 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b711bbea21e196179a525c1588004ca4f60d025d commit b711bbea21e196179a525c1588004ca4f60d025d Author: xing.xu <xing.xu@intel.com> Date: Tue Oct 04 23:53:58 2016 Support display:flex for 'summary' BUG= 603928 R=skobes@chromium.org, cbiesinger@chromium.org Review-Url: https://codereview.chromium.org/2373963002 Cr-Commit-Position: refs/heads/master@{#423008} [add] https://crrev.com/b711bbea21e196179a525c1588004ca4f60d025d/third_party/WebKit/LayoutTests/fast/html/summary-display-flex-expected.html [add] https://crrev.com/b711bbea21e196179a525c1588004ca4f60d025d/third_party/WebKit/LayoutTests/fast/html/summary-display-flex.html [add] https://crrev.com/b711bbea21e196179a525c1588004ca4f60d025d/third_party/WebKit/LayoutTests/fast/html/summary-display-grid-expected.html [add] https://crrev.com/b711bbea21e196179a525c1588004ca4f60d025d/third_party/WebKit/LayoutTests/fast/html/summary-display-grid.html [add] https://crrev.com/b711bbea21e196179a525c1588004ca4f60d025d/third_party/WebKit/LayoutTests/fast/html/summary-display-inline-flex-expected.html [add] https://crrev.com/b711bbea21e196179a525c1588004ca4f60d025d/third_party/WebKit/LayoutTests/fast/html/summary-display-inline-flex.html [add] https://crrev.com/b711bbea21e196179a525c1588004ca4f60d025d/third_party/WebKit/LayoutTests/fast/html/summary-display-inline-grid-expected.html [add] https://crrev.com/b711bbea21e196179a525c1588004ca4f60d025d/third_party/WebKit/LayoutTests/fast/html/summary-display-inline-grid.html [modify] https://crrev.com/b711bbea21e196179a525c1588004ca4f60d025d/third_party/WebKit/Source/core/html/HTMLSummaryElement.cpp
,
Oct 5 2016
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by rsesek@chromium.org
, Apr 15 2016