Bug 224104 - Incorrect initial reflow when inline parent has horizontal direction flip
Summary: Incorrect initial reflow when inline parent has horizontal direction flip
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-02 06:17 PDT by Tim Nguyen (:ntim)
Modified: 2023-03-18 06:04 PDT (History)
5 users (show)

See Also:


Attachments
Before opening web inspector (22.61 KB, image/png)
2021-04-02 06:18 PDT, Tim Nguyen (:ntim)
no flags Details
After opening web inspector (correct result) (22.29 KB, image/png)
2021-04-02 06:19 PDT, Tim Nguyen (:ntim)
no flags Details
Test reduction (315 bytes, text/html)
2021-04-02 06:51 PDT, zalan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.