Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Unified Diff: Source/core/dom/Element.cpp

Issue 18601002: Add infrastructure for partial layouts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Work in progress v2 Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index f5eab234cc88aaae78720d3fbae0385340cf0e2a..e7d74b3fe32bd2606cff0e947142af81e290428b 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -568,7 +568,7 @@ static int adjustForLocalZoom(LayoutUnit value, RenderObject* renderer)
int Element::offsetLeft()
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document()->tryPartialUpdateLayoutIgnorePendingStylesheets(renderer());
if (RenderBoxModelObject* renderer = renderBoxModelObject())
return adjustForLocalZoom(renderer->pixelSnappedOffsetLeft(), renderer);
return 0;
@@ -576,7 +576,7 @@ int Element::offsetLeft()
int Element::offsetTop()
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document()->tryPartialUpdateLayoutIgnorePendingStylesheets(renderer());
if (RenderBoxModelObject* renderer = renderBoxModelObject())
return adjustForLocalZoom(renderer->pixelSnappedOffsetTop(), renderer);
return 0;
@@ -591,7 +591,7 @@ int Element::offsetWidth()
return adjustLayoutUnitForAbsoluteZoom(renderer->fixedOffsetWidth(), renderer).round();
}
- document()->updateLayoutIgnorePendingStylesheets();
+ document()->tryPartialUpdateLayoutIgnorePendingStylesheets(renderer());
if (RenderBoxModelObject* renderer = renderBoxModelObject())
return adjustLayoutUnitForAbsoluteZoom(renderer->pixelSnappedOffsetWidth(), renderer).round();
return 0;
@@ -599,7 +599,7 @@ int Element::offsetWidth()
int Element::offsetHeight()
{
- document()->updateLayoutIgnorePendingStylesheets();
+ document()->tryPartialUpdateLayoutIgnorePendingStylesheets(renderer());
if (RenderBoxModelObject* renderer = renderBoxModelObject())
return adjustLayoutUnitForAbsoluteZoom(renderer->pixelSnappedOffsetHeight(), renderer).round();
return 0;

Powered by Google App Engine
This is Rietveld 408576698