Diff
Modified: trunk/Source/WebCore/ChangeLog (87520 => 87521)
--- trunk/Source/WebCore/ChangeLog 2011-05-27 16:59:08 UTC (rev 87520)
+++ trunk/Source/WebCore/ChangeLog 2011-05-27 17:25:06 UTC (rev 87521)
@@ -1,3 +1,20 @@
+2011-05-27 David Levin <le...@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Need a callback for when the preferred rendered size may have changed.
+ https://bugs.webkit.org/show_bug.cgi?id=61309
+
+ No new tests needed since no new functionality is exposed.
+
+ * page/Chrome.cpp:
+ (WebCore::Chrome::layoutUpdated): Plumbed through the call.
+ * page/Chrome.h: Added the new method.
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::layoutUpdated): Ditto.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout): Added a callback for whem a layout has finished.
+
2011-05-27 Stephanie Lewis <sle...@apple.com>
Rubber Stamped by Adam Roben.
Modified: trunk/Source/WebCore/page/Chrome.cpp (87520 => 87521)
--- trunk/Source/WebCore/page/Chrome.cpp 2011-05-27 16:59:08 UTC (rev 87520)
+++ trunk/Source/WebCore/page/Chrome.cpp 2011-05-27 17:25:06 UTC (rev 87521)
@@ -114,6 +114,11 @@
m_client->contentsSizeChanged(frame, size);
}
+void Chrome::layoutUpdated(Frame* frame) const
+{
+ m_client->layoutUpdated(frame);
+}
+
void Chrome::scrollRectIntoView(const IntRect& rect) const
{
// FIXME: The unused ScrollView* argument can and should be removed from ChromeClient::scrollRectIntoView.
Modified: trunk/Source/WebCore/page/Chrome.h (87520 => 87521)
--- trunk/Source/WebCore/page/Chrome.h 2011-05-27 16:59:08 UTC (rev 87520)
+++ trunk/Source/WebCore/page/Chrome.h 2011-05-27 17:25:06 UTC (rev 87521)
@@ -84,6 +84,7 @@
void scrollRectIntoView(const IntRect&) const;
void contentsSizeChanged(Frame*, const IntSize&) const;
+ void layoutUpdated(Frame*) const;
void setWindowRect(const FloatRect&) const;
FloatRect windowRect() const;
Modified: trunk/Source/WebCore/page/ChromeClient.h (87520 => 87521)
--- trunk/Source/WebCore/page/ChromeClient.h 2011-05-27 16:59:08 UTC (rev 87520)
+++ trunk/Source/WebCore/page/ChromeClient.h 2011-05-27 17:25:06 UTC (rev 87521)
@@ -161,6 +161,7 @@
virtual void dispatchViewportDataDidChange(const ViewportArguments&) const { }
virtual void contentsSizeChanged(Frame*, const IntSize&) const = 0;
+ virtual void layoutUpdated(Frame*) const { }
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const = 0; // Currently only Mac has a non empty implementation.
virtual bool shouldMissingPluginMessageBeButton() const { return false; }
Modified: trunk/Source/WebCore/page/FrameView.cpp (87520 => 87521)
--- trunk/Source/WebCore/page/FrameView.cpp 2011-05-27 16:59:08 UTC (rev 87520)
+++ trunk/Source/WebCore/page/FrameView.cpp 2011-05-27 17:25:06 UTC (rev 87521)
@@ -1064,6 +1064,11 @@
InspectorInstrumentation::didLayout(cookie);
m_nestedLayoutCount--;
+ if (!m_nestedLayoutCount) {
+ Page* page = frame() ? frame()->page() : 0;
+ if (page)
+ return page->chrome()->client()->layoutUpdated(frame());
+ }
}
void FrameView::addWidgetToUpdate(RenderEmbeddedObject* object)
Modified: trunk/Source/WebKit/chromium/ChangeLog (87520 => 87521)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-05-27 16:59:08 UTC (rev 87520)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-05-27 17:25:06 UTC (rev 87521)
@@ -1,3 +1,16 @@
+2011-05-27 David Levin <le...@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Need a callback for when the preferred rendered size may have changed.
+ https://bugs.webkit.org/show_bug.cgi?id=61309
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::didUpdateLayout): Added stub.
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::layoutUpdated): Plumbed through the call to WebFrameClient::didUpdateLayout.
+ * src/ChromeClientImpl.h: Added declaration.
+
2011-05-27 Shishir Agrawal <shis...@chromium.org>
Reviewed by Tony Gentilcore.
Modified: trunk/Source/WebKit/chromium/public/WebFrameClient.h (87520 => 87521)
--- trunk/Source/WebKit/chromium/public/WebFrameClient.h 2011-05-27 16:59:08 UTC (rev 87520)
+++ trunk/Source/WebKit/chromium/public/WebFrameClient.h 2011-05-27 17:25:06 UTC (rev 87521)
@@ -104,6 +104,13 @@
// This frame is about to be closed.
virtual void willClose(WebFrame*) { }
+ // Indicates two things:
+ // 1) This frame may have a new layout now.
+ // 2) Calling layout() is a no-op.
+ // After calling WebWidget::layout(), expect to get this notification
+ // for each frame unless the frame did not need a layout.
+ virtual void didUpdateLayout(WebFrame*) { }
+
// Load commands -------------------------------------------------------
// The client should handle the navigation externally.
Modified: trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp (87520 => 87521)
--- trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp 2011-05-27 16:59:08 UTC (rev 87520)
+++ trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp 2011-05-27 17:25:06 UTC (rev 87521)
@@ -588,6 +588,13 @@
webframe->client()->didChangeContentsSize(webframe, size);
}
+void ChromeClientImpl::layoutUpdated(Frame* frame) const
+{
+ WebFrameImpl* webframe = WebFrameImpl::fromFrame(frame);
+ if (webframe->client())
+ webframe->client()->didUpdateLayout(webframe);
+}
+
void ChromeClientImpl::scrollbarsModeDidChange() const
{
}
Modified: trunk/Source/WebKit/chromium/src/ChromeClientImpl.h (87520 => 87521)
--- trunk/Source/WebKit/chromium/src/ChromeClientImpl.h 2011-05-27 16:59:08 UTC (rev 87520)
+++ trunk/Source/WebKit/chromium/src/ChromeClientImpl.h 2011-05-27 17:25:06 UTC (rev 87521)
@@ -119,6 +119,7 @@
virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const;
virtual PlatformPageClient platformPageClient() const { return 0; }
virtual void contentsSizeChanged(WebCore::Frame*, const WebCore::IntSize&) const;
+ virtual void layoutUpdated(WebCore::Frame*) const;
virtual void scrollRectIntoView(
const WebCore::IntRect&, const WebCore::ScrollView*) const { }
virtual void scrollbarsModeDidChange() const;