示例#1
0
void Page::didCommitLoad(LocalFrame* frame)
{
    lifecycleNotifier().notifyDidCommitLoad(frame);
    if (m_mainFrame == frame) {
        useCounter().didCommitLoad();
        m_inspectorController->didCommitLoadForMainFrame();
    }
}
示例#2
0
void Page::didCommitLoad(LocalFrame* frame)
{
    lifecycleNotifier().notifyDidCommitLoad(frame);
    if (m_mainFrame == frame) {
        frame->console().clearMessages();
        useCounter().didCommitLoad();
    }
}
示例#3
0
void KisDeformPaintOpSettingsWidget::writeConfiguration( KisPropertiesConfiguration* config ) const
{
    config->setProperty( "paintop", "deformbrush"); // XXX: make this a const id string
    config->setProperty( "radius", radius() );
    config->setProperty( "deform_amount", deformAmount() );
    config->setProperty( "deform_action", deformAction() );
    config->setProperty( "bilinear", bilinear() );
    config->setProperty( "use_movement_paint", useMovementPaint() );
    config->setProperty( "use_counter", useCounter() );
    config->setProperty( "use_old_data", useOldData() );
    config->setProperty( "spacing", spacing() );
}
示例#4
0
TEST(UseCounterTest, SVGImageContext) {
  UseCounter useCounter(UseCounter::SVGImageContext);
  HistogramTester histogramTester;

  // Verify that SVGImage related feature counters get recorded in a separate
  // histogram.
  EXPECT_FALSE(
      useCounter.hasRecordedMeasurement(UseCounter::SVGSMILAdditiveAnimation));
  useCounter.recordMeasurement(UseCounter::SVGSMILAdditiveAnimation);
  EXPECT_TRUE(
      useCounter.hasRecordedMeasurement(UseCounter::SVGSMILAdditiveAnimation));
  histogramTester.expectUniqueSample(kSVGFeaturesHistogramName,
                                     UseCounter::SVGSMILAdditiveAnimation, 1);

  // And for the CSS counters
  EXPECT_FALSE(useCounter.isCounted(CSSPropertyFont));
  useCounter.count(HTMLStandardMode, CSSPropertyFont);
  EXPECT_TRUE(useCounter.isCounted(CSSPropertyFont));
  histogramTester.expectUniqueSample(
      kSVGCSSHistogramName,
      UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(CSSPropertyFont),
      1);

  // After a page load, the histograms will be updated
  useCounter.didCommitLoad();
  histogramTester.expectBucketCount(kSVGFeaturesHistogramName,
                                    UseCounter::PageVisits, 1);
  histogramTester.expectTotalCount(kSVGFeaturesHistogramName, 2);
  histogramTester.expectBucketCount(kSVGCSSHistogramName, 1, 1);
  histogramTester.expectTotalCount(kSVGCSSHistogramName, 2);

  // And the legacy histogram will be updated to include these
  histogramTester.expectBucketCount(kLegacyFeaturesHistogramName,
                                    UseCounter::SVGSMILAdditiveAnimation, 1);
  histogramTester.expectBucketCount(kLegacyFeaturesHistogramName,
                                    UseCounter::PageVisits, 1);
  histogramTester.expectTotalCount(kLegacyFeaturesHistogramName, 2);
  histogramTester.expectBucketCount(
      kLegacyCSSHistogramName,
      UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(CSSPropertyFont),
      1);
  histogramTester.expectBucketCount(kLegacyCSSHistogramName, 1, 1);
  histogramTester.expectTotalCount(kLegacyCSSHistogramName, 2);

  // None of this should update the non-legacy non-SVG histograms
  histogramTester.expectTotalCount(kCSSHistogramName, 0);
  histogramTester.expectTotalCount(kFeaturesHistogramName, 0);
}
示例#5
0
void Page::didCommitLoad(Frame* frame)
{
    lifecycleNotifier()->notifyDidCommitLoad(frame);
    if (m_mainFrame == frame)
        useCounter().didCommitLoad();
}