Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Backport upstream r210813 to fix Aura color chooser crash on Debug build
Browse files Browse the repository at this point in the history
Origin commit log:
    Do not send OnColorChosen when initialized.

    keishi pointed out that ColorChooserView somehow sends OnColorChosen
    in its constructor which may cause a failure on DCHECK() in renderer.

    The constructor calls OnColorChanged() which calls
    OnSaturationValueChanged() which actually calls OnColorChosen().
    Actually this is a mistake, OnColorChosen() should be called only when
    the user takes some action (like mouse click) and HueView works like that.

    BUG=258221
    [email protected]

    Review URL: https://chromiumcodereview.appspot.com/18945002

    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210813 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
Shiliu Wang committed Sep 5, 2013
1 parent 805a3ae commit ad6709e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/views/color_chooser/color_chooser_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ void ColorChooserView::SaturationValueView::OnSaturationValueChanged(
marker_position_.set_x(x);
marker_position_.set_y(y);
SchedulePaint();
chooser_view_->OnSaturationValueChosen(saturation, value);
}

void ColorChooserView::SaturationValueView::ProcessEventAtLocation(
Expand All @@ -269,6 +268,7 @@ void ColorChooserView::SaturationValueView::ProcessEventAtLocation(
saturation = SkScalarPin(saturation, 0, SK_Scalar1);
value = SkScalarPin(value, 0, SK_Scalar1);
OnSaturationValueChanged(saturation, value);
chooser_view_->OnSaturationValueChosen(saturation, value);
}

gfx::Size ColorChooserView::SaturationValueView::GetPreferredSize() {
Expand Down

0 comments on commit ad6709e

Please sign in to comment.