Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |