⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Jun 14, 2020:

10:56 PM Changeset in webkit [263018] by svillar@igalia.com
  • 7 edits in trunk

Unreviewed, reverting r262124.

Twitter videos go blank after exiting fullscreen

Reverted changeset:

"[css-flex] Allow indefinite size flex items to be definite
wrt resolving percentages inside them"
https://bugs.webkit.org/show_bug.cgi?id=212264
https://trac.webkit.org/changeset/262124

7:07 PM Changeset in webkit [263017] by weinig@apple.com
  • 31 edits
    2 copies
    1 add
    1 delete in trunk

[WPT] html/webappapis/system-state-and-capabilities/the-navigator-object/navigator-pluginarray.html fails due to lack of caching of Plugin objects
https://bugs.webkit.org/show_bug.cgi?id=213185

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator-pluginarray-expected.txt:

Update results now that this test passes.

Source/WebCore:

Tests:

  • Updates results for web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator-pluginarray.html which now passes.
  • Splits up http/tests/plugins/plugin-javascript-access.html, adding http/tests/plugins/plugin-javascript-access-allow-all-plugins.html which tests the internals.setShowAllPlugins(true) case. This was required now that the plugin and mimetype arrays are immutable after creation.

Overhaul web exposed plugin APIs:

  • All DOMPlugin and DOMMimeTypes are now created together (along with the DOMPluginArray and DOMMimeTypeArray) on first access of either navigator.plugins or navigator.mimeTypes.
  • DOMPlugins are created and stored in the DOMPluginArray (fixing the initial lack of caching issue)
  • DOMMimeTypes are created and stored in the DOMMimeTypeArray.
  • DOMPlugins hold a strong reference to their associated DOMMimeType. The DOMMimeType has a weak reference back to the DOMPlugin. This means for a single executation context, we only ever create one DOMPlugin / DOMMimeType for each underlying plugin / mimetype.
  • Update GC so that DOMPlugin and DOMMimeType (in addition to DOMPluginArray and DOMMimeTypeArray which were already doing this) use navigator reachability for their lifetime. This is almost correct, except if we ever implement DOMPluginArray.refresh(false) to match the spec, in which case you could end up with some DOMPlugins and DOMMimeTypes that are marked as reachable when they really are not, but only plugins that were removed. This seems so unlikely to matter that implementing a more strict reachability function seems like the wrong way to go.
  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:

Add NavigatorPlugins.idl

  • loader/SubframeLoader.cpp:

(WebCore::findPluginMIMETypeFromURL):
(WebCore::logPluginRequest):
Simplify and cleanup code making use of the new webVisibleMimeTypes() rather than the
clunky getWebVisibleMimesAndPluginIndices().

  • page/Navigator.cpp:
  • page/Navigator.h:

(WebCore::Navigator::initializePluginAndMIMETypeArrays):
(WebCore::Navigator::plugins):
(WebCore::Navigator::mimeTypes):
Fully initialize Navigator.plugins/mimeTypes on first access of either, following
the specified behavior that they should not change after initial access for a script
execution context. This also ensures we always return the same wrappers for these
objects on multiple accesses, something the spec mandates but we failed to do prior.
In addition, we now correctly sort the plugins by name and mimeTypes by type, also as
specified.

  • page/Navigator.idl:
  • page/NavigatorPlugins.idl: Added.

Split NavigatorPlugins out of Navigator.idl as specified. No functional change but
makes things nicer when we match the spec closer.

  • plugins/DOMMimeType.cpp:

(WebCore::DOMMimeType::DOMMimeType):
(WebCore::DOMMimeType::suffixes const):
(WebCore::DOMMimeType::enabledPlugin const):

  • plugins/DOMMimeType.h:

(WebCore::DOMMimeType::create):
(WebCore::DOMMimeType::navigator):

  • plugins/DOMMimeType.idl:
  • plugins/DOMMimeTypeArray.cpp:

(WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
(WebCore::DOMMimeTypeArray::length const):
(WebCore::DOMMimeTypeArray::item):
(WebCore::DOMMimeTypeArray::namedItem):
(WebCore::DOMMimeTypeArray::supportedPropertyNames):
(WebCore::DOMMimeTypeArray::getPluginData const): Deleted.

  • plugins/DOMMimeTypeArray.h:
  • plugins/DOMPlugin.cpp:

(WebCore::DOMPlugin::DOMPlugin):
(WebCore::DOMPlugin::item):
(WebCore::DOMPlugin::namedItem):
(WebCore::DOMPlugin::supportedPropertyNames):

  • plugins/DOMPlugin.h:
  • plugins/DOMPlugin.idl:
  • plugins/DOMPluginArray.cpp:

(WebCore::DOMPluginArray::DOMPluginArray):
(WebCore::DOMPluginArray::length const):
(WebCore::DOMPluginArray::item):
(WebCore::DOMPluginArray::namedItem):
(WebCore::DOMPluginArray::supportedPropertyNames):
(WebCore::DOMPluginArray::pluginData const): Deleted.

  • plugins/DOMPluginArray.h:

Rather than dynamically accessing plugin information through Page
on each interaction with the DOM plugin objects, we now fully initialize
them on creation, allowing for correct wrapper caching and behavior if
plugins are added / removed (e.g. the arrays should not change).

  • plugins/PluginData.cpp:

(WebCore::PluginData::initPlugins):
(WebCore::PluginData::publiclyVisiblePluginsAndAdditionalWebVisiblePlugins const):
(WebCore::PluginData::webVisibleMimeTypes const):
(WebCore::supportsMimeTypeForPlugins):
(WebCore::PluginData::supportsMimeType const):
(WebCore::PluginData::supportsWebVisibleMimeType const):
(WebCore::PluginData::supportsWebVisibleMimeTypeForURL const):
(WebCore::PluginData::pluginFileForWebVisibleMimeType const):
(WebCore::PluginData::publiclyVisiblePlugins const): Deleted.
(WebCore::PluginData::getWebVisibleMimesAndPluginIndices const): Deleted.
(WebCore::PluginData::getMimesAndPluginIndices const): Deleted.
(WebCore::PluginData::getMimesAndPluginIndiciesForPlugins const): Deleted.
(WebCore::PluginData::getPluginInfoForWebVisibleMimeType const): Deleted.

  • plugins/PluginData.h:

Simplify interface by removing out parameter based getWebVisibleMimesAndPluginIndices
(and helpers) and adding more straigtword alternatives. getWebVisibleMimesAndPluginIndices
was useful for the old DOM plugin model, but now that the arrays are initialized all
together, it no longer provides an optimization. Instead, all callers really just want
a either a list of MimeClassInfos or to know if one is supported under a specific scenario,
so we now just expose that.

Source/WebKit:

  • UIProcess/Plugins/PluginInfoStore.h:

Add missing #include that is now needed due to pruning of unnecessary #includes
in WebCore.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::pluginSupportsExtension):
Update to use new webVisibleMimeTypes() rather than the clunky getWebVisibleMimesAndPluginIndices().

LayoutTests:

  • http/tests/plugins/plugin-javascript-access-allow-all-plugins-expected.txt: Added.
  • http/tests/plugins/plugin-javascript-access-allow-all-plugins.html: Added.
  • http/tests/plugins/plugin-javascript-access-expected.txt:
  • http/tests/plugins/plugin-javascript-access.html:

Split out internals.setShowAllPlugins(true) part of plugin-javascript-access.html to
allow the test to continue working now that navigator.plugins is immutable after
accessing it.

  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator-pluginarray-expected.txt: Removed.

Remove imported/w3c/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator-pluginarray.html
from TestExpectations now that it passes all the time.

5:58 PM Changeset in webkit [263016] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

[IPC hardening] Return type of -[NSCoder validateClassSupportsSecureCoding:] is incorrect
<https://webkit.org/b/213161>
<rdar://problem/64050085>

Reviewed by Darin Adler.

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm:

(validateClass):

  • Fix return type of -[NSCoder validateClassSupportsSecureCoding:]. Throw an NSException in case the method ever returns NO without throwing its own NSException. (Currently this method does throw an NSException instead of returning NO.)
