Global Metrics
path: .metrics.cognitive.sum
old: 5.0
new: 35.0
path: .metrics.cognitive.average
old: 0.7142857142857143
new: 4.375
path: .metrics.halstead.bugs
old: 0.41450135396308657
new: 1.0118470510112014
path: .metrics.halstead.n2
old: 53.0
new: 104.0
path: .metrics.halstead.length
old: 305.0
new: 659.0
path: .metrics.halstead.n1
old: 19.0
new: 29.0
path: .metrics.halstead.N1
old: 175.0
new: 401.0
path: .metrics.halstead.effort
old: 43850.1226399676
new: 167245.40229430152
path: .metrics.halstead.level
old: 0.04291497975708502
new: 0.027800053461641272
path: .metrics.halstead.purity_ratio
old: 1.2599685470402546
new: 1.271209680645483
path: .metrics.halstead.time
old: 2436.1179244426444
new: 9291.411238572306
path: .metrics.halstead.difficulty
old: 23.30188679245283
new: 35.97115384615385
path: .metrics.halstead.volume
old: 1881.827125439905
new: 4649.431124995284
path: .metrics.halstead.estimated_program_length
old: 384.29040684727767
new: 837.727179545373
path: .metrics.halstead.N2
old: 130.0
new: 258.0
path: .metrics.halstead.vocabulary
old: 72.0
new: 133.0
path: .metrics.loc.sloc
old: 88.0
new: 196.0
path: .metrics.loc.lloc
old: 19.0
new: 56.0
path: .metrics.loc.blank
old: 3.0
new: 16.0
path: .metrics.loc.cloc
old: 20.0
new: 40.0
path: .metrics.loc.ploc
old: 65.0
new: 140.0
path: .metrics.nexits.sum
old: 3.0
new: 17.0
path: .metrics.nexits.average
old: 0.42857142857142855
new: 2.125
path: .metrics.cyclomatic.average
old: 1.375
new: 4.777777777777778
path: .metrics.cyclomatic.sum
old: 11.0
new: 43.0
path: .metrics.mi.mi_sei
old: 40.92281438883431
new: 6.606249151149939
path: .metrics.mi.mi_visual_studio
old: 33.174942466765685
new: 18.534001010558296
path: .metrics.mi.mi_original
old: 56.729151618169325
new: 31.693141728054684
path: .metrics.nargs.average
old: 0.8571428571428571
new: 1.25
path: .metrics.nargs.sum
old: 6.0
new: 10.0
path: .metrics.nom.total
old: 7.0
new: 8.0
path: .metrics.nom.functions
old: 7.0
new: 8.0
Spaces Data
Minimal test - lines (39, 54)
path: .spaces[2].metrics.mi.mi_sei
old: 92.3463143021432
new: 61.06204971407989
path: .spaces[2].metrics.mi.mi_original
old: 97.18689359939796
new: 94.37336283194776
path: .spaces[2].metrics.mi.mi_visual_studio
old: 56.834440701402315
new: 55.18910107131449
path: .spaces[2].metrics.cyclomatic.average
old: 2.0
new: 6.0
path: .spaces[2].metrics.cyclomatic.sum
old: 2.0
new: 6.0
path: .spaces[2].metrics.loc.sloc
old: 14.0
new: 16.0
path: .spaces[2].metrics.loc.ploc
old: 12.0
new: 16.0
path: .spaces[2].metrics.loc.lloc
old: 3.0
new: 7.0
path: .spaces[2].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[2].metrics.halstead.vocabulary
old: 29.0
new: 28.0
path: .spaces[2].metrics.halstead.n1
old: 11.0
new: 14.0
path: .spaces[2].metrics.halstead.volume
old: 359.4905936394403
new: 341.32219946608984
path: .spaces[2].metrics.halstead.estimated_program_length
old: 113.11239783097189
new: 106.60593781761293
path: .spaces[2].metrics.halstead.bugs
old: 0.07706027264091057
new: 0.08768563357153412
path: .spaces[2].metrics.halstead.effort
old: 3515.019137807861
new: 4266.527493326123
path: .spaces[2].metrics.halstead.time
old: 195.27884098932563
new: 237.0293051847846
path: .spaces[2].metrics.halstead.level
old: 0.10227272727272728
new: 0.08
path: .spaces[2].metrics.halstead.purity_ratio
old: 1.528545916634755
new: 1.50149208193821
path: .spaces[2].metrics.halstead.N2
old: 32.0
new: 25.0
path: .spaces[2].metrics.halstead.n2
old: 18.0
new: 14.0
path: .spaces[2].metrics.halstead.difficulty
old: 9.77777777777778
new: 12.5
path: .spaces[2].metrics.halstead.N1
old: 42.0
new: 46.0
path: .spaces[2].metrics.halstead.length
old: 74.0
new: 71.0
path: .spaces[2].metrics.cognitive.sum
old: 2.0
new: 6.0
path: .spaces[2].metrics.cognitive.average
old: 2.0
new: 6.0
path: .spaces[2].metrics.nargs.average
old: 2.0
new: 0.0
path: .spaces[2].metrics.nargs.sum
old: 2.0
new: 0.0
path: .spaces[2].metrics.nexits.average
old: 0.0
new: 3.0
path: .spaces[2].metrics.nexits.sum
old: 0.0
new: 3.0
Code
ComputedStyle* ScrollbarUtil::GetCustomScrollbarStyle(nsIFrame* aFrame,
bool* aDarkScrollbar) {
ComputedStyle* style = nsLayoutUtils::StyleForScrollbar(aFrame);
if (style->StyleUI()->HasCustomScrollbars()) {
return style;
}
bool useDarkScrollbar = !StaticPrefs::widget_disable_dark_scrollbar() &&
nsNativeTheme::IsDarkBackground(aFrame);
if (useDarkScrollbar || IsScrollbarWidthThin(style)) {
if (aDarkScrollbar) {
*aDarkScrollbar = useDarkScrollbar;
}
return style;
}
return nullptr;
}
Minimal test - lines (86, 117)
path: .spaces[4].metrics.nargs.sum
old: 0.0
new: 1.0
path: .spaces[4].metrics.nargs.average
old: 0.0
new: 1.0
path: .spaces[4].metrics.loc.lloc
old: 3.0
new: 5.0
path: .spaces[4].metrics.loc.ploc
old: 5.0
new: 11.0
path: .spaces[4].metrics.loc.cloc
old: 0.0
new: 20.0
path: .spaces[4].metrics.loc.blank
old: 0.0
new: 1.0
path: .spaces[4].metrics.loc.sloc
old: 5.0
new: 32.0
path: .spaces[4].metrics.cyclomatic.average
old: 1.0
new: 3.0
path: .spaces[4].metrics.cyclomatic.sum
old: 1.0
new: 3.0
path: .spaces[4].metrics.cognitive.average
old: 0.0
new: 2.0
path: .spaces[4].metrics.cognitive.sum
old: 0.0
new: 2.0
path: .spaces[4].metrics.halstead.length
old: 23.0
new: 66.0
path: .spaces[4].metrics.halstead.estimated_program_length
old: 39.50977500432694
new: 86.52224985768008
path: .spaces[4].metrics.halstead.effort
old: 525.4149792439493
new: 3026.075250475963
path: .spaces[4].metrics.halstead.n2
old: 6.0
new: 14.0
path: .spaces[4].metrics.halstead.volume
old: 87.56916320732489
new: 302.6075250475963
path: .spaces[4].metrics.halstead.difficulty
old: 6.0
new: 10.0
path: .spaces[4].metrics.halstead.N1
old: 14.0
new: 38.0
path: .spaces[4].metrics.halstead.time
old: 29.1897210691083
new: 168.11529169310904
path: .spaces[4].metrics.halstead.n1
old: 8.0
new: 10.0
path: .spaces[4].metrics.halstead.purity_ratio
old: 1.717816304535954
new: 1.3109431796618194
path: .spaces[4].metrics.halstead.bugs
old: 0.021704363052777037
new: 0.0697373158583301
path: .spaces[4].metrics.halstead.vocabulary
old: 14.0
new: 24.0
path: .spaces[4].metrics.halstead.level
old: 0.16666666666666666
new: 0.1
path: .spaces[4].metrics.halstead.N2
old: 9.0
new: 28.0
path: .spaces[4].metrics.nexits.average
old: 0.0
new: 3.0
path: .spaces[4].metrics.nexits.sum
old: 0.0
new: 3.0
path: .spaces[4].metrics.mi.mi_sei
old: 99.60253955663347
new: 93.49118560741783
path: .spaces[4].metrics.mi.mi_visual_studio
old: 71.017821898286
new: 49.39205128407504
path: .spaces[4].metrics.mi.mi_original
old: 121.44047544606906
new: 84.46040769576832
Code
nscolor ScrollbarUtil::GetScrollbarArrowColor(nscolor aButtonColor) {
// In Windows 10 scrollbar, there are several gray colors used:
//
// State | Background (lum) | Arrow | Contrast
// -------+------------------+---------+---------
// Normal | Gray 240 (87.1%) | Gray 96 | 5.5
// Hover | Gray 218 (70.1%) | Black | 15.0
// Active | Gray 96 (11.7%) | White | 6.3
//
// Contrast value is computed based on the definition in
// https://www.w3.org/TR/WCAG20/#contrast-ratiodef
//
// This function is written based on these values.
float luminance = RelativeLuminanceUtils::Compute(aButtonColor);
// Color with luminance larger than 0.72 has contrast ratio over 4.6
// to color with luminance of gray 96, so this value is chosen for
// this range. It is the luminance of gray 221.
if (luminance >= 0.72) {
// ComputeRelativeLuminanceFromComponents(96). That function cannot
// be constexpr because of std::pow.
const float GRAY96_LUMINANCE = 0.117f;
return RelativeLuminanceUtils::Adjust(aButtonColor, GRAY96_LUMINANCE);
}
// The contrast ratio of a color to black equals that to white when its
// luminance is around 0.18, with a contrast ratio ~4.6 to both sides,
// thus the value below. It's the lumanince of gray 118.
if (luminance >= 0.18) {
return NS_RGBA(0, 0, 0, NS_GET_A(aButtonColor));
}
return NS_RGBA(255, 255, 255, NS_GET_A(aButtonColor));
}
Minimal test - lines (33, 36)
path: .spaces[1].metrics.cognitive.average
old: 2.0
new: 0.0
path: .spaces[1].metrics.cognitive.sum
old: 2.0
new: 0.0
path: .spaces[1].metrics.nexits.average
old: 0.0
new: 1.0
path: .spaces[1].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[1].metrics.loc.cloc
old: 2.0
new: 0.0
path: .spaces[1].metrics.loc.sloc
old: 12.0
new: 4.0
path: .spaces[1].metrics.loc.ploc
old: 10.0
new: 4.0
path: .spaces[1].metrics.loc.lloc
old: 3.0
new: 1.0
path: .spaces[1].metrics.cyclomatic.average
old: 2.0
new: 1.0
path: .spaces[1].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[1].metrics.nargs.sum
old: 2.0
new: 1.0
path: .spaces[1].metrics.nargs.average
old: 2.0
new: 1.0
path: .spaces[1].metrics.mi.mi_original
old: 99.2605492299912
new: 125.2865501427276
path: .spaces[1].metrics.mi.mi_visual_studio
old: 58.04710481286035
new: 73.26698838756
path: .spaces[1].metrics.mi.mi_sei
old: 97.26184571758397
new: 105.15125244839123
path: .spaces[1].metrics.halstead.length
old: 78.0
new: 22.0
path: .spaces[1].metrics.halstead.difficulty
old: 12.833333333333334
new: 6.0
path: .spaces[1].metrics.halstead.n2
old: 18.0
new: 6.0
path: .spaces[1].metrics.halstead.volume
old: 390.0
new: 83.76180828526729
path: .spaces[1].metrics.halstead.bugs
old: 0.09753222528750416
new: 0.021070601904317903
path: .spaces[1].metrics.halstead.effort
old: 5005.0
new: 502.5708497116037
path: .spaces[1].metrics.halstead.n1
old: 14.0
new: 8.0
path: .spaces[1].metrics.halstead.vocabulary
old: 32.0
new: 14.0
path: .spaces[1].metrics.halstead.N2
old: 33.0
new: 9.0
path: .spaces[1].metrics.halstead.level
old: 0.07792207792207792
new: 0.16666666666666666
path: .spaces[1].metrics.halstead.time
old: 278.05555555555554
new: 27.920602761755763
path: .spaces[1].metrics.halstead.N1
old: 45.0
new: 13.0
path: .spaces[1].metrics.halstead.purity_ratio
old: 1.6456617812149754
new: 1.7958988638330426
path: .spaces[1].metrics.halstead.estimated_program_length
old: 128.36161893476807
new: 39.50977500432694
Code
bool ScrollbarUtil::IsScrollbarWidthThin(nsIFrame* aFrame) {
ComputedStyle* style = nsLayoutUtils::StyleForScrollbar(aFrame);
return IsScrollbarWidthThin(style);
}
Minimal test - lines (57, 83)
path: .spaces[3].metrics.cyclomatic.average
old: 1.0
new: 6.0
path: .spaces[3].metrics.cyclomatic.sum
old: 1.0
new: 6.0
path: .spaces[3].metrics.loc.lloc
old: 2.0
new: 11.0
path: .spaces[3].metrics.loc.sloc
old: 4.0
new: 27.0
path: .spaces[3].metrics.loc.cloc
old: 0.0
new: 2.0
path: .spaces[3].metrics.loc.ploc
old: 4.0
new: 24.0
path: .spaces[3].metrics.loc.blank
old: 0.0
new: 1.0
path: .spaces[3].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[3].metrics.nexits.average
old: 0.0
new: 2.0
path: .spaces[3].metrics.cognitive.average
old: 0.0
new: 10.0
path: .spaces[3].metrics.cognitive.sum
old: 0.0
new: 10.0
path: .spaces[3].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[3].metrics.nargs.average
old: 0.0
new: 2.0
path: .spaces[3].metrics.halstead.difficulty
old: 3.5
new: 17.77777777777778
path: .spaces[3].metrics.halstead.purity_ratio
old: 2.0840749952560027
new: 1.3633200982937412
path: .spaces[3].metrics.halstead.N2
old: 5.0
new: 40.0
path: .spaces[3].metrics.halstead.length
old: 15.0
new: 102.0
path: .spaces[3].metrics.halstead.vocabulary
old: 12.0
new: 34.0
path: .spaces[3].metrics.halstead.volume
old: 53.77443751081734
new: 518.9212098075346
path: .spaces[3].metrics.halstead.effort
old: 188.2105312878607
new: 9225.26595213395
path: .spaces[3].metrics.halstead.estimated_program_length
old: 31.26112492884004
new: 139.0586500259616
path: .spaces[3].metrics.halstead.N1
old: 10.0
new: 62.0
path: .spaces[3].metrics.halstead.bugs
old: 0.010947325359591292
new: 0.14662161833181978
path: .spaces[3].metrics.halstead.time
old: 10.456140627103371
new: 512.5147751185527
path: .spaces[3].metrics.halstead.n1
old: 7.0
new: 16.0
path: .spaces[3].metrics.halstead.level
old: 0.2857142857142857
new: 0.056249999999999994
path: .spaces[3].metrics.halstead.n2
old: 5.0
new: 18.0
path: .spaces[3].metrics.mi.mi_visual_studio
old: 74.61466703602454
new: 48.95808892294443
path: .spaces[3].metrics.mi.mi_original
old: 127.59108063160195
new: 83.71833205823498
path: .spaces[3].metrics.mi.mi_sei
old: 108.4759871562677
new: 66.15282226237188
Code
nscolor ScrollbarUtil::GetScrollbarButtonColor(nscolor aTrackColor,
EventStates aStates) {
// See numbers in GetScrollbarArrowColor.
// This function is written based on ratios between values listed there.
bool isActive = aStates.HasState(NS_EVENT_STATE_ACTIVE);
bool isHover = aStates.HasState(NS_EVENT_STATE_HOVER);
if (!isActive && !isHover) {
return aTrackColor;
}
float luminance = RelativeLuminanceUtils::Compute(aTrackColor);
if (isActive) {
if (luminance >= 0.18f) {
luminance *= 0.134f;
} else {
luminance /= 0.134f;
luminance = std::min(luminance, 1.0f);
}
} else {
if (luminance >= 0.18f) {
luminance *= 0.805f;
} else {
luminance /= 0.805f;
}
}
return RelativeLuminanceUtils::Adjust(aTrackColor, luminance);
}
Minimal test - lines (136, 153)
path: .spaces[6].metrics.loc.ploc
old: 5.0
new: 18.0
path: .spaces[6].metrics.loc.sloc
old: 5.0
new: 18.0
path: .spaces[6].metrics.loc.lloc
old: 3.0
new: 4.0
path: .spaces[6].metrics.mi.mi_visual_studio
old: 71.68542369543115
new: 52.60228179516064
path: .spaces[6].metrics.mi.mi_original
old: 122.58207451918727
new: 89.94990186972468
path: .spaces[6].metrics.mi.mi_sei
old: 101.24951887810454
new: 54.57852466091026
path: .spaces[6].metrics.nargs.average
old: 0.0
new: 2.0
path: .spaces[6].metrics.nargs.sum
old: 0.0
new: 2.0
path: .spaces[6].metrics.cognitive.sum
old: 0.0
new: 3.0
path: .spaces[6].metrics.cognitive.average
old: 0.0
new: 3.0
path: .spaces[6].metrics.cyclomatic.average
old: 1.0
new: 5.0
path: .spaces[6].metrics.cyclomatic.sum
old: 1.0
new: 5.0
path: .spaces[6].metrics.halstead.N1
old: 13.0
new: 59.0
path: .spaces[6].metrics.halstead.vocabulary
old: 13.0
new: 44.0
path: .spaces[6].metrics.halstead.effort
old: 474.58139385159507
new: 7034.1952562200895
path: .spaces[6].metrics.halstead.N2
old: 6.0
new: 47.0
path: .spaces[6].metrics.halstead.n2
old: 4.0
new: 29.0
path: .spaces[6].metrics.halstead.difficulty
old: 6.75
new: 12.155172413793103
path: .spaces[6].metrics.halstead.bugs
old: 0.020280837423024493
new: 0.12237377521897508
path: .spaces[6].metrics.halstead.purity_ratio
old: 1.9225960533147792
new: 1.8819321489889371
path: .spaces[6].metrics.halstead.length
old: 19.0
new: 106.0
path: .spaces[6].metrics.halstead.volume
old: 70.30835464468075
new: 578.6997515755535
path: .spaces[6].metrics.halstead.estimated_program_length
old: 36.529325012980806
new: 199.48480779282735
path: .spaces[6].metrics.halstead.time
old: 26.36563299175528
new: 390.78862534556055
path: .spaces[6].metrics.halstead.n1
old: 9.0
new: 15.0
path: .spaces[6].metrics.halstead.level
old: 0.14814814814814814
new: 0.0822695035460993
Code
nscolor ScrollbarUtil::GetScrollbarThumbColor(nsIFrame* aFrame,
EventStates aEventStates) {
bool darkScrollbar = false;
ComputedStyle* style = GetCustomScrollbarStyle(aFrame, &darkScrollbar);
nscolor color =
darkScrollbar ? NS_RGBA(249, 249, 250, 102) : NS_RGB(205, 205, 205);
if (style) {
const nsStyleUI* ui = style->StyleUI();
auto* customColors = ui->mScrollbarColor.IsAuto()
? nullptr
: &ui->mScrollbarColor.AsColors();
if (customColors) {
color = customColors->thumb.CalcColor(*style);
}
}
return nsNativeBasicTheme::AdjustUnthemedScrollbarThumbColor(color,
aEventStates);
}
Minimal test - lines (27, 30)
path: .spaces[0].metrics.nexits.sum
old: 2.0
new: 1.0
path: .spaces[0].metrics.nexits.average
old: 2.0
new: 1.0
path: .spaces[0].metrics.mi.mi_visual_studio
old: 63.465317482411095
new: 72.91593819366824
path: .spaces[0].metrics.mi.mi_original
old: 108.52569289492295
new: 124.68625431117268
path: .spaces[0].metrics.mi.mi_sei
old: 81.07226667534013
new: 104.2852086291407
path: .spaces[0].metrics.loc.lloc
old: 4.0
new: 1.0
path: .spaces[0].metrics.loc.sloc
old: 8.0
new: 4.0
path: .spaces[0].metrics.loc.ploc
old: 8.0
new: 4.0
path: .spaces[0].metrics.cognitive.average
old: 1.0
new: 0.0
path: .spaces[0].metrics.cognitive.sum
old: 1.0
new: 0.0
path: .spaces[0].metrics.cyclomatic.average
old: 2.0
new: 1.0
path: .spaces[0].metrics.cyclomatic.sum
old: 2.0
new: 1.0
path: .spaces[0].metrics.halstead.n2
old: 12.0
new: 7.0
path: .spaces[0].metrics.halstead.level
old: 0.0923076923076923
new: 0.15555555555555556
path: .spaces[0].metrics.halstead.volume
old: 232.19280948873623
new: 94.0116453487578
path: .spaces[0].metrics.halstead.n1
old: 13.0
new: 10.0
path: .spaces[0].metrics.halstead.effort
old: 2515.422102794643
new: 604.3605772420144
path: .spaces[0].metrics.halstead.purity_ratio
old: 1.8225053268897613
new: 2.2987289305772545
path: .spaces[0].metrics.halstead.difficulty
old: 10.833333333333334
new: 6.428571428571429
path: .spaces[0].metrics.halstead.length
old: 50.0
new: 23.0
path: .spaces[0].metrics.halstead.time
old: 139.74567237748016
new: 33.575587624556356
path: .spaces[0].metrics.halstead.vocabulary
old: 25.0
new: 17.0
path: .spaces[0].metrics.halstead.N2
old: 20.0
new: 9.0
path: .spaces[0].metrics.halstead.N1
old: 30.0
new: 14.0
path: .spaces[0].metrics.halstead.estimated_program_length
old: 91.12526634448808
new: 52.87076540327685
path: .spaces[0].metrics.halstead.bugs
old: 0.06165277945618482
new: 0.02382737300379775
Code
bool ScrollbarUtil::IsScrollbarWidthThin(ComputedStyle* aStyle) {
auto scrollbarWidth = aStyle->StyleUIReset()->mScrollbarWidth;
return scrollbarWidth == StyleScrollbarWidth::Thin;
}
Minimal test - lines (120, 133)
path: .spaces[5].metrics.mi.mi_sei
old: 104.78095558308604
new: 61.706193197091174
path: .spaces[5].metrics.mi.mi_original
old: 125.02987991457113
new: 94.89042521954433
path: .spaces[5].metrics.mi.mi_visual_studio
old: 73.11688883893048
new: 55.49147673657561
path: .spaces[5].metrics.halstead.purity_ratio
old: 2.1900367939720016
new: 1.89891047476626
path: .spaces[5].metrics.halstead.bugs
old: 0.022800454761942136
new: 0.10671870329901303
path: .spaces[5].metrics.halstead.N2
old: 10.0
new: 39.0
path: .spaces[5].metrics.halstead.N1
old: 12.0
new: 53.0
path: .spaces[5].metrics.halstead.n2
old: 7.0
new: 25.0
path: .spaces[5].metrics.halstead.time
old: 31.42857142857143
new: 318.2513000742643
path: .spaces[5].metrics.halstead.difficulty
old: 6.428571428571429
new: 11.7
path: .spaces[5].metrics.halstead.length
old: 22.0
new: 92.0
path: .spaces[5].metrics.halstead.n1
old: 9.0
new: 15.0
path: .spaces[5].metrics.halstead.vocabulary
old: 16.0
new: 40.0
path: .spaces[5].metrics.halstead.effort
old: 565.7142857142858
new: 5728.523401336757
path: .spaces[5].metrics.halstead.estimated_program_length
old: 48.18080946738404
new: 174.6997636784959
path: .spaces[5].metrics.halstead.level
old: 0.15555555555555556
new: 0.08547008547008547
path: .spaces[5].metrics.halstead.volume
old: 88.0
new: 489.61738472963737
path: .spaces[5].metrics.loc.sloc
old: 4.0
new: 14.0
path: .spaces[5].metrics.loc.lloc
old: 1.0
new: 4.0
path: .spaces[5].metrics.loc.ploc
old: 4.0
new: 14.0
path: .spaces[5].metrics.cognitive.sum
old: 0.0
new: 3.0
path: .spaces[5].metrics.cognitive.average
old: 0.0
new: 3.0
path: .spaces[5].metrics.cyclomatic.sum
old: 1.0
new: 5.0
path: .spaces[5].metrics.cyclomatic.average
old: 1.0
new: 5.0
path: .spaces[5].metrics.nexits.sum
old: 0.0
new: 2.0
path: .spaces[5].metrics.nexits.average
old: 0.0
new: 2.0
Code
nscolor ScrollbarUtil::GetScrollbarTrackColor(nsIFrame* aFrame) {
bool darkScrollbar = false;
ComputedStyle* style = GetCustomScrollbarStyle(aFrame, &darkScrollbar);
if (style) {
const nsStyleUI* ui = style->StyleUI();
auto* customColors = ui->mScrollbarColor.IsAuto()
? nullptr
: &ui->mScrollbarColor.AsColors();
if (customColors) {
return customColors->track.CalcColor(*style);
}
}
return darkScrollbar ? NS_RGBA(20, 20, 25, 77) : NS_RGB(240, 240, 240);
}