Backed out changesets 4d2d510fbd62, 5e51dc838a89, and 652bd77f36c1 (bug 1116714) for Linux opt mochitest-dt orange.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2015-01-06 08:57:43 -05:00
Родитель 5aa4ac7936
Коммит 9e06657e83
5 изменённых файлов: 4 добавлений и 48 удалений

Просмотреть файл

@ -5250,7 +5250,6 @@ nsIDocument::InsertAnonymousContent(Element& aElement, ErrorResult& aRv)
return nullptr;
}
nsAutoScriptBlocker scriptBlocker;
nsCOMPtr<Element> container = shell->GetCanvasFrame()
->GetCustomContentContainer();
if (!container) {
@ -5275,8 +5274,6 @@ nsIDocument::InsertAnonymousContent(Element& aElement, ErrorResult& aRv)
new AnonymousContent(clonedElement->AsElement());
mAnonymousContents.AppendElement(anonymousContent);
shell->GetCanvasFrame()->ShowCustomContentContainer();
return anonymousContent.forget();
}
@ -5290,7 +5287,6 @@ nsIDocument::RemoveAnonymousContent(AnonymousContent& aContent,
return;
}
nsAutoScriptBlocker scriptBlocker;
nsCOMPtr<Element> container = shell->GetCanvasFrame()
->GetCustomContentContainer();
if (!container) {
@ -5316,9 +5312,6 @@ nsIDocument::RemoveAnonymousContent(AnonymousContent& aContent,
break;
}
}
if (mAnonymousContents.IsEmpty()) {
shell->GetCanvasFrame()->HideCustomContentContainer();
}
}
//

Просмотреть файл

@ -9293,9 +9293,9 @@ nsCSSFrameConstructor::RecreateFramesForContent(nsIContent* aContent,
// nsIAnonymousContentCreator that created this content knows how to make
// that happen.
nsIAnonymousContentCreator* acc = nullptr;
nsIFrame* ancestor = nsLayoutUtils::GetParentOrPlaceholderFor(frame);
nsIFrame* ancestor = frame->GetParent();
while (!(acc = do_QueryFrame(ancestor))) {
ancestor = nsLayoutUtils::GetParentOrPlaceholderFor(ancestor);
ancestor = ancestor->GetParent();
}
NS_ASSERTION(acc, "Where is the nsIAnonymousContentCreator? We may fail "
"to recreate its content correctly");

Просмотреть файл

@ -53,24 +53,6 @@ NS_QUERYFRAME_HEAD(nsCanvasFrame)
NS_QUERYFRAME_ENTRY(nsIAnonymousContentCreator)
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
void
nsCanvasFrame::ShowCustomContentContainer()
{
if (mCustomContentContainer) {
mCustomContentContainer->UnsetAttr(kNameSpaceID_None, nsGkAtoms::hidden, true);
}
}
void
nsCanvasFrame::HideCustomContentContainer()
{
if (mCustomContentContainer) {
mCustomContentContainer->SetAttr(kNameSpaceID_None, nsGkAtoms::hidden,
NS_LITERAL_STRING("true"),
true);
}
}
nsresult
nsCanvasFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
{
@ -144,11 +126,6 @@ nsCanvasFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
mCustomContentContainer->AppendChildTo(node->AsContent(), true);
}
// Only create a frame for mCustomContentContainer if it has some children.
if (anonymousContentCount <= 0) {
HideCustomContentContainer();
}
return NS_OK;
}

Просмотреть файл

@ -104,18 +104,6 @@ public:
return mCustomContentContainer;
}
/**
* Unhide the CustomContentContainer. This call only has an effect if
* mCustomContentContainer is non-null.
*/
void ShowCustomContentContainer();
/**
* Hide the CustomContentContainer. This call only has an effect if
* mCustomContentContainer is non-null.
*/
void HideCustomContentContainer();
/** SetHasFocus tells the CanvasFrame to draw with focus ring
* @param aHasFocus true to show focus ring, false to hide it
*/

Просмотреть файл

@ -421,7 +421,6 @@ let CustomHighlighterFront = protocol.FrontClass(CustomHighlighterActor, {});
function CanvasFrameAnonymousContentHelper(tabActor, nodeBuilder) {
this.tabActor = tabActor;
this.nodeBuilder = nodeBuilder;
this.anonymousContentDocument = this.tabActor.window.document;
this._insert();
@ -434,12 +433,11 @@ CanvasFrameAnonymousContentHelper.prototype = {
// If the current window isn't the one the content was inserted into, this
// will fail, but that's fine.
try {
let doc = this.anonymousContentDocument;
let doc = this.tabActor.window.document;
doc.removeAnonymousContent(this._content);
} catch (e) {console.log(e)}
} catch (e) {}
events.off(this.tabActor, "navigate", this._onNavigate);
this.tabActor = this.nodeBuilder = this._content = null;
this.anonymousContentDocument = null;
},
_insert: function() {