зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 7f9e50bfaad1 (bug 1525101) for Mochitest failures in toolkit/content/tests/chrome/test_menulist_paging.xul
This commit is contained in:
Родитель
92656e7b34
Коммит
7f2c94d3da
|
@ -58,7 +58,6 @@
|
|||
|
||||
using namespace mozilla;
|
||||
using mozilla::dom::Event;
|
||||
using mozilla::dom::Document;
|
||||
using mozilla::dom::KeyboardEvent;
|
||||
|
||||
int8_t nsMenuPopupFrame::sDefaultLevelIsTop = -1;
|
||||
|
@ -392,6 +391,15 @@ void nsXULPopupShownEvent::CancelListener() {
|
|||
NS_IMPL_ISUPPORTS_INHERITED(nsXULPopupShownEvent, Runnable,
|
||||
nsIDOMEventListener);
|
||||
|
||||
void nsMenuPopupFrame::SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList) {
|
||||
// unless the list is empty, indicate that children have been generated.
|
||||
if (aListID == kPrincipalList && aChildList.NotEmpty()) {
|
||||
mGeneratedChildren = true;
|
||||
}
|
||||
nsBoxFrame::SetInitialChildList(aListID, aChildList);
|
||||
}
|
||||
|
||||
bool nsMenuPopupFrame::IsLeafDynamic() const {
|
||||
if (mGeneratedChildren) return false;
|
||||
|
||||
|
|
|
@ -247,6 +247,9 @@ class nsMenuPopupFrame final : public nsBoxFrame,
|
|||
nsresult CreateWidgetForView(nsView* aView);
|
||||
uint8_t GetShadowStyle();
|
||||
|
||||
virtual void SetInitialChildList(ChildListID aListID,
|
||||
nsFrameList& aChildList) override;
|
||||
|
||||
virtual bool IsLeafDynamic() const override;
|
||||
|
||||
virtual void UpdateWidgetProperties() override;
|
||||
|
|
|
@ -1284,11 +1284,8 @@ void nsXULPopupManager::FirePopupShowingEvent(nsIContent* aPopup,
|
|||
nsPopupType popupType = popupFrame->PopupType();
|
||||
|
||||
// generate the child frames if they have not already been generated
|
||||
const bool generateFrames = popupFrame->IsLeaf();
|
||||
MOZ_ASSERT_IF(generateFrames, !popupFrame->HasGeneratedChildren());
|
||||
popupFrame->SetGeneratedChildren();
|
||||
if (generateFrames) {
|
||||
MOZ_ASSERT(popupFrame->PrincipalChildList().IsEmpty());
|
||||
if (!popupFrame->HasGeneratedChildren()) {
|
||||
popupFrame->SetGeneratedChildren();
|
||||
presShell->FrameConstructor()->GenerateChildFrames(popupFrame);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче