Commit dcc725be authored by pmeenan's avatar pmeenan Committed by Commit bot

Fixed the reporting of paint times in window.chrome.loadTimes()

The paint events were updating the document_state of whatever the last
frame in the frame list was. In a case of "how did this ever work" it
must have been sheer luck that the last local frame in the list was the
main frame.

The update just checks to make sure that the local frame is actually
the main frame (no parent) when selecting the frame to update the
document_state of.

Could be that this broke in 38 when the proxy frames were added and
maybe they were only tested on pages with a single frame.

BUG=422913

Review URL: https://codereview.chromium.org/670513003

Cr-Commit-Position: refs/heads/master@{#300703}
parent 51530f07
......@@ -3335,8 +3335,13 @@ void RenderViewImpl::DidFlushPaint() {
WebFrame* main_frame = webview()->mainFrame();
for (WebFrame* frame = main_frame; frame;
frame = frame->traverseNext(false)) {
if (frame->isWebLocalFrame())
// TODO(nasko): This is a hack for the case in which the top-level
// frame is being rendered in another process. It will not
// behave correctly for out of process iframes.
if (frame->isWebLocalFrame()) {
main_frame = frame;
break;
}
}
// If we have a provisional frame we are between the start and commit stages
......
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