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

Timeline



May 1, 2018:

11:26 PM Changeset in webkit [231226] by Yusuke Suzuki
  • 3 edits in trunk/Source/WebCore

Unreviewed, fix build in WinCairo
https://bugs.webkit.org/show_bug.cgi?id=185169

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::instantiateStreaming):

  • bindings/js/JSDOMWindowBase.h:
11:16 PM Changeset in webkit [231225] by Dewei Zhu
  • 9 edits
    4 adds in trunk/Websites/perf.webkit.org

Write a script that detects chart changes by using v3 API.
https://bugs.webkit.org/show_bug.cgi?id=184419

Reviewed by Ryosuke Niwa.

Added a script that detects chart changes and schedule confirming analysis task.

  • browser-tests/async-task-tests.js: Added a unit test for 'AsyncTask'.
  • browser-tests/index.html: Added import for 'AsyncTask' for testing.
  • public/shared/statistics.js: Make 'findRangesForChangeDetectionsWithWelchsTTest' defaults to 0.99 one sided possibility.

(Statistics.new.this.findRangesForChangeDetectionsWithWelchsTTest):

  • public/v3/async-task.js:

(AsyncTask.isAvailable): Helper function to determine whether AsyncTask is available or not as 'Worker' is
not available in nodejs.
(AsyncTask):

  • public/v3/models/bug.js: Export as a module.
  • public/v3/models/measurement-set.js:

(MeasurementSet.prototype._invokeSegmentationAlgorithm): Added a check to avoid using AsyncTask when running in NodeJs.
(MeasurementSet):

  • server-tests/resources/common-operations.js: Added a helper function to assert certain exception is thrown.

(async.assertThrows):

  • tools/js/measurement-set-analyzer.js: Added 'MeasurementSetAnalyzer' module for analyzing measurement set.

(MeasurementSetAnalyzer):
(MeasurementSetAnalyzer.prototype.async.analyzeOnce):
(MeasurementSetAnalyzer.measurementSetListForAnalysis):
(MeasurementSetAnalyzer.prototype.async._analyzeMeasurementSet):

  • tools/js/v3-models.js: Added import for 'Bug' object.
  • tools/run-analysis.js: Added this script to detect measurement set changes.

(main):
(async.analysisLoop):

  • unit-tests/measurement-set-analyzer-tests.js: Added unit tests for 'MeasurementSetAnalyzer'.
  • unit-tests/resources/mock-v3-models.js: Reset 'MeasurementSet._set' every time.

Update mock platform to include lastModifiedByMetric information.
(MockModels.inject):

10:51 PM Changeset in webkit [231224] by Yusuke Suzuki
  • 27 edits
    2 adds in trunk

[JSC] Add SameValue DFG node
https://bugs.webkit.org/show_bug.cgi?id=185065

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/object-is.js: Added.

(incognito):
(sameValue):
(test1):
(test2):
(test3):
(test4):
(test5):
(test6):

  • stress/object-is.js: Added.

(shouldBe):
(is1):
(is2):
(is3):
(is4):
(is5):
(is6):
(is7):
(is8):
(is9):
(is10):
(is11):
(is12):
(is13):
(is14):
(is15):

Source/JavaScriptCore:

This patch adds Object.is handling in DFG and FTL. Object.is is converted to SameValue DFG node.
And DFG fixup phase attempts to convert SameValue node to CompareStrictEq with type filter edges
if possible. Since SameValue(Untyped, Untyped) and SameValue(Double, Double) have different semantics
from CompareStrictEq, we do not convert SameValue to CompareStrictEq for them. DFG and FTL have
implementations for these SameValue nodes.

This old MacroAssemblerX86Common::compareDouble was dead code since the derived class, "MacroAssembler"
has a generalized compareDouble, which just uses branchDouble. Since this was not used, this function
was broken. This patch fixes issues and move compareDouble to MacroAssemblerX86Common, and remove a
generalized compareDouble for x86 arch to use this specialized efficient version instead. The fixes are
correctly using set32 to zero-extending the result, and setting the initial value of dest register
correctly for DoubleEqual and DoubleNotEqualOrUnordered cases.

Added microbenchmark shows performance improvement.

object-is 651.0053+-38.8204 241.3467+-15.8753 definitely 2.6974x faster

  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::compareDouble):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::compareDouble): Deleted.

  • assembler/testmasm.cpp:

(JSC::doubleOperands):
(JSC::testCompareDouble):
(JSC::run):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupCompareStrictEqAndSameValue):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileSameValue):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileSameValue):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/ObjectConstructor.cpp:
9:32 PM Changeset in webkit [231223] by Yusuke Suzuki
  • 20 edits in trunk/Source

Use default std::optional if it is provided
https://bugs.webkit.org/show_bug.cgi?id=185159

Reviewed by JF Bastien.

Source/WebCore:

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::iceServersFromConfiguration):
(WebCore::RTCPeerConnection::setConfiguration):

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseSystemColor):

  • css/parser/CSSParser.h:
  • dom/DatasetDOMStringMap.cpp:

(WebCore::DatasetDOMStringMap::item const):
(WebCore::DatasetDOMStringMap::namedItem const):
(WebCore:: const): Deleted.

  • dom/DatasetDOMStringMap.h:
  • dom/Element.cpp:

(WebCore::Element::insertAdjacentHTML):

  • dom/Element.h:
  • inspector/DOMEditor.cpp:
  • platform/network/curl/CurlFormDataStream.cpp:

(WebCore::CurlFormDataStream::getPostData):
(): Deleted.

  • platform/network/curl/CurlFormDataStream.h:
  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMFactory::keysForSessionWithID const):
(WebCore::MockCDMInstance::updateLicense):
(WebCore:: const): Deleted.

  • testing/MockCDMFactory.h:

Source/WebKit:

  • Shared/SandboxExtension.h:

(WebKit::SandboxExtension::Handle::decode):

  • Shared/TouchBarMenuItemData.cpp:

(WebKit::TouchBarMenuItemData::decode):

Source/WTF:

Now C++17 flag is enabled. It means that any standard libraries can use <optional> internally.
If we define std::optional regardless of the existence of the standard library's <optional>,
it causes compile errors. For example, in GCC 7 (specifically GCC 7.3.0) environment,
<optional> is included in <unordered_map>.
We do not define std::optional in WebKit side if <optional> is offered.

And we also remove std::optional<T&> use since this is not accepted in C++17. Use
std::optional<std::reference_wrapper<T>> instead.

  • wtf/Expected.h:

constexpr does not mean const in C++17.

  • wtf/Optional.h:

Do not define std::optional if <optional> is provided.

(WTF::valueOrCompute):

9:05 PM Changeset in webkit [231222] by rniwa@webkit.org
  • 9 edits
    1 add in trunk/Tools

PSON: Make WebKitTestRunner work with process swap on navigation turned on
https://bugs.webkit.org/show_bug.cgi?id=185111

Reviewed by Chris Dumez.

Add the basic support for running layout tests with process-swap-on-navigation turned on.

First, move m_whatToDump, m_dumpPixels, m_waitToDump, and m_dumpFrameLoadCallbacks from WebContent process
to UI process so that calls to waitUntilDone, dumpAsText, etc... persist across process swaps.

In addition, initialize the injected bundle inside a new WebContent process when the first page is created.
This instantiates objects such as TestRunner, GCController, etc... in the new process. The initialization
can't be done in InjectedBundle::beginTesting because some steps in InjectedBundle::initialize require
the current PageGroup and Page objects. We avoid clearing databases and app cache in this case.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didCreatePage): Send "Initialization" message to UI process. This message returns
all the dictionary values usually present in "BeginTest" message from UI process as well as "ResumeTesting"
boolean which is set when this process was created as a result of a process swap on navgation. Invoke
beginTesting with BegingTestingMode::Resume when this boolean is set.
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::beginTesting): Don't clear database, app cache, etc... when initializing an injected
bundle after a process swap on navigation.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:
  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::dump):
(WTR::InjectedBundlePage::frameDidChangeLocation):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::TestRunner):
(WTR::TestRunner::shouldDumpPixels const): Added.
(WTR::TestRunner::setDumpPixels): Added.
(WTR::TestRunner::dumpAsText):
(WTR::TestRunner::whatToDump const): Added.
(WTR::TestRunner::setWhatToDump): Added.
(WTR::TestRunner::waitUntilDone):
(WTR::TestRunner::setWaitUntilDone): Added.
(WTR::TestRunner::shouldWaitUntilDone): Added.
(WTR::TestRunner::notifyDone):
(WTR::TestRunner::forceImmediateCompletion):
(WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Added.
(WTR::TestRunner::shouldDumpFrameLoadCallbacks): Added.
(WTR::TestRunner::setAudioResult):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

(WTR::TestRunner::dumpChildFramesAsText):
(WTR::TestRunner::dumpDOMAsWebArchive):
(WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Moved to cpp.
(WTR::TestRunner::whatToDump const): Moved to cpp.
(WTR::TestRunner::shouldDumpMainFrameScrollPosition const):
(WTR::TestRunner::shouldDumpPixels const): Moved to cpp.
(WTR::TestRunner::shouldDumpFrameLoadCallbacks const): Moved to cpp.
(WTR::TestRunner::waitToDump const): Renamed to shouldWaitUntilDone and moved to cpp.

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::TestInvocation): Initialize m_dumpFrameLoadCallbacks here.
(WTR::TestInvocation::shouldLogFrameLoadDelegates const): Deleted.
(WTR::TestInvocation::createTestSettingsDictionary): Extracted from invoke().
(WTR::TestInvocation::invoke): Sets m_startedTesting to true immediately afte sending "BeginTest" message.
m_startedTesting is later used in didReceiveSynchronousMessageFromInjectedBundle to detect whether a given
"Initialization" message is sent from a regular WebContent process (m_startedTesting is false) or the one
started as a result of a process swap on navigation (m_startedTesting is true).
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Added a bunch of new messgaes to
support initializing the injected bundle in a process swapped after navigation and set/get messages for
the states which must persist across process swaps within a test.

  • WebKitTestRunner/TestInvocation.h:
  • WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
  • Tools/WebKitTestRunner/WhatToDump.h:

(WTR::WhatToDump): Added.

8:33 PM Changeset in webkit [231221] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Add release assertions in CFNetwork's SocketStreamHandleImpl to help debug a threading issue
https://bugs.webkit.org/show_bug.cgi?id=185181

Reviewed by Geoffrey Garen.

Add release assertions in CFNetwork's SocketStreamHandleImpl to help debug a threading issue
on iOS WebKitLegacy (Bug 185073). It appears readStreamCallback() can get called on the UIThread,
which should not be possible if scheduleStreams() was called on the WebThread, as it is supposed
to. The new release assertion in scheduleStreams() should tell us if somebody is calling it from
the UIthread instead of the WebThread on iOS WebKitLegacy.

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::scheduleStreams):
(WebCore::SocketStreamHandleImpl::readStreamCallback):

5:01 PM Changeset in webkit [231220] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Unreviewed, remove an unused variable in RuntimeEnabledFeatures.h

  • page/RuntimeEnabledFeatures.h:
4:38 PM Changeset in webkit [231219] by commit-queue@webkit.org
  • 3 edits
    2 moves in trunk

Auto save the results for Test262
https://bugs.webkit.org/show_bug.cgi?id=184926

Patch by Leo Balter <Leo Balter> on 2018-05-01
Reviewed by Michael Saboff.
Tools:

  • Scripts/test262/Runner.pm:

(processCLI):
(main):
(parseError):
(processResult):
(summarizeResults):

  • Scripts/test262/config.yaml: Renamed from Tools/Scripts/test262/test262-config.yaml.
4:37 PM Changeset in webkit [231218] by webkit@devinrousso.com
  • 13 edits in trunk

Web Inspector: Canvas tab: determine hasVisibleEffect for all actions immediately after recording is added
https://bugs.webkit.org/show_bug.cgi?id=182995

Reviewed by Matt Baker.

Source/WebInspectorUI:

Previously, we'd swizzle the entirety of the WI.Recording in one, which would usually
freeze the UI, especially for larger recordings. This patch uses WI.YieldableTask to split
the work and allow the rest of the UI to still be usable while WI.Recording are processing.
Additionally, since we no longer have to worry about hangs, we can do more work upfront,
such as calculating hasVisibleEffect and the current state of 2D canvases.

These changes require that all uses of WI.Recording call process() before attempting to
use any frames/actions/initialState, as they will have their original payload values
and will have not been swizzled or applied.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/Recording.js:

