Bug 77771 - positive and negative flex values are not being cleared on style changes
Summary: positive and negative flex values are not being cleared on style changes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tony Chang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 13:32 PST by Tony Chang
Modified: 2012-02-03 16:10 PST (History)
4 users (show)

See Also:


Attachments
Patch (4.46 KB, patch)
2012-02-03 13:33 PST, Tony Chang
no flags Details | Formatted Diff | Diff
Patch for landing (5.35 KB, patch)
2012-02-03 13:43 PST, 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 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.