Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: components/autofill/core/browser/autofill_manager.cc

Issue 1526263003: Position autofill popup widgets correctly under --site-per-process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed incorrect cast Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/core/browser/autofill_manager.h" 5 #include "components/autofill/core/browser/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 void AutofillManager::OnQueryFormFieldAutofill(int query_id, 381 void AutofillManager::OnQueryFormFieldAutofill(int query_id,
382 const FormData& form, 382 const FormData& form,
383 const FormFieldData& field, 383 const FormFieldData& field,
384 const gfx::RectF& bounding_box) { 384 const gfx::RectF& bounding_box) {
385 if (!IsValidFormData(form) || !IsValidFormFieldData(field)) 385 if (!IsValidFormData(form) || !IsValidFormFieldData(field))
386 return; 386 return;
387 387
388 std::vector<Suggestion> suggestions; 388 std::vector<Suggestion> suggestions;
389 389
390 external_delegate_->OnQuery(query_id, form, field, bounding_box); 390 gfx::RectF transformed_box =
391 driver_->TransformBoundingBoxToViewportCoordinates(bounding_box);
392 external_delegate_->OnQuery(query_id, form, field, transformed_box);
391 393
392 // Need to refresh models before using the form_event_loggers. 394 // Need to refresh models before using the form_event_loggers.
393 bool is_autofill_possible = RefreshDataModels(); 395 bool is_autofill_possible = RefreshDataModels();
394 396
395 FormStructure* form_structure = NULL; 397 FormStructure* form_structure = NULL;
396 AutofillField* autofill_field = NULL; 398 AutofillField* autofill_field = NULL;
397 bool got_autofillable_form = 399 bool got_autofillable_form =
398 GetCachedFormAndField(form, field, &form_structure, &autofill_field) && 400 GetCachedFormAndField(form, field, &form_structure, &autofill_field) &&
399 // Don't send suggestions or track forms that should not be parsed. 401 // Don't send suggestions or track forms that should not be parsed.
400 form_structure->ShouldBeParsed(); 402 form_structure->ShouldBeParsed();
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 if (i > 0) 1709 if (i > 0)
1708 fputs("Next oldest form:\n", file); 1710 fputs("Next oldest form:\n", file);
1709 } 1711 }
1710 fputs("\n", file); 1712 fputs("\n", file);
1711 1713
1712 fclose(file); 1714 fclose(file);
1713 } 1715 }
1714 #endif // ENABLE_FORM_DEBUG_DUMP 1716 #endif // ENABLE_FORM_DEBUG_DUMP
1715 1717
1716 } // namespace autofill 1718 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_driver.h ('k') | components/autofill/core/browser/test_autofill_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698