| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 return result; | 69 return result; |
| 70 } | 70 } |
| 71 | 71 |
| 72 WebInspector.CSSStyleModel.Events = { | 72 WebInspector.CSSStyleModel.Events = { |
| 73 StyleSheetAdded: "StyleSheetAdded", | 73 StyleSheetAdded: "StyleSheetAdded", |
| 74 StyleSheetChanged: "StyleSheetChanged", | 74 StyleSheetChanged: "StyleSheetChanged", |
| 75 StyleSheetRemoved: "StyleSheetRemoved", | 75 StyleSheetRemoved: "StyleSheetRemoved", |
| 76 MediaQueryResultChanged: "MediaQueryResultChanged", | 76 MediaQueryResultChanged: "MediaQueryResultChanged", |
| 77 NamedFlowCreated: "NamedFlowCreated", | 77 NamedFlowCreated: "NamedFlowCreated", |
| 78 NamedFlowRemoved: "NamedFlowRemoved", | 78 NamedFlowRemoved: "NamedFlowRemoved", |
| 79 RegionLayoutUpdated: "RegionLayoutUpdated" | 79 RegionLayoutUpdated: "RegionLayoutUpdated", |
| 80 RegionOversetChanged: "RegionOversetChanged" |
| 80 } | 81 } |
| 81 | 82 |
| 82 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld
", "print", "projection", "screen", "speech", "tty", "tv"]; | 83 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld
", "print", "projection", "screen", "speech", "tty", "tv"]; |
| 83 | 84 |
| 84 WebInspector.CSSStyleModel.prototype = { | 85 WebInspector.CSSStyleModel.prototype = { |
| 85 /** | 86 /** |
| 86 * @param {DOMAgent.NodeId} nodeId | 87 * @param {DOMAgent.NodeId} nodeId |
| 87 * @param {boolean} needPseudo | 88 * @param {boolean} needPseudo |
| 88 * @param {boolean} needInherited | 89 * @param {boolean} needInherited |
| 89 * @param {function(?*)} userCallback | 90 * @param {function(?*)} userCallback |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 var namedFlowCollection = this._namedFlowCollections[namedFlow.documentN
odeId]; | 496 var namedFlowCollection = this._namedFlowCollections[namedFlow.documentN
odeId]; |
| 496 | 497 |
| 497 if (!namedFlowCollection) | 498 if (!namedFlowCollection) |
| 498 return; | 499 return; |
| 499 | 500 |
| 500 namedFlowCollection._appendNamedFlow(namedFlow); | 501 namedFlowCollection._appendNamedFlow(namedFlow); |
| 501 this.dispatchEventToListeners(WebInspector.CSSStyleModel.Events.RegionLa
youtUpdated, namedFlow); | 502 this.dispatchEventToListeners(WebInspector.CSSStyleModel.Events.RegionLa
youtUpdated, namedFlow); |
| 502 }, | 503 }, |
| 503 | 504 |
| 504 /** | 505 /** |
| 506 * @param {CSSAgent.NamedFlow} namedFlowPayload |
| 507 */ |
| 508 _regionOversetChanged: function(namedFlowPayload) |
| 509 { |
| 510 var namedFlow = WebInspector.NamedFlow.parsePayload(namedFlowPayload); |
| 511 var namedFlowCollection = this._namedFlowCollections[namedFlow.documentN
odeId]; |
| 512 |
| 513 if (!namedFlowCollection) |
| 514 return; |
| 515 |
| 516 namedFlowCollection._appendNamedFlow(namedFlow); |
| 517 this.dispatchEventToListeners(WebInspector.CSSStyleModel.Events.RegionOv
ersetChanged, namedFlow); |
| 518 }, |
| 519 |
| 520 /** |
| 505 * @param {CSSAgent.StyleSheetId} styleSheetId | 521 * @param {CSSAgent.StyleSheetId} styleSheetId |
| 506 * @param {string} newText | 522 * @param {string} newText |
| 507 * @param {boolean} majorChange | 523 * @param {boolean} majorChange |
| 508 * @param {function(?string)} userCallback | 524 * @param {function(?string)} userCallback |
| 509 */ | 525 */ |
| 510 setStyleSheetText: function(styleSheetId, newText, majorChange, userCallback
) | 526 setStyleSheetText: function(styleSheetId, newText, majorChange, userCallback
) |
| 511 { | 527 { |
| 512 function callback(error) | 528 function callback(error) |
| 513 { | 529 { |
| 514 this._pendingCommandsMajorState.pop(); | 530 this._pendingCommandsMajorState.pop(); |
| (...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1584 { | 1600 { |
| 1585 this._cssModel._namedFlowRemoved(documentNodeId, flowName); | 1601 this._cssModel._namedFlowRemoved(documentNodeId, flowName); |
| 1586 }, | 1602 }, |
| 1587 | 1603 |
| 1588 /** | 1604 /** |
| 1589 * @param {CSSAgent.NamedFlow} namedFlowPayload | 1605 * @param {CSSAgent.NamedFlow} namedFlowPayload |
| 1590 */ | 1606 */ |
| 1591 regionLayoutUpdated: function(namedFlowPayload) | 1607 regionLayoutUpdated: function(namedFlowPayload) |
| 1592 { | 1608 { |
| 1593 this._cssModel._regionLayoutUpdated(namedFlowPayload); | 1609 this._cssModel._regionLayoutUpdated(namedFlowPayload); |
| 1610 }, |
| 1611 |
| 1612 /** |
| 1613 * @param {CSSAgent.NamedFlow} namedFlowPayload |
| 1614 */ |
| 1615 regionOversetChanged: function(namedFlowPayload) |
| 1616 { |
| 1617 this._cssModel._regionOversetChanged(namedFlowPayload); |
| 1594 } | 1618 } |
| 1595 } | 1619 } |
| 1596 | 1620 |
| 1597 /** | 1621 /** |
| 1598 * @constructor | 1622 * @constructor |
| 1599 * @param {CSSAgent.NamedFlow} payload | 1623 * @param {CSSAgent.NamedFlow} payload |
| 1600 */ | 1624 */ |
| 1601 WebInspector.NamedFlow = function(payload) | 1625 WebInspector.NamedFlow = function(payload) |
| 1602 { | 1626 { |
| 1603 this.documentNodeId = payload.documentNodeId; | 1627 this.documentNodeId = payload.documentNodeId; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 | 1682 |
| 1659 if (!namedFlow) | 1683 if (!namedFlow) |
| 1660 return null; | 1684 return null; |
| 1661 return namedFlow; | 1685 return namedFlow; |
| 1662 } | 1686 } |
| 1663 } | 1687 } |
| 1664 /** | 1688 /** |
| 1665 * @type {WebInspector.CSSStyleModel} | 1689 * @type {WebInspector.CSSStyleModel} |
| 1666 */ | 1690 */ |
| 1667 WebInspector.cssModel = null; | 1691 WebInspector.cssModel = null; |
| OLD | NEW |