Element focus appearance update should be either immediate or a post-layout task
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 01:17:16 +0000 (01:17 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 01:17:16 +0000 (01:17 +0000)
commitfbb625df25d0b696406a610357e007ac346338cd
tree7980bc33d4984fb8577c1460fa5628a36ef25ac2
parent5f0553afb968459cd63e0ef5aa53889878702323
Element focus appearance update should be either immediate or a post-layout task
https://bugs.webkit.org/show_bug.cgi?id=176193

Reviewed by Antti Koivisto.

This change removes an old mechanism for avoiding element focus appearance updates
while we might be in the middle of attaching a renderer.

Focus appearance updates depend on a clean layout, since they want to be able to
scroll the element into the visible viewport if needed.
We now simply do the updates either immediately after layout in Element::focus(),
or as a post-layout callback when needed for HTMLInputElement::didAttachRenderers().

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::updateFocusAppearanceSoon): Deleted.
(WebCore::Document::cancelFocusAppearanceUpdate): Deleted.
(WebCore::Document::updateFocusAppearanceTimerFired): Deleted.
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::focus):
(WebCore::Element::blur):
(WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
(WebCore::Element::updateFocusAppearanceAfterAttachIfNeeded): Deleted.
(WebCore::Element::cancelFocusAppearanceUpdate): Deleted.
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::needsFocusAppearanceUpdateSoonAfterAttach const): Deleted.
(WebCore::ElementRareData::setNeedsFocusAppearanceUpdateSoonAfterAttach): Deleted.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::didAttachRenderers):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementRareData.h
Source/WebCore/html/HTMLInputElement.cpp