Commit 35d03866 authored by Tatiana Meshkova's avatar Tatiana Meshkova

Fixed possible crash when element not available

parent 8213cb85
......@@ -68,15 +68,18 @@ void EmbedTouchListener::HandleSingleTap(const nsIntPoint& aPoint)
void EmbedTouchListener::HandleLongTap(const nsIntPoint& aPoint)
LOGT("pt[%i,%i]", aPoint.x, aPoint.y);
nsresult rv;
nsCOMPtr<nsIDOMElement> element;
gfxRect retRect(0,0,0,0);
AnyElementFromPoint(DOMWindow, aPoint.x, aPoint.y, getter_AddRefs(element));
if (!element) {
// Clicked some unknown area without elements... return here
nsAutoString localName;
nsAutoString aHRef;
nsAutoString aSrc;
if (element){
nsCOMPtr<nsIDOMElement> linkContent;
if (localName.LowerCaseEqualsLiteral("a") ||
localName.LowerCaseEqualsLiteral("area") ||
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment