[webkit-reviews] review granted: [Bug 77771] positive and negative flex values are not being cleared on style changes : [Attachment 125397] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 3 13:39:59 PST 2012


Ojan Vafai <ojan at chromium.org> has granted Tony Chang <tony at chromium.org>'s
request for review:
Bug 77771: positive and negative flex values are not being cleared on style
changes
https://bugs.webkit.org/show_bug.cgi?id=77771

Attachment 125397: Patch
https://bugs.webkit.org/attachment.cgi?id=125397&action=review

------- Additional Comments from Ojan Vafai <ojan at chromium.org>
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) {
  ...
}


More information about the webkit-reviews mailing list