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

Unified Diff: third_party/WebKit/Source/platform/Widget.cpp

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, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/Widget.cpp
diff --git a/third_party/WebKit/Source/platform/Widget.cpp b/third_party/WebKit/Source/platform/Widget.cpp
index b4aa2afa43a83079c89ecb19088a0e6c9b0d2a70..e23bf9570b22ebbdb76cc0feb5ce11705f00d7b4 100644
--- a/third_party/WebKit/Source/platform/Widget.cpp
+++ b/third_party/WebKit/Source/platform/Widget.cpp
@@ -27,6 +27,7 @@
#include "platform/Widget.h"
#include "wtf/Assertions.h"
+#include "wtf/text/WTFString.h"
fs 2016/05/23 21:25:56 Hmm?
namespace blink {
@@ -66,6 +67,20 @@ Widget* Widget::root() const
return 0;
}
+bool Widget::resize(int w, int h)
+{
+ return resize(IntSize(w, h));
+}
+
+bool Widget::resize(const IntSize& s)
+{
+ IntRect newFrameRect(IntRect(location(), s));
fs 2016/05/23 21:25:56 newFrameRect(location(), s); Could also just comp
+ if (newFrameRect == frameRect())
+ return false;
+ setFrameRect(newFrameRect);
+ return true;
+}
+
IntRect Widget::convertFromRootFrame(const IntRect& rectInRootFrame) const
{
if (const Widget* parentWidget = parent()) {

Powered by Google App Engine
This is Rietveld 408576698