4:45 PM Changeset in webkit [263015] by commit-queue@webkit.org
  • 1 edit
    2 adds in trunk/LayoutTests

Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=212714

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-06-14
Reviewed by Geoffrey Garen.

Added a regression test.

  • fast/rendering/widget-removal-in-render-tree-builder-crash-expected.txt: Added.
  • fast/rendering/widget-removal-in-render-tree-builder-crash.html: Added.
4:06 PM Changeset in webkit [263014] by Wenson Hsieh
  • 2 edits in trunk/Tools

[iOS] Two KeyboardInputTests are failing on recent iOS SDK versions
https://bugs.webkit.org/show_bug.cgi?id=213183
<rdar://problem/64273483>

Reviewed by Tim Horton.

On recent versions of the iOS SDK, iOS simulators that are not shown on-screen are treated as if the hardware
keyboard is not available (that is, +[UIIKeyboard isInHardwareKeyboardMode] returns NO). When running API
tests while Simulator.app is already launched, an iOS simulator is presented on-screen, whereas the simulator
is not visible when running API tests without launching Simulator.app beforehand.

This discrepancy causes two iOS API tests to fail (i.e. CaretSelectionRectAfterRestoringFirstResponder and
RangedSelectionRectAfterRestoringFirstResponder), due to the fact that -[WKWebView becomeFirstResponder] no
longer causes an input session to begin.

Interestingly, these tests already attempt to circumvent this by using webViewWithAutofocusedInput(), which
creates and loads a WKWebView with a single autofocusing input element, with a _WKInputDelegate that
unconditionally allows input sessions to begin. However, this doesn't work as intended in these tests, because
nothing keeps the delegate (a TestInputDelegate) alive past the scope of the call to
webViewWithAutofocusedInput(). Since [WKWebView _inputDelegate] is a weak property, the input delegate
simply disappears after we finish waiting for the load to finish (and the autofocused input element begins its
input session). This causes us to erroneously fall back to default behavior (i.e.
_WKFocusStartsInputSessionPolicyAuto) for subsequent calls to show the keyboard for the focused element, as is
the case when these two API tests call -becomeFirstResponder. The end result is that the keyboard doesn't
appear and text selection views are not created and laid out, but only when API tests are run without having
launched the Simulator app beforehand.

To fix this, refactor webViewWithAutofocusedInput() into webViewAndInputDelegateWithAutofocusedInput(),
which returns both the new WKWebView as well as the TestInputDelegate of the web view. The call site is then
responsible for keeping the input delegate around for as long as it needs.

  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:

(webViewWithAutofocusedInput):

Drive-by fix: fix a potential stack smasher by using an Objective-C block when setting the input delegate's
policy handler, and by using __block for the doneWaiting boolean flag. This is now a problem becuase this
block may be invoked multiple times.

(webViewAndInputDelegateWithAutofocusedInput):

1:27 PM Changeset in webkit [263013] by Fujii Hironori
  • 2 edits in trunk/LayoutTests

[AppleWin] Unreviewed test gardening

  • platform/win/TestExpectations: Marked fast/text/combining-character-sequence-vertical.html with ImageOnlyFailure.
11:57 AM Changeset in webkit [263012] by weinig@apple.com
  • 7 edits
    2 adds in trunk

[WPT] websockets/Close-reason-unpaired-surrogates.any.html fails due to failure to convert unpaired surrogates to replacement character for close reason
https://bugs.webkit.org/show_bug.cgi?id=213182

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/websockets/Close-reason-unpaired-surrogates.any-expected.txt:
  • web-platform-tests/websockets/Close-reason-unpaired-surrogates.any.worker-expected.txt:
  • web-platform-tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any-expected.txt: Added.
  • web-platform-tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any.worker-expected.txt: Added.

Update/add results now that these tests pass.

Source/WebCore:

Now passing the following tests:

imported/w3c/web-platform-tests/websockets/Close-reason-unpaired-surrogates.any.html
imported/w3c/web-platform-tests/websockets/Close-reason-unpaired-surrogates.any.worker.html
imported/w3c/web-platform-tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any.html
imported/w3c/web-platform-tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any.worker.html

  • Modules/websockets/WebSocket.idl:

Match spec (https://html.spec.whatwg.org/multipage/web-sockets.html#the-websocket-interface)
by making the reason argument in close() a USVString rather than a DOMString. This causes
all unpaired surrogates to be replaced with \uFFFD, the replacement character.

LayoutTests:

Unskips the following tests which now pass all the time:

imported/w3c/web-platform-tests/websockets/Close-reason-unpaired-surrogates.any.worker.html
imported/w3c/web-platform-tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any.html
imported/w3c/web-platform-tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any.worker.html

11:55 AM Changeset in webkit [263011] by ysuzuki@apple.com
  • 1 edit
    1 add in trunk/JSTests

Add wasm regresion test for loop
https://bugs.webkit.org/show_bug.cgi?id=213176

Reviewed by Darin Adler.

This patch adds one more regression test for r246134.

  • wasm/regress/regression-with-loop.js: Added.
2:07 AM Changeset in webkit [263010] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[SOUP] Disable HSTS for requests when cookies will be blocked by ITP
https://bugs.webkit.org/show_bug.cgi?id=210739

Reviewed by Michael Catanzaro.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::shouldAllowHSTSProtocolUpgrade const):

12:11 AM Changeset in webkit [263009] by commit-queue@webkit.org
  • 4 edits in trunk

Withdraw FileReaderSync from ServiceWorker
https://bugs.webkit.org/show_bug.cgi?id=213136

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-06-14
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/FileAPI/historical.https-expected.txt:

Source/WebCore:

FileReaderSync is not exposed for ServiceWorker.

We does not support SharedWorker. We don't have to care about it.

  • fileapi/FileReaderSync.idl:

Jun 13, 2020:

11:34 PM Changeset in webkit [263008] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

https://bugs.webkit.org/show_bug.cgi?id=213166
Rename executeIfJavaScriptURL to executeJavaScriptURL

Patch by Rob Buis <rbuis@igalia.com> on 2020-06-13
Reviewed by Darin Adler.

Rename executeIfJavaScriptURL to executeJavaScriptURL in order to make the function
unconditional, i.e. the passed url is expected to have the javascript protocol, this
is asserted first thing in the method. This allows us to remove the return parameter
since the remaining return statements all return true.

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeJavaScriptURL):
(WebCore::ScriptController::executeIfJavaScriptURL): Deleted.

  • bindings/js/ScriptController.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::changeLocation):
(WebCore::FrameLoader::submitForm):

  • loader/SubframeLoader.cpp:

(WebCore::FrameLoader::SubframeLoader::requestFrame):

5:39 PM Changeset in webkit [263007] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[LFC][Floats] Floating positioned box is always a float avoider.
https://bugs.webkit.org/show_bug.cgi?id=213162

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/layoutformattingcontext/inline-float-simple.html

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::isFloatAvoider const): also fix the independent formatting context case.

LayoutTests:

  • fast/layoutformattingcontext/inline-float-simple-expected.html: Added.
  • fast/layoutformattingcontext/inline-float-simple.html: Added.
1:40 PM Changeset in webkit [263006] by Devin Rousso
  • 12 edits
    1 add in trunk

Make errors an own property of AggregateError instead of a prototype accessor
https://bugs.webkit.org/show_bug.cgi?id=212677

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/AggregateError-own-property-errors.js: Added.
  • test262/expectations.yaml:

Mark 9 tests as failing while waiting for test262 to update to match the spec.

Source/JavaScriptCore:

  • runtime/AggregateError.h:

(JSC::AggregateError::destroy): Deleted.
(JSC::AggregateError::subspaceFor): Deleted.
(JSC::AggregateError::errors): Deleted.

  • runtime/AggregateError.cpp:

(JSC::AggregateError::AggregateError):
(JSC::AggregateError::finishCreation): Added.
(JSC::AggregateError::visitChildren): Deleted.

  • runtime/AggregateErrorPrototype.h:
  • runtime/AggregateErrorPrototype.cpp:

