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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/resources/common.js

Issue 2332553002: Walk the entire offsetParent chain in fast/forms/resources/common.js utility functions. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/forms/resources/common.js
diff --git a/third_party/WebKit/LayoutTests/fast/forms/resources/common.js b/third_party/WebKit/LayoutTests/fast/forms/resources/common.js
index 41ea5443fb1c22cb3f41331ad9d44fa080c2807e..c9e1493856bbb78697e1e3f82f9d8e98b03342e7 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/resources/common.js
+++ b/third_party/WebKit/LayoutTests/fast/forms/resources/common.js
@@ -96,16 +96,18 @@ function getAbsoluteRect(element) {
}
function searchCancelButtonPosition(element) {
+ var offset = cumulativeOffset(element);
var pos = {};
- pos.x = element.offsetLeft + element.offsetWidth - 9;
- pos.y = element.offsetTop + element.offsetHeight / 2;
+ pos.x = offset[0] + element.offsetWidth - 9;
+ pos.y = offset[1] + element.offsetHeight / 2;
return pos;
}
function rtlSearchCancelButtonPosition(element) {
+ var offset = cumulativeOffset(element);
var pos = {};
- pos.x = element.offsetLeft + 9;
- pos.y = element.offsetTop + element.offsetHeight / 2;
+ pos.x = offset[0] + 9;
+ pos.y = offset[1] + element.offsetHeight / 2;
return pos;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698