Title: [188518] trunk/Source/WebCore
- Revision
- 188518
- Author
- timothy_hor...@apple.com
- Date
- 2015-08-15 20:46:47 -0700 (Sat, 15 Aug 2015)
Log Message
REGRESSION (r168327): ImageDocuments with margins zoom to the wrong position when clicked
https://bugs.webkit.org/show_bug.cgi?id=148063
Reviewed by Simon Fraser.
No new test because it doesn't seem possible to click on a window.open'd ImageDocument.
* html/ImageDocument.cpp:
(WebCore::ImageEventListener::handleEvent):
Use <img>-relative coordinates, not document-relative coordinates,
because after r168327, the image can be centered.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (188517 => 188518)
--- trunk/Source/WebCore/ChangeLog 2015-08-16 03:29:01 UTC (rev 188517)
+++ trunk/Source/WebCore/ChangeLog 2015-08-16 03:46:47 UTC (rev 188518)
@@ -1,3 +1,17 @@
+2015-08-15 Timothy Horton <timothy_hor...@apple.com>
+
+ REGRESSION (r168327): ImageDocuments with margins zoom to the wrong position when clicked
+ https://bugs.webkit.org/show_bug.cgi?id=148063
+
+ Reviewed by Simon Fraser.
+
+ No new test because it doesn't seem possible to click on a window.open'd ImageDocument.
+
+ * html/ImageDocument.cpp:
+ (WebCore::ImageEventListener::handleEvent):
+ Use <img>-relative coordinates, not document-relative coordinates,
+ because after r168327, the image can be centered.
+
2015-08-15 Simon Fraser <simon.fra...@apple.com>
Have will-change create stacking context when necessary
Modified: trunk/Source/WebCore/html/ImageDocument.cpp (188517 => 188518)
--- trunk/Source/WebCore/html/ImageDocument.cpp 2015-08-16 03:29:01 UTC (rev 188517)
+++ trunk/Source/WebCore/html/ImageDocument.cpp 2015-08-16 03:46:47 UTC (rev 188518)
@@ -400,7 +400,7 @@
m_document.windowSizeChanged();
else if (event->type() == eventNames().clickEvent && is<MouseEvent>(*event)) {
MouseEvent& mouseEvent = downcast<MouseEvent>(*event);
- m_document.imageClicked(mouseEvent.x(), mouseEvent.y());
+ m_document.imageClicked(mouseEvent.offsetX(), mouseEvent.offsetY());
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes