mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 756383 - make nsHTMLAnchorElement::IsHTMLFocusable faster, r=bz
This commit is contained in:
parent
62fe25331c
commit
1ea076a4d7
@ -104,6 +104,18 @@ public:
|
||||
protected:
|
||||
virtual ~Link();
|
||||
|
||||
/**
|
||||
* Return true if the link has associated URI.
|
||||
*/
|
||||
bool HasURI() const
|
||||
{
|
||||
if (mCachedURI)
|
||||
return true;
|
||||
|
||||
nsCOMPtr<nsIURI> uri(GetURI());
|
||||
return !!uri;
|
||||
}
|
||||
|
||||
bool HasCachedURI() const { return !!mCachedURI; }
|
||||
|
||||
private:
|
||||
|
@ -287,8 +287,7 @@ nsHTMLAnchorElement::IsHTMLFocusable(bool aWithMouse,
|
||||
|
||||
if (!HasAttr(kNameSpaceID_None, nsGkAtoms::tabindex)) {
|
||||
// check whether we're actually a link
|
||||
nsCOMPtr<nsIURI> absURI;
|
||||
if (!IsLink(getter_AddRefs(absURI))) {
|
||||
if (!Link::HasURI()) {
|
||||
// Not tabbable or focusable without href (bug 17605), unless
|
||||
// forced to be via presence of nonnegative tabindex attribute
|
||||
if (aTabIndex) {
|
||||
|
Loading…
Reference in New Issue
Block a user