Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Initialize progress right away with QtWebKit 5.212 (#15342)
Browse files Browse the repository at this point in the history
Apparently loading progress used to move beyond 0 right after the
frame start loading an URI, even before there is network traffic.

This behavior compatibility prevents the regression on the test
module/webpage/loading.js.
  • Loading branch information
ariya committed Jan 10, 2020
1 parent 4e8248d commit 1141321
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/webpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,9 @@ void WebPage::openUrl(const QString& address, const QVariant& op, const QVariant

request.setUrl(url);
m_mainFrame->load(request, networkOp, body);

// Emulate the behavior of old QtWebKit
m_loadingProgress = 1;
}
}

Expand Down
4 changes: 1 addition & 3 deletions test/module/webpage/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ async_test(function () {

assert_is_true(page.loading);
assert_greater_than(page.loadingProgress, 0);
}, "page loading progress",
{ skip: true } // FIXME
);
}, "page loading progress");

0 comments on commit 1141321

Please sign in to comment.