Add 4 new virtual methods to SelectType
- DidDetachLayoutTree() - DidRecalcStyle() - DidSetSuggestedOption() - PopupDidHide() Move parts of the contents of DetchLayoutTree(), DidRecalcStyle(), SetSuggestedOption(), and PopupDidHide() of HTMLSelectElement to them. We need to call SelectType::DidDetachLayoutTree() in |HTMLSelectElement ::ChangeRendering()| before replacing select_type_. When a SELECT changed its type from MenuList to ListBox, DetachLayoutTree() in this function triggered the popup-disconnecting code after switching to ListBox. After this CL, select_type_->DidDetachLayoutTree() in DetachLayoutTree() doesn't trigger the popup-disconnecting code because select_type_ is a ListBoxSelectType. This CL has no behavior changes. Bug: 1052232 Change-Id: Iaff5691a670bd7570c7c47334f548cc84c4dc0bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2084332Reviewed-by:Koji Ishii <kojii@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#746699}
Showing
Please register or sign in to comment