window.internals.repaintRectsAsText() is hard to use because it doesn't force layout

https://bugs.webkit.org/show_bug.cgi?id=114219

Reviewed by Beth Dakin.

Force layout when setTracksRepaints() is set to true, to flush out any pending
repaints from a layout that hasn't happened yet. Also force layout in
trackedRepaintRectsAsText(), so that any pending layout happpens and thus
repaints.

* page/FrameView.cpp:
(WebCore::FrameView::setTracksRepaints):
(WebCore::FrameView::trackedRepaintRectsAsText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7db91bea
2013-04-08 Simon Fraser <simon.fraser@apple.com>
window.internals.repaintRectsAsText() is hard to use because it doesn't force layout
https://bugs.webkit.org/show_bug.cgi?id=114219
Reviewed by Beth Dakin.
Force layout when setTracksRepaints() is set to true, to flush out any pending
repaints from a layout that hasn't happened yet. Also force layout in
trackedRepaintRectsAsText(), so that any pending layout happpens and thus
repaints.
* page/FrameView.cpp:
(WebCore::FrameView::setTracksRepaints):
(WebCore::FrameView::trackedRepaintRectsAsText):
2013-04-09 Chris Fleizach <cfleizach@apple.com>
AX: Bounding paths should be made available through accessibility
......@@ -3920,6 +3920,12 @@ void FrameView::setTracksRepaints(bool trackRepaints)
if (trackRepaints == m_isTrackingRepaints)
return;
// Force layout to flush out any pending repaints.
if (trackRepaints) {
if (frame() && frame()->document())
frame()->document()->updateLayout();
}
#if USE(ACCELERATED_COMPOSITING)
for (Frame* frame = m_frame->tree()->top(); frame; frame = frame->tree()->traverseNext()) {
if (RenderView* renderView = frame->contentRenderer())
......@@ -3942,6 +3948,9 @@ void FrameView::resetTrackedRepaints()
String FrameView::trackedRepaintRectsAsText() const
{
if (frame() && frame()->document())
frame()->document()->updateLayout();
TextStream ts;
if (!m_trackedRepaintRects.isEmpty()) {
ts << "(repaint rects\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment