Created attachment 226854 [details] uses testharness.js The x and y attributes on an HTMLImageElement are supposed to give the left/top border edge positions of the image's layout box. In WebKit/Blink, they always return 0. I've submitted this testharness.js testcase to the CSSWG test repository. It succeeds in Firefox and Opera 12.
Alan, are you looking into this? If not, I'd like to handle it.
(In reply to comment #1) > Alan, are you looking into this? > If not, I'd like to handle it. Please go ahead, Alan is not working on this issue.
Created attachment 228391 [details] Patch
I uploaded patch for this issue. I'm not sure whether I can use the attached test case created by Alan Stearns or not. If reviewers and Alan give me feedback, I'll update it. Thanks,
Comment on attachment 228391 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=228391&action=review The right basic idea here, but incorrect implementation. > Source/WebCore/html/HTMLImageElement.cpp:382 > + document().updateStyleIfNeeded(); The correct call to make here is: document().updateLayoutIgnorePendingStylesheets(); See Element::offsetLeft for an example of how to do it. > Source/WebCore/html/HTMLImageElement.cpp:389 > + if (renderer->needsLayout()) > + document().updateLayout(); This is not needed. Please don’t add it. > Source/WebCore/html/HTMLImageElement.cpp:397 > + document().updateStyleIfNeeded(); Same comment as above. > Source/WebCore/html/HTMLImageElement.cpp:404 > + if (renderer->needsLayout()) > + document().updateLayout(); This is not needed. Please don’t add it.
Created attachment 228496 [details] Patch
Darin, Thank you for review. I updated my patch. Please look into that. Thanks,
Comment on attachment 228496 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=228496&action=review > Source/WebCore/ChangeLog:7 > + https://bugs.webkit.org/show_bug.cgi?id=130308 Wrong place for bug title and url. bad values from HTMLImageElement x and y attributes (CSSOM-View) https://bugs.webkit.org/show_bug.cgi?id=130308 > LayoutTests/ChangeLog:3 > + According to CSSOM-View, âinterface HTMLImageElementâ, ditto.
Created attachment 228672 [details] Patch for landing
Comment on attachment 228672 [details] Patch for landing Clearing flags on attachment: 228672 Committed r166833: <http://trac.webkit.org/changeset/166833>
All reviewed patches have been landed. Closing bug.