_preventFollowingLinksOnDoubleClick: function()
{
- var links = this.listItemElement.querySelectorAll("li > .webkit-html-tag > .webkit-html-attribute > .webkit-html-external-link, li > .webkit-html-tag > .webkit-html-attribute > .webkit-html-resource-link");
+ var links = this.listItemElement.querySelectorAll("li .webkit-html-tag > .webkit-html-attribute > .webkit-html-external-link, li .webkit-html-tag > .webkit-html-attribute > .webkit-html-resource-link");
if (!links)
return;
// Remove zero-width spaces that were added by nodeTitleInfo.
removeZeroWidthSpaceRecursive(attribute);
- var config = new WebInspector.EditingConfig(this._attributeEditingCommitted.bind(this), this._editingCancelled.bind(this), attributeName);
+ var config = new WebInspector.InplaceEditor.Config(this._attributeEditingCommitted.bind(this), this._editingCancelled.bind(this), attributeName);
function handleKeyDownEvents(event)
{
config.customFinishHandler = handleKeyDownEvents.bind(this);
- this._editing = WebInspector.startEditing(attribute, config);
+ this._editing = WebInspector.InplaceEditor.startEditing(attribute, config);
window.getSelection().setBaseAndExtent(elementForSelection, 0, elementForSelection, 1);
var container = textNodeElement.enclosingNodeOrSelfWithClass("webkit-html-text-node");
if (container)
container.textContent = textNode.nodeValue(); // Strip the CSS or JS highlighting if present.
- var config = new WebInspector.EditingConfig(this._textNodeEditingCommitted.bind(this, textNode), this._editingCancelled.bind(this));
- this._editing = WebInspector.startEditing(textNodeElement, config);
+ var config = new WebInspector.InplaceEditor.Config(this._textNodeEditingCommitted.bind(this, textNode), this._editingCancelled.bind(this));
+ this._editing = WebInspector.InplaceEditor.startEditing(textNodeElement, config);
window.getSelection().setBaseAndExtent(textNodeElement, 0, textNodeElement, 1);
return true;
tagNameElement.addEventListener('keyup', keyupListener, false);
- var config = new WebInspector.EditingConfig(editingComitted.bind(this), editingCancelled.bind(this), tagName);
- this._editing = WebInspector.startEditing(tagNameElement, config);
+ var config = new WebInspector.InplaceEditor.Config(editingComitted.bind(this), editingCancelled.bind(this), tagName);
+ this._editing = WebInspector.InplaceEditor.startEditing(tagNameElement, config);
window.getSelection().setBaseAndExtent(tagNameElement, 0, tagNameElement, 1);
return true;
},
this.treeOutline.element.focus();
}
- var config = new WebInspector.EditingConfig(commit.bind(this), dispose.bind(this));
+ var config = new WebInspector.InplaceEditor.Config(commit.bind(this), dispose.bind(this));
config.setMultilineOptions(initialValue, { name: "xml", htmlMode: true }, "web-inspector-html", WebInspector.settings.domWordWrap.get(), true);
- this._editing = WebInspector.startEditing(this._htmlEditElement, config);
+ this._editing = WebInspector.InplaceEditor.startEditing(this._htmlEditElement, config);
this._editing.setWidth(this.treeOutline._visibleWidth);
this.treeOutline._multilineEditing = this._editing;
},
*/
_showInlineText: function()
{
- if (this._node.templateContent() || (WebInspector.ElementsTreeOutline.showShadowDOM() && this._node.hasShadowRoots()) || this._node.hasPseudoElements())
+ if (this._node.importedDocument() || this._node.templateContent() || (WebInspector.ElementsTreeOutline.showShadowDOM() && this._node.hasShadowRoots()) || this._node.hasPseudoElements())
return false;
if (this._node.nodeType() !== Node.ELEMENT_NODE)
return false;
_visibleChildren: function()
{
var visibleChildren = WebInspector.ElementsTreeOutline.showShadowDOM() ? this._node.shadowRoots() : [];
+ if (this._node.importedDocument())
+ visibleChildren.push(this._node.importedDocument());
if (this._node.templateContent())
visibleChildren.push(this._node.templateContent());
var pseudoElements = this._node.pseudoElements();
_visibleChildCount: function()
{
var childCount = this._node.childNodeCount();
+ if (this._node.importedDocument())
+ ++childCount;
if (this._node.templateContent())
++childCount;
if (WebInspector.ElementsTreeOutline.showShadowDOM())