| 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 | 608 |
| 609 if (host->useCounter().recordMeasurement(feature)) { | 609 if (host->useCounter().recordMeasurement(feature)) { |
| 610 ASSERT(!host->useCounter().deprecationMessage(feature).isEmpty()); | 610 ASSERT(!host->useCounter().deprecationMessage(feature).isEmpty()); |
| 611 host->console().addMessage(DeprecationMessageSource, WarningMessageLevel
, host->useCounter().deprecationMessage(feature)); | 611 host->console().addMessage(DeprecationMessageSource, WarningMessageLevel
, host->useCounter().deprecationMessage(feature)); |
| 612 } | 612 } |
| 613 } | 613 } |
| 614 | 614 |
| 615 String UseCounter::deprecationMessage(Feature feature) | 615 String UseCounter::deprecationMessage(Feature feature) |
| 616 { | 616 { |
| 617 switch (feature) { | 617 switch (feature) { |
| 618 // Content Security Policy | |
| 619 case PrefixedContentSecurityPolicy: | |
| 620 case PrefixedContentSecurityPolicyReportOnly: | |
| 621 return "The 'X-WebKit-CSP' headers are no longer supported. Please consi
der using the canonical 'Content-Security-Policy' header instead."; | |
| 622 | |
| 623 // Quota | 618 // Quota |
| 624 case PrefixedStorageInfo: | 619 case PrefixedStorageInfo: |
| 625 return "'window.webkitStorageInfo' is deprecated. Please use 'navigator.
webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead."; | 620 return "'window.webkitStorageInfo' is deprecated. Please use 'navigator.
webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead."; |
| 626 | 621 |
| 627 // Performance | 622 // Performance |
| 628 case PrefixedPerformanceTimeline: | 623 case PrefixedPerformanceTimeline: |
| 629 return "'window.performance.webkitGet*' methods have been deprecated. Pl
ease use the unprefixed 'performance.get*' methods instead."; | 624 return "'window.performance.webkitGet*' methods have been deprecated. Pl
ease use the unprefixed 'performance.get*' methods instead."; |
| 630 | 625 |
| 631 case DocumentClear: | 626 case DocumentClear: |
| 632 return "document.clear() is deprecated. This method doesn't do anything.
"; | 627 return "document.clear() is deprecated. This method doesn't do anything.
"; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) | 751 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) |
| 757 { | 752 { |
| 758 // FIXME: We may want to handle stylesheets that have multiple owners | 753 // FIXME: We may want to handle stylesheets that have multiple owners |
| 759 // http://crbug.com/242125 | 754 // http://crbug.com/242125 |
| 760 if (sheetContents && sheetContents->hasSingleOwnerNode()) | 755 if (sheetContents && sheetContents->hasSingleOwnerNode()) |
| 761 return getFrom(sheetContents->singleOwnerDocument()); | 756 return getFrom(sheetContents->singleOwnerDocument()); |
| 762 return 0; | 757 return 0; |
| 763 } | 758 } |
| 764 | 759 |
| 765 } // namespace WebCore | 760 } // namespace WebCore |
| OLD | NEW |