WebCore:
Made FrameView::layoutIfNeededRecursive available to all platforms
Currently it's only used on Gtk+ and Windows.
Reviewed by Darin.
* page/FrameView.cpp: Removed #ifdef.
* page/FrameView.h: Ditto.
WebKit/win:
Switch Windows to using FrameView::layoutIfNeededRecursive
Reviewed by Darin.
* WebFrame.cpp: Removed layoutIfNeededRecursive.
* WebFrame.h: Ditto.
* WebView.cpp:
(WebView::updateBackingStore): Call FrameView::layoutIfNeededRecursive.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25177
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-08-21 Adam Roben <aroben@apple.com>
+
+ Made FrameView::layoutIfNeededRecursive available to all platforms
+
+ Currently it's only used on Gtk+ and Windows.
+
+ Reviewed by Darin.
+
+ * page/FrameView.cpp: Removed #ifdef.
+ * page/FrameView.h: Ditto.
+
2007-08-21 Adele Peterson <adele@apple.com>
Build fix for release build.
d->m_wasScrolledByUser = wasScrolledByUser;
}
-#if PLATFORM(GDK)
void FrameView::layoutIfNeededRecursive()
{
// We have to crawl our entire tree looking for any FrameViews that need
if ((*current)->isFrameView())
static_cast<FrameView*>(*current)->layoutIfNeededRecursive();
}
-#endif
}
bool wasScrolledByUser() const;
void setWasScrolledByUser(bool);
-#if PLATFORM(GDK)
void layoutIfNeededRecursive();
-#endif
private:
void init();
+2007-08-21 Adam Roben <aroben@apple.com>
+
+ Switch Windows to using FrameView::layoutIfNeededRecursive
+
+ Reviewed by Darin.
+
+ * WebFrame.cpp: Removed layoutIfNeededRecursive.
+ * WebFrame.h: Ditto.
+ * WebView.cpp:
+ (WebView::updateBackingStore): Call FrameView::layoutIfNeededRecursive.
+
2007-08-17 Adam Roben <aroben@apple.com>
Fix <rdar://5192578> Inspect Element should not appear in context menu in non-debug mode
frameView->setContainingWindow(viewWindow);
}
-void WebFrame::layoutIfNeededRecursive(FrameView* frameView)
-{
- LOCAL_GDI_COUNTER(0, __FUNCTION__);
-
- // We have to crawl our entire tree looking for any FrameViews that need
- // layout and make sure they are up to date.
- // Mac actually tests for intersection with the dirty region and tries not to
- // update layout for frames that are outside the dirty region. Not only does this seem
- // pointless (since those frames will have set a zero timer to layout anyway), but
- // it is also incorrect, since if two frames overlap, the first could be excluded from the dirty
- // region but then become included later by the second frame adding rects to the dirty region
- // when it lays out.
- if (!frameView) {
- frameView = d->frameView();
- if (!frameView)
- return;
- }
-
- // Layout if we need to.
- if (frameView->needsLayout())
- frameView->layout();
-
- // Now lay out any children that need to.
- HashSet<Widget*>* children = frameView->children();
- HashSet<Widget*>::iterator end = children->end();
- for (HashSet<Widget*>::iterator current = children->begin(); current != end; ++current)
- if ((*current)->isFrameView())
- layoutIfNeededRecursive(static_cast<FrameView*>(*current));
-}
-
Frame* WebFrame::impl()
{
return d->frame;
// WebFrame
void initWithWebFrameView(IWebFrameView*, IWebView*, WebCore::Page*, WebCore::HTMLFrameOwnerElement*);
- void layoutIfNeededRecursive(WebCore::FrameView* frameView);
WebCore::Frame* impl();
void invalidate();
void receivedData(const char*, int, const WebCore::String&);
if (m_backingStoreBitmap && (m_backingStoreDirtyRegion || backingStoreCompletelyDirty)) {
// Do a layout first so that everything we render to the backing store is always current.
- m_mainFrame->layoutIfNeededRecursive(0);
+ if (Frame* coreFrame = core(m_mainFrame))
+ if (FrameView* view = coreFrame->view())
+ view->layoutIfNeededRecursive();
// This emulates the Mac smarts for painting rects intelligently. This is
// very important for us, since we double buffer based off dirty rects.