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

Side by Side Diff: sky/engine/core/frame/UseCounter.cpp

Issue 799143002: Remove single client special cases for StyleSheetContents. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/core/dom/StyleEngine.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright (C) 2012 Google, Inc. All rights reserved. 3 * Copyright (C) 2012 Google, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 UseCounter* UseCounter::getFrom(const CSSStyleSheet* sheet) 248 UseCounter* UseCounter::getFrom(const CSSStyleSheet* sheet)
249 { 249 {
250 if (sheet) 250 if (sheet)
251 return getFrom(sheet->contents()); 251 return getFrom(sheet->contents());
252 return 0; 252 return 0;
253 } 253 }
254 254
255 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) 255 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents)
256 { 256 {
257 // FIXME: We may want to handle stylesheets that have multiple owners 257 // TODO(esprehn): Support this in Sky.
ojan 2014/12/13 00:55:38 Is this just: if (sheetContents) return getFrom(
258 // http://crbug.com/242125
259 if (sheetContents && sheetContents->hasSingleOwnerNode())
260 return getFrom(sheetContents->singleOwnerDocument());
261 return 0; 258 return 0;
262 } 259 }
263 260
264 } // namespace blink 261 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/dom/StyleEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698