[MacViews] Save Credit Card bubble doesn't follow a moving parent window |
||||
Issue descriptionSteps: 0. Run a recent Chrome with --secondary-ui-md 1. https://dump-truck.appspot.com 2. Choose step 2(b) 3. Fill both forms with default values and submit. 4. Observe that the credit card save bubble is nice (yay!) and anchored on the location bar decoration 5. Move the parent window, the bubble doesn't follow/dismiss and stays in mid-air :\
,
Oct 19 2017
I'll take this. SaveCardBubbleViews needs to accept a gfx::NativeWindow into its constructor to associate properly as a child window.
,
Oct 19 2017
WIP cl -> https://chromium-review.googlesource.com/#/c/chromium/src/+/727640 in debug builds this actually DCHECKs.. [52365:775:1019/135246.447092:FATAL:bubble_anchor_helper_views.mm(95)] Check failed: bubble->parent_window(). 0 libbase.dylib 0x000000010552d9de base::debug::StackTrace::StackTrace(unsigned long) + 174 1 libbase.dylib 0x000000010552da9d base::debug::StackTrace::StackTrace(unsigned long) + 29 2 libbase.dylib 0x000000010552bd4c base::debug::StackTrace::StackTrace() + 28 3 libbase.dylib 0x00000001055c4f7f logging::LogMessage::~LogMessage() + 479 4 libbase.dylib 0x00000001055c28e5 logging::LogMessage::~LogMessage() + 21 5 libchrome_dll.dylib 0x000000010f6e8e3f (anonymous namespace)::BubbleAnchorHelper::BubbleAnchorHelper(views::BubbleDialogDelegateView*, LocationBarDecoration*, (anonymous namespace)::AnchorType) + 687 6 libchrome_dll.dylib 0x000000010f6e8b0b (anonymous namespace)::BubbleAnchorHelper::BubbleAnchorHelper(views::BubbleDialogDelegateView*, LocationBarDecoration*, (anonymous namespace)::AnchorType) + 43 7 libchrome_dll.dylib 0x000000010f6e8ab0 KeepBubbleAnchored(views::BubbleDialogDelegateView*, LocationBarDecoration*) + 64 8 libchrome_dll.dylib 0x000000010f64d1a6 autofill::CreateSaveCardBubbleView(content::WebContents*, autofill::SaveCardBubbleController*, BrowserWindowController*, bool) + 342 9 libchrome_dll.dylib 0x000000010f6bac98 BrowserWindowCocoa::ShowSaveCreditCardBubble(content::WebContents*, autofill::SaveCardBubbleController*, bool) + 56 10 libchrome_dll.dylib 0x000000010f939566 autofill::SaveCardBubbleControllerImpl::ShowBubble() + 518 11 libchrome_dll.dylib 0x000000010f939328 autofill::SaveCardBubbleControllerImpl::ShowBubbleForLocalSave(autofill::CreditCard const&, base::RepeatingCallback<void ()> const&) + 1176 12 libchrome_dll.dylib 0x000000010f02baa0 autofill::ChromeAutofillClient::ConfirmSaveCreditCardLocally(autofill::CreditCard const&, base::RepeatingCallback<void ()> const&) + 96 13 libchrome_dll.dylib 0x000000010cf1e112 autofill::AutofillManager::ImportFormData(autofill::FormStructure const&) + 6370 14 libchrome_dll.dylib 0x000000010cf1c6c9 autofill::AutofillManager::OnFormSubmitted(autofill::FormData const&) + 745 15 libchrome_dll.dylib 0x000000010e598186 autofill::ContentAutofillDriver::FormSubmitted(autofill::FormData const&) + 86 The simple fix in that CL behaves kinda weird, and doesn't anchor right though. There's more to investigate here.
,
Oct 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4254a407dd7d13736d011fe88c17c4093f1d56c7 commit 4254a407dd7d13736d011fe88c17c4093f1d56c7 Author: Trent Apted <tapted@chromium.org> Date: Fri Oct 20 06:54:52 2017 MacViews: Fix anchoring of the credit card save dialog. Since the Cocoa browser window is unable to configure the bubble with a views::View anchor view, it needs to customize some BubbleDialogDelegate parameters before the bubble frame is created. To fix, move the BubbleDialogDelegateView::CreateBubble() call out of the SaveCardBubbleViews constructor to the call sites. Add a dialog browser test to give coverage of showing the credit card UI, since this would have DCHECKed without the fix. Bug: 774449 Change-Id: Iad68894dfbfa6954fe8af2ac0af2a3e5657c2c7d Reviewed-on: https://chromium-review.googlesource.com/727640 Commit-Queue: Trent Apted <tapted@chromium.org> Reviewed-by: Mathieu Perreault <mathp@chromium.org> Cr-Commit-Position: refs/heads/master@{#510364} [add] https://crrev.com/4254a407dd7d13736d011fe88c17c4093f1d56c7/chrome/browser/ui/autofill/save_card_bubble_controller_impl_browsertest.cc [modify] https://crrev.com/4254a407dd7d13736d011fe88c17c4093f1d56c7/chrome/browser/ui/cocoa/autofill/save_card_bubble_view_views.mm [modify] https://crrev.com/4254a407dd7d13736d011fe88c17c4093f1d56c7/chrome/browser/ui/views/autofill/save_card_bubble_views.cc [modify] https://crrev.com/4254a407dd7d13736d011fe88c17c4093f1d56c7/chrome/browser/ui/views/frame/browser_view.cc [modify] https://crrev.com/4254a407dd7d13736d011fe88c17c4093f1d56c7/chrome/test/BUILD.gn
,
Oct 23 2017
tested in canary. |
||||
►
Sign in to add a comment |
||||
Comment 1 by ma...@chromium.org
, Oct 18 2017