Changeset 21390 in webkit
- Timestamp:
- May 10, 2007, 9:49:54 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r21389 r21390 1 2007-05-10 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Darin. 4 5 - repaint test and updated results for http://bugs.webkit.org/show_bug.cgi?id=13655 6 Incomplete repaint when text-shadow is used in a render layer with explicit height 7 8 * fast/repaint/layer-full-repaint-expected.checksum: Added. 9 * fast/repaint/layer-full-repaint-expected.png: Added. 10 * fast/repaint/layer-full-repaint-expected.txt: Added. 11 * fast/repaint/layer-full-repaint.html: Added. 12 * fast/repaint/repaint-resized-overflow-expected.checksum: 13 * fast/repaint/repaint-resized-overflow-expected.png: 14 1 15 2007-05-10 Justin Garcia <justin.garcia@apple.com> 2 16 -
trunk/LayoutTests/fast/repaint/repaint-resized-overflow-expected.checksum
r14089 r21390 1 4a08fade6137f2ea6dca995ae001e2e6 1 7bcff2ca869022f6515c572a36c58b4c -
trunk/WebCore/ChangeLog
r21389 r21390 1 2007-05-10 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Darin. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=13655 6 Incomplete repaint when text-shadow is used in a render layer with explicit height 7 8 Test: fast/repaint/layer-full-repaint.html 9 10 Removed custom repaint logic from RenderLayer. repaintAfterLayoutIfNeeded() 11 knows how to do everything we need now. The only catch is that we cannot 12 rely on its "do a full repaint if the object needs layout" behavior, since 13 by the time we call it, the needs layout flag has been reset. The solution 14 is to cache the need for a full repaint in the layer. 15 16 * page/FrameView.cpp: 17 (WebCore::FrameView::layout): Removed call to checkForRepaintOnResize(). 18 * rendering/RenderLayer.cpp: 19 (WebCore::RenderLayer::checkForRepaintOnResize): Removed. 20 (WebCore::RenderLayer::RenderLayer): Replaced the m_repaintOverflowOnResize 21 flag with a m_needsFullRepaint flag, which indicates that the layer needs 22 to do a full repaint in the next call to updateLayerPositions(). 23 (WebCore::RenderLayer::updateLayerPositions): Simplified the repaint logic. 24 Either call repaintAfterLayoutIfNeeded() or do a full repaint, depending on 25 m_needsFullRepaint. 26 * rendering/RenderLayer.h: 27 (WebCore::RenderLayer::setNeedsFullRepaint): 28 * rendering/RenderObject.cpp: 29 (WebCore::RenderObject::setNeedsLayout): Mark the layer for full repaint. 30 1 31 2007-05-10 Justin Garcia <justin.garcia@apple.com> 2 32 -
trunk/WebCore/page/FrameView.cpp
r21329 r21390 406 406 RenderLayer* layer = root->enclosingLayer(); 407 407 408 if (!d->doFullRepaint)409 layer->checkForRepaintOnResize();410 411 408 pauseScheduledEvents(); 412 409 -
trunk/WebCore/rendering/RenderLayer.cpp
r21387 r21390 142 142 , m_usedTransparency(false) 143 143 , m_inOverflowRelayout(false) 144 , m_ repaintOverflowOnResize(false)144 , m_needsFullRepaint(false) 145 145 , m_overflowStatusDirty(true) 146 146 , m_visibleContentStatusDirty(true) … … 175 175 } 176 176 177 void RenderLayer::checkForRepaintOnResize()178 {179 // FIXME: The second part of the condition is probably no longer needed. The first part can be180 // done when the object is marked for layout instead of walking the tree here.181 m_repaintOverflowOnResize = m_object->selfNeedsLayout() || m_object->hasOverflowClip() && m_object->normalChildNeedsLayout();182 for (RenderLayer* child = firstChild(); child; child = child->nextSibling())183 child->checkForRepaintOnResize();184 }185 186 177 void RenderLayer::updateLayerPositions(bool doFullRepaint, bool checkForRepaint) 187 178 { … … 210 201 if (checkForRepaint) { 211 202 if (view && !view->printing()) { 212 bool didMove = newOutlineBox.location() != m_outlineBox.location(); 213 if (!didMove && !m_repaintOverflowOnResize) 203 if (m_needsFullRepaint) { 204 view->repaintViewRectangle(m_repaintRect); 205 if (newRect != m_repaintRect) 206 view->repaintViewRectangle(newRect); 207 } else 214 208 m_object->repaintAfterLayoutIfNeeded(m_repaintRect, m_outlineBox); 215 else if (didMove || newRect != m_repaintRect) {216 view->repaintViewRectangle(m_repaintRect);217 view->repaintViewRectangle(newRect);218 }219 209 } 220 210 } … … 225 215 m_outlineBox = IntRect(); 226 216 } 217 218 m_needsFullRepaint = false; 227 219 228 220 for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) -
trunk/WebCore/rendering/RenderLayer.h
r21276 r21390 281 281 void updateLayerPosition(); 282 282 void updateLayerPositions(bool doFullRepaint = false, bool checkForRepaint = true); 283 void checkForRepaintOnResize();284 283 285 284 void relativePositionOffset(int& relX, int& relY) { relX += m_relX; relY += m_relY; } … … 340 339 341 340 IntRect repaintRect() const { return m_repaintRect; } 341 void setNeedsFullRepaint(bool f = true) { m_needsFullRepaint = f; } 342 342 343 343 int staticX() const { return m_staticX; } … … 448 448 // blend). 449 449 bool m_inOverflowRelayout : 1; 450 bool m_ repaintOverflowOnResize: 1;450 bool m_needsFullRepaint : 1; 451 451 452 452 bool m_overflowStatusDirty : 1; -
trunk/WebCore/rendering/RenderObject.cpp
r21329 r21390 685 685 m_needsLayout = b; 686 686 if (b) { 687 if (!alreadyNeededLayout && markParents) 688 markContainingBlocksForLayout(); 687 if (!alreadyNeededLayout) { 688 if (markParents) 689 markContainingBlocksForLayout(); 690 if (hasLayer()) 691 layer()->setNeedsFullRepaint(); 692 } 689 693 } else { 690 694 m_posChildNeedsLayout = false;
Note:
See TracChangeset
for help on using the changeset viewer.