[Webkit-unassigned] [Bug 45274] Breaking Float: floated block level element following inline element in floated container breaks to next line

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 22 10:37:26 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=45274





--- Comment #28 from ChangSeok Oh <kevin.cs.oh at gmail.com>  2011-05-22 10:37:26 PST ---
(From update of attachment 91643)
View in context: https://bugs.webkit.org/attachment.cgi?id=91643&action=review

Thank for review. And I so sorry for late response.

>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:1568
>> +    bool floatFitsOnLine(float extra) const { return currentWidth() - additionalWidth() + extra <= m_availableWidth; }
> 
> Is it not sufficient to just ignore the uncommitted width here?  It seems like you're basically doing committed + uncommitted - uncommitted + extra, which works out to just being committed + extra.

No. Actually it could be a little different if there are two more white spaces between blocks.
When we encounter first white space, (let's suppose committed = 70, uncommitted = 5.) the final result is 70 + extra (70 + 5 - 5 + extra).
But when we encounter second white space,  the final result will be 75 + extra.  Because ucommitted '5' is submitted & included in committed. (75 + 0 - 0 + extra)
After this we can't get what was last additionalWidth(uncommitted), so that I want that m_additionalWidth holds this value.

>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:1569
>>      float currentWidth() const { return m_committedWidth + m_uncommittedWidth; }
> 
> Nit: I don't see why additional width should be associated with floats.

Becuase extra space(additional width) cause that float doesn't fit to line. Even though Float width is exactly same with remained line width.

>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:2119
>> +                width.setAdditionalWidth(additionalTmpW);
> 
> It seems wrong not to include inlineLogicalWidth here.  You might want to make a test for this case.  You should be able to just add it to additionalTmpW I would think.

Done.
But I haven't found problem case. inlineLogicalWidth is almost 0.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list