(JSC::AggregateErrorPrototype::finishCreation):
(JSC::aggregateErrorPrototypeAccessorErrors): Deleted.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::initializeAggregateErrorConstructor):

  • runtime/VM.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • heap/Heap.cpp:

(JSC::Heap::finalizeUnconditionalFinalizers):
Remove aggregateErrorSpace since AggregateError doesn't add any new member variables.
Ensure that it can share an IsoSubspace with ErrorInstance.

  • runtime/CommonIdentifiers.h:

Add errors.

1:20 PM Changeset in webkit [263005] by sbarati@apple.com
  • 2 edits in trunk/Tools

compare-results should have an option to print a breakdown and to save the breakdown as csv file
https://bugs.webkit.org/show_bug.cgi?id=213140

Reviewed by Filip Pizlo.

In this patch, compare-results has a new --breakdown feature which will
break down the results for -a and -b per subtest. It will also show you
p values with a significance threshold determined using the Bonferroni
correction for testing multiple hypotheses:
https://en.wikipedia.org/wiki/Bonferroni_correction

And there is also now a --csv option to generate a csv file containing
the same per subtest breakdown.

--breakdown will print out results like:


| subtest | ms | ms | b / a | pValue, alpha = 0.003125 |


| Elm-TodoMVC |616.625000 |583.625000 |0.946483 | 0.065002 |
| VueJS-TodoMVC |89.425000 |83.225000 |0.930668 | 0.039102 |
| EmberJS-TodoMVC |695.875000 |664.000000 |0.954194 | 0.088901 |
| Flight-TodoMVC |263.600000 |257.600000 |0.977238 | 0.249259 |
| BackboneJS-TodoMVC |213.025000 |201.550000 |0.946133 | 0.000636 (significant) |
| Preact-TodoMVC |48.800000 |47.550000 |0.974385 | 0.502768 |
| AngularJS-TodoMVC |745.300000 |704.275000 |0.944955 | 0.011779 |
| Inferno-TodoMVC |607.900000 |354.800000 |0.583649 | 0.000000 (significant) |
| Vanilla-ES2015-TodoMVC |214.950000 |200.575000 |0.933124 | 0.005018 |
| Angular2-TypeScript-TodoMVC |191.575000 |187.025000 |0.976250 | 0.542229 |
| VanillaJS-TodoMVC |162.075000 |160.375000 |0.989511 | 0.747186 |
| jQuery-TodoMVC |855.275000 |833.825000 |0.974920 | 0.103439 |
| EmberJS-Debug-TodoMVC |2056.250000 |1952.050000 |0.949325 | 0.000003 (significant) |
| React-TodoMVC |475.225000 |428.950000 |0.902625 | 0.007566 |
| React-Redux-TodoMVC |791.100000 |736.675000 |0.931203 | 0.066091 |
| Vanilla-ES2015-Babel-Webpack-TodoMVC |208.050000 |202.000000 |0.970920 | 0.152470 |


  • Scripts/compare-results:

(readJSONFile):
(speedometer2Breakdown):
(jetStream2Breakdown):
(motionMarkBreakdown):
(plt5Breakdown):
(displayStr):
(dumpBreakdowns):
(writeCSV):
(detectMotionMark1_1):
(detectMotionMark1_1_1):
(motionMarkResults):
(detectBenchmark):
(getOptions):
(main):
(motionMark1_1Results): Deleted.

12:06 PM Changeset in webkit [263004] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix Overrelease in makeFailureSetForAllTextManipulationItems
https://bugs.webkit.org/show_bug.cgi?id=213165
<rdar://problem/61389164>

Patch by Richard Houle <rhoule@apple.com> on 2020-06-13
Reviewed by Wenson Hsieh.

  • UIProcess/API/Cocoa/WKWebView.mm:

(makeFailureSetForAllTextManipulationItems):

11:35 AM Changeset in webkit [263003] by weinig@apple.com
  • 9 edits in trunk

