Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: Source/devtools/front_end/sdk/CSSStyleModel.js

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 this[propertyIndex] = name; 685 this[propertyIndex] = name;
686 this._livePropertyMap[name] = property; 686 this._livePropertyMap[name] = property;
687 ++propertyIndex; 687 ++propertyIndex;
688 } 688 }
689 this.length = propertyIndex; 689 this.length = propertyIndex;
690 if ("cssText" in payload) 690 if ("cssText" in payload)
691 this.cssText = payload.cssText; 691 this.cssText = payload.cssText;
692 } 692 }
693 693
694 /** 694 /**
695 * @param {!WebInspector.Target} target
695 * @return {!WebInspector.CSSStyleDeclaration} 696 * @return {!WebInspector.CSSStyleDeclaration}
696 */ 697 */
697 WebInspector.CSSStyleDeclaration.createDummyStyle = function() 698 WebInspector.CSSStyleDeclaration.createDummyStyle = function(target)
698 { 699 {
699 var dummyPayload = { 700 var dummyPayload = {
700 shorthandEntries: [], 701 shorthandEntries: [],
701 cssProperties: [] 702 cssProperties: []
702 }; 703 };
703 return new WebInspector.CSSStyleDeclaration(WebInspector.cssModel, dummyPayl oad); 704 return new WebInspector.CSSStyleDeclaration(target.cssModel, dummyPayload);
704 } 705 }
705 706
706 /** 707 /**
707 * @param {!Array.<!CSSAgent.ShorthandEntry>} shorthandEntries 708 * @param {!Array.<!CSSAgent.ShorthandEntry>} shorthandEntries
708 * @return {!Object} 709 * @return {!Object}
709 */ 710 */
710 WebInspector.CSSStyleDeclaration.buildShorthandValueMap = function(shorthandEntr ies) 711 WebInspector.CSSStyleDeclaration.buildShorthandValueMap = function(shorthandEntr ies)
711 { 712 {
712 var result = {}; 713 var result = {};
713 for (var i = 0; i < shorthandEntries.length; ++i) 714 for (var i = 0; i < shorthandEntries.length; ++i)
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 // The loader has been reset. 1812 // The loader has been reset.
1812 if (!callbacks) 1813 if (!callbacks)
1813 return; 1814 return;
1814 1815
1815 delete this._nodeIdToCallbackData[nodeId]; 1816 delete this._nodeIdToCallbackData[nodeId];
1816 for (var i = 0; i < callbacks.length; ++i) 1817 for (var i = 0; i < callbacks.length; ++i)
1817 callbacks[i](computedStyle); 1818 callbacks[i](computedStyle);
1818 } 1819 }
1819 } 1820 }
1820 } 1821 }
1821
1822 /**
1823 * @type {!WebInspector.CSSStyleModel}
1824 */
1825 WebInspector.cssModel;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/CPUProfilerModel.js ('k') | Source/devtools/front_end/sdk/ContentProviders.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698