[Webkit-unassigned] [Bug 127835] ASSERTION FAILED: x2 >= x1 in WebCore::RenderObject::drawLineForBoxSide
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 25 09:15:15 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=127835
--- Comment #3 from Darin Adler <darin at apple.com> 2014-03-25 09:15:31 PST ---
(From update of attachment 225650)
View in context: https://bugs.webkit.org/attachment.cgi?id=225650&action=review
> LayoutTests/fast/css/handling-negative-margins.html:12
> + ASSERTION FAILED: x2 >= x1 in WebCore::RenderObject::drawLineForBoxSide</p>
It’s really strange to put this text into the test case. In the future it will be really confusing. There may not even be a function of that name there in future.
A test that simply “passes if it does not crash” is not really so great. I presume that the assertion from before led to incorrect behavior of some sort. I would prefer a test that demonstrates the behavior is correct (also good if it would have triggered the assertion before).
> Source/WebCore/ChangeLog:19
> + * css/CSSParser.cpp:
> + (WebCore::CSSParser::parse4Values):
Why is this listed? I don’t see a change to this function in the patch.
> Source/WebCore/rendering/InlineBox.h:211
> + void setLogicalWidth(float w)
> + {
> + if (w < 0) {
> + m_logicalWidth = -w;
> + m_topLeft.setX(m_topLeft.x() - m_logicalWidth);
> + } else
> + m_logicalWidth = w;
> + }
This code looks OK to me, but I am not sure it’s good to put it inside the setter function itself. The other surrounding functions are simple setters and it seems a bit unusual to do this like this. I think the logic perhaps belongs in a slightly higher level, but really that’s a question for someone who has more knowledge/ownership of the structure of the code to build the line box tree.
Also, as a matter of style, I prefer to put larger multi-line inline function definitions like this one outside the class.
--
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