[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
simon.fraser at apple.com
simon.fraser at apple.com
Thu Feb 4 21:25:37 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 21f880a5e7f212ad67ec029eb6dc52a462abfe99
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Jan 23 00:46:29 2010 +0000
2010-01-22 Simon Fraser <simon.fraser at apple.com>
Reviewed by Dan Bernstein.
webkitConvertPointFromNodeToPage doesn't take into account most recent transform style
https://bugs.webkit.org/show_bug.cgi?id=34023
Be sure to call updateLayoutIgnorePendingStylesheets() before doing point mapping,
to apply any style changes since the last layout.
Test: fast/dom/Window/webkitConvertPointUpdateLayout.html
* page/DOMWindow.cpp:
(WebCore::DOMWindow::webkitConvertPointFromNodeToPage): Call updateLayoutIgnorePendingStylesheets().
(WebCore::DOMWindow::webkitConvertPointFromPageToNode): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 22a44aa..07180fc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-22 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ webkitConvertPointFromNodeToPage doesn't take into account most recent transform style
+ https://bugs.webkit.org/show_bug.cgi?id=34023
+
+ Testcase that changes style just before calling webkitConvertPointFromNodeToPage.
+
+ * fast/dom/Window/webkitConvertPointUpdateLayout.html: Added.
+
2010-01-22 Dmitry Titov <dimich at chromium.org>
Not reviewed, fixes one issue with window-property-descriptors test.
diff --git a/LayoutTests/fast/dom/Window/webkitConvertPointUpdateLayout.html b/LayoutTests/fast/dom/Window/webkitConvertPointUpdateLayout.html
new file mode 100644
index 0000000..1262f31
--- /dev/null
+++ b/LayoutTests/fast/dom/Window/webkitConvertPointUpdateLayout.html
@@ -0,0 +1,50 @@
+<html>
+ <head>
+ <title>webkitConvertPointFromNodeToPage Test</title>
+
+ <link rel="stylesheet" href="../../js/resources/js-test-style.css"/>
+ <script src="../../js/resources/js-test-pre.js"></script>
+
+ <style type="text/css" media="screen">
+
+ #test {
+ position: absolute;
+ left: 10px;
+ top: 10px;
+ width: 50px;
+ height: 50px;
+ background-color: blue;
+ }
+
+ </style>
+
+ <script type="text/javascript" charset="utf-8">
+ function doTest()
+ {
+ description("This test exercises the webkitConvertPointFromNodeToPage() function after changing the transform.");
+
+ var node = document.getElementById('test');
+ node.style.webkitTransform = 'translate(50px, 60px)';
+ var p = webkitConvertPointFromNodeToPage(node, new WebKitPoint(0, 0));
+ x = Math.round(p.x);
+ y = Math.round(p.y);
+ shouldBe('x', 60 + "");
+ shouldBe('y', 70 + "");
+
+ shouldBeTrue("successfullyParsed");
+ debug('<br /><span class="pass">TEST COMPLETE</span>');
+ }
+
+ window.addEventListener('load', doTest, false);
+
+ successfullyParsed = true;
+ </script>
+
+ </head>
+ <body>
+ <div id="test"></div>
+
+ <div id="description" style="margin-top: 200px"></div>
+ <div id="console"></div>
+ </body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 536e598..4cb1e36 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-22 Simon Fraser <simon.fraser at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ webkitConvertPointFromNodeToPage doesn't take into account most recent transform style
+ https://bugs.webkit.org/show_bug.cgi?id=34023
+
+ Be sure to call updateLayoutIgnorePendingStylesheets() before doing point mapping,
+ to apply any style changes since the last layout.
+
+ Test: fast/dom/Window/webkitConvertPointUpdateLayout.html
+
+ * page/DOMWindow.cpp:
+ (WebCore::DOMWindow::webkitConvertPointFromNodeToPage): Call updateLayoutIgnorePendingStylesheets().
+ (WebCore::DOMWindow::webkitConvertPointFromPageToNode): Ditto.
+
2010-01-22 Maciej Stachowiak <mjs at apple.com>
Reviewed by Adam Roben.
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 3e1db8f..27b00fa 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -1087,7 +1087,9 @@ PassRefPtr<WebKitPoint> DOMWindow::webkitConvertPointFromNodeToPage(Node* node,
{
if (!node || !p)
return 0;
-
+
+ m_frame->document()->updateLayoutIgnorePendingStylesheets();
+
FloatPoint pagePoint(p->x(), p->y());
pagePoint = node->convertToPage(pagePoint);
return WebKitPoint::create(pagePoint.x(), pagePoint.y());
@@ -1097,7 +1099,9 @@ PassRefPtr<WebKitPoint> DOMWindow::webkitConvertPointFromPageToNode(Node* node,
{
if (!node || !p)
return 0;
-
+
+ m_frame->document()->updateLayoutIgnorePendingStylesheets();
+
FloatPoint nodePoint(p->x(), p->y());
nodePoint = node->convertFromPage(nodePoint);
return WebKitPoint::create(nodePoint.x(), nodePoint.y());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list