зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1392892 - Avoid creating a live nsContentList in nsDocument::GetTitleElement(); r=smaug
This commit is contained in:
Родитель
75e9304a93
Коммит
731a8f470b
|
@ -7160,8 +7160,12 @@ nsDocument::GetTitleElement()
|
||||||
|
|
||||||
// We check the HTML namespace even for non-HTML documents, except SVG. This
|
// We check the HTML namespace even for non-HTML documents, except SVG. This
|
||||||
// matches the spec and the behavior of all tested browsers.
|
// matches the spec and the behavior of all tested browsers.
|
||||||
RefPtr<nsContentList> list =
|
// We avoid creating a live nsContentList since we don't need to watch for DOM
|
||||||
NS_GetContentList(this, kNameSpaceID_XHTML, NS_LITERAL_STRING("title"));
|
// tree mutations.
|
||||||
|
RefPtr<nsContentList> list = new nsContentList(this, kNameSpaceID_XHTML,
|
||||||
|
nsGkAtoms::title, nsGkAtoms::title,
|
||||||
|
/* aDeep = */ true,
|
||||||
|
/* aLiveList = */ false);
|
||||||
|
|
||||||
nsIContent* first = list->Item(0, false);
|
nsIContent* first = list->Item(0, false);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче