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 17 matching lines...) Expand all Loading... |
28 #include "core/frame/UseCounter.h" | 28 #include "core/frame/UseCounter.h" |
29 | 29 |
30 #include "core/css/CSSStyleSheet.h" | 30 #include "core/css/CSSStyleSheet.h" |
31 #include "core/css/StyleSheetContents.h" | 31 #include "core/css/StyleSheetContents.h" |
32 #include "core/dom/Document.h" | 32 #include "core/dom/Document.h" |
33 #include "core/dom/ExecutionContext.h" | 33 #include "core/dom/ExecutionContext.h" |
34 #include "core/frame/DOMWindow.h" | 34 #include "core/frame/DOMWindow.h" |
35 #include "core/page/Page.h" | 35 #include "core/page/Page.h" |
36 #include "core/page/PageConsole.h" | 36 #include "core/page/PageConsole.h" |
37 #include "public/platform/Platform.h" | 37 #include "public/platform/Platform.h" |
38 #include "wtf/text/WTFString.h" | |
39 | 38 |
40 namespace WebCore { | 39 namespace WebCore { |
41 | 40 |
42 static int totalPagesMeasuredCSSSampleId() { return 1; } | 41 static int totalPagesMeasuredCSSSampleId() { return 1; } |
43 | 42 |
44 // FIXME : This mapping should be autogenerated. This function should | 43 // FIXME : This mapping should be autogenerated. This function should |
45 // be moved to a separate file and a script run at build time | 44 // be moved to a separate file and a script run at build time |
46 // to detect new values in CSSPropertyID and add them to the | 45 // to detect new values in CSSPropertyID and add them to the |
47 // end of this function. This file would be checked in. | 46 // end of this function. This file would be checked in. |
48 // https://code.google.com/p/chromium/issues/detail?id=234940 | 47 // https://code.google.com/p/chromium/issues/detail?id=234940 |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) | 725 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) |
727 { | 726 { |
728 // FIXME: We may want to handle stylesheets that have multiple owners | 727 // FIXME: We may want to handle stylesheets that have multiple owners |
729 // http://crbug.com/242125 | 728 // http://crbug.com/242125 |
730 if (sheetContents && sheetContents->hasSingleOwnerNode()) | 729 if (sheetContents && sheetContents->hasSingleOwnerNode()) |
731 return getFrom(sheetContents->singleOwnerDocument()); | 730 return getFrom(sheetContents->singleOwnerDocument()); |
732 return 0; | 731 return 0; |
733 } | 732 } |
734 | 733 |
735 } // namespace WebCore | 734 } // namespace WebCore |
OLD | NEW |