зеркало из https://github.com/mozilla/gecko-dev.git
Bug 625289 patch 7 - Expose TryStartingTransition. r=heycam
This commit is contained in:
Родитель
ebafb4f9b6
Коммит
e425638f17
|
@ -1821,10 +1821,12 @@ RestyleManager::DebugVerifyStyleTree(nsIFrame* aFrame)
|
|||
|
||||
// aContent must be the content for the frame in question, which may be
|
||||
// :before/:after content
|
||||
static void
|
||||
TryStartingTransition(nsPresContext *aPresContext, nsIContent *aContent,
|
||||
nsStyleContext *aOldStyleContext,
|
||||
nsRefPtr<nsStyleContext> *aNewStyleContext /* inout */)
|
||||
/* static */ void
|
||||
RestyleManager::TryStartingTransition(nsPresContext* aPresContext,
|
||||
nsIContent* aContent,
|
||||
nsStyleContext* aOldStyleContext,
|
||||
nsRefPtr<nsStyleContext>*
|
||||
aNewStyleContext /* inout */)
|
||||
{
|
||||
if (!aContent || !aContent->IsElement()) {
|
||||
return;
|
||||
|
@ -2608,8 +2610,8 @@ ElementRestyler::RestyleSelf(nsIFrame* aSelf, nsRestyleHint aRestyleHint)
|
|||
|
||||
if (newContext != oldContext) {
|
||||
if (!copyFromContinuation) {
|
||||
TryStartingTransition(mPresContext, aSelf->GetContent(),
|
||||
oldContext, &newContext);
|
||||
RestyleManager::TryStartingTransition(mPresContext, aSelf->GetContent(),
|
||||
oldContext, &newContext);
|
||||
|
||||
CaptureChange(oldContext, newContext, assumeDifferenceHint);
|
||||
}
|
||||
|
|
|
@ -176,6 +176,19 @@ public:
|
|||
return mReframingStyleContexts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Try starting a transition for an element or a ::before or ::after
|
||||
* pseudo-element, given an old and new style context. This may
|
||||
* change the new style context if a transition is started.
|
||||
*
|
||||
* For the pseudo-elements, aContent must be the anonymous content
|
||||
* that we're creating for that pseudo-element, not the real element.
|
||||
*/
|
||||
static void
|
||||
TryStartingTransition(nsPresContext* aPresContext, nsIContent* aContent,
|
||||
nsStyleContext* aOldStyleContext,
|
||||
nsRefPtr<nsStyleContext>* aNewStyleContext /* inout */);
|
||||
|
||||
private:
|
||||
void RestyleForEmptyChange(Element* aContainer);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче