| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 4206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4217 return KURL(); | 4217 return KURL(); |
| 4218 | 4218 |
| 4219 // FIXME: Why do we need to wait for FrameStateComplete? | 4219 // FIXME: Why do we need to wait for FrameStateComplete? |
| 4220 if (frame()->loader().state() != FrameStateComplete) | 4220 if (frame()->loader().state() != FrameStateComplete) |
| 4221 return KURL(); | 4221 return KURL(); |
| 4222 | 4222 |
| 4223 if (!head()) | 4223 if (!head()) |
| 4224 return KURL(); | 4224 return KURL(); |
| 4225 | 4225 |
| 4226 RefPtr<HTMLCollection> children = head()->children(); | 4226 RefPtr<HTMLCollection> children = head()->children(); |
| 4227 for (unsigned i = 0; Node* child = children->item(i); i++) { | 4227 for (unsigned i = 0; Element* child = children->item(i); i++) { |
| 4228 if (!child->hasTagName(linkTag)) | 4228 if (!child->hasTagName(linkTag)) |
| 4229 continue; | 4229 continue; |
| 4230 HTMLLinkElement* linkElement = toHTMLLinkElement(child); | 4230 HTMLLinkElement* linkElement = toHTMLLinkElement(child); |
| 4231 if (!equalIgnoringCase(linkElement->type(), openSearchMIMEType) || !equa
lIgnoringCase(linkElement->rel(), openSearchRelation)) | 4231 if (!equalIgnoringCase(linkElement->type(), openSearchMIMEType) || !equa
lIgnoringCase(linkElement->rel(), openSearchRelation)) |
| 4232 continue; | 4232 continue; |
| 4233 if (linkElement->href().isEmpty()) | 4233 if (linkElement->href().isEmpty()) |
| 4234 continue; | 4234 continue; |
| 4235 return linkElement->href(); | 4235 return linkElement->href(); |
| 4236 } | 4236 } |
| 4237 | 4237 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4475 { | 4475 { |
| 4476 IconURL firstFavicon; | 4476 IconURL firstFavicon; |
| 4477 IconURL firstTouchIcon; | 4477 IconURL firstTouchIcon; |
| 4478 IconURL firstTouchPrecomposedIcon; | 4478 IconURL firstTouchPrecomposedIcon; |
| 4479 Vector<IconURL> secondaryIcons; | 4479 Vector<IconURL> secondaryIcons; |
| 4480 | 4480 |
| 4481 // Start from the last child node so that icons seen later take precedence a
s required by the spec. | 4481 // Start from the last child node so that icons seen later take precedence a
s required by the spec. |
| 4482 RefPtr<HTMLCollection> children = head() ? head()->children() : 0; | 4482 RefPtr<HTMLCollection> children = head() ? head()->children() : 0; |
| 4483 unsigned length = children ? children->length() : 0; | 4483 unsigned length = children ? children->length() : 0; |
| 4484 for (unsigned i = 0; i < length; i++) { | 4484 for (unsigned i = 0; i < length; i++) { |
| 4485 Node* child = children->item(i); | 4485 Element* child = children->item(i); |
| 4486 if (!child->hasTagName(linkTag)) | 4486 if (!child->hasTagName(linkTag)) |
| 4487 continue; | 4487 continue; |
| 4488 HTMLLinkElement* linkElement = toHTMLLinkElement(child); | 4488 HTMLLinkElement* linkElement = toHTMLLinkElement(child); |
| 4489 if (!(linkElement->iconType() & iconTypesMask)) | 4489 if (!(linkElement->iconType() & iconTypesMask)) |
| 4490 continue; | 4490 continue; |
| 4491 if (linkElement->href().isEmpty()) | 4491 if (linkElement->href().isEmpty()) |
| 4492 continue; | 4492 continue; |
| 4493 if (!RuntimeEnabledFeatures::touchIconLoadingEnabled() && linkElement->i
conType() != Favicon) | 4493 if (!RuntimeEnabledFeatures::touchIconLoadingEnabled() && linkElement->i
conType() != Favicon) |
| 4494 continue; | 4494 continue; |
| 4495 | 4495 |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5427 void Document::defaultEventHandler(Event* event) | 5427 void Document::defaultEventHandler(Event* event) |
| 5428 { | 5428 { |
| 5429 if (frame() && frame()->remotePlatformLayer()) { | 5429 if (frame() && frame()->remotePlatformLayer()) { |
| 5430 frame()->chromeClient().forwardInputEvent(this, event); | 5430 frame()->chromeClient().forwardInputEvent(this, event); |
| 5431 return; | 5431 return; |
| 5432 } | 5432 } |
| 5433 Node::defaultEventHandler(event); | 5433 Node::defaultEventHandler(event); |
| 5434 } | 5434 } |
| 5435 | 5435 |
| 5436 } // namespace WebCore | 5436 } // namespace WebCore |
| OLD | NEW |