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

Unified Diff: sky/engine/core/html/HTMLImageElement.cpp

Issue 834693007: Remove the remaining parts of ignorePendingStylesheets and placeholder styles. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove comment. Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/html/HTMLImageElement.h ('k') | sky/engine/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/HTMLImageElement.cpp
diff --git a/sky/engine/core/html/HTMLImageElement.cpp b/sky/engine/core/html/HTMLImageElement.cpp
index 436e434f9a5be6aa539c2d5dd248bd98b3d0546b..9afecf121bc1e772e2570f05549b76672efa0266 100644
--- a/sky/engine/core/html/HTMLImageElement.cpp
+++ b/sky/engine/core/html/HTMLImageElement.cpp
@@ -185,7 +185,7 @@ void HTMLImageElement::removedFrom(ContainerNode* insertionPoint)
HTMLElement::removedFrom(insertionPoint);
}
-int HTMLImageElement::width(bool ignorePendingStylesheets)
+int HTMLImageElement::width()
{
if (!renderer()) {
// check the attribute first for an explicit pixel value
@@ -199,16 +199,13 @@ int HTMLImageElement::width(bool ignorePendingStylesheets)
return imageLoader().image()->imageSizeForRenderer(renderer()).width();
}
- if (ignorePendingStylesheets)
- document().updateLayoutIgnorePendingStylesheets();
- else
- document().updateLayout();
+ document().updateLayout();
RenderBox* box = renderBox();
return box ? box->contentBoxRect().pixelSnappedWidth() : 0;
}
-int HTMLImageElement::height(bool ignorePendingStylesheets)
+int HTMLImageElement::height()
{
if (!renderer()) {
// check the attribute first for an explicit pixel value
@@ -222,10 +219,7 @@ int HTMLImageElement::height(bool ignorePendingStylesheets)
return imageLoader().image()->imageSizeForRenderer(renderer()).height();
}
- if (ignorePendingStylesheets)
- document().updateLayoutIgnorePendingStylesheets();
- else
- document().updateLayout();
+ document().updateLayout();
RenderBox* box = renderBox();
return box ? box->contentBoxRect().pixelSnappedHeight() : 0;
@@ -287,7 +281,7 @@ void HTMLImageElement::setWidth(int value)
int HTMLImageElement::x() const
{
- document().updateLayoutIgnorePendingStylesheets();
+ document().updateLayout();
RenderObject* r = renderer();
if (!r)
return 0;
@@ -299,7 +293,7 @@ int HTMLImageElement::x() const
int HTMLImageElement::y() const
{
- document().updateLayoutIgnorePendingStylesheets();
+ document().updateLayout();
RenderObject* r = renderer();
if (!r)
return 0;
« no previous file with comments | « sky/engine/core/html/HTMLImageElement.h ('k') | sky/engine/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698