summaryrefslogtreecommitdiff
path: root/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp
index b3a8ecc37e..5fbeac63d9 100644
--- a/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp
+++ b/src/3rdparty/webkit/WebCore/wml/WMLAElement.cpp
@@ -37,8 +37,9 @@
#include "FrameLoader.h"
#include "HTMLNames.h"
#include "KeyboardEvent.h"
+#include "MappedAttribute.h"
#include "MouseEvent.h"
-#include "RenderFlow.h"
+#include "RenderBox.h"
#include "WMLNames.h"
namespace WebCore {
@@ -56,7 +57,7 @@ void WMLAElement::parseMappedAttribute(MappedAttribute* attr)
bool wasLink = isLink();
setIsLink(!attr->isNull());
if (wasLink != isLink())
- setChanged();
+ setNeedsStyleRecalc();
if (isLink() && document()->isDNSPrefetchEnabled()) {
String value = attr->value();
if (protocolIs(value, "http") || protocolIs(value, "https") || value.startsWith("//"))
@@ -101,12 +102,14 @@ bool WMLAElement::isKeyboardFocusable(KeyboardEvent* event) const
if (!document()->frame()->eventHandler()->tabsToLinks(event))
return false;
+ if (!renderer() || !renderer()->isBoxModelObject())
+ return false;
+
// Before calling absoluteRects, check for the common case where the renderer
- // or one of the continuations is non-empty, since this is a faster check and
- // almost always returns true.
- for (RenderObject* r = renderer(); r; r = r->continuation())
- if (r->width() > 0 && r->height() > 0)
- return true;
+ // is non-empty, since this is a faster check and almost always returns true.
+ RenderBoxModelObject* box = toRenderBoxModelObject(renderer());
+ if (!box->borderBoundingBox().isEmpty())
+ return true;
Vector<IntRect> rects;
FloatPoint absPos = renderer()->localToAbsolute();
@@ -148,7 +151,7 @@ void WMLAElement::defaultEventHandler(Event* event)
if (!event->defaultPrevented() && document()->frame()) {
KURL url = document()->completeURL(parseURL(getAttribute(HTMLNames::hrefAttr)));
- document()->frame()->loader()->urlSelected(url, target(), event, false, true);
+ document()->frame()->loader()->urlSelected(url, target(), event, false, false, true);
}
event->setDefaultHandled();