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

Side by Side Diff: Source/core/css/CSSPropertySourceData.cpp

Issue 172593003: DevTools: [CSS] Add CSS.editRangeInStyleSheetText() to the protocol (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix glitch Created 6 years, 9 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 result.appendLiteral(": "); 102 result.appendLiteral(": ");
103 result.append(value); 103 result.append(value);
104 if (important) 104 if (important)
105 result.appendLiteral(" !important"); 105 result.appendLiteral(" !important");
106 result.append(';'); 106 result.append(';');
107 if (disabled) 107 if (disabled)
108 result.append(" */"); 108 result.append(" */");
109 return result.toString(); 109 return result.toString();
110 } 110 }
111 111
112 unsigned CSSPropertySourceData::hash() const 112 unsigned CSSPropertySourceData::hash() const
vsevik 2014/03/13 10:44:51 Can we replace it with equals?
113 { 113 {
114 return StringHash::hash(name) + 3 * StringHash::hash(value) + 7 * important + 13 * parsedOk + 31; 114 return StringHash::hash(name) + 3 * StringHash::hash(value) + 7 * important + 13 * parsedOk + 31 * disabled + 71;
115 } 115 }
116 116
117 // Global init routines 117 // Global init routines
118 DEFINE_GLOBAL(CSSPropertySourceData, emptyCSSPropertySourceData, "", "e", false, false) 118 DEFINE_GLOBAL(CSSPropertySourceData, emptyCSSPropertySourceData, "", "e", false, false)
119 119
120 // static 120 // static
121 void CSSPropertySourceData::init() 121 void CSSPropertySourceData::init()
122 { 122 {
123 static bool initialized; 123 static bool initialized;
124 if (!initialized) { 124 if (!initialized) {
125 new ((void *) &emptyCSSPropertySourceData) CSSPropertySourceData("", "e" , false, false, false, SourceRange(0, 0)); 125 new ((void *) &emptyCSSPropertySourceData) CSSPropertySourceData("", "e" , false, false, false, SourceRange(0, 0));
126 initialized = true; 126 initialized = true;
127 } 127 }
128 } 128 }
129 129
130 } // namespace WebCore 130 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698