Index: third_party/WebKit/WebCore/dom/Element.cpp |
=================================================================== |
--- third_party/WebKit/WebCore/dom/Element.cpp (revision 9391) |
+++ third_party/WebKit/WebCore/dom/Element.cpp (working copy) |
@@ -274,7 +274,7 @@ |
int Element::offsetLeft() |
{ |
document()->updateLayoutIgnorePendingStylesheets(); |
- if (RenderBox* rend = renderBox()) |
+ if (RenderBoxModelObject* rend = renderBoxModelObject()) |
return adjustForLocalZoom(rend->offsetLeft(), rend); |
return 0; |
} |
@@ -282,7 +282,7 @@ |
int Element::offsetTop() |
{ |
document()->updateLayoutIgnorePendingStylesheets(); |
- if (RenderBox* rend = renderBox()) |
+ if (RenderBoxModelObject* rend = renderBoxModelObject()) |
return adjustForLocalZoom(rend->offsetTop(), rend); |
return 0; |
} |
@@ -290,7 +290,7 @@ |
int Element::offsetWidth() |
{ |
document()->updateLayoutIgnorePendingStylesheets(); |
- if (RenderBox* rend = renderBox()) |
+ if (RenderBoxModelObject* rend = renderBoxModelObject()) |
return adjustForAbsoluteZoom(rend->offsetWidth(), rend); |
return 0; |
} |
@@ -298,7 +298,7 @@ |
int Element::offsetHeight() |
{ |
document()->updateLayoutIgnorePendingStylesheets(); |
- if (RenderBox* rend = renderBox()) |
+ if (RenderBoxModelObject* rend = renderBoxModelObject()) |
return adjustForAbsoluteZoom(rend->offsetHeight(), rend); |
return 0; |
} |
@@ -306,7 +306,7 @@ |
Element* Element::offsetParent() |
{ |
document()->updateLayoutIgnorePendingStylesheets(); |
- if (RenderBox* rend = renderBox()) |
+ if (RenderObject* rend = renderer()) |
if (RenderObject* offsetParent = rend->offsetParent()) |
return static_cast<Element*>(offsetParent->element()); |
return 0; |
@@ -343,11 +343,8 @@ |
return view->layoutWidth(); |
} |
- |
- if (RenderBox* rend = renderBox()) { |
- if (!rend->isRenderInline()) |
- return adjustForAbsoluteZoom(rend->clientWidth(), rend); |
- } |
+ if (RenderBox* rend = renderBox()) |
+ return adjustForAbsoluteZoom(rend->clientWidth(), rend); |
return 0; |
} |
@@ -365,10 +362,8 @@ |
return view->layoutHeight(); |
} |
- if (RenderBox* rend = renderBox()) { |
- if (!rend->isRenderInline()) |
- return adjustForAbsoluteZoom(rend->clientHeight(), rend); |
- } |
+ if (RenderBox* rend = renderBox()) |
+ return adjustForAbsoluteZoom(rend->clientHeight(), rend); |
return 0; |
} |
@@ -405,20 +400,16 @@ |
int Element::scrollWidth() |
{ |
document()->updateLayoutIgnorePendingStylesheets(); |
- if (RenderBox* rend = renderBox()) { |
- if (rend->hasOverflowClip() || !rend->isRenderInline()) |
- return adjustForAbsoluteZoom(rend->scrollWidth(), rend); |
- } |
+ if (RenderBox* rend = renderBox()) |
+ return adjustForAbsoluteZoom(rend->scrollWidth(), rend); |
return 0; |
} |
int Element::scrollHeight() |
{ |
document()->updateLayoutIgnorePendingStylesheets(); |
- if (RenderBox* rend = renderBox()) { |
- if (rend->hasOverflowClip() || !rend->isRenderInline()) |
- return adjustForAbsoluteZoom(rend->scrollHeight(), rend); |
- } |
+ if (RenderBox* rend = renderBox()) |
+ return adjustForAbsoluteZoom(rend->scrollHeight(), rend); |
return 0; |
} |