Chromium Code Reviews| 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; |
| } |