mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1309868 part 2 - Use const nsIContent pointer in some layout utils. r=heycam
MozReview-Commit-ID: 5GMave4FS48 --HG-- extra : source : 60d203eaa11b53f14a8c3736498f991d8e3615b1
This commit is contained in:
parent
1cbd4cb699
commit
3c3f76a8e1
@ -223,7 +223,7 @@ MarkChildrenAsDirtyForServo(nsIContent* aContent)
|
||||
}
|
||||
|
||||
/* static */ nsIFrame*
|
||||
ServoRestyleManager::FrameForPseudoElement(nsIContent* aContent,
|
||||
ServoRestyleManager::FrameForPseudoElement(const nsIContent* aContent,
|
||||
nsIAtom* aPseudoTagOrNull)
|
||||
{
|
||||
MOZ_ASSERT_IF(aPseudoTagOrNull, aContent->IsElement());
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
* Right now only supports a null tag, before or after. If the pseudo-element
|
||||
* is not null, the content needs to be an element.
|
||||
*/
|
||||
static nsIFrame* FrameForPseudoElement(nsIContent* aContent,
|
||||
static nsIFrame* FrameForPseudoElement(const nsIContent* aContent,
|
||||
nsIAtom* aPseudoTagOrNull);
|
||||
|
||||
protected:
|
||||
|
@ -1477,7 +1477,7 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame)
|
||||
|
||||
/*static*/ nsIFrame*
|
||||
nsLayoutUtils::GetBeforeFrameForContent(nsIFrame* aFrame,
|
||||
nsIContent* aContent)
|
||||
const nsIContent* aContent)
|
||||
{
|
||||
// We need to call GetGenConPseudos() on the first continuation/ib-split.
|
||||
// Find it, for symmetry with GetAfterFrameForContent.
|
||||
@ -1516,7 +1516,7 @@ nsLayoutUtils::GetBeforeFrame(nsIFrame* aFrame)
|
||||
|
||||
/*static*/ nsIFrame*
|
||||
nsLayoutUtils::GetAfterFrameForContent(nsIFrame* aFrame,
|
||||
nsIContent* aContent)
|
||||
const nsIContent* aContent)
|
||||
{
|
||||
// We need to call GetGenConPseudos() on the first continuation,
|
||||
// but callers are likely to pass the last.
|
||||
|
@ -281,7 +281,7 @@ public:
|
||||
* @return the ::before frame or nullptr if there isn't one
|
||||
*/
|
||||
static nsIFrame* GetBeforeFrameForContent(nsIFrame* aGenConParentFrame,
|
||||
nsIContent* aContent);
|
||||
const nsIContent* aContent);
|
||||
|
||||
/**
|
||||
* GetBeforeFrame returns the outermost ::before frame of the given frame, if
|
||||
@ -304,7 +304,7 @@ public:
|
||||
* @return the ::after frame or nullptr if there isn't one
|
||||
*/
|
||||
static nsIFrame* GetAfterFrameForContent(nsIFrame* aGenConParentFrame,
|
||||
nsIContent* aContent);
|
||||
const nsIContent* aContent);
|
||||
|
||||
/**
|
||||
* GetAfterFrame returns the outermost ::after frame of the given frame, if one
|
||||
|
@ -2940,7 +2940,7 @@ public:
|
||||
* @param aParentContent the content node corresponding to the parent frame
|
||||
* @return whether the frame is a pseudo frame
|
||||
*/
|
||||
bool IsPseudoFrame(nsIContent* aParentContent) {
|
||||
bool IsPseudoFrame(const nsIContent* aParentContent) {
|
||||
return mContent == aParentContent;
|
||||
}
|
||||
|
||||
|
@ -1257,7 +1257,7 @@ nsCSSRuleProcessor::GetContentState(Element* aElement, const TreeMatchContext& a
|
||||
|
||||
/* static */
|
||||
bool
|
||||
nsCSSRuleProcessor::IsLink(Element* aElement)
|
||||
nsCSSRuleProcessor::IsLink(const Element* aElement)
|
||||
{
|
||||
EventStates state = aElement->StyleState();
|
||||
return state.HasAtLeastOneOfStates(NS_EVENT_STATE_VISITED | NS_EVENT_STATE_UNVISITED);
|
||||
|
@ -116,7 +116,7 @@ public:
|
||||
/*
|
||||
* Helper to test whether a node is a link
|
||||
*/
|
||||
static bool IsLink(mozilla::dom::Element* aElement);
|
||||
static bool IsLink(const mozilla::dom::Element* aElement);
|
||||
|
||||
/**
|
||||
* Returns true if the given aElement matches aSelector.
|
||||
|
Loading…
Reference in New Issue
Block a user