Bug 46304

Summary: display:inline should become display:inline-block when an object's block flow does not match its parent's
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: CSSAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 46123    
Attachments:
Description Flags
Patch
none
Patch
mitz: review+
Patch mitz: review+

Description Dave Hyatt 2010-09-22 13:57:03 PDT
The writing mode spec says that a display:inline child with different block-flow than its parent becomes an inline-block.
Comment 1 Dave Hyatt 2010-09-22 14:03:43 PDT
Created attachment 68437 [details]
Patch
Comment 2 mitz 2010-09-22 14:11:26 PDT
Comment on attachment 68437 [details]
Patch

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

> WebCore/css/CSSStyleSelector.cpp:1565
> +    adjustRenderStyle(style(), parentStyle, 0);

I think you want the renderer’s parent’s style() here, not parentStyle, which is just the style to inherit from.

> WebCore/css/CSSStyleSelector.cpp:1719
> +        if (style->display() == INLINE && style->blockFlow() != parentStyle->blockFlow())

I think parentStyle can be 0.
Comment 3 Dave Hyatt 2010-09-22 14:15:55 PDT
Created attachment 68438 [details]
Patch
Comment 4 mitz 2010-09-22 14:28:08 PDT
Comment on attachment 68438 [details]
Patch

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

> LayoutTests/fast/blockflow/display-mutation.html:20
>  \ No newline at end of file

Please fix.
Comment 5 Dave Hyatt 2010-09-22 14:31:38 PDT
Created attachment 68443 [details]
Patch
Comment 6 mitz 2010-09-22 14:32:57 PDT
Comment on attachment 68443 [details]
Patch

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

> LayoutTests/fast/blockflow/display-mutation.html:20
>  \ No newline at end of file

Please fix!!!1
Comment 7 Dave Hyatt 2010-09-22 14:35:00 PDT
(In reply to comment #6)
> (From update of attachment 68443 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=68443&action=review
> 
> > LayoutTests/fast/blockflow/display-mutation.html:20
> >  \ No newline at end of file
> 
> Please fix!!!1

Ok!!!
Comment 8 Dave Hyatt 2010-09-22 15:11:58 PDT
Fixed.