зеркало из https://github.com/mozilla/gecko-dev.git
Added pseudo style for 'page' element
This commit is contained in:
Родитель
5af04a07ba
Коммит
b236facd7f
|
@ -61,6 +61,7 @@ public:
|
|||
static nsIAtom* commentTagName;
|
||||
static nsIAtom* textTagName;
|
||||
static nsIAtom* viewportPseudo;
|
||||
static nsIAtom* pagePseudo;
|
||||
|
||||
// Alphabetical list of frame types
|
||||
static nsIAtom* areaFrame;
|
||||
|
|
|
@ -47,6 +47,7 @@ nsIAtom* nsLayoutAtoms::floaterList;
|
|||
nsIAtom* nsLayoutAtoms::commentTagName;
|
||||
nsIAtom* nsLayoutAtoms::textTagName;
|
||||
nsIAtom* nsLayoutAtoms::viewportPseudo;
|
||||
nsIAtom* nsLayoutAtoms::pagePseudo;
|
||||
|
||||
// frame types
|
||||
nsIAtom* nsLayoutAtoms::areaFrame;
|
||||
|
@ -84,6 +85,7 @@ void nsLayoutAtoms::AddrefAtoms()
|
|||
commentTagName = NS_NewAtom("__moz_comment");
|
||||
textTagName = NS_NewAtom("__moz_text");
|
||||
viewportPseudo = NS_NewAtom(":-moz-viewport");
|
||||
pagePseudo = NS_NewAtom(":-moz-page");
|
||||
|
||||
areaFrame = NS_NewAtom("AreaFrame");
|
||||
pageFrame = NS_NewAtom("PageFrame");
|
||||
|
@ -122,6 +124,7 @@ void nsLayoutAtoms::ReleaseAtoms()
|
|||
NS_RELEASE(commentTagName);
|
||||
NS_RELEASE(textTagName);
|
||||
NS_RELEASE(viewportPseudo);
|
||||
NS_RELEASE(pagePseudo);
|
||||
|
||||
NS_RELEASE(areaFrame);
|
||||
NS_RELEASE(pageFrame);
|
||||
|
|
|
@ -1411,9 +1411,15 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresContext* aPresContext,
|
|||
// Initialize the page and force it to have a view. This makes printing of
|
||||
// the pages easier and faster.
|
||||
// XXX Use a PAGE style context...
|
||||
pageFrame->Init(*aPresContext, nsnull, pageSequenceFrame, viewportPseudoStyle);
|
||||
nsCOMPtr<nsIStyleContext> pagePseudoStyle;
|
||||
|
||||
aPresContext->ResolvePseudoStyleContextFor(nsnull, nsLayoutAtoms::pagePseudo,
|
||||
viewportPseudoStyle, PR_FALSE,
|
||||
getter_AddRefs(pagePseudoStyle));
|
||||
|
||||
pageFrame->Init(*aPresContext, nsnull, pageSequenceFrame, pagePseudoStyle);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(*aPresContext, pageFrame,
|
||||
viewportPseudoStyle, PR_TRUE);
|
||||
pagePseudoStyle, PR_TRUE);
|
||||
|
||||
// The eventual parent of the document element frame
|
||||
mDocElementContainingBlock = pageFrame;
|
||||
|
|
|
@ -47,6 +47,7 @@ nsIAtom* nsLayoutAtoms::floaterList;
|
|||
nsIAtom* nsLayoutAtoms::commentTagName;
|
||||
nsIAtom* nsLayoutAtoms::textTagName;
|
||||
nsIAtom* nsLayoutAtoms::viewportPseudo;
|
||||
nsIAtom* nsLayoutAtoms::pagePseudo;
|
||||
|
||||
// frame types
|
||||
nsIAtom* nsLayoutAtoms::areaFrame;
|
||||
|
@ -84,6 +85,7 @@ void nsLayoutAtoms::AddrefAtoms()
|
|||
commentTagName = NS_NewAtom("__moz_comment");
|
||||
textTagName = NS_NewAtom("__moz_text");
|
||||
viewportPseudo = NS_NewAtom(":-moz-viewport");
|
||||
pagePseudo = NS_NewAtom(":-moz-page");
|
||||
|
||||
areaFrame = NS_NewAtom("AreaFrame");
|
||||
pageFrame = NS_NewAtom("PageFrame");
|
||||
|
@ -122,6 +124,7 @@ void nsLayoutAtoms::ReleaseAtoms()
|
|||
NS_RELEASE(commentTagName);
|
||||
NS_RELEASE(textTagName);
|
||||
NS_RELEASE(viewportPseudo);
|
||||
NS_RELEASE(pagePseudo);
|
||||
|
||||
NS_RELEASE(areaFrame);
|
||||
NS_RELEASE(pageFrame);
|
||||
|
|
|
@ -61,6 +61,7 @@ public:
|
|||
static nsIAtom* commentTagName;
|
||||
static nsIAtom* textTagName;
|
||||
static nsIAtom* viewportPseudo;
|
||||
static nsIAtom* pagePseudo;
|
||||
|
||||
// Alphabetical list of frame types
|
||||
static nsIAtom* areaFrame;
|
||||
|
|
|
@ -61,6 +61,7 @@ public:
|
|||
static nsIAtom* commentTagName;
|
||||
static nsIAtom* textTagName;
|
||||
static nsIAtom* viewportPseudo;
|
||||
static nsIAtom* pagePseudo;
|
||||
|
||||
// Alphabetical list of frame types
|
||||
static nsIAtom* areaFrame;
|
||||
|
|
|
@ -47,6 +47,7 @@ nsIAtom* nsLayoutAtoms::floaterList;
|
|||
nsIAtom* nsLayoutAtoms::commentTagName;
|
||||
nsIAtom* nsLayoutAtoms::textTagName;
|
||||
nsIAtom* nsLayoutAtoms::viewportPseudo;
|
||||
nsIAtom* nsLayoutAtoms::pagePseudo;
|
||||
|
||||
// frame types
|
||||
nsIAtom* nsLayoutAtoms::areaFrame;
|
||||
|
@ -84,6 +85,7 @@ void nsLayoutAtoms::AddrefAtoms()
|
|||
commentTagName = NS_NewAtom("__moz_comment");
|
||||
textTagName = NS_NewAtom("__moz_text");
|
||||
viewportPseudo = NS_NewAtom(":-moz-viewport");
|
||||
pagePseudo = NS_NewAtom(":-moz-page");
|
||||
|
||||
areaFrame = NS_NewAtom("AreaFrame");
|
||||
pageFrame = NS_NewAtom("PageFrame");
|
||||
|
@ -122,6 +124,7 @@ void nsLayoutAtoms::ReleaseAtoms()
|
|||
NS_RELEASE(commentTagName);
|
||||
NS_RELEASE(textTagName);
|
||||
NS_RELEASE(viewportPseudo);
|
||||
NS_RELEASE(pagePseudo);
|
||||
|
||||
NS_RELEASE(areaFrame);
|
||||
NS_RELEASE(pageFrame);
|
||||
|
|
|
@ -682,6 +682,11 @@ param {
|
|||
background-color: inherit;
|
||||
}
|
||||
|
||||
/* XXX Temporary until @page is supported... */
|
||||
:-moz-page {
|
||||
background: none;
|
||||
}
|
||||
|
||||
:root {
|
||||
display: block;
|
||||
background-color: inherit;
|
||||
|
|
|
@ -1411,9 +1411,15 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresContext* aPresContext,
|
|||
// Initialize the page and force it to have a view. This makes printing of
|
||||
// the pages easier and faster.
|
||||
// XXX Use a PAGE style context...
|
||||
pageFrame->Init(*aPresContext, nsnull, pageSequenceFrame, viewportPseudoStyle);
|
||||
nsCOMPtr<nsIStyleContext> pagePseudoStyle;
|
||||
|
||||
aPresContext->ResolvePseudoStyleContextFor(nsnull, nsLayoutAtoms::pagePseudo,
|
||||
viewportPseudoStyle, PR_FALSE,
|
||||
getter_AddRefs(pagePseudoStyle));
|
||||
|
||||
pageFrame->Init(*aPresContext, nsnull, pageSequenceFrame, pagePseudoStyle);
|
||||
nsHTMLContainerFrame::CreateViewForFrame(*aPresContext, pageFrame,
|
||||
viewportPseudoStyle, PR_TRUE);
|
||||
pagePseudoStyle, PR_TRUE);
|
||||
|
||||
// The eventual parent of the document element frame
|
||||
mDocElementContainingBlock = pageFrame;
|
||||
|
|
|
@ -682,6 +682,11 @@ param {
|
|||
background-color: inherit;
|
||||
}
|
||||
|
||||
/* XXX Temporary until @page is supported... */
|
||||
:-moz-page {
|
||||
background: none;
|
||||
}
|
||||
|
||||
:root {
|
||||
display: block;
|
||||
background-color: inherit;
|
||||
|
|
Загрузка…
Ссылка в новой задаче