|
|
DescriptionMake ARC's intent picker use the buttons insets.
Need to call SetupLayout via UpdateDialogButtons so the buttons make
proper use of the established insets.
Bug: 678141
Test: Try.
Review-Url: https://codereview.chromium.org/2874493002
Cr-Commit-Position: refs/heads/master@{#472534}
Committed: https://chromium.googlesource.com/chromium/src/+/15bdd62c05472adc642dcf0982fe4662502ac957
Patch Set 1 #
Total comments: 2
Patch Set 2 : Modifying set_button_rows_insets() so it can also trigger a Layout with the provided insets #Patch Set 3 : Removing direct call to UpdateDialogButtons() #
Total comments: 2
Patch Set 4 : Protecting against scenarios with no widget #
Messages
Total messages: 43 (30 generated)
The CQ bit was checked by djacobo@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
djacobo@chromium.org changed reviewers: + sky@chromium.org
PTAL
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_tsan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
On 2017/05/09 21:13:03, djacobo wrote: > PTAL Already tested on M59, this fixes the insets problem there too (no need to cherry pick it before M59)
The CQ bit was checked by djacobo@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) chromium_presubmit on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?)) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, build has not started yet; builder either lacks capacity or does not exist (misspelled?))
https://codereview.chromium.org/2874493002/diff/1/chrome/browser/ui/views/int... File chrome/browser/ui/views/intent_picker_bubble_view.cc (right): https://codereview.chromium.org/2874493002/diff/1/chrome/browser/ui/views/int... chrome/browser/ui/views/intent_picker_bubble_view.cc:111: delegate->GetDialogClientView()->set_button_row_insets( Can this be moved above line 109 such that 113 is not necessary? Otherwise I think set_button_row_insets sure become SetButtonRowInsets() and it should force a layout. In other words you shouldn't have to manually call UpdateDialogButtons.
https://codereview.chromium.org/2874493002/diff/1/chrome/browser/ui/views/int... File chrome/browser/ui/views/intent_picker_bubble_view.cc (right): https://codereview.chromium.org/2874493002/diff/1/chrome/browser/ui/views/int... chrome/browser/ui/views/intent_picker_bubble_view.cc:111: delegate->GetDialogClientView()->set_button_row_insets( On 2017/05/10 15:27:02, sky wrote: > Can this be moved above line 109 such that 113 is not necessary? Otherwise I > think set_button_row_insets sure become SetButtonRowInsets() and it should force > a layout. In other words you shouldn't have to manually call > UpdateDialogButtons. I don't think that's possible since CreateBubble calls Init, so before that everything GetDialogClientView is still not constructed, right? I did the suggested experiment and the Browser crashes while trying to start the picker.
Ok, in that case please rename set_button_row_insets and have it trigger a layout. On Wed, May 10, 2017 at 11:14 AM, <djacobo@chromium.org> wrote: > > https://codereview.chromium.org/2874493002/diff/1/chrome/ > browser/ui/views/intent_picker_bubble_view.cc > File chrome/browser/ui/views/intent_picker_bubble_view.cc (right): > > https://codereview.chromium.org/2874493002/diff/1/chrome/ > browser/ui/views/intent_picker_bubble_view.cc#newcode111 > chrome/browser/ui/views/intent_picker_bubble_view.cc:111: > delegate->GetDialogClientView()->set_button_row_insets( > On 2017/05/10 15:27:02, sky wrote: > > Can this be moved above line 109 such that 113 is not necessary? > Otherwise I > > think set_button_row_insets sure become SetButtonRowInsets() and it > should force > > a layout. In other words you shouldn't have to manually call > > UpdateDialogButtons. > > I don't think that's possible since CreateBubble calls Init, so before > that everything GetDialogClientView is still not constructed, right? I > did the suggested experiment and the Browser crashes while trying to > start the picker. > > https://codereview.chromium.org/2874493002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
By rename I mean as set_button_row_insets will no longer be cheap it should be changed to SetButtonRowInsets(). On Thu, May 11, 2017 at 6:56 PM, Scott Violet <sky@chromium.org> wrote: > Ok, in that case please rename set_button_row_insets and have it trigger a > layout. > > On Wed, May 10, 2017 at 11:14 AM, <djacobo@chromium.org> wrote: > >> >> https://codereview.chromium.org/2874493002/diff/1/chrome/bro >> wser/ui/views/intent_picker_bubble_view.cc >> File chrome/browser/ui/views/intent_picker_bubble_view.cc (right): >> >> https://codereview.chromium.org/2874493002/diff/1/chrome/bro >> wser/ui/views/intent_picker_bubble_view.cc#newcode111 >> chrome/browser/ui/views/intent_picker_bubble_view.cc:111: >> delegate->GetDialogClientView()->set_button_row_insets( >> On 2017/05/10 15:27:02, sky wrote: >> > Can this be moved above line 109 such that 113 is not necessary? >> Otherwise I >> > think set_button_row_insets sure become SetButtonRowInsets() and it >> should force >> > a layout. In other words you shouldn't have to manually call >> > UpdateDialogButtons. >> >> I don't think that's possible since CreateBubble calls Init, so before >> that everything GetDialogClientView is still not constructed, right? I >> did the suggested experiment and the Browser crashes while trying to >> start the picker. >> >> https://codereview.chromium.org/2874493002/ >> > > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
The CQ bit was checked by djacobo@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by djacobo@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2017/05/12 01:57:23, sky wrote: > By rename I mean as set_button_row_insets will no longer be cheap it should > be changed to SetButtonRowInsets(). > > On Thu, May 11, 2017 at 6:56 PM, Scott Violet <mailto:sky@chromium.org> wrote: > > > Ok, in that case please rename set_button_row_insets and have it trigger a > > layout. > > > > On Wed, May 10, 2017 at 11:14 AM, <mailto:djacobo@chromium.org> wrote: > > > >> > >> https://codereview.chromium.org/2874493002/diff/1/chrome/bro > >> wser/ui/views/intent_picker_bubble_view.cc > >> File chrome/browser/ui/views/intent_picker_bubble_view.cc (right): > >> > >> https://codereview.chromium.org/2874493002/diff/1/chrome/bro > >> wser/ui/views/intent_picker_bubble_view.cc#newcode111 > >> chrome/browser/ui/views/intent_picker_bubble_view.cc:111: > >> delegate->GetDialogClientView()->set_button_row_insets( > >> On 2017/05/10 15:27:02, sky wrote: > >> > Can this be moved above line 109 such that 113 is not necessary? > >> Otherwise I > >> > think set_button_row_insets sure become SetButtonRowInsets() and it > >> should force > >> > a layout. In other words you shouldn't have to manually call > >> > UpdateDialogButtons. > >> > >> I don't think that's possible since CreateBubble calls Init, so before > >> that everything GetDialogClientView is still not constructed, right? I > >> did the suggested experiment and the Browser crashes while trying to > >> start the picker. > >> > >> https://codereview.chromium.org/2874493002/ > >> > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Chromium-reviews" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to mailto:chromium-reviews+unsubscribe@chromium.org. Alright, reading thru the test cases to see if something breaks.
On 2017/05/12 01:57:23, sky wrote: > By rename I mean as set_button_row_insets will no longer be cheap it should > be changed to SetButtonRowInsets(). > > On Thu, May 11, 2017 at 6:56 PM, Scott Violet <mailto:sky@chromium.org> wrote: > > > Ok, in that case please rename set_button_row_insets and have it trigger a > > layout. > > > > On Wed, May 10, 2017 at 11:14 AM, <mailto:djacobo@chromium.org> wrote: > > > >> > >> https://codereview.chromium.org/2874493002/diff/1/chrome/bro > >> wser/ui/views/intent_picker_bubble_view.cc > >> File chrome/browser/ui/views/intent_picker_bubble_view.cc (right): > >> > >> https://codereview.chromium.org/2874493002/diff/1/chrome/bro > >> wser/ui/views/intent_picker_bubble_view.cc#newcode111 > >> chrome/browser/ui/views/intent_picker_bubble_view.cc:111: > >> delegate->GetDialogClientView()->set_button_row_insets( > >> On 2017/05/10 15:27:02, sky wrote: > >> > Can this be moved above line 109 such that 113 is not necessary? > >> Otherwise I > >> > think set_button_row_insets sure become SetButtonRowInsets() and it > >> should force > >> > a layout. In other words you shouldn't have to manually call > >> > UpdateDialogButtons. > >> > >> I don't think that's possible since CreateBubble calls Init, so before > >> that everything GetDialogClientView is still not constructed, right? I > >> did the suggested experiment and the Browser crashes while trying to > >> start the picker. > >> > >> https://codereview.chromium.org/2874493002/ > >> > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Chromium-reviews" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to mailto:chromium-reviews+unsubscribe@chromium.org. Alright, reading thru the test cases to see if something breaks.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2874493002/diff/40001/ui/views/window/dialog_... File ui/views/window/dialog_client_view.cc (right): https://codereview.chromium.org/2874493002/diff/40001/ui/views/window/dialog_... ui/views/window/dialog_client_view.cc:113: if (button_row_container_->has_children()) Why do you make this conditional on whether there are children? I could checking if in a widget, but I'm not sure why the children matter.
The CQ bit was checked by djacobo@chromium.org to run a CQ dry run
https://codereview.chromium.org/2874493002/diff/40001/ui/views/window/dialog_... File ui/views/window/dialog_client_view.cc (right): https://codereview.chromium.org/2874493002/diff/40001/ui/views/window/dialog_... ui/views/window/dialog_client_view.cc:113: if (button_row_container_->has_children()) On 2017/05/14 16:01:16, sky wrote: > Why do you make this conditional on whether there are children? I could checking > if in a widget, but I'm not sure why the children matter. Initially I thought that not having an ok_button_ or cancel_button_ was the root cause, (the observable behavior was the browser crashing right after logging in), however, after some debugging I noticed that the real problem was SetButtonRowInsets() being called from a view without a widget (which is a valid case and that would still try to call https://cs.chromium.org/chromium/src/ui/views/window/dialog_client_view.cc?dr...) So I can replace line 113 with if (GetWidget()) and that should be enough, replacing this line. Thanks for the pointer!
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by djacobo@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by djacobo@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
LGTM
The CQ bit was checked by djacobo@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1495044679376500, "parent_rev": "476235bd668ef183b5e605cc5d0ceaed36586592", "commit_rev": "15bdd62c05472adc642dcf0982fe4662502ac957"}
Message was sent while issue was closed.
Description was changed from ========== Make ARC's intent picker use the buttons insets. Need to call SetupLayout via UpdateDialogButtons so the buttons make proper use of the established insets. Bug: 678141 Test: Try. ========== to ========== Make ARC's intent picker use the buttons insets. Need to call SetupLayout via UpdateDialogButtons so the buttons make proper use of the established insets. Bug: 678141 Test: Try. Review-Url: https://codereview.chromium.org/2874493002 Cr-Commit-Position: refs/heads/master@{#472534} Committed: https://chromium.googlesource.com/chromium/src/+/15bdd62c05472adc642dcf0982fe... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/15bdd62c05472adc642dcf0982fe... |