[webkit-reviews] review denied: [Bug 39315] selections in margins wrong with div followed by a span : [Attachment 57730] I have to push this bug by committing a patch. :)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 8 17:32:09 PDT 2010


Ojan Vafai <ojan at chromium.org> has denied Robin Qiu
<robin.qiu at torchmobile.com.cn>'s request for review:
Bug 39315: selections in margins wrong with div followed by a span
https://bugs.webkit.org/show_bug.cgi?id=39315

Attachment 57730: I have to push this bug by committing a patch. :)
https://bugs.webkit.org/attachment.cgi?id=57730&action=review

------- Additional Comments from Ojan Vafai <ojan at chromium.org>
(In reply to comment #2)
> It seems that FF use half of the margin as the boundary of this two elements.

> Should I change this code 
> if (isChildHitTestCandidate(childBox) && contentsY <
childBox->frameRect().bottom())
> to 
> if (isChildHitTestCandidate(childBox) && contentsY <
childBox->frameRect().bottom() +  childBox->maxBottomMargin(true) / 2)
> ?

How does this fix the bug? Doesn't a similar bug still happen? Instead of
happening immediately after the div in the test case, it happens halfway
through the margin of the div in the test case. In other words, when you select
past the half-way point, but still above the last line, the last line gets
selected and it shouldn't. Am I wrong? Does this patch fix that case?

> Is there any specification defines this?

There is not a specification for this. It is up to the user-agent. We've tried
to match IE/FF where it makes sense to avoid making an arbitrarily different
decision for no reason and to match general user-expectations (that assumes
users are used to the IE/FF behavior). It's not clear to me whether we should
match Firefox here or not, but in either case, it's a separate bug.


More information about the webkit-reviews mailing list