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

Side by Side Diff: Source/WebCore/inspector/front-end/Popover.js

Issue 7778006: Merge 93868 - Web Inspector: in some cases Popover code is failing to calculate popover box posit... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 const borderRadius = 10; 87 const borderRadius = 10;
88 88
89 // Skinny tooltips are not pretty, their arrow location is not nice. 89 // Skinny tooltips are not pretty, their arrow location is not nice.
90 preferredWidth = Math.max(preferredWidth, 50); 90 preferredWidth = Math.max(preferredWidth, 50);
91 const totalWidth = window.innerWidth; 91 const totalWidth = window.innerWidth;
92 const totalHeight = window.innerHeight; 92 const totalHeight = window.innerHeight;
93 93
94 var anchorBox = anchorElement.offsetRelativeToWindow(window); 94 var anchorBox = anchorElement.offsetRelativeToWindow(window);
95 anchorBox.width = anchorElement.offsetWidth; 95 anchorBox.width = anchorElement.offsetWidth;
96 anchorBox.height = anchorElement.offsetHeight; 96 anchorBox.height = anchorElement.offsetHeight;
97 while (anchorElement !== anchorElement.ownerDocument.body) { 97 while (anchorElement && anchorElement !== anchorElement.ownerDocument.bo dy) {
98 if (anchorElement.scrollLeft) 98 if (anchorElement.scrollLeft)
99 anchorBox.x -= anchorElement.scrollLeft; 99 anchorBox.x -= anchorElement.scrollLeft;
100 if (anchorElement.scrollTop) 100 if (anchorElement.scrollTop)
101 anchorBox.y -= anchorElement.scrollTop; 101 anchorBox.y -= anchorElement.scrollTop;
102 anchorElement = anchorElement.parentElement; 102 anchorElement = anchorElement.parentElement;
103 } 103 }
104 104
105 var newElementPosition = { x: 0, y: 0, width: preferredWidth + scrollerW idth, height: preferredHeight }; 105 var newElementPosition = { x: 0, y: 0, width: preferredWidth + scrollerW idth, height: preferredHeight };
106 106
107 var verticalAlignment; 107 var verticalAlignment;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 if (this._hidePopupTimer) { 252 if (this._hidePopupTimer) {
253 clearTimeout(this._hidePopupTimer); 253 clearTimeout(this._hidePopupTimer);
254 delete this._hidePopupTimer; 254 delete this._hidePopupTimer;
255 255
256 // We know that we reached the popup, but we might have moved over o ther elements. 256 // We know that we reached the popup, but we might have moved over o ther elements.
257 // Discard pending command. 257 // Discard pending command.
258 this._resetHoverTimer(); 258 this._resetHoverTimer();
259 } 259 }
260 } 260 }
261 } 261 }
OLDNEW
« 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