Adopt is/toHTMLImageElement for code cleanup

https://bugs.webkit.org/show_bug.cgi?id=118182

Reviewed by Andreas Kling.

To enhance readability, this patch adopts is/toHTMLImageElement.
This also helps out to reduce duplicated use of static_cast.

Source/WebCore:

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isNativeImage):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::url):
* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::assignToHTMLImageElement):
(JSC::Bindings::QtPixmapRuntime::toQt):
* dom/Clipboard.cpp:
(WebCore::Clipboard::setDragImage):
* dom/Node.cpp:
(WebCore::Node::enclosingLinkEventParentOrSelf):
* editing/Editor.cpp:
(WebCore::imageElementFromImageDocument):
* html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition):
* html/HTMLImageElement.h:
(WebCore::isHTMLImageElement):
(WebCore::toHTMLImageElement):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatches):
* page/DragController.cpp:
(WebCore::DragController::draggableElement):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString):
(WebCore::HitTestResult::absoluteImageURL):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIntoRect):
(WebCore::RenderImage::imageMap):
(WebCore::RenderImage::updateAltText):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::shouldRespectImageOrientation):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):
(BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
(BlackBerry::WebKit::WebPage::blockZoom):
* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::isElementClickable):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 15177c1e
2013-06-28 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLImageElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118182
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLImageElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isNativeImage):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::url):
* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::assignToHTMLImageElement):
(JSC::Bindings::QtPixmapRuntime::toQt):
* dom/Clipboard.cpp:
(WebCore::Clipboard::setDragImage):
* dom/Node.cpp:
(WebCore::Node::enclosingLinkEventParentOrSelf):
* editing/Editor.cpp:
(WebCore::imageElementFromImageDocument):
* html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition):
* html/HTMLImageElement.h:
(WebCore::isHTMLImageElement):
(WebCore::toHTMLImageElement):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatches):
* page/DragController.cpp:
(WebCore::DragController::draggableElement):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString):
(WebCore::HitTestResult::absoluteImageURL):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIntoRect):
(WebCore::RenderImage::imageMap):
(WebCore::RenderImage::updateAltText):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::shouldRespectImageOrientation):
2013-06-28 Gavin Barraclough <barraclough@apple.com>
PageThrottler::shouldThrottleTimers is wrong.
......@@ -488,7 +488,7 @@ bool AccessibilityNodeObject::isNativeImage() const
if (!node)
return false;
if (node->hasTagName(imgTag))
if (isHTMLImageElement(node))
return true;
if (node->hasTagName(appletTag) || node->hasTagName(embedTag) || node->hasTagName(objectTag))
......
......@@ -1467,8 +1467,8 @@ KURL AccessibilityRenderObject::url() const
if (isWebArea())
return m_renderer->document()->url();
if (isImage() && m_renderer->node() && m_renderer->node()->hasTagName(imgTag))
return static_cast<HTMLImageElement*>(m_renderer->node())->src();
if (isImage() && m_renderer->node() && isHTMLImageElement(m_renderer->node()))
return toHTMLImageElement(m_renderer->node())->src();
if (isInputImage())
return toHTMLInputElement(m_renderer->node())->src();
......
......@@ -105,8 +105,8 @@ static inline bool isReachableFromDOM(JSNode* jsNode, Node* node, SlotVisitor& v
// because it is the only thing keeping the image element alive, and if
// the element is destroyed, its load event will not fire.
// FIXME: The DOM should manage this issue without the help of JavaScript wrappers.
if (node->hasTagName(imgTag)) {
if (static_cast<HTMLImageElement*>(node)->hasPendingActivity())
if (isHTMLImageElement(node)) {
if (toHTMLImageElement(node)->hasPendingActivity())
return true;
}
#if ENABLE(VIDEO)
......
......@@ -137,7 +137,7 @@ static JSValueRef assignToHTMLImageElement(JSContextRef context, JSObjectRef fun
// We now know that we have a valid <img> element as the argument, we can attach the pixmap to it.
RefPtr<StillImage> stillImage = WebCore::StillImage::create(toPixmap(data));
HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(static_cast<JSHTMLImageElement*>(jsObject)->impl());
HTMLImageElement* imageElement = toHTMLImageElement(static_cast<JSHTMLImageElement*>(jsObject)->impl());
imageElement->setCachedImage(new CachedImage(stillImage.get()));
return JSValueMakeUndefined(context);
}
......@@ -218,7 +218,7 @@ QVariant QtPixmapRuntime::toQt(JSContextRef context, JSObjectRef obj, QMetaType:
return emptyVariantForHint(hint);
JSHTMLImageElement* elementJSWrapper = static_cast<JSHTMLImageElement*>(jsObject);
HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(elementJSWrapper->impl());
HTMLImageElement* imageElement = toHTMLImageElement(elementJSWrapper->impl());
if (!imageElement)
return emptyVariantForHint(hint);
......
......@@ -285,8 +285,8 @@ void Clipboard::setDragImage(Element* element, int x, int y)
if (!canSetDragImage())
return;
if (element && element->hasTagName(HTMLNames::imgTag) && !element->inDocument())
setDragImage(static_cast<HTMLImageElement*>(element)->cachedImage(), IntPoint(x, y));
if (element && isHTMLImageElement(element) && !element->inDocument())
setDragImage(toHTMLImageElement(element)->cachedImage(), IntPoint(x, y));
else
setDragImageElement(element, IntPoint(x, y));
}
......@@ -385,8 +385,8 @@ void Clipboard::setDragImage(Element* element, int x, int y)
return;
CachedImage* image;
if (element && element->hasTagName(HTMLNames::imgTag) && !element->inDocument())
image = static_cast<HTMLImageElement*>(element)->cachedImage();
if (element && isHTMLImageElement(element) && !element->inDocument())
image = toHTMLImageElement(element)->cachedImage();
else
image = 0;
......
......@@ -64,6 +64,7 @@
#include "FrameView.h"
#include "HTMLElement.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLImageElement.h"
#include "HTMLNames.h"
#include "HTMLStyleElement.h"
#include "InsertionPoint.h"
......@@ -1949,7 +1950,7 @@ Node* Node::enclosingLinkEventParentOrSelf()
// For imagemaps, the enclosing link node is the associated area element not the image itself.
// So we don't let images be the enclosingLinkNode, even though isLink sometimes returns true
// for them.
if (node->isLink() && !node->hasTagName(imgTag))
if (node->isLink() && !isHTMLImageElement(node))
return node;
}
......
......@@ -288,10 +288,10 @@ static HTMLImageElement* imageElementFromImageDocument(Document* document)
Node* node = body->firstChild();
if (!node)
return 0;
if (!node->hasTagName(imgTag))
return 0;
return static_cast<HTMLImageElement*>(node);
if (!isHTMLImageElement(node))
return 0;
return toHTMLImageElement(node);
}
bool Editor::canCopy() const
......
......@@ -156,10 +156,10 @@ static void appendServerMapMousePosition(StringBuilder& url, Event* event)
ASSERT(event->target());
Node* target = event->target()->toNode();
ASSERT(target);
if (!target->hasTagName(imgTag))
if (!isHTMLImageElement(target))
return;
HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(event->target()->toNode());
HTMLImageElement* imageElement = toHTMLImageElement(target);
if (!imageElement || !imageElement->isServerMap())
return;
......
......@@ -112,6 +112,17 @@ private:
CompositeOperator m_compositeOperator;
};
inline bool isHTMLImageElement(Node* node)
{
return node->hasTagName(HTMLNames::imgTag);
}
inline HTMLImageElement* toHTMLImageElement(Node* node)
{
ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLImageElement(node));
return static_cast<HTMLImageElement*>(node);
}
} //namespace
#endif
......@@ -85,12 +85,12 @@ HTMLImageElement* HTMLMapElement::imageElement()
{
RefPtr<HTMLCollection> images = document()->images();
for (unsigned i = 0; Node* curr = images->item(i); i++) {
if (!curr->hasTagName(imgTag))
if (!isHTMLImageElement(curr))
continue;
// The HTMLImageElement's useMap() value includes the '#' symbol at the beginning,
// which has to be stripped off.
HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(curr);
HTMLImageElement* imageElement = toHTMLImageElement(curr);
String useMapName = imageElement->getAttribute(usemapAttr).string().substring(1);
if (equalIgnoringCase(useMapName, m_name))
return imageElement;
......
......@@ -26,6 +26,7 @@
#include "Element.h"
#include "HTMLDocument.h"
#include "HTMLFormElement.h"
#include "HTMLImageElement.h"
#include "HTMLNames.h"
#include "HTMLObjectElement.h"
#include "NodeRareData.h"
......@@ -52,7 +53,7 @@ HTMLNameCollection::~HTMLNameCollection()
bool WindowNameCollection::nodeMatchesIfNameAttributeMatch(Element* element)
{
return element->hasTagName(imgTag) || isHTMLFormElement(element) || element->hasTagName(appletTag)
return isHTMLImageElement(element) || isHTMLFormElement(element) || element->hasTagName(appletTag)
|| element->hasTagName(embedTag) || element->hasTagName(objectTag);
}
......@@ -68,14 +69,14 @@ bool DocumentNameCollection::nodeMatchesIfIdAttributeMatch(Element* element)
{
// FIXME: we need to fix HTMLImageElement to update the hash map for us when name attribute has been removed.
return element->hasTagName(appletTag) || (element->hasTagName(objectTag) && toHTMLObjectElement(element)->isDocNamedItem())
|| (element->hasTagName(imgTag) && element->hasName());
|| (isHTMLImageElement(element) && element->hasName());
}
bool DocumentNameCollection::nodeMatchesIfNameAttributeMatch(Element* element)
{
return isHTMLFormElement(element) || element->hasTagName(embedTag) || element->hasTagName(iframeTag)
|| element->hasTagName(appletTag) || (element->hasTagName(objectTag) && toHTMLObjectElement(element)->isDocNamedItem())
|| element->hasTagName(imgTag);
|| isHTMLImageElement(element);
}
bool DocumentNameCollection::nodeMatches(Element* element, const AtomicString& name)
......@@ -88,7 +89,7 @@ bool DocumentNameCollection::nodeMatches(Element* element, const AtomicString& n
return element->getNameAttribute() == name || element->getIdAttribute() == name;
if (element->hasTagName(objectTag))
return (element->getNameAttribute() == name || element->getIdAttribute() == name) && toHTMLObjectElement(element)->isDocNamedItem();
if (element->hasTagName(imgTag))
if (isHTMLImageElement(element))
return element->getNameAttribute() == name || (element->getIdAttribute() == name && element->hasName());
return false;
}
......
......@@ -51,6 +51,7 @@
#include "FrameSelection.h"
#include "FrameView.h"
#include "HTMLAnchorElement.h"
#include "HTMLImageElement.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
......@@ -659,7 +660,7 @@ Element* DragController::draggableElement(const Frame* sourceFrame, Element* sta
}
if (dragMode == DRAG_AUTO) {
if ((m_dragSourceAction & DragSourceActionImage)
&& node->hasTagName(HTMLNames::imgTag)
&& isHTMLImageElement(node)
&& sourceFrame->settings()
&& sourceFrame->settings()->loadsImagesAutomatically()) {
state.type = static_cast<DragSourceAction>(state.type | DragSourceActionImage);
......
......@@ -231,8 +231,8 @@ void PageSerializer::serializeFrame(Frame* frame)
if (element->isStyledElement())
retrieveResourcesForProperties(static_cast<StyledElement*>(element)->inlineStyle(), document);
if (element->hasTagName(HTMLNames::imgTag)) {
HTMLImageElement* imageElement = static_cast<HTMLImageElement*>(element);
if (isHTMLImageElement(element)) {
HTMLImageElement* imageElement = toHTMLImageElement(element);
KURL url = document->completeURL(imageElement->getAttribute(HTMLNames::srcAttr));
CachedImage* cachedImage = imageElement->cachedImage();
addImageToResources(cachedImage, imageElement->renderer(), url);
......
......@@ -25,6 +25,7 @@
#include "DocumentFragment.h"
#include "Editor.h"
#include "Frame.h"
#include "HTMLImageElement.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HTMLParserIdioms.h"
......@@ -199,7 +200,7 @@ static KURL getURLForImageNode(Node* node)
{
// FIXME: Later this code should be shared with Chromium somehow. Chances are all platforms want it.
AtomicString urlString;
if (node->hasTagName(HTMLNames::imgTag) || isHTMLInputElement(node))
if (isHTMLImageElement(node) || isHTMLInputElement(node))
urlString = toElement(node)->getAttribute(HTMLNames::srcAttr);
#if ENABLE(SVG)
else if (node->hasTagName(SVGNames::imageTag))
......
......@@ -40,6 +40,7 @@
#import "Font.h"
#import "Frame.h"
#import "FrameLoader.h"
#import "HTMLImageElement.h"
#import "HTMLNames.h"
#import "HTMLParserIdioms.h"
#import "LoaderNSURLExtras.h"
......@@ -1675,7 +1676,7 @@ static NSInteger _colCompare(id block1, id block2, void *)
if (startContainer == endContainer && (startOffset == endOffset - 1)) {
Node* node = startContainer->childNode(startOffset);
if (node && node->hasTagName(imgTag)) {
if (node && isHTMLImageElement(node)) {
NSFileWrapper* fileWrapper = fileWrapperForElement(toElement(node));
NSTextAttachment* attachment = [[NSTextAttachment alloc] initWithFileWrapper:fileWrapper];
[string appendAttributedString:[NSAttributedString attributedStringWithAttachment:attachment]];
......
......@@ -271,8 +271,8 @@ String HitTestResult::altDisplayString() const
if (!m_innerNonSharedNode)
return String();
if (m_innerNonSharedNode->hasTagName(imgTag)) {
HTMLImageElement* image = static_cast<HTMLImageElement*>(m_innerNonSharedNode.get());
if (isHTMLImageElement(m_innerNonSharedNode.get())) {
HTMLImageElement* image = toHTMLImageElement(m_innerNonSharedNode.get());
return displayString(image->getAttribute(altAttr), m_innerNonSharedNode.get());
}
......@@ -316,7 +316,7 @@ KURL HitTestResult::absoluteImageURL() const
AtomicString urlString;
if (m_innerNonSharedNode->hasTagName(embedTag)
|| m_innerNonSharedNode->hasTagName(imgTag)
|| isHTMLImageElement(m_innerNonSharedNode.get())
|| isHTMLInputElement(m_innerNonSharedNode.get())
|| m_innerNonSharedNode->hasTagName(objectTag)
#if ENABLE(SVG)
......
......@@ -471,7 +471,7 @@ void RenderImage::paintIntoRect(GraphicsContext* context, const LayoutRect& rect
if (!img || img->isNull())
return;
HTMLImageElement* imageElt = (node() && node()->hasTagName(imgTag)) ? static_cast<HTMLImageElement*>(node()) : 0;
HTMLImageElement* imageElt = (node() && isHTMLImageElement(node())) ? toHTMLImageElement(node()) : 0;
CompositeOperator compositeOperator = imageElt ? imageElt->compositeOperator() : CompositeSourceOver;
Image* image = m_imageResource->image().get();
bool useLowQualityScaling = shouldPaintAtLowQuality(context, image, image, alignedRect.size());
......@@ -524,7 +524,7 @@ LayoutUnit RenderImage::minimumReplacedHeight() const
HTMLMapElement* RenderImage::imageMap() const
{
HTMLImageElement* i = node() && node()->hasTagName(imgTag) ? static_cast<HTMLImageElement*>(node()) : 0;
HTMLImageElement* i = node() && isHTMLImageElement(node()) ? toHTMLImageElement(node()) : 0;
return i ? i->treeScope()->getImageMap(i->fastGetAttribute(usemapAttr)) : 0;
}
......@@ -559,8 +559,8 @@ void RenderImage::updateAltText()
if (isHTMLInputElement(node()))
m_altText = toHTMLInputElement(node())->altText();
else if (node()->hasTagName(imgTag))
m_altText = static_cast<HTMLImageElement*>(node())->altText();
else if (isHTMLImageElement(node()))
m_altText = toHTMLImageElement(node())->altText();
}
void RenderImage::layout()
......
......@@ -40,6 +40,7 @@
#include "GraphicsContext.h"
#include "HTMLAnchorElement.h"
#include "HTMLElement.h"
#include "HTMLImageElement.h"
#include "HTMLNames.h"
#include "HitTestResult.h"
#include "LogicalSelectionOffsetCaches.h"
......@@ -2328,7 +2329,7 @@ RespectImageOrientationEnum RenderObject::shouldRespectImageOrientation() const
// This can only be enabled for ports which honor the orientation flag in their drawing code.
document()->isImageDocument() ||
#endif
(document()->settings() && document()->settings()->shouldRespectImageOrientation() && node() && node()->hasTagName(HTMLNames::imgTag)) ? RespectImageOrientation : DoNotRespectImageOrientation;
(document()->settings() && document()->settings()->shouldRespectImageOrientation() && node() && isHTMLImageElement(node())) ? RespectImageOrientation : DoNotRespectImageOrientation;
}
bool RenderObject::hasOutlineAnnotation() const
......
......@@ -2133,7 +2133,7 @@ Platform::WebContext WebPagePrivate::webContext(TargetDetectionStrategy strategy
layoutIfNeeded();
bool nodeAllowSelectionOverride = false;
bool nodeIsImage = node->isHTMLElement() && node->hasTagName(HTMLNames::imgTag);
bool nodeIsImage = node->isHTMLElement() && isHTMLImageElement(node);
Node* linkNode = node->enclosingLinkEventParentOrSelf();
// Set link url only when the node is linked image, or text inside anchor. Prevent CCM popup when long press non-link element(eg. button) inside an anchor.
if (linkNode && (node == linkNode || node->isTextNode() || nodeIsImage)) {
......@@ -2161,8 +2161,8 @@ Platform::WebContext WebPagePrivate::webContext(TargetDetectionStrategy strategy
HTMLImageElement* imageElement = 0;
HTMLMediaElement* mediaElement = 0;
if (node->hasTagName(HTMLNames::imgTag))
imageElement = static_cast<HTMLImageElement*>(node.get());
if (isHTMLImageElement(node))
imageElement = toHTMLImageElement(node.get());
else if (isHTMLAreaElement(node))
imageElement = toHTMLAreaElement(node.get())->imageElement();
......@@ -2831,7 +2831,7 @@ IntRect WebPagePrivate::blockZoomRectForNode(Node* node)
double blockToPageRatio = static_cast<double>(pageArea - originalArea) / pageArea;
double blockExpansionRatio = 5.0 * blockToPageRatio * blockToPageRatio;
if (!tnode->hasTagName(HTMLNames::imgTag) && !isHTMLInputElement(tnode) && !tnode->hasTagName(HTMLNames::textareaTag)) {
if (!isHTMLImageElement(tnode) && !isHTMLInputElement(tnode) && !tnode->hasTagName(HTMLNames::textareaTag)) {
while ((tnode = tnode->parentNode())) {
ASSERT(tnode);
IntRect tRect = rectForNode(tnode);
......@@ -4499,7 +4499,7 @@ bool WebPage::blockZoom(const Platform::IntPoint& documentTargetPoint)
// Don't use a block if it is too close to the size of the actual contents.
// We allow this for images only so that they can be zoomed tight to the screen.
if (!node->hasTagName(HTMLNames::imgTag)) {
if (!isHTMLImageElement(node)) {
const IntRect tRect = viewportAccessor->roundToDocumentFromPixelContents(WebCore::FloatRect(blockRect));
int blockArea = tRect.width() * tRect.height();
int pageArea = d->contentsSize().width() * d->contentsSize().height();
......
2013-06-28 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLImageElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118182
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLImageElement.
This also helps out to reduce duplicated use of static_cast.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):
(BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
(BlackBerry::WebKit::WebPage::blockZoom):
* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::isElementClickable):
2013-06-27 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLInputElement for code cleanup
......
......@@ -93,7 +93,7 @@ bool FatFingers::isElementClickable(Element* element) const
if (element->webkitMatchesSelector("a[href],*:link,*:visited,*[role=button],button,input,select,label[for],area[href],textarea,embed,object", ec)
|| element->isMediaControlElement()
|| element->isContentEditable()
|| (element->hasTagName(HTMLNames::imgTag) && element->parentNode() && isHTMLAnchorElement(element->parentNode())))
|| (isHTMLImageElement(element) && element->parentNode() && isHTMLAnchorElement(element->parentNode())))
return true;
return hasMousePressListener(element)
......
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