[webkit-reviews] review granted: [Bug 188711] Wrong resolved value for inset CSS properties when there is overconstraintment : [Attachment 351676] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 8 02:15:12 PDT 2018


Manuel Rego Casasnovas <rego at igalia.com> has granted Oriol Brufau
<obrufau at igalia.com>'s request for review:
Bug 188711: Wrong resolved value for inset CSS properties when there is
overconstraintment
https://bugs.webkit.org/show_bug.cgi?id=188711

Attachment 351676: Patch

https://bugs.webkit.org/attachment.cgi?id=351676&action=review




--- Comment #29 from Manuel Rego Casasnovas <rego at igalia.com> ---
Comment on attachment 351676
  --> https://bugs.webkit.org/attachment.cgi?id=351676
Patch

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

LGTM with nits.

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:791
> +	       if (box.isOutOfFlowPositioned())
> +		   containingBlockSize =
box.containingBlockLogicalHeightForPositioned(*containingBlock, false);
> +	       else
> +		   containingBlockSize =
box.containingBlockLogicalHeightForContent(ExcludeMarginBorderPadding);

I'd use a ternary operator here:
  containingBlockSize = box.isOutOfFlowPositioned() ?
      box.containingBlockLogicalHeightForPositioned(*containingBlock, false) :
      box.containingBlockLogicalHeightForContent(ExcludeMarginBorderPadding);

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:796
> +	       if (box.isOutOfFlowPositioned())
> +		   containingBlockSize =
box.containingBlockLogicalWidthForPositioned(*containingBlock, nullptr, false);
> +	       else
> +		   containingBlockSize =
box.containingBlockLogicalWidthForContent();

Ditto.


More information about the webkit-reviews mailing list