mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
backout bug 1134280 for fixing yandex search "Read more" link
This commit is contained in:
@@ -352,7 +352,11 @@ IsElementAnchor(nsIContent* aContent)
|
||||
{
|
||||
// Make sure we are dealing with either an <A> or <AREA> element in the HTML
|
||||
// or XHTML namespace.
|
||||
return aContent->IsAnyOfHTMLElements(nsGkAtoms::a, nsGkAtoms::area);
|
||||
if (!aContent->IsHTML()) {
|
||||
return false;
|
||||
}
|
||||
nsIAtom* nameAtom = aContent->Tag();
|
||||
return nameAtom == nsGkAtoms::a || nameAtom == nsGkAtoms::area;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2652,7 +2656,7 @@ nsDocShell::GetFullscreenAllowed(bool* aFullscreenAllowed)
|
||||
}
|
||||
nsCOMPtr<Element> frameElement = win->GetFrameElementInternal();
|
||||
if (frameElement &&
|
||||
frameElement->IsHTMLElement(nsGkAtoms::iframe) &&
|
||||
frameElement->IsHTML(nsGkAtoms::iframe) &&
|
||||
!frameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) &&
|
||||
!frameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen)) {
|
||||
return NS_OK;
|
||||
@@ -13628,8 +13632,7 @@ nsDocShell::OnLinkClickSync(nsIContent* aContent,
|
||||
// XXX When the linking node was HTMLFormElement, it is synchronous event.
|
||||
// That is, the caller of this method is not |OnLinkClickEvent::Run()|
|
||||
// but |HTMLFormElement::SubmitSubmission(...)|.
|
||||
if (aContent->IsHTMLElement(nsGkAtoms::form) &&
|
||||
ShouldBlockLoadingForBackButton()) {
|
||||
if (nsGkAtoms::form == aContent->Tag() && ShouldBlockLoadingForBackButton()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -13659,7 +13662,7 @@ nsDocShell::OnLinkClickSync(nsIContent* aContent,
|
||||
|
||||
uint32_t flags = INTERNAL_LOAD_FLAGS_NONE;
|
||||
if (IsElementAnchor(aContent)) {
|
||||
MOZ_ASSERT(aContent->IsHTMLElement());
|
||||
MOZ_ASSERT(aContent->IsHTML());
|
||||
nsAutoString referrer;
|
||||
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::rel, referrer);
|
||||
nsWhitespaceTokenizerTemplate<nsContentUtils::IsHTMLWhitespace> tok(referrer);
|
||||
|
||||
Reference in New Issue
Block a user