本文整理汇总了C++中HTMLMediaElement::NotifyOwnerDocumentActivityChanged方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLMediaElement::NotifyOwnerDocumentActivityChanged方法的具体用法?C++ HTMLMediaElement::NotifyOwnerDocumentActivityChanged怎么用?C++ HTMLMediaElement::NotifyOwnerDocumentActivityChanged使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLMediaElement
的用法示例。
在下文中一共展示了HTMLMediaElement::NotifyOwnerDocumentActivityChanged方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
nsIDocument* newDoc = aNode->OwnerDoc();
if (newDoc) {
// XXX what if oldDoc is null, we don't know if this should be
// registered or not! Can that really happen?
if (wasRegistered) {
newDoc->RegisterActivityObserver(aNode->AsElement());
}
nsPIDOMWindow* window = newDoc->GetInnerWindow();
if (window) {
EventListenerManager* elm = aNode->GetExistingListenerManager();
if (elm) {
window->SetMutationListeners(elm->MutationListenerBits());
if (elm->MayHavePaintEventListener()) {
window->SetHasPaintEventListeners();
}
if (elm->MayHaveTouchEventListener()) {
window->SetHasTouchEventListeners();
}
if (elm->MayHaveMouseEnterLeaveEventListener()) {
window->SetHasMouseEnterLeaveEventListeners();
}
if (elm->MayHavePointerEnterLeaveEventListener()) {
window->SetHasPointerEnterLeaveEventListeners();
}
}
}
}
if (wasRegistered && oldDoc != newDoc) {
nsCOMPtr<nsIDOMHTMLMediaElement> domMediaElem(do_QueryInterface(aNode));
if (domMediaElem) {
HTMLMediaElement* mediaElem = static_cast<HTMLMediaElement*>(aNode);
mediaElem->NotifyOwnerDocumentActivityChanged();
}
nsCOMPtr<nsIObjectLoadingContent> objectLoadingContent(do_QueryInterface(aNode));
if (objectLoadingContent) {
nsObjectLoadingContent* olc = static_cast<nsObjectLoadingContent*>(objectLoadingContent.get());
olc->NotifyOwnerDocumentActivityChanged();
}
}
if (oldDoc != newDoc && oldDoc->MayHaveDOMMutationObservers()) {
newDoc->SetMayHaveDOMMutationObservers();
}
if (oldDoc != newDoc && oldDoc->MayHaveAnimationObservers()) {
newDoc->SetMayHaveAnimationObservers();
}
if (elem) {
elem->RecompileScriptEventListeners();
}
if (aReparentScope) {
JS::Rooted<JSObject*> wrapper(cx);
if ((wrapper = aNode->GetWrapper())) {
MOZ_ASSERT(IsDOMObject(wrapper));
JSAutoCompartment ac(cx, wrapper);
rv = ReparentWrapper(cx, wrapper);
if (NS_FAILED(rv)) {
aNode->mNodeInfo.swap(nodeInfo);
return rv;
}
}