| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 _getErrorAnchor(target, event) { | 393 _getErrorAnchor(target, event) { |
| 394 var element = target.enclosingNodeOrSelfWithClass('text-editor-line-decorati
on-icon') || | 394 var element = target.enclosingNodeOrSelfWithClass('text-editor-line-decorati
on-icon') || |
| 395 target.enclosingNodeOrSelfWithClass('text-editor-line-decoration-wave'); | 395 target.enclosingNodeOrSelfWithClass('text-editor-line-decoration-wave'); |
| 396 if (!element) | 396 if (!element) |
| 397 return; | 397 return; |
| 398 this._errorWavePopoverAnchor = new AnchorBox(event.clientX, event.clientY, 1
, 1); | 398 this._errorWavePopoverAnchor = new AnchorBox(event.clientX, event.clientY, 1
, 1); |
| 399 return element; | 399 return element; |
| 400 } | 400 } |
| 401 | 401 |
| 402 /** | 402 /** |
| 403 * @param {!Element} anchor | 403 * @param {!Element|!AnchorBox} anchor |
| 404 * @param {!UI.GlassPane} popover | 404 * @param {!UI.GlassPane} popover |
| 405 * @return {!Promise<boolean>} | 405 * @return {!Promise<boolean>} |
| 406 */ | 406 */ |
| 407 _showErrorPopover(anchor, popover) { | 407 _showErrorPopover(anchor, popover) { |
| 408 var messageBucket = anchor.enclosingNodeOrSelfWithClass('text-editor-line-de
coration')._messageBucket; | 408 var element = /** @type {!Element} */ (anchor); |
| 409 var messageBucket = element.enclosingNodeOrSelfWithClass('text-editor-line-d
ecoration')._messageBucket; |
| 409 var messagesOutline = messageBucket.messagesDescription(); | 410 var messagesOutline = messageBucket.messagesDescription(); |
| 410 popover.setContentAnchorBox( | 411 popover.setContentAnchorBox( |
| 411 anchor.enclosingNodeOrSelfWithClass('text-editor-line-decoration-icon')
? anchor.boxInWindow() : | 412 element.enclosingNodeOrSelfWithClass('text-editor-line-decoration-icon')
? element.boxInWindow() : |
| 412
this._errorWavePopoverAnchor); | 413
this._errorWavePopoverAnchor); |
| 413 popover.contentElement.appendChild(messagesOutline); | 414 popover.contentElement.appendChild(messagesOutline); |
| 414 return Promise.resolve(true); | 415 return Promise.resolve(true); |
| 415 } | 416 } |
| 416 | 417 |
| 417 _updateBucketDecorations() { | 418 _updateBucketDecorations() { |
| 418 for (var bucket of this._rowMessageBuckets.values()) | 419 for (var bucket of this._rowMessageBuckets.values()) |
| 419 bucket._updateDecoration(); | 420 bucket._updateDecoration(); |
| 420 } | 421 } |
| 421 | 422 |
| 422 /** | 423 /** |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 | 683 |
| 683 /** | 684 /** |
| 684 * @param {!Workspace.UISourceCode.Message} a | 685 * @param {!Workspace.UISourceCode.Message} a |
| 685 * @param {!Workspace.UISourceCode.Message} b | 686 * @param {!Workspace.UISourceCode.Message} b |
| 686 * @return {number} | 687 * @return {number} |
| 687 */ | 688 */ |
| 688 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) { | 689 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) { |
| 689 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] - | 690 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] - |
| 690 Workspace.UISourceCode.Message._messageLevelPriority[b.level()]; | 691 Workspace.UISourceCode.Message._messageLevelPriority[b.level()]; |
| 691 }; | 692 }; |
| OLD | NEW |