RenderElement::style() should return a reference.
<https://webkit.org/b/123414>
Now that renderers always have style, go ahead and make style()
return a RenderStyle&.
There are countless opportunities for further cleanup enabled by
this change. I'm simply passing &style() in many cases where we
can really do something nicer instead.
Reviewed by Anders Carlsson.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/html/HTMLAreaElement.cpp b/Source/WebCore/html/HTMLAreaElement.cpp
index ef09dfd..9846bfd 100644
--- a/Source/WebCore/html/HTMLAreaElement.cpp
+++ b/Source/WebCore/html/HTMLAreaElement.cpp
@@ -106,7 +106,7 @@
size = obj->absoluteOutlineBounds().size();
Path p = getRegion(size);
- float zoomFactor = obj->style()->effectiveZoom();
+ float zoomFactor = obj->style().effectiveZoom();
if (zoomFactor != 1.0f) {
AffineTransform zoomTransform;
zoomTransform.scale(zoomFactor);
@@ -201,7 +201,7 @@
bool HTMLAreaElement::isFocusable() const
{
HTMLImageElement* image = imageElement();
- if (!image || !image->renderer() || image->renderer()->style()->visibility() != VISIBLE)
+ if (!image || !image->renderer() || image->renderer()->style().visibility() != VISIBLE)
return false;
return supportsFocus() && Element::tabIndex() >= 0;