[WPT] dom/nodes/Document-createCDATASection-xhtml.xhtml fails due to missing exception in Document.createCDATASection()
https://bugs.webkit.org/show_bug.cgi?id=213167

Reviewed by Yusuke Suzuki.

LayoutTests/imported/w3c:

  • web-platform-tests/dom/nodes/Document-createCDATASection-xhtml-expected.txt:

Update results to show we are now passing all subtests.

Source/WebCore:

Tested by existing (formerly failing) test: imported/w3c/web-platform-tests/dom/nodes/Document-createCDATASection-xhtml.xhtml

Throw an "InvalidCharacterError" DOMException if the data passed to createCDATASection
contains the string "]]>" as specified by https://dom.spec.whatwg.org/#dom-document-createcdatasection

  • dom/Document.cpp:

(WebCore::Document::createCDATASection):

LayoutTests:

  • dom/xhtml/level3/core/documentnormalizedocument07-expected.txt:
  • dom/xhtml/level3/core/documentnormalizedocument08-expected.txt:
  • dom/xhtml/level3/core/handleerror01-expected.txt:
  • dom/xhtml/level3/core/splitcdatasections01-expected.txt:

Update expected results with new error now being thrown.

11:24 AM Changeset in webkit [263002] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Obsolete comment in FontCustomPlatformDataFreeType.cpp
https://bugs.webkit.org/show_bug.cgi?id=213169

Unreviewed, remove the stale comment.

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-06-13

  • platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:

(WebCore::defaultFontconfigOptions):

11:14 AM Changeset in webkit [263001] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[Mac Catalyst] Color inputs and selects fail to display popovers when clicked
https://bugs.webkit.org/show_bug.cgi?id=213157
<rdar://problem/64004135>

Reviewed by Tim Horton.

In Mac Catalyst, presenting popovers using UIPopoverController causes the first responder to change. This
means that the WKContentView will resign first responder, which in turn causes the currently presented popover
to be dismissed. This means that popovers for color inputs and select elements will be dismissed immediately
after presentation.

To mitigate this, adapt the approach taken in r259840 to WKColorPopover and WKSelectPopover by teaching the
base class (WKRotatingPopover) to temporarily preserve the focused element in light of first responder changes
while presenting a popover on Mac Catalyst.

  • UIProcess/ios/forms/WKFormPopover.mm:

(-[WKRotatingPopover presentPopoverAnimated:]):
(-[WKRotatingPopover dismissPopoverAnimated:]):

9:42 AM Changeset in webkit [263000] by weinig@apple.com
  • 33 edits
    1 add in trunk

Extended Color: Experiment with strongly typed ColorComponents
https://bugs.webkit.org/show_bug.cgi?id=212396

Reviewed by Darin Adler.

Source/WebCore:

Adds simple explicit types for sRGBA, LinearSRGBA, DisplayP3,
LinearDisplayP3, XYZA and HSLA colors. Conversion to/from
ColorComponents<float> is easy but explicit to make conversions
easier to spot.

The goal is to add type clarity (you know when you are dealing
with an sRGB color vs. a DisplayP3 color) and make dealing with
the colors nicer (color.red rather than color[0]). It also allows
us to simplify the naming of functions that convert between color
types as now only the output type needs to be in the function name.

  • Headers.cmake:

Add new header, ColorTypes.h

  • WebCore.xcodeproj/project.pbxproj:

Add new header, ColorTypes.h

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::parseHSLParameters):
Switch from hslToSRGB({ ... }) to toSRGBA(HSLAColor { ... })

  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::detectContentInRange):
Update to use toHSLA() and HSLA<float> making the code a bit more readable.

  • platform/graphics/Color.cpp:

(WebCore::Color::lightened const):
(WebCore::Color::darkened const):
(WebCore::Color::isDark const):
(WebCore::Color::lightness const):
(WebCore::Color::luminance const):
(WebCore::Color::colorSpaceAndComponents const):
(WebCore::Color::toSRGBASimpleColorLossy const):
(WebCore::Color::toSRGBALossy const):
(WebCore::Color::toSRGBAComponentsLossy const): Deleted.

  • platform/graphics/Color.h:

