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

Side by Side Diff: Source/web/PopupContainer.cpp

Issue 572943003: Fix point conversions in PopupContainer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/web/PopupContainer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011, Google Inc. All rights reserved. 2 * Copyright (c) 2011, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 { 518 {
519 if (HostWindow* h = hostWindow()) 519 if (HostWindow* h = hostWindow())
520 h->invalidateContentsAndRootView(rect); 520 h->invalidateContentsAndRootView(rect);
521 } 521 }
522 522
523 HostWindow* PopupContainer::hostWindow() const 523 HostWindow* PopupContainer::hostWindow() const
524 { 524 {
525 return const_cast<PopupContainerClient*>(m_client); 525 return const_cast<PopupContainerClient*>(m_client);
526 } 526 }
527 527
528 IntPoint PopupContainer::convertChildToSelf(const Widget* child, const IntPoint& point) const
529 {
530 IntPoint newPoint = point;
531 newPoint.moveBy(child->location());
532 return newPoint;
533 }
534
535 IntPoint PopupContainer::convertSelfToChild(const Widget* child, const IntPoint& point) const
536 {
537 IntPoint newPoint = point;
538 newPoint.moveBy(-child->location());
539 return newPoint;
540 }
541
528 } // namespace blink 542 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/PopupContainer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698