| Index: third_party/WebKit/Source/web/ExternalPopupMenu.cpp
|
| diff --git a/third_party/WebKit/Source/web/ExternalPopupMenu.cpp b/third_party/WebKit/Source/web/ExternalPopupMenu.cpp
|
| index 32b217e9cf6e0236efb2c97f96220a4d275b86ac..218c1cb67121e3a4f77a4cdc333eb569e9a3028d 100644
|
| --- a/third_party/WebKit/Source/web/ExternalPopupMenu.cpp
|
| +++ b/third_party/WebKit/Source/web/ExternalPopupMenu.cpp
|
| @@ -95,10 +95,7 @@ bool ExternalPopupMenu::showInternal()
|
| FloatQuad quad(toLayoutBox(layoutObject)->localToAbsoluteQuad(FloatQuad(toLayoutBox(layoutObject)->borderBoundingBox())));
|
| IntRect rect(quad.enclosingBoundingBox());
|
| IntRect rectInViewport = m_localFrame->view()->soonToBeRemovedContentsToUnscaledViewport(rect);
|
| - // TODO(tkent): If the anchor rectangle is not visible, we should not
|
| - // show a popup.
|
| m_webExternalPopupMenu->show(rectInViewport);
|
| - m_shownDOMTreeVersion = m_ownerElement->document().domTreeVersion();
|
| return true;
|
| } else {
|
| // The client might refuse to create a popup (when there is already one pending to be shown for example).
|
| @@ -144,12 +141,14 @@ void ExternalPopupMenu::hide()
|
|
|
| void ExternalPopupMenu::updateFromElement()
|
| {
|
| - if (m_needsUpdate)
|
| - return;
|
| - // TOOD(tkent): Even if DOMTreeVersion is not changed, we should update the
|
| + // TOOD(tkent): Even if DOM mutation didn't happen, we should update the
|
| // popup location/content in some cases. e.g. Updating ComputedStyle of the
|
| // SELECT element affects popup position and OPTION style.
|
| - if (m_shownDOMTreeVersion == m_ownerElement->document().domTreeVersion())
|
| +}
|
| +
|
| +void ExternalPopupMenu::updateFromElementWithMutation()
|
| +{
|
| + if (m_needsUpdate)
|
| return;
|
| m_needsUpdate = true;
|
| m_ownerElement->document().postTask(BLINK_FROM_HERE, createSameThreadTask(&ExternalPopupMenu::update, this));
|
|
|