(WI.Recording):
(WI.Recording.prototype.process):
(WI.Recording.prototype.createContext): Added.
(WI.Recording.prototype.async yieldableTaskWillProcessItem): Added.
(WI.Recording.prototype.async yieldableTaskDidFinish): Added.

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction):
(WI.RecordingAction.prototype.process): Added.
(WI.RecordingAction.prototype.async swizzle): Added.
(WI.RecordingAction.prototype.apply):
(WI.RecordingAction.prototype.toJSON):
(WI.RecordingAction.prototype.set state): Deleted.
(WI.RecordingAction.prototype.swizzle): Deleted.
(WI.RecordingAction.prototype.apply.getContent): Deleted.
(WI.RecordingAction.prototype.async _swizzle): Deleted.

  • UserInterface/Models/RecordingInitialStateAction.js:

(WI.RecordingInitialStateAction):

  • UserInterface/Views/CanvasSidebarPanel.js:

(WI.CanvasSidebarPanel):
(WI.CanvasSidebarPanel.prototype.set action):
(WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange):
(WI.CanvasSidebarPanel.prototype._recordingChanged):

  • UserInterface/Views/CanvasSidebarPanel.css:

(.sidebar > .panel.navigation.canvas > .content > .recording-content > .indeterminate-progress-spinner):

  • UserInterface/Views/RecordingActionTreeElement.js:

(WI.RecordingActionTreeElement):
(WI.RecordingActionTreeElement.prototype.onattach):
(WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged): Deleted.

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView):
(WI.RecordingContentView.prototype.get navigationItems):
(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.initialLayout):
(WI.RecordingContentView.prototype._generateContentCanvas2D): Added.
(WI.RecordingContentView.prototype._generateContentCanvasWebGL): Added.
(WI.RecordingContentView.prototype._updateCanvasPath):
(WI.RecordingContentView.prototype._updateProcessProgress): Added.
(WI.RecordingContentView.prototype._handleRecordingProcessedActionSwizzle): Added.
(WI.RecordingContentView.prototype._handleRecordingProcessedActionApply): Added.
(WI.RecordingContentView.supportsCanvasPathDebugging): Deleted.
(WI.RecordingContentView.prototype.async _generateContentCanvas2D): Deleted.
(WI.RecordingContentView.prototype.async _generateContentCanvasWebGL): Deleted.

  • UserInterface/Views/RecordingContentView.css:

(.content-view:not(.tab).recording > .preview-container):

  • UserInterface/Base/ImageUtilities.js:

(WI.ImageUtilities.supportsCanvasPathDebugging):

LayoutTests:

  • inspector/canvas/resources/recording-utilities.js:
4:26 PM Changeset in webkit [231217] by jmarcell@apple.com
  • 7 edits in branches/safari-605-branch/Source

Versioning.

4:11 PM Changeset in webkit [231216] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.2.8

Tag Safari-605.2.8.

3:19 PM Changeset in webkit [231215] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Production build error in Migrate Header phase when WK_ALTERNATE_FRAMEWORKS_DIR is set to non-empty value
https://bugs.webkit.org/show_bug.cgi?id=185171

Reviewed by Timothy Hatcher.

  • Configurations/BaseTarget.xcconfig:
3:03 PM Changeset in webkit [231214] by jmarcell@apple.com
  • 16 edits
    2 adds in tags/Safari-606.1.15.0.1

Cherry-pick r230978. rdar://problem/39707286

Add a new "color-filter" CSS property as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=184940
Source/WebCore:

rdar://problem/39664904

Reviewed by Jon Lee.

Add a new CSS property called "color-filter" as an experimental feature (off by default).

This property specifies a list of filter functions (as specified in https://drafts.fxtf.org/filter-effects/#supported-filter-functions)
to CSS colors, allowing authors to modify the provided page colors, for example to improve accessibility.
Filters that move pixels (i.e. blur() and drop-shadow()) are invalid in this property.

Colors will be mapped through the filter functions just before paint time, and gradient stop colors will also be mapped.

This patch adds support for parsing color-filter.

Test: css3/color-filters/color-filter-parsing.html

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
  • css/CSSProperties.json:
  • css/parser/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==):
  • css/parser/CSSParserMode.h:
  • css/parser/CSSPropertyParser.cpp: (WebCore::CSSPropertyParser::parseSingleValue):
  • css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::isColorFilterFunction): (WebCore::CSSPropertyParserHelpers::consumeFilterFunction): (WebCore::CSSPropertyParserHelpers::consumeFilter):
  • css/parser/CSSPropertyParserHelpers.h:
  • page/Settings.yaml:
  • rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::changeRequiresRepaint const):
  • rendering/style/RenderStyle.h: (WebCore::RenderStyle::mutableColorFilter): (WebCore::RenderStyle::colorFilter const): (WebCore::RenderStyle::hasColorFilter const): (WebCore::RenderStyle::setColorFilter): (WebCore::RenderStyle::initialColorFilter):
  • rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleRareInheritedData::operator== const): (WebCore::StyleRareInheritedData::hasColorFilters const):
  • rendering/style/StyleRareInheritedData.h:

Source/WebKit:

Reviewed by Jon Lee.

Add the color-filter property as an experimental feature.

  • Shared/WebPreferences.yaml:

LayoutTests:

Reviewed by Jon Lee.

  • css3/color-filters/color-filter-parsing-expected.txt: Added.
  • css3/color-filters/color-filter-parsing.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:03 PM Changeset in webkit [231213] by jmarcell@apple.com
  • 6 edits in tags/Safari-606.1.15.0.1/Source/WebCore

Cherry-pick r230979. rdar://problem/39707298

visitedDependentColor() should take a CSSPropertyID
https://bugs.webkit.org/show_bug.cgi?id=184949

Reviewed by Sam Weinig.

Change RenderStyle::colorIncludingFallback(), RenderStyle::visitedDependentColor()
and RenderElement::selectionColor() to take CSSPropertyID rather than int.

No behavior change.

  • rendering/RenderElement.cpp: (WebCore::RenderElement::selectionColor const):
  • rendering/RenderElement.h:
  • rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computeCollapsedStartBorder const): (WebCore::RenderTableCell::computeCollapsedEndBorder const): (WebCore::RenderTableCell::computeCollapsedBeforeBorder const): (WebCore::RenderTableCell::computeCollapsedAfterBorder const):
  • rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::colorIncludingFallback const): (WebCore::RenderStyle::visitedDependentColor const):
  • rendering/style/RenderStyle.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230979 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2:46 PM Changeset in webkit [231212] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.15.3/Source

Versioning.

2:44 PM Changeset in webkit [231211] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.15.3

New tag.

2:27 PM Changeset in webkit [231210] by gskachkov@gmail.com
  • 2 edits in trunk/Source/WebCore

Fix build error after r231194
https://bugs.webkit.org/show_bug.cgi?id=185169

Reviewed by JF Bastien.

Prevent compile error in iOS Simulator debug build
by tagging function

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::compileStreaming):
(WebCore::JSDOMWindowBase::instantiateStreaming):

1:53 PM Changeset in webkit [231209] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: SIGKILL right after SIGTERM causes orphaned processes with 'xcrun simctl spawn'
https://bugs.webkit.org/show_bug.cgi?id=185164

Reviewed by David Kilzer.

  • Scripts/webkitpy/common/system/executive.py:

(Executive.kill_process): First attempt will always send a SIGTERM, all subsequent attempts will
send a SIGKILL. A SIGKILL with not be sent if the process is not running to avoid orphaning childen.

1:40 PM Changeset in webkit [231208] by Chris Dumez
  • 4 edits in trunk/Tools

REGRESSION (r230919): API test WebKit.AutoLayoutIntegration is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184918
<rdar://problem/39705516>

Reviewed by Wenson Hsieh.

Make sure provisional load has started before calling beginLayoutAtMinimumWidth
on the AutoLayoutWKWebView to restore pre-r230919 behavior. The load now starts
asynchronously because we ask the client if it is OK to do the load and the policy
delegates are asynchronous nowadays.

  • TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:

(-[AutoLayoutWKWebView load:withWidth:expectingContentSize:resettingWidth:]):

  • TestWebKitAPI/cocoa/TestNavigationDelegate.h:
  • TestWebKitAPI/cocoa/TestNavigationDelegate.mm:

(-[TestNavigationDelegate webView:didStartProvisionalNavigation:]):
(-[TestNavigationDelegate waitForDidStartProvisionalNavigation]):
(-[WKWebView _test_waitForDidStartProvisionalNavigation]):

1:37 PM Changeset in webkit [231207] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore/PAL

Protect against changes to CoreMedia function signatures
https://bugs.webkit.org/show_bug.cgi?id=185167

Reviewed by Eric Carlson.

  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:
12:57 PM Changeset in webkit [231206] by Ross Kirsling
  • 4 edits in trunk/Tools

[WinCairo] Align buildbot test stages with AppleWin.
https://bugs.webkit.org/show_bug.cgi?id=185094

Reviewed by Brent Fulgham.

  • BuildSlaveSupport/build.webkit.org-config/factories.py:

(TestFactory.init):
Do run API tests, don't run dashboard tests.

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(RunUnitTests):
Call run-api-tests with Python, not Perl (bugfix for r230998).

  • Scripts/webkitpy/port/win.py:

(WinPort.environment_for_api_tests):
Retrieve necessary Windows environment variables.

12:57 PM Changeset in webkit [231205] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Use correct runloop type in the WebContent process.
https://bugs.webkit.org/show_bug.cgi?id=185140

Reviewed by Brent Fulgham.

Use WK_MACOS_* machinery to determine runloop type for the WebContent process.

  • Configurations/WebContentService.xcconfig:
12:55 PM Changeset in webkit [231204] by fpizlo@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

B3::demoteValues should be able to handle patchpoint terminals
https://bugs.webkit.org/show_bug.cgi?id=185151

Reviewed by Saam Barati.

If we try to demote a patchpoint terminal then prior to this change we would append a Set to
the basic block that the patchpoint terminated. That's wrong because then the terminal is no
longer the last thing in the block.

Air encounters this problem in spilling and solves it by doing a fixup afterwards. We can't
really do that because demotion happens as a prerequisite to other transformations.

One solution might have been to make demoteValues insert a basic block whenever it encounters
this problem. But that would break clients that do CFG analysis before demoteValues and use
the results of the CFG analysis after demoteValues. Taildup does this. Fortunately, taildup
also runs breakCriticalEdges. Probably anyone using demoteValues will use breakCriticalEdges,
so it's not bad to introduce that requirement.

So, this patch solves the problem by ensuring that breakCriticalEdges treats any patchpoint
terminal as if it had multiple successors. This means that a patchpoint terminal's successors
will only have it as their predecessor. Then, demoteValues just prepends the Set to the
successors of the patchpoint terminal.

This was probably asymptomatic. It's hard to write a JS test that triggers this, so I added
a unit test in testb3.

  • b3/B3BreakCriticalEdges.cpp:

(JSC::B3::breakCriticalEdges):

  • b3/B3BreakCriticalEdges.h:
  • b3/B3FixSSA.cpp:

(JSC::B3::demoteValues):
(JSC::B3::fixSSA):

  • b3/B3FixSSA.h:
  • b3/B3Value.cpp:

(JSC::B3::Value::foldIdentity const):
(JSC::B3::Value::performSubstitution):

  • b3/B3Value.h:
  • b3/testb3.cpp:

(JSC::B3::testDemotePatchpointTerminal):
(JSC::B3::run):

12:45 PM Changeset in webkit [231203] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening, correct a typo in the iOS TestExpectation file.

  • platform/ios/TestExpectations:
12:45 PM Changeset in webkit [231202] by Ryan Haddad
  • 9 edits
    12 adds in trunk/LayoutTests

Rebaseline tests after r231165.
https://bugs.webkit.org/show_bug.cgi?id=185166

Unreviewed test gardening.

  • animations/font-variations/font-variation-settings-expected.txt:
  • animations/font-variations/font-variation-settings-order-expected.txt:
  • animations/font-variations/font-variation-settings-order.html:
  • animations/font-variations/font-variation-settings.html:
  • legacy-animation-engine/animations/font-variations/font-variation-settings-expected.txt:
  • legacy-animation-engine/animations/font-variations/font-variation-settings-order-expected.txt:
  • legacy-animation-engine/animations/font-variations/font-variation-settings-order.html:
  • legacy-animation-engine/animations/font-variations/font-variation-settings.html:
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: Added.
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: Added.
  • platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: Added.
  • platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Added.
10:27 AM Changeset in webkit [231201] by eric.carlson@apple.com
  • 9 edits
    2 deletes in trunk

[MediaStream] remove WK1 support
https://bugs.webkit.org/show_bug.cgi?id=185136

Reviewed by Youenn Fablet.

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebUserMediaClient.h: Removed.
  • WebCoreSupport/WebUserMediaClient.mm: Removed.
  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _preferencesChanged:]):