Renames toSRGBAComponentsLossy() to toSRGBALossy() which now returns
a SRGBA<float>.

  • platform/graphics/ColorMatrix.h:

(WebCore::ColorMatrix::transformColorComponents const): Deleted.
Remove transformColorComponents, keeping just transformedColorComponents
to simplify the interface. With late conversion to ColorComponents, the
latter is more straightforward to use in most cases anyway.

  • platform/graphics/ColorUtilities.cpp:

(WebCore::linearToRGBColorComponent):
(WebCore::rgbToLinearColorComponent):
(WebCore::toLinearSRGBA):
(WebCore::toSRGBA):
(WebCore::toLinearDisplayP3):
(WebCore::toDisplayP3):
(WebCore::toXYZ):
(WebCore::lightness):
(WebCore::luminance):
(WebCore::contrastRatio):
(WebCore::toHSLA):
(WebCore::premultiplied):
(WebCore::rgbToLinearComponents): Deleted.
(WebCore::linearToRGBComponents): Deleted.
(WebCore::xyzToLinearSRGB): Deleted.
(WebCore::linearSRGBToXYZ): Deleted.
(WebCore::XYZToLinearP3): Deleted.
(WebCore::linearP3ToXYZ): Deleted.
(WebCore::p3ToSRGB): Deleted.
(WebCore::sRGBToP3): Deleted.
(WebCore::sRGBToHSL): Deleted.
(WebCore::hslToSRGB): Deleted.

  • platform/graphics/ColorUtilities.h:

Rename / rework conversion and utility functions to operate on explicit Color
types. In doing so, simplify the names of the conversion functions so only name
the output type. For instance:

ColorComponents<float> p3ToSRGB(const ColorComponents<float>&);

is now

SRGBA<float> toSRGBA(const DisplayP3<float>&);

as the input type is implicit in the call. A little duplication was needed
for linearToRGBColorComponent/rgbToLinearColorComponent (as it was used for
both sRGB and DisplayP3 linearization), but mostly things stay the same.

  • platform/graphics/ExtendedColor.cpp:

(WebCore::ExtendedColor::toSRGBALossy const):
(WebCore::ExtendedColor::toSRGBAComponentsLossy const): Deleted.

  • platform/graphics/ExtendedColor.h:

Renamed toSRGBAComponentsLossy() to toSRGBALossy() and have it
return a SRGBA<float>.

  • platform/graphics/SimpleColor.h:

(WebCore::SimpleColor::asSRGBA const):
(WebCore::makeSimpleColor):
(WebCore::SimpleColor::asSRGBFloatComponents const): Deleted.
Rename asSRGBFloatComponents() to asSRGBA<T>() and have it
return a SRGBA<float>. Replace makeSimpleColor taking FloatComponents
with one taking a SRGBA<float>, making it much clearer that this
is only valid for sRGB.

  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::drawLighting):
Rework to support seperate types for SRGB<float> and LinearSRGBA<float>.

  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::drawLighting):

  • platform/graphics/filters/FilterOperation.cpp:

(WebCore::BasicColorMatrixFilterOperation::transformColor const):
(WebCore::BasicComponentTransferFilterOperation::transformColor const):
(WebCore::InvertLightnessFilterOperation::transformColor const):
(WebCore::InvertLightnessFilterOperation::inverseTransformColor const):

  • platform/graphics/filters/FilterOperation.h:

(WebCore::FilterOperation::transformColor const):
(WebCore::FilterOperation::inverseTransformColor const):

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::transformColor const):
(WebCore::FilterOperations::inverseTransformColor const):
Use SRGBA<float> rather than ColorComponents<float> to make it clear
that the filters only work on sRGB colors right now.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::disabledTextColor const):

  • rendering/TextPaintStyle.cpp:

(WebCore::textColorIsLegibleAgainstBackgroundColor):

  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::setSourceRGBAFromColor):

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::addColorStopRGBA):
(WebCore::setCornerColorRGBA):
(WebCore::interpolateColorStop):

  • platform/graphics/gtk/ColorGtk.cpp:

