Changeset 20385 in webkit
- Timestamp:
- Mar 22, 2007 2:13:13 AM (17 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r20384 r20385 1 2007-03-22 David Hyatt <hyatt@apple.com> 2 3 Minor refactoring and cleanup of the bridge calls that want to control layout settings on the RenderView. 4 Have the bridge talk through the FrameView instead of just asking for the RenderView directly. 5 6 Add an assert to help catch situations where the RenderView needs layout at paint time, since this is a known 7 catastrophic scenario that will (much of the time) result in a crash in RenderTableSection::paint. 8 9 Reviewed by aroben 10 11 * page/FrameView.cpp: 12 (WebCore::FrameView::adjustViewSize): 13 (WebCore::FrameView::needsLayout): 14 (WebCore::FrameView::setNeedsLayout): 15 * page/FrameView.h: 16 * page/mac/WebCoreFrameBridge.mm: 17 (-[WebCoreFrameBridge needsLayout]): 18 (-[WebCoreFrameBridge setNeedsLayout]): 19 * rendering/RenderView.cpp: 20 (WebCore::RenderView::paint): 21 1 22 2007-03-21 Geoffrey Garen <ggaren@apple.com> 2 23 -
trunk/WebCore/page/FrameView.cpp
r20360 r20385 218 218 { 219 219 ASSERT(m_frame->view() == this); 220 if (Document* document = m_frame->document()) { 221 RenderView* root = static_cast<RenderView*>(document->renderer()); 222 if (!root) 223 return; 224 resizeContents(root->overflowWidth(), root->overflowHeight()); 225 } 220 RenderView* root = static_cast<RenderView*>(m_frame->renderer()); 221 if (!root) 222 return; 223 resizeContents(root->overflowWidth(), root->overflowHeight()); 226 224 } 227 225 … … 698 696 } 699 697 698 bool FrameView::needsLayout() const 699 { 700 return layoutPending(); 701 } 702 703 void FrameView::setNeedsLayout() 704 { 705 if (m_frame->renderer()) 706 m_frame->renderer()->setNeedsLayout(true); 707 } 708 700 709 bool FrameView::haveDelayedLayoutScheduled() 701 710 { -
trunk/WebCore/page/FrameView.h
r20360 r20385 85 85 int layoutCount() const; 86 86 87 // These two helper functions just pass through to the RenderView. 88 bool needsLayout() const; 89 void setNeedsLayout(); 90 87 91 bool needsFullRepaint() const; 88 92 void repaintRectangle(const IntRect&, bool immediate); -
trunk/WebCore/page/mac/WebCoreFrameBridge.mm
r20324 r20385 770 770 - (BOOL)needsLayout 771 771 { 772 FrameView* view = m_frame->view(); 773 return view ? view->layoutPending() : false; 772 return m_frame->view() ? m_frame->view()->needsLayout() : false; 774 773 } 775 774 776 775 - (void)setNeedsLayout 777 776 { 778 RenderObject *renderer = m_frame->renderer(); 779 if (renderer) 780 renderer->setNeedsLayout(true); 777 if (m_frame->view()) 778 m_frame->view()->setNeedsLayout(); 781 779 } 782 780 -
trunk/WebCore/rendering/RenderView.cpp
r20380 r20385 129 129 void RenderView::paint(PaintInfo& paintInfo, int tx, int ty) 130 130 { 131 // If we ever require layout but receive a paint anyway, something has gone horribly wrong. 132 ASSERT(!needsLayout()); 133 131 134 // Cache the print rect because the dirty rect could get changed during painting. 132 135 if (printing())
Note: See TracChangeset
for help on using the changeset viewer.