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

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

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 IntSize size() const { return frameRect().size(); } 60 IntSize size() const { return frameRect().size(); }
61 IntPoint location() const { return frameRect().location(); } 61 IntPoint location() const { return frameRect().location(); }
62 62
63 virtual void setFrameRect(const IntRect& frame) { m_frame = frame; } 63 virtual void setFrameRect(const IntRect& frame) { m_frame = frame; }
64 const IntRect& frameRect() const { return m_frame; } 64 const IntRect& frameRect() const { return m_frame; }
65 IntRect boundsRect() const { return IntRect(0, 0, width(), height()); } 65 IntRect boundsRect() const { return IntRect(0, 0, width(), height()); }
66 66
67 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); } 67 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); }
68 void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); } 68 void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); }
69 69
70 virtual void paint(GraphicsContext*, const CullRect&) const { } 70 virtual void paint(GraphicsContext&, const CullRect&) const { }
71 void invalidate() { invalidateRect(boundsRect()); } 71 void invalidate() { invalidateRect(boundsRect()); }
72 virtual void invalidateRect(const IntRect&) = 0; 72 virtual void invalidateRect(const IntRect&) = 0;
73 73
74 virtual void setFocus(bool, WebFocusType) { } 74 virtual void setFocus(bool, WebFocusType) { }
75 75
76 virtual void show() { } 76 virtual void show() { }
77 virtual void hide() { } 77 virtual void hide() { }
78 bool isSelfVisible() const { return m_selfVisible; } // Whether or not we ha ve been explicitly marked as visible or not. 78 bool isSelfVisible() const { return m_selfVisible; } // Whether or not we ha ve been explicitly marked as visible or not.
79 bool isParentVisible() const { return m_parentVisible; } // Whether or not o ur parent is visible. 79 bool isParentVisible() const { return m_parentVisible; } // Whether or not o ur parent is visible.
80 bool isVisible() const { return m_selfVisible && m_parentVisible; } // Wheth er or not we are actually visible. 80 bool isVisible() const { return m_selfVisible && m_parentVisible; } // Wheth er or not we are actually visible.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 private: 127 private:
128 RawPtrWillBeMember<Widget> m_parent; 128 RawPtrWillBeMember<Widget> m_parent;
129 IntRect m_frame; 129 IntRect m_frame;
130 bool m_selfVisible; 130 bool m_selfVisible;
131 bool m_parentVisible; 131 bool m_parentVisible;
132 }; 132 };
133 133
134 } // namespace blink 134 } // namespace blink
135 135
136 #endif // Widget_h 136 #endif // Widget_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698