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

Side by Side Diff: Source/core/page/UseCounter.cpp

Issue 18371008: Add a WebDocument::watchCssSelectors(selectors) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Sync Created 7 years, 2 months 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 | « Source/core/page/RuntimeCSSEnabled.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 case CSSPropertyAnimationFillMode: return 428; 490 case CSSPropertyAnimationFillMode: return 428;
491 case CSSPropertyAnimationIterationCount: return 429; 491 case CSSPropertyAnimationIterationCount: return 429;
492 case CSSPropertyAnimationName: return 430; 492 case CSSPropertyAnimationName: return 430;
493 case CSSPropertyAnimationPlayState: return 431; 493 case CSSPropertyAnimationPlayState: return 431;
494 case CSSPropertyAnimationTimingFunction: return 432; 494 case CSSPropertyAnimationTimingFunction: return 432;
495 case CSSPropertyObjectFit: return 433; 495 case CSSPropertyObjectFit: return 433;
496 case CSSPropertyPaintOrder: return 434; 496 case CSSPropertyPaintOrder: return 434;
497 case CSSPropertyMaskSourceType: return 435; 497 case CSSPropertyMaskSourceType: return 435;
498 case CSSPropertyIsolation: return 436; 498 case CSSPropertyIsolation: return 436;
499 case CSSPropertyObjectPosition: return 437; 499 case CSSPropertyObjectPosition: return 437;
500 case CSSPropertyInternalCallback: return 438;
500 501
501 // Add new features above this line (don't change the assigned numbers of th e existing 502 // Add new features above this line (don't change the assigned numbers of th e existing
502 // items) and update maximumCSSSampleId() with the new maximum value. 503 // items) and update maximumCSSSampleId() with the new maximum value.
503 504
504 case CSSPropertyInvalid: 505 case CSSPropertyInvalid:
505 case CSSPropertyVariable: 506 case CSSPropertyVariable:
506 ASSERT_NOT_REACHED(); 507 ASSERT_NOT_REACHED();
507 return 0; 508 return 0;
508 } 509 }
509 510
510 ASSERT_NOT_REACHED(); 511 ASSERT_NOT_REACHED();
511 return 0; 512 return 0;
512 } 513 }
513 514
514 static int maximumCSSSampleId() { return 437; } 515 static int maximumCSSSampleId() { return 438; }
515 516
516 UseCounter::UseCounter() 517 UseCounter::UseCounter()
517 { 518 {
518 m_CSSFeatureBits.ensureSize(lastCSSProperty + 1); 519 m_CSSFeatureBits.ensureSize(lastCSSProperty + 1);
519 m_CSSFeatureBits.clearAll(); 520 m_CSSFeatureBits.clearAll();
520 } 521 }
521 522
522 UseCounter::~UseCounter() 523 UseCounter::~UseCounter()
523 { 524 {
524 // We always log PageDestruction so that we have a scale for the rest of the features. 525 // We always log PageDestruction so that we have a scale for the rest of the features.
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents) 715 UseCounter* UseCounter::getFrom(const StyleSheetContents* sheetContents)
715 { 716 {
716 // FIXME: We may want to handle stylesheets that have multiple owners 717 // FIXME: We may want to handle stylesheets that have multiple owners
717 // http://crbug.com/242125 718 // http://crbug.com/242125
718 if (sheetContents && !sheetContents->isUserStyleSheet() && sheetContents->ha sSingleOwnerNode()) 719 if (sheetContents && !sheetContents->isUserStyleSheet() && sheetContents->ha sSingleOwnerNode())
719 return getFrom(sheetContents->singleOwnerDocument()); 720 return getFrom(sheetContents->singleOwnerDocument());
720 return 0; 721 return 0;
721 } 722 }
722 723
723 } // namespace WebCore 724 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/RuntimeCSSEnabled.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698