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

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

Issue 1996363003: Avoid calling updateAllLifecyclePhasesExceptPaint in SVGImage if not needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 /* 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int y() const { return frameRect().y(); } 56 int y() const { return frameRect().y(); }
57 int width() const { return frameRect().width(); } 57 int width() const { return frameRect().width(); }
58 int height() const { return frameRect().height(); } 58 int height() const { return frameRect().height(); }
59 IntSize size() const { return frameRect().size(); } 59 IntSize size() const { return frameRect().size(); }
60 IntPoint location() const { return frameRect().location(); } 60 IntPoint location() const { return frameRect().location(); }
61 61
62 virtual void setFrameRect(const IntRect& frame) { m_frame = frame; } 62 virtual void setFrameRect(const IntRect& frame) { m_frame = frame; }
63 const IntRect& frameRect() const { return m_frame; } 63 const IntRect& frameRect() const { return m_frame; }
64 IntRect boundsRect() const { return IntRect(0, 0, width(), height()); } 64 IntRect boundsRect() const { return IntRect(0, 0, width(), height()); }
65 65
66 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); } 66 // These return false if the resize was a no-op.
67 void resize(const IntSize& s) { setFrameRect(IntRect(location(), s)); } 67 bool resize(int w, int h);
68 bool resize(const IntSize&);
68 69
69 virtual void paint(GraphicsContext&, const CullRect&) const { } 70 virtual void paint(GraphicsContext&, const CullRect&) const { }
70 void invalidate() { invalidateRect(boundsRect()); } 71 void invalidate() { invalidateRect(boundsRect()); }
71 virtual void invalidateRect(const IntRect&) = 0; 72 virtual void invalidateRect(const IntRect&) = 0;
72 73
73 virtual void setFocus(bool, WebFocusType) { } 74 virtual void setFocus(bool, WebFocusType) { }
74 75
75 virtual void show() { } 76 virtual void show() { }
76 virtual void hide() { } 77 virtual void hide() { }
77 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.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 private: 126 private:
126 Member<Widget> m_parent; 127 Member<Widget> m_parent;
127 IntRect m_frame; 128 IntRect m_frame;
128 bool m_selfVisible; 129 bool m_selfVisible;
129 bool m_parentVisible; 130 bool m_parentVisible;
130 }; 131 };
131 132
132 } // namespace blink 133 } // namespace blink
133 134
134 #endif // Widget_h 135 #endif // Widget_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698