[webkit-reviews] review denied: [Bug 108168] Implement the -webkit-margin-collapse properties correct rendering : [Attachment 186401] WIP v2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 4 13:45:57 PST 2013


Dave Hyatt <hyatt at apple.com> has denied Andrei Bucur <abucur at adobe.com>'s
request for review:
Bug 108168: Implement the -webkit-margin-collapse properties correct rendering
https://bugs.webkit.org/show_bug.cgi?id=108168

Attachment 186401: WIP v2
https://bugs.webkit.org/attachment.cgi?id=186401&action=review

------- Additional Comments from Dave Hyatt <hyatt at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=186401&action=review


r-

> Source/WebCore/rendering/RenderBlock.cpp:1966
> +    childDiscardMarginBefore = childDiscardMarginBefore ||
(childDiscardMarginAfter && child->isSelfCollapsingBlock());

I would store child->isSelfCollapsingBlock() in a local so that you don't have
to call it multiple times.

> Source/WebCore/rendering/RenderBlock.cpp:2051
> +	   // FIXME: Take writing direction into account for SEPARATE.
>	   if (child->style()->marginBeforeCollapse() == MSEPARATE) {

Good observation. Go ahead and fix it! Just need helper methods....
mustSeparateMarginBeforeForChild... etc.

> Source/WebCore/rendering/RenderBlock.cpp:-2423
> -    // Do not allow a collapse if the margin-before-collapse style is set to
SEPARATE.
> -    RenderStyle* childStyle = child->style();
> -    if (childStyle->marginBeforeCollapse() == MSEPARATE) {
> -	   marginInfo.setAtBeforeSideOfBlock(false);
> -	   marginInfo.clearMargin();
> -    }

Where did this code go?

> Source/WebCore/rendering/RenderBlock.h:474
> +	       // FIXME: This function doesn't get called for table cells. Does
it matter?

It doesn't matter.


More information about the webkit-reviews mailing list