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

Side by Side Diff: third_party/WebKit/Source/platform/Widget.h

Issue 1486743002: Clean up some remaining obsolete coordinate-space naming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Mac compile Created 5 years 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 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2008 Collabora Ltd. All rights reserved. 3 * Copyright (C) 2008 Collabora Ltd. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 virtual bool isPluginContainer() const { return false; } 87 virtual bool isPluginContainer() const { return false; }
88 virtual bool isScrollbar() const { return false; } 88 virtual bool isScrollbar() const { return false; }
89 89
90 virtual void setParent(Widget*); 90 virtual void setParent(Widget*);
91 Widget* parent() const { return m_parent; } 91 Widget* parent() const { return m_parent; }
92 Widget* root() const; 92 Widget* root() const;
93 93
94 virtual void handleEvent(Event*) { } 94 virtual void handleEvent(Event*) { }
95 95
96 // It is important for cross-platform code to realize that Mac has flipped c oordinates. Therefore any code 96 // It is important for cross-platform code to realize that Mac has flipped c oordinates. Therefore any code
97 // that tries to convert the location of a rect using the point-based conver tFromContainingWindow will end 97 // that tries to convert the location of a rect using the point-based conver tFromRootFrame will end
98 // up with an inaccurate rect. Always make sure to use the rect-based conver tFromContainingWindow method 98 // up with an inaccurate rect. Always make sure to use the rect-based conver tFromRootFrame method
99 // when converting window rects. 99 // when converting window rects.
100 IntRect convertToContainingWindow(const IntRect&) const; 100 IntRect convertToRootFrame(const IntRect&) const;
101 IntRect convertFromContainingWindow(const IntRect&) const; 101 IntRect convertFromRootFrame(const IntRect&) const;
102 102
103 IntPoint convertToContainingWindow(const IntPoint&) const; 103 IntPoint convertToRootFrame(const IntPoint&) const;
104 IntPoint convertFromContainingWindow(const IntPoint&) const; 104 IntPoint convertFromRootFrame(const IntPoint&) const;
105 FloatPoint convertFromContainingWindow(const FloatPoint&) const; 105 FloatPoint convertFromRootFrame(const FloatPoint&) const;
106 106
107 virtual void frameRectsChanged() { } 107 virtual void frameRectsChanged() { }
108 108
109 // Notifies this widget that other widgets on the page have been repositione d. 109 // Notifies this widget that other widgets on the page have been repositione d.
110 virtual void widgetPositionsUpdated() { } 110 virtual void widgetPositionsUpdated() { }
111 111
112 // Virtual methods to convert points to/from the containing Widget 112 virtual IntRect convertToContainingWidget(const IntRect&) const;
113 virtual IntRect convertToContainingView(const IntRect&) const; 113 virtual IntRect convertFromContainingWidget(const IntRect&) const;
114 virtual IntRect convertFromContainingView(const IntRect&) const; 114 virtual IntPoint convertToContainingWidget(const IntPoint&) const;
115 virtual IntPoint convertToContainingView(const IntPoint&) const; 115 virtual IntPoint convertFromContainingWidget(const IntPoint&) const;
116 virtual IntPoint convertFromContainingView(const IntPoint&) const;
117 116
118 // Virtual methods to convert points to/from child widgets 117 // Virtual methods to convert points to/from child widgets
119 virtual IntPoint convertChildToSelf(const Widget*, const IntPoint&) const; 118 virtual IntPoint convertChildToSelf(const Widget*, const IntPoint&) const;
120 virtual IntPoint convertSelfToChild(const Widget*, const IntPoint&) const; 119 virtual IntPoint convertSelfToChild(const Widget*, const IntPoint&) const;
121 120
122 // Notifies this widget that it will no longer be receiving events. 121 // Notifies this widget that it will no longer be receiving events.
123 virtual void eventListenersRemoved() { } 122 virtual void eventListenersRemoved() { }
124 123
125 DECLARE_VIRTUAL_TRACE(); 124 DECLARE_VIRTUAL_TRACE();
126 virtual void dispose() { } 125 virtual void dispose() { }
127 126
128 private: 127 private:
129 RawPtrWillBeMember<Widget> m_parent; 128 RawPtrWillBeMember<Widget> m_parent;
130 IntRect m_frame; 129 IntRect m_frame;
131 bool m_selfVisible; 130 bool m_selfVisible;
132 bool m_parentVisible; 131 bool m_parentVisible;
133 }; 132 };
134 133
135 } // namespace blink 134 } // namespace blink
136 135
137 #endif // Widget_h 136 #endif // Widget_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/PlatformMouseEvent.h ('k') | third_party/WebKit/Source/platform/Widget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698