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

Unified Diff: Source/core/html/HTMLImageElement.cpp

Issue 372233002: Style and layout should be done before getting value for x() and y() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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/html/HTMLImageElement.cpp
diff --git a/Source/core/html/HTMLImageElement.cpp b/Source/core/html/HTMLImageElement.cpp
index 42284dad9ce7057d9197d4d93ed4e9993bcca952..516fa7deea4eec46cc4f729afb89b0f56499df96 100644
--- a/Source/core/html/HTMLImageElement.cpp
+++ b/Source/core/html/HTMLImageElement.cpp
@@ -449,6 +449,7 @@ void HTMLImageElement::setWidth(int value)
int HTMLImageElement::x() const
{
+ document().updateLayoutIgnorePendingStylesheets();
RenderObject* r = renderer();
if (!r)
return 0;
@@ -460,6 +461,7 @@ int HTMLImageElement::x() const
int HTMLImageElement::y() const
{
+ document().updateLayoutIgnorePendingStylesheets();
RenderObject* r = renderer();
if (!r)
return 0;

Powered by Google App Engine
This is Rietveld 408576698