{"push_id":1122879304,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"da1178f9bf17c8c224bdb67182d7de53687e7894","before":"329cea5c53fd2d447e515a271fa9677126d8c6f4","commits":[{"sha":"da1178f9bf17c8c224bdb67182d7de53687e7894","author":{"email":"dedb680b423a787f94d96fbc589576d3178e9fd3@apple.com","name":"aestes@apple.com"},"message":"REGRESSION (r188642): All pages are blank when printing a webpage in iOS Safari\nhttps://bugs.webkit.org/show_bug.cgi?id=157924\nrdar://problem/22524550\n\nReviewed by Sam Weinig.\n\nWhen UIPrintInteractionController asks WKWebView to print a webpage, it does so in several phases. First we're\nasked to compute the page count, followed later by a series of messages asking us to draw each page into a\nprovided CGContext.\n\nWhen asked for the page count, we send a message to the Web process instructing it to compute and\nreturn the page count synchronously and then immediately start drawing the page for printing. If the drawing has\nfinished by the time we're asked to print the first page, then we can do so without waiting. But if it hasn't\nthen we block by calling Connection::waitForMessage(), passing std::chromo::milliseconds::max() as the relative\ntimeout.\n\nPrior to r188642, Connection::waitForMessage() called std::condition_variable::wait_for(), which takes a\nrelative timeout value. r188642 replaced this with WTF::Condition::waitUntil(), which takes an absolute timeout\ninstead. To convert from relative to absolute, this line was added to Connection::waitForMessage():\n\n    Condition::Clock::time_point absoluteTimeout = Condition::Clock::now() + timeout;\n\nstd::chrono will convert both operands to a common duration type before performing the addition. When timeout\nequals something very large, like milliseconds::max(), this conversion results in signed integer overflow,\ngiving absoluteTimeout a value less than Clock::now() and making waitForMessage time out immediately.\n\nTo fix this, compute how many milliseconds remain on our clock, and add the smaller of that and the timeout\nvalue to Clock::now() to arrive at an absolute timeout.\n\n* Platform/IPC/Connection.cpp:\n(IPC::Connection::waitForMessage):\n* UIProcess/API/Cocoa/WKWebView.mm:\n(-[WKWebView _printedDocument]): Removed an unnecessary nanoseconds-to-milliseconds conversion.\n\n\ngit-svn-id: http://svn.webkit.org/repository/webkit/trunk@201246 268f45cc-cd09-0410-ab3c-d52691b4dbfc","distinct":true,"url":"https://api.github.com/repos/paul99/webkit-mips/commits/da1178f9bf17c8c224bdb67182d7de53687e7894"}]}
{"actor":{"display_login":"kisg"}}