Bug 77771

Summary: positive and negative flex values are not being cleared on style changes
Product: WebKit Reporter: Tony Chang <tony>
Component: New BugsAssignee: Tony Chang <tony>
Status: RESOLVED FIXED    
Severity: Normal CC: macpherson, menard, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Tony Chang 2012-02-03 13:32:11 PST
positive and negative flex values are not being cleared on style changes
Comment 1 Tony Chang 2012-02-03 13:33:27 PST
Created attachment 125397 [details]
Patch
Comment 2 Ojan Vafai 2012-02-03 13:40:00 PST
Comment on attachment 125397 [details]
Patch

How about writing this as:

float positiveFlex = 0;
float negativeFlex = 0;
if (!value->isPrimitiveValue()) {
    if (!flexDirection || !value->isFlexValue())
        return;

    CSSFlexValue* flexValue = static_cast<CSSFlexValue*>(value);
    value = flexValue->preferredSize();
    positiveFlex = flexValue->positiveFlex();
    negativeFlex = flexValue->negativeFlex();
}

if (flexDirection == FlexWidth) {
  ...
} else if (flexDirection == FlexHeight) {
  ...
}
Comment 3 Tony Chang 2012-02-03 13:43:00 PST
Created attachment 125402 [details]
Patch for landing
Comment 4 WebKit Review Bot 2012-02-03 16:10:35 PST
Comment on attachment 125402 [details]
Patch for landing

Clearing flags on attachment: 125402

Committed r106704: <http://trac.webkit.org/changeset/106704>
Comment 5 WebKit Review Bot 2012-02-03 16:10:40 PST
All reviewed patches have been landed.  Closing bug.