Timeline
Feb 25, 2018:
- 6:50 PM Changeset in webkit [228984] by
-
- 5 edits in trunk
[WK2] http/tests/navigation/new-window-redirect-history.html crashes
https://bugs.webkit.org/show_bug.cgi?id=127683
Patch by Fujii Hironori <Fujii Hironori> on 2018-02-25
Reviewed by Dan Bernstein.
Tools:
m_previousTestBackForwardListItem was null for the new window.
m_previousTestBackForwardListItem is initialized only for the main
window in InjectedBundlePage::prepare.
- WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dumpBackForwardList):
Do null-check of m_previousTestBackForwardListItem.
LayoutTests:
- platform/ios-wk2/TestExpectations:
Unmarked http/tests/navigation/new-window-redirect-history.html.
- platform/wk2/TestExpectations: Ditto.
- 6:18 PM Changeset in webkit [228983] by
-
- 7 edits in trunk/Tools
Various crashes in WebKitTestRunner, especially when system is under heavy load
https://bugs.webkit.org/show_bug.cgi?id=183109
Reviewed by Tim Horton.
WebKitTestRunner had many places where it sent messages to WebContent with a timeout,
but it didn't handle the timeout when it did occur. Nearly all of those would result
in logic errors and failing tests, and most would even result in stack corruption,
as the response handler modified local variables.
There is only one timeout scenario that we actually mean to handle in WKTR. That's
when a test freezes after it is done (e.g. an infinite loop in beforeunload) - we don't
want to blame the next test for freezing, so we silently relaunch WebContent.
Everything else is cargo cult code that never worked.
This patch addresses the crashes, and actually makes tests pass a lot more on an
overloaded system.
- WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues): Moved m_doneResetting assignment
to where it's actually needed, for clarity.
(WTR::TestController::reattachPageToWebProcess): This function used to always hit
and ignore message timeout, as m_doneResetting is only updated by navigation callback
when the state is Resetting. This change makes it faster.
(WTR::TestController::platformResetStateToConsistentValues): Style fix.
(WTR::TestController::clearServiceWorkerRegistrations): Timing out here wasn't
handled in a meaningful manner, and would even corrupt the stack.
(WTR::TestController::clearDOMCache): Ditto.
(WTR::TestController::clearDOMCaches): Ditto.
(WTR::TestController::hasDOMCache): Ditto.
(WTR::TestController::domCacheSize): Ditto.
(WTR::TestController::isStatisticsPrevalentResource): Ditto.
(WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): Ditto.
(WTR::TestController::isStatisticsRegisteredAsRedirectingTo): Ditto.
(WTR::TestController::isStatisticsHasHadUserInteraction): Ditto.
(WTR::TestController::isStatisticsGrandfathered): Ditto.
(WTR::TestController::statisticsUpdateCookiePartitioning): Ditto.
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Ditto.
(WTR::TestController::statisticsClearInMemoryAndPersistentStore): Ditto.
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto.
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval): Ditto.
- WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::shortTimeout const): Made shortTimeout shorter (on a hunch).
(WTR::TestInvocation::invoke): Removed a timeout waiting for initial response. There
is never a logical reason for such a timeout, as we always have a new or responsive
WebContent process here.
(WTR::TestInvocation::dumpResults): Removed another timeout that we don't know how to
properly handle.
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Removed assignment to
m_errorMessage, which had no effect in this context.
- WebKitTestRunner/TestInvocation.h: Removed no longer used code.
- WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaResetStateToConsistentValues): Use a named constant for
no timeout.
- WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformConfigureViewForTest): Removed a useless timeout.
Not sure if timing out here would corrupt the stack or not, but there is no reason
to impose arbitrary limits on individual steps of a test.
- WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformConfigureViewForTest): Use a named constant for
no timeout.
- 6:13 PM Changeset in webkit [228982] by
-
- 2 edits in trunk/Source/WebKit
Font smoothing doesn't get disabled if the preference is set before launching WebContent process
https://bugs.webkit.org/show_bug.cgi?id=183108
Reviewed by Tim Horton.
- WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess):
Fix the bug. While at it, also avoid the anti-pattern in setAlwaysUsesComplexTextCodePath.
- 2:36 PM Changeset in webkit [228981] by
-
- 4 edits in trunk/Source/WebCore
[Extra zoom mode] Disable downloadable binary fonts by default
https://bugs.webkit.org/show_bug.cgi?id=183102
<rdar://problem/37860699>
Reviewed by Tim Horton.
Disable downloadable binary fonts by default in extra zoom mode by making the initial value of
downloadableBinaryFontsEnabledconditional. Layout tests are not possible at this time; test to be added once
layout test support is in place.
- page/Settings.yaml:
- page/SettingsBase.cpp:
(WebCore::SettingsBase::defaultDownloadableBinaryFontsEnabled):
- page/SettingsBase.h:
- 1:48 PM Changeset in webkit [228980] by
-
- 2 edits in trunk/Tools
Unreviewed. Change my status to committer.
- Scripts/webkitpy/common/config/contributors.json:
- 11:37 AM Changeset in webkit [228979] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed GTK Debug build fix after r228942.
- UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::iconDatabaseSyncThread):
(WebKit::IconDatabase::syncThreadMainLoop):
(WebKit::IconDatabase::readFromDatabase):
(WebKit::IconDatabase::writeToDatabase):
(WebKit::IconDatabase::cleanupSyncThread):
- 11:02 AM Changeset in webkit [228978] by
-
- 13 edits in trunk
Service workers do not work well inside Web.app
https://bugs.webkit.org/show_bug.cgi?id=183105
<rdar://problem/37864140>
Reviewed by Youenn Fablet.
Source/WebCore:
SessionID::defaultSessionID() was hardcoded in the ServiceWorkerThread constructor
instead of using the sessionID of the SWServer that created the service worker thread.
As a result, when the Service Worker would establish a SWClientConnection to the
server, it would use the wrong sessionID and would end up using a different SWServer
(Since we have a different SWServer instance per sessionID). As a result,
ServiceWorkerRegistration / ServiceWorker objects inside the service worker would not
be kept in sync with the server (since they registered themselves with the wrong
SWServer).
Covered by new API test.
- workers/service/ServiceWorkerContextData.cpp:
(WebCore::ServiceWorkerContextData::isolatedCopy const):
- workers/service/ServiceWorkerContextData.h:
(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):
- workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::ServiceWorkerThread):
- workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::createPageForServiceWorker):
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):
- workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::importRecords):
- workers/service/server/RegistrationStore.h:
(WebCore::RegistrationStore::server):
- workers/service/server/SWServer.cpp:
(WebCore::SWServer::updateWorker):
- workers/service/server/SWServerWorker.cpp:
(WebCore::SWServerWorker::contextData const):
Source/WebKit:
- StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::didReceiveMessage):
We were failing to forward IPC messages to the ChildProcess class here. As a result,
the ChildProcess::RegisterURLSchemeServiceWorkersCanHandle IPC was being ignored
by the StorageProcess.
Tools:
Add API test coverage.
- TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
- 10:38 AM Changeset in webkit [228977] by
-
- 2 edits in trunk/Tools
[build.webkit.org] unit-tests fail if buildbot 0.8.6p1 is not installed locally
https://bugs.webkit.org/show_bug.cgi?id=183103
Reviewed by Alexey Proskuryakov.
- BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Removed extra imports.
- 10:28 AM WebKitGTK/2.20.x edited by
- Review Safari backports through r228970 (diff)
Feb 24, 2018:
- 3:30 PM Changeset in webkit [228976] by
-
- 2 edits in trunk/Tools
Unreviewed, fix the TestWebKitAPI build after r228825.
I removed a
>= iOS 11check in r228825, but forgot that this was also neeed to guard against tvOS and watchOS
builds. This fixes the build by restoring the compile-time guard and also makes it explicit for these platforms.
- TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
- 2:06 PM Changeset in webkit [228975] by
-
- 4 edits in trunk/Source/WebCore
Null-dereference of the second argument
resourceof DocumentLoader::scheduleSubstituteResourceLoad
https://bugs.webkit.org/show_bug.cgi?id=182920
Patch by Fujii Hironori <Fujii Hironori> on 2018-02-24
Reviewed by Darin Adler.
A test case
imported/w3c/web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker.html
always crashes due to a null-dereference if compiled and optimized
by GCC 7.2. The second argumentresourceof
DocumentLoader::scheduleSubstituteResourceLoad can be null if the
resource can't be found in cache. I guess GCC optimizes inline
HashMap::add based on assuming theresourcenever becomes null
because its type is SubstituteResource&.
This changes introduces a new method
DocumentLoader::scheduleCannotShowURLError because it looks tricky
to pass a nullptr to the second argument of
scheduleSubstituteResourceLoad.
No new tests (Covered by existing tests).
- loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::scheduleCannotShowURLError): Added a new method.
- loader/DocumentLoader.h:
- loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadResource):
Call scheduleCannotShowURLError if the resource not found in the appcache.
- 1:47 PM Changeset in webkit [228974] by
-
- 23 edits in trunk/Source
Prepare for ExtendedColor changes (first step)
https://bugs.webkit.org/show_bug.cgi?id=182904
Reviewed by Sam Weinig.
Source/WebCore:
- css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createColorValue): Use HashMap::ensure.
(WebCore::CSSValuePool::createFontFamilyValue): Ditto.
(WebCore::CSSValuePool::createFontFaceValue): Ditto.
- css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::maybeParseValue): Tightened up
the logic a bit.
- html/canvas/CanvasRenderingContext2D.cpp: Removed many unneeded includes.
- inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::recordAction): Updated for Ref instead of
RefPtr and to use move semantics.
(WebCore::buildArrayForAffineTransform): Return Ref instead of RefPtr.
(WebCore::buildArrayForVector): Ditto.
(WebCore::InspectorCanvas::buildInitialState): Ditto. Also use auto more.
(WebCore::InspectorCanvas::buildAction): Ditto.
(WebCore::InspectorCanvas::buildArrayForCanvasGradient): Ditto.
(WebCore::InspectorCanvas::buildArrayForCanvasPattern): Ditto.
(WebCore::InspectorCanvas::buildArrayForImageData): Ditto.
- inspector/InspectorCanvas.h: Updated for the above. Also us "using" instead
of typedef and removed unneeded ErrorString typedef and some includes.
- page/DragController.cpp:
(WebCore::DragController::concludeEditDrag): Use auto and Ref.
- platform/DragData.h: Used pragma once and reorganized includes a bit.
- platform/graphics/ImageFrame.h:
(WebCore::ImageFrame::frameBytes const): Use uint32_t instead of RGBA32 to
prepare for removal of the RGBA32 type coming in a future patch.
- platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::cacheNativeImageAtIndex): Ditto.
(WebCore::ImageSource::canUseAsyncDecoding): Ditto.
- platform/graphics/cocoa/GraphicsContextCocoa.mm: Tweaked #if for Mac-only
code to use PLATFORM(MAC) to be easier to read.
(WebCore::GraphicsContext::focusRingColor): Use sRGBColorSpaceRef instead of
calling CGColorSpaceCreateWithName each time.
- platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added include needed
now that it was removed from some header.
- platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: Use uint32_t
instead of RGBA32 to prepare for removal of the RGBA32 type coming in a future patch.
- platform/image-decoders/ScalableImageDecoder.cpp:
(WebCore::ScalableImageDecoder::frameBytesAtIndex const): Ditto.
- platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
(WebCore::ImageBackingStore::image const): Ditto.
- platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::haveDecodedRow): Ditto.
- platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::setPixel): Ditto.
(WebCore::JPEGImageDecoder::outputScanlines): Ditto.
- platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::rowAvailable): Ditto.
(WebCore::PNGImageDecoder::frameComplete): Ditto.
- platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decodeFrame): Ditto.
(WebCore::WEBPImageDecoder::applyPostProcessing): Ditto.
- platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::color): Added comments.
- rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paintSelection): Use Color::isVisible.
Source/WebKitLegacy/mac:
- Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:]): Use colorFromNSColor.
- 3:31 AM Changeset in webkit [228973] by
-
- 2 edits in trunk/Source/WebKit
Unreviewed WPE breakage fix.
- WebProcess/wpe/WebProcessMainWPE.cpp: Call g_set_prgname() in WebProcess
to prepare the GLib state for subsequent GStreamer initialization.