Bug 99925

Summary: Setting width of a flexitem causes the adjacent flex item to be displayed poorly.
Product: WebKit Reporter: 侯振宇 <skyking_h>
Component: CSSAssignee: Tony Chang <tony>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, kennyluck, ojan, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 62048    
Attachments:
Description Flags
a test case with a button to show the bug.
none
Patch
none
Patch for landing none

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.