[Webkit-unassigned] [Bug 175016] getClientRects doesn't work with list box option elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 1 10:02:55 PDT 2017


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

--- Comment #12 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to zalan from comment #9)
> Comment on attachment 316844 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=316844&action=review
> 
> >>> Source/WebCore/dom/Element.cpp:1154
> >>> +    if (is<HTMLOptionElement>(*this) || is<HTMLOptGroupElement>(*this)) {
> >> 
> >> This kind of thing is really unfortunate for long term maintainability of our code. But we do have a lot of code like this. We could consider a more traditional solution where we use virtual functions instead of sprinkling type-specific checks into base classes.
> > 
> > hmm, maybe we can add a virtual absoluteQuads() to Node? or Element? The default implementation would simply use RenderBoxModelObject::absoluteQuads() and elements not having a renderer would implement it too.
> 
> What do you mean by elements not having renderer would implement it too?
> What would they return? -elements with no renderers don't compute client
> rects.

What this patch is doing :-) HTMLOption and HTMLOptGroup don't have a renderer, but it's possible to use its select element to get their bounding boxes. So, those elements would override absoluteQuads(). I don't know if there are more cases like this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170801/3632a325/attachment-0001.html>


More information about the webkit-unassigned mailing list