(-[WebView _setUserMediaClient:]): Deleted.
(-[WebView _userMediaClient]): Deleted.

  • WebView/WebViewData.h:
  • WebView/WebViewPrivate.h:

Tools:

  • DumpRenderTree/mac/UIDelegate.mm:

(-[UIDelegate webView:decidePolicyForUserMediaRequestFromOrigin:listener:]): Deleted.

10:23 AM Changeset in webkit [231200] by jmarcell@apple.com
  • 19 edits
    2 adds in branches/safari-605-branch

Apply patch. rdar://problem/39741039

10:09 AM Changeset in webkit [231199] by Chris Dumez
  • 2 edits in trunk/Tools

[WKTR] Move navigation policy for response decision from InjectedBundle to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=185157

Reviewed by Geoffrey Garen.

Move navigation policy for response decision from InjectedBundle to UIProcess. This is a more
common configuration and should therefore be the configuration we test by default.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::decidePolicyForResponse):

9:03 AM Changeset in webkit [231198] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Use CheckedArithmetic for length computation in JSArray::unshiftCountWithAnyIndexingType
https://bugs.webkit.org/show_bug.cgi?id=184772
<rdar://problem/39146327>

Reviewed by Filip Pizlo.

Related to https://bugs.webkit.org/show_bug.cgi?id=183657 (<rdar://problem/38464399), where a check was missing.
This patch now makes sure that the check correctly detects if there is an integer overflow.

  • runtime/JSArray.cpp:

(JSC::JSArray::unshiftCountWithAnyIndexingType):

9:01 AM Changeset in webkit [231197] by rmorisset@apple.com
  • 8 edits
    1 add in trunk

Correctly detect string overflow when using the 'Function' constructor
https://bugs.webkit.org/show_bug.cgi?id=184883
<rdar://problem/36320331>

Reviewed by Filip Pizlo.

JSTests:

I put this regression test in the 'slowMicrobenchmarks' directory because it takes nearly 30s to run, and I am not sure where else to put it.

  • slowMicrobenchmarks/function-constructor-with-huge-strings.js: Added.

(catch):

Source/JavaScriptCore:

The 'Function' constructor creates a string containing the source code of the new function through repeated string concatenation.
Because there was no way for the string concatenation routines in WTF to return an error, they just crashed in that case.

I added new tryAppend methods alongside the old append methods, that return a boolean (true means success, false means an overflow happened).
In this way, it becomes possible for the Function constructor to just throw a proper JS exception when asked to create a string > 4GB.
I made new methods instead of just adapting the existing ones (and reverted such a change on appendQuotedJSONString) so that callers that rely on the old behaviour (a hard CRASH() on overflow) don't silently start failing.

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck):

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendStringifiedValue):

Source/WTF:

I added new tryAppend methods alongside the old append methods in StringBuilder, that return a boolean (true means success, false means an overflow happened).
I made new methods instead of just adapting the existing ones (and reverted such a change on appendQuotedJSONString) so that callers that rely on the old behaviour (a hard CRASH() on overflow) don't silently start failing.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::allocateBufferUpConvert):
(WTF::StringBuilder::tryAllocateBufferUpConvert):
(WTF::StringBuilder::appendUninitialized):
(WTF::StringBuilder::append):
(WTF::StringBuilder::tryAppend):

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::tryAppend):
(WTF::StringBuilder::append):
(WTF::StringBuilder::tryAppendLiteral):

  • wtf/text/StringBuilderJSON.cpp:

(WTF::StringBuilder::appendQuotedJSONString):
(WTF::StringBuilder::tryAppendQuotedJSONString):

8:52 AM WebKitGTK/2.20.x edited by Michael Catanzaro
Propose r229505 (diff)
8:47 AM Changeset in webkit [231196] by rmorisset@apple.com
  • 3 edits
    1 add in trunk

IntlObject.cpp::removeUnicodeLocaleExtension() should not touch locales that end in '-u'
https://bugs.webkit.org/show_bug.cgi?id=185162

Reviewed by Filip Pizlo.

JSTests:

  • stress/incomplete-unicode-locale.js: Added.

(catch):

Source/JavaScriptCore:

  • runtime/IntlObject.cpp:

(JSC::removeUnicodeLocaleExtension):

8:42 AM Changeset in webkit [231195] by commit-queue@webkit.org
  • 17 edits
    1 add in trunk

Add SetCallee as DFG-Operation
https://bugs.webkit.org/show_bug.cgi?id=184582

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-05-01
Reviewed by Filip Pizlo.

JSTests:

Added test that runs into infinite loop without updating the callee and
therefore emitting SetCallee in DFG for recursive tail calls.

  • stress/closure-recursive-tail-call-infinite-loop.js: Added.

(Foo):
(second):
(first):
(return.closure):
(createClosure):

Source/JavaScriptCore:

For recursive tail calls not only the argument count can change but also the
callee. Add SetCallee to DFG that sets the callee slot in the current call frame.
Also update the callee when optimizing a recursive tail call.
Enable recursive tail call optimization also for closures.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::handleCallVariant):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNodeType.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileSetCallee):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileSetCallee):

1:47 AM Changeset in webkit [231194] by gskachkov@gmail.com
  • 34 edits
    1 copy
    11 adds in trunk

WebAssembly: add support for stream APIs - JavaScript API
https://bugs.webkit.org/show_bug.cgi?id=183442

Reviewed by Yusuke Suzuki and JF Bastien.

  • Source/cmake/WebKitFeatures.cmake:

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/resources/incrementer.no_mime_type.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wasm.headers: Added.
  • web-platform-tests/wasm/resources/incrementer.wrong_mime_type.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wrong_mime_type.wasm.headers: Added.
  • web-platform-tests/wasm/wasm_stream_compile_test-expected.txt: Added.
  • web-platform-tests/wasm/wasm_stream_compile_test.html: Added.
  • web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt: Added.
  • web-platform-tests/wasm/wasm_stream_instantiate_test.html: Added.

Source/JavaScriptCore:

Add WebAssembly stream API. Current patch only add functions
WebAssembly.compileStreaming and WebAssembly.instantiateStreaming but,
does not add streaming way of the implementation. So in current version it
only wait for load whole module, than start to parse.

  • CMakeLists.txt:
  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinNames.h:
  • builtins/WebAssemblyPrototype.js: Copied from Source/JavaScriptCore/wasm/js/WebAssemblyPrototype.h.

(compileStreaming):
(instantiateStreaming):

  • jsc.cpp:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:
  • runtime/Options.h:
  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::hasPendingPromise):
(JSC::PromiseDeferredTimer::hasDependancyInPendingPromise):

  • runtime/PromiseDeferredTimer.h:
  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyModuleValidateAsyncInternal):
(JSC::webAssemblyCompileFunc):
(JSC::WebAssemblyPrototype::webAssemblyModuleValidateAsync):
(JSC::webAssemblyModuleInstantinateAsyncInternal):
(JSC::WebAssemblyPrototype::webAssemblyModuleInstantinateAsync):
(JSC::webAssemblyCompileStreamingInternal):
(JSC::webAssemblyInstantiateStreamingInternal):
(JSC::WebAssemblyPrototype::create):
(JSC::WebAssemblyPrototype::finishCreation):

  • wasm/js/WebAssemblyPrototype.h:

Source/WebCore:

Add WebAssembly streaming API to WebCore.

  • Configurations/FeatureDefines.xcconfig:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::tryAllocate):
(WebCore::isResponseCorrect):
(WebCore::handleResponseOnStreamingAction):
(WebCore::JSDOMWindowBase::compileStreaming):
(WebCore::JSDOMWindowBase::instantiateStreaming):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSRemoteDOMWindowBase.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

Source/WebCore/PAL:

Add WEBASSEMBLY_STREAMING_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Add WEBASSEMBLY_STREAMING_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

Add WEBASSEMBLY_STREAMINNG_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

Oleksandrs-MacBook-Pro:WebKit developer$ Tools/Scripts/commit-log-editor --print-log ChangeLog LayoutTests/ChangeLog LayoutTests/imported/w3c/ChangeLog Source/JavaScriptCore/ChangeLog Source/WebCore/ChangeLog Source/WebCore/PAL/ChangeLog Source/WebKit/ChangeLog Source/WebKitLegacy/mac/ChangeLog Tools/ChangeLog
WebAssembly: add support for stream APIs - JavaScript API
https://bugs.webkit.org/show_bug.cgi?id=183442

Reviewed by Yusuke Suzuki and JF Bastien.

  • Source/cmake/WebKitFeatures.cmake:

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/resources/incrementer.no_mime_type.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wasm.headers: Added.
  • web-platform-tests/wasm/resources/incrementer.wrong_mime_type.wasm: Added.
  • web-platform-tests/wasm/resources/incrementer.wrong_mime_type.wasm.headers: Added.
  • web-platform-tests/wasm/wasm_stream_compile_test-expected.txt: Added.
  • web-platform-tests/wasm/wasm_stream_compile_test.html: Added.
  • web-platform-tests/wasm/wasm_stream_instantiate_test-expected.txt: Added.
  • web-platform-tests/wasm/wasm_stream_instantiate_test.html: Added.

Source/JavaScriptCore:

Add WebAssembly stream API. Current patch only add functions
WebAssembly.compileStreaming and WebAssembly.instantiateStreaming but,
does not add streaming way of the implementation. So in current version it
only wait for load whole module, than start to parse.

  • CMakeLists.txt:
  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinNames.h:
  • builtins/WebAssemblyPrototype.js: Copied from Source/JavaScriptCore/wasm/js/WebAssemblyPrototype.h.

(compileStreaming):
(instantiateStreaming):

  • jsc.cpp:
  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:
  • runtime/Options.h:
  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::hasPendingPromise):
(JSC::PromiseDeferredTimer::hasDependancyInPendingPromise):

  • runtime/PromiseDeferredTimer.h:
  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyModuleValidateAsyncInternal):
(JSC::webAssemblyCompileFunc):
(JSC::WebAssemblyPrototype::webAssemblyModuleValidateAsync):
(JSC::webAssemblyModuleInstantinateAsyncInternal):
(JSC::WebAssemblyPrototype::webAssemblyModuleInstantinateAsync):
(JSC::webAssemblyCompileStreamingInternal):
(JSC::webAssemblyInstantiateStreamingInternal):
(JSC::WebAssemblyPrototype::create):
(JSC::WebAssemblyPrototype::finishCreation):

  • wasm/js/WebAssemblyPrototype.h:

Source/WebCore:

Add WebAssembly streaming API to WebCore.

  • Configurations/FeatureDefines.xcconfig:
  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::tryAllocate):
(WebCore::isResponseCorrect):
(WebCore::handleResponseOnStreamingAction):
(WebCore::JSDOMWindowBase::compileStreaming):
(WebCore::JSDOMWindowBase::instantiateStreaming):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSRemoteDOMWindowBase.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:

Source/WebCore/PAL:

Add WEBASSEMBLY_STREAMING_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Add WEBASSEMBLY_STREAMING_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

Add WEBASSEMBLY_STREAMINNG_API feature flag

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • platform/ios-simulator/TestExpectations:
  • platform/win/TestExpectations:

Apr 30, 2018:

11:04 PM Changeset in webkit [231193] by sbarati@apple.com
  • 3 edits
    1 add in trunk

ToString constant folds without preserving checks, causing us to break assumptions that the code would OSR exit
https://bugs.webkit.org/show_bug.cgi?id=185149
<rdar://problem/39455917>

Reviewed by Filip Pizlo.

JSTests:

  • stress/keep-checks-when-converting-to-lazy-js-constant-in-strength-reduction.js: Added.

Source/JavaScriptCore:

The bug was that we were deleting checks that we shouldn't have deleted.
This patch makes a helper inside strength reduction that converts to
a LazyJSConstant while maintaining checks, and switches users of the
node API inside strength reduction to instead call the helper function.

This patch also fixes a potential bug where StringReplace and
StringReplaceRegExp may not preserve all their checks.

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):
(JSC::DFG::StrengthReductionPhase::convertToLazyJSValue):

7:22 PM Changeset in webkit [231192] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

Use correct runloop type in the WebContent process.
https://bugs.webkit.org/show_bug.cgi?id=185140
<rdar://problem/39585037>

Reviewed by Brent Fulgham.

The macOS target version should be used to determine the runloop type.

  • Configurations/WebContentService.xcconfig:
6:31 PM Changeset in webkit [231191] by jiewen_tan@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening

Update test expectations since the crash reported on Bug 177828 is no longer reproducible.

  • platform/mac-wk2/TestExpectations:
6:19 PM Changeset in webkit [231190] by msaboff@apple.com
  • 3 edits
    1 delete in trunk/Source/WebKit

Eliminate WebProcessShim.dylib
https://bugs.webkit.org/show_bug.cgi?id=185147

Reviewed by Ryosuke Niwa.

  • Configurations/WebContentService.xcconfig:
  • Configurations/WebProcessShim.xcconfig: Removed.
  • WebKit.xcodeproj/project.pbxproj:
5:42 PM Changeset in webkit [231189] by msaboff@apple.com
  • 2 edits
    2 deletes in trunk/Source/WebKit

Remove unused mac/CookieStorageShimLibrary
https://bugs.webkit.org/show_bug.cgi?id=185146

Reviewed by Alex Christensen.

  • Shared/mac/CookieStorageShimLibrary.cpp: Removed.
  • Shared/mac/CookieStorageShimLibrary.h: Removed.
  • WebKit.xcodeproj/project.pbxproj:
5:35 PM Changeset in webkit [231188] by Megan Gardner
  • 3 edits
    14 adds in trunk/LayoutTests

Add tests for selection in content editable
https://bugs.webkit.org/show_bug.cgi?id=185144

Reviewed by Wenson Hsieh.

Tests that should cover selection in content editable, both with and without a keyboard present. Also fixing two tests that had errors.

  • fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html: Added.
  • fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html: Added.
  • fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html: Added.
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html: Added.
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html: Added.
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html: Added.
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text-expected.txt: Added.
  • fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html: Added.
  • fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html:
  • fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html:
5:23 PM Changeset in webkit [231187] by mmaxfield@apple.com
  • 3 edits
    1 add in trunk

Improve the performance of FontCascadeDescription's effectiveFamilies
https://bugs.webkit.org/show_bug.cgi?id=184720
PerformanceTests:

Reviewed by Simon Fraser.

This performance test calls SystemFontDatabase::systemFontCascadeList() around 2,000,000 times (before
this patch is applied), which is roughly equivalent to the page we found the performance problem on.
The calling pattern is roughly equivalent in this test.

  • Layout/system-ui.html: Added.

Source/WebCore:

<rdar://problem/38970927>

Reviewed by Simon Fraser.

The page that had the performance problem renders many different Chinese characters in system-ui
with only a small number of individual fonts. It turns out we were calling into the system-ui
machinery for each character in order to opportunistically start loading data URLs (see also:
https://bugs.webkit.org/show_bug.cgi?id=175845). These data URLS will never represent the system
font, so we don't need to invoke the system-ui machinery at all.

This patch makes a 92x performance improvement on the associated performance test. This test is
designed to test Chinese text rendered with system-ui.

Performance test: Layout/system-ui.html

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::opportunisticallyStartFontDataURLLoading):

5:06 PM Changeset in webkit [231186] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.15.2/Source

Versioning.

5:04 PM Changeset in webkit [231185] by fpizlo@apple.com
  • 3 edits
    1 add in trunk

LICM shouldn't hoist nodes if hoisted nodes exited in that code block
https://bugs.webkit.org/show_bug.cgi?id=185126

Reviewed by Saam Barati.

JSTests:

I found this bug by accident when I was writing this test for something else.

This change also speeds up other benchmarks of this case that we already had. They are all called
the licm-dragons tests.

  • microbenchmarks/licm-dragons-two-structures.js: Added.

(foo):

Source/JavaScriptCore:

This change is just restoring functionality that we've already had for a while. It had been
accidentally broken due to an unrelated CodeBlock refactoring.

  • dfg/DFGLICMPhase.cpp:

(JSC::DFG::LICMPhase::attemptHoist):

5:03 PM Changeset in webkit [231184] by jmarcell@apple.com
  • 7 edits in branches/safari-605-branch/Source

Versioning.

4:56 PM Changeset in webkit [231183] by rniwa@webkit.org
  • 5 edits in trunk/Websites/perf.webkit.org

Creating a custom analysis task after fetching all analysis tasks fail
https://bugs.webkit.org/show_bug.cgi?id=184641

Reviewed by Saam Barati.

The bug was caused by AnalysisTask._fetchSubset not fetching the analysis task when all analysis tasks
had previously been fetched (AnlaysisTask._fetchAllPromise is set) even when noCache is set to true.
Fixed it by ignornig _fetchAllPromise when noCache is set to true.

This patch also adds noCache argument to AnalysisTask.fetchById and reverts the inadvertent change in
r226836 to always set noCache to true in this function.

  • public/v3/models/analysis-task.js:

(AnalysisTask.fetchById): Added noCache argument instead of always specifying true, and modernized the code.
(AnalysisTask._fetchSubset): Fixed the bug. See above description.

  • public/v3/models/test-group.js:

(TestGroup.createWithTask): Set noCache to true when calling AnalysisTask.fetchById here.

  • unit-tests/analysis-task-tests.js: Added test cases for AnalysisTask.fetchById, including a test

to make sure it doesn't fetch the specified analysis task when noCache is set to false and all analysis
tasks had previously been fetched for the aforementioned revert of the inadvertent change in r226836.
(sampleAnalysisTasks): Renamed from sampleAnalysisTasks as the result contains multiple analysis tasks.

  • unit-tests/test-groups-tests.js: Added a test case for TestGroup.createWithTask
4:55 PM Changeset in webkit [231182] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.2.7

Tag Safari-605.2.7.

4:51 PM Changeset in webkit [231181] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.15.2

New tag.

4:43 PM Changeset in webkit [231180] by rniwa@webkit.org
  • 10 edits in trunk/Websites/perf.webkit.org

REGRESSION(r230960): Browser tests under TimeSeriesChart fetchMeasurementSets all fail
https://bugs.webkit.org/show_bug.cgi?id=185125

Reviewed by Saam Barati.

The bug was caused by mock-remote-api.js always loading PrivilegedAPI using require, which doesn't work in a browser.
Fixed the bug by explicitly requiring the right kind of PrivilegedAPI in each unit test instead.

  • unit-tests/analysis-task-tests.js:
  • unit-tests/buildbot-syncer-tests.js:
  • unit-tests/commit-log-tests.js:
  • unit-tests/commit-set-range-bisector-tests.js:
  • unit-tests/commit-set-tests.js:
  • unit-tests/measurement-set-tests.js:
  • unit-tests/privileged-api-tests.js:
  • unit-tests/resources/mock-remote-api.js:

(MockRemoteAPI.inject): Take PrivilegedAPI instead of the type string. Also fixed a bug that _token wasn't unset
after each unit test, and superfluous initializations of originalRemoteAPI and originalPrivilegedAPI.

  • unit-tests/test-groups-tests.js:
4:42 PM Changeset in webkit [231179] by jer.noble@apple.com
  • 4 edits in trunk

<img src=mp4> does not display on ios despite Accept: video/* advertisement
https://bugs.webkit.org/show_bug.cgi?id=185029
<rdar://problem/39771989>

Reviewed by Eric Carlson.

Source/WebCore:

Returning "NO" from resourceLoader:shouldWaitForLoadingOfResource: signals that the load failed,
even if the resource request is successfully fulfilled prior to the return. Always return YES in
the case that loading succeeded.

  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:

(-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):

LayoutTests:

  • platform/ios/TestExpectations:
4:16 PM Changeset in webkit [231178] by Alan Bujtas
  • 3 edits
    2 adds in trunk

REGRESSION(r230914) Selecting text on this apple.com page makes it vanish
https://bugs.webkit.org/show_bug.cgi?id=185142
<rdar://problem/39821446>

Reviewed by Simon Fraser.

Source/WebCore:

Set the overflow rect on the inline textbox when needed.

Test: fast/text/simple-line-layout-selection-with-overflow.html

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::initializeInlineTextBox):
(WebCore::SimpleLineLayout::generateLineBoxTree):
(WebCore::SimpleLineLayout::initializeInlineBox): Deleted.

LayoutTests:

  • fast/text/simple-line-layout-selection-with-overflow-expected.html: Added.
  • fast/text/simple-line-layout-selection-with-overflow.html: Added.
3:35 PM Changeset in webkit [231177] by jmarcell@apple.com
  • 49 edits
    38 adds in tags/Safari-606.1.15.0.1

Cherry-pick r231082. rdar://problem/39664967

Implement rendering support for the color-filter CSS property
https://bugs.webkit.org/show_bug.cgi?id=185047
rdar://problem/39664967

Reviewed by Tim Horton.

Source/WebCore:

The color-filter property transforms CSS colors just before painting. To support this,
add to RenderStyle colorByApplyingColorFilter() and visitedDependentColorWithColorFilter().
At most calls sites that transform colors for rendering, replace calls to
visitedDependentColor() with visitedDependentColorWithColorFilter(). The few locations
that don't use visitedDependentColor() (e.g. for shadows) call colorByApplyingColorFilter().

Color transformation is implemented via a new virtual function on FilterOperation;
BasicColorMatrixFilterOperation overrides this to use a new ColorMatrix class to
do color math, and BasicComponentTransferFilterOperation to do the equivalent of component
transfer operations. The math in both cases matches that for SVG filters, with the exception
that color components are stored as floats through multiple filters and then mapped to
normal 0-255 color components at the end.

Tests: css3/color-filters/color-filter-backgrounds-borders.html

css3/color-filters/color-filter-box-shadow.html
css3/color-filters/color-filter-brightness.html
css3/color-filters/color-filter-color-property-list-item.html
css3/color-filters/color-filter-color-property.html
css3/color-filters/color-filter-color-text-decorations.html
css3/color-filters/color-filter-column-rule.html
css3/color-filters/color-filter-contrast.html
css3/color-filters/color-filter-current-color.html
css3/color-filters/color-filter-filter-list.html
css3/color-filters/color-filter-grayscale.html
css3/color-filters/color-filter-hue-rotate.html
css3/color-filters/color-filter-inherits.html
css3/color-filters/color-filter-invert.html
css3/color-filters/color-filter-opacity.html
css3/color-filters/color-filter-outline.html
css3/color-filters/color-filter-saturate.html
css3/color-filters/color-filter-sepia.html
css3/color-filters/color-filter-text-emphasis.html

  • html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
  • page/FrameView.cpp: (WebCore::FrameView::documentBackgroundColor const):
  • platform/graphics/ColorUtilities.cpp: (WebCore::ColorMatrix::ColorMatrix): (WebCore::ColorMatrix::makeIdentity): (WebCore::ColorMatrix::grayscaleMatrix): (WebCore::ColorMatrix::saturationMatrix): (WebCore::ColorMatrix::hueRotateMatrix): (WebCore::ColorMatrix::sepiaMatrix): (WebCore::ColorMatrix::transformColorComponents const):
  • platform/graphics/ColorUtilities.h:
  • platform/graphics/filters/FilterOperation.cpp: (WebCore::BasicColorMatrixFilterOperation::transformColor const): (WebCore::BasicComponentTransferFilterOperation::transformColor const):
  • platform/graphics/filters/FilterOperation.h: (WebCore::FilterOperation::transformColor const):
  • platform/graphics/filters/FilterOperations.cpp: (WebCore::FilterOperations::transformColor const):
  • platform/graphics/filters/FilterOperations.h:
  • rendering/BorderEdge.cpp: (WebCore::BorderEdge::getBorderEdgeInfo):
  • rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::paint): (WebCore::EllipsisBox::paintSelection):
  • rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations):
  • rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paintMarkedTextForeground): (WebCore::InlineTextBox::paintMarkedTextDecoration): (WebCore::InlineTextBox::paintCompositionUnderline const):
  • rendering/RenderBox.cpp: (WebCore::RenderBox::paintRootBoxFillLayers): (WebCore::RenderBox::paintBackground): (WebCore::RenderBox::getBackgroundPaintedExtent const): (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect const): (WebCore::RenderBox::backgroundHasOpaqueTopLayer const):
  • rendering/RenderBoxModelObject.cpp: (WebCore::applyBoxShadowForBackground): (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const): (WebCore::RenderBoxModelObject::paintBoxShadow):
  • rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::paint):
  • rendering/RenderElement.cpp: (WebCore::RenderElement::selectionColor const): (WebCore::RenderElement::selectionBackgroundColor const): (WebCore::RenderElement::paintFocusRing): (WebCore::RenderElement::paintOutline):
  • rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject):
  • rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::paintColumnBorder): (WebCore::RenderFrameSet::paintRowBorder):
  • rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): (WebCore::RenderImage::paintAreaElementFocusRing):
  • rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutline):
  • rendering/RenderLayerBacking.cpp: (WebCore::canDirectlyCompositeBackgroundBackgroundImage): (WebCore::RenderLayerBacking::rendererBackgroundColor const):
  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
  • rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground):
  • rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint):
  • rendering/RenderMenuList.cpp: (RenderMenuList::itemStyle const): (RenderMenuList::getItemBackgroundColor const): (RenderMenuList::menuStyle const):
  • rendering/RenderMultiColumnSet.cpp: (WebCore::RenderMultiColumnSet::paintColumnRules):
  • rendering/RenderSearchField.cpp: (WebCore::RenderSearchField::menuStyle const):
  • rendering/RenderTable.h: (WebCore::RenderTable::bgColor const):
  • rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computeCollapsedStartBorder const): (WebCore::RenderTableCell::computeCollapsedEndBorder const): (WebCore::RenderTableCell::computeCollapsedBeforeBorder const): (WebCore::RenderTableCell::computeCollapsedAfterBorder const): (WebCore::RenderTableCell::paintBackgroundsBehindCell):
  • rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintRowGroupBorder):
  • rendering/RenderTheme.cpp: (WebCore::RenderTheme::paintSliderTicks):
  • rendering/TextDecorationPainter.cpp: (WebCore::decorationColor):
  • rendering/TextPaintStyle.cpp: (WebCore::computeTextPaintStyle):
  • rendering/mathml/MathOperator.cpp: (WebCore::MathOperator::paint):
  • rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::paint):
  • rendering/mathml/RenderMathMLMenclose.cpp: (WebCore::RenderMathMLMenclose::paint):
  • rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::paint):
  • rendering/mathml/RenderMathMLToken.cpp: (WebCore::RenderMathMLToken::paint):
  • rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::visitedDependentColorWithColorFilter const): (WebCore::RenderStyle::colorByApplyingColorFilter const):
  • rendering/style/RenderStyle.h:

Source/WebKitLegacy/mac:

The body background should reflect the filtered color.

  • WebView/WebFrame.mm: (-[WebFrame _bodyBackgroundColor]):
  • WebView/WebView.mm: (-[WebView updateTextTouchBar]): No logic change, just cleanup.

LayoutTests:

Tests for color-filter rendering.

  • css3/color-filters/color-filter-backgrounds-borders-expected.html: Added.
  • css3/color-filters/color-filter-backgrounds-borders.html: Added.
  • css3/color-filters/color-filter-box-shadow-expected.html: Added.
  • css3/color-filters/color-filter-box-shadow.html: Added.
  • css3/color-filters/color-filter-brightness-expected.html: Added.
  • css3/color-filters/color-filter-brightness.html: Added.
  • css3/color-filters/color-filter-color-property-expected.html: Added.
  • css3/color-filters/color-filter-color-property-list-item-expected.html: Added.
  • css3/color-filters/color-filter-color-property-list-item.html: Added.
  • css3/color-filters/color-filter-color-property.html: Added.
  • css3/color-filters/color-filter-color-text-decorations-expected.html: Added.
  • css3/color-filters/color-filter-color-text-decorations.html: Added.
  • css3/color-filters/color-filter-column-rule-expected.html: Added.
  • css3/color-filters/color-filter-column-rule.html: Added.
  • css3/color-filters/color-filter-contrast-expected.html: Added.
  • css3/color-filters/color-filter-contrast.html: Added.
  • css3/color-filters/color-filter-current-color-expected.html: Added.
  • css3/color-filters/color-filter-current-color.html: Added.
  • css3/color-filters/color-filter-filter-list-expected.html: Added.
  • css3/color-filters/color-filter-filter-list.html: Added.
  • css3/color-filters/color-filter-grayscale-expected.html: Added.
  • css3/color-filters/color-filter-grayscale.html: Added.
  • css3/color-filters/color-filter-hue-rotate-expected.html: Added.
  • css3/color-filters/color-filter-hue-rotate.html: Added.
  • css3/color-filters/color-filter-inherits-expected.html: Added.
  • css3/color-filters/color-filter-inherits.html: Added.
  • css3/color-filters/color-filter-invert-expected.html: Added.
  • css3/color-filters/color-filter-invert.html: Added.
  • css3/color-filters/color-filter-opacity-expected.html: Added.
  • css3/color-filters/color-filter-opacity.html: Added.
  • css3/color-filters/color-filter-outline-expected.html: Added.
  • css3/color-filters/color-filter-outline.html: Added.
  • css3/color-filters/color-filter-saturate-expected.html: Added.
  • css3/color-filters/color-filter-saturate.html: Added.
  • css3/color-filters/color-filter-sepia-expected.html: Added.
  • css3/color-filters/color-filter-sepia.html: Added.
  • css3/color-filters/color-filter-text-emphasis-expected.html: Added.
  • css3/color-filters/color-filter-text-emphasis.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231082 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:35 PM Changeset in webkit [231176] by jmarcell@apple.com
  • 3 edits
    3 adds in tags/Safari-606.1.15.0.1

Cherry-pick r231124. rdar://problem/39809478

Implement color-filter for text stroke
https://bugs.webkit.org/show_bug.cgi?id=185098

Reviewed by Alan Bujtas.
Source/WebCore:

Transform the text stroke color through color-filter.

Test: css3/color-filters/color-filter-text-stroke.html

  • rendering/TextPaintStyle.cpp: (WebCore::computeTextPaintStyle):

LayoutTests:

  • css3/color-filters/color-filter-text-stroke-expected.html: Added.
  • css3/color-filters/color-filter-text-stroke.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231124 268f45cc-cd09-0410-ab3c-d52691b4dbfc

3:29 PM Changeset in webkit [231175] by mark.lam@apple.com
  • 23 edits
    1 add in trunk

Apply PtrTags to the MetaAllocator and friends.
https://bugs.webkit.org/show_bug.cgi?id=185110
<rdar://problem/39533895>

Reviewed by Saam Barati.

Source/JavaScriptCore:

  1. LinkBuffer now takes a MacroAssemblerCodePtr instead of a void* pointer.
  2. Apply pointer tagging to the boundary pointers of the FixedExecutableMemoryPool, and add a sanity check to verify that allocated code buffers are within those bounds.
  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::finalizeCodeWithoutDisassemblyImpl):
(JSC::LinkBuffer::copyCompactAndLinkCode):
(JSC::LinkBuffer::linkCode):
(JSC::LinkBuffer::allocate):

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::debugAddress):
(JSC::LinkBuffer::code):

  • assembler/MacroAssemblerCodeRef.h:

(JSC::MacroAssemblerCodeRef::MacroAssemblerCodeRef):

  • bytecode/InlineAccess.cpp:

(JSC::linkCodeInline):
(JSC::InlineAccess::rewireStubAsJump):

  • dfg/DFGJITCode.cpp:

(JSC::DFG::JITCode::findPC):

  • ftl/FTLJITCode.cpp:

(JSC::FTL::JITCode::findPC):

  • jit/ExecutableAllocator.cpp:

(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):
(JSC::FixedVMPoolExecutableAllocator::jitWriteThunkGenerator):
(JSC::ExecutableAllocator::allocate):

  • jit/ExecutableAllocator.h:

(JSC::isJITPC):
(JSC::performJITMemcpy):

  • jit/JIT.cpp:

(JSC::JIT::link):

  • jit/JITMathIC.h:

(JSC::isProfileEmpty):

  • runtime/JSCPtrTag.h:
  • wasm/WasmCallee.cpp:

(JSC::Wasm::Callee::Callee):

  • wasm/WasmFaultSignalHandler.cpp:

(JSC::Wasm::trapHandler):

Source/WTF:

  1. Introduce a MetaAllocatorPtr smart pointer to do pointer tagging.
  2. Use MetaAllocatorPtr in MetaAllocator and MetaAllocatorHandle.
  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::release):
(WTF::MetaAllocatorHandle::MetaAllocatorHandle):
(WTF::MetaAllocatorHandle::shrink):
(WTF::MetaAllocatorHandle::dump const):
(WTF::MetaAllocator::allocate):
(WTF::MetaAllocator::findAndRemoveFreeSpace):
(WTF::MetaAllocator::addFreeSpaceFromReleasedHandle):
(WTF::MetaAllocator::addFreshFreeSpace):
(WTF::MetaAllocator::debugFreeSpaceSize):
(WTF::MetaAllocator::addFreeSpace):
(WTF::MetaAllocator::allocFreeSpaceNode):

  • wtf/MetaAllocator.h:

(WTF::MetaAllocatorTracker::find):
(WTF::MetaAllocator::FreeSpaceNode::FreeSpaceNode):
(WTF::MetaAllocator::FreeSpaceNode::sizeInBytes):
(WTF::MetaAllocator::FreeSpaceNode::key):

  • wtf/MetaAllocatorHandle.h:

(WTF::MetaAllocatorHandle::start const):
(WTF::MetaAllocatorHandle::end const):
(WTF::MetaAllocatorHandle::startAsInteger const):
(WTF::MetaAllocatorHandle::endAsInteger const):
(WTF::MetaAllocatorHandle::sizeInBytes const):
(WTF::MetaAllocatorHandle::containsIntegerAddress const):
(WTF::MetaAllocatorHandle::key):

  • wtf/MetaAllocatorPtr.h: Added.

(WTF::MetaAllocatorPtr::MetaAllocatorPtr):
(WTF::MetaAllocatorPtr:: const):
(WTF::MetaAllocatorPtr::operator bool const):
(WTF::MetaAllocatorPtr::operator! const):
(WTF::MetaAllocatorPtr::operator== const):
(WTF::MetaAllocatorPtr::operator!= const):
(WTF::MetaAllocatorPtr::operator+ const):
(WTF::MetaAllocatorPtr::operator- const):
(WTF::MetaAllocatorPtr::operator+=):
(WTF::MetaAllocatorPtr::operator-=):
(WTF::MetaAllocatorPtr::isEmptyValue const):
(WTF::MetaAllocatorPtr::isDeletedValue const):
(WTF::MetaAllocatorPtr::hash const):
(WTF::MetaAllocatorPtr::emptyValue):
(WTF::MetaAllocatorPtr::deletedValue):
(WTF::MetaAllocatorPtrHash::hash):
(WTF::MetaAllocatorPtrHash::equal):

  • wtf/PtrTag.h:

Tools:

Update the test to match MetaAllocator changes in WTF.

  • TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:

(TestWebKitAPI::TEST_F):
(WTF::tagForPtr):
(WTF::ptrTagName):

3:21 PM Changeset in webkit [231174] by commit-queue@webkit.org
  • 8 edits in trunk

Add WKUIDelegatePrivate equivalent of WKPageContextMenuClient getContextMenuFromProposedMenuAsync
https://bugs.webkit.org/show_bug.cgi?id=180955

Patch by Alex Christensen <achristensen@webkit.org> on 2018-04-30
Reviewed by Andy Estes.

Source/WebKit:

  • UIProcess/API/APIContextMenuClient.h:

(API::ContextMenuClient::menuFromProposedMenu):

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):

  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::showContextMenuWithItems):

Tools:

  • TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.mm:

(-[ContextMenuImgWithVideoDelegate _webView:contextMenu:forElement:]):
(-[ContextMenuImgWithVideoDelegate _webView:getContextMenuFromProposedMenu:forElement:userInfo:completionHandler:]):

3:17 PM Changeset in webkit [231173] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.15.0.1/Source

Versioning.

3:13 PM Changeset in webkit [231172] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Move the MayBePrototype JSCell header bit to InlineTypeFlags
https://bugs.webkit.org/show_bug.cgi?id=185143

Reviewed by Mark Lam.

  • runtime/IndexingType.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::setStructure):
(JSC::JSCell::mayBePrototype const):
(JSC::JSCell::didBecomePrototype):

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::mayBePrototype):
(JSC::TypeInfo::mergeInlineTypeFlags):

2:38 PM Changeset in webkit [231171] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Remove unneeded exception check from String.fromCharCode
https://bugs.webkit.org/show_bug.cgi?id=185083

Reviewed by Mark Lam.

  • runtime/StringConstructor.cpp:

(JSC::stringFromCharCode):

2:17 PM Changeset in webkit [231170] by jfbastien@apple.com
  • 19 edits in trunk

Use some C++17 features
https://bugs.webkit.org/show_bug.cgi?id=185135

Reviewed by Alex Christensen.

.:

As discussed here [0] let's move WebKit to a subset of C++17. We
now require GCC 6 [1] which means that, according to [2] we can
use the following C++17 language features (I removed some
uninteresting ones):

  • New auto rules for direct-list-initialization
  • static_assert with no message
  • typename in a template template parameter
  • Nested namespace definition
  • Attributes for namespaces and enumerators
  • u8 character literals
  • Allow constant evaluation for all non-type template arguments
  • Fold Expressions
  • Unary fold expressions and empty parameter packs
  • has_include in preprocessor conditional
  • Differing begin and end types in range-based for
  • Improving std::pair and std::tuple

Consult the Tony Tables [3] to see before / after examples.

Of course we can use any library feature if we're willing to
import them to WTF (and they don't require language support).

[0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html
[1]: https://trac.webkit.org/changeset/231152/webkit
[2]: https://en.cppreference.com/w/cpp/compiler_support
[3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md

  • Source/cmake/WebKitCompilerFlags.cmake:

Source/WebCore:

As discussed here [0] let's move WebKit to a subset of C++17. We
now require GCC 6 [1] which means that, according to [2] we can
use the following C++17 language features (I removed some
uninteresting ones):

  • New auto rules for direct-list-initialization
  • static_assert with no message
  • typename in a template template parameter
  • Nested namespace definition
  • Attributes for namespaces and enumerators
  • u8 character literals
  • Allow constant evaluation for all non-type template arguments
  • Fold Expressions
  • Unary fold expressions and empty parameter packs
  • has_include in preprocessor conditional
  • Differing begin and end types in range-based for
  • Improving std::pair and std::tuple

Consult the Tony Tables [3] to see before / after examples.

Of course we can use any library feature if we're willing to
import them to WTF (and they don't require language support).

[0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html
[1]: https://trac.webkit.org/changeset/231152/webkit
[2]: https://en.cppreference.com/w/cpp/compiler_support
[3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md

  • DerivedSources.make:
  • platform/URLParser.cpp: work around an odd GCC 6 bug with class static value as a template parameter.

(WebCore::URLParser::percentDecode):
(WebCore::URLParser::domainToASCII):
(WebCore::URLParser::hasForbiddenHostCodePoint):
(WebCore::URLParser::parseHostAndPort):

  • platform/URLParser.h:

Source/WebKit:

As discussed here [0] let's move WebKit to a subset of C++17. We
now require GCC 6 [1] which means that, according to [2] we can
use the following C++17 language features (I removed some
uninteresting ones):

  • New auto rules for direct-list-initialization
  • static_assert with no message
  • typename in a template template parameter
  • Nested namespace definition
  • Attributes for namespaces and enumerators
  • u8 character literals
  • Allow constant evaluation for all non-type template arguments
  • Fold Expressions
  • Unary fold expressions and empty parameter packs
  • has_include in preprocessor conditional
  • Differing begin and end types in range-based for
  • Improving std::pair and std::tuple

Consult the Tony Tables [3] to see before / after examples.

Of course we can use any library feature if we're willing to
import them to WTF (and they don't require language support).

[0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html
[1]: https://trac.webkit.org/changeset/231152/webkit
[2]: https://en.cppreference.com/w/cpp/compiler_support
[3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md

  • Configurations/Base.xcconfig:
  • DerivedSources.make:
  • PlatformMac.cmake:

Source/WebKitLegacy:

  • PlatformMac.cmake:

Source/WebKitLegacy/mac:

  • Configurations/WebKitLegacy.xcconfig:

Source/WTF:

  • wtf/StdLibExtras.h: libstdc++ doesn't say it's C++17 when it

defines std::conjunction. Use the feature test macro instead.

Tools:

  • DumpRenderTree/PlatformMac.cmake:
  • gtk/ycm_extra_conf.py:

(FlagsForFile):

2:06 PM Changeset in webkit [231169] by Dewei Zhu
  • 3 edits in trunk/Websites/perf.webkit.org

MeasurementSet._constructUrl should construct absolute url.
https://bugs.webkit.org/show_bug.cgi?id=185137

Reviewed by Ryosuke Niwa.

MeasurementSet._constructUrl should not construct an url with relative path.

  • public/v3/models/measurement-set.js: Should use '/api/measurement-set...' and '/data/measurement-set-...'

for uncached and cached fetching.

  • unit-tests/measurement-set-tests.js: Updated unit tests.

(const.set MeasurementSet):

1:56 PM Changeset in webkit [231168] by Wenson Hsieh
  • 10 edits in trunk

[Extra zoom mode] Respect the existing shrink-to-fit attribute instead of using min-device-width
https://bugs.webkit.org/show_bug.cgi?id=185132
<rdar://problem/39834562>

Reviewed by Tim Horton.

Source/WebCore:

Removes the min-device-width attribute added in r231095. Instead, we key this behavior off of the
shrink-to-fit attribute introduced for multitasking on iPad, such that shrink-to-fit=no achieves the same
behavior as min-device-width=0 in extra zoom mode. See comments below for more detail.

Adjusted an existing layout test: fast/viewport/extrazoom/viewport-change-min-device-width.html.

  • dom/ViewportArguments.cpp:

(WebCore::setViewportFeature):
(WebCore::operator<<):

  • dom/ViewportArguments.h:

Removes the minDeviceWidth viewport argument.

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setMinDeviceWidthEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::minDeviceWidthEnabled const): Deleted.

Removes the runtime switch for min-device-width.

  • page/ViewportConfiguration.cpp:

(WebCore::platformDeviceWidthOverride):

Hard-code the override device width in extra zoom mode.

(WebCore::ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit const):

In extra zoom mode, override the device width only if shrink-to-fit has not been expliticly disabled, and the
device width is less than the override device width.

(WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints const):
(WebCore::ViewportConfiguration::shouldIgnoreScalingConstraintsRegardlessOfContentSize const):
(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::ViewportConfiguration::updateMinimumLayoutSize):

Do not override the minimum layout size if shrink-to-fit has been explicitly explicitly disabled, or if the
device width is greater than the override device width.

(WebCore::computedMinDeviceWidth): Deleted.
(WebCore::ViewportConfiguration::shouldOverrideDeviceWidthWithMinDeviceWidth const): Deleted.

  • page/ViewportConfiguration.h:

Source/WebKit:

Remove the experimental feature for min-device-width.

  • Shared/WebPreferences.yaml:

LayoutTests:

Modifies an existing layout test to try out different values of shrink-to-fit instead of using the
min-device-width attribute. This test now begins with the default viewport configuration, then explicitly
disables shrink-to-fit by setting the attribute to a few different values (which should all achieve the same
effect), and lastly explicitly re-enables shrink-to-fit by setting the attribute value to several values that
should behave the same as shrink-to-fit=yes.

  • fast/viewport/extrazoom/viewport-change-min-device-width.html:
1:28 PM Changeset in webkit [231167] by youenn@apple.com
  • 2 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

Mandate H264 hardware encoder for Mac in libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=184835

Reviewed by Eric Carlson.

Tested manually through console traces that hardware VCP encoder code path is actually used instead of software VCP encoder code path.

  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:

(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

  • WebKit/0001-Update-RTCVideoEncoderH264.mm-for-WebKit.patch: Added to cover this change and changes made in bug 184668 and 183961.
1:22 PM Changeset in webkit [231166] by keith_miller@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Move StructureIsImmortal to out of line flags.
https://bugs.webkit.org/show_bug.cgi?id=185101

Reviewed by Saam Barati.

This will free up a bit in the inline flags where we can move the
isPrototype bit to. This will, in turn, free a bit for use in
implementing copy on write butterflies.

Also, this patch removes an assertion from Structure::typeInfo()
that inadvertently makes the function invalid to call while
cleaning up the vm.

  • heap/HeapCellType.cpp:

(JSC::DefaultDestroyFunc::operator() const):

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::callDestructor): Deleted.

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::hasStaticPropertyTable):
(JSC::TypeInfo::structureIsImmortal const):

  • runtime/Structure.h:
12:56 PM Changeset in webkit [231165] by commit-queue@webkit.org
  • 5 edits in trunk

Serialize font-variation-settings with double-quotes per spec
https://bugs.webkit.org/show_bug.cgi?id=182542

Patch by Chris Nardi <cnardi@chromium.org> on 2018-04-30
Reviewed by Myles C. Maxfield.

Source/WebCore:

According to the CSSOM spec [1], all strings should be serialized with double-quotes.
The axis name in font-variation-settings was previously serialized with single-quotes;
change this to double-quotes to match the spec and non-WebKit browsers.

[1]: https://drafts.csswg.org/cssom/#common-serializing-idioms

Updated fast/text/variations/getComputedStyle.html to test the change.

  • css/CSSFontVariationValue.cpp:

(WebCore::CSSFontVariationValue::customCSSText const):

LayoutTests:

Updated test to verify double-quotes are used.

  • fast/text/variations/getComputedStyle-expected.txt:
  • fast/text/variations/getComputedStyle.html:
12:41 PM Changeset in webkit [231164] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.15.0.1

New tag.

12:31 PM Changeset in webkit [231163] by Keith Rollin
  • 8 edits in trunk/Source/WebKit

Include breadcrumb for tracking resource loading into CFNetwork
https://bugs.webkit.org/show_bug.cgi?id=184837
rdar://problem/39575411

Reviewed by Brent Fulgham.

When starting the network-based loading of a resource, log the
description provided by NetworkDataTask. On Cocoa, this is implemented
to return the description property in NSURLSessionTask. This
information better allows us to track a resource load through the
WebContent process, the Networking process, and the Cocoa networking
layers.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::description const):

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::description const):

  • NetworkProcess/NetworkLoad.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::startNetworkLoad):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::description const):

12:14 PM Changeset in webkit [231162] by jmarcell@apple.com
  • 2 edits in branches/safari-605-branch/Source/WebKit

Cherry-pick r230903. rdar://problem/39766220

Web Inspector: WebInspectorProxy releases WKWebInspectorProxyObjCAdapter without removing corresponding observer
https://bugs.webkit.org/show_bug.cgi?id=184865
<rdar://problem/37764960>

Reviewed by Brian Burg.

Replace the early return removed in https://bugs.webkit.org/show_bug.cgi?id=177661,
so that WKWebInspectorProxyObjCAdapter and the view controller can be reused
when reopening the Inspector while the WebView is still alive.

  • UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateFrontendPage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230903 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12:13 PM Changeset in webkit [231161] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Fix bad use of RunLoop::main().dispatch() in MessagePort::dispatchMessages()
https://bugs.webkit.org/show_bug.cgi?id=185134

Reviewed by Geoffrey Garen.

Fix bad use of RunLoop::main().dispatch() in MessagePort::dispatchMessages(). This code runs on iOS WebKitLegacy
and it is therefore unsafe to use RunLoop::main() here. We want to use callOnMainThread() instead to run code on
the WebThread.

  • dom/MessagePort.cpp:

(WebCore::MessagePort::dispatchMessages):

11:02 AM Changeset in webkit [231160] by Yusuke Suzuki
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Remove arity fixup check if the number of parameters is 1
https://bugs.webkit.org/show_bug.cgi?id=183984

Reviewed by Mark Lam.

If the number of parameters is one (|this|), we never hit arity fixup check.
We do not need to emit arity fixup check code.

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGJITCompiler.h:
  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):

10:51 AM Changeset in webkit [231159] by Simon Fraser
  • 4 edits
    2 adds in trunk

Make color-filter affect caret-color
https://bugs.webkit.org/show_bug.cgi?id=185129
rdar://problem/39829066

Reviewed by Tim Horton.
Source/WebCore:

Transform the colors used to compare the caret color with the background through
color-filter (since we want contrasting colors after filters are applied), and
transform caret-color itself.

Test: css3/color-filters/color-filter-caret-color.html

  • editing/FrameSelection.cpp:

(WebCore::CaretBase::paintCaret const):

LayoutTests:

  • css3/color-filters/color-filter-caret-color-expected.html: Added.
  • css3/color-filters/color-filter-caret-color.html: Added.
10:30 AM Changeset in webkit [231158] by Yusuke Suzuki
  • 15 edits in trunk

Use WordLock instead of std::mutex for Threading
https://bugs.webkit.org/show_bug.cgi?id=185121

Reviewed by Geoffrey Garen.

Source/bmalloc:

Add constexpr to explicitly describe that bmalloc::Mutex constructor is constexpr.

  • bmalloc/Mutex.h:

Source/JavaScriptCore:

ThreadGroup starts using WordLock.

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::getLock):

Source/WTF:

Before r231151, WordLock depends on ThreadSpecific. It means that our Threading implementation
cannot use this lock since Threading primitives could touch these locks after ThreadSpecific
for that WordLock is destroyed.

Now WordLock is changed not to use ThreadSpecific. So it does not depend on our Threading
mechanism and our Threading can start using WordLock internally.

This patch changes WTF::Thread and WTF::ThreadGroup to use WordLock instead of std::mutex.

And add constexpr to explicitly describe that Lock, Condition, and WordLock constructors are constexpr.

  • wtf/Condition.h:
  • wtf/Lock.h:
  • wtf/ThreadGroup.h:

(WTF::ThreadGroup::getLock):

  • wtf/Threading.cpp:

(WTF::Thread::didExit):
(WTF::Thread::addToThreadGroup):
(WTF::Thread::removeFromThreadGroup):

  • wtf/Threading.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::changePriority):
(WTF::Thread::waitForCompletion):
(WTF::Thread::detach):
(WTF::Thread::signal):
(WTF::Thread::establishPlatformSpecificHandle):

  • wtf/ThreadingWin.cpp:

(WTF::Thread::changePriority):
(WTF::Thread::waitForCompletion):
(WTF::Thread::detach):
(WTF::Thread::establishPlatformSpecificHandle):
(WTF::Thread::initializeTLSKey):
(WTF::Thread::currentDying):
(WTF::Thread::get):
(WTF::Thread::initializeTLS):
(WTF::Thread::destructTLS):
(WTF::threadMapMutex): Deleted.

  • wtf/WordLock.h:

Tools:

  • TestWebKitAPI/Tests/WTF/Signals.cpp:

(TEST):

9:16 AM Changeset in webkit [231157] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Try to unlock PDF documents before printing them
https://bugs.webkit.org/show_bug.cgi?id=185084
<rdar://problem/39356622>

Reviewed by Dan Bernstein.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView pdfHostViewController:documentDidUnlockWithPassword:]):

Stored the password that successfully unlocked the current PDF document.

(-[WKPDFView _wk_printedDocument]):

Used the stored password to unlock the CGPDFDocument we create for printing.

8:16 AM Changeset in webkit [231156] by Michael Catanzaro
  • 4 edits in trunk

[GTK] Webkit should spoof as Safari on a Mac when on Chase.com
https://bugs.webkit.org/show_bug.cgi?id=185103

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Send a fake user agent to chase.com to make it work.

  • platform/UserAgentQuirks.cpp:

(WebCore::urlRequiresMacintoshPlatform):
(WebCore::UserAgentQuirks::stringForQuirk): Also, remove this stale comment.

Tools:

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

Apr 29, 2018:

10:24 PM Changeset in webkit [231155] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Make color-filter affect <attachment>
https://bugs.webkit.org/show_bug.cgi?id=185122
rdar://problem/39818763

Reviewed by Tim Horton.

Convert the colors used to render <attachment> through color-filter, except
for those parts that render over the icon (like the progress bar).

Not easily testable.

  • rendering/RenderThemeMac.mm:

(WebCore::titleTextColorForAttachment):
(WebCore::AttachmentLayout::layOutTitle):
(WebCore::AttachmentLayout::layOutSubtitle):
(WebCore::paintAttachmentIconBackground):
(WebCore::paintAttachmentTitleBackground):
(WebCore::paintAttachmentPlaceholderBorder):

4:41 PM Changeset in webkit [231154] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

B3 should run tail duplication at the bitter end
https://bugs.webkit.org/show_bug.cgi?id=185123

Reviewed by Geoffrey Garen.

Also added an option to disable taildup. This appears to be a 1% AsmBench speed-up. It's neutral
everywhere else.

The goal of this change is to allow us to run path specialization after switch lowering but
before tail duplication.

  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • runtime/Options.h:
10:30 AM Changeset in webkit [231153] by Simon Fraser
  • 13 edits
    3 adds in trunk

Fix color-filter to apply to SVG colors
https://bugs.webkit.org/show_bug.cgi?id=185113
rdar://problem/39665082

Reviewed by Dean Jackson.
Source/WebCore:

Convert SVG colors through color-filter operations for the places in SVG
that use color, namely fill and stroke, gradients, lighting colors and
drop-shadow.

Test: css3/color-filters/svg/color-filter-inline-svg.html

  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::RenderSVGResourceGradient::applyResource):

  • rendering/svg/RenderSVGResourceGradient.h:
  • rendering/svg/RenderSVGResourceLinearGradient.cpp:

(WebCore::RenderSVGResourceLinearGradient::buildGradient const):

  • rendering/svg/RenderSVGResourceLinearGradient.h:
  • rendering/svg/RenderSVGResourceRadialGradient.cpp:

(WebCore::RenderSVGResourceRadialGradient::buildGradient const):

  • rendering/svg/RenderSVGResourceRadialGradient.h:
  • rendering/svg/RenderSVGResourceSolidColor.cpp:

(WebCore::RenderSVGResourceSolidColor::applyResource):

  • svg/SVGFEDiffuseLightingElement.cpp:

(WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
(WebCore::SVGFEDiffuseLightingElement::build):

  • svg/SVGFEDropShadowElement.cpp:

(WebCore::SVGFEDropShadowElement::build):

  • svg/SVGFEFloodElement.cpp:

(WebCore::SVGFEFloodElement::build):

  • svg/SVGFESpecularLightingElement.cpp:

(WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute):
(WebCore::SVGFESpecularLightingElement::build):

LayoutTests:

  • css3/color-filters/svg/color-filter-inline-svg-expected.html: Added.
  • css3/color-filters/svg/color-filter-inline-svg.html: Added.
10:29 AM Changeset in webkit [231152] by Michael Catanzaro
  • 6 edits in trunk

[CMake] Require GCC 6
https://bugs.webkit.org/show_bug.cgi?id=184985

Reviewed by Alex Christensen.

.:

Require it.

  • CMakeLists.txt:

Source/WebCore:

Remove a GCC 5 fallback path. This seems to be the only such fallback path in WebKit.

  • platform/graphics/FourCC.h:

(WebCore::FourCC::FourCC):

Source/WTF:

Stop enforcing GCC version in Compiler.h. It's better to do this in the build system. And I
don't like having the same check in two different places.

  • wtf/Compiler.h:
10:29 AM Changeset in webkit [231151] by ggaren@apple.com
  • 2 edits in trunk/Source/WTF

WordLock doesn't need per-thread data
https://bugs.webkit.org/show_bug.cgi?id=185119

Reviewed by Yusuke Suzuki.

The stack is per-thread data, so we can stack-allocate our ThreadData.

This eliminates malloc() and high-level WTF threading primitives from
WordLock, making WordLock more portable to non-WTF code, including
bmalloc.

(NOTE: This patch makes the bug fixed in r231148 100% reproducible.)

  • wtf/WordLock.cpp:

(WTF::WordLock::lockSlow): Allocate ThreadData on the stack.

9:09 AM Changeset in webkit [231150] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Implement Display::Box functions
https://bugs.webkit.org/show_bug.cgi?id=185116

Reviewed by Antti Koivisto.

  • layout/displaytree/DisplayBox.cpp:

(WebCore::Display::Box::Box):
(WebCore::Display::Box::~Box):
(WebCore::Display::Box::marginBox const):
(WebCore::Display::Box::borderBox const):
(WebCore::Display::Box::paddingBox const):
(WebCore::Display::Box::contentBox const):

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::rect const):
(WebCore::Display::Box::top const):
(WebCore::Display::Box::left const):
(WebCore::Display::Box::bottom const):
(WebCore::Display::Box::right const):
(WebCore::Display::Box::topLeft const):
(WebCore::Display::Box::bottomRight const):
(WebCore::Display::Box::size const):
(WebCore::Display::Box::width const):
(WebCore::Display::Box::height const):
(WebCore::Display::Box::marginTop const):
(WebCore::Display::Box::marginLeft const):
(WebCore::Display::Box::marginBottom const):
(WebCore::Display::Box::marginRight const):
(WebCore::Display::Box::parent const):
(WebCore::Display::Box::nextSibling const):
(WebCore::Display::Box::previousSibling const):
(WebCore::Display::Box::firstChild const):
(WebCore::Display::Box::lastChild const):
(WebCore::Display::Box::setRect):
(WebCore::Display::Box::setTopLeft):
(WebCore::Display::Box::setTop):
(WebCore::Display::Box::setLeft):
(WebCore::Display::Box::setSize):
(WebCore::Display::Box::setWidth):
(WebCore::Display::Box::setHeight):
(WebCore::Display::Box::setMarginTop):
(WebCore::Display::Box::setMarginLeft):
(WebCore::Display::Box::setMarginBottom):
(WebCore::Display::Box::setMarginRight):
(WebCore::Display::Box::setBorderTop):
(WebCore::Display::Box::setBorderLeft):
(WebCore::Display::Box::setBorderBottom):
(WebCore::Display::Box::setBorderRight):
(WebCore::Display::Box::setPaddingTop):
(WebCore::Display::Box::setPaddingLeft):
(WebCore::Display::Box::setPaddingBottom):
(WebCore::Display::Box::setPaddingRight):
(WebCore::Display::Box::setParent):
(WebCore::Display::Box::setNextSibling):
(WebCore::Display::Box::setPreviousSibling):
(WebCore::Display::Box::setFirstChild):
(WebCore::Display::Box::setLastChild):

8:32 AM Changeset in webkit [231149] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Make RestrictedHTTPResponseAccess flag true by default
https://bugs.webkit.org/show_bug.cgi?id=185089

Reviewed by Geoffrey Garen.

  • page/RuntimeEnabledFeatures.h:
8:23 AM Changeset in webkit [231148] by ggaren@apple.com
  • 3 edits in trunk/Source/WTF

Fixed a very unlikely race condition in WTF::WordLock
https://bugs.webkit.org/show_bug.cgi?id=185117

Reviewed by Saam Barati.

The race goes like this:

Thread L is in lockSlowCase() and thread U is in unlockSlowCase();

  • U acquires queueHead->parkingLock.
  • U sets queueHead->shouldPark = false
  • U releases queueHead->parkingLock.
  • L spuriously wakes up from queueHead->parkingLock.wait()
  • L acquires queueHead->parkingLock.
  • L notices that queueHead->shouldPark = false, and acquires the WordLock
  • L finishes all its work and exits, freeing queueHead
  • U notifies queueHead->parkingLock (after free) and crashes or deadlocks

These conditions are currently so unlikely that I don't know how to test
them. I noticed this race because I changed WordLock's allocation pattern
to allow queueHead to be freed more often, and I crashed / deadlocked 100%.

Shout out to <http://en.cppreference.com/w/cpp/thread/condition_variable/notify_one>
for explaining this.

  • benchmarks/ToyLocks.h: Fixed build.
  • wtf/WordLock.cpp:

(WTF::WordLock::unlockSlow): Hold the lock a little longer to avoid
this race.

6:33 AM Changeset in webkit [231147] by commit-queue@webkit.org
  • 9 edits
    7 deletes in trunk

Unreviewed, rolling out r231137.
https://bugs.webkit.org/show_bug.cgi?id=185118

It is breaking Test262 language/expressions/multiplication
/order-of-evaluation.js (Requested by caiolima on #webkit).

Reverted changeset:

"[ESNext][BigInt] Implement support for "*" operation"
https://bugs.webkit.org/show_bug.cgi?id=183721
https://trac.webkit.org/changeset/231137

Apr 28, 2018:

10:26 PM Changeset in webkit [231146] by commit-queue@webkit.org
  • 5 edits in trunk

[Cocoa] Set HTTPOnly flag when converting Cookie to NSHTTPCookie
https://bugs.webkit.org/show_bug.cgi?id=185052

Patch by Sihui Liu <sihui_liu@apple.com> on 2018-04-28
Reviewed by Geoffrey Garen.

Source/WebCore:

Set HTTPOnly for NSHTTPCookie when it's converted from Cookie, so the WebKit APIs could
create NSHTTPCookie with correct HTTPOnly flag. Also, reverted the change made to operator
function because we want the Cookie class to act as a wrapper for NSHTTPCookie and leverage
its equal function.

Modified API test: WebKit.WKHTTPCookieStoreHttpOnly

  • platform/network/cocoa/CookieCocoa.mm:

(WebCore::Cookie::operator NSHTTPCookie * const):
(WebCore::Cookie::operator== const):

  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::NetworkStorageSession::deleteCookie):

Tools:

Modified API test to provide correct test cases for HTTPOnly flag.

  • TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:

(TEST):

6:17 PM Changeset in webkit [231145] by sbarati@apple.com
  • 4 edits
    1 add in trunk

We don't model regexp effects properly
https://bugs.webkit.org/show_bug.cgi?id=185059
<rdar://problem/39736150>

Reviewed by Filip Pizlo.

JSTests:

  • stress/regexp-exec-test-effectful-last-index.js: Added.

(assert):
(foo):
(i.regexLastIndex.toString):
(bar):

Source/JavaScriptCore:

RegExp exec/test can do arbitrary effects when toNumbering the lastIndex if
the regexp is global.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

5:51 PM Changeset in webkit [231144] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Present an action sheet when long-pressing on PDF links
https://bugs.webkit.org/show_bug.cgi?id=185093
<rdar://problem/39356651>

Reviewed by Dan Bernstein.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView dealloc]):

Called -[WKActionSheetAssistant cleanupSheet].

(-[WKPDFView web_setContentProviderData:suggestedFilename:]):

Created a WKActionSheetAssistant with the host view as the assistant view and
ourselves as the delegate.

(-[WKPDFView _URLWithPageIndex:]):

Added. Creates a URL to the current page with a page number fragment appended.

(-[WKPDFView _goToURL:atLocation:]):

Added. Navigates to a URL with a synthetic mouse click at a location in host view
coordinates.

(-[WKPDFView pdfHostViewController:goToURL:]):
(-[WKPDFView pdfHostViewController:goToPageIndex:withViewFrustum:]):

Called -_goToURL:atLocation:. Used -_URLWithPageIndex: to construct an NSURL from
a page index.

(-[WKPDFView _showActionSheetForURL:atLocation:]):

Added. Populates _positionInformation with a URL and location and calls
-[WKActionSheetAssistant showLinkSheet].

(-[WKPDFView pdfHostViewController:didLongPressURL:atLocation:]):
(-[WKPDFView pdfHostViewController:didLongPressPageIndex:atLocation:]):

Called -_showActionSheetForURL:atLocation:. Used -_URLWithPageIndex: to construct
an NSURL from a page index.

(-[WKPDFView positionInformationForActionSheetAssistant:]):

Returned _positionInformation.

(-[WKPDFView actionSheetAssistant:performAction:]):

Populated the pasteboard with plain text and URL representations of
_positionInformation.url.

(-[WKPDFView actionSheetAssistant:openElementAtLocation:]):

Called -_goToURL:atLocation.

(-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):

Created a UIWKSelectionAssistant and called -showShareSheetFor:fromRect:.

(-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):

Returned API::UIClient::shouldIncludeAppLinkActionsForElement().

(-[WKPDFView actionSheetAssistant:decideActionsForElement:defaultActions:]):

Returned API::UIClient::actionsForElement()l

4:54 PM Changeset in webkit [231143] by jmarcell@apple.com
  • 2 edits in tags/Safari-606.1.15.1/Source/WebKit

Cherry-pick r231139. rdar://problem/39808763

[iOS] Allow com.apple.WebKit.Networking to look up com.apple.wifi.manager
https://bugs.webkit.org/show_bug.cgi?id=185114
<rdar://problem/39808763>

Reviewed by Wenson Hsieh.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231139 268f45cc-cd09-0410-ab3c-d52691b4dbfc

4:32 PM Changeset in webkit [231142] by commit-queue@webkit.org
  • 9 edits in trunk

Token misspelled "tocken" in error message string
https://bugs.webkit.org/show_bug.cgi?id=185030

Patch by Rick Waldron <waldron.rick@gmail.com> on 2018-04-28
Reviewed by Saam Barati.

JSTests:

  • ChakraCore/test/Basics/IdsWithEscapes.baseline-jsc: Fix typo "tocken" => "token"
  • stress/destructuring-assignment-syntax.js: Fix typo "tocken" => "token"
  • stress/error-messages-for-in-operator-should-not-crash.js: Fix typo "tocken" => "token"
  • stress/reserved-word-with-escape.js: Fix typo "tocken" => "token"

(testSyntaxError.String.raw.v):
(String.raw.SyntaxError.Cannot.use.the.keyword.string_appeared_here.as.a.name):
(testSyntaxError.String.raw.a):

Source/JavaScriptCore:

  • parser/Parser.cpp: Fix typo "tocken" => "token" in SyntaxError message string

(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::didFinishParsing):
(JSC::Parser<LexerType>::parseSourceElements):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseVariableDeclaration):
(JSC::Parser<LexerType>::parseWhileStatement):
(JSC::Parser<LexerType>::parseVariableDeclarationList):
(JSC::Parser<LexerType>::createBindingPattern):
(JSC::Parser<LexerType>::parseArrowFunctionSingleExpressionBodySourceElements):
(JSC::Parser<LexerType>::parseObjectRestElement):
(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseBreakStatement):
(JSC::Parser<LexerType>::parseContinueStatement):
(JSC::Parser<LexerType>::parseThrowStatement):
(JSC::Parser<LexerType>::parseWithStatement):
(JSC::Parser<LexerType>::parseSwitchStatement):
(JSC::Parser<LexerType>::parseSwitchClauses):
(JSC::Parser<LexerType>::parseTryStatement):
(JSC::Parser<LexerType>::parseBlockStatement):
(JSC::Parser<LexerType>::parseFormalParameters):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseExpressionOrLabelStatement):
(JSC::Parser<LexerType>::parseExpressionStatement):
(JSC::Parser<LexerType>::parseIfStatement):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseConditionalExpression):
(JSC::Parser<LexerType>::parseBinaryExpression):
(JSC::Parser<LexerType>::parseObjectLiteral):
(JSC::Parser<LexerType>::parseStrictObjectLiteral):
(JSC::Parser<LexerType>::parseArrayLiteral):
(JSC::Parser<LexerType>::parseArguments):
(JSC::Parser<LexerType>::parseMemberExpression):
(JSC::operatorString):
(JSC::Parser<LexerType>::parseUnaryExpression):
(JSC::Parser<LexerType>::printUnexpectedTokenText):

Tools:

  • Scripts/test262/test262-expectations.yaml: Fix typo "tocken" => "token"
4:13 PM Changeset in webkit [231141] by Alan Bujtas
  • 15 edits
    1 copy
    1 add in trunk/Source/WebCore

[LFC] Add LayoutTreeBuilder class to generate the layout tree
https://bugs.webkit.org/show_bug.cgi?id=185108

Reviewed by Antti Koivisto.

This is for testing purposes.

  • WebCore.xcodeproj/project.pbxproj:
  • layout/FormattingState.cpp:

(WebCore::Layout::FormattingState::~FormattingState):

  • layout/FormattingState.h:
  • layout/LayoutContext.h:
  • layout/blockformatting/BlockFormattingState.cpp:

(WebCore::Layout::BlockFormattingState::~BlockFormattingState):

  • layout/blockformatting/BlockFormattingState.h:
  • layout/inlineformatting/InlineFormattingState.cpp:

(WebCore::Layout::InlineFormattingState::~InlineFormattingState):

  • layout/inlineformatting/InlineFormattingState.h:
  • layout/layouttree/LayoutBlockContainer.h:
  • layout/layouttree/LayoutBox.h:
  • layout/layouttree/LayoutContainer.h:
  • layout/layouttree/LayoutInlineContainer.h:
  • layout/layouttree/LayoutTreeBuilder.cpp: Added.

(WebCore::Layout::TreeBuilder::createLayoutTree):
(WebCore::Layout::TreeBuilder::createSubTree):
(WebCore::Layout::outputLayoutBox):
(WebCore::Layout::outputLayoutTree):
(WebCore::Layout::TreeBuilder::showLayoutTree):
(WebCore::Layout::printLayoutTreeForLiveDocuments):

  • layout/layouttree/LayoutTreeBuilder.h: Copied from Source/WebCore/layout/layouttree/LayoutBlockContainer.h.
  • page/mac/PageMac.mm:

(WebCore::Page::platformInitialize):

4:12 PM Changeset in webkit [231140] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC] Implement BlockMarginCollapse functions.
https://bugs.webkit.org/show_bug.cgi?id=185036

Reviewed by Antti Koivisto.

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::marginValue):
(WebCore::Layout::BlockMarginCollapse::BlockMarginCollapse):
(WebCore::Layout::BlockMarginCollapse::marginTop const):
(WebCore::Layout::BlockMarginCollapse::marginBottom const):
(WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithSibling const):
(WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithSibling const):
(WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithParent const):
(WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithParent const):
(WebCore::Layout::BlockMarginCollapse::nonCollapsedMarginTop const):
(WebCore::Layout::BlockMarginCollapse::nonCollapsedMarginBottom const):
(WebCore::Layout::BlockMarginCollapse::collapsedMarginTopFromFirstChild const):
(WebCore::Layout::BlockMarginCollapse::collapsedMarginBottomFromLastChild const):
(WebCore::Layout::BlockMarginCollapse::hasAdjoiningMarginTopAndBottom const):

  • layout/blockformatting/BlockMarginCollapse.h:
  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::style const):

4:10 PM Changeset in webkit [231139] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Allow com.apple.WebKit.Networking to look up com.apple.wifi.manager
https://bugs.webkit.org/show_bug.cgi?id=185114
<rdar://problem/39808763>

Reviewed by Wenson Hsieh.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2:18 PM Changeset in webkit [231138] by jmarcell@apple.com
  • 4 edits in tags/Safari-606.1.15.1/Source/WebKit

Cherry-pick r231014. rdar://problem/39662827

Fix entitlements and sandbox configurations in WebKit after r230778
https://bugs.webkit.org/show_bug.cgi?id=184960
<rdar://problem/39662827>

Reviewed by Tim Horton.

Build fixes for watchOS and tvOS after r230778.

  • Configurations/BaseXPCService.xcconfig:
  • Configurations/NetworkService.xcconfig:
  • Configurations/WebContentService.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231014 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:37 AM Changeset in webkit [231137] by Caio Lima
  • 9 edits
    7 adds in trunk

[ESNext][BigInt] Implement support for "*" operation
https://bugs.webkit.org/show_bug.cgi?id=183721

Reviewed by Saam Barati.

JSTests:

  • bigIntTests.yaml:
  • stress/big-int-mul-jit.js: Added.
  • stress/big-int-mul-to-primitive-precedence.js: Added.
  • stress/big-int-mul-to-primitive.js: Added.
  • stress/big-int-mul-type-error.js: Added.
  • stress/big-int-mul-wrapped-value.js: Added.
  • stress/big-int-multiplication.js: Added.
  • stress/big-int-multiply-memory-stress.js: Added.

Source/JavaScriptCore:

Added BigInt support into times binary operator into LLInt and on
JITOperations profiledMul and unprofiledMul. We are also replacing all
uses of int to unsigned when there is no negative values for
variables.

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • jit/JITOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::JSBigInt):
(JSC::JSBigInt::allocationSize):
(JSC::JSBigInt::createWithLength):
(JSC::JSBigInt::toString):
(JSC::JSBigInt::multiply):
(JSC::JSBigInt::digitDiv):
(JSC::JSBigInt::internalMultiplyAdd):
(JSC::JSBigInt::multiplyAccumulate):
(JSC::JSBigInt::equals):
(JSC::JSBigInt::absoluteDivSmall):
(JSC::JSBigInt::calculateMaximumCharactersRequired):
(JSC::JSBigInt::toStringGeneric):
(JSC::JSBigInt::rightTrim):
(JSC::JSBigInt::allocateFor):
(JSC::JSBigInt::parseInt):
(JSC::JSBigInt::digit):
(JSC::JSBigInt::setDigit):

  • runtime/JSBigInt.h:
  • runtime/Operations.h:

(JSC::jsMul):

9:57 AM Changeset in webkit [231136] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.15.1/Source

Versioning.

9:57 AM Changeset in webkit [231135] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Revise sandboxes to allow additional IOKit property access
https://bugs.webkit.org/show_bug.cgi?id=185095
<rdar://problem/39809455>

Reviewed by Eric Carlson.

Update the WebContent and Plugin processes to allow additional IOKit property access.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
9:42 AM Changeset in webkit [231134] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.15.1

New tag.

7:49 AM Changeset in webkit [231133] by commit-queue@webkit.org
  • 9 edits
    7 deletes in trunk

Unreviewed, rolling out r231131.
https://bugs.webkit.org/show_bug.cgi?id=185112

It is breaking Debug build due to unchecked exception
(Requested by caiolima on #webkit).

Reverted changeset:

"[ESNext][BigInt] Implement support for "*" operation"
https://bugs.webkit.org/show_bug.cgi?id=183721
https://trac.webkit.org/changeset/231131

2:49 AM Changeset in webkit [231132] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK] WebProcess from WebKitGtk+ 2.19.92 SIGSEVs in WebCore::TextureMapperGL::~TextureMapperGL
https://bugs.webkit.org/show_bug.cgi?id=184040

Reviewed by Michael Catanzaro.

This can happen when using single shared process model or when the process limit is reached in multiple process
model. In this case, all pages in the same web process with accelerated compositing enabled share the same
compositing thread. Every page sets its GL context as current when rendering a frame, but not when invalidating
the threaded compositor when the page is closed. So, if a hidden tab is closed, the threaded compositor is
invalidated and the GL resources of the current context (the visible page) are destroyed. This is also causing
the blank pages issue when closing a tab related to another one, the current one stops rendering anything because
its GL context has been released. We should make the threaded compositor context current when invalidating it.

  • Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:

(WebKit::ThreadedCompositor::invalidate):

Note: See TracTimeline for information about the timeline view.