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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js

Issue 2551283002: [DevTools] Fix null tooltip errors (Closed)
Patch Set: Created 4 years 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/Source/devtools/front_end/ui/Tooltip.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js b/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js
index 4e41b8265d35cbd639ebad6cfb948363360ba6da..0ea1c53d711b5ae585a98d5755e764a3e5d1a5ca 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js
@@ -29,13 +29,16 @@ UI.Tooltip = class {
}
/**
+ * Installs the tooltipContent to be shown on mouseover, called when title is set on an Element.
lushnikov 2016/12/06 01:19:37 style: please, drop the documentation comment (i k
paulirish 2016/12/06 01:37:27 Isn't that old policy? Blink is open to comments f
lushnikov 2016/12/06 22:30:23 Let's discuss this on Thursday! We should either
phulce 2016/12/06 23:09:32 Done.
+ * Removes the tooltip if content is null or empty.
+ *
* @param {!Element} element
- * @param {!Element|string} tooltipContent
+ * @param {?Element|string} tooltipContent
* @param {string=} actionId
* @param {!Object=} options
*/
static install(element, tooltipContent, actionId, options) {
- if (typeof tooltipContent === 'string' && tooltipContent === '') {
+ if (tooltipContent === null || tooltipContent === '') {
lushnikov 2016/12/06 01:19:36 if (!tooltipContent) { ... }
phulce 2016/12/06 23:09:32 Done.
delete element[UI.Tooltip._symbol];
return;
}
« 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