(WebCore::Color::operator GdkRGBA const):

  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::drawBorder):
(WebCore::TextureMapperGL::drawNumber):
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawSolidColor):
(WebCore::TextureMapperGL::clearColor):

  • platform/graphics/win/ColorDirect2D.cpp:

(WebCore::Color::operator D2D1_COLOR_F const):
(WebCore::Color::operator D2D1_VECTOR_4F const):

  • platform/graphics/win/GradientDirect2D.cpp:

(WebCore::Gradient::generateGradient):

  • platform/graphics/win/GraphicsContextDirect2D.cpp:

(WebCore::GraphicsContext::colorWithGlobalAlpha const):
Update to call toSRGBALossy() rather than toSRGBAComponentsLossy().

Source/WebKit:

  • UIProcess/API/wpe/WebKitColor.cpp:

(webkitColorFillFromWebCoreColor):

  • UIProcess/gtk/ViewGestureControllerGtk.cpp:

(WebKit::ViewGestureController::beginSwipeGesture):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::getDocumentBackgroundColor):
Update to call toSRGBALossy() rather than toSRGBAComponentsLossy().

Tools:

  • TestWebKitAPI/Tests/WebCore/ColorTests.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/ExtendedColorTests.cpp:

(TestWebKitAPI::TEST):
Update for changed names (e.g. toSRGBAComponentsLossy() -> toSRGBALossy())
and use of explicit types.

9:24 AM Changeset in webkit [262999] by commit-queue@webkit.org
  • 21 edits
    1 delete in trunk/Source

Remove FileError.h
https://bugs.webkit.org/show_bug.cgi?id=213119

Patch by Tetsuharu Ohzeki <Tetsuharu Ohzeki> on 2020-06-13
Reviewed by Chris Dumez.

Source/WebCore:

  • Headers.cmake:
  • Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:

(WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFail):

  • Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::createMessageQueue):

  • Modules/websockets/WebSocketChannel.cpp:

(WebCore::WebSocketChannel::didFail):
(WebCore::WebSocketChannel::abortOutgoingFrameQueue):

  • Modules/websockets/WebSocketChannel.h:
  • WebCore.xcodeproj/project.pbxproj:
  • fileapi/BlobLoader.h:

(WebCore::BlobLoader::didFail):

  • fileapi/FileError.h: Removed.
  • fileapi/FileReader.cpp:

(WebCore::FileReader::didFail):

  • fileapi/FileReader.h:
  • fileapi/FileReaderLoader.cpp:

(WebCore::FileReaderLoader::start):
(WebCore::FileReaderLoader::cancel):
(WebCore::FileReaderLoader::cleanup):
(WebCore::FileReaderLoader::didReceiveResponse):
(WebCore::FileReaderLoader::didReceiveData):
(WebCore::FileReaderLoader::didFail):
(WebCore::FileReaderLoader::failed):
(WebCore::FileReaderLoader::toErrorCode):
(WebCore::FileReaderLoader::httpStatusCodeToErrorCode):
(WebCore::FileReaderLoader::arrayBufferResult const):
(WebCore::FileReaderLoader::stringResult):

  • fileapi/FileReaderLoader.h:

(WebCore::FileReaderLoader::errorCode const):

  • fileapi/FileReaderLoaderClient.h:
  • fileapi/FileReaderSync.cpp:

(WebCore::FileReaderSync::startLoading):

  • fileapi/FileReaderSync.h:
  • fileapi/NetworkSendQueue.cpp:

(WebCore::NetworkSendQueue::processMessages):

  • fileapi/NetworkSendQueue.h:
  • html/ImageBitmap.cpp:

Source/WebKit:

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::createMessageQueue):

1:43 AM Changeset in webkit [262998] by Diego Pino Garcia
  • 2 edits in trunk/Tools

Unreviewed, fix configuration setting of WPE Debug (Tests JS) bot
https://bugs.webkit.org/show_bug.cgi?id=213164

The bot was meant to run as Debug.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
Note: See TracTimeline for information about the timeline view.