[Webkit-unassigned] [Bug 29241] Hiding a focused element should unfocus it and fire a blur event
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Sep 22 07:33:43 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=29241
--- Comment #27 from Arunprasad Rajkumar <arurajku at cisco.com> 2013-09-22 07:32:45 PST ---
(In reply to comment #25)
> (From update of attachment 212271 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=212271&action=review
>
> >>> Source/WebCore/dom/Document.cpp:4719
> >>> + return;
> >>
> >> This may be sufficient to make the assertion go away, but it’s a fully correct fix. It’s not safe to call setFocusedElement until layout is done, not just for one element, but for the entire render tree.
> >>
> >> Instead, this just checks what the assertion will check, which may seem mechanically correct, but is wrong.
> >
> > it’s *not* a fully correct fix
>
> A correct fix would be something more like this:
>
> if (FrameView* view = this->view()) {
> if (view->needsLayout())
> return;
> }
>
> And also, we have to add code to make sure that this “reset hidden focus element logic” runs when the layout is done.
Yes, already resetHiddenFocusElementSoon() is called(from Document::updateLayout) after finishing the layout.
// Only do a layout if changes have occurred that make it necessary.
if (frameView && renderView() && (frameView->layoutPending() || renderView()->needsLayout()))
**frameView->layout();**
// Active focus element's isFocusable() state may change after Layout. e.g. width: 0px or height: 0px.
**resetHiddenFocusElementSoon();**
--
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