| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 return true; | 99 return true; |
| 100 return false; | 100 return false; |
| 101 } | 101 } |
| 102 | 102 |
| 103 /** | 103 /** |
| 104 * @param {!UI.ContextSubMenuItem} subMenu | 104 * @param {!UI.ContextSubMenuItem} subMenu |
| 105 * @param {!SDK.DOMNode} node | 105 * @param {!SDK.DOMNode} node |
| 106 */ | 106 */ |
| 107 static populateForcedPseudoStateItems(subMenu, node) { | 107 static populateForcedPseudoStateItems(subMenu, node) { |
| 108 const pseudoClasses = ['active', 'hover', 'focus', 'visited']; | 108 const pseudoClasses = ['active', 'hover', 'focus', 'visited']; |
| 109 var forcedPseudoState = SDK.CSSModel.fromNode(node).pseudoState(node); | 109 var forcedPseudoState = node.domModel().cssModel().pseudoState(node); |
| 110 for (var i = 0; i < pseudoClasses.length; ++i) { | 110 for (var i = 0; i < pseudoClasses.length; ++i) { |
| 111 var pseudoClassForced = forcedPseudoState.indexOf(pseudoClasses[i]) >= 0; | 111 var pseudoClassForced = forcedPseudoState.indexOf(pseudoClasses[i]) >= 0; |
| 112 subMenu.appendCheckboxItem( | 112 subMenu.appendCheckboxItem( |
| 113 ':' + pseudoClasses[i], setPseudoStateCallback.bind(null, pseudoClasse
s[i], !pseudoClassForced), | 113 ':' + pseudoClasses[i], setPseudoStateCallback.bind(null, pseudoClasse
s[i], !pseudoClassForced), |
| 114 pseudoClassForced, false); | 114 pseudoClassForced, false); |
| 115 } | 115 } |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * @param {string} pseudoState | 118 * @param {string} pseudoState |
| 119 * @param {boolean} enabled | 119 * @param {boolean} enabled |
| 120 */ | 120 */ |
| 121 function setPseudoStateCallback(pseudoState, enabled) { | 121 function setPseudoStateCallback(pseudoState, enabled) { |
| 122 SDK.CSSModel.fromNode(node).forcePseudoState(node, pseudoState, enabled); | 122 node.domModel().cssModel().forcePseudoState(node, pseudoState, enabled); |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 /** | 126 /** |
| 127 * @return {boolean} | 127 * @return {boolean} |
| 128 */ | 128 */ |
| 129 isClosingTag() { | 129 isClosingTag() { |
| 130 return !!this._elementCloseTag; | 130 return !!this._elementCloseTag; |
| 131 } | 131 } |
| 132 | 132 |
| (...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1609 Elements.ElementsTreeElement.ForbiddenClosingTagElements = new Set([ | 1609 Elements.ElementsTreeElement.ForbiddenClosingTagElements = new Set([ |
| 1610 'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed',
'frame', 'hr', | 1610 'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed',
'frame', 'hr', |
| 1611 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source',
'track', 'wbr' | 1611 'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source',
'track', 'wbr' |
| 1612 ]); | 1612 ]); |
| 1613 | 1613 |
| 1614 // These tags we do not allow editing their tag name. | 1614 // These tags we do not allow editing their tag name. |
| 1615 Elements.ElementsTreeElement.EditTagBlacklist = new Set(['html', 'head', 'body']
); | 1615 Elements.ElementsTreeElement.EditTagBlacklist = new Set(['html', 'head', 'body']
); |
| 1616 | 1616 |
| 1617 /** @typedef {{cancel: function(), commit: function(), resize: function(), edito
r:!UI.TextEditor}} */ | 1617 /** @typedef {{cancel: function(), commit: function(), resize: function(), edito
r:!UI.TextEditor}} */ |
| 1618 Elements.MultilineEditorController; | 1618 Elements.MultilineEditorController; |
| OLD | NEW |