Backed out changeset 7f9e50bfaad1 (bug 1525101) for Mochitest failures in toolkit/content/tests/chrome/test_menulist_paging.xul

This commit is contained in:
Dorel Luca 2019-02-12 18:42:00 +02:00
Родитель 92656e7b34
Коммит 7f2c94d3da
3 изменённых файлов: 14 добавлений и 6 удалений

Просмотреть файл

@ -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);
}