зеркало из https://github.com/mozilla/gecko-dev.git
Turning on XP menus.
This commit is contained in:
Родитель
1048e1ff54
Коммит
8b79ce996e
|
@ -66,8 +66,11 @@ XUL_ATOM(treepusher, "treepusher") // A column pusher (left or right) for the tr
|
|||
XUL_ATOM(menuitem, "menuitem") // The menu element
|
||||
XUL_ATOM(menubar, "menubar") // The menubar element
|
||||
XUL_ATOM(menu, "menu") // A single menu item
|
||||
XUL_ATOM(menubutton, "menubutton") // A button inside an XP menu.
|
||||
XUL_ATOM(menuchildren, "menuchildren") // The menu's children.
|
||||
|
||||
XUL_ATOM(xpmenubar, "xpmenubar") // An XP menu bar.
|
||||
XUL_ATOM(xpmenu, "xpmenu") // Represents an XP menu
|
||||
XUL_ATOM(xpmenubutton, "xpmenubutton") // A titled button (with improved behavior) inside an XP menu.
|
||||
XUL_ATOM(xpmenuchildren, "xpmenuchildren") // The XP menu's children.
|
||||
|
||||
XUL_ATOM(progressmeter, "progressmeter")
|
||||
XUL_ATOM(titledbutton, "titledbutton")
|
||||
|
|
|
@ -1816,10 +1816,9 @@ nsCSSFrameConstructor::TableIsValidCellContent(nsIPresContext* aPresContext,
|
|||
(nsXULAtoms::treecolgroup == tag.get()) ||
|
||||
(nsXULAtoms::treefoot == tag.get()) ||
|
||||
(nsXULAtoms::treepusher == tag.get()) ||
|
||||
(nsXULAtoms::menu == tag.get()) ||
|
||||
(nsXULAtoms::menuitem == tag.get()) ||
|
||||
(nsXULAtoms::menubar == tag.get()) ||
|
||||
(nsXULAtoms::menubutton == tag.get()) ||
|
||||
(nsXULAtoms::xpmenu == tag.get()) ||
|
||||
(nsXULAtoms::xpmenubar == tag.get()) ||
|
||||
(nsXULAtoms::xpmenubutton == tag.get()) ||
|
||||
(nsXULAtoms::toolbox == tag.get()) ||
|
||||
(nsXULAtoms::toolbar == tag.get()) ||
|
||||
(nsXULAtoms::toolbaritem == tag.get()) ||
|
||||
|
@ -2765,7 +2764,8 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresContext* aPresConte
|
|||
aTag != nsHTMLAtoms::combobox &&
|
||||
aTag != nsXULAtoms::slider &&
|
||||
aTag != nsXULAtoms::splitter &&
|
||||
aTag != nsXULAtoms::scrollbar
|
||||
aTag != nsXULAtoms::scrollbar &&
|
||||
aTag != nsXULAtoms::xpmenu
|
||||
) {
|
||||
return NS_OK;
|
||||
|
||||
|
@ -3017,28 +3017,26 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresContext* aPresContext,
|
|||
}
|
||||
// End of PROGRESS METER CONSTRUCTION logic
|
||||
|
||||
#ifdef XP_MENUS
|
||||
// Menu Construction
|
||||
else if (aTag == nsXULAtoms::menu || aTag == nsXULAtoms::menuitem) {
|
||||
else if (aTag == nsXULAtoms::xpmenu) {
|
||||
// XXX Will eventually make a derived class box frame
|
||||
// that has custom reflow to prevent menuchildren
|
||||
// that has custom reflow to prevent menu children
|
||||
// from becoming part of the flow.
|
||||
processChildren = PR_TRUE; // Will need this to be custom.
|
||||
isReplaced = PR_TRUE;
|
||||
rv = NS_NewBoxFrame(&newFrame);
|
||||
}
|
||||
else if (aTag == nsXULAtoms::menubar) {
|
||||
else if (aTag == nsXULAtoms::xpmenubar) {
|
||||
// XXX Will be a derived class toolbar frame.
|
||||
processChildren = PR_TRUE;
|
||||
rv = NS_NewToolbarFrame(&newFrame);
|
||||
}
|
||||
else if (aTag == nsXULAtoms::menubutton) {
|
||||
else if (aTag == nsXULAtoms::xpmenubutton) {
|
||||
// XXX Will be a derived class titledbutton frame
|
||||
processChildren = PR_TRUE;
|
||||
isReplaced = PR_TRUE;
|
||||
rv = NS_NewTitledButtonFrame(&newFrame);
|
||||
}
|
||||
#endif // XP_MENUS
|
||||
|
||||
// BOX CONSTRUCTION
|
||||
else if (aTag == nsXULAtoms::box || aTag == nsXULAtoms::tabbox ||
|
||||
|
|
|
@ -1816,10 +1816,9 @@ nsCSSFrameConstructor::TableIsValidCellContent(nsIPresContext* aPresContext,
|
|||
(nsXULAtoms::treecolgroup == tag.get()) ||
|
||||
(nsXULAtoms::treefoot == tag.get()) ||
|
||||
(nsXULAtoms::treepusher == tag.get()) ||
|
||||
(nsXULAtoms::menu == tag.get()) ||
|
||||
(nsXULAtoms::menuitem == tag.get()) ||
|
||||
(nsXULAtoms::menubar == tag.get()) ||
|
||||
(nsXULAtoms::menubutton == tag.get()) ||
|
||||
(nsXULAtoms::xpmenu == tag.get()) ||
|
||||
(nsXULAtoms::xpmenubar == tag.get()) ||
|
||||
(nsXULAtoms::xpmenubutton == tag.get()) ||
|
||||
(nsXULAtoms::toolbox == tag.get()) ||
|
||||
(nsXULAtoms::toolbar == tag.get()) ||
|
||||
(nsXULAtoms::toolbaritem == tag.get()) ||
|
||||
|
@ -2765,7 +2764,8 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresContext* aPresConte
|
|||
aTag != nsHTMLAtoms::combobox &&
|
||||
aTag != nsXULAtoms::slider &&
|
||||
aTag != nsXULAtoms::splitter &&
|
||||
aTag != nsXULAtoms::scrollbar
|
||||
aTag != nsXULAtoms::scrollbar &&
|
||||
aTag != nsXULAtoms::xpmenu
|
||||
) {
|
||||
return NS_OK;
|
||||
|
||||
|
@ -3017,28 +3017,26 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresContext* aPresContext,
|
|||
}
|
||||
// End of PROGRESS METER CONSTRUCTION logic
|
||||
|
||||
#ifdef XP_MENUS
|
||||
// Menu Construction
|
||||
else if (aTag == nsXULAtoms::menu || aTag == nsXULAtoms::menuitem) {
|
||||
else if (aTag == nsXULAtoms::xpmenu) {
|
||||
// XXX Will eventually make a derived class box frame
|
||||
// that has custom reflow to prevent menuchildren
|
||||
// that has custom reflow to prevent menu children
|
||||
// from becoming part of the flow.
|
||||
processChildren = PR_TRUE; // Will need this to be custom.
|
||||
isReplaced = PR_TRUE;
|
||||
rv = NS_NewBoxFrame(&newFrame);
|
||||
}
|
||||
else if (aTag == nsXULAtoms::menubar) {
|
||||
else if (aTag == nsXULAtoms::xpmenubar) {
|
||||
// XXX Will be a derived class toolbar frame.
|
||||
processChildren = PR_TRUE;
|
||||
rv = NS_NewToolbarFrame(&newFrame);
|
||||
}
|
||||
else if (aTag == nsXULAtoms::menubutton) {
|
||||
else if (aTag == nsXULAtoms::xpmenubutton) {
|
||||
// XXX Will be a derived class titledbutton frame
|
||||
processChildren = PR_TRUE;
|
||||
isReplaced = PR_TRUE;
|
||||
rv = NS_NewTitledButtonFrame(&newFrame);
|
||||
}
|
||||
#endif // XP_MENUS
|
||||
|
||||
// BOX CONSTRUCTION
|
||||
else if (aTag == nsXULAtoms::box || aTag == nsXULAtoms::tabbox ||
|
||||
|
|
|
@ -66,8 +66,11 @@ XUL_ATOM(treepusher, "treepusher") // A column pusher (left or right) for the tr
|
|||
XUL_ATOM(menuitem, "menuitem") // The menu element
|
||||
XUL_ATOM(menubar, "menubar") // The menubar element
|
||||
XUL_ATOM(menu, "menu") // A single menu item
|
||||
XUL_ATOM(menubutton, "menubutton") // A button inside an XP menu.
|
||||
XUL_ATOM(menuchildren, "menuchildren") // The menu's children.
|
||||
|
||||
XUL_ATOM(xpmenubar, "xpmenubar") // An XP menu bar.
|
||||
XUL_ATOM(xpmenu, "xpmenu") // Represents an XP menu
|
||||
XUL_ATOM(xpmenubutton, "xpmenubutton") // A titled button (with improved behavior) inside an XP menu.
|
||||
XUL_ATOM(xpmenuchildren, "xpmenuchildren") // The XP menu's children.
|
||||
|
||||
XUL_ATOM(progressmeter, "progressmeter")
|
||||
XUL_ATOM(titledbutton, "titledbutton")
|
||||
|
|
Загрузка…
Ссылка в новой задаче