[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
Fri Feb 8 13:04:24 PST 2013


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





--- Comment #69 from ChangSeok Oh <kevin.cs.oh at gmail.com>  2013-02-08 13:06:31 PST ---
(From update of attachment 151457)
View in context: https://bugs.webkit.org/attachment.cgi?id=151457&action=review

Thank you for your kind review! I hope this bug would be fixed in this iteration :)

>> Source/WebCore/ChangeLog:8
>> +        Fix position issue of floating div element in floating div element.
> 
> Nit: "div" doesn't actually add any information here. This would apply to any tag :)

Removed 'div'

>> Source/WebCore/ChangeLog:10
>> +        even though previous line has spaces enough to fit it.
> 
> I can't follow this sentence.

I believe the simple test attached in this bug will help you. :)

>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:81
>> +    bool floatFitsOnLine(float extra) const { return currentWidth() - whitespaceWidth() + extra <= m_availableWidth; }
> 
> I think I would prefer this:
> 
> bool fitsOnLine(float extra, LineFittingCheck includeWhitespace = IncludeTrailingWhitespace) const { return currentWidth() - (includeWhitespace ? trailingWhitespaceWidth() : 0) + extra <= m_availableWidth; }

Done.

>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:88
>> +    float whitespaceWidth() const { return m_whitespaceWidth; }
> 
> float trailingWhitespaceWidth() const { return m_trailingWhitespaceWidth; }

Done.

>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:100
>> +    void setWhitespaceWidth(float width) { m_whitespaceWidth = width; }
> 
> void setTrailingWhitespaceWidth(float width) { m_trailingWhitespaceWidth = width; }

Done.

>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:113
>> +    float m_whitespaceWidth;
> 
> float m_trailingWhitespaceWidth;

Done.

>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:2248
>> +            if (floatsFitOnLine && width.floatFitsOnLine(m_block->logicalWidthForFloat(f))) {
> 
> if (floatsFitOnLine && width.floatFitsOnLine(m_block->logicalWidthForFloat(f), ExcludeTrailingWhitespace)) {

Done.

>> Source/WebCore/rendering/RenderBlockLineLayout.cpp:2423
>> +                        width.setWhitespaceWidth(additionalTempWidth);
> 
> width.setTrailingWhitespaceWidth(additionalTempWidth);

Done.

-- 
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