| 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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 // Features that aren't deprecated don't have a deprecation message. | 844 // Features that aren't deprecated don't have a deprecation message. |
| 845 default: | 845 default: |
| 846 return String(); | 846 return String(); |
| 847 } | 847 } |
| 848 } | 848 } |
| 849 | 849 |
| 850 void UseCounter::count(CSSParserContext context, CSSPropertyID feature) | 850 void UseCounter::count(CSSParserContext context, CSSPropertyID feature) |
| 851 { | 851 { |
| 852 ASSERT(feature >= firstCSSProperty); | 852 ASSERT(feature >= firstCSSProperty); |
| 853 ASSERT(feature <= lastCSSProperty); | 853 ASSERT(feature <= lastCSSProperty); |
| 854 ASSERT(!isInternalProperty(feature)); | |
| 855 | 854 |
| 856 if (!isUseCounterEnabledForMode(context.mode())) | 855 if (!isUseCounterEnabledForMode(context.mode())) |
| 857 return; | 856 return; |
| 858 | 857 |
| 859 m_CSSFeatureBits.quickSet(feature); | 858 m_CSSFeatureBits.quickSet(feature); |
| 860 } | 859 } |
| 861 | 860 |
| 862 void UseCounter::count(Feature feature) | 861 void UseCounter::count(Feature feature) |
| 863 { | 862 { |
| 864 ASSERT(deprecationMessage(feature).isEmpty()); | 863 ASSERT(deprecationMessage(feature).isEmpty()); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 882 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) | 881 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) |
| 883 { | 882 { |
| 884 // FIXME: We may want to handle stylesheets that have multiple owners | 883 // FIXME: We may want to handle stylesheets that have multiple owners |
| 885 // http://crbug.com/242125 | 884 // http://crbug.com/242125 |
| 886 if (sheetContents && sheetContents->hasSingleOwnerNode()) | 885 if (sheetContents && sheetContents->hasSingleOwnerNode()) |
| 887 return getFrom(sheetContents->singleOwnerDocument()); | 886 return getFrom(sheetContents->singleOwnerDocument()); |
| 888 return 0; | 887 return 0; |
| 889 } | 888 } |
| 890 | 889 |
| 891 } // namespace blink | 890 } // namespace blink |
| OLD | NEW |