mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Added new pseudo class style :SCROLLED-CONTENT
This commit is contained in:
parent
944d65db04
commit
9b9a796719
@ -183,6 +183,7 @@ nsIAtom* nsHTMLAtoms::rowspan;
|
||||
nsIAtom* nsHTMLAtoms::rules;
|
||||
nsIAtom* nsHTMLAtoms::scheme;
|
||||
nsIAtom* nsHTMLAtoms::scope;
|
||||
nsIAtom* nsHTMLAtoms::scrolledContentPseudo;
|
||||
nsIAtom* nsHTMLAtoms::scrolling;
|
||||
nsIAtom* nsHTMLAtoms::select;
|
||||
nsIAtom* nsHTMLAtoms::selected;
|
||||
@ -399,6 +400,7 @@ void nsHTMLAtoms::AddrefAtoms()
|
||||
rules = NS_NewAtom("RULES");
|
||||
scheme = NS_NewAtom("SCHEME");
|
||||
scope = NS_NewAtom("SCOPE");
|
||||
scrolledContentPseudo = NS_NewAtom(":SCROLLED-CONTENT");
|
||||
scrolling = NS_NewAtom("SCROLLING");
|
||||
select = NS_NewAtom("SELECT");
|
||||
selected = NS_NewAtom("SELECTED");
|
||||
|
@ -217,6 +217,7 @@ public:
|
||||
|
||||
static nsIAtom* scheme;
|
||||
static nsIAtom* scope;
|
||||
static nsIAtom* scrolledContentPseudo;
|
||||
static nsIAtom* scrolling;
|
||||
static nsIAtom* select;
|
||||
static nsIAtom* selected;
|
||||
|
@ -1517,12 +1517,11 @@ HTMLStyleSheetImpl::ConstructFrame(nsIPresContext* aPresContext,
|
||||
|
||||
if NS_SUCCEEDED(NS_NewScrollFrame(aContent, aParentFrame, scrollFrame)) {
|
||||
// The scroll frame gets the original style context, and the scrolled
|
||||
// frame gets a pseudo style context.
|
||||
// XXX Is this the best way to do this?
|
||||
// frame gets a SCROLLED-CONTENT pseudo class style context.
|
||||
scrollFrame->SetStyleContext(aPresContext, styleContext);
|
||||
|
||||
nsIStyleContext* pseudoStyle;
|
||||
pseudoStyle = aPresContext->ResolvePseudoStyleContextFor(nsHTMLAtoms::columnPseudo,
|
||||
pseudoStyle = aPresContext->ResolvePseudoStyleContextFor(nsHTMLAtoms::scrolledContentPseudo,
|
||||
scrollFrame);
|
||||
aFrameSubTree->SetStyleContext(aPresContext, pseudoStyle);
|
||||
NS_RELEASE(pseudoStyle);
|
||||
|
@ -217,6 +217,7 @@ public:
|
||||
|
||||
static nsIAtom* scheme;
|
||||
static nsIAtom* scope;
|
||||
static nsIAtom* scrolledContentPseudo;
|
||||
static nsIAtom* scrolling;
|
||||
static nsIAtom* select;
|
||||
static nsIAtom* selected;
|
||||
|
@ -183,6 +183,7 @@ nsIAtom* nsHTMLAtoms::rowspan;
|
||||
nsIAtom* nsHTMLAtoms::rules;
|
||||
nsIAtom* nsHTMLAtoms::scheme;
|
||||
nsIAtom* nsHTMLAtoms::scope;
|
||||
nsIAtom* nsHTMLAtoms::scrolledContentPseudo;
|
||||
nsIAtom* nsHTMLAtoms::scrolling;
|
||||
nsIAtom* nsHTMLAtoms::select;
|
||||
nsIAtom* nsHTMLAtoms::selected;
|
||||
@ -399,6 +400,7 @@ void nsHTMLAtoms::AddrefAtoms()
|
||||
rules = NS_NewAtom("RULES");
|
||||
scheme = NS_NewAtom("SCHEME");
|
||||
scope = NS_NewAtom("SCOPE");
|
||||
scrolledContentPseudo = NS_NewAtom(":SCROLLED-CONTENT");
|
||||
scrolling = NS_NewAtom("SCROLLING");
|
||||
select = NS_NewAtom("SELECT");
|
||||
selected = NS_NewAtom("SELECTED");
|
||||
|
@ -183,6 +183,7 @@ nsIAtom* nsHTMLAtoms::rowspan;
|
||||
nsIAtom* nsHTMLAtoms::rules;
|
||||
nsIAtom* nsHTMLAtoms::scheme;
|
||||
nsIAtom* nsHTMLAtoms::scope;
|
||||
nsIAtom* nsHTMLAtoms::scrolledContentPseudo;
|
||||
nsIAtom* nsHTMLAtoms::scrolling;
|
||||
nsIAtom* nsHTMLAtoms::select;
|
||||
nsIAtom* nsHTMLAtoms::selected;
|
||||
@ -399,6 +400,7 @@ void nsHTMLAtoms::AddrefAtoms()
|
||||
rules = NS_NewAtom("RULES");
|
||||
scheme = NS_NewAtom("SCHEME");
|
||||
scope = NS_NewAtom("SCOPE");
|
||||
scrolledContentPseudo = NS_NewAtom(":SCROLLED-CONTENT");
|
||||
scrolling = NS_NewAtom("SCROLLING");
|
||||
select = NS_NewAtom("SELECT");
|
||||
selected = NS_NewAtom("SELECTED");
|
||||
|
@ -217,6 +217,7 @@ public:
|
||||
|
||||
static nsIAtom* scheme;
|
||||
static nsIAtom* scope;
|
||||
static nsIAtom* scrolledContentPseudo;
|
||||
static nsIAtom* scrolling;
|
||||
static nsIAtom* select;
|
||||
static nsIAtom* selected;
|
||||
|
@ -277,7 +277,8 @@ nsScrollFrame::CreateScrollingView()
|
||||
if (NS_OK == rv) {
|
||||
// Initialize the scrolling view
|
||||
// XXX Check for opacity...
|
||||
view->Init(viewManager, mRect, parentView, &kWidgetCID, nsnull, nsnull);
|
||||
//view->Init(viewManager, mRect, parentView, &kWidgetCID, nsnull, nsnull);
|
||||
view->Init(viewManager, mRect, parentView, nsnull, nsnull, nsnull);
|
||||
|
||||
// Insert the view into the view hierarchy
|
||||
viewManager->InsertChild(parentView, view, 0);
|
||||
|
@ -470,3 +470,11 @@ NOSCRIPT {
|
||||
NOFRAMES {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Pseudo-classes
|
||||
|
||||
:SCROLLED-CONTENT {
|
||||
background: inherit;
|
||||
padding: inherit;
|
||||
}
|
||||
|
||||
|
@ -1517,12 +1517,11 @@ HTMLStyleSheetImpl::ConstructFrame(nsIPresContext* aPresContext,
|
||||
|
||||
if NS_SUCCEEDED(NS_NewScrollFrame(aContent, aParentFrame, scrollFrame)) {
|
||||
// The scroll frame gets the original style context, and the scrolled
|
||||
// frame gets a pseudo style context.
|
||||
// XXX Is this the best way to do this?
|
||||
// frame gets a SCROLLED-CONTENT pseudo class style context.
|
||||
scrollFrame->SetStyleContext(aPresContext, styleContext);
|
||||
|
||||
nsIStyleContext* pseudoStyle;
|
||||
pseudoStyle = aPresContext->ResolvePseudoStyleContextFor(nsHTMLAtoms::columnPseudo,
|
||||
pseudoStyle = aPresContext->ResolvePseudoStyleContextFor(nsHTMLAtoms::scrolledContentPseudo,
|
||||
scrollFrame);
|
||||
aFrameSubTree->SetStyleContext(aPresContext, pseudoStyle);
|
||||
NS_RELEASE(pseudoStyle);
|
||||
|
@ -1517,12 +1517,11 @@ HTMLStyleSheetImpl::ConstructFrame(nsIPresContext* aPresContext,
|
||||
|
||||
if NS_SUCCEEDED(NS_NewScrollFrame(aContent, aParentFrame, scrollFrame)) {
|
||||
// The scroll frame gets the original style context, and the scrolled
|
||||
// frame gets a pseudo style context.
|
||||
// XXX Is this the best way to do this?
|
||||
// frame gets a SCROLLED-CONTENT pseudo class style context.
|
||||
scrollFrame->SetStyleContext(aPresContext, styleContext);
|
||||
|
||||
nsIStyleContext* pseudoStyle;
|
||||
pseudoStyle = aPresContext->ResolvePseudoStyleContextFor(nsHTMLAtoms::columnPseudo,
|
||||
pseudoStyle = aPresContext->ResolvePseudoStyleContextFor(nsHTMLAtoms::scrolledContentPseudo,
|
||||
scrollFrame);
|
||||
aFrameSubTree->SetStyleContext(aPresContext, pseudoStyle);
|
||||
NS_RELEASE(pseudoStyle);
|
||||
|
@ -470,3 +470,11 @@ NOSCRIPT {
|
||||
NOFRAMES {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Pseudo-classes
|
||||
|
||||
:SCROLLED-CONTENT {
|
||||
background: inherit;
|
||||
padding: inherit;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user