зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1637459 - Make nsXULElement::HasMenu flush frames. r=tnikkel
The UITour code assumes that it will return the up-to-date value, which doesn't happen with lazy frame construction. This is used sparingly in the front end code, so it doesn't quite warrant more optimization. Differential Revision: https://phabricator.services.mozilla.com/D75710
This commit is contained in:
Родитель
583e647fb1
Коммит
78e77439c9
|
@ -429,8 +429,8 @@ int32_t nsXULElement::ScreenY() {
|
|||
}
|
||||
|
||||
bool nsXULElement::HasMenu() {
|
||||
nsMenuFrame* menu = do_QueryFrame(GetPrimaryFrame());
|
||||
return menu != nullptr;
|
||||
nsMenuFrame* menu = do_QueryFrame(GetPrimaryFrame(FlushType::Frames));
|
||||
return !!menu;
|
||||
}
|
||||
|
||||
void nsXULElement::OpenMenu(bool aOpenFlag) {
|
||||
|
|
|
@ -340,7 +340,7 @@ class nsXULElement : public nsStyledElement {
|
|||
MOZ_CAN_RUN_SCRIPT int32_t ScreenX();
|
||||
MOZ_CAN_RUN_SCRIPT int32_t ScreenY();
|
||||
|
||||
bool HasMenu();
|
||||
MOZ_CAN_RUN_SCRIPT bool HasMenu();
|
||||
MOZ_CAN_RUN_SCRIPT void OpenMenu(bool aOpenFlag);
|
||||
|
||||
virtual bool PerformAccesskey(bool aKeyCausesActivation,
|
||||
|
|
Загрузка…
Ссылка в новой задаче