Change the equation for computing sigma from blur radius
In a previous CL: https://codereview.chromium.org/1502283002/, this equation
was changed and now when the blur radius is 2px the blur effect completely
disappears. This CL change the equation back to the original one but add
a special case handler so that when the blur radius is 0 there is no blur
effect at all.
Also, together with this change, a bunch of layout test will need to
rebaseline.
BUG=572822
Review URL: https://codereview.chromium.org/1556523002
Cr-Commit-Position: refs/heads/master@{#367188}
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 212ca3d..9432cb3 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -1214,6 +1214,103 @@
# This test has different results in Debug and Release.
crbug.com/529038 [ Debug ] virtual/gpu/fast/canvas/canvas-composite-repaint-by-all-imagesource.html [ Failure ]
+crbug.com/572822 fast/forms/calendar-picker/calendar-picker-appearance-zoom125.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/select/listbox-appearance-basic.html [ NeedsRebaseline ]
+crbug.com/572822 virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 compositing/culling/scrolled-within-boxshadow.html [ NeedsRebaseline ]
+crbug.com/572822 compositing/geometry/foreground-layer.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/text/text-appearance-basic.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/inset-box-shadow-radius.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/calendar-picker-appearance-ar.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/range/range-appearance-basic.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/single-pixel-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/box-shadow-transformed.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/month-picker-appearance-step.html [ NeedsRebaseline ]
+crbug.com/572822 fast/borders/border-radius-with-box-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/borders/border-radius-with-box-shadow-01.html [ NeedsRebaseline ]
+crbug.com/572822 fast/text/shadow-translucent-fill.html [ NeedsRebaseline ]
+crbug.com/572822 virtual/gpu/fast/canvas/canvas-shadow-source-in.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac XP Win7 Linux ] ietestcenter/css3/text/textshadow-010.htm [ NeedsRebaseline ]
+crbug.com/572822 fast/css/color-correction-on-box-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 svg/custom/repaint-shadow.svg [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/basic-shadows.html [ NeedsRebaseline ]
+crbug.com/572822 virtual/gpu/fast/canvas/canvas-incremental-repaint.html [ NeedsRebaseline ]
+crbug.com/572822 fast/borders/border-radius-mask-canvas-with-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/textarea/textarea-appearance-basic.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/select/menulist-appearance-basic.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/box-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/css/box-shadow-and-border-radius.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/checkbox/checkbox-appearance-basic.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/inset.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac XP Win7 Linux ] svg/css/text-shadow-multiple.xhtml [ NeedsRebaseline ]
+crbug.com/572822 [ Mac XP Win7 Linux ] fast/text/stroking-decorations.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/shadow-tiling-artifact.html [ NeedsRebaseline ]
+crbug.com/572822 ietestcenter/css3/text/textshadow-001.htm [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/inset-subpixel.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/week-picker-appearance.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/week-picker-appearance-step.html [ NeedsRebaseline ]
+crbug.com/572822 fast/canvas/canvas-composite-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac XP Win7 Linux ] ietestcenter/css3/text/textshadow-002.htm [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/color/color-suggestion-picker-two-row-appearance.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/color/color-suggestion-picker-with-scrollbar-appearance.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac XP Win7 Linux ] svg/css/text-gradient-shadow.svg [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/calendar-picker-appearance-ru.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/color/color-suggestion-picker-appearance-zoom125.html [ NeedsRebaseline ]
+crbug.com/572822 fast/css/shadow-multiple.html [ NeedsRebaseline ]
+crbug.com/572822 paint/roundedrects/circle-with-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac XP Win7 Linux ] fast/text/stroking.html [ NeedsRebaseline ]
+crbug.com/572822 fast/borders/border-radius-mask-video-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 ietestcenter/css3/text/textshadow-004.htm [ NeedsRebaseline ]
+crbug.com/572822 fast/css/color-correction-on-text-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 compositing/culling/unscrolled-within-boxshadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/calendar-picker-appearance-zoom200.html [ NeedsRebaseline ]
+crbug.com/572822 compositing/culling/translated-boxshadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/borders/border-radius-split-inline.html [ NeedsRebaseline ]
+crbug.com/572822 virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint.html [ NeedsRebaseline ]
+crbug.com/572822 compositing/shadows/shadow-drawing.html [ NeedsRebaseline ]
+crbug.com/572822 compositing/masks/masked-ancestor.html [ NeedsRebaseline ]
+crbug.com/572822 compositing/gestures/gesture-tapHighlight-with-box-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/calendar-picker-appearance-required.html [ NeedsRebaseline ]
+crbug.com/572822 fast/writing-mode/english-lr-text.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/search/search-appearance-basic.html [ NeedsRebaseline ]
+crbug.com/572822 ietestcenter/css3/text/textshadow-003.htm [ NeedsRebaseline ]
+crbug.com/572822 virtual/gpu/fast/canvas/canvas-scale-strokePath-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/submit/submit-appearance-basic.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/box-shadow-clipped-slices.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/scaled-box-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/canvas/canvas-incremental-repaint.html [ NeedsRebaseline ]
+crbug.com/572822 compositing/geometry/clipping-foreground.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/calendar-picker-appearance.html [ NeedsRebaseline ]
+crbug.com/572822 fast/dom/HTMLMeterElement/meter-styles.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/color/color-suggestion-picker-one-row-appearance.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/radio/radio-appearance-basic.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/color/color-suggestion-picker-appearance-zoom200.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/inset-box-shadows.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/calendar-picker-appearance-minimum-date.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/shadow-buffer-partial.html [ NeedsRebaseline ]
+crbug.com/572822 fast/box-shadow/box-shadow-radius.html [ NeedsRebaseline ]
+crbug.com/572822 fast/transforms/shadows.html [ NeedsRebaseline ]
+crbug.com/572822 compositing/iframes/composited-iframe-alignment.html [ NeedsRebaseline ]
+crbug.com/572822 virtual/gpu/fast/canvas/canvas-composite-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 paint/roundedrects/input-with-rounded-rect-and-shadow.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/calendar-picker-appearance-step.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/color/color-suggestion-picker-appearance.html [ NeedsRebaseline ]
+crbug.com/572822 fast/repaint/shadow-multiple.html [ NeedsRebaseline ]
+crbug.com/572822 fast/forms/calendar-picker/month-picker-appearance.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/datalist/input-appearance-range-with-padding-with-datalist.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/repaint/slider-thumb-drag-release.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/datalist/input-appearance-range-with-datalist-zoomed.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/range/slider-padding.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/range/thumbslider-no-parent-slider.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/range/range-focus-by-mouse-then-keydown.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/dom/HTMLInputElement/input-slider-update.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/range/input-appearance-range.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/input-appearance-height.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/range/slider-thumb-shared-style.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/datalist/input-appearance-range-with-transform.html [ NeedsRebaseline ]
+crbug.com/572822 [ Mac ] fast/forms/datalist/input-appearance-range-with-datalist.html [ NeedsRebaseline ]
+
crbug.com/532643 [ Mac ] fast/events/hit-test-cache-scrollbar-no-crash.html [ Pass Failure ]
crbug.com/532643 [ Mac ] virtual/trustedeventsdefaultaction/fast/events/hit-test-cache-scrollbar-no-crash.html [ Pass Failure ]
crbug.com/532643 [ Mac ] virtual/pointerevent/fast/events/hit-test-cache-scrollbar-no-crash.html [ Pass Failure ]
diff --git a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h
index bb4fc436..3c3781bc 100644
--- a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h
+++ b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h
@@ -110,7 +110,9 @@
inline SkScalar skBlurRadiusToSigma(SkScalar radius)
{
SkASSERT(radius >= 0);
- return 0.288675f * radius;
+ if (radius == 0)
+ return 0.0f;
+ return 0.288675f * radius + 0.5f;
}
template<typename PrimitiveType>