[webkit-dev] Question on Inline element

Mustafizur Rahaman mustaf.here at gmail.com
Thu May 12 22:52:34 PDT 2011


Hi All,

I was trying to develop my expertise by looking at some of the open issues &
I was looking intohttps://bugs.webkit.org/show_bug.cgi?id=22764.<https://bugs.webkit.org/show_bug.cgi?id=22764>(Issue
with Windows build). We have done a preliminarily analysis & I want
to get little help so that we can proceed even further.

I have attached the source html & also the snapshot so that we can see the
issue.

The problem is because of the following line <p><img src="feed.png"
alt="RSS" width="17" border="0" height="17" align="left">Subscribe</p>

The paragraph element has all children inline (even though the image is
non-inline, but because it is a float/positioned object so it remains inline
element), as a result while doing the layout for the paragraph element, it
is only doing the layout for inline children.

Following code in RenderBlock::layoutBlock()
    if (childrenInline())
        layoutInlineChildren(relayoutChildren, repaintLogicalTop,
repaintLogicalBottom); ==>Control goes here
    else
        layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom);

And then it goes to RenderBlock::createLineBoxesFromBidiRuns() where it is
only considering all the textual attributes (mainly font height which is 12
pixel), & not considering the image height which is greater than the text
height.

So my question is

   - Can a paragraph element contain an image element=> the html spec does
   not say NO.
   - If we make the image element neither float/nor positioned, it creates
   an anomynous block & everything is rendered properly. But I am not sure
   whether that is the right approach.

Can any one please throw some light here & help us out.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110513/d34c6365/attachment.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110513/d34c6365/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: feed.png
Type: image/png
Size: 689 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110513/d34c6365/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: left_col_box_bcorners.jpg
Type: image/jpeg
Size: 847 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110513/d34c6365/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bugzilla_WebKit_Issue_22764.JPG
Type: image/jpeg
Size: 14770 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110513/d34c6365/attachment.jpe>


More information about the webkit-dev mailing list