[Webkit-unassigned] [Bug 127835] ASSERTION FAILED: x2 >= x1 in WebCore::RenderObject::drawLineForBoxSide

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 27 12:45:19 PDT 2014


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





--- Comment #4 from Martin Hodovan <hodovanmartin at gmail.com>  2014-03-27 12:45:36 PST ---
(In reply to comment #3)
> (From update of attachment 225650 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=225650&action=review
>
> A test that simply “passes if it does not crash” is not really so great.

What basically happens is that the smaller we set the right margin, the shorter the top and bottom
borderlines get, which are represented by rectangles. The length (or logical width) of a rectangle
can even go under zero, so that the rectangle 'turns a somersault'. It means that the former right
side of this 'rectangle-borderline' will be the left side now, and its former upper-left point becomes
the upper-right point.
My patch relocates this point to make it the upper-left point again and turns the negative length
into positive. Same thing applies to the left margin.
The output is a thin orange column (the content box) and a thick black column (the fake borders)
that is slipped to the left and then the right side of the content. The black column actually consists of
a top, a bottom, a left and a right 'rectangle-borderline', but they are overlapped. I don't think that
a prettier test can be made to demonstrate this issue, but this is the correct behavior here.

> This code looks OK to me, but I am not sure it’s good to put it inside the setter function itself.

The function setLogicalWidth is used over 20 different files throughout the project, and the width
of any InlineBox object (including its descendant classes) can only be set by using this setter
function, so I don't think this issue can be handled at a higher level. I made a small change to
the InlineBox constructor, so that the width can not be set to a negative value here either.

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