-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
7f1d79e [DevTools] Cleanup DOMExtension.js. 51874ed DevTools: render element tree hover as a block. 9633b79 [Devtools] New network timeline experiment Part 1 3972f98 Timeline: fix sync layout warning in case of microtasks 75330c0 DevTools: introduce WI.CharacterIdMap ab663e4 [DevTools] Rework some focus code. 4ad969d DevTools: Migrate from SourcesTextEditorDelegate to events 493a661 DevTools: minor cleanup of ConsoleViewMessage, use switch for formatters 42daf73 DevTools: disable smoothing and correct nexus device frame dimensions for screenshots 36d8949 [DevTools] Support top/bottom show sidebar button. cb082a9 DevTools: fix sourceMapURL for inline stylesheets git-subtree-dir: resources/unpacked/devtools git-subtree-split: 7f1d79e
- Loading branch information
Showing
61 changed files
with
1,036 additions
and
832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* @constructor | ||
* @template T | ||
*/ | ||
WebInspector.CharacterIdMap = function() | ||
{ | ||
/** @type {!Map<T, string>} */ | ||
this._elementToCharacter = new Map(); | ||
/** @type {!Map<string, T>} */ | ||
this._characterToElement = new Map(); | ||
this._charCode = 33; | ||
} | ||
|
||
WebInspector.CharacterIdMap.prototype = { | ||
/** | ||
* @param {T} object | ||
* @return {string} | ||
*/ | ||
toChar: function(object) | ||
{ | ||
var character = this._elementToCharacter.get(object); | ||
if (!character) { | ||
if (this._charCode >= 0xFFFF) | ||
throw new Error("CharacterIdMap ran out of capacity!"); | ||
character = String.fromCharCode(this._charCode++); | ||
this._elementToCharacter.set(object, character); | ||
this._characterToElement.set(character, object); | ||
} | ||
return character; | ||
}, | ||
|
||
/** | ||
* @param {string} character | ||
* @return {?T} | ||
*/ | ||
fromChar: function(character) | ||
{ | ||
return this._characterToElement.get(character) || null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.