Bug 99925 - Setting width of a flexitem causes the adjacent flex item to be displayed poorly.
Summary: Setting width of a flexitem causes the adjacent flex item to be displayed poo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Tony Chang
URL:
Keywords:
Depends on:
Blocks: 62048
  Show dependency treegraph
 
Reported: 2012-10-21 02:28 PDT by 侯振宇
Modified: 2012-10-24 13:47 PDT (History)
5 users (show)

See Also:


Attachments
a test case with a button to show the bug. (1.56 KB, text/html)
2012-10-21 02:28 PDT, 侯振宇
no flags Details
Patch (8.54 KB, patch)
2012-10-24 11:02 PDT, Tony Chang
no flags Details | Formatted Diff | Diff
Patch for landing (8.76 KB, patch)
2012-10-24 13:11 PDT, Tony Chang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 侯振宇 2012-10-21 02:28:02 PDT
Created attachment 169790 [details]
a test case with a button to show the bug.

当有多个并列的flex item元素时,使用定时脚本在DOM完全渲染之后再改变一个flex item的宽度,会导致相邻的flex item显示不正常。

Steps to reproduce:

1. Open the attachement.
2. Click button.
Comment 1 Kang-Hao (Kenny) Lu 2012-10-22 22:08:52 PDT
(In reply to comment #0)
> Created an attachment (id=169790) [details]
> a test case with a button to show the bug.
> 
> 当有多个并列的flex item元素时,使用定时脚本在DOM完全渲染之后再改变一个flex item的宽度,会导致相邻的flex item显示不正常。

Translation: For multiple flex items laid out horizontally, when you change the width of a flex item via JS, adjacent flex items get displayed poorly.
Comment 2 Ojan Vafai 2012-10-22 22:37:59 PDT
Looks like a repaint bug.
Comment 3 Tony Chang 2012-10-24 11:02:13 PDT
Created attachment 170431 [details]
Patch
Comment 4 Ojan Vafai 2012-10-24 12:03:57 PDT
Comment on attachment 170431 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=170431&action=review

> Source/WebCore/rendering/RenderFlexibleBox.cpp:672
> +    // If the child moved, we have to repaint it as well as any floating/positioned
> +    // descendants. An exception is if we need a layout. In this case, we know we're going to

Maybe add a FIXME that we sometimes overpaint in cases where we flip positions (e.g. for rtl column)?
Comment 5 Tony Chang 2012-10-24 13:11:35 PDT
Created attachment 170457 [details]
Patch for landing
Comment 6 WebKit Review Bot 2012-10-24 13:46:58 PDT
Comment on attachment 170457 [details]
Patch for landing

Clearing flags on attachment: 170457

Committed r132395: <http://trac.webkit.org/changeset/132395>
Comment 7 WebKit Review Bot 2012-10-24 13:47:02 PDT
All reviewed patches have been landed.  Closing bug.