Bug 224104

Summary: Incorrect initial reflow when inline parent has horizontal direction flip
Product: WebKit Reporter: Tim Nguyen (:ntim) <ntim>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Before opening web inspector
none
After opening web inspector (correct result)
none
Test reduction none

Description Tim Nguyen (:ntim) 2021-04-02 06:17:25 PDT
http://wpt.live/css/css-logical/reference/logical-values-float-clear-reftest-ref.html

When you open the web inspector, the page changes layout & it looks correct, presumably because the web inspector causes a reflow.

I haven't looked deeply into the cause or what exactly causes this, but here's a smaller testcase:

<style>
.test {
  display: block;
  overflow: hidden;
  width: 300px;
}
.inline {
  display: inline;
}
.float, .clear {
  display: block;
  overflow: hidden;
  height: 3px;
  width: 100px;
  background: #f0f;
}
.clear {
  background: #0ff;
}
</style>
<div class="test" style="direction: ltr;"><div class="inline" style="direction: rtl;"><div class="float" style="direction: ltr; float: left;"></div><div class="clear" style="direction: ltr; clear: right;"></div></div></div>
Comment 1 Tim Nguyen (:ntim) 2021-04-02 06:18:54 PDT
Created attachment 425013 [details]
Before opening web inspector
Comment 2 Tim Nguyen (:ntim) 2021-04-02 06:19:23 PDT
Created attachment 425014 [details]
After opening web inspector (correct result)
Comment 3 zalan 2021-04-02 06:51:56 PDT
Created attachment 425015 [details]
Test reduction
Comment 4 Tim Nguyen (:ntim) 2021-04-02 07:44:48 PDT
I had to disable imported/w3c/web-platform-tests/css/css-logical/logical-values-float-clear-reftest.html in bug 218087 because of this bug.

I linked it here in the TextExpectations file, so it's worth testing again here if it's still broken.
Comment 5 Radar WebKit Bug Importer 2021-04-09 06:18:15 PDT
<rdar://problem/76450146>
Comment 6 Ahmad Saleem 2023-03-17 16:53:20 PDT
This seems to be fixed in STP165 using attached test case from Alan and matching with Chrome Canary 113 and Firefox Nightly 113.

I think we enable test referred by Tim in Comment 04 now.