Timeline



May 2, 2021:

8:11 PM Changeset in webkit [276889] by mmaxfield@apple.com
  • 1 edit
    139 adds in trunk/Websites/browserbench.org

Copy PerformanceTests/MotionMark to WebSites/browserbench.org/MotionMark1.2
https://bugs.webkit.org/show_bug.cgi?id=225287

Reviewed by Maciej Stachowiak and Ryosuke Niwa.

This patch copies the files, and also updates the version in WebSites/browserbench.org
to "1.2." It also updates the "about" page to include a description of the changes.

No existing links have been updated to point to this new version.

  • MotionMark1.2/about.html: Added.
  • MotionMark1.2/developer.html: Added.
  • MotionMark1.2/index.html: Added.
  • MotionMark1.2/resources/debug-runner/d3.min.js: Added.
  • MotionMark1.2/resources/runner/benchmark-runner.js: Added.

(BenchmarkRunnerState.Utilities.createClass):
(this.next.currentSuite):
(this.next.currentTest):
(this.next.isFirstTest):
(this.next.next):
(this.next.frame.onload):
(this.next.prepareCurrentTest):
(this.next):
(BenchmarkRunner.Utilities.createClass):
(_appendFrame):
(_removeFrame):
(_runBenchmarkAndRecordResults):
(step):
(runAllSteps):
(this._runNextIteration):
(runMultipleIterations):
(_finalize):

  • MotionMark1.2/resources/runner/crystal.svg: Added.
  • MotionMark1.2/resources/runner/lines.svg: Added.
  • MotionMark1.2/resources/runner/logo.svg: Added.
  • MotionMark1.2/resources/runner/motionmark.css: Added.

(html,):
(body):
(body.showing-intro,):
(body.showing-test-container):
(body.images-loaded):
(@media screen and (min-width: 667px) body):
(@media screen and (min-width: 667px) body.showing-intro,):
(@media screen and (min-width: 1025px) body.showing-intro,):
(::selection):
(.hidden):
(section):
(section.selected):
(.logo):
(.logo svg):
(.logo div):
(body.images-loaded .logo svg):
(@media screen and (min-width: 667px) .logo svg):
(@media screen and (min-width: 667px) .logo div):
(section .body):
(section .body p):
(@media screen and (min-width: 667px) section .body):
(@media screen and (min-width: 667px) section button):
(button):
(body.images-loaded button):
(button:hover):
(button:active):
(button:disabled):
(@media print button):
(.portrait-orientation-check):
(@media screen and (max-device-width: 1025px) and (orientation: portrait) .portrait-orientation-check):
(@media screen and (max-device-width: 1025px) and (orientation: portrait) .landscape-orientation-check):
(@keyframes background-fade):
(@keyframes background-color):
(12%, 20%):
(22%, 30%):
(32%, 40%):
(42%, 50%):
(52%, 60%):
(62%, 70%):
(72%, 80%):
(82%, 90%):
(92%, 100%):
(@keyframes foreground-color):
(#intro, #about):
(#intro):
(body.images-loaded #intro):
(#about .body):
(#about li):
(#about button):
(#about h3):
(#about #log):
(#about #log li):
(@media screen and (min-width: 667px) #about .body):
(@media screen and (min-width: 667px) #about ol, #about ul):
(#intro a, #about a,):
(.frame-container):
(.frame-container > iframe):
(body.small .frame-container):
(body.medium .frame-container):
(body.large .frame-container):
(#results):
(#results .body):
(#results .score-container):
(#results .table-container):
(#results .table-container > div):
(#results .score):
(#results .confidence):
(#results table):
(#results table td,):
(#results table td.suites-separator):
(#results table tr:nth-child(even)):
(#results #results-header):
(#results #results-score):
(#results #results-data span):
(#results #results-header td,):
(#results #results-score td,):
(#results #results-score td):
(@media screen and (min-width: 667px) #results .score,):
(.detail span):
(body.small .detail .small,):
(#overlay):
(@supports (-webkit-backdrop-filter: blur(10px))):
(#overlay > div):
(#overlay > div div):

  • MotionMark1.2/resources/runner/motionmark.js: Added.

(ResultsDashboard.Utilities.createClass):
(this._processData.push):
(this._processData._processData):
(this._processData.findRegression):
(this._processData.):
(this._processData.calculateScore):
(this._processData.get data):
(this._processData.get results):
(this._processData.get options):
(this._processData.get version):
(this._processData._getResultsProperty):
(this._processData.get score):
(this._processData.get scoreLowerBound):
(this._processData.get scoreUpperBound):
(this._processData):
(ResultsTable.Utilities.createClass):
(this.clear.clear):
(this.clear._addHeader):
(this.clear._addBody):
(this.clear._addEmptyRow):
(this.clear):
(this.clear._addIteration):
(this.clear.showIterations):
(window.benchmarkRunnerClient.initialize):
(window.benchmarkRunnerClient.willStartFirstIteration):
(window.benchmarkRunnerClient.didRunSuites):
(window.benchmarkRunnerClient.didRunTest):
(window.benchmarkRunnerClient.didFinishLastIteration):
(window.sectionsManager.showSection):
(window.sectionsManager.setSectionVersion):
(window.sectionsManager.setSectionScore):
(window.sectionsManager.populateTable):
(window.benchmarkController.initialize):
(window.benchmarkController.determineCanvasSize):
(window.benchmarkController.addOrientationListenerIfNecessary):
(window.benchmarkController._orientationChanged):
(window.benchmarkController.updateStartButtonState):
(window.benchmarkController._startBenchmark):
(window.benchmarkController.startBenchmark):
(window.benchmarkController.showResults):
(window.benchmarkController.handleKeyPress):
(window.benchmarkController.hideDebugInfo):
(window.benchmarkController.data.onclick):
(window.benchmarkController.button.onclick):
(window.benchmarkController.showDebugInfo):
(window.benchmarkController.selectResults):

  • MotionMark1.2/resources/runner/tests.js: Added.

(Headers.details.text):
(Suite):
(suiteFromName):

  • MotionMark1.2/resources/statistics.js: Added.

(Pseudo.resetRandomSeed):
(Pseudo.random):
(Statistics.sampleMean):
(Statistics.unbiasedSampleStandardDeviation):
(Statistics.geometricMean):
(Statistics.cdf):
(Statistics.erf):
(Statistics.largestDeviationPercentage):
(Experiment.Utilities.createClass):
(this.reset.reset):
(this.reset.get sampleCount):
(this.reset.sample):
(this.reset.mean):
(this.reset.standardDeviation):
(this.reset.cdf):
(this.reset.percentage):
(this.reset.concern):
(this.reset.score):
(this.reset):
(Regression.Utilities.createClass):
(valueAt):
(setBest):
(_calculateRegression):
(bootstrap):

  • MotionMark1.2/resources/strings.js: Added.
  • MotionMark1.2/tests/3d/resources/webgl.js: Added.

(Stage.call.initialize):
(Stage.call._getFunctionSource):
(Stage.call._resetIfNecessary):
(Stage.call.tune):
(Stage.call.animate):
(Stage.call.complexity):
(Stage.call):

  • MotionMark1.2/tests/3d/resources/webgpu.js: Added.

(constant.float.uniforms.register):
(Stage.call.initialize):
(Stage.call._getFunctionSource):
(Stage.call._resetIfNecessary):
(Stage.call.tune):
(Stage.call.animate):
(Stage.call.complexity):
(Stage.call):
(new.WebGLStage.waitUntilReady):
(new.WebGLStage):

  • MotionMark1.2/tests/3d/triangles-webgl.html: Added.
  • MotionMark1.2/tests/3d/triangles-webgpu.html: Added.
  • MotionMark1.2/tests/bouncing-particles/bouncing-canvas-images.html: Added.
  • MotionMark1.2/tests/bouncing-particles/bouncing-canvas-shapes.html: Added.
  • MotionMark1.2/tests/bouncing-particles/bouncing-css-images.html: Added.
  • MotionMark1.2/tests/bouncing-particles/bouncing-css-shapes.html: Added.
  • MotionMark1.2/tests/bouncing-particles/bouncing-svg-images.html: Added.
  • MotionMark1.2/tests/bouncing-particles/bouncing-svg-shapes.html: Added.
  • MotionMark1.2/tests/bouncing-particles/bouncing-tagged-images.html: Added.
  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-canvas-images.js: Added.

(_draw):
(BouncingCanvasParticlesStage.call.initialize):
(BouncingCanvasParticlesStage.call.createParticle):
(BouncingCanvasParticlesStage.call):

  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-canvas-particles.js: Added.

(applyRotation):
(applyClipping):
(_draw):
(animate):
(BouncingParticlesStage.call.initialize):
(BouncingParticlesStage.call.animate):
(BouncingParticlesStage.call):

  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-canvas-shapes.js: Added.

(this._color1.Stage.randomColor._applyFill):
(this._color1.Stage.randomColor._drawShape):
(this._color1.Stage.randomColor._draw):
(this._color1.Stage.randomColor):
(BouncingCanvasParticlesStage.call.initialize):
(BouncingCanvasParticlesStage.call.createParticle):
(BouncingCanvasParticlesStage.call):

  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-css-images.js: Added.

(this._move._move):
(this._move.animate):
(this._move):
(BouncingParticlesStage.call.initialize):
(BouncingParticlesStage.call.createParticle):
(BouncingParticlesStage.call.particleWillBeRemoved):
(BouncingParticlesStage.call):

  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-css-shapes.js: Added.

(switch):
(this._move._createSpan):
(this._move._move):
(this._move.animate):
(this._move):
(BouncingParticlesStage.call.initialize):
(BouncingParticlesStage.call.createParticle):
(BouncingParticlesStage.call.particleWillBeRemoved):
(BouncingParticlesStage.call):

  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-particles.js: Added.

(BouncingParticle):
(BouncingParticle.prototype.get center):
(BouncingParticle.prototype.animate):
(initialize):
(parseShapeParameters):
(animate):
(tune):
(complexity):

  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-svg-images.js: Added.

(BouncingSvgParticlesStage.call.initialize):
(BouncingSvgParticlesStage.call.createParticle):
(BouncingSvgParticlesStage.call):

  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-svg-particles.js: Added.

(_applyClipping):
(_move):
(animate):
(BouncingParticlesStage.call._createDefs):
(BouncingParticlesStage.call._ensureDefsIsCreated):
(BouncingParticlesStage.call._createClipStar):
(BouncingParticlesStage.call.ensureClipStarIsCreated):
(BouncingParticlesStage.call.particleWillBeRemoved):
(BouncingParticlesStage.call):

  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-svg-shapes.js: Added.

(this._move._createShape):
(this._move._applyFill):
(this._move):
(BouncingSvgParticlesStage.call.initialize):
(BouncingSvgParticlesStage.call.createGradient):
(BouncingSvgParticlesStage.call.createParticle):
(BouncingSvgParticlesStage.call.particleWillBeRemoved):
(BouncingSvgParticlesStage.call):

  • MotionMark1.2/tests/bouncing-particles/resources/bouncing-tagged-images.js: Added.

(this._move._move):
(this._move.animate):
(this._move):
(BouncingParticlesStage.call.):
(BouncingParticlesStage.call.initialize):
(BouncingParticlesStage.call.img.onload):
(BouncingParticlesStage.call._loadImage):
(BouncingParticlesStage.call.createParticle):
(BouncingParticlesStage.call.particleWillBeRemoved):
(BouncingParticlesStage.call):
(new.BouncingTaggedImagesStage.waitUntilReady):
(new.BouncingTaggedImagesStage):

  • MotionMark1.2/tests/bouncing-particles/resources/image1.jpg: Added.
  • MotionMark1.2/tests/bouncing-particles/resources/image2.jpg: Added.
  • MotionMark1.2/tests/bouncing-particles/resources/image3.jpg: Added.
  • MotionMark1.2/tests/bouncing-particles/resources/image4.jpg: Added.
  • MotionMark1.2/tests/bouncing-particles/resources/image5.jpg: Added.
  • MotionMark1.2/tests/dom/compositing-transforms.html: Added.
  • MotionMark1.2/tests/dom/focus.html: Added.
  • MotionMark1.2/tests/dom/leaves.html: Added.
  • MotionMark1.2/tests/dom/multiply.html: Added.
  • MotionMark1.2/tests/dom/particles.html: Added.
  • MotionMark1.2/tests/dom/resources/compositing-transforms.js: Added.

(this._move._move):
(this._move.animate):
(this._move):
(BouncingParticlesStage.call.initialize):
(BouncingParticlesStage.call.createParticle):
(BouncingParticlesStage.call.particleWillBeRemoved):
(BouncingParticlesStage.call):

  • MotionMark1.2/tests/dom/resources/dom-particles.js: Added.

(Particle.call.reset):
(Particle.call.move):
(Particle.call):
(ParticlesStage.call.initialize):
(ParticlesStage.call.createParticle):
(ParticlesStage.call.willRemoveParticle):
(ParticlesStage.call):

  • MotionMark1.2/tests/dom/resources/focus.js: Added.

(FocusElement.Utilities.createClass):
(hide):
(show):
(animate):
(Stage.call.initialize):
(Stage.call.complexity):
(Stage.call.tune):
(Stage.call.animate):
(Stage.call.getBlurValue):
(Stage.call.getOpacityValue):
(Stage.call):

  • MotionMark1.2/tests/dom/resources/leaves.js: Added.

(SuperLeaf.call.move):
(SuperLeaf.call):
(switch):

  • MotionMark1.2/tests/dom/resources/multiply.js: Added.

(switch):

  • MotionMark1.2/tests/master/canvas-stage.html: Added.
  • MotionMark1.2/tests/master/design.html: Added.
  • MotionMark1.2/tests/master/focus.html: Added.
  • MotionMark1.2/tests/master/image-data.html: Added.
  • MotionMark1.2/tests/master/leaves.html: Added.
  • MotionMark1.2/tests/master/multiply.html: Added.
  • MotionMark1.2/tests/master/resources/canvas-stage.js: Added.

(initialize):
(tune):
(animate):
(complexity):

  • MotionMark1.2/tests/master/resources/canvas-tests.js: Added.

(CanvasLineSegment.Utilities.createClass):
(draw):
(CanvasArc.Utilities.createClass):
(CanvasLinePoint.Utilities.createClass):
(randomPoint):
(SimpleCanvasStage.call.initialize):
(SimpleCanvasStage.call.animate):
(SimpleCanvasStage.call):
(switch):

  • MotionMark1.2/tests/master/resources/compass.svg: Added.
  • MotionMark1.2/tests/master/resources/compass100.png: Added.
  • MotionMark1.2/tests/master/resources/console.svg: Added.
  • MotionMark1.2/tests/master/resources/console100.png: Added.
  • MotionMark1.2/tests/master/resources/contribute.svg: Added.
  • MotionMark1.2/tests/master/resources/contribute100.png: Added.
  • MotionMark1.2/tests/master/resources/debugger.svg: Added.
  • MotionMark1.2/tests/master/resources/debugger100.png: Added.
  • MotionMark1.2/tests/master/resources/design.js: Added.

(initialize):
(tune):
(animate):
(complexity):

  • MotionMark1.2/tests/master/resources/focus.js: Added.

(FocusElement.Utilities.createClass):
(this.animate.hide):
(this.animate.show):
(this.animate.animate):
(this.animate):
(Stage.call.initialize):
(Stage.call.complexity):
(Stage.call.tune):
(Stage.call.animate):
(Stage.call):

  • MotionMark1.2/tests/master/resources/image-data.js: Added.

(initialize):
(_loadImage):
(tune):
(_createTestElement):
(_refreshElement):
(animate):
(_getRandomNeighboringPixelIndex):
(complexity):
(new.ImageDataStage.waitUntilReady):
(new.ImageDataStage):

  • MotionMark1.2/tests/master/resources/inspector.svg: Added.
  • MotionMark1.2/tests/master/resources/inspector100.png: Added.
  • MotionMark1.2/tests/master/resources/layout.svg: Added.
  • MotionMark1.2/tests/master/resources/layout100.png: Added.
  • MotionMark1.2/tests/master/resources/leaves.js: Added.

(Particle.call.reset):
(Particle.call.animate):
(Particle.call.move):
(Particle.call):
(initialize):
(img.onload):
(_loadImage):
(animate):
(createParticle):
(willRemoveParticle):
(new.ParticlesStage.waitUntilReady):
(new.ParticlesStage):

  • MotionMark1.2/tests/master/resources/multiply.js: Added.

(initialize):
(_addTile):
(complexity):
(tune):
(animate):

  • MotionMark1.2/tests/master/resources/particles.js: Added.

(Particle):
(Particle.prototype.reset):
(Particle.prototype.animate):
(Particle.prototype.move):
(animate):
(tune):
(complexity):

  • MotionMark1.2/tests/master/resources/performance.svg: Added.
  • MotionMark1.2/tests/master/resources/performance100.png: Added.
  • MotionMark1.2/tests/master/resources/script.svg: Added.
  • MotionMark1.2/tests/master/resources/script100.png: Added.
  • MotionMark1.2/tests/master/resources/shortcuts.svg: Added.
  • MotionMark1.2/tests/master/resources/shortcuts100.png: Added.
  • MotionMark1.2/tests/master/resources/standards.svg: Added.
  • MotionMark1.2/tests/master/resources/standards100.png: Added.
  • MotionMark1.2/tests/master/resources/storage.svg: Added.
  • MotionMark1.2/tests/master/resources/storage100.png: Added.
  • MotionMark1.2/tests/master/resources/styles.svg: Added.
  • MotionMark1.2/tests/master/resources/styles100.png: Added.
  • MotionMark1.2/tests/master/resources/suits.js: Added.

(this.initialize.initialize):
(this.initialize.reset):
(this.initialize.move):
(this.initialize):
(ParticlesStage.call.initialize):
(ParticlesStage.call.createParticle):
(ParticlesStage.call.willRemoveParticle):
(ParticlesStage.call):

  • MotionMark1.2/tests/master/resources/timeline.svg: Added.
  • MotionMark1.2/tests/master/resources/timeline100.png: Added.
  • MotionMark1.2/tests/master/suits.html: Added.
  • MotionMark1.2/tests/resources/main.js: Added.

(Sampler.Utilities.createClass):
(record):
(processSamples):
(Controller.Utilities.createClass):
(set isFrameLengthEstimatorEnabled):
(start):
(recordFirstSample):
(mark):
(containsMark):
(filterOutOutliers):
(_measureAndResetInterval):
(update):
(registerFrameTime):
(intervalHasConcluded):
(didFinishInterval):
(tune):
(shouldStop):
(results):
(_processComplexitySamples):
(_processMarks):
(_processControllerSamples):
(_getComplexity):
(_getFrameLength):
(Stage.Utilities.createClass):
(Stage.Utilities.createClass.initialize):
(Stage.Utilities.createClass.get element):
(Stage.Utilities.createClass.get size):
(Stage.Utilities.createClass.complexity):
(Stage.Utilities.createClass.tune):
(Stage.Utilities.createClass.animate):
(Stage.Utilities.createClass.clear):
(random):
(randomBool):
(randomSign):
(randomInt):
(randomPosition):
(randomSquareSize):
(randomVelocity):
(randomAngle):
(randomColor):
(randomStyleMixBlendMode):
(randomStyleFilter):
(randomElementInArray):
(rotatingColor):
(dateFractionalValue):
(dateCounterValue):
(randomRotater):
(Rotater.Utilities.createClass):
(get interval):
(next):
(degree):
(rotateZ):
(rotate):
(Benchmark.Utilities.createClass):
(get stage):
(get timestamp):
(backgroundColor):
(run):
(waitUntilReady):
(_animateLoop):

  • MotionMark1.2/tests/resources/math.js: Added.

(this._gain.error.sample):
(this._gain.error.reset):
(this._gain.error):
(PIDController.Utilities.createClass):
(_yPosition):
(_distanceUltimate):
(_distance):
(_gainIncrement):
(_updateStage):
(_tuneP):
(_tunePID):
(_tune):
(_saturate):
(tune):

  • MotionMark1.2/tests/resources/stage.css: Added.

(html):
(body):
(#stage):
(#center-text):

  • MotionMark1.2/tests/resources/star.svg: Added.
  • MotionMark1.2/tests/resources/yin-yang.png: Added.
  • MotionMark1.2/tests/resources/yin-yang.svg: Added.
  • MotionMark1.2/tests/simple/resources/simple-canvas-paths.js: Added.

(CanvasLineSegment.Utilities.createClass):
(this._lineWidth.Stage.randomInt.draw):
(this._lineWidth.Stage.randomInt):
(CanvasLinePoint.Utilities.createClass):
(draw):
(CanvasQuadraticSegment.Utilities.createClass):
(CanvasQuadraticPoint.Utilities.createClass):
(CanvasBezierSegment.Utilities.createClass):
(CanvasBezierPoint.Utilities.createClass):
(CanvasArcToSegment.Utilities.createClass):
(CanvasArcToSegmentFill.Utilities.createClass):
(CanvasArcToSegment.call.draw):
(CanvasArcToSegment.call):
(CanvasArcSegment.Utilities.createClass):
(CanvasArcSegmentFill.Utilities.createClass):
(CanvasArcSegment.call.draw):
(CanvasArcSegment.call):
(CanvasRect.Utilities.createClass):
(CanvasRectFill.Utilities.createClass):
(CanvasRect.call.draw):
(CanvasRect.call):
(CanvasEllipse.Utilities.createClass):
(CanvasEllipseFill.Utilities.createClass):
(CanvasEllipse.call.draw):
(CanvasEllipse.call):
(CanvasStroke.Utilities.createClass):
(this._object.new.draw):
(this._object.new):
(CanvasFill.Utilities.createClass):
(SimpleCanvasStage.call.animate):
(SimpleCanvasStage.call):
(SimpleCanvasStage.call.initialize):
(SimpleCanvasPathStrokeStage.call.initialize):
(SimpleCanvasPathStrokeStage.call):
(initialize):
(animate):
(switch):

  • MotionMark1.2/tests/simple/resources/simple-canvas.js: Added.

(tune):
(animate):
(complexity):

  • MotionMark1.2/tests/simple/resources/tiled-canvas-image.js: Added.

(CanvasImageTile.Utilities.createClass):
(getImageData):
(putImageData):
(Stage.call.initialize):
(Stage.call._setupTiles):
(Stage.call._nextTilePosition):
(Stage.call.tune):
(Stage.call._drawBackground):
(Stage.call.animate):
(Stage.call.complexity):
(Stage.call):

  • MotionMark1.2/tests/simple/simple-canvas-paths.html: Added.
  • MotionMark1.2/tests/simple/tiled-canvas-image.html: Added.
  • MotionMark1.2/tests/svg/suits.html: Added.
  • MotionMark1.2/tests/svg/suits.js: Added.

(this.initialize.move):
(this.initialize):
(this.initialize.reset):
(switch):

  • MotionMark1.2/tests/template/resources/template-canvas.js: Added.

(TemplateCanvasObject):
(TemplateCanvasObject.prototype._draw):
(TemplateCanvasObject.prototype.animate):
(Stage.call.initialize):
(Stage.call.tune):
(Stage.call.animate):
(Stage.call):
(new.TemplateCanvasStage.waitUntilReady):
(new.TemplateCanvasStage):

  • MotionMark1.2/tests/template/resources/template-css.js: Added.

(Stage.call.initialize):
(Stage.call.tune):
(Stage.call.animate):
(Stage.call):

  • MotionMark1.2/tests/template/resources/template-svg.js: Added.

(Stage.call.initialize):
(Stage.call.tune):
(Stage.call.animate):
(Stage.call):

  • MotionMark1.2/tests/template/template-canvas.html: Added.
  • MotionMark1.2/tests/template/template-css.html: Added.
  • MotionMark1.2/tests/template/template-svg.html: Added.
  • MotionMark1.2/tests/text/design-6.html: Added.
  • MotionMark1.2/tests/text/design-6.js: Added.

(switch):
(dataset.forEach):

  • MotionMark1.2/tests/text/design.html: Added.
  • MotionMark1.2/tests/text/design.js: Added.

(switch):
(dataset.forEach):

12:08 PM Changeset in webkit [276888] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

getPropertyValue for url path doesn't return the "#" character
https://bugs.webkit.org/show_bug.cgi?id=215409

Patch by Rob Buis <rbuis@igalia.com> on 2021-05-02
Reviewed by Sam Weinig.

Source/WebCore:

Adapt url serializing in SVG to match Firefox and Chrome.

Test: svg/css/computed-style-url-serializing.html

  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::svgPropertyValue):

LayoutTests:

Add test for this.

  • svg/css/computed-style-url-serializing-expected.txt: Added.
  • svg/css/computed-style-url-serializing.html: Added.
12:01 PM Changeset in webkit [276887] by weinig@apple.com
  • 8 edits in trunk/Source

Add support for DestinationColorSpace::DisplayP3 in preparation for DisplayP3 canvas
https://bugs.webkit.org/show_bug.cgi?id=225280

Reviewed by Anders Carlsson.

Add new ENABLE_DESTINATION_COLOR_SPACE_DISPLAY_P3 macro to declare which ports
support P3 backing stores. Currently, only the Apple/Cocoa ports support it.

Source/WebCore:

When ENABLE(DESTINATION_COLOR_SPACE_DISPLAY_P3), also define ColorSpaceDestination::DisplayP3.
This is not currently used, but will be in subsequent changes.

  • platform/graphics/ColorConversion.cpp:

(WebCore::converColorComponents):

  • platform/graphics/ColorSpace.cpp:

(WebCore::operator<<):

  • platform/graphics/ColorSpace.h:

(WebCore::callWithColorType):

  • platform/graphics/cg/ColorSpaceCG.h:

(WebCore::cachedCGColorSpace):

Source/WTF:

  • wtf/PlatformEnable.h:
  • wtf/PlatformEnableCocoa.h:
9:59 AM Changeset in webkit [276886] by Alan Bujtas
  • 5 edits
    49 copies
    6 adds
    4 deletes in trunk/Source/WebCore

[LFC] Rename block(inline/table/flex)formattingContext directories to block(inline/table/flex)
https://bugs.webkit.org/show_bug.cgi?id=225275

Reviewed by Antti Koivisto.

The formattingContext postfix is redundant as they are all under the /formattingContexts directory.

  • CMakeLists.txt:
  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
9:45 AM Changeset in webkit [276885] by weinig@apple.com
  • 12 edits
    3 deletes in trunk/LayoutTests

Consider removing imported/w3c/canvas and canvas/philip (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=225269

Reviewed by Simon Fraser.

Remove imported/w3c/canvas/* and canvas/philip/* and related expecations
and results. They are out of date copies of tests now bundled as part of
WPT in imported/w3c/web-platform-tests/html/canvas/element and are no
longer useful.

Part 2 removes the remaining copy in imported/w3c/canvas.

LayoutTests/imported/w3c:

  • canvas: Removed.

LayoutTests:

  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/gtk/imported/w3c/canvas: Removed.
  • platform/ios-wk1/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/mac/imported/w3c/canvas: Removed.
  • platform/win/TestExpectations:
  • platform/wpe/TestExpectations:
9:36 AM Changeset in webkit [276884] by weinig@apple.com
  • 11 edits
    5 deletes in trunk/LayoutTests

Consider removing imported/w3c/canvas and canvas/philip (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=225269

Reviewed by Simon Fraser.

Remove imported/w3c/canvas/* and canvas/philip/* and related expecations
and results. They are out of date copies of tests now bundled as part of
WPT in imported/w3c/web-platform-tests/html/canvas/element and are no
longer useful.

Part 1 just removes canvas/philip to make it more reasonable to review
and land.

  • canvas/philip: Removed.
  • http/tests/canvas/philip: Removed.
  • platform/gtk/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/mac-wk2/canvas/philip: Removed.
  • platform/mac/TestExpectations:
  • platform/mac/canvas/philip: Removed.
  • platform/win/TestExpectations:
  • platform/win/canvas/philip: Removed.
  • platform/wincairo/TestExpectations:
  • platform/wpe/TestExpectations:
9:04 AM Changeset in webkit [276883] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

[Perf] Creation of many video elements slows over time
https://bugs.webkit.org/show_bug.cgi?id=225273

Reviewed by Eric Carlson.

In PerformanceTests/Media/VideoElementCreation.html, 1000 video elements are created
per test, and the test reports how long each batch of 1000 element took to create. A
typical run shows the amount of time to run each batch slows over time. The underlying
cause appears to be the cost it takes to iterate over each MediaElementSession inside
PlatformMediaSessionManager and subclasses.

Before a HTMLMediaElement has a src (or after it's emptied) there's no reason for its
MediaElementSession to be tracked by the PlatformMediaSessionManager. It can't play,
pause, be interrupted, or accept remote control commands. So PlatformMediaSession will
be changed so that it does not add itself to the list of its manager's sessions at
creation time; instead a new method, setActive(bool), is added and will be called at
an appropriate time by its clients, HTMLMediaElement and AudioContext.

HTMLMediaElement will activate its mediaSession just before creating its MediaPlayer
inside prepareForLoad() or loadNextSourceChild(), and will deactivate after tearing
down its MediaPlayer inside mediaLoadingFailed().

AudioContext will activate its mediaSession during its own initialization, and deactivate
inside close().

Before this change, on this machine, VideoElementCreation.html showed an incresing time
to video element creation, levelling out at ~400ms per 1000 elements. After this change,
VideoElelementCreation.html shows a constant time to video element creation, averaging
between 4ms and 7ms per 1000 elements.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::close):
(WebCore::AudioContext::lazyInitialize):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::prepareForLoad):
(WebCore::HTMLMediaElement::mediaLoadingFailed):

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::PlatformMediaSession):
(WebCore::PlatformMediaSession::~PlatformMediaSession):
(WebCore::PlatformMediaSession::setActive):

  • platform/audio/PlatformMediaSession.h:

May 1, 2021:

10:22 PM Changeset in webkit [276882] by Antti Koivisto
  • 6 edits in trunk

Share style resolvers between author shadow trees with identical style
https://bugs.webkit.org/show_bug.cgi?id=225187
<rdar://problem/77317178>

Reviewed by Sam Weinig.

Source/WebCore:

Style resolvers own style resolution and invalidation rule sets, matched declarations cache, and other things.
With complex stylesheets that can be lot of data. We currently create a style resolver for each author
shadow tree. With web components it is common for a page to have large number of instances of the same
component, and so shadow trees with identical style.

We already deduplicate shadow tree stylesheets (including inline stylesheets based on string equality).
With this patch we'll use these stylesheets as keys for sharing the full style resolvers as well.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::createOrFindSharedShadowTreeResolver):

Expand the existing support for sharing between user agent shadow trees and author shadow trees with
empty style. Look up shareable resolvers from a map.

(WebCore::Style::Scope::unshareShadowTreeResolverBeforeMutation):
(WebCore::Style::Scope::makeResolverSharingKey):

Make a key from the active stylesheets and a bit indicating the shadow tree type.

(WebCore::Style::Scope::releaseMemory):
(WebCore::Style::Scope::didChangeStyleSheetEnvironment):

  • style/StyleScope.h:

LayoutTests:

  • fast/shadow-dom/style-resolver-sharing-expected.txt:
  • fast/shadow-dom/style-resolver-sharing.html:
8:39 PM Changeset in webkit [276881] by weinig@apple.com
  • 4 edits
    1 add in trunk/Source/WebCore

Move PixelFormat into its own file
https://bugs.webkit.org/show_bug.cgi?id=225272

Reviewed by Darin Adler.

PixelFormat is going to be useful for non-ImageBuffer specific reasons
soon, so let's move it to its own header.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/ImageBufferBackend.h:
  • platform/graphics/PixelFormat.h: Added.
8:09 PM Changeset in webkit [276880] by Darin Adler
  • 58 edits in trunk/Source

Use SortedArrayMap in a few more places
https://bugs.webkit.org/show_bug.cgi?id=225251

Reviewed by Sam Weinig.

Source/WebCore:

  • Modules/encryptedmedia/CDM.h: Removed unneeded includes.
  • Modules/indexeddb/server/IDBServer.h: Ditto.
  • contentextensions/ContentExtensionActions.h: Ditto.
  • css/CSSVariableData.h: Ditto.
  • dom/FullscreenManager.h: Ditto.
  • dom/ScriptElement.cpp:

(WebCore::isLegacySupportedJavaScriptLanguage): Use SortedArraySet.
(WebCore::ScriptElement::executeClassicScript): Fixed typo.
(WebCore::ScriptElement::executeModuleScript): Ditto.

  • inspector/InspectorAuditResourcesObject.cpp: Removed unneeded includes.
  • inspector/agents/InspectorNetworkAgent.cpp: Ditto.
  • loader/appcache/ApplicationCacheGroup.cpp: Ditto.
  • page/UserContentProvider.h: Ditto.
  • page/ios/DOMTimerHoldingTank.cpp: Ditto.
  • page/scrolling/ScrollingCoordinator.h: Ditto.
  • page/scrolling/ScrollingTreeNode.h: Added forward declaration

that used to be inherited from another file where it's not needed.

  • platform/gamepad/cocoa/GameControllerGamepadProvider.mm:

(WebCore::GameControllerGamepadProvider::willHandleVendorAndProduct):
Use a switch statement.

  • platform/gamepad/mac/HIDGamepadElement.h: Removed unneeded includes.
  • platform/graphics/FontPlatformData.cpp: Ditto.
  • platform/graphics/HEVCUtilities.cpp: Ditto.
  • platform/graphics/IntRectHash.h: Ditto.
  • platform/graphics/MIMETypeCache.cpp:

(WebCore::MIMETypeCache::isStaticContainerType): Renamed; this replaces
the old staticContainerTypeList function and just returns false.

  • platform/graphics/MIMETypeCache.h: Replaced the staticContainerTypeList

fucntion with an isStaticContainerType function. Also made it, and one
other function, private.

  • platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.h: Updated

for the change to MIMETypeCache.

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

(WebCore::AVAssetMIMETypeCache::isStaticContainerType): Use SortedArraySet.

  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:

Removed unneeded includes.

  • platform/graphics/coreimage/FilterEffectRendererCoreImage.h: Ditto.
  • platform/mediastream/RealtimeMediaSourceSupportedConstraints.cpp: Ditto.
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h: Ditto.
  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.h: Ditto.
  • platform/mediastream/mac/CoreAudioCaptureSource.h: Ditto.
  • platform/network/cf/FormDataStreamCFNet.cpp: Ditto.
  • platform/network/mac/UTIUtilities.mm:

(WebCore::UTIFromUnknownMIMEType): Use SortedArrayMap. Also fixed a regression
from r271533 where we accidentally deleted the MIME type model/vnd.reality.

  • rendering/ComplexLineLayout.cpp:

(WebCore::setLogicalWidthForTextRun): Use a range-based for loop.

  • rendering/updating/RenderTreeUpdater.h: Removed unneeded includes.
  • storage/StorageNamespaceProvider.h: Ditto.
  • storage/StorageQuotaManager.h: Ditto.
  • style/StyleUpdate.h: Ditto.
  • svg/SVGFitToViewBox.h: Ditto.
  • svg/SVGTests.cpp:

(WebCore::SVGTests::isValid const): Use SortedArraySet.
(WebCore::SVGTests::hasFeatureForLegacyBindings): Ditto.

Source/WebKit:

  • NetworkProcess/NetworkLoad.cpp: Removed unneeded includes.
  • NetworkProcess/NetworkResourceLoadMap.h: Ditto.
  • Shared/SharedStringHashStore.h: Ditto.
  • UIProcess/API/APIPageConfiguration.h: Ditto.
  • UIProcess/API/Cocoa/WKWebsiteDataRecord.mm: Ditto.
  • UIProcess/API/Cocoa/_WKInspector.mm: Ditto.
  • UIProcess/Automation/SimulatedInputDispatcher.h: Ditto.
  • UIProcess/Inspector/WebInspectorUIProxy.cpp: Ditto.
  • UIProcess/Plugins/mac/PluginInfoStoreMac.mm: Ditto.
  • UIProcess/WebPageGroup.h: Ditto.
  • UIProcess/WebPasteboardProxy.h: Ditto.
  • UIProcess/WebPreferences.h: Ditto.
  • WebProcess/Geolocation/WebGeolocationManager.h: Ditto.
  • WebProcess/WebPage/WebBackForwardListProxy.h: Ditto.

Source/WTF:

  • wtf/SortedArrayMap.h: Added support for types that don't have a parse member function.
  • wtf/cocoa/MainThreadCocoa.mm: Removed unneeded includes.
  • wtf/text/AtomStringImpl.cpp: Ditto.
  • wtf/text/AtomStringTable.cpp: Ditto.
7:36 PM Changeset in webkit [276879] by Chris Dumez
  • 14 edits
    1 delete in trunk

Start leveraging std::filesystem in WTF::FileSystem
https://bugs.webkit.org/show_bug.cgi?id=225255

Reviewed by Sam Weinig.

Source/JavaScriptCore:

Unexport some symbols to fix build.

  • Configurations/JavaScriptCore.xcconfig:

Source/WTF:

Start leveraging std::filesystem in WTF::FileSystem to reduce the amount of

platform-specific code.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::fileExists):
(WTF::FileSystemImpl::deleteFile):
(WTF::FileSystemImpl::deleteEmptyDirectory):
(WTF::FileSystemImpl::moveFile):
(WTF::FileSystemImpl::getFileSize):
(WTF::FileSystemImpl::fileIsDirectory):
(WTF::FileSystemImpl::makeAllDirectories):
(WTF::FileSystemImpl::getVolumeFreeSpace):
(WTF::FileSystemImpl::createSymbolicLink):
(WTF::FileSystemImpl::hardLink):
(WTF::FileSystemImpl::hardLinkOrCopyFile):
(WTF::FileSystemImpl::deleteNonEmptyDirectory):

  • wtf/FileSystem.h:
  • wtf/cocoa/FileSystemCocoa.mm:

(WTF::FileSystemImpl::createTemporaryDirectory):

  • wtf/glib/FileSystemGlib.cpp:
  • wtf/posix/FileSystemPOSIX.cpp:
  • wtf/win/FileSystemWin.cpp:
  • wtf/PlatformJSCOnly.cmake:

GNU implementation prior to 9.1 requires linking with -lstdc++fs and LLVM implementation
prior to LLVM 9.0 requires linking with -lc++fs.

  • wtf/StdFilesystem.cpp: Removed.
  • wtf/StdFilesystem.h:

Drop our own copy of std::filesystem as all the operating system we support now have
support for this.

Tools:

Add API test coverage for the FileSystem API that was modified.

  • TestWebKitAPI/Tests/WTF/FileSystem.cpp:

(TestWebKitAPI::FileSystemTest::tempFilePath const):
(TestWebKitAPI::FileSystemTest::tempFileSymlinkPath const):
(TestWebKitAPI::FileSystemTest::tempEmptyFolderPath const):
(TestWebKitAPI::FileSystemTest::tempEmptyFolderSymlinkPath const):
(TestWebKitAPI::FileSystemTest::tempEmptyFilePath const):
(TestWebKitAPI::FileSystemTest::spaceContainingFilePath const):
(TestWebKitAPI::FileSystemTest::bangContainingFilePath const):
(TestWebKitAPI::FileSystemTest::quoteContainingFilePath const):
(TestWebKitAPI::TEST_F):

6:32 PM Changeset in webkit [276878] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

start-local-buildbot-server should fail gracefully for Python 2
https://bugs.webkit.org/show_bug.cgi?id=225268

Reviewed by Alexey Proskuryakov.

  • CISupport/start-local-buildbot-server:
1:40 PM Changeset in webkit [276877] by weinig@apple.com
  • 27 edits in trunk

Update operations in CanvasImageData.idl to use long rather than float as per spec
https://bugs.webkit.org/show_bug.cgi?id=225263

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • canvas/2d.imageData.create2.tiny-expected.txt:
  • canvas/2d.imageData.get.tiny-expected.txt:

Update results, which now don't pass, to match the spec behavior.

  • web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double-expected.txt:
  • web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero-expected.txt:
  • web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double-expected.txt:
  • web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash-expected.txt:
  • web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding-expected.txt:
  • web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero-expected.txt:

Update results, which now pass!

Source/WebCore:

Use [EnforceRange] long to match the current HTML spec.

  • html/canvas/CanvasImageData.idl:
  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::createImageData const):
(WebCore::CanvasRenderingContext2DBase::getImageData const):
(WebCore::CanvasRenderingContext2DBase::putImageData):

  • html/canvas/CanvasRenderingContext2DBase.h:

LayoutTests:

  • canvas/philip/tests/2d.imageData.create2.tiny-expected.txt:
  • canvas/philip/tests/2d.imageData.get.tiny-expected.txt:

Update results, which now don't pass, to match the spec behavior.

  • fast/canvas/canvas-2d-imageData-create-nonfinite-expected.txt:
  • fast/canvas/canvas-crash.html:
  • fast/canvas/canvas-getImageData-invalid-expected.txt:
  • fast/canvas/canvas-getImageData-invalid-result-buffer-crash.html:
  • fast/canvas/canvas-getImageData-invalid.html:
  • fast/canvas/canvas-getImageData-large-crash-expected.txt:
  • fast/canvas/canvas-getImageData-rounding-expected.txt:
  • fast/canvas/canvas-getImageData-rounding.html:
  • fast/canvas/canvas-putImageData-expected.txt:
  • fast/canvas/canvas-putImageData.js:
  • fast/canvas/resources/canvas-2d-imageData-create-nonfinite.js:

Update tests and results to match spec behavior.

12:55 PM Changeset in webkit [276876] by Alan Bujtas
  • 5 edits
    49 copies
    4 moves
    7 adds
    4 deletes in trunk/Source/WebCore

[LFC] Move formatting contexts to layout/formattingContexts directory
https://bugs.webkit.org/show_bug.cgi?id=225270

Reviewed by Antti Koivisto.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
11:06 AM Changeset in webkit [276875] by weinig@apple.com
  • 17 edits in trunk/Source

Make destination color space enumeration match supported destination color spaces for the port
https://bugs.webkit.org/show_bug.cgi?id=225237

Reviewed by Simon Fraser.

Add ENABLE_DESTINATION_COLOR_SPACE_LINEAR_SRGB and enabled it for all ports
except the Apple Windows port, which is the only one doesn't have any support
for it.

Source/WebCore:

Removes existing behavior of returning SRGB when LinearSRGB was requested in
the Apple Windows port. Now, the callers are responisble for dealing with a
ports lack of support of LinearSRGB, making it very clear at those call sites
that something is different and wrong.

  • platform/graphics/Color.cpp:
  • platform/graphics/Color.h:
  • platform/graphics/ColorConversion.cpp:
  • platform/graphics/ColorConversion.h:

Add new functions to perform color conversion to and from an color space
denoted by the ColorSpace or DestinationColorSpace enum. Previously, we
only had convient ways to convert if the color was strongly typed (and this
is implemented using that mechanism). This is useful when converting for
final ouput, such in as the caller in FELighting::drawLighting.

  • platform/graphics/cg/ColorSpaceCG.h:
  • platform/graphics/ColorSpace.cpp:
  • platform/graphics/ColorSpace.h:
  • platform/graphics/filters/FELighting.cpp:
  • platform/graphics/filters/FilterEffect.h:
  • rendering/CSSFilter.cpp:
  • rendering/svg/RenderSVGResourceFilter.cpp:
  • rendering/svg/RenderSVGResourceMasker.cpp:

Wrap uses of DestinationColorSpace::LinearSRGB in ENABLE(DESTINATION_COLOR_SPACE_LINEAR_SRGB).

Source/WTF:

  • wtf/PlatformEnable.h:
  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformEnableWinApple.h:
10:15 AM Changeset in webkit [276874] by weinig@apple.com
  • 6 edits in trunk/Source/WebCore

Generated JS bindings for JSValue -> IDL dictionary don't take into account runtime settings
https://bugs.webkit.org/show_bug.cgi?id=225271

Reviewed by Alexey Shvayka.

While we did account for Settings/RuntimeEnabledFeatures/etc when converting from a
dictionary to a JSValue, we forgot to add code to skip trying to read the properties
in on ingestion.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryImplementationContent):
Match convertDictionaryToJS and add guard + indent if the property has a runtime flag.

  • bindings/scripts/test/JS/JSTestDerivedDictionary.cpp:

(WebCore::convertDictionary<TestDerivedDictionary>):

  • bindings/scripts/test/JS/JSTestDerivedDictionary2.cpp:

(WebCore::convertDictionary<TestDerivedDictionary2::Dictionary>):

  • bindings/scripts/test/JS/JSTestInheritedDictionary.cpp:

(WebCore::convertDictionary<TestInheritedDictionary>):

  • bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:

(WebCore::convertDictionary<DictionaryImplName>):
Update test results.

6:27 AM Changeset in webkit [276873] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Disable search engine crawling on build.webkit.org webpages
https://bugs.webkit.org/show_bug.cgi?id=225252

Reviewed by Jonathan Bedard.

Referencec: https://developers.google.com/search/docs/advanced/robots/create-robots-txt

  • CISupport/build-webkit-org/public_html/robots.txt:
5:54 AM Changeset in webkit [276872] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RenderTreeBuilder] Reset the "children inline" state when merging anonymous table boxes
https://bugs.webkit.org/show_bug.cgi?id=225266
<rdar://77327951>

Reviewed by Simon Fraser.

Source/WebCore:

This patch fixes the case when we end up moving block level boxes to an anonymous table box (cell, row) which previously
had inline level boxes only (it happens when the destination ("to") table box has no in-flow children).

Test: fast/table/merge-anonymous-table-cells-with-block-children.html

  • rendering/updating/RenderTreeBuilderTable.cpp:

(WebCore::RenderTreeBuilder::Table::collapseAndDetachAnonymousNextSibling):

LayoutTests:

  • fast/table/merge-anonymous-table-cells-with-block-children-expected.txt: Added.
  • fast/table/merge-anonymous-table-cells-with-block-children.html: Added.

Apr 30, 2021:

8:26 PM Changeset in webkit [276871] by Wenson Hsieh
  • 16 edits
    2 adds in trunk

App highlight UI should be disabled when selecting text in image overlays
https://bugs.webkit.org/show_bug.cgi?id=225260
rdar://77359313

Reviewed by Tim Horton.

Source/WebCore:

When both app highlights and image extraction are enabled, parts of the app highlights feature don't play well
with highlights created for text selections inside an image overlay. For the time being, address this by
disabling app highlights in image overlays.

These changes are exercised by a new API test on iOS, and a new layout test for macOS.

Tests: WebKit.AppHighlightsInImageOverlays

fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items.html

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::populate):

Don't add app highlight menu items in the case where we've selected text in an image overlay.

  • testing/Internals.cpp:

(WebCore::Internals::appHighlightContextMenuItemTitles const):

Add an internal testing hook to expose the localized names of the app highlight menu items to layout tests.

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

Add a bit to EditorState to indicate when a ranged selection is inside an image overlay.

  • Shared/EditorState.cpp:

(WebKit::EditorState::encode const):
(WebKit::EditorState::decode):

  • Shared/EditorState.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView shouldAllowAppHighlightCreation]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView targetForAction:withSender:]):

Make -targetForAction:withSender: return self only if we have a ranged selection that is not inside an image
overlay. Interestingly, UIKit doesn't seem to consult -canPerformAction:withSender: for actions that are added
through -[UIMenuController setMenuItems:], so we add the check here instead of inside -canPerformAction:
above.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::editorState const):

Set the new bit here. Note that this (importantly) doesn't trigger layout, because VisibleSelection::range
just returns a (potentially uncanonicalized) SimpleRange. For the purposes of checking whether the selection
is inside an image overlay, this is sufficient.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:

Add a new API test to verify the behavior of -targetForAction:withSender: in WKContentView.

  • WebKitTestRunner/TestOptions.cpp:

(WTR::TestOptions::defaults):
(WTR::TestOptions::keyTypeMapping):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::appHighlightsEnabled const):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformCreateWebView):

Add support for a new TestOption that enables app highlights. See the new layout test for more information.

LayoutTests:

Add a new layout test to verify that the app higlight context menu items don't show up on macOS when right
clicking.

  • fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items-expected.txt: Added.
  • fast/images/image-extraction/mac/image-overlay-text-disables-app-highlight-menu-items.html: Added.
7:11 PM Changeset in webkit [276870] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

[Cocoa] Calling into -[AVPlayerItem currentTime] is very expensive
https://bugs.webkit.org/show_bug.cgi?id=225254

Reviewed by Eric Carlson.

Calling into -currentTime is an expensive operation that synchronously calls a shared
background thread, and so can block for potentially long periods of time. Instead,
AVPlayerItem offers an API which will push currentTime changes on a specified dispatch
queue. We can use that API to occasionally update a cached view of the item's currentTime
and combine that cached value with other cached states to accurately calculate an
approximation of the currentTime during playback.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime const):
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTimeDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setPlayerRate):
(WebCore::MediaPlayerPrivateAVFoundationObjC::timeControlStatusDidChange):

6:22 PM Changeset in webkit [276869] by Kyle Piddington
  • 4 edits in trunk

[Metal ANGLE]: fix webgl/2.0.0/deqp/functional/gles3/negativebufferapi
Source/ThirdParty/ANGLE:

https://bugs.webkit.org/show_bug.cgi?id=225222
<rdar://77349908>

Arbitrary alignments are not allowed in Metal. Update UBO alignment to
a platform-dependant offset to match specifications.
Reviewed by Dean Jackson.

  • src/libANGLE/renderer/metal/DisplayMtl.mm:

(rx::DisplayMtl::ensureCapsInitialized const):

LayoutTests:

<rdar://77349908>

Uniform buffers are implemented as 'constant' buffers in Metal.
update alignment requirements, as we can't do arbitrary alignments. This
also fixes negativebufferAPI, as the invalid alignment test was failing.

https://bugs.webkit.org/show_bug.cgi?id=225222

Reviewed by Dean Jackson.

  • webgl/2.0.0/deqp/functional/gles3/negativebufferapi-expected.txt:
6:20 PM Changeset in webkit [276868] by clopez@igalia.com
  • 3 edits
    1 add
    1 delete in trunk/Tools

[tools] Make run-buildbot-test compatible with buildbot 2.10.5
https://bugs.webkit.org/show_bug.cgi?id=222540

Reviewed by Aakash Jain.

This renames the previous tool run-buildbot-test to start-buildbot-server-virtualenv
and it makes several changes to it:

  • Use python3 and refactor the code.
  • Make it also work with the EWS config (previously it only worked for the build.webkit.org config).
  • Use newer buildbot configs.
  • Instead of hardcoding values try to automatically detect the values from the config dir.
  • Instead of starting Nth workers by default start only one round-robin worker (local-worker).

It also modifies the configuration of the EWS server to add a force scheduler in order
to allow to manually trigger builds (only in test mode).

  • CISupport/build-webkit-org/run-buildbot-test.py: Removed.
  • CISupport/ews-build/loadConfig.py:

(loadBuilderConfig):

  • CISupport/ews-build/steps.py:

(ApplyPatch.start):

  • CISupport/start-local-buildbot-server: Added.

(check_tcp_port_open):
(create_tempdir):
(print_if_error_stdout_stderr):
(cmd_exists):
(BuildbotTestRunner):
(BuildbotTestRunner.init):
(BuildbotTestRunner._get_config_tcp_ports):
(BuildbotTestRunner.start):
(BuildbotTestRunner._wait_for_server_ready):
(BuildbotTestRunner._create_mock_worker_passwords_dict):
(BuildbotTestRunner._setup_server_workdir):
(BuildbotTestRunner._setup_virtualenv):
(BuildbotTestRunner._upgrade_db_needed):
(BuildbotTestRunner._start_server):
(BuildbotTestRunner._get_list_workers):
(BuildbotTestRunner._start_worker):
(BuildbotTestRunner._clean):

6:19 PM Changeset in webkit [276867] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Defend further against a PlatformCALayer's owner becoming null in PlatformCALayerCocoa::drawLayerContents.
https://bugs.webkit.org/show_bug.cgi?id=225250
<rdar://37608882>

Reviewed by Simon Fraser.

At the end of PlatformCALayer::drawLayerContents, we null check
layerContents for the platformCALayerShowRepaintCounter call but not
the platformCALayerIncrementRepaintCount call.

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayer::drawLayerContents):

5:43 PM Changeset in webkit [276866] by Cameron McCormack
  • 2 edits in trunk/Source/WebCore

Avoid a crash in PlatformCALayer::drawLayerContents when called with a display list recording GraphicsContext.
https://bugs.webkit.org/show_bug.cgi?id=225224
<rdar://76359027>

Reviewed by Simon Fraser.

setIsCALayerContext and setIsAcceleratedContext both assume (and assert)
that the GraphicsContext has a platform context directly in m_data,
but m_data is null when the GraphicsContext a display list recording
context (which is the case when GPUP DOM rendering is enabled). These
calls are unnecessary when not working with a CG-backed GraphicsContext,
so just skip them in this case.

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayer::drawLayerContents):

5:05 PM Changeset in webkit [276865] by Russell Epstein
  • 1 copy in tags/Safari-611.2.7.1.2

Tag Safari-611.2.7.1.2.

4:57 PM Changeset in webkit [276864] by Russell Epstein
  • 1 copy in tags/Safari-611.1.21.161.7

Tag Safari-611.1.21.161.7.

4:36 PM Changeset in webkit [276863] by eric.carlson@apple.com
  • 7 edits in trunk/Source/WebKit

[GPUP] Poll videoPlaybackQualityMetrics at the frequency is it accessed by script
https://bugs.webkit.org/show_bug.cgi?id=225245
rdar://77159589

Reviewed by Jer Noble.

Updating videoPlaybackQualityMetrics is computationally expensive, so instead of
getting it every time cached properties are updated (every 100 ms) keep track of
how often the page fetches the property and update it at that frequency.

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::play):
(WebKit::RemoteMediaPlayerProxy::pause):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerReadyStateChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerRateChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerPlaybackStateChanged):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerCharacteristicChanged):
(WebKit::RemoteMediaPlayerProxy::updateCachedState):
(WebKit::RemoteMediaPlayerProxy::setVideoPlaybackMetricsUpdateInterval):
(WebKit::RemoteMediaPlayerProxy::maybeUpdateCachedVideoMetrics):
(WebKit::RemoteMediaPlayerProxy::updateCachedVideoMetrics):
(WebKit::RemoteMediaPlayerProxy::logChannel const):
(WebKit::RemoteMediaPlayerProxy::setShouldUpdatePlaybackMetrics): Deleted.

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
  • Scripts/webkit/messages.py:

(headers_for_type):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::pause):
(WebKit::MediaPlayerPrivateRemote::updateCachedState):
(WebKit::MediaPlayerPrivateRemote::updateVideoPlaybackMetricsUpdateInterval):
(WebKit::MediaPlayerPrivateRemote::videoPlaybackQualityMetrics):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
4:33 PM Changeset in webkit [276862] by Brent Fulgham
  • 4 edits in trunk

[Cocoa] Always extend access to local process HTTP/3 cache directory
https://bugs.webkit.org/show_bug.cgi?id=225171
<rdar://problem/76287224>

Reviewed by Alex Christensen.

Source/WebKit:

Always pass the cache directory for HTTP/3 use, regardless of the current setting of
the flag. We still pass the flag so that users can turn the feature on and off, so there
is no change in expected behavior. However, certain OS settings can override the user
setting in the browser, so it's helpful to have the path permission for cases where a user
toggles state outside of the browser.

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::platformSetNetworkParameters):

Tools:

Since we always create the directory (even if HTTP/3 is turned off) we should expect that it is
created after loading a page.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

4:04 PM Changeset in webkit [276861] by Russell Epstein
  • 27 edits
    1 add in branches/safari-612.1.12-branch

Cherry-pick r276744. rdar://problem/77402549

experiment with averaging sampling colors across the top of the page as the scroll area background
https://bugs.webkit.org/show_bug.cgi?id=224987
<rdar://problem/76251889>

Reviewed by Darin Adler.

Source/WebCore:

Tests: SampledPageTopColor.ZeroMaxDifference

SampledPageTopColor.NegativeMaxDifference
SampledPageTopColor.SolidColor
SampledPageTopColor.DifferentColorsWithoutOutlierBelowMaxDifference
SampledPageTopColor.DifferentColorsWithLeftOutlierAboveMaxDifference
SampledPageTopColor.DifferentColorsWithMiddleOutlierAboveMaxDifference
SampledPageTopColor.DifferentColorsWithRightOutlierAboveMaxDifference
SampledPageTopColor.DifferentColorsIndividuallyAboveMaxDifference
SampledPageTopColor.DifferentColorsCumulativelyAboveMaxDifference
SampledPageTopColor.DisplayP3
SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor

  • dom/Document.h: (WebCore::Document::sampledPageTopColor const): Added.
  • dom/Document.cpp: (WebCore::Document::enqueuePaintTimingEntryIfNeeded): (WebCore::colorDifference): Added. (WebCore::averageColor): Added. (WebCore::Document::determineSampledPageTopColor): Added. Wait until the first contentful paint before sampling. Don't sample if that location would fall into a 3rd-party <iframe>. Currently use 5 snapshots across the top of the page, allowing for one of either the first or last snapshot to be an outlier, which is not included in the average of the other snapshots that's used as the final color value. If the Lab color difference between any two snapshots (unless it's the first or last snapshot as described above) or across all the (non-outlier) snapshots is too large, bail. Only enabled if the SampledPageTopColorMaxDifference setting is greater than 0.
  • page/Page.h:
  • page/Page.cpp: (WebCore::Page::sampledPageTopColor const): Added.
  • page/ChromeClient.h: (WebCore::ChromeClient::didSamplePageTopColor const): Added. Pass along the sampledPageTopColor to the UIProcess after it's determined or if the above logic bails (so that the WKWebView can adjust _sampledPageTopColor to nil).
  • rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged): Use the sampledPageTopColor if the UseSampledPageTopColorForScrollAreaBackgroundColor internal preference is enabled instead of the CSS background-color of the <html>/<body>.

Source/WebKit:

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::didSamplePageTopColor const): Added.
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didSamplePageTopColor): Added. Pass along the sampledPageTopColor to the UIProcess.
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::sampledPageTopColor): Added.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::scrollAreaBackgroundColor const): (WebKit::WebPageProxy::didSamplePageTopColor): Added. Use the sampledPageTopColor if the UseSampledPageTopColorForScrollAreaBackgroundColor internal preference is enabled instead of the CSS background-color of the <html>/<body>.
  • UIProcess/PageClient.h: (WebKit::PageClient::sampledPageTopColorWillChange): Added. (WebKit::PageClient::sampledPageTopColorDidChange): Added.
  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm: (WebKit::PageClientImplCocoa::sampledPageTopColorWillChange): Added. (WebKit::PageClientImplCocoa::sampledPageTopColorDidChange): Added. Add ObjC KVO support for -[WKWebView _sampledPageTopColor].
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _setupPageConfiguration:]): (-[WKWebView _sampledPageTopColor]): Added.
  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm: (-[WKWebViewConfiguration init]): (-[WKWebViewConfiguration copyWithZone:]): (-[WKWebViewConfiguration _setSampledPageTopColorMaxDifference:]): Added. (-[WKWebViewConfiguration _sampledPageTopColorMaxDifference]): Added. Provide SPI to configure the SampledPageTopColorMaxDifference preference when creating the WKWebView. Expose the result as _sampledPageTopColor SPI.

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml: Add a SampledPageTopColorMaxDifference setting that controls both whether or not to sample colors from the top of the page (only if value > 0) and the max Lab color difference allowed across all samples.
  • Scripts/Preferences/WebPreferencesInternal.yaml: Add a UseSampledPageTopColorForScrollAreaBackgroundColor internal setting that controls whether the sampled page top color can be used as the overscroll area background color.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: Added. (-[TestKVOWrapper initWithObservable:keyPath:callback:]): (-[TestKVOWrapper dealloc]): (-[TestKVOWrapper observeValueForKeyPath:ofObject:change:context:]): (createWebViewWithSampledPageTopColorMaxDifference): (waitForSampledPageTopColorToChangeForHTML): (createHTMLGradientWithColorStops): (TEST.SampledPageTopColor.ZeroMaxDifference): (TEST.SampledPageTopColor.NegativeMaxDifference): (TEST.SampledPageTopColor.SolidColor): (TEST.SampledPageTopColor.DifferentColorsWithoutOutlierBelowMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithLeftOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithMiddleOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsWithRightOutlierAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsIndividuallyAboveMaxDifference): (TEST.SampledPageTopColor.DifferentColorsCumulativelyAboveMaxDifference): (TEST.SampledPageTopColor.DisplayP3): (TEST.SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor):
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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

4:01 PM Changeset in webkit [276860] by Russell Epstein
  • 8 edits in branches/safari-612.1.12-branch/Source

Versioning.

WebKit-7612.1.12.2

3:49 PM Changeset in webkit [276859] by Kyle Piddington
  • 2 edits in trunk/Tools

Add kpiddington to commiters list
https://bugs.webkit.org/show_bug.cgi?id=225253

Reviewed by Dean Jackson.

  • Scripts/webkitpy/common/config/contributors.json:
3:48 PM Changeset in webkit [276858] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Make small JIT pool tests pass on AS
https://bugs.webkit.org/show_bug.cgi?id=225256

Reviewed by Mark Lam.

If we ask for a JIT pool that is smaller than the smallest possible "region" (thing with jump
island) that we can create -- i.e. smaller than a jump region, then assume that the user is
asking us to create a pool that has that much usable space plus a jump region.

I think that this makes the option easier to use when you're testing ridiculously small JIT
pools, which we happen to do in our test suite.

Also remove some dead options I didn't mean to commit.

  • jit/ExecutableAllocator.cpp:

(JSC::initializeJITPageReservation):

  • runtime/OptionsList.h:
3:25 PM Changeset in webkit [276857] by Russell Epstein
  • 1 copy in tags/Safari-612.1.12.1

Tag Safari-612.1.12.1.

3:24 PM Changeset in webkit [276856] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitcmpy] Better document inner-workings of identifier generation
https://bugs.webkit.org/show_bug.cgi?id=225241

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git.commit):
(Git.find):

  • Scripts/libraries/webkitscmpy/webkitscmpy/local/svn.py:

(Svn.commit):

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/bitbucket.py:

(BitBucket.commit):

  • Scripts/libraries/webkitscmpy/webkitscmpy/remote/git_hub.py:

(GitHub.commit):

2:50 PM Changeset in webkit [276855] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Make the JIT pool smaller on AS
https://bugs.webkit.org/show_bug.cgi?id=225249

Reviewed by Saam Barati.

This adds three related features:

  • Makes it easy to dump where the JIT pool was allocated.
  • Makes it possible to override the JIT pool size with Options even with jump islands.
  • Changes the default JIT pool size on AS to 512MB.

Estimated 2% speed-up on JetStream2, 1.5% speed-up on Speedometer2.

  • jit/ExecutableAllocator.cpp:

(JSC::initializeJITPageReservation):

  • runtime/OptionsList.h:
2:49 PM Changeset in webkit [276854] by Peng Liu
  • 2 edits in trunk/Source/WebKit

ASSERTION FAILED: Unhandled message RemoteRemoteCommandListenerProxy_UpdateSupportedCommands
https://bugs.webkit.org/show_bug.cgi?id=225234

Reviewed by Darin Adler.

We need to keep dispatching (and ignoring) messages for RemoteRemoteCommandListenerProxy
after the object is destroyed. That could happen because other web processes may still have
active RemoteRemoteCommandListener after GPUConnectionToWebProcess::m_remoteRemoteCommandListener
is destroyed.

No new tests. Fix an assertion failure in tests.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::dispatchMessage):

2:30 PM Changeset in webkit [276853] by Wenson Hsieh
  • 31 edits
    2 adds in trunk

[iOS] Add a heuristic to determine whether a synthetic click triggered any meaningful changes
https://bugs.webkit.org/show_bug.cgi?id=225240
rdar://77221196

Reviewed by Tim Horton.

Source/WebCore:

Add plumbing for a ChromeClient hook that's called when a mousedown or mouseup event is either prevented by
the page, or handled with a default event handler on the element (e.g. when clicking a link).

Test: fast/events/ios/did-not-handle-meaningful-click.html

  • page/ChromeClient.h:

(WebCore::ChromeClient::didHandleOrPreventMouseDownOrMouseUpEvent):

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):

Source/WebKit:

Add a simple heuristic to inform WKWebView iOS clients when a tap either failed to result in a synthetic click,
or resulted in a synthetic click that (probably) didn't have any "meaningful side effects". While this notion of
"meaningfulness" isn't well defined, the idea behind the heuristic is that it should distinguish between taps on
clickable elements like buttons or links that trigger some noticable change on the page, vs. taps on both
clickable or non-clickable elements that do not trigger any changes on the page.

For instance on a news-article-like page, this delegate method should be invoked when tapping on paragraph text
in the article, even if there is a click handler over the entire article or even body element. However, tapping
a link or a button on the same page should not cause this delegate method to be invoked. Additionally, if the
page explicitly prevents default behavior during a synthetic mouse event, this method should also *not* be
invoked.

This behavior is roughly similar to the existing delegate method -_webView:didNotHandleTapAsClickAtPoint:,
except that this variant allows for more wiggle room around what constitutes a "meaningful" interaction with the
page.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::didNotHandleTapAsMeaningfulClickAtPoint):

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/API/ios/WKWebViewPrivateForTestingIOS.h:
  • UIProcess/API/ios/WKWebViewTestingIOS.mm:

(-[WKWebView _didNotHandleTapAsMeaningfulClickAtPoint:]):

See Tools/ChangeLog for more details about this testing hook.

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

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::didNotHandleTapAsMeaningfulClickAtPoint):

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::didNotHandleTapAsMeaningfulClickAtPoint):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::didNotHandleTapAsMeaningfulClickAtPoint):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::didHandleOrPreventMouseDownOrMouseUpEvent):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::didHandleOrPreventMouseDownOrMouseUpEvent):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::isProbablyMeaningfulClick):

Implement the core of the heuristic here. For now, it just examines the size of the click target. This isn't
going to satisfy the case where a page installs a click event handler on the body element (or a similar
element that encapsulates most of the page) and then performs hit-testing in their script, but it's somewhere to
start.

(WebKit::WebPage::completeSyntheticClick):
(WebKit::WebPage::attemptSyntheticClick):
(WebKit::WebPage::didHandleOrPreventMouseDownOrMouseUpEvent):
(WebKit::WebPage::handleTwoFingerTapAtPoint):
(WebKit::WebPage::commitPotentialTapFailed):

Tools:

Add test runner plumbing to test the new heuristic. Note that we can't just utilize the WKUIDelegatePrivate
method directly, since we end up overriding the web view's UIClient via WKPageSetPageUIClient, so the call
to m_uiClient->didNotHandleTapAsMeaningfulClickAtPoint(point); ends up being a no-op.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::installDidNotHandleTapAsMeaningfulClickCallback):
(WTR::TestRunner::callDidNotHandleTapAsMeaningfulClickCallback):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::didNotHandleTapAsMeaningfulClick):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didNotHandleTapAsMeaningfulClick):

  • WebKitTestRunner/TestInvocation.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView _didNotHandleTapAsMeaningfulClickAtPoint:]):

LayoutTests:

  • fast/events/ios/did-not-handle-meaningful-click-expected.txt: Added.
  • fast/events/ios/did-not-handle-meaningful-click.html: Added.
2:04 PM Changeset in webkit [276852] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

prefers-reduced-motion is not reactive on iOS
https://bugs.webkit.org/show_bug.cgi?id=222381
<rdar://75933915>

Reviewed by Brent Fulgham.

With CFPrefs direct mode, there is a race between the notification that an accessibility preference has been changed
by the user, and the the in-memory Accessibility preference cache in the WebContent process. We resolve this by using
new SPI to clear the cached Accessibility settings when we are notified of an accessibility change so they always
reflect the user's most recent setting.

  • Platform/spi/Cocoa/AccessibilitySupportSPI.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::setPreferenceValue):

1:17 PM Changeset in webkit [276851] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

_WKWebAuthenticationPanelDelegate registration and assertion SPI doesn't work without an LAContext
https://bugs.webkit.org/show_bug.cgi?id=225218
<rdar://76969220>

Reviewed by Brent Fulgham.

Covered by manual tests.

  • UIProcess/WebAuthentication/Cocoa/LocalConnection.mm:

(WebKit::LocalConnection::verifyUser):
Adds a case for nil LAContext.

12:51 PM Changeset in webkit [276850] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed, reverting r276838.

Caused
TestWebKitAPI.WebKit.AlternativeServicesDefaultDirectoryCreation
to fail

Reverted changeset:

"[Cocoa] Always extend access to local process HTTP/3 cache
directory"
https://bugs.webkit.org/show_bug.cgi?id=225171
https://commits.webkit.org/r276838

12:16 PM Changeset in webkit [276849] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

Unreviewed, reverting r276846.
https://bugs.webkit.org/show_bug.cgi?id=225242

Breaks test execution in GTK and WPE ports

Reverted changeset:

"[webkitpy] Support pickling platforminfo"
https://bugs.webkit.org/show_bug.cgi?id=225230
https://trac.webkit.org/changeset/276846

11:58 AM Changeset in webkit [276848] by magomez@igalia.com
  • 11 edits in trunk

[GTK][WPE] Properly recover from unresponsive web processes
https://bugs.webkit.org/show_bug.cgi?id=224533

Reviewed by Carlos Garcia Campos.

Source/WebKit:

Add a new method to the GLib API to terminate the web process associated to a
WebKitWebView.

  • UIProcess/API/glib/WebKitNavigationClient.cpp:
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_terminate_web_process):

  • UIProcess/API/gtk/WebKitWebView.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/wpe/WebKitWebView.h:
  • UIProcess/API/wpe/docs/wpe-1.0-sections.txt:

Tools:

Add unit tests for the new webkit_web_view_terminate_web_process GLib API method. Also move
the methods used to wait for responsiveness changes to WebViewTest, as they are used by more
than a single test.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(testWebViewIsWebProcessResponsive):
(testWebViewTerminateWebProcess):
(testWebViewTerminateUnresponsiveWebProcess):
(beforeAll):

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:

(isWebProcessResponsiveChanged):
(WebViewTest::waitUntilIsWebProcessResponsiveChanged):

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
11:39 AM Changeset in webkit [276847] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Enforce IOKit filtering
https://bugs.webkit.org/show_bug.cgi?id=223937
<rdar://problem/76271551>

Reviewed by Brent Fulgham.

Enforce IOKit method filtering based on telemetry. This patch also adds IOKit method telemetry for some Apple Silicion
IOKit classes, which were overlooked in the first telemetry phase.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
11:22 AM Changeset in webkit [276846] by Jonathan Bedard
  • 4 edits in trunk/Tools

[webkitpy] Support pickling platforminfo
https://bugs.webkit.org/show_bug.cgi?id=225230
<rdar://problem/77384913>

Reviewed by Stephanie Lewis.

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

(PlatformInfo.init): Define default arguments.
(PlatformInfo.display_name): Use default platform module if platform_module undefined.
(PlatformInfo._win_version_str): Ditto.

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

(TestPlatformInfo.test_real_code):

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

(SystemHost.init): Use default platforminfo sys and platform modules.

11:18 AM Changeset in webkit [276845] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (iOS 14.5): PWA's / Home Screen Apps with Service Workers intermittenly fail to open offline
https://bugs.webkit.org/show_bug.cgi?id=225083
<rdar://problem/77232062>

Reviewed by Alex Christensen.

Manually tested.

  • workers/service/server/SWServerWorker.h:

Initialize m_shouldSkipHandleFetch to false by default.
Otherwise, m_shouldSkipHandleFetch might be used uninitialized during a small amount of time.

11:09 AM Changeset in webkit [276844] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Simplify shouldInvalidateNodeListCachesForAttr() template function
https://bugs.webkit.org/show_bug.cgi?id=225236

Reviewed by Geoffrey Garen.

Simplify shouldInvalidateNodeListCachesForAttr() template function by using if constexpr.

  • dom/Node.cpp:

(WebCore::shouldInvalidateNodeListCachesForAttr):
(WebCore::shouldInvalidateNodeListCachesForAttr<numNodeListInvalidationTypes>): Deleted.

10:29 AM Changeset in webkit [276843] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

report-non-inclusive-language should skip buildstream directory
https://bugs.webkit.org/show_bug.cgi?id=225212

Reviewed by Alexey Proskuryakov.

  • Scripts/report-non-inclusive-language:
10:06 AM Changeset in webkit [276842] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Move ShouldAllowCrossOriginScrolling to RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=225231

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-30
Reviewed by Simon Fraser.

Move ShouldAllowCrossOriginScrolling to RenderLayer.

  • rendering/RenderLayer.h:
  • rendering/RenderObject.h:
9:26 AM Changeset in webkit [276841] by Jonathan Bedard
  • 5 edits in trunk/Tools

[webkitscpy] Support arguments to TaskPool setup and teardown
https://bugs.webkit.org/show_bug.cgi?id=225220
<rdar://problem/77352340>

Reviewed by Dewei Zhu.

  • Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:

(Process.main): Accept setup and teardown arguments to child processes.
(TaskPool.init): Pass setup and teardown arguments to child processes.

  • Scripts/libraries/webkitcorepy/webkitcorepy/tests/task_pool_unittest.py:

(setup): Acception optional argument.
(teardown): Ditto.
(TaskPoolUnittest.test_setup_arguments):
(TaskPoolUnittest.test_teardown_arguments):

9:02 AM Changeset in webkit [276840] by Darin Adler
  • 2 edits in trunk/Source/WTF

Optimize SortedArrayMap by using linear search for small arrays
https://bugs.webkit.org/show_bug.cgi?id=225223

Reviewed by Yusuke Suzuki.

  • wtf/SortedArrayMap.h: Added a base class SortedArrayBase that contains a constant

for the cutoff between linear and binary search. Based on a quick empirical test,
it seems faster to do linear search for arrays that have less then 20 elements.
While doing this also switched from tryBinarySearch to std::find/find_if/lower_bound
because the standard library function templates should be excellent for this purpose,
and there's no reason to use our own. Also filled out the operations for the
ComparableASCIILiteral family so that the "<" operator works in either direction,
since that's needed for compatibility with standard library algorithms.

8:19 AM Changeset in webkit [276839] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore
REGRESSION (r276633): ASSERTION FAILED: !forbidMallocUseScopeCount
disableMallocRestrictionScopeCount under WebCore::AudioSampleDataSource::create()

https://bugs.webkit.org/show_bug.cgi?id=225196
<rdar://problem/77329071>

Reviewed by Eric Carlson.

Covered by API test no longer crashing.

  • Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp:

(WebCore::SpeechRecognitionCaptureSourceImpl::audioSamplesAvailable):
Disabling check here until we figure out a better way of doing things.

8:15 AM Changeset in webkit [276838] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[Cocoa] Always extend access to local process HTTP/3 cache directory
https://bugs.webkit.org/show_bug.cgi?id=225171
<rdar://problem/76287224>

Reviewed by Alex Christensen.

Always pass the cache directory for HTTP/3 use, regardless of the current setting of
the flag. We still pass the flag so that users can turn the feature on and off, so there
is no change in expected behavior. However, certain OS settings can override the user
setting in the browser, so it's helpful to have the path permission for cases where a user
toggles state outside of the browser.

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::platformSetNetworkParameters):

7:24 AM Changeset in webkit [276837] by Oriol Brufau
  • 3 edits
    2 adds in trunk

[css-logical] Fix logical shorthands with var()
https://bugs.webkit.org/show_bug.cgi?id=224594

Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Add a new test.
Some cases still fail because of bug 225206 and bug 225209.

  • web-platform-tests/css/css-logical/logicalprops-with-variables-expected.txt: Added.
  • web-platform-tests/css/css-logical/logicalprops-with-variables.html: Added.

Source/WebCore:

Logical shorthands with var() were not working because when resolving
the pending-substitution value of the equivalent physical longhand,
parseValueWithVariableReferences would parse the logical shorthand into
the logical longhands, which would be different properties than the
physical longhand being resolved.

So this patch compares with the equivalent physical property instead.

Test: imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables.html

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseValueWithVariableReferences):

5:19 AM Changeset in webkit [276836] by Antti Koivisto
  • 12 edits
    2 adds in trunk

Share style resolvers between author shadow trees without style sheets
https://bugs.webkit.org/show_bug.cgi?id=225102

Reviewed by Sam Weinig.

Source/WebCore:

Prepare for sharing style resolvers (and all the related data) between shadow trees beyond
the currently supported user agent shadow trees. This patch refactors the sharing code
and adds support for sharing resolvers for author shadow trees without style sheets.

Test: fast/shadow-dom/style-resolver-sharing.html

  • dom/Document.cpp:

(WebCore::Document::userAgentShadowTreeStyleResolver): Deleted.
(WebCore::Document::didClearStyleResolver): Deleted.

Move the shared UA resolver to Style::Scope.

  • dom/Document.h:
  • style/StyleResolver.h:

(WebCore::Style::Resolver::wasShared const):
(WebCore::Style::Resolver::setWasShared):

Add a bit indicating if a resolver has been shared between shadow trees.

  • style/StyleScope.cpp:

(WebCore::Style::Scope::resolver):
(WebCore::Style::Scope::createDocumentResolver):
(WebCore::Style::Scope::createOrFindSharedShadowTreeResolver):

Factor into a function.
Share user agent shadow tree resolver (as before) and also resolver for empty author shadow trees.

(WebCore::Style::Scope::unshareShadowTreeResolverBeforeMutation):

If we mutate an existing resolver we need to make it unavailable for sharing.

(WebCore::Style::Scope::clearResolver):
(WebCore::Style::Scope::releaseMemory):
(WebCore::Style::Scope::analyzeStyleSheetChange):

If we are about to mutate already shared resolver we need to create a new one.

(WebCore::Style::Scope::updateActiveStyleSheets):

If style sheets change and the resolver is shared always look it up again (since it can't be mutated).

(WebCore::Style::Scope::updateResolver):
(WebCore::Style::Scope::scheduleUpdate):
(WebCore::Style::Scope::insertedInDocument):
(WebCore::Style::Scope::didChangeStyleSheetEnvironment):
(WebCore::Style::Scope::documentScope):
(WebCore::Style::Scope::isForUserAgentShadowTree const):
(WebCore::Style::Scope::shouldUseSharedUserAgentShadowTreeStyleResolver const): Deleted.
(WebCore::Style::Scope::resolverIfExists): Deleted.

  • style/StyleScope.h:

(WebCore::Style::Scope::resolverIfExists):

  • style/StyleScopeRuleSets.h:

(WebCore::Style::ScopeRuleSets::setIsForShadowScope): Deleted.
(WebCore::Internals::dumpStyleResolvers):

  • testing/Internals.h:
  • testing/Internals.idl:

Testing support.

LayoutTests:

  • fast/shadow-dom/style-resolver-sharing-expected.txt: Added.
  • fast/shadow-dom/style-resolver-sharing.html: Added.
4:46 AM Changeset in webkit [276835] by svillar@igalia.com
  • 5 edits
    2 adds in trunk

Nullopt in RenderFlexibleBox::layoutFlexItems in RenderFlexibleBox::layoutBlock via RenderMultiColumnFlow::layout
https://bugs.webkit.org/show_bug.cgi?id=223369

Reviewed by Alan Bujtas.

LayoutTests/imported/w3c:

Imported a test from WPT covering this issue.

  • web-platform-tests/css/css-flexbox/percentage-padding-002-expected.html: Added.
  • web-platform-tests/css/css-flexbox/percentage-padding-002.html: Added.
  • web-platform-tests/css/css-flexbox/w3c-import.log:

Source/WebCore:

When computing the main axis extent of a flex item being the main axis also the child's inline axis and the
inline size of the child is auto, we can directly use the min/maxPreferredLogicalWidths instead of having
to call computeLogicalWidthInFragmentUsing(). However we cannot use it straigth away without checking
needsPreferredWidthsRecalculation() first, otherwise the cached preferred width might be no longer valid.
The cached preferred width includes both border and padding. If any of those are percentages, and thus
depend on the size of the containing block, we could end up using obsolete values.

This was making us hit an assertion because the content size suggestion was negative. That's because in order
to compute the content size we were substracting the current borderAndPadding() to the value returned by
minPreferredLogicalWidth(). But the current borderAndPadding() might be larger than the one used to compute the
preferred width before (they must be the same to properly extract the content size) so the content size ended
up being negative.

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): Constness adjustments.
(WebCore::RenderFlexibleBox::resolveFlexibleLengths): Ditto.

  • rendering/RenderFlexibleBox.h:
12:18 AM Changeset in webkit [276834] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers lambda should check its player is alive
https://bugs.webkit.org/show_bug.cgi?id=225186
<rdar://77267681>

Reviewed by Eric Carlson.

Make sure to check weakThis.
Move the meat of the lambda in a method as a small improvement refactoring.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layersAreInitialized):

Apr 29, 2021:

11:31 PM Changeset in webkit [276833] by Russell Epstein
  • 8 edits in branches/safari-612.1.12-branch/Source

Versioning.

WebKit-7612.1.12.1

11:00 PM Changeset in webkit [276832] by Russell Epstein
  • 8 edits in branches/safari-611.2.7.1-branch/Source

Versioning.

WebKit-7611.2.7.1.2

9:54 PM Changeset in webkit [276831] by Russell Epstein
  • 8 edits in branches/safari-611.1.21.0-branch/Source

Versioning.

WebKit-7611.1.21.0.15

9:44 PM Changeset in webkit [276830] by Russell Epstein
  • 8 edits in branches/safari-611.1.21.161-branch/Source

Versioning.

WebKit-7611.1.21.161.7

7:06 PM Changeset in webkit [276829] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[macOS-wk2] LayoutTest/http/tests/websocket/tests/hybi/inspector/binary.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=171553

Unreviewed test gardening.

Removing expectation as test no longer appears flakey.

  • platform/mac-wk2/TestExpectations:
7:04 PM Changeset in webkit [276828] by Jean-Yves Avenard
  • 7 edits in trunk/Source/WebCore

Adopt AVSampleBufferAudioRendererWasFlushedAutomaticallyNotification
https://bugs.webkit.org/show_bug.cgi?id=225170
Source/WebCore:

rdar://77086915

Reviewed by Eric Carlson.

When the AVSampleBufferAudioRendererWasFlushedAutomaticallyNotification is received, the SourceBuffer will now
re-enqueue all audio frames from currentTime.
The handling of AVSampleBufferAudioRendererWasFlushedAutomaticallyNotification is currently broken in AVFoundation.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: Add missing #include
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(-[WebAVSampleBufferErrorListener beginObservingRenderer:]): Add listener
(-[WebAVSampleBufferErrorListener stopObservingRenderer:]): Remove listener
(-[WebAVSampleBufferErrorListener audioRendererWasAutomaticallyFlushed:]):
(WebCore::SourceBufferPrivateAVFObjC::rendererWasAutomaticallyFlushed):

Source/WebCore/PAL:

Reviewed by Eric Carlson.

  • pal/cocoa/AVFoundationSoftLink.h: Add AVSampleBufferAudioRendererWasFlushedAutomaticallyNotification and its related key
  • pal/cocoa/AVFoundationSoftLink.mm:
6:42 PM Changeset in webkit [276827] by Jean-Yves Avenard
  • 3 edits in trunk/Source/WebCore

https://bugs.webkit.org/show_bug.cgi?id=225183
rdar://77251937

Reviewed by Eric Carlson.

Under some circumstances, the decoded image may end up being empty. We need to handle this case.

  • Modules/mediasession/MediaMetadata.cpp:

(WebCore::MediaMetadata::refreshArtworkImage): Exit early if image is empty.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::nowPlayingInfo const): Add assert to clarify code

6:17 PM Changeset in webkit [276826] by Megan Gardner
  • 3 edits in trunk/Source/WebKit

Remove some unneeded code.
https://bugs.webkit.org/show_bug.cgi?id=225216

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setUpAppHighlightMenusIfNeeded]): Deleted.

5:22 PM Changeset in webkit [276825] by commit-queue@webkit.org
  • 3 edits in trunk/Source/ThirdParty/ANGLE

Metal-ANGLE: Shared memory texture tests failing in iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=222685
<rdar://75001722>

Using replaceRegion to perform texture uploads on simulator causes issues on some workflows.
As a workaround, use a GPU-driven upload instead of a CPU driven upload.
Patch by Kyle Piddington <Kyle Piddington> on 2021-04-29
Reviewed by Kenneth Russell.

  • src/libANGLE/renderer/metal/TextureMtl.mm:
5:20 PM Changeset in webkit [276824] by Peng Liu
  • 2 edits in trunk/Source/WebKit

AVAudioSession throws an exception when WebKit tries to set its routeSharingPolicy to "independent"
https://bugs.webkit.org/show_bug.cgi?id=225213

Reviewed by Jer Noble.

AVAudioSession does not expect WebKit to set its routeSharingPolicy
to AVAudioSessionRouteSharingPolicyIndependent(RouteSharingPolicy::Independent).

  • GPUProcess/media/RemoteAudioSessionProxyManager.cpp:

(WebKit::RemoteAudioSessionProxyManager::updateCategory):

5:12 PM Changeset in webkit [276823] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Inlining property accesses inside constant folding should check Options::useAccessInlining
https://bugs.webkit.org/show_bug.cgi?id=225194

Reviewed by Mark Lam.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGConstantFoldingPhase.cpp:

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

4:44 PM Changeset in webkit [276822] by Aditya Keerthi
  • 8 edits in trunk/LayoutTests

REGRESSION: [iOS] 6 media/modern-media-controls/tracks-support/ tests timing out
https://bugs.webkit.org/show_bug.cgi?id=225202
<rdar://problem/77041631>

Reviewed by Devin Rousso.

The six tests modified in this patch were failing for two reasons:

  1. The media controls logic was modified to hide certain controls at

smaller widths. To ensure the tracks button was visible, the width
of the <video> element was increased. However, on iOS, this led to the
tracks button being positioned outside the viewport. Consequently, any
attempts to tap the button and wait for a context menu to show up
would fail, causing the tests to timeout waiting for a context menu.

To fix (1), call Element.scrollIntoViewIfNeeded before attempting to
tap on the tracks button, ensuring it is visible in the viewport. Then,
use window coordinates to tap at the right position. To ensure the
viewport is actually scrollable on iOS, "useFlexibleViewport" and the
viewport meta tag were added to failing tests.

  1. Even after fixing (1), the tests continued to timeout. Note that

both the pressOnElement() and getTracksContextMenu() helper methods
in "media-controls-utils.js" call into UIScriptController, and are
called in succession in the failing tests. Both methods add callbacks
to the test runner. However, pressOnElement() is not an async method,
which lead to getTracksContextMenu() getting called before the tap
actually completed. UIScriptController clears all callbacks after one
callback completes, so when the tap callback was completed, the context
menu callback was removed. Then, the tests get stuck waiting on the
context menu callback to get invoked.

To fix (2), make pressOnElement() return a promise if a continuation
function is not provided. Then, getTracksContextMenu() can be called
after the promise is resolved.

  • media/modern-media-controls/resources/media-controls-utils.js:

(pressOnElement):

  • media/modern-media-controls/tracks-support/auto-text-track.html:
  • media/modern-media-controls/tracks-support/click-track-in-contextmenu.html:
  • media/modern-media-controls/tracks-support/hidden-tracks.html:
  • media/modern-media-controls/tracks-support/off-text-track.html:
  • media/modern-media-controls/tracks-support/show-contextmenu-then-double-click-on-tracks-button.html:
  • media/modern-media-controls/tracks-support/text-track-selected-via-media-api.html:
4:41 PM Changeset in webkit [276821] by Brent Fulgham
  • 5 edits in trunk/Source/WebKit

[iOS] Remove unused logd-diagnostic-client rules
https://bugs.webkit.org/show_bug.cgi?id=225214
<rdar://problem/66587621>

Reviewed by Per Arne Vollan.

WebKit does not have either of the two entitlements required to use the 'log-diagnostic-client' rules.
We should remove these rules from the sandbox to reduce attack surface, since they provide no benefit.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebAuthn.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
4:35 PM Changeset in webkit [276820] by commit-queue@webkit.org
  • 39 edits in trunk

[ANGLE-Metal] Fix 17 textureshadow tests
https://bugs.webkit.org/show_bug.cgi?id=224965
<rdar://77053085>

Depth24Stencil8 copies were being incorrectly managed when dealing with D24S8 emulation.
Fix conversion functions

Patch by Kyle Piddington <Kyle Piddington> on 2021-04-29
Reviewed by Dean Jackson.

  • src/libANGLE/renderer/metal/mtl_format_utils.h:
  • src/libANGLE/renderer/metal/mtl_format_utils.mm:

(rx::mtl::priv::OffsetDataPointer):
(rx::mtl::LoadS8D24S8ToD32FX24S8):
(rx::mtl::DEPTH24_STENCIL8_to_D32_FLOAT_X24S8_UINT):
(rx::mtl::GetLoadFunctionsMap):
(rx::mtl::FormatTable::initialize):
(): Deleted.

3:52 PM Changeset in webkit [276819] by Russell Epstein
  • 1 copy in tags/Safari-611.2.7

Tag Safari-611.2.7.

3:45 PM Changeset in webkit [276818] by Russell Epstein
  • 1 copy in tags/Safari-611.2.7.1.1

Tag Safari-611.2.7.1.1.

3:43 PM Changeset in webkit [276817] by Russell Epstein
  • 2 edits in branches/safari-611.2.7.1-branch/Source/WebKit

Cherry-pick r276618. rdar://problem/77326484

Handle warning-level memory notifications more aggressively
https://bugs.webkit.org/show_bug.cgi?id=225008

Reviewed by Chris Dumez.

We've found that in some workloads, the critical-level memory pressure handler releases
significantly more memory than the warning-level memory pressure handler. On Macs, it is
likely that the memory pressure coincides with swapping. So when we get even a warning-level
notification from the OS, we should err on the side of releasing more memory to help relieve
the swapping state. To do this, treat warning level notifications the same as critical level
notifications on Mac if the WebProcess is in the background.

  • WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess):

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

3:43 PM Changeset in webkit [276816] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Floating object are not removed from the initial containing block
https://bugs.webkit.org/show_bug.cgi?id=225198
<rdar://77236776>

Reviewed by Antti Koivisto.

Source/WebCore:

outermostBlockContainingFloatingObject is supposed to find the top most ancestor for an intruding float. Now when the <html> is float positioned,
the initial containing block (RenderView) is the outermost containing block that has reference to this float (see FloatingObject).
removeFloatingOrPositionedChildFromBlockLists() calls outermostBlockContainingFloatingObject() to get the top most renderer where the float cleanup
is supposed to be initiated at. We call this function during style and tree mutation.
These float lists are getting invalidated during layout as well, with a simple call to m_floatingObjects->clear(). It unconditionally takes care of all the floats including
the ones on the initial containing block.
The bug only shows when we try to access the floating list between the style/tree mutation and the subsequent layout.

Test: fast/block/fail-to-remove-float-from-initial-containing-block.html

  • rendering/RenderBox.cpp:

(WebCore::outermostBlockContainingFloatingObject):

LayoutTests:

  • fast/block/fail-to-remove-float-from-initial-containing-block-expected.txt: Added.
  • fast/block/fail-to-remove-float-from-initial-containing-block.html: Added.
3:42 PM Changeset in webkit [276815] by Russell Epstein
  • 8 edits in branches/safari-611.2.7.1-branch/Source

Versioning.

WebKit-7611.2.7.1.1

3:38 PM Changeset in webkit [276814] by Russell Epstein
  • 1 copy in tags/Safari-611.2.7.0.1

Tag Safari-611.2.7.0.1.

3:34 PM Changeset in webkit [276813] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

-Wpessimizing-move warnings in LocaleICU.cpp
https://bugs.webkit.org/show_bug.cgi?id=225205

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-29
Reviewed by Sam Weinig.

  • platform/text/LocaleICU.cpp:

(WebCore::LocaleICU::createLabelVector):
(WebCore::createFallbackMonthLabels):
(WebCore::createFallbackAMPMLabels):

3:32 PM Changeset in webkit [276812] by Russell Epstein
  • 4 edits in branches/safari-611.2.7.0-branch/Source

Cherry-pick r276742. rdar://problem/77326513

[iOS] Web content process occasionally crashes under VisibleSelection::adjustPositionForEnd
https://bugs.webkit.org/show_bug.cgi?id=225072
rdar://77159489

Reviewed by Darin Adler.

Source/WebCore:

Remove a helper method that was added in r276688, which we no longer need.

  • dom/Position.h: (WebCore::Position::isInTreeScope const): Deleted.

Source/WebKit:

The fix for this crash that I landed in r276688 was based on a misunderstanding that accessing treeScope()
would trigger a null pointer deref if isInTreeScope() is false. This is not the case, since the treeScope
of a Node is a separate notion from whether that Node is connected to said tree scope.

Since this crash is really due to dereferencing a null container node in the case where selectionStart or
selectionEnd are null, a better fix is to just check the nullity of the container node.

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::rangeForPointInRootViewCoordinates):

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

3:32 PM Changeset in webkit [276811] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-611.2.7.0-branch

Cherry-pick r276688. rdar://problem/77326513

[iOS] Web content process occasionally crashes under VisibleSelection::adjustPositionForEnd
https://bugs.webkit.org/show_bug.cgi?id=225072
rdar://77159489

Reviewed by Darin Adler.

Source/WebCore:

Add a helper method to check whether or not the given Position is in a tree scope. See WebKit/ChangeLog for
more details.

Test: editing/selection/ios/clear-selection-while-moving-selection-handles.html

  • dom/Position.h: (WebCore::Position::isInTreeScope const):

Source/WebKit:

Make rangeForPointInRootViewCoordinates robust in the case where the original selection may have become
orphaned or null, by checking that the targetNode and existing selectionStart or selectionEnd are in a
tree scope before accessing treeScope().

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::rangeForPointInRootViewCoordinates):

LayoutTests:

Add a layout test that programmatically clears the selection in the middle of changing it by moving selection
handles.

  • editing/selection/ios/clear-selection-while-moving-selection-handles-expected.txt: Added.
  • editing/selection/ios/clear-selection-while-moving-selection-handles.html: Added.

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

3:30 PM Changeset in webkit [276810] by Russell Epstein
  • 8 edits in branches/safari-611.2.7.0-branch/Source

Versioning.

WebKit-7611.2.7.0.1

3:25 PM Changeset in webkit [276809] by Russell Epstein
  • 1 copy in branches/safari-611.2.7.1-branch

New branch.

3:25 PM Changeset in webkit [276808] by Russell Epstein
  • 1 copy in branches/safari-611.2.7.0-branch

New branch.

3:18 PM Changeset in webkit [276807] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Revert "Cherry-pick r276618. rdar://problem/77326484"

This reverts commit r276782.

3:18 PM Changeset in webkit [276806] by Russell Epstein
  • 5 edits
    2 deletes in branches/safari-611-branch

Revert "Cherry-pick r276688. rdar://problem/77326513"

This reverts commit r276783.

3:18 PM Changeset in webkit [276805] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source

Revert "Cherry-pick r276742. rdar://problem/77326513"

This reverts commit r276784.

3:09 PM Changeset in webkit [276804] by Alexey Shvayka
  • 8 edits in trunk/Source/WebCore

[WebIDL] Remove [Reflect] support for constants
https://bugs.webkit.org/show_bug.cgi?id=225119

Reviewed by Sam Weinig.

While reflection of content attributes [1] is a well-known concept, using [Reflect] for
constants doesn't make much sense (as there is no HTML attribute involved) and introduces
conflicting semantics for its value: C++ enum identifier vs. HTML attribute name.

[ImplementedAs] extended attribute is a perfect fit for customizing C++ identifier;
this change expands it to constants. Using ERROR as enum identifier still breaks
Windows build due to #define conflict.

No new tests, no behavior change.

[1] https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflecting-content-attributes-in-idl-attributes

  • bindings/scripts/CodeGenerator.pm:

(GenerateCompileTimeCheckForEnumsIfNeeded):

  • bindings/scripts/IDLAttributes.json:
  • bindings/scripts/test/*: Updated.
  • html/HTMLTrackElement.idl:
2:56 PM Changeset in webkit [276803] by Aditya Keerthi
  • 2 edits in trunk/Source/WebCore

REGRESSION (r275431): [iOS] fast/events/touch/ios/mouse-events-dispatch-with-touch.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=225208
<rdar://problem/77042369>

Reviewed by Devin Rousso.

  • page/Quirks.cpp:

(WebCore::Quirks::simulatedMouseEventTypeForTarget const):

Remove the !needsQuirks() check added in r275431 to restore the
original test behavior.

Note that the test overrides MouseEventsSimulationEnabled, which
forces Quirks::shouldDispatchSimulatedMouseEvents to return true
regardless of !needsQuirks(). Furthermore, NeedsSiteSpecificQuirks
defaults to false in WebCore.

This change is safe, since shouldDispatchSimulatedMouseEvents still
checks !needsQuirks() when MouseEventsSimulationEnabled is false.

2:07 PM Changeset in webkit [276802] by Aditya Keerthi
  • 2 edits in trunk/LayoutTests

REGRESSION: media/modern-media-controls/media-controller/ios/media-controller-ios-do-not-hide-controls-when-tapping-button.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=225163
<rdar://problem/77041676>

Reviewed by Devin Rousso.

  • media/modern-media-controls/media-controller/ios/media-controller-ios-do-not-hide-controls-when-tapping-button.html:

Increase the width of the <video> element to ensure that the skip back
button is visible. The button is no longer visible at smaller widths,
and is unable to be tapped, causing the test to timeout.

1:21 PM Changeset in webkit [276801] by Russell Epstein
  • 1 copy in tags/Safari-612.1.12

Tag Safari-612.1.12.

1:21 PM Changeset in webkit [276800] by Russell Epstein
  • 1 delete in tags/Safari-612.1.12

Delete tag.

1:21 PM Changeset in webkit [276799] by Peng Liu
  • 4 edits
    2 adds in trunk

[GPUP] Two message loops between WebContent process and GPU process to enable/select audio/video tracks
https://bugs.webkit.org/show_bug.cgi?id=225193

Reviewed by Eric Carlson.

Source/WebKit:

The current implementation has two message loops between Web process
and GPU process related to enable/select audio/video tracks.

For audio, the message loop is:
Web Process -> GPU process: RemoteMediaPlayerProxy::audioTrackSetEnabled
GPU Process -> Web Process: MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged

The message loop will lead to the following function call loop:

AudioTrackPrivateRemote::updateConfiguration()
AudioTrackPrivateRemote::setEnabled()
RemoteMediaPlayerProxy::audioTrackSetEnabled()
RemoteAudioTrackProxy::setEnabled()
AudioTrackPrivateAVFObjC::setEnabled()
AudioTrackPrivate::setEnabled()
RemoteAudioTrackProxy::enabledChanged()
RemoteAudioTrackProxy::configurationChanged()
MediaPlayerPrivateRemote::remoteAudioTrackConfigurationChanged()
again, AudioTrackPrivateRemote::updateConfiguration(), and repeat ...

The loop for video tracks is similar.

The loop is bad but normally does not impact a media player's functionality.

However, if a page disables and enables an audio track of a media element with HLS stream
in one run loop, the loop will disable and enable the track repeatedly, as a result,
CoreMedia's HLS player will disable/enable audio segments and send/cancel download
requests repeatedly. Eventually the player won't play audio.

This patch fixes these two message loops.

Test: media/media-video-audio-track.html

  • WebProcess/GPU/media/AudioTrackPrivateRemote.cpp:

(WebKit::AudioTrackPrivateRemote::updateConfiguration):

  • WebProcess/GPU/media/VideoTrackPrivateRemote.cpp:

(WebKit::VideoTrackPrivateRemote::updateConfiguration):

LayoutTests:

  • media/media-video-audio-track-expected.txt: Added.
  • media/media-video-audio-track.html: Added.
1:15 PM Changeset in webkit [276798] by Ruben Turcios
  • 1 copy in tags/Safari-612.1.12

Tag Safari-612.1.12.

1:14 PM Changeset in webkit [276797] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Make URLSchemeTask destruction more straightforward
https://bugs.webkit.org/show_bug.cgi?id=225195
<rdar://77310818>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-29
Reviewed by Chris Dumez.

There's a seemingly-new crash in the lambda of WebURLSchemeHandlerCocoa::platformTaskCompleted
That labmda doesn't need to exist. We should do our object destruction like the rest of our objects.

  • UIProcess/API/Cocoa/WKURLSchemeTask.mm:

(-[WKURLSchemeTaskImpl dealloc]):

  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:

(WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted):

1:00 PM Changeset in webkit [276796] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix crashloop after r276744
<rdar://problem/77333886>

  • dom/Document.cpp:

(WebCore::Document::determineSampledPageTopColor):
Don't attempt to get the value from the Optional<Lab<float>> unless we know for sure that
it's valid. This amounts to always making sure we either continue (or return if that
snapshot is not an outlier) instead of only doing it if the snapshot is an outlier.

12:17 PM Changeset in webkit [276795] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r276167 - [PlayStation][OpenSSL] Remove warnings.
https://bugs.webkit.org/show_bug.cgi?id=224630

Reviewed by Don Olmstead.

There're two kinds of warnings in curl and openssl layer in our platform.

a) Unused param

b) 'WORDSIZE' is not defined.
warning: '
WORDSIZE' is not defined, evaluates to 0 [-Wundef]

No new tests because it's only for compilation issue.

  • crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:

(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):

  • crypto/openssl/CryptoKeyECOpenSSL.cpp:

(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformImportPkcs8):

  • crypto/openssl/CryptoKeyRSAOpenSSL.cpp:

(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):

12:16 PM Changeset in webkit [276794] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r276192 - Use WebKit macro to detect 64bit in RenderLayerBacking.h
https://bugs.webkit.org/show_bug.cgi?id=224707

Reviewed by Yusuke Suzuki.

There's no definition of WORDSIZE in some environment. Also there's WebKit macro for that.

warning: 'WORDSIZE' is not defined, evaluates to 0 [-Wundef]
#if
WORDSIZE == 64 && PLATFORM(COCOA)


No test because it's compiler behavior.

  • rendering/RenderLayerBacking.h:
12:16 PM Changeset in webkit [276793] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebKit

Merge r274417 - [GLIB] Be more selective about bublewrapping libdirs
https://bugs.webkit.org/show_bug.cgi?id=221709

Patch by Daniel Kolesa <Daniel Kolesa> on 2021-03-15
Reviewed by Carlos Garcia Campos.

On 32-bit systems, bubblewrap lib32 instead of lib64. This unbreaks
sandbox on some distributions that have lib32 (which glibc defaults
its ld cache lookups to) but configure default libdir to lib rather
than lib32.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bubblewrapSpawn):

12:16 PM Changeset in webkit [276792] by Adrian Perez de Castro
  • 5 edits in releases/WebKitGTK/webkit-2.32/Source

Merge r276695 - [WPE][GTK] More correct fixes for stack size issues on musl libc
https://bugs.webkit.org/show_bug.cgi?id=225099

Patch by Daniel Kolesa <Daniel Kolesa> on 2021-04-28
Reviewed by Adrian Perez de Castro.

Partial revert https://bugs.webkit.org/show_bug.cgi?id=210068

Source/JavaScriptCore:

After fixing the thread stack issues in WTF properly, we can revert
the JSC options changes, which are actually harmful since they result
in JSC being unstable. Previously, softReservedZoneSize was causing a
crash when set to 128K because of the main thread stack bounds, and
this is now fixed. We can keep the maxPerThreadStackUsage at 5M as
well; there is no fundamental difference from how things are done on
glibc anymore.

  • runtime/OptionsList.h:

Source/WTF:

While the changes in r236306 stopped JSC from crashing outright,
they are not correct, since they also make it rather unstable.

To counter this, increase stack size for threads on Linux with
non-glibc/bionic libcs to 1 megabyte, which is a robust enough
value that should always be sufficient.

While at it, the previous approach to musl thread stack size was
breaking use of DEFAULT_THREAD_STACK_SIZE_IN_KB (if defined) as
well as not properly taking care of the unused parameter. Move
the code to a more appropriate place, which solves these problems.

All this is however not enough, since there is still the main thread;
using pthread_attr_getstack on a main thread is not reliable since main
thread stacks are allowed to grow, and we expect the bounds to always
be constant. On glibc, this already behaved right, but e.g. on musl
(and possibly other C libraries) this is not necessarily the case - at
the point of the check, it was returning 128k (since that's the initial
size reserved by the kernel). Therefore, do the same thing as on Darwin
and use process resource limits to get the boundary on Linux as well.

This results in JavaScriptCore behaving correctly on musl libc and
allows us to drop the options special-casing that was in place.

  • wtf/StackBounds.cpp:

(WTF::StackBounds::currentThreadStackBoundsInternal):

  • wtf/Threading.cpp:

(WTF::stackSize):

12:16 PM Changeset in webkit [276791] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r276492 - Do not set synchronous scrolling for layers without relevant scrolling scopes
https://bugs.webkit.org/show_bug.cgi?id=221383

Reviewed by Simon Fraser.

Fixed backgrounds could force the layer compositor to set synchronous scrolling because they're slow
to repaint. However that cannot be done if the layer's boxScrollingScope hasn't been previously updated
in RenderLayer::updateLayerPosition.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateSynchronousScrollingNodes): Do not call
setSynchronousScrollingReasons() if there is no scrollingScope.

12:16 PM Changeset in webkit [276790] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r276426 - REGRESSION(r275790) [GTK][WPE] Scrolling rendering fails after the second page
https://bugs.webkit.org/show_bug.cgi?id=224824

Patch by Alejandro G. Castro <alex@igalia.com> on 2021-04-22
Reviewed by Simon Fraser.

We are making the implementation more similar to the Apple
scrolling coordinator. Now we reimplement willStartRenderingUpdate
to be able to synchronize the state there. That way we can avoid
the timer and just schedule a rendering update when we want to
commit the tree state.

Test: Fixes the timeout of the overflow-scrollable-after-back.html,
added in the regression.

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:

(WebCore::ScrollingCoordinatorNicosia::ScrollingCoordinatorNicosia):
(WebCore::ScrollingCoordinatorNicosia::pageDestroyed):
(WebCore::ScrollingCoordinatorNicosia::commitTreeStateIfNeeded):
(WebCore::ScrollingCoordinatorNicosia::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorNicosia::willStartRenderingUpdate):
(WebCore::ScrollingCoordinatorNicosia::commitTreeState): Deleted.

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.h:
12:16 PM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
12:16 PM Changeset in webkit [276789] by Adrian Perez de Castro
  • 6 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r275790 - scrollingTreeNodeDidScroll() should just trigger a rendering udpate
https://bugs.webkit.org/show_bug.cgi?id=224394

Reviewed by Tim Horton.

After handling wheel events on the scrolling thread,
ThreadedScrollingTree::scrollingTreeNodeDidScroll() appends to a queue of pending updates
and then triggers applyPendingScrollUpdates() on the main thread to process those updates.
However, every rendering update also processes pending scroll updates via
synchronizeStateFromScrollingTree(), so it's simpler if we just trigger a rendering update.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollingThreadAddedPendingUpdate):
(WebCore::AsyncScrollingCoordinator::scheduleRenderingUpdate):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):

  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:

(WebCore::ScrollingCoordinatorNicosia::scheduleTreeStateCommit):

12:01 PM Changeset in webkit [276788] by Ben Nham
  • 5 edits in trunk/Source

Reduce memory footprint for background tabs
https://bugs.webkit.org/show_bug.cgi?id=225007

Reviewed by Chris Dumez.

Source/WebKit:

When a WebContent process contains only non-visible pages (e.g. if it is a background tab),
we should attempt to reduce our memory footprint after some time interval to help relieve
system-wide memory pressure. This is enabled only on Mac because iOS already does something
similar just before WebContent suspends.

One exception to this is that we don't do this proactive slimming for processes that are in
the back/forward cache or in the WebProcess cache. This is because dropping the memory cache
in those types of processes leads to perf regressions in benchmarks that do certain types of
cross-origin navigations. We'll use a separate mechanism for controlling the memory usage of
those processes; our current logic keeps those processes around until we are at the warning
or critical memory pressure level.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::pageDidEnterWindow):
(WebKit::WebProcess::pageWillLeaveWindow):
(WebKit::WebProcess::nonVisibleProcessGraphicsCleanupTimerFired):
(WebKit::WebProcess::nonVisibleProcessMemoryCleanupTimerFired):
(WebKit::WebProcess::nonVisibleProcessCleanupTimerFired): Deleted.

  • WebProcess/WebProcess.h:

Source/WTF:

Add an option to slim background tabs by proactively calling WebCore::releaseMemory on Macs.

  • wtf/PlatformEnableCocoa.h:
11:59 AM Changeset in webkit [276787] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Reduce logging for uninteresting sandbox violations
https://bugs.webkit.org/show_bug.cgi?id=225197
<rdar://problem/77321299>

Reviewed by Per Arne Vollan.

CFPreferences needs to read from .GlobalPreferences.plist and .GlobalPreferences_m.plist on iOS, just like it
does on macOS. We should unblock these so we stop getting useless telemetry about the violations, and avoid
preference problems on iOS.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
10:42 AM Changeset in webkit [276786] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Sampling profiler should dump a tier breakdown, and add ability to see time spent in C code with sampleCCode=0, and fix bugs with frames having the wrong jitType if they're inlined
https://bugs.webkit.org/show_bug.cgi?id=225116

Reviewed by Yusuke Suzuki.

This patch makes it so we also dump time spent in each tier when dumping top
bytecodes. This can be helpful info when analyzing benchmarks.

This patch also makes it so we know when we're in C/C++ code when we're not
using the sampleCCode=true option. I found some weird performance pathologies
with that option that cause us to not sample code at all. I was seeing ~50
samples taken for ~7 seconds of code running time. It's worth figuring out
what's going on there eventually. But for now, I've made it so that we
recognize that the top frame is C/C++ when using the collectExtraSamplingProfilerData=1
option.

This patch also fixes a bug where we mis-attribute JITTypes for inline
frames. We'd attribute it to whatever the CodeBlock was compiled as, instead
of using the machine frame's JITType.

  • jsc.cpp:

(CommandLine::parseArguments):

  • runtime/OptionsList.h:
  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::processUnverifiedStackTraces):
(JSC::SamplingProfiler::StackFrame::displayName):
(JSC::SamplingProfiler::reportTopBytecodes):

10:16 AM Changeset in webkit [276785] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/ThirdParty/libwebrtc/Source/third_party/boringssl/src

Apply patch. rdar://problem/76374163

10:13 AM Changeset in webkit [276784] by Russell Epstein
  • 4 edits in branches/safari-611-branch/Source

Cherry-pick r276742. rdar://problem/77326513

[iOS] Web content process occasionally crashes under VisibleSelection::adjustPositionForEnd
https://bugs.webkit.org/show_bug.cgi?id=225072
rdar://77159489

Reviewed by Darin Adler.

Source/WebCore:

Remove a helper method that was added in r276688, which we no longer need.

  • dom/Position.h: (WebCore::Position::isInTreeScope const): Deleted.

Source/WebKit:

The fix for this crash that I landed in r276688 was based on a misunderstanding that accessing treeScope()
would trigger a null pointer deref if isInTreeScope() is false. This is not the case, since the treeScope
of a Node is a separate notion from whether that Node is connected to said tree scope.

Since this crash is really due to dereferencing a null container node in the case where selectionStart or
selectionEnd are null, a better fix is to just check the nullity of the container node.

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::rangeForPointInRootViewCoordinates):

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

10:12 AM Changeset in webkit [276783] by Russell Epstein
  • 5 edits
    2 adds in branches/safari-611-branch

Cherry-pick r276688. rdar://problem/77326513

[iOS] Web content process occasionally crashes under VisibleSelection::adjustPositionForEnd
https://bugs.webkit.org/show_bug.cgi?id=225072
rdar://77159489

Reviewed by Darin Adler.

Source/WebCore:

Add a helper method to check whether or not the given Position is in a tree scope. See WebKit/ChangeLog for
more details.

Test: editing/selection/ios/clear-selection-while-moving-selection-handles.html

  • dom/Position.h: (WebCore::Position::isInTreeScope const):

Source/WebKit:

Make rangeForPointInRootViewCoordinates robust in the case where the original selection may have become
orphaned or null, by checking that the targetNode and existing selectionStart or selectionEnd are in a
tree scope before accessing treeScope().

  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::rangeForPointInRootViewCoordinates):

LayoutTests:

Add a layout test that programmatically clears the selection in the middle of changing it by moving selection
handles.

  • editing/selection/ios/clear-selection-while-moving-selection-handles-expected.txt: Added.
  • editing/selection/ios/clear-selection-while-moving-selection-handles.html: Added.

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

10:12 AM Changeset in webkit [276782] by Russell Epstein
  • 2 edits in branches/safari-611-branch/Source/WebKit

Cherry-pick r276618. rdar://problem/77326484

Handle warning-level memory notifications more aggressively
https://bugs.webkit.org/show_bug.cgi?id=225008

Reviewed by Chris Dumez.

We've found that in some workloads, the critical-level memory pressure handler releases
significantly more memory than the warning-level memory pressure handler. On Macs, it is
likely that the memory pressure coincides with swapping. So when we get even a warning-level
notification from the OS, we should err on the side of releasing more memory to help relieve
the swapping state. To do this, treat warning level notifications the same as critical level
notifications on Mac if the WebProcess is in the background.

  • WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess):

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

9:59 AM Changeset in webkit [276781] by Russell Epstein
  • 8 edits in branches/safari-611-branch/Source

Versioning.

WebKit-7611.2.7

9:39 AM Changeset in webkit [276780] by Darin Adler
  • 17 edits
    1 add in trunk

Extend SortedArrayMap further to work on case-folded strings, use in MIMETypeRegistry
https://bugs.webkit.org/show_bug.cgi?id=224968

Reviewed by Sam Weinig.

Source/WebCore:

Using fewer HashSet in MIMETypeRegistry saves code size and reduces memory use.

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::supportedImageMIMETypes): Deleted. Replaced
this function with a constexpr array, eliminating the use of HashSet.
(WebCore::makeFixedVector): Added. Helper function used below for the repeated patttern
of converting a constexpr array into a FixedVector<const char*>.
(WebCore::supportedJavaScriptMIMETypes): Deleted.
(WebCore::MIMETypeRegistry::supportedNonImageMIMETypes): Update since
supportedJavaScriptMIMETypeArray is now an array, not a HashSet.
(WebCore::MIMETypeRegistry::pdfMIMETypes): Rewrote to return a FixedVector<const char*>
instead of a HashSet. The only caller makes an NSArray<NSString *>, so there is no need
to involve a hash table or a WTF::String.
(WebCore::MIMETypeRegistry::unsupportedTextMIMETypes): Ditto.
(WebCore::commonMediaTypes): Deleted, merging into the function below.
(WebCore::commonMimeTypesMap): Moved the commonMediaTypes data in here
and use a constexpr array instead of an initializer_list.
(WebCore::MIMETypeRegistry::isSupportedImageMIMEType): Use SortedArraySet
instead of a HashSet for the core supported images types. Moved the code
that checks this against defaultSupportedImageTypes here.
(WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): Use SortedArraySet.
(WebCore::MIMETypeRegistry::isUnsupportedTextMIMEType): Ditto.
(WebCore::MIMETypeRegistry::isPDFMIMEType): Ditto.
(WebCore::MIMETypeRegistry::isPostScriptMIMEType): Use equalLettersIgnoringASCIICase.
For some reason this was the single case-sensitive function in this whole class!
(WebCore::MIMETypeRegistry::isSystemPreviewMIMEType): Use SortedArraySet.
(WebCore::MIMETypeRegistry::systemPreviewMIMETypes): Return a FixedVector.
(WebCore::normalizedImageMIMEType): Renamed this from its old name,
MIMETypeRegistry::normalizedMIMEType, to better reflect that it's only used in
one place. Also added comments to clarify that it's CURL-only and suggest it be
removed eventually.

  • platform/MIMETypeRegistry.h: Changed supportedImageMIMETypes, pdfMIMETypes,

unsupportedTextMIMETypes, and systemPreviewMIMETypes to return FixedVector instead
of HashSet. Also removed normalizedMIMEType.

  • svg/SVGTransformValue.h: Removed unneeded include of HashMap.h.
  • testing/TypeConversions.h: Ditto.

Source/WebKit:

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _isDisplayingPDF]): Updated since MIMETypeRegistry::pdfMIMETypes
returns a different type.

  • UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:

(-[WKWebViewContentProviderRegistry initWithConfiguration:]): Updated since
MIMETypeRegistry::systemPreviewMIMETypes returns a different type.

Source/WebKitLegacy/mac:

  • WebView/WebHTMLRepresentation.mm:

(createNSArray): Renamed from newArrayWithStrings so this overloads the createNSArray
function from VectorCocoa.h so we can use the two interchangably and handle both FixedVector
and HashSet with the smae code.
(+[WebHTMLRepresentation supportedMediaMIMETypes]): Updated for name change.
(+[WebHTMLRepresentation supportedNonImageMIMETypes]): Ditto.
(+[WebHTMLRepresentation supportedImageMIMETypes]): Ditto.
(+[WebHTMLRepresentation unsupportedTextMIMETypes]): Ditto.

Source/WTF:

  • wtf/ASCIICType.h: Make most functions constexpr.
  • wtf/Forward.h: Added FixedVector.
  • wtf/SortedArrayMap.h: Added SortedArraySet. Added ComparableCaseFoldingASCIILiteral

and ComparableLettersLiteral, using a template shared with ComparableASCIILiteral.

  • wtf/StdLibExtras.h: Added isSortedConstExpr and allOfConstExpr.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added SortedArrayMap.cpp,

and removed references to non-existent FullscreenRemoveNodeBeforeEnter.h and
FloatQuadTests.h.

  • TestWebKitAPI/Tests/WTF/SortedArrayMap.cpp: Added.
9:26 AM Changeset in webkit [276779] by Ben Nham
  • 5 edits in trunk/Source

Unreviewed, reverting r276619.

Source/WebKit:

Causes multiple regressions on perf bots, as multiple tests test hot page loads in
WebContent processes that are in the process cache. Dropping the memory cache in those
processes caused multiple benchmarks to regress.

Reverted changeset:

"Reduce memory footprint for background tabs"
https://bugs.webkit.org/show_bug.cgi?id=225007
https://commits.webkit.org/r276619

Source/WTF:

Causes multiple regressions on perf bots.

Reverted changeset:

"Reduce memory footprint for background tabs"
https://bugs.webkit.org/show_bug.cgi?id=225007
https://commits.webkit.org/r276619

9:17 AM Changeset in webkit [276778] by Ruben Turcios
  • 2 edits in branches/safari-612.1.12-branch/Source/WebKit

Cherry-pick r276671. rdar://problem/77324338

HashTableConstIterator's consistency assertion fails while closing m_webIDBServers in NetworkProcess::didClose since r275846
https://bugs.webkit.org/show_bug.cgi?id=225089

Reviewed by Chris Dumez.

The items of m_webIDBServers were removed while iterating
m_webIDBServers.

Move m_webIDBServers to a temporary HashMap before iterating.

  • NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didClose):

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

9:09 AM Changeset in webkit [276777] by weinig@apple.com
  • 21 edits
    2 adds in trunk

Add support for CanvasRenderingContext2DSettings
https://bugs.webkit.org/show_bug.cgi?id=225173

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update test results.

  • web-platform-tests/html/canvas/element/context-attributes/getContextAttributes-expected.txt:
  • web-platform-tests/html/dom/idlharness.https-expected.txt:

Source/WebCore:

Plumb infrastructure for passing a CanvasRenderingContext2DSettings to CanvasRenderingContext2D.

This change only adds the 'desynchronized' flag, which is only a hint, so ignoring
it is an exceptable implementation.

"When a CanvasRenderingContext2D object's desynchronized is true, then the user

agent may optimize the rendering of the canvas to reduce the latency."

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::getContext):
(WebCore::HTMLCanvasElement::createContext2d):
(WebCore::HTMLCanvasElement::getContext2d):
Pipe CanvasRenderingContext2DSettings to CanvasRenderingContext2D.

  • html/HTMLCanvasElement.h:

Forward declare ImageBitmapRenderingContextSettings and remove default values
from functions taking a ImageBitmapRenderingContextSettings. There are few
callers and this allows us to remove an include.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::create):
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):

  • html/canvas/CanvasRenderingContext2D.h:

Store settings. It is not currently used for anything but returning
itself but will have other state in the future.

  • html/canvas/CanvasRenderingContext2D.idl:

Add getContextAttributes() operation from https://html.spec.whatwg.org/multipage/canvas.html#canvasrenderingcontext2d

  • html/canvas/CanvasRenderingContext2DSettings.h: Added.
  • html/canvas/CanvasRenderingContext2DSettings.idl: Added.

LayoutTests:

Update test results.

  • platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
9:04 AM Changeset in webkit [276776] by weinig@apple.com
  • 3 edits
    12 adds
    28 deletes in trunk/LayoutTests/imported/w3c

Update WPT tests in html/canvas/element/wide-gamut-canvas
https://bugs.webkit.org/show_bug.cgi?id=225177

Reviewed by Darin Adler.

Update to the latest version of the tests.

  • resources/import-expectations.json:
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html: Added.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/ImageData-fidelity-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/ImageData-fidelity.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-colorManaged-convertToBlob-roundtrip-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-colorManaged-convertToBlob-roundtrip.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-colorManaged-toBlob-toDataURL-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-colorManaged-toBlob-toDataURL.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-colorspace-arguments-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-colorspace-arguments.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-createImageBitmap-e_srgb-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-createImageBitmap-e_srgb.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-createPutGetImageData-colorManaged-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-createPutGetImageData-colorManaged.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-draw-high-bit-depth-images-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-draw-high-bit-depth-images.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-drawImage-e_srgb-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-drawImage-e_srgb.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-drawImage-offscreenCanvas-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-drawImage-offscreenCanvas.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-getImageData-e_srgb-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/canvas-getImageData-e_srgb.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/imageData-colorManagedBehavior-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/imageData-colorManagedBehavior.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/imageData-colorSpace-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/imageData-colorSpace.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/imagedata-no-color-settings-crash-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/imagedata-no-color-settings-crash.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/transferFromImageBitmap-expected.txt: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/transferFromImageBitmap.html: Removed.
  • web-platform-tests/html/canvas/element/wide-gamut-canvas/w3c-import.log:
8:51 AM Changeset in webkit [276775] by commit-queue@webkit.org
  • 4 edits
    38 adds in trunk/LayoutTests

Resync web-platform-tests/css/css-sizing/aspect-ratio from upstream
https://bugs.webkit.org/show_bug.cgi?id=225182

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-29
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Resync web-platform-tests/css/css-sizing/aspect-ratio from upstream bde70eda50.

  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-017-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-017.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-018-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-018.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-019-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-019.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-020-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/abspos-020.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-031-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-031.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-032-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-032.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-033-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-033.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-034-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-034.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-018-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-018.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-019-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-019.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-020-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-020.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-021-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-021.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-022-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-022.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-023-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-023.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-024-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-024.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-025-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-025.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-026-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-026.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-027-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/grid-aspect-ratio-027.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-034-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-034.html: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/w3c-import.log:

LayoutTests:

Adapt platform test expectations.

8:06 AM Changeset in webkit [276774] by Chris Dumez
  • 10 edits in trunk

Improve local storage size estimation for quota limitation
https://bugs.webkit.org/show_bug.cgi?id=225123
<rdar://problem/77248111>

Reviewed by Alex Christensen.

Source/WebCore:

Improve local storage size estimation for quota limitation:

  • Rely on String::sizeInBytes() to compute the String size, instead of using String::length() * sizeof(UChar)
  • Make estimation consistent between StorageMap & LocalStorageDatabase
  • storage/StorageMap.cpp:

(WebCore::StorageMap::setItem):
(WebCore::StorageMap::setItemIgnoringQuota):
(WebCore::StorageMap::removeItem):
(WebCore::StorageMap::clear):
(WebCore::StorageMap::importItems):
(WebCore::StorageMap::Impl::copy const):

  • storage/StorageMap.h:

Source/WebKit:

Improve local storage size estimation for quota limitation:

  • Rely on String::sizeInBytes() to compute the String size, instead of using String::length() * sizeof(UChar)
  • Make estimation consistent between StorageMap & LocalStorageDatabase
  • NetworkProcess/WebStorage/LocalStorageDatabase.cpp:

(WebKit::LocalStorageDatabase::removeItem):
(WebKit::LocalStorageDatabase::setItem):

  • NetworkProcess/WebStorage/LocalStorageDatabase.h:

LayoutTests:

Update tests to use unicode in the Strings so that the file reaches the quota without
changing the test too much. The test was using ASCII and was thus able to store all
the strings without reaching the quota due to our updated String size calculation.

  • platform/ios/ios/storage/domstorage/5mb-quota.html:
  • storage/domstorage/quota.html:
7:27 AM Changeset in webkit [276773] by commit-queue@webkit.org
  • 9 edits in trunk

Unreviewed, reverting r276689, r276736, and r276737.
https://bugs.webkit.org/show_bug.cgi?id=225188

Broke platform/ios/ios/storage/domstorage/5mb-quota.html

Reverted changesets:

"Improve local storage size estimation for quota limitation"
https://bugs.webkit.org/show_bug.cgi?id=225123
https://trac.webkit.org/changeset/276689

"REGRESSION(r276689): [ iOS wk2 ]
platform/ios/ios/storage/domstorage/5mb-quota.html is a
constant text failure"
https://bugs.webkit.org/show_bug.cgi?id=225160
https://trac.webkit.org/changeset/276736

"Make sure we invalidate the iterator in StorageMap::clear()"
https://bugs.webkit.org/show_bug.cgi?id=225164
https://trac.webkit.org/changeset/276737

7:15 AM Changeset in webkit [276772] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

[webkitcorepy] Allow user to specify interpreter used by autoinstall.py to install imported dependencies
https://bugs.webkit.org/show_bug.cgi?id=225172

Patch by Roy Reapor <rreapor@apple.com> on 2021-04-29
Reviewed by Jonathan Bedard.

  • Scripts/libraries/webkitcorepy/setup.py: Version bump.
  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Version bump.
  • Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:

(Package.install): AUTOINSTALL_PYTHON_EXECUTABLE environment variable can override python interpreter used by this module.

7:15 AM Changeset in webkit [276771] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebKit

Merge r276309 - [WPE] QML WPEView dynamic loading fails
https://bugs.webkit.org/show_bug.cgi?id=224814

Patch by Marco Felsch <m.felsch@pengutronix.de> on 2021-04-20
Reviewed by Philippe Normand.

The scene graph can be initialized when we receive window handle change
notification and so we will not receive a scenegraph initialization
notification. In such case we need to initzialize it ourself.

No new tests. Testing can be done if the WPEView is moved to a
QML component which gets loaded later on demand.

  • UIProcess/API/wpe/qt/WPEQtView.cpp:

(WPEQtView::configureWindow):

7:14 AM Changeset in webkit [276770] by Adrian Perez de Castro
  • 7 edits in releases/WebKitGTK/webkit-2.32

Merge r276308 - [WPE][Qt] Fix build failure after r270690
https://bugs.webkit.org/show_bug.cgi?id=223070

Patch by Marco Felsch <m.felsch@pengutronix.de> on 2021-04-20
Reviewed by Philippe Normand.

Source/WebKit:

WPE fails to build with -DENABLE_WPE_QT_API=ON after adapting the
visibility for linked frameworks done by r270690.

The reason for that is that the visibility is now more strict and we
have to add the WTF dependecy or drop the WTF fast-allocate mechanism.

Adding the WTF dependency is a bit odd since this would staticly link
the WTF lib into a small wrapper lib. Also this lib has nothing to do
with Webkit at all. It is just a QT adaption library.

No new tests, it can be build again.

  • UIProcess/API/wpe/qt/WPEQtView.cpp:

(WPEQtView::notifyLoadChangedCallback):
(WPEQtView::notifyLoadFailedCallback):
(WPEQtView::runJavaScript):

  • UIProcess/API/wpe/qt/WPEQtViewBackend.cpp:

(WPEQtViewBackend::create):

  • UIProcess/API/wpe/qt/WPEQtViewBackend.h:
  • UIProcess/API/wpe/qt/WPEQtViewLoadRequest.h:

Drop WTF usage and use system allocator since the lib has nothing to do
with Webkit at all.

Tools:

  • Scripts/webkitpy/style/checker.py:

Add exception for WPE QT wrapper library to use system alloc instead
of WTF.

7:14 AM Changeset in webkit [276769] by Adrian Perez de Castro
  • 6 edits in releases/WebKitGTK/webkit-2.32/Source

Merge r275670 - [WPE] Build fixes for musl C library on Linux
https://bugs.webkit.org/show_bug.cgi?id=210068

Patch by Khem Raj <raj.khem@gmail.com> on 2021-04-08
Reviewed by Carlos Alberto Lopez Perez.

Source/JavaScriptCore:

Use OS(LINUX) to include musl in platform test
for linux and consolidate all linux platfrom
under same test. Use smaller limits for JSC
stack size per thread and reserved zone size.

  • runtime/MachineContext.h:

(JSC::MachineContext::stackPointerImpl):
(JSC::MachineContext::framePointerImpl):
(JSC::MachineContext::instructionPointerImpl):
(JSC::MachineContext::argumentPointer<1>):
(JSC::MachineContext::llintInstructionPointer):

  • runtime/OptionsList.h:

Source/WTF:

Define 128KB DEFAULT_THREAD_STACK_SIZE_IN_KB for musl
Use OS(LINUX) check to include musl when building for
Linux based platforms.

  • wtf/PlatformHave.h:
  • wtf/Threading.cpp:
6:43 AM Changeset in webkit [276768] by graouts@webkit.org
  • 9 edits in trunk

Rotation axis parallel to the z axis should not serialize using the "z" keyword for the rotate property
https://bugs.webkit.org/show_bug.cgi?id=225101

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Update the tests per https://github.com/web-platform-tests/wpt/pull/28712 as well as their expectations.

  • web-platform-tests/css/css-transforms/animation/rotate-composition-expected.txt:
  • web-platform-tests/css/css-transforms/animation/rotate-interpolation-expected.txt:
  • web-platform-tests/css/css-transforms/animation/rotate-interpolation.html:
  • web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid-expected.txt:
  • web-platform-tests/css/css-transforms/parsing/rotate-parsing-valid.html:

Source/WebCore:

The CSS spec has changed to drop the "z" keyword or any other axis parallel to the z axis when parsing the
rotate property in https://github.com/w3c/csswg-drafts/pull/6147.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::computedRotate):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeRotate):

6:22 AM Changeset in webkit [276767] by Alan Bujtas
  • 3 edits
    4 adds in trunk

[LFC][IFC] Incorrect middle alignment for inline boxes when line-height is present
https://bugs.webkit.org/show_bug.cgi?id=225166
<rdar://77272112>

Reviewed by Simon Fraser.

Source/WebCore:

Let's use the layout bounds instead of the baseline when computing the inline box's baseline offset from the root inline box's baseline.
The difference here is that the layout bounds (per spec) is adjusted with the line-height value.
These two values (layout bounds's ascent and the inline box's baseline) resolve to the same value as long as the line-height property is not set.

Tests: fast/inline/incorrect-middle-alignment-with-line-height.html

fast/inline/incorrect-middle-baseline-alignment-with-line-height.html

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndAlignInlineLevelBoxesVertically):

LayoutTests:

  • fast/inline/incorrect-middle-alignment-with-line-height-expected.html: Added.
  • fast/inline/incorrect-middle-alignment-with-line-height.html: Added.
  • fast/inline/incorrect-middle-baseline-alignment-with-line-height-expected.html: Added.
  • fast/inline/incorrect-middle-baseline-alignment-with-line-height.html: Added.
6:14 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
5:28 AM Changeset in webkit [276766] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[webkitpy] Remove deprecated slave-config-json-path parameter in perftestsrunner.py
https://bugs.webkit.org/show_bug.cgi?id=225106

Reviewed by Ryosuke Niwa.

  • Scripts/webkitpy/performance_tests/perftestsrunner.py:

(PerfTestsRunner._parse_args):

  • Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:

(MainTest.test_parse_deprecated_args): Deleted.

4:50 AM Changeset in webkit [276765] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Remove unused slave parameter from run-jsc-benchmarks script
https://bugs.webkit.org/show_bug.cgi?id=225153

Reviewed by Alexey Proskuryakov.

  • Scripts/run-jsc-benchmarks:
3:36 AM Changeset in webkit [276764] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebKit

[GTK] Bubblewrap sandbox should not break X11 forwarding
https://bugs.webkit.org/show_bug.cgi?id=221990

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-03-05
Reviewed by Carlos Alberto Lopez Perez.

If $DISPLAY points to a TCP socket, or a Unix socket on a different host, then we cannot
isolate the web process from the network and must grant access to the host network
namespace.

Also, clean up some related code by adding PLATFORM(X11) guards where appropriate and
removing a redundant display type check.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bindWayland):
(WebKit::shouldUnshareNetwork):
(WebKit::bubblewrapSpawn):

3:36 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
3:24 AM Changeset in webkit [276763] by Adrian Perez de Castro
  • 30 edits in releases/WebKitGTK/webkit-2.32/Source

Merge r275557 - Build fails when video is disabled
https://bugs.webkit.org/show_bug.cgi?id=224198

Patch by Mike Gorse <mgorse@suse.com> on 2021-04-06
Reviewed by Adrian Perez de Castro.

Add #if ENABLE(VIDEO) where needed.

Source/WebCore:

  • editing/markup.cpp:

(WebCore::createPageForSanitizingWebContent):

  • page/Page.cpp:
  • page/Page.h:
  • platform/graphics/GraphicsContext.cpp:
  • platform/graphics/GraphicsContext.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/GraphicsContextImpl.h:
  • platform/graphics/cairo/GraphicsContextImplCairo.cpp:
  • platform/graphics/cairo/GraphicsContextImplCairo.h:
  • platform/graphics/displaylists/DisplayList.cpp:

(WebCore::DisplayList::DisplayList::append):

  • platform/graphics/displaylists/DisplayListItemBuffer.cpp:

(WebCore::DisplayList::ItemHandle::apply):
(WebCore::DisplayList::ItemHandle::destroy):
(WebCore::DisplayList::ItemHandle::safeCopy const):

  • platform/graphics/displaylists/DisplayListItemType.cpp:

(WebCore::DisplayList::sizeOfItemInBytes):
(WebCore::DisplayList::isDrawingItem):
(WebCore::DisplayList::isInlineItem):

  • platform/graphics/displaylists/DisplayListItemType.h:
  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::operator<<):

  • platform/graphics/displaylists/DisplayListItems.h:
  • platform/graphics/displaylists/DisplayListRecorder.cpp:
  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
  • platform/graphics/opengl/GraphicsContextGLOpenGL.h:
  • platform/graphics/win/GraphicsContextImplDirect2D.cpp:
  • platform/graphics/win/GraphicsContextImplDirect2D.h:
  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::dataChanged):

Source/WebKit:

  • GPUProcess/graphics/RemoteRenderingBackend.cpp:

(WebKit::RemoteRenderingBackend::decodeItem):

  • UIProcess/gtk/ClipboardGtk3.cpp:
  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::committedLoad):

3:24 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
2:45 AM Changeset in webkit [276762] by Sam Sneddon
  • 10 edits in trunk/Tools

Make sure webkitpy tests pass on Linux and on more Python versions
https://bugs.webkit.org/show_bug.cgi?id=225157

Reviewed by Jonathan Bedard.

This gets us passing the webkitpy tests, run under pytest, on Linux,
under Python 2.7, 3.6, 3.7, 3.8, 3.9, and alpha 3.10.

  • Scripts/libraries/webkitcorepy/webkitcorepy/init.py:

Conditionally install setuptools 56 on Python 3, keep setuptools
44.1.1 on Python 2. (44.1.1 is the last release supporting Python 2,
but due to removals doesn't install on Python 3.10.)

  • Scripts/webkitpy/browserperfdash/browserperfdash_unittest.py:

(FakeBrowserDriver): Implement a FakeBrowserDriver which does nothing.
(FakeBrowserDriver.init):
(FakeBrowserDriver.prepare_env):
(FakeBrowserDriver.prepare_initial_env):
(FakeBrowserDriver.restore_env):
(FakeBrowserDriver.restore_env_after_all_testing):
(FakeBrowserDriver.close_browsers):
(FakeBrowserDriver.launch_url):
(FakeBrowserDriver.launch_webdriver):
(BrowserPerfDashRunnerTest.test_can_construct_runner_object_minimum_parameters):
Use the FakeBrowserRunner rather than the platform/browser
default. (This fixes this test on Linux when no minibrowser-gtk is
available.)

  • Scripts/webkitpy/common/checkout/scm/scm_unittest.py:

(GitTest.setUp): Set user.name/user.email to ensure they're set.
(GitSVNTest._setup_git_checkout): Set user.name/user.email to ensure
they're set.

  • Scripts/webkitpy/common/net/credentials.py: Conditionally import

keyring; the rest of the code already supports keyring being
None. (keyring doesn't have any release supporting both Python 2 and
3.10, but updating keyring pulls in new dependencies and is left as
future work.)

  • Scripts/webkitpy/common/prettypatch_unittest.py:

(PrettyPatchTest.check_ruby): Also check Ruby version.
(test_pretty_diff_encodings): Explicitly skip; don't just return.
(test_pretty_print_empty_string): Explicitly skip; don't just return.

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

(TestLogStream.write): Python 3.6's logging appears to put new lines
following a message in a new message, which breaks many tests.

  • Scripts/webkitpy/pytest.ini: Broaden ignored warnings.
  • Scripts/webkitpy/results/upload_unittest.py:

(UploadTest.normalize): collections -> collections.abc for Py3.10

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager._create_device_with_runtime): Use modern
plistlib API.
(SimulatedDevice.state): Use modern plistlib API.

1:39 AM Changeset in webkit [276761] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r275149 - REGRESSION(r274527): [GStreamer] media/webaudio-background-playback.html now failing
https://bugs.webkit.org/show_bug.cgi?id=223840

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-28
Reviewed by Chris Dumez.

r274527 actually exposed a bug that was present since r271197. The AudioDestination pipeline
was not stopping properly because webkitGstSetElementStateSynchronously() was returning too
early.

This patch also includes a few improvements in the webaudiosrc element, most notably
regarding its preroll state. The element now stops emitting buffers downstream as soon as
the AudioDestination is scheduled to stop.

  • platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:

(webKitWebAudioSrcRenderAndPushFrames): Return early as soon as the destination is scheduled to stop.
(webKitWebAudioSrcChangeState): Synchronize preroll state with element state.

  • platform/graphics/gstreamer/GStreamerCommon.cpp:

(WebCore::webkitGstSetElementStateSynchronously): targetState might be lower than current
state, e.g, when stopping a running pipeline, so we can't return early for those cases,
otherwise the pipeline won't stop.

1:33 AM Changeset in webkit [276760] by Adrian Perez de Castro
  • 5 edits in releases/WebKitGTK/webkit-2.32

Merge r275600 - [GStreamer] Videos start playing muted in epiphany with no unmute icon visible in tab, webkit_web_view_get_is_muted() returns incorrect results
https://bugs.webkit.org/show_bug.cgi?id=223195

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-07
Source/WebCore:

Reviewed by Eric Carlson.

For GStreamer ports the semantics of IsPlayingAudio slightly differ from Apple ports. The
webkit_web_view_is_playing_audio() API is expected to return true if a page is producing
audio even though it might be muted.

The second change affects the private player mute state when the page mute state has been
updated.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaState const):
(WebCore::HTMLMediaElement::pageMutedStateDidChange):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Logging improvements.

(WebCore::MediaPlayerPrivateGStreamer::isMuted const):
(WebCore::MediaPlayerPrivateGStreamer::volume const):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVolumeChange):
(WebCore::MediaPlayerPrivateGStreamer::setMuted):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfMute):

Tools:

Reviewed by Michael Catanzaro.

Adapt is-playing test, after muting the page, webkit_web_view_is_playing_audio() should
still return TRUE.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(IsPlayingAudioWebViewTest::periodicallyCheckIsPlayingForAWhile):
(testWebViewIsPlayingAudio):

1:33 AM Changeset in webkit [276759] by Adrian Perez de Castro
  • 5 edits in releases/WebKitGTK/webkit-2.32

Merge r275516 - REGRESSION(r274358) [GStreamer] http/tests/images/mp4-partial-load.html is flaky crashing inside GStreamer
https://bugs.webkit.org/show_bug.cgi?id=223636

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-06
Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore:

Ensure the GStreamer messages are always processed synchronously, even when the handler is
called from another thread. Without blocking in the latter case, the select-streams event
might be sent to decodebin too late. It has to be sent as a synchronous reaction to the
stream-collection message.

  • platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:

(WebCore::ImageDecoderGStreamer::InnerDecoder::handleMessage):
(WebCore::ImageDecoderGStreamer::InnerDecoder::preparePipeline):

  • platform/graphics/gstreamer/ImageDecoderGStreamer.h:

LayoutTests:

  • platform/glib/TestExpectations: Update tests expectations.
  • platform/gtk/TestExpectations: Ditto.
1:26 AM Changeset in webkit [276758] by Said Abou-Hallawa
  • 2 edits in trunk/Source/WebKit

Fix build break after r276753

Unreviewed, build fix.

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
1:09 AM Changeset in webkit [276757] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Unreviewed build fix after r276749

  • Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp:

(WebCore::copyBusData): Remove usage of DisableMallocRestrictionsForCurrentThreadScope
guard, which is a type not available in the 2.32 release branch.

1:09 AM Changeset in webkit [276756] by Adrian Perez de Castro
  • 7 edits in releases/WebKitGTK/webkit-2.32

Merge r275514 - [GStreamer][WebRTC] Audio is not played from an audio element when the srcObject object has unstarted video tracks
https://bugs.webkit.org/show_bug.cgi?id=209163

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-06
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Ensure no MediaStream (active) video tracks can be added in a pipeline representing an <audio> element.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
(WebCore::MediaPlayerPrivateGStreamer::hasFirstSampleReachedSink const):
(WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChanged):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
(WebCore::MediaPlayerPrivateGStreamer::updateTracks):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(webkitMediaStreamSrcPostStreamCollection):
(webkitMediaStreamSrcSetStream):

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.h:

LayoutTests:

  • platform/glib/TestExpectations: Unflag now-passing test.
1:09 AM Changeset in webkit [276755] by Adrian Perez de Castro
  • 5 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r273644 - [GStreamer][Playbin3] Stream collection handling fixes
https://bugs.webkit.org/show_bug.cgi?id=222322

Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-01
Reviewed by Xabier Rodriguez-Calvar.

The track orphaning trying to avoid un-necessary track addition/removals was making the
whole thing inconsistent with the final stream collection. Also stream-collection messages
don't need to be handled from a synchronous GstBus handler, this should be needed for
need-context messages only, so the corresponding code has been refactored.

This patch also includes changes and cleanups for the mediastreamsrc element, needed after
the stream collection handling fixes. Most notably the element now keeps an internal list of
tracks, in addition to observing the MediaStreamPrivate for topology changes. Also it emits
a new stream collection whenever a new source pad has been added.

No new tests, but this patch fixes flakyness of http/tests/media/hls/hls-audio-tracks.html
when the pipeline is driven by playbin3.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::updateTracks):
(WebCore::MediaPlayerPrivateGStreamer::setPipeline):
(WebCore::MediaPlayerPrivateGStreamer::handleStreamCollectionMessage):
(WebCore::MediaPlayerPrivateGStreamer::handleNeedContextMessage):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::handleNeedContextSyncMessage):

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(stopObservingTracks):
(webkitMediaStreamSrcDispose):
(webkitMediaStreamSrcAddPad):
(ProbeData::ProbeData):
(webkitMediaStreamSrcPadProbeCb):
(webkitMediaStreamSrcSetupSrc):
(webkitMediaStreamSrcPostStreamCollection):
(webkitMediaStreamSrcAddTrack):
(webkitMediaStreamSrcSetStream):
(webkitMediaStreamSrcTrackEnded):

1:09 AM Changeset in webkit [276754] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r275512 - [GTK][GStreamer] Web Audio - Media element source - Audio is cracking.
https://bugs.webkit.org/show_bug.cgi?id=196293

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-06
Reviewed by Xabier Rodriguez-Calvar.

The provider client might request samples faster than the current clock speed, so this sink
should process buffers as fast as possible. The cracks were consequence of the audio sink of
the AudioDestination starving off.

  • platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:

(WebCore::AudioSourceProviderGStreamer::handleNewDeinterleavePad):

12:45 AM Changeset in webkit [276753] by Said Abou-Hallawa
  • 5 edits in trunk/Source

[GPU Process] REGRESSION(r272888): Don't assert the validity of the dataURL mimeType inside GPU Process
https://bugs.webkit.org/show_bug.cgi?id=225175
<rdar://76286963>

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/MIMETypeRegistry.h:

Export isSupportedImageMIMETypeForEncoding() so it can be called in WebKit.

  • platform/graphics/cg/ImageBufferCGBackend.cpp:

(WebCore::ImageBufferCGBackend::toCFData const):
Do not assert if we are inside the GPU Process.

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteImageBufferProxy.h:

Assert the validity of the mimeType before sending it to GPU Process.

12:32 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
12:24 AM Changeset in webkit [276752] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebKit

Merge r273618 - [WPE][GTK] Bogus Response.{status,ok} for successful fetch() requests to a custom URI scheme handler
https://bugs.webkit.org/show_bug.cgi?id=222471

Reviewed by Carlos Garcia Campos.

No new tests needed.

  • UIProcess/API/glib/WebKitURISchemeRequest.cpp:

(webkitURISchemeRequestReadCallback): Mark response as having status "200 OK" when
webkit_uri_scheme_request_finish() gets passed a GInputStream.

12:23 AM Changeset in webkit [276751] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.32

Merge r275755 - [GStreamer] fast/canvas/canvas-createPattern-video-loading.html is failing since r218170
https://bugs.webkit.org/show_bug.cgi?id=173410

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-09
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

When a flush has been requested by the GL video sink, allocate a new copy of the sample
which has to be released. The copy is necessary so that the video dimensions can still be
fetched and also for canvas rendering. The release is necessary because the sample might
have been allocated by a hardware decoder and memory might have to be reclaimed by a
non-sysmem buffer pool.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::flushCurrentBuffer):
(WebCore::MediaPlayerPrivateGStreamer::paint):

LayoutTests:

  • platform/gtk/TestExpectations: Unflag now-passing test.
12:23 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
12:23 AM Changeset in webkit [276750] by Adrian Perez de Castro
  • 5 edits in releases/WebKitGTK/webkit-2.32

Merge r275412 - REGRESSION(r268176): [GStreamer] media/video-orientation-canvas.html fails
https://bugs.webkit.org/show_bug.cgi?id=223850

Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore:

The GL pipeline used by the player is now able to handle image rotation tags itself. Manual
handling of the image rotation tags is now performed only when the pipeline is not able to
do it by itself.

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(webKitGLVideoSinkConstructed):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
(WebCore::getVideoOrientation):
(WebCore::MediaPlayerPrivateGStreamer::updateVideoSizeAndOrientationFromCaps):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

LayoutTests:

  • platform/gtk/TestExpectations: Unflag now-passing test.
12:15 AM Changeset in webkit [276749] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r275510 - [GStreamer][MediaStream] AudioSource triggering critical warnings
https://bugs.webkit.org/show_bug.cgi?id=224180

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-06
Reviewed by Xabier Rodriguez-Calvar.

Keep track of audio channel offsets and store them as metadata in audio buffers. This is
used by downstream elements such as the audio convert elements.

  • Modules/webaudio/MediaStreamAudioSourceGStreamer.cpp:

(WebCore::copyBusData):
(WebCore::MediaStreamAudioSource::consumeAudio):

Apr 28, 2021:

8:55 PM Changeset in webkit [276748] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Use a WeakHashSet for Document::m_mediaElements
https://bugs.webkit.org/show_bug.cgi?id=225082

Unreviewed. Address the review comments by Chris & Darin.

  • dom/Document.cpp:

(WebCore::Document::forEachMediaElement):

6:53 PM Changeset in webkit [276747] by Chris Dumez
  • 8 edits in trunk/Source/WebCore

Crash under WebCore::AudioNodeOutput::pull(WebCore::AudioBus*, unsigned long)
https://bugs.webkit.org/show_bug.cgi?id=225174
<rdar://77270701>

Unreviewed, revert r274767 as it introduced this crash.

  • Modules/webaudio/AudioNodeInput.cpp:

(WebCore::AudioNodeInput::connect):
(WebCore::AudioNodeInput::disconnect):
(WebCore::AudioNodeInput::disable):
(WebCore::AudioNodeInput::enable):
(WebCore::AudioNodeInput::bus):
(WebCore::AudioNodeInput::sumAllConnections):
(WebCore::AudioNodeInput::pull):

  • Modules/webaudio/AudioNodeInput.h:
  • Modules/webaudio/AudioNodeOutput.cpp:

(WebCore::AudioNodeOutput::disable):
(WebCore::AudioNodeOutput::enable):

  • Modules/webaudio/AudioParam.cpp:

(WebCore::AudioParam::calculateFinalValues):

  • Modules/webaudio/AudioSummingJunction.cpp:

(WebCore::AudioSummingJunction::addOutput):
(WebCore::AudioSummingJunction::removeOutput):
(WebCore::AudioSummingJunction::updateRenderingState):
(WebCore::AudioSummingJunction::maximumNumberOfChannels const):

  • Modules/webaudio/AudioSummingJunction.h:

(WebCore::AudioSummingJunction::renderingOutput):
(WebCore::AudioSummingJunction::renderingOutput const):
(WebCore::AudioSummingJunction::isConnected const):
(WebCore::AudioSummingJunction::numberOfConnections const):

  • Modules/webaudio/WebKitAudioPannerNode.cpp:

(WebCore::WebKitAudioPannerNode::notifyAudioSourcesConnectedToNode):

6:36 PM Changeset in webkit [276746] by Wenson Hsieh
  • 6 edits
    2 adds in trunk

[iOS] Coalesce adjacent selection geometries when rendering individual selection quads
https://bugs.webkit.org/show_bug.cgi?id=225054

Reviewed by Tim Horton.

Source/WebCore:

Add a heuristic to coalesce adjacent selection geometries when SelectionRenderingBehavior::UseIndividualQuads
is active. Currently, we pass them directly through to the list of coalesced geometries inside
RenderObject::collectSelectionGeometries, but this can lead to almost perfectly adjacent selection quads
showing a narrow gap in between their selection views.

Instead, we can detect this case where neighboring quads can be united into a single quad without significantly
changing the geometry. Rather than append the new selection geometry in this case, we simply adjust the last
selection geometry's quad so that it encompasses the new selection geometry as well, by extending the top right
and bottom right extent points of the last selection quad to the new selection quad's extent points.

See below for more details.

Test: fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay.html

  • html/HTMLElement.h: WEBCORE_EXPORT a couple of helper methods.
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::collectSelectionGeometriesInternal):

Avoid sorting selection geometries by bounding rect logicalLeft in the case where we're not coalescing
bounding rects (and also update the preceding comment accordingly).

(WebCore::coalesceSelectionGeometryWithAdjacentQuadsIfPossible):

Add a new helper to unite neighboring quads if: (1) the top right and bottom right of the current quad are very
close to the top left and bottom left of the next quad (respectively), and (2) the angle of rotation of the
bounding rect of the current quad is very close to that of the next quad.

(WebCore::RenderObject::collectSelectionGeometries):

Use the above helper method to either coalesce or append selection geometries to the final vector of coalesced
geometries.

Source/WebKit:

Make some further minor adjustments to selection behavior in image overlays on iOS. In particular, when using
selection handles to modify the selected range, shift the start and end of the selected range so that they're at
the beginning and end of text runs, respectively.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::insideImageOverlay):
(WebKit::expandForImageOverlay):
(WebKit::rangeForPointInRootViewCoordinates):

LayoutTests:

Add a new layout test to verify that adjacent selection rects rotated by the same amount can be coalesced.

  • fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay-expected.txt: Added.
  • fast/images/image-extraction/ios/coalesce-selection-rects-in-image-overlay.html: Added.
6:00 PM Changeset in webkit [276745] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[aspect-ratio] Treat border/padding correctly for box-sizing: border-box
https://bugs.webkit.org/show_bug.cgi?id=225015

Patch by Rob Buis <rbuis@igalia.com> on 2021-04-28
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT test for this.

  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-035-expected.xht: Added.
  • web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-035.html: Added.

Source/WebCore:

When computing logical height in aspect-ratio case, to compute the automatic
minimum size [1] for min-height: auto, the padding was always subtracted,
however it should only be subtracted in the box-sizing: content-box case.

Test: imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-035.html

[1] https://www.w3.org/TR/css-sizing-4/#aspect-ratio-minimum

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalHeight const):

5:51 PM Changeset in webkit [276744] by Devin Rousso
  • 27 edits
    1 add in trunk

experiment with averaging sampling colors across the top of the page as the scroll area background
https://bugs.webkit.org/show_bug.cgi?id=224987
<rdar://problem/76251889>

Reviewed by Darin Adler.

Source/WebCore:

Tests: SampledPageTopColor.ZeroMaxDifference

SampledPageTopColor.NegativeMaxDifference
SampledPageTopColor.SolidColor
SampledPageTopColor.DifferentColorsWithoutOutlierBelowMaxDifference
SampledPageTopColor.DifferentColorsWithLeftOutlierAboveMaxDifference
SampledPageTopColor.DifferentColorsWithMiddleOutlierAboveMaxDifference
SampledPageTopColor.DifferentColorsWithRightOutlierAboveMaxDifference
SampledPageTopColor.DifferentColorsIndividuallyAboveMaxDifference
SampledPageTopColor.DifferentColorsCumulativelyAboveMaxDifference
SampledPageTopColor.DisplayP3
SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor

  • dom/Document.h:

(WebCore::Document::sampledPageTopColor const): Added.

  • dom/Document.cpp:

(WebCore::Document::enqueuePaintTimingEntryIfNeeded):
(WebCore::colorDifference): Added.
(WebCore::averageColor): Added.
(WebCore::Document::determineSampledPageTopColor): Added.
Wait until the first contentful paint before sampling. Don't sample if that location would
fall into a 3rd-party <iframe>. Currently use 5 snapshots across the top of the page,
allowing for one of either the first or last snapshot to be an outlier, which is not
included in the average of the other snapshots that's used as the final color value. If the
Lab color difference between any two snapshots (unless it's the first or last snapshot as
described above) or across all the (non-outlier) snapshots is too large, bail. Only enabled
if the SampledPageTopColorMaxDifference setting is greater than 0.

  • page/Page.h:
  • page/Page.cpp:

(WebCore::Page::sampledPageTopColor const): Added.

  • page/ChromeClient.h:

(WebCore::ChromeClient::didSamplePageTopColor const): Added.
Pass along the sampledPageTopColor to the UIProcess after it's determined or if the above
logic bails (so that the WKWebView can adjust _sampledPageTopColor to nil).

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
Use the sampledPageTopColor if the UseSampledPageTopColorForScrollAreaBackgroundColor
internal preference is enabled instead of the CSS background-color of the <html>/<body>.

Source/WebKit:

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::didSamplePageTopColor const): Added.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didSamplePageTopColor): Added.
Pass along the sampledPageTopColor to the UIProcess.

  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::sampledPageTopColor): Added.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::scrollAreaBackgroundColor const):
(WebKit::WebPageProxy::didSamplePageTopColor): Added.
Use the sampledPageTopColor if the UseSampledPageTopColorForScrollAreaBackgroundColor
internal preference is enabled instead of the CSS background-color of the <html>/<body>.

  • UIProcess/PageClient.h:

(WebKit::PageClient::sampledPageTopColorWillChange): Added.
(WebKit::PageClient::sampledPageTopColorDidChange): Added.

  • UIProcess/Cocoa/PageClientImplCocoa.h:
  • UIProcess/Cocoa/PageClientImplCocoa.mm:

(WebKit::PageClientImplCocoa::sampledPageTopColorWillChange): Added.
(WebKit::PageClientImplCocoa::sampledPageTopColorDidChange): Added.
Add ObjC KVO support for -[WKWebView _sampledPageTopColor].

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setupPageConfiguration:]):
(-[WKWebView _sampledPageTopColor]): Added.

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _setSampledPageTopColorMaxDifference:]): Added.
(-[WKWebViewConfiguration _sampledPageTopColorMaxDifference]): Added.
Provide SPI to configure the SampledPageTopColorMaxDifference preference when
creating the WKWebView. Expose the result as _sampledPageTopColor SPI.

Source/WTF:

  • Scripts/Preferences/WebPreferences.yaml:

Add a SampledPageTopColorMaxDifference setting that controls both whether or not to sample
colors from the top of the page (only if value > 0) and the max Lab color difference allowed
across all samples.

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Add a UseSampledPageTopColorForScrollAreaBackgroundColor internal setting that controls
whether the sampled page top color can be used as the overscroll area background color.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/SampledPageTopColor.mm: Added.

(-[TestKVOWrapper initWithObservable:keyPath:callback:]):
(-[TestKVOWrapper dealloc]):
(-[TestKVOWrapper observeValueForKeyPath:ofObject:change:context:]):
(createWebViewWithSampledPageTopColorMaxDifference):
(waitForSampledPageTopColorToChangeForHTML):
(createHTMLGradientWithColorStops):
(TEST.SampledPageTopColor.ZeroMaxDifference):
(TEST.SampledPageTopColor.NegativeMaxDifference):
(TEST.SampledPageTopColor.SolidColor):
(TEST.SampledPageTopColor.DifferentColorsWithoutOutlierBelowMaxDifference):
(TEST.SampledPageTopColor.DifferentColorsWithLeftOutlierAboveMaxDifference):
(TEST.SampledPageTopColor.DifferentColorsWithMiddleOutlierAboveMaxDifference):
(TEST.SampledPageTopColor.DifferentColorsWithRightOutlierAboveMaxDifference):
(TEST.SampledPageTopColor.DifferentColorsIndividuallyAboveMaxDifference):
(TEST.SampledPageTopColor.DifferentColorsCumulativelyAboveMaxDifference):
(TEST.SampledPageTopColor.DisplayP3):
(TEST.SampledPageTopColor.ExperimentalUseSampledPageTopColorForScrollAreaBackgroundColor):

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
5:45 PM Changeset in webkit [276743] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS wk2 EWS ] imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-message.html is flaky crash
https://bugs.webkit.org/show_bug.cgi?id=225169

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Updating expectations to Pass Crash due to a negative impact on EWS.
5:25 PM Changeset in webkit [276742] by Wenson Hsieh
  • 4 edits in trunk/Source

[iOS] Web content process occasionally crashes under VisibleSelection::adjustPositionForEnd
https://bugs.webkit.org/show_bug.cgi?id=225072
rdar://77159489

Reviewed by Darin Adler.

Source/WebCore:

Remove a helper method that was added in r276688, which we no longer need.

  • dom/Position.h:

(WebCore::Position::isInTreeScope const): Deleted.

Source/WebKit:

The fix for this crash that I landed in r276688 was based on a misunderstanding that accessing treeScope()
would trigger a null pointer deref if isInTreeScope() is false. This is not the case, since the treeScope
of a Node is a separate notion from whether that Node is connected to said tree scope.

Since this crash is really due to dereferencing a null container node in the case where selectionStart or
selectionEnd are null, a better fix is to just check the nullity of the container node.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::rangeForPointInRootViewCoordinates):

5:17 PM Changeset in webkit [276741] by Kate Cheney
  • 2 edits in trunk/Source/WTF

Disable App Bound Requests on macOS
https://bugs.webkit.org/show_bug.cgi?id=225155
<rdar://problem/77288787>

App-bound requests is causing potential performance issues on macOS.
We should disable it while we investigate further.

Reviewed by Brent Fulgham.

  • wtf/PlatformEnableCocoa.h:
4:22 PM Changeset in webkit [276740] by basuke.suzuki@sony.com
  • 4 edits in trunk/Source

Suppress warnings for %{private}s format specifier
https://bugs.webkit.org/show_bug.cgi?id=225137

Reviewed by Alex Christensen.

Add PRIVATE_LOG_STRING macro which is defined depending on if
os_log() is used or rather old printf().
See also: https://bugs.webkit.org/show_bug.cgi?id=207478

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::openITPDatabase):
(WebKit::ResourceLoadStatisticsDatabaseStore::enableForeignKeys):
(WebKit::ResourceLoadStatisticsDatabaseStore::currentTableAndIndexQueries):
(WebKit::ResourceLoadStatisticsDatabaseStore::columnsForTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::addMissingColumnsToTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::renameColumnInTable):
(WebKit::ResourceLoadStatisticsDatabaseStore::addMissingTablesIfNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::isEmpty const):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertObservedDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::relationshipExists const):
(WebKit::ResourceLoadStatisticsDatabaseStore::domainID const):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationshipList):
(WebKit::ResourceLoadStatisticsDatabaseStore::populateFromMemoryStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::mergeStatistic):
(WebKit::ResourceLoadStatisticsDatabaseStore::mergeStatistics):
(WebKit::ResourceLoadStatisticsDatabaseStore::incrementRecordsDeletedCountForDomains):
(WebKit::ResourceLoadStatisticsDatabaseStore::recursivelyFindNonPrevalentDomainsThatRedirectedToThisDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::markAsPrevalentIfHasRedirectedToPrevalent):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::requestStorageAccessUnderOpener):
(WebKit::ResourceLoadStatisticsDatabaseStore::grandfatherDataForDomains):
(WebKit::ResourceLoadStatisticsDatabaseStore::ensurePrevalentResourcesForDebugMode):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearTopFrameUniqueRedirectsToSinceSameSiteStrictEnforcement):
(WebKit::ResourceLoadStatisticsDatabaseStore::setUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::hasHadUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource):
(WebKit::ResourceLoadStatisticsDatabaseStore::setDomainsAsPrevalent):
(WebKit::ResourceLoadStatisticsDatabaseStore::predicateValueForDomain const):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearPrevalentResource):
(WebKit::ResourceLoadStatisticsDatabaseStore::setGrandfathered):
(WebKit::ResourceLoadStatisticsDatabaseStore::setIsScheduledForAllButCookieDataRemoval):
(WebKit::ResourceLoadStatisticsDatabaseStore::getMostRecentlyUpdatedTimestamp const):
(WebKit::ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForRegistrableDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearDatabaseContents):
(WebKit::ResourceLoadStatisticsDatabaseStore::removeDataForDomain):
(WebKit::ResourceLoadStatisticsDatabaseStore::cookieAccess):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearGrandfathering):
(WebKit::ResourceLoadStatisticsDatabaseStore::pruneStatisticsIfNeeded):
(WebKit::ResourceLoadStatisticsDatabaseStore::updateLastSeen):
(WebKit::ResourceLoadStatisticsDatabaseStore::updateDataRecordsRemoved):
(WebKit::ResourceLoadStatisticsDatabaseStore::isCorrectSubStatisticsCount):
(WebKit::ResourceLoadStatisticsDatabaseStore::getDomainStringFromDomainID const):
(WebKit::ResourceLoadStatisticsDatabaseStore::appendSubStatisticList const):
(WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString const):
(WebKit::ResourceLoadStatisticsDatabaseStore::domainIDExistsInDatabase):
(WebKit::ResourceLoadStatisticsDatabaseStore::updateOperatingDatesParameters):
(WebKit::ResourceLoadStatisticsDatabaseStore::includeTodayAsOperatingDateIfNecessary):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertExpiredStatisticForTesting):
(WebKit::ResourceLoadStatisticsDatabaseStore::findPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::markAllUnattributedPrivateClickMeasurementAsExpiredForTesting):
(WebKit::ResourceLoadStatisticsDatabaseStore::removeUnattributed):
(WebKit::ResourceLoadStatisticsDatabaseStore::allAttributedPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearExpiredPrivateClickMeasurement):
(WebKit::ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString):
(WebKit::ResourceLoadStatisticsDatabaseStore::clearSentAttribution):
(WebKit::ResourceLoadStatisticsDatabaseStore::markAttributedPrivateClickMeasurementsAsExpiredForTesting):

Source/WTF:

  • wtf/Assertions.h:
4:00 PM Changeset in webkit [276739] by Cameron McCormack
  • 3 edits
    2 adds in trunk

Don't create custom scrollbars for fullscreen placeholders.
https://bugs.webkit.org/show_bug.cgi?id=225141
Source/WebCore:

<rdar://64800098>

Reviewed by Darin Adler.

We can end up calling RenderScrollbar::createCustomScrollbar with
element = nullptr from RenderLayerScrollableArea::createScrollbar,
when the renderer is a RenderFullscreenPlaceholder.

We don't need to bother with scrollbars for the placeholder, so check to
make sure we have a valid element before creating custom scollbars.

Test: fullscreen/full-screen-crash-custom-scrollbars.html

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::createScrollbar):

LayoutTests:

Reviewed by Darin Adler.

  • fullscreen/full-screen-crash-custom-scrollbars-expected.txt: Added.
  • fullscreen/full-screen-crash-custom-scrollbars.html: Added.
3:50 PM Changeset in webkit [276738] by Russell Epstein
  • 1 copy in tags/Safari-611.2.6

Tag Safari-611.2.6.

3:49 PM Changeset in webkit [276737] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Make sure we invalidate the iterator in StorageMap::clear()
https://bugs.webkit.org/show_bug.cgi?id=225164

Reviewed by Alex Christensen.

I recently introduced StorageMap::clear() but failed to call invalidateIterator()
like we do in other StorageMap functions that modify the internal HashMap. Since
we cleared the HashMap, we don't want to be keeping a HashMap iterator around.
Looking at the code, I do not think this can cause crashes because the
index >= length() check would fail in StorageMap::key(unsigned). That said, it
is best not to keep a bad iterator around.

  • storage/StorageMap.cpp:

(WebCore::StorageMap::clear):

3:46 PM Changeset in webkit [276736] by Chris Dumez
  • 2 edits in trunk/LayoutTests

REGRESSION(r276689): [ iOS wk2 ] platform/ios/ios/storage/domstorage/5mb-quota.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=225160
<rdar://problem/77279334>

Reviewed by Jonathan Bedard.

Apply the same fix that was applied to storage/domstorage/quota.html in r276689. Use unicode characters
in the local storage strings so that the test still fails when it expects to, despite the new more
accurate string byte size calculation. This was using ASCII characters so it was not really reaching the
5MB quota.

  • platform/ios/ios/storage/domstorage/5mb-quota.html:
3:31 PM Changeset in webkit [276735] by Jonathan Bedard
  • 2 edits in trunk/Tools

[webkitpy] Refactor SimulatorDevice
https://bugs.webkit.org/show_bug.cgi?id=225158

Reviewed by Stephanie Lewis.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager._get_device_identifier_for_type): Handle partially defined device types.
(SimulatedDevice.is_usable): Place Home Screen services into dictionary.

2:59 PM Changeset in webkit [276734] by commit-queue@webkit.org
  • 3 edits
    1 delete in trunk/Source/ThirdParty/ANGLE

Stop building libANGLE.a
https://bugs.webkit.org/show_bug.cgi?id=225162
<rdar://problem/57349384>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-28
Reviewed by Alexey Proskuryakov.

Now that everyone's linking against the dylib, we don't need to build the static library any more.

  • ANGLE.xcodeproj/project.pbxproj:
  • Configurations/ANGLE-dynamic.xcconfig:
  • src/empty.cpp: Removed.
2:54 PM Changeset in webkit [276733] by rniwa@webkit.org
  • 9 edits in trunk

When IPC testing API is enabled, GPU process shouldn't kill Web Process
https://bugs.webkit.org/show_bug.cgi?id=225143
<rdar://70692277>

Reviewed by Chris Dumez.

Source/WebKit:

Set Connection::g_ignoreInvalidMessageForTesting on createGPUConnectionToWebProcess
when the IPC testing API is enabled.

Tests: IPCTestingAPI.CanSendSyncMessageToGPUProcess

IPCTestingAPI.CanSendAsyncMessageToGPUProcess
IPCTestingAPI.CanSendInvalidAsyncMessageToGPUProcessWithoutTermination

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didReceiveInvalidMessage): Exit early without
killing the Web process if IPC testing API is enabled.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::createGPUConnectionToWebProcess): Set the aforementioned flag
on the IPC connection.

  • Shared/GPUProcessConnectionParameters.h:

(WebKit::GPUProcessConnectionParameters): Added ignoreInvalidMessageForTesting.
(WebKit::GPUProcessConnectionParameters::encode const):
(WebKit::GPUProcessConnectionParameters::decode):

  • UIProcess/WebPageProxy.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains): Cleanup. Use a helper function.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::getGPUProcessConnection): Set the value of
GPUProcessConnectionParameters::ignoreInvalidMessageForTesting based on the value
of WebProcessProxy::m_ignoreInvalidMessageForTesting.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::ignoreInvalidMessageForTesting const): Added.

Tools:

Added tests for sending IPC messages to GPU process via IPC testing API.

  • TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:

(IPCTestingAPI.CanSendInvalidAsyncMessageToUIProcessWithoutTermination): Renamed from
CanSendInvalidAsyncMessageWithoutTermination.
(IPCTestingAPI.CanSendInvalidSyncMessageToUIProcessWithoutTermination): Renamed from
CanSendInvalidMessageWithoutTermination.
(IPCTestingAPI.CanSendSyncMessageToGPUProcess): Added.
(IPCTestingAPI.CanSendAsyncMessageToGPUProcess): Added.
(IPCTestingAPI.CanSendInvalidAsyncMessageToGPUProcessWithoutTermination): Added.

1:07 PM Changeset in webkit [276732] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Unreviewed, reverting r276658.
https://bugs.webkit.org/show_bug.cgi?id=225161

Introduced perf regression

Reverted changeset:

"Enforce IOKit filtering"
https://bugs.webkit.org/show_bug.cgi?id=223937
https://trac.webkit.org/changeset/276658

1:03 PM Changeset in webkit [276731] by Chris Gambrell
  • 2 edits in trunk/LayoutTests

[ Win ] 4 http/tests/security/contentSecurityPolicy/ tests are failing
https://bugs.webkit.org/show_bug.cgi?id=225071
<rdar://problem/77172923>

Reviewed by Jonathan Bedard.

  • http/tests/resources/redirect.py:

(add_cache_control):
(addCacheControl): Deleted.

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

REGRESSION(r275267) Network process crashes in Data::adoptMap
https://bugs.webkit.org/show_bug.cgi?id=225159
<rdar://77066555>

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-28
Reviewed by Geoffrey Garen.

There was a missing check to see if mapping was successful.

  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::Data::mapToFile const):

12:35 PM Changeset in webkit [276729] by Wenson Hsieh
  • 8 edits
    2 adds in trunk

Fine-tune some more selection behaviors in image overlays
https://bugs.webkit.org/show_bug.cgi?id=225121

Reviewed by Tim Horton.

Source/WebCore:

Make some additional minor refinements to selection behaviors in image overlays.

Test: fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2.html

DragAndDropTests.DragSelectedTextInImageOverlay

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::updateWithImageExtractionResult):

Unless -webkit-user-select: none; is explicitly set, make each of the text containers under each line have
-webkit-user-select: all;, so that text selection snaps to the boundaries of each piece of text.

  • page/DragController.cpp:

(WebCore::DragController::startDrag):

Drive-by fix: avoid dragging image overlay text out as rich text.

  • page/EventHandler.cpp:

(WebCore::nodeToSelectOnMouseDownForNode):

Make an exception for image overlay text, such that we don't select text upon handling a "mousedown" event, even
though the text has -webkit-user-select: all;. Also, deploy RefPtr in a few places while I'm here.

(WebCore::expandSelectionToRespectSelectOnMouseDown):

Drive-by fix: deploy RefPtr in a few places.

Tools:

Add an API test to verify that selected text inside image overlays is dragged out as plain text only.

  • TestWebKitAPI/Tests/WebKit/simple-image-overlay.html:
  • TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:

(TEST):

LayoutTests:

Add a new layout test to verify that text selection expands to contain all text underneath selected text
containers.

  • fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2-expected.html: Added.
  • fast/images/image-extraction/mac/select-image-overlay-with-mouse-drag-2.html: Added.
12:26 PM Changeset in webkit [276728] by commit-queue@webkit.org
  • 5 edits in trunk/LayoutTests/imported/w3c

[css-grid] Accurize expected result to 0.5 pixel for some contentSpaceAround tests in abspos
https://bugs.webkit.org/show_bug.cgi?id=225145

Patch by Ziran Sun <Ziran Sun> on 2021-04-28
Reviewed by Manuel Rego Casasnovas.

There is a 0.5 pixel difference on expected data width for some contentSpaceAround tests in grid
among platforms. This change is to sync the change in WPT and update expectation files.

  • web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-001-expected.txt:
  • web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-001.html:
  • web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-rtl-001-expected.txt:
  • web-platform-tests/css/css-grid/abspos/grid-positioned-items-content-alignment-rtl-001.html:
12:00 PM Changeset in webkit [276727] by achristensen@apple.com
  • 8 edits in trunk

Add SPI to query whether a URL would be upgraded to HTTPS
https://bugs.webkit.org/show_bug.cgi?id=225154
<rdar://77269904>

Reviewed by Geoff Garen.

Source/WebCore:

Covered by API tests.

  • contentextensions/ContentExtensionsBackend.cpp:

(WebCore::ContentExtensions::ContentExtensionsBackend::shouldBeMadeSecure):

  • contentextensions/ContentExtensionsBackend.h:

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebView.mm:

(+[WKWebView _shouldUpgradeToHTTPS:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewConfiguration.mm:

(TEST):

11:53 AM Changeset in webkit [276726] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/WebCore

[clang] Remove implicit cast related warnings
https://bugs.webkit.org/show_bug.cgi?id=225139

Reviewed by Darin Adler.

Added explicit cast to suppress warning.
Behavior is not changed from implicit cast.

No new tests because there's no behavior change.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::Run::removeTrailingLetterSpacing):

11:15 AM Changeset in webkit [276725] by Alan Coon
  • 1 copy in tags/Safari-607.3.13

Tag Safari-607.3.13.

11:12 AM Changeset in webkit [276724] by Alan Coon
  • 8 edits
    2 adds in branches/safari-607-branch/Source/WebCore

Apply patch. rdar://problem/77237713

11:07 AM Changeset in webkit [276723] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

WebKit-7607.3.13

10:56 AM Changeset in webkit [276722] by Jonathan Bedard
  • 2 edits in trunk/Tools

[configure-xcode-for-embedded-development] Support Xcode 12.5
https://bugs.webkit.org/show_bug.cgi?id=225127

Reviewed by Stephanie Lewis.

  • Scripts/configure-xcode-for-embedded-development: Add definition of

com.apple.package-type.mach-o-executable and com.apple.product-type.tool instead
of copying from the MacOS SDK.

10:27 AM Changeset in webkit [276721] by Brent Fulgham
  • 7 edits in trunk/Source/WebKit

[iOS] [GPU] The UI process should issue mach sandbox extensions to 'iconservices'
https://bugs.webkit.org/show_bug.cgi?id=225111
<rdar://problem/68366888>

Reviewed by Per Arne Vollan.

In Bug 205443 we did work to extend access to non-web-browsing services to the WebContent process only when
needed. This was lost in the transition to the GPU Process, and should be added back.

This change does the following:

  1. Adds sandbox extension handles for the iconservices (and related) services to the GPU process creation parameters.
  2. Updates the GPUProcessProxy to extend iconservices when waranted, and add them to the creation parameter structure.
  3. Updates the GPUProcess to consume the extensions (when granted).
  4. Makes a GPU process-specific version of the 'nonBrowserServices' static function for use by GPUProcessProxy. This is needed because fewer services are needed in the GPU process than in the WebContent process.
  5. Removes unused telemetry from the WebContent process sandbox.
  6. Switches the GPU process sandbox to deny iconservices (and related) by default, and to consume the extensions instead.

Tested by exisiting TestWebKitAPI tests.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::initializeGPUProcess):

  • GPUProcess/GPUProcessCreationParameters.cpp:

(WebKit::GPUProcessCreationParameters::encode const):
(WebKit::GPUProcessCreationParameters::decode):

  • GPUProcess/GPUProcessCreationParameters.h:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::GPUProcessProxy):

10:19 AM Changeset in webkit [276720] by commit-queue@webkit.org
  • 6 edits in trunk

Remove support for NPAPI plugins in WebView
https://bugs.webkit.org/show_bug.cgi?id=224449

Patch by Alex Christensen <achristensen@webkit.org> on 2021-04-28
Reviewed by Geoffrey Garen.

Source/WebKitLegacy/mac:

In r275912 I turned off all plugin support in WebView after looking into use of NP_Initialize, the entry point for NPAPI plugins.
That was too aggressive, as we found some use of the older WebKit plugin entry point, plugInViewWithArguments, and reverted in r276652.
This cuts out only support for NPAPI plugins for now.

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::createPlugin):

Source/WTF:

  • Scripts/Preferences/WebPreferencesInternal.yaml:

Tools:

  • DumpRenderTree/TestOptions.cpp:

(WTR::TestOptions::defaults):

10:13 AM Changeset in webkit [276719] by mark.lam@apple.com
  • 46 edits
    1 add in trunk

Fix exception assertions in light of the TerminationException.
https://bugs.webkit.org/show_bug.cgi?id=225128
rdar://76694909

Reviewed by Robin Morisset.

JSTests:

  • stress/suppress-TerminationException-in-JSFunction-prototypeForConstruction.js: Added.

Source/JavaScriptCore:

Some pre-existing functions assertNoException() or releaseAssertNoException().
These assertion may not be valid anymore in light of the TerminationException, and
require some fix up:

  1. If it makes sense to convert the assertion into an exception check, then do so.

For example, see objectPrototypeToString(), slow_path_create_this().

  1. If the assertion is at the end of a function just before it returns, or if the remaining code in the function will not be affected by the pending exception, then we can replace the assertion as follows:

assertNoException() => assertNoExceptionExceptTermination()
releaseAssertNoException() => releaseAssertNoExceptionExceptTermination()

For example, see objectPrototypeHasOwnProperty(), JSObject::getOwnNonIndexPropertyNames().

  1. If the assertion is in a function where perf is not absolutely critical, and the function isn't calling any other functions that will re-enter the VM or potentially get stuck in an infinite loop, then we can use a DeferTermination scope to defer termination.

For example, see Debugger::pauseIfNeeded(), SamplingProfiler::StackFrame::nameFromCallee().

  1. If the assertion is in an initializer function is only run once and adding exception checks would complicate the code more than it's worth (an engineering judgement), then use a DeferTermination scope.

For example, see ProgramExecutable::initializeGlobalProperties(), setupAdaptiveWatchpoint().

Some leaf (or near-leaf) functions that currently DECLARE_CATCH_SCOPE() may also
fall under this category.

For example, see JSFunction::prototypeForConstruction().

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::addBigIntConstant):

  • debugger/Debugger.cpp:

(JSC::Debugger::pauseIfNeeded):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • interpreter/Interpreter.cpp:

(JSC::notifyDebuggerOfUnwinding):
(JSC::Interpreter::executeProgram):
(JSC::Interpreter::debug):

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::functionsOnStack):

  • jsc.cpp:

(runWithOptions):

  • parser/ParserArena.cpp:

(JSC::IdentifierArena::makeBigIntDecimalIdentifier):

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::finishCreation):

  • runtime/CommonSlowPaths.cpp:

(JSC::JSC_DEFINE_COMMON_SLOW_PATH):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedMessageString):
(JSC::ErrorInstance::sanitizedNameString):

  • runtime/ExceptionScope.h:

(JSC::ExceptionScope::assertNoExceptionExceptTermination):
(JSC::ExceptionScope::releaseAssertNoExceptionExceptTermination):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::prototypeForConstruction):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncIncludes):
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

  • runtime/JSGlobalObject.cpp:

(JSC::setupAdaptiveWatchpoint):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::defineOwnProperty):
(JSC::JSGlobalObject::tryInstallSpeciesWatchpoint):

  • runtime/JSModuleLoader.cpp:

(JSC::printableModuleKey):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::finishCreation):

  • runtime/JSObject.cpp:

(JSC::JSObject::ordinaryToPrimitive const):
(JSC::JSObject::getOwnNonIndexPropertyNames):

  • runtime/JSTemplateObjectDescriptor.cpp:

(JSC::JSTemplateObjectDescriptor::createTemplateObject):

  • runtime/JSTypedArrayViewPrototype.cpp:
  • runtime/ObjectPrototype.cpp:

(JSC::objectPrototypeHasOwnProperty):
(JSC::objectPrototypeToString):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::StackFrame::nameFromCallee):

  • tools/JSDollarVM.cpp:

(JSC::JSC_DEFINE_HOST_FUNCTION):

Source/WebCore:

A few changes plus rebasing bindings test results.

  • Modules/plugins/QuickTimePluginReplacement.mm:

(WebCore::QuickTimePluginReplacement::installReplacement):

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::propagateExceptionSlowPath):
(WebCore::throwNotSupportedError):
(WebCore::throwInvalidStateError):
(WebCore::throwSecurityError):
(WebCore::throwDOMSyntaxError):
(WebCore::throwDataCloneError):

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSC_DEFINE_HOST_FUNCTION):

  • bindings/js/JSDOMGlobalObjectTask.cpp:
  • bindings/js/JSDOMMapLike.cpp:

(WebCore::getBackingMap):

  • bindings/js/JSDOMSetLike.cpp:

(WebCore::getBackingSet):

  • bindings/js/JSMicrotaskCallback.h:

(WebCore::JSMicrotaskCallback::call):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal):

  • bindings/js/WritableStream.cpp:

(WebCore::WritableStreamInternal::callFunction):
(WebCore::WritableStream::lock):

  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePut):
(GeneratePutByIndex):
(GenerateDefineOwnProperty):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:

(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::put):
(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::putByIndex):
(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::defineOwnProperty):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:

(WebCore::JSTestNamedAndIndexedSetterThrowingException::put):
(WebCore::JSTestNamedAndIndexedSetterThrowingException::putByIndex):
(WebCore::JSTestNamedAndIndexedSetterThrowingException::defineOwnProperty):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:

(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::put):
(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::putByIndex):
(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::defineOwnProperty):

  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:

(WebCore::JSTestNamedSetterNoIdentifier::put):
(WebCore::JSTestNamedSetterNoIdentifier::putByIndex):
(WebCore::JSTestNamedSetterNoIdentifier::defineOwnProperty):

  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:

(WebCore::JSTestNamedSetterThrowingException::put):
(WebCore::JSTestNamedSetterThrowingException::putByIndex):
(WebCore::JSTestNamedSetterThrowingException::defineOwnProperty):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:

(WebCore::JSTestNamedSetterWithIdentifier::put):
(WebCore::JSTestNamedSetterWithIdentifier::putByIndex):
(WebCore::JSTestNamedSetterWithIdentifier::defineOwnProperty):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:

(WebCore::JSTestNamedSetterWithIndexedGetter::put):
(WebCore::JSTestNamedSetterWithIndexedGetter::putByIndex):
(WebCore::JSTestNamedSetterWithIndexedGetter::defineOwnProperty):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:

(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::put):
(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::putByIndex):
(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::defineOwnProperty):

  • bindings/scripts/test/JS/JSTestNamedSetterWithLegacyUnforgeableProperties.cpp:

(WebCore::JSTestNamedSetterWithLegacyUnforgeableProperties::put):
(WebCore::JSTestNamedSetterWithLegacyUnforgeableProperties::putByIndex):
(WebCore::JSTestNamedSetterWithLegacyUnforgeableProperties::defineOwnProperty):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
(WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
(WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):

9:54 AM Changeset in webkit [276718] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

Remove redundant RenderObject::isInFlowRenderFragmentedFlow
https://bugs.webkit.org/show_bug.cgi?id=225152

Reviewed by Antti Koivisto.

Now that RenderObject::isOutOfFlowRenderFragmentedFlow() is gone (r276707), isInFlowRenderFragmentedFlow() is really just a isRenderFragmentedFlow() check.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::selectionGaps):
(WebCore::isChildHitTestCandidate):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::updateStylesForColumnChildren):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation const):

  • rendering/RenderBox.h:

(WebCore::RenderBox::canHaveOutsideFragmentRange const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::shouldBeNormalFlowOnly const):
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::updatePagination):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderObject.h:

(WebCore::RenderObject::isRenderGrid const):
(WebCore::RenderObject::isInFlowRenderFragmentedFlow const): Deleted.

  • rendering/updating/RenderTreeBuilderMultiColumn.cpp:

(WebCore::RenderTreeBuilder::MultiColumn::multiColumnDescendantInserted):

9:29 AM Changeset in webkit [276717] by youenn@apple.com
  • 6 edits
    2 adds in trunk

Set audio transceiver nMax to 1
https://bugs.webkit.org/show_bug.cgi?id=225149
<rdar://75956639>

Reviewed by Alex Christensen.

Source/WebCore:

Implement step 8.4 of https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtransceiver and set nMax for audio to 1.

Test: webrtc/audio-addTransceiver.html

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::createTransceiverBackends):
(WebCore::LibWebRTCMediaEndpoint::addTransceiver):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::fromRtpTransceiverInit):

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.h:

LayoutTests:

  • webrtc/audio-addTransceiver-expected.txt: Added.
  • webrtc/audio-addTransceiver.html: Added.
8:44 AM Changeset in webkit [276716] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

Use will-change: opacity instead of will-change: transform in fixed-inside-sticky-no-stacking-context-2.html
https://bugs.webkit.org/show_bug.cgi?id=224910

Patch by Tim Nguyen <ntim@apple.com> on 2021-04-28
Reviewed by Antti Koivisto.

will-change: transform creates a containing block per-spec, which would affect this test, so we use a property
that can create a stacking context, but not a containing block (will-change: opacity).

  • platform/ios-simulator-wk2/TestExpectations:
  • scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-2.html:
  • scrollingcoordinator/ios/fixed-inside-sticky-no-stacking-context-2-expected.html:
8:44 AM Changeset in webkit [276715] by Chris Dumez
  • 37 edits in trunk/Source

Drop ModernUnprefixedWebAudio & AudioWorklet experimental feature flags
https://bugs.webkit.org/show_bug.cgi?id=225130

Reviewed by Eric Carlson.

Drop ModernUnprefixedWebAudio & AudioWorklet experimental feature flags now that
these features have shipped. It also doesn't make sense to disable them given
that the prefixed WebAudio API is no longer exposed and there is no feature flag
to turn the legacy prefixed API back on.

Source/WebCore:

  • Modules/webaudio/AnalyserNode.idl:
  • Modules/webaudio/AudioBuffer.idl:
  • Modules/webaudio/AudioBufferSourceNode.idl:
  • Modules/webaudio/AudioContext.idl:
  • Modules/webaudio/AudioParamMap.idl:
  • Modules/webaudio/AudioProcessingEvent.idl:
  • Modules/webaudio/AudioWorklet.idl:
  • Modules/webaudio/AudioWorkletNode.idl:
  • Modules/webaudio/AudioWorkletNodeOptions.idl:
  • Modules/webaudio/BaseAudioContext.idl:
  • Modules/webaudio/BiquadFilterNode.idl:
  • Modules/webaudio/ChannelMergerNode.idl:
  • Modules/webaudio/ChannelSplitterNode.idl:
  • Modules/webaudio/ConstantSourceNode.idl:
  • Modules/webaudio/ConstantSourceOptions.idl:
  • Modules/webaudio/ConvolverNode.idl:
  • Modules/webaudio/DelayNode.idl:
  • Modules/webaudio/DynamicsCompressorNode.idl:
  • Modules/webaudio/GainNode.idl:
  • Modules/webaudio/IIRFilterNode.idl:
  • Modules/webaudio/MediaElementAudioSourceNode.idl:
  • Modules/webaudio/MediaStreamAudioDestinationNode.idl:
  • Modules/webaudio/MediaStreamAudioSourceNode.idl:
  • Modules/webaudio/OfflineAudioContext.idl:
  • Modules/webaudio/OscillatorNode.idl:
  • Modules/webaudio/PannerNode.idl:
  • Modules/webaudio/PeriodicWave.idl:
  • Modules/webaudio/StereoPannerNode.idl:
  • Modules/webaudio/WaveShaperNode.idl:

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences modernUnprefixedWebAudioEnabled]): Deleted.
(-[WebPreferences setModernUnprefixedWebAudioEnabled:]): Deleted.
(-[WebPreferences audioWorkletEnabled]): Deleted.
(-[WebPreferences setAudioWorkletEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
8:36 AM Changeset in webkit [276714] by Razvan Caliman
  • 4 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: CSS Grid - measure usage of grid overlay options
https://bugs.webkit.org/show_bug.cgi?id=225060
<rdar://75843294>

Reviewed by BJ Burg.

Add telemetry instrumentation to track grid overlay configurations and time spent using them.

  • UserInterface/Base/Main.js:

(WI.contentLoaded):

  • UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js: Added.

(WI.GridOverlayConfigurationDiagnosticEventRecorder):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.get eventSamplingInterval):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.setup):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.teardown):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleGridOverlayShown):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleGridOverlayHidden):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.handleEvent):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._startEventSamplingTimer):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._stopEventSamplingTimer):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._sampleCurrentOverlayConfiguration):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._didObserveUserInteraction):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowFocus):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowBlur):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowKeyDown):
(WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowMouseDown):

  • UserInterface/Controllers/OverlayManager.js:

(WI.OverlayManager.prototype.hasVisibleGridOverlays):

  • UserInterface/Main.html:
8:29 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
8:29 AM Changeset in webkit [276713] by Adrian Perez de Castro
  • 9 edits in releases/WebKitGTK/webkit-2.32/Source

Merge r275871 - [GStreamer] CaptureDevice monitor used from UIProcess
https://bugs.webkit.org/show_bug.cgi?id=222888

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-13
Source/WebCore:

Reviewed by Youenn Fablet .

Move the device observer infrastructure from the WebKit UserMediaProcessManager to the
RealtimeMediaSourceCenter.

  • platform/mediastream/CaptureDevice.h:

(WebCore::haveDevicesChanged):

  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::RealtimeMediaSourceCenter):
(WebCore::RealtimeMediaSourceCenter::Observer::~Observer):
(WebCore::RealtimeMediaSourceCenter::addDevicesChangedObserver):
(WebCore::RealtimeMediaSourceCenter::removeDevicesChangedObserver):
(WebCore::RealtimeMediaSourceCenter::captureDevicesChanged):
(WebCore::RealtimeMediaSourceCenter::triggerDevicesChangedObservers):
(WebCore::RealtimeMediaSourceCenter::setDevicesChangedObserver): Deleted.

  • platform/mediastream/RealtimeMediaSourceCenter.h:

(WebCore::RealtimeMediaSourceCenter::Observer::devicesChanged):

Source/WebKit:

Reviewed by Youenn Fablet.

GStreamer ports aim to reduce usage of the GStreamer library in the UIProcess and thus
should not relay capture devicechange monitoring to the UIProcess. For the long term we plan
to migrate media processing to the GPUProcess but for now we have to maintain the media
pipelines in the WebProcess. Initializing GStreamer in multiple processes (including the
UIProcess) has a significant performance impact on embedded platforms, that's why we try to
avoid it as much as possible.

The device monitoring code from the UserMediaProcessManager was partly moved to the
RealtimeMediaSourceCenter so that it can be easily reused by GStreamer ports from the
UserMediaPermissionRequestManager.

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::UserMediaProcessManager):
(WebKit::UserMediaProcessManager::updateCaptureDevices):
(WebKit::UserMediaProcessManager::devicesChanged):
(WebKit::UserMediaProcessManager::beginMonitoringCaptureDevices):

  • UIProcess/UserMediaProcessManager.h:
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::UserMediaPermissionRequestManager):
(WebKit::UserMediaPermissionRequestManager::updateCaptureDevices):
(WebKit::UserMediaPermissionRequestManager::DeviceObserver::devicesChanged):
(WebKit::UserMediaPermissionRequestManager::addDeviceChangeObserver):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:

(WebKit::UserMediaPermissionRequestManager::DeviceObserver::DeviceObserver):

8:20 AM Changeset in webkit [276712] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Crash under GPUProcessProxy::getGPUProcessConnection()
https://bugs.webkit.org/show_bug.cgi?id=224017
<rdar://75146104>

Reviewed by Darin Adler.

The crash would happen when replyToPendingMessages() get called in the AuxiliaryProcessProxy
destructor and there would be a pending getGPUProcessConnection() IPC. The lambda in
WebProcessPool::getGPUProcessConnection() would check if a WeakPtr to the WebProcessPool is
valid before calling ensureGPUProcess().getGPUProcessConnection(). However, at this point,
the WebProcessPool destructor is still running so the WeakPtr is still valid but
ensureGPUProcess().getGPUProcessConnection() will crash because the GPUProcessProxy
destructor has already run.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::~WebProcessPool):
Drop code that was causing the GPUProcessProxy to reply to all its pending IPC messages whenenever
a WebProcessPool gets destroyed. This is incorrect since a GPUProcessProxy may be shared by several
WebProcessPool objects. Note that the AuxiliaryProcessProxy destructor already takes care of
calling replyToPendingMessages().

(WebKit::WebProcessPool::getGPUProcessConnection):
Protect the WebProcessPool is the lambda to prevent the case where this lambda gets called and the
WebProcessPool & GPUProcessProxy are in the middle of destruction.

7:33 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
7:33 AM Changeset in webkit [276711] by Adrian Perez de Castro
  • 3 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r275596 - [GStreamer] Only seek to change the rate un updatePlaybackRate() when needed
https://bugs.webkit.org/show_bug.cgi?id=224235

Reviewed by Alicia Boya Garcia.

A seek is used by MediaPlayerPrivateGStreamer to update the playback
rate used in the pipeline. There's a special case when the rate is 0.0.
This actually means "paused" and, when set, the pipeline is changed to
PAUSED and no updatePlaybackRate() call is made because of an early
return (and therefore, no seek). When the rate is restored to a
non-zero value, the pipeline is set again to PLAYING, but a
call to updatePlaybackRate() is done, which implies an unconditional
seek.

It should be possible to do the seek in updatePlaybackRate() only if the
rate changed with respect to the original one, instead of always doing
it. This would avoid unneeded seeks, which are complex operations that
can trigger collateral issues such as the one addressed in
https://bugs.webkit.org/show_bug.cgi?id=223742.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate): Only seek when the playback rate hasn't changed.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Document m_lastPlaybackRate purpose.
7:31 AM Changeset in webkit [276710] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r275757 - Unreviewed, GStreamer Thunder decryptor build fix after r275599

  • platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:

(decrypt):

7:31 AM Changeset in webkit [276709] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r275654 - Unreviewed. Fixed build warning.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h: Avoid C-linkage warning.
7:31 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
7:31 AM Changeset in webkit [276708] by Adrian Perez de Castro
  • 11 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r275599 - [EME][GStreamer] Abort decryptor operations immediately and without errors on flush
https://bugs.webkit.org/show_bug.cgi?id=223742

Reviewed by Xabier Rodriguez-Calvar.

A decryptor transformInPlace() operation can cause potentially long waits in
two situations:

  • transformInPlace() is waiting to get the cdmProxy.
  • The CDMProxy::decrypt() method is internally waiting for a specific key to become available.

If a seek operation is performed during those long waits, the main thread will
be blocked until the seek finishes the conditions those long waits are waiting
for will never be fulfilled (because the operations that complete them happen
in the main thread, which is blocked), the internal wait timeouts will trigger
and the decoder will trigger an unrecoverable error.

The solution for this is to break the waits by issuing the right notifications,
and to detect the flushes performed by the seek, distinguising this special
"abort" case from a regular error, so that the situation is no longer
unrecoverable.

This solution involves changes in several layers. A public
CDMProxy::abortWaitingForKey() method is exposed to allow the decryptor to
awake the inner waitFor() that checks for the key. The cdmProxy wait is also
awaken in case there's no cdmProxy available yet.

In order to distinguish if the awakenings are caused by real errors (no
cdmProxy, no key available) or by a flush operation (caused by the seek), the
decryptor first needs to keep track of the "flushing" state and allow other
objects to know about it. CDMProxy is one of those objects, but due to layer
limitations it can't directly ask about it to the decryptor (it can't "see"
it).

A new CDMProxyDecryptionClient interface is created, and the decryptor will
hold an implementation of it (as CDMProxyDecryptorClientImplementation).
CDMProxy can then know the client isAborting(), and the client will know the
decryptor and will ask about it.

As the pipeline, and thus the decryptor, can be destroyed at any moment,
the client holds a WeakPtr to the decryptor and will only ask if isAborting()
if the pointer is still alive.

  • platform/encryptedmedia/CDMProxy.cpp:

(WebCore::CDMProxy::abortWaitingForKey const): Notify waiting threads.
(WebCore::CDMProxy::tryWaitForKeyHandle const): Take a client and ask it if it's aborting.
(WebCore::CDMProxy::getOrWaitForKeyHandle const): Pass the client along.
(WebCore::CDMProxy::getOrWaitForKeyValue const): Ditto.

  • platform/encryptedmedia/CDMProxy.h: Declaration and usage of the CDMProxyDecryptionClient interface.
  • platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp:

(WebCore::CDMProxyClearKey::cencSetDecryptionKey): Pass the client along from the context.

  • platform/graphics/gstreamer/eme/CDMProxyClearKey.h: Store client in the cencDecryptContext.
  • platform/graphics/gstreamer/eme/CDMProxyThunder.cpp:

(WebCore::CDMProxyThunder::getDecryptionSession const): Pass the client along from the context.
(WebCore::CDMProxyThunder::decrypt): Abort operations aren't an error, so just trigger a warning if there's no session.

  • platform/graphics/gstreamer/eme/CDMProxyThunder.h: Store client in DecryptionContext.
  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(decrypt): Ask for client to the superclass and store it in the context.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(CDMProxyDecryptionClientImplementation::CDMProxyDecryptionClientImplementation): Implementation of the CDMProxyDecryptionClient interface.
(CDMProxyDecryptionClientImplementation::isAborting): Ask if the decryptor is flushing.
(constructed): Initialize the client.
(transformInPlace): Check the flush status after waiting for the CDMProxy and for the decryption performed by the subclasses. Release the lock when not needed.
(isCDMProxyAvailable): Renamed mutex to be more generic.
(attachCDMProxy): Ditto. Also renamed condition for the same reason.
(sinkEventHandler): Manage isFlushing status and awake waits for cdmProxy or for session depending on the lifecycle stage.
(webKitMediaCommonEncryptionDecryptIsFlushing): Expose isFlushing status.
(webKitMediaCommonEncryptionDecryptGetCDMProxyDecryptionClient): Return Weak reference to the client.
(changeState): Renamed condition.
(setContext): Renamed mutex.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h: New getters for isFlushing and the client.
  • platform/graphics/gstreamer/eme/WebKitThunderDecryptorGStreamer.cpp:

(decrypt): Ask for client to the superclass and store it in the context.

7:21 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
6:30 AM Changeset in webkit [276707] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

Remove unused RenderObject::isOutOfFlowRenderFragmentedFlow
https://bugs.webkit.org/show_bug.cgi?id=225133

Reviewed by Simon Fraser.

Out-of-flow fragmented flows were originally added for CSS regions (r91760) to provide
an anonymous container for the region content. This is not to be confused with a multi-column box with
"position: absolute/fixed" (such content would still generate an in-flow fragment container).

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeVisibleRectInContainer const):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint const):

  • rendering/RenderElement.h:

(WebCore::RenderElement::canContainFixedPositionObjects const):

  • rendering/RenderLayer.cpp:

(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::hitTestContents const):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::isRenderFragmentedFlow const):
(WebCore::RenderLayer::isOutOfFlowRenderFragmentedFlow const): Deleted.

  • rendering/RenderObject.h:

(WebCore::RenderObject::isInFlowRenderFragmentedFlow const):
(WebCore::RenderObject::isOutOfFlowRenderFragmentedFlow const): Deleted.

6:30 AM Changeset in webkit [276706] by commit-queue@webkit.org
  • 14 edits
    2 adds in trunk

Asserting that function or variable is accessed in a certain thread should be simpler and more robust
https://bugs.webkit.org/show_bug.cgi?id=224971

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-28
Reviewed by Darin Adler.

Source/WebKit:

Use ThreadAssertions in RemoteGraphicsContextGL implementations
as an example.

  • GPUProcess/graphics/RemoteGraphicsContextGL.cpp:

(WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::~RemoteGraphicsContextGL):
(WebKit::RemoteGraphicsContextGL::initialize):
(WebKit::RemoteGraphicsContextGL::stopListeningForIPC):
(WebKit::RemoteGraphicsContextGL::displayWasReconfigured):
(WebKit::RemoteGraphicsContextGL::workQueueInitialize):
(WebKit::RemoteGraphicsContextGL::workQueueUninitialize):
(WebKit::RemoteGraphicsContextGL::didComposite):
(WebKit::RemoteGraphicsContextGL::forceContextLost):
(WebKit::RemoteGraphicsContextGL::dispatchContextChangedNotification):
(WebKit::RemoteGraphicsContextGL::reshape):
(WebKit::RemoteGraphicsContextGL::prepareForDisplay):
(WebKit::RemoteGraphicsContextGL::synthesizeGLError):
(WebKit::RemoteGraphicsContextGL::getError):
(WebKit::RemoteGraphicsContextGL::ensureExtensionEnabled):
(WebKit::RemoteGraphicsContextGL::notifyMarkContextChanged):
(WebKit::RemoteGraphicsContextGL::paintRenderingResultsToCanvas):
(WebKit::RemoteGraphicsContextGL::paintCompositedResultsToCanvas):
(WebKit::RemoteGraphicsContextGL::paintImageDataToImageBuffer):
(WebKit::RemoteGraphicsContextGL::copyTextureFromMedia):
(WebKit::RemoteGraphicsContextGL::simulateEventForTesting):

  • GPUProcess/graphics/RemoteGraphicsContextGL.h:
  • GPUProcess/graphics/RemoteGraphicsContextGLCocoa.cpp:

(WebKit::RemoteGraphicsContextGLCocoa::platformWorkQueueInitialize):
(WebKit::RemoteGraphicsContextGLCocoa::prepareForDisplay):

  • GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:

Source/WTF:

Adds support for more fine-grained thread assertion than
ASSERT(isMainThread()) / ASSERT(!isMainThread())

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Compiler.h:

Add NO_UNIQUE_ADDRESS which can be used to declare members that are empty in
RELEASE builds. The declaration avoids increasing the size of the enclosing type.
This should be used with ThreadAssertion:
class MyThreadAware {

....
NO_UNIQUE_ADDRESS ThreadAssertion m_ownerThread;

};

  • wtf/ThreadAssertions.h: Added.

Add ThreadAssertion class that can be held as a member of a type.
This allows consistent assertions that the code in the type
runs in the expected thread.

Add NamedAssertion& WTF::mainThread.
Add NamedAssertion& WTF::mainRunLoop.
These are only to be used in thread safety analysis phase. These are undefined
symbols, it is an error to reference them.

Adds functions assertIsMainThread() and assertIsMainRunLoop() to replace
patterns of ASSERT(isMainThread()), ASSERT(isMainRunLoop().
In addition to behaving as the direct ASSERT behaves, the functions
enable compile-time thread safety analysis to know that the calling
scope has the assertions. These can be optionally then used in the
function and member signatures to require the assertions.

Tools:

Add simple tests to make sure code in ThreadAssertions.h
compiles.

  • Scripts/generate-gpup-webgl:

Use ThreadAssertions in RemoteGraphicsContextGL implementation
as an example.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/ThreadAssertionsTest.cpp: Added.

(TestWebKitAPI::TEST):
(TestWebKitAPI::WTF_REQUIRES_LOCK):

5:25 AM Changeset in webkit [276705] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fixing GTK and WPE build with external holepunch enabled after r269907.

  • platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: update signature of load method.
3:42 AM Changeset in webkit [276704] by aakash_jain@apple.com
  • 1 edit
    1 delete in trunk/Tools

Delete unused iExploder
https://bugs.webkit.org/show_bug.cgi?id=225118

Rubber-stamped by Alexey Proskuryakov.

  • iExploder: Removed.
3:35 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
2:36 AM Changeset in webkit [276703] by Adrian Perez de Castro
  • 2 edits in releases/WebKitGTK/webkit-2.32/Source/WebCore

Merge r275528 - [GStreamer] At EOS, change position to match duration, not the other way around.
https://bugs.webkit.org/show_bug.cgi?id=224237

Reviewed by Philippe Normand.

The criteria used to check if playback has finished is currentTime >=
duration. Currently MediaPlayerPrivateGStreamer::didEnd() ensures this
in an awkward way: by changing the duration so that it matches
currentTime, rather than the other way around.

This meant a duration change at the end of playback most of the time,
with a slightly different duration each time, since currentTime is
cached periodically.

This patch reworks that function to work more naturally and less racy:

First, only if the stream doesn't have a set duration (e.g. live
stream), we set a duration to currentTime, as defined in the spec.

Second, at EOS we update currentTime to match duration, rather than
the other way around.

This patch doesn't introduce changes in test results.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::didEnd):

2:36 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
2:36 AM Changeset in webkit [276702] by Adrian Perez de Castro
  • 4 edits in releases/WebKitGTK/webkit-2.32

Merge r275634 - [GTK] webkit://gpu should print runtime libwpe and wpebackend-fdo versions
https://bugs.webkit.org/show_bug.cgi?id=224298

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-04-07
Reviewed by Adrian Perez de Castro.

.:

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit:

  • UIProcess/API/glib/WebKitProtocolHandler.cpp:

(WebKit::WebKitProtocolHandler::handleGPU):

2:36 AM Changeset in webkit [276701] by Adrian Perez de Castro
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.32

Merge r275821 - [MSE][GStreamer] Crash in WebCore::PlaybackPipeline::addSourceBuffer when setting duration and preload is set to none
https://bugs.webkit.org/show_bug.cgi?id=224260

Patch by Philippe Normand <pnormand@igalia.com> on 2021-04-12
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Disable delayed loading for the GStreamer MSE player, we want the MSE source element to be
configured ASAP, otherwise the playback pipeline will fail in various ways (duration
notifications sent too early, crashes in addSourceBuffer, crashes in attachTracks, and so
on).

Test: media/media-source/media-source-no-preload-set-duration-crash.html

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):

LayoutTests:

  • media/media-source/media-source-no-preload-set-duration-crash-expected.txt: Added.
  • media/media-source/media-source-no-preload-set-duration-crash.html: Added.
2:32 AM WebKitGTK/2.32.x edited by Adrian Perez de Castro
(diff)
2:32 AM Changeset in webkit [276700] by Adrian Perez de Castro
  • 6 edits
    1 copy in releases/WebKitGTK/webkit-2.32/Source/JavaScriptCore

Merge r275920 - Move cloneUBreakIterator declaration to IntlWorkaround.h
https://bugs.webkit.org/show_bug.cgi?id=224511

Reviewed by Yusuke Suzuki.

Follow up to r275856. There's ultimately no reason IntlWorkaround.cpp needs to be headerless;
this was tied to some confusion about how to successfully include ubrk.h in two different ways.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/IntlSegmenter.cpp:
  • runtime/IntlSegmenter.h:
  • runtime/IntlSegments.cpp:
  • runtime/IntlWorkaround.cpp:
  • runtime/IntlWorkaround.h: Added.
2:32 AM Changeset in webkit [276699] by Adrian Perez de Castro
  • 6 edits
    1 add in releases/WebKitGTK/webkit-2.32/Source/JavaScriptCore

Merge r275856 - ICU 69 deprecates ubrk_safeClone in favor of ubrk_clone
https://bugs.webkit.org/show_bug.cgi?id=224093

Reviewed by Yusuke Suzuki.

In a shining example of "disappointing library practices", ICU 69 deprecates ubrk_safeClone in favor of
a new *draft* API ubrk_clone, meaning that no function with this functionality is exposed by default.

This patch introduces a function cloneUBreakIterator to abstract over this change; however, since we need to:

  1. confine the effects of disabling U_HIDE_DRAFT_API to a non-unified implementation file
  2. still be able to include ubrk.h from IntlSegmenter.h to instantiate ICUDeleter<ubrk_close> (*not* clone!)

...the new helper function is introduced in a *headerless* implementation file, IntlWorkaround.cpp.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/IntlSegmenter.cpp:

(JSC::IntlSegmenter::segment const):

  • runtime/IntlSegmenter.h:
  • runtime/IntlSegments.cpp:

(JSC::IntlSegments::createSegmentIterator):

  • runtime/IntlWorkaround.cpp: Added.

(JSC::cloneUBreakIterator):

1:51 AM Changeset in webkit [276698] by Manuel Rego Casasnovas
  • 8 edits
    2 adds in trunk

[selectors] Using a modifier key on an element makes it stop matching :focus-visible
https://bugs.webkit.org/show_bug.cgi?id=225075

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/focus-visible-021-expected.txt: Added.
  • web-platform-tests/css/selectors/focus-visible-021.html: Added.

Source/WebCore:

When we used a modifier key on a element that was matching :focus-visible, we stopped matching :focus-visible.
That was wrong, we shouldn't just start matching :focus-visible when a modifier key is used but not the other way around.

This patches fixed that without doing any work if the element is already matching :focus-visible when the user type a key.

Test: imported/w3c/web-platform-tests/css/selectors/focus-visible-021.html

  • dom/Element.cpp:

(WebCore::shouldAlwaysHaveFocusVisibleWhenFocused): Helper method for inputs and content editable elements.
(WebCore::Element::setFocus): Use the new helper method.
(WebCore::Element::setHasFocusVisible): Add asserts to avoid setting/unsetting :focus-visible flag wrongly.

  • dom/Node.cpp:

(WebCore::Node::isContentEditable const): Just mark as const.
(WebCore::Node::isContentRichlyEditable const): Ditto.

  • dom/Node.h: Ditto.
  • page/EventHandler.cpp:

(WebCore::EventHandler::internalKeyEvent): Don't do anything regarding :focus-visible flag if the element already matches :focus-visible.

LayoutTests:

  • platform/ios/TestExpectations: Skip new test.
1:39 AM Changeset in webkit [276697] by Cameron McCormack
  • 3 edits
    2 adds in trunk

Make img elements perform source selection even when not in the document.
https://bugs.webkit.org/show_bug.cgi?id=222801

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/the-img-element/source-media-outside-doc-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-img-element/source-media-outside-doc.html: Added.

Source/WebCore:

The rules for image source selection in the HTML spec do not prevent
them from running when an <img> is not in the document. So we update
HTMLImageElement to call selectImageSource() when inserted into and
removed from a <picture> without checking whether it's in a document.

Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/source-media-outside-doc.html

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::~HTMLImageElement): Remove useless call to
setPictureElement, since all it does is clear a weak pointer.
(WebCore::HTMLImageElement::insertedIntoAncestor):
(WebCore::HTMLImageElement::removedFromAncestor):

1:09 AM Changeset in webkit [276696] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Use a WeakHashSet for Document::m_mediaElements
https://bugs.webkit.org/show_bug.cgi?id=225082

Patch by Ian Gilbert <iang@apple.com> on 2021-04-28
Reviewed by Ryosuke Niwa.

Refactoring to use weak pointer instead of raw pointer.
No observable change of behavior.

  • dom/Document.cpp:

(WebCore::Document::registerMediaElement):
(WebCore::Document::unregisterMediaElement):
(WebCore::Document::forEachMediaElement):

  • dom/Document.h:
12:36 AM Changeset in webkit [276695] by commit-queue@webkit.org
  • 5 edits in trunk/Source

[WPE][GTK] More correct fixes for stack size issues on musl libc
https://bugs.webkit.org/show_bug.cgi?id=225099

Patch by Daniel Kolesa <Daniel Kolesa> on 2021-04-28
Reviewed by Adrian Perez de Castro.

Partial revert https://bugs.webkit.org/show_bug.cgi?id=210068

Source/JavaScriptCore:

After fixing the thread stack issues in WTF properly, we can revert
the JSC options changes, which are actually harmful since they result
in JSC being unstable. Previously, softReservedZoneSize was causing a
crash when set to 128K because of the main thread stack bounds, and
this is now fixed. We can keep the maxPerThreadStackUsage at 5M as
well; there is no fundamental difference from how things are done on
glibc anymore.

  • runtime/OptionsList.h:

Source/WTF:

While the changes in r236306 stopped JSC from crashing outright,
they are not correct, since they also make it rather unstable.

To counter this, increase stack size for threads on Linux with
non-glibc/bionic libcs to 1 megabyte, which is a robust enough
value that should always be sufficient.

While at it, the previous approach to musl thread stack size was
breaking use of DEFAULT_THREAD_STACK_SIZE_IN_KB (if defined) as
well as not properly taking care of the unused parameter. Move
the code to a more appropriate place, which solves these problems.

All this is however not enough, since there is still the main thread;
using pthread_attr_getstack on a main thread is not reliable since main
thread stacks are allowed to grow, and we expect the bounds to always
be constant. On glibc, this already behaved right, but e.g. on musl
(and possibly other C libraries) this is not necessarily the case - at
the point of the check, it was returning 128k (since that's the initial
size reserved by the kernel). Therefore, do the same thing as on Darwin
and use process resource limits to get the boundary on Linux as well.

This results in JavaScriptCore behaving correctly on musl libc and
allows us to drop the options special-casing that was in place.

  • wtf/StackBounds.cpp:

(WTF::StackBounds::currentThreadStackBoundsInternal):

  • wtf/Threading.cpp:

(WTF::stackSize):

12:07 AM Changeset in webkit [276694] by Cameron McCormack
  • 33 edits in trunk/LayoutTests

Fix some test typos.
https://bugs.webkit.org/show_bug.cgi?id=225040

Reviewed by Ryosuke Niwa.

  • http/tests/canvas/color-fonts/ctm-sbix-2.html:
  • http/tests/canvas/color-fonts/ctm-sbix-3.html:
  • http/tests/canvas/color-fonts/ctm-sbix-4.html:
  • http/tests/canvas/color-fonts/ctm-sbix.html:
  • http/tests/canvas/color-fonts/fill-color-sbix-2.html:
  • http/tests/canvas/color-fonts/fill-color-sbix-3.html:
  • http/tests/canvas/color-fonts/fill-color-sbix-4.html:
  • http/tests/canvas/color-fonts/fill-color-sbix.html:
  • http/tests/canvas/color-fonts/fill-color-shadow-ctm-sbix-expected.html:
  • http/tests/canvas/color-fonts/fill-color-shadow-ctm-sbix.html:
  • http/tests/canvas/color-fonts/fill-color-shadow-sbix-expected.html:
  • http/tests/canvas/color-fonts/fill-color-shadow-sbix.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix-2.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix-3.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix-4.html:
  • http/tests/canvas/color-fonts/fill-gradient-sbix.html:
  • http/tests/canvas/color-fonts/linedash-sbix-expected.html:
  • http/tests/canvas/color-fonts/linedash-sbix.html:
  • http/tests/canvas/color-fonts/stroke-color-sbix-expected.html:
  • http/tests/canvas/color-fonts/stroke-color-sbix.html:
  • http/tests/canvas/color-fonts/stroke-color-shadow-ctm-sbix-expected.html:
  • http/tests/canvas/color-fonts/stroke-color-shadow-ctm-sbix.html:
  • http/tests/canvas/color-fonts/stroke-color-shadow-sbix-expected.html:
  • http/tests/canvas/color-fonts/stroke-color-shadow-sbix.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-2.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-3.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix-4.html:
  • http/tests/canvas/color-fonts/stroke-gradient-sbix.html:
  • http/tests/canvas/color-fonts/text-sbix-2.html:
  • http/tests/canvas/color-fonts/text-sbix-3.html:
  • http/tests/canvas/color-fonts/text-sbix-4.html:
  • http/tests/canvas/color-fonts/text-sbix.html:
12:00 AM Changeset in webkit [276693] by commit-queue@webkit.org
  • 2 edits in trunk/Source/ThirdParty/ANGLE

ANGLE should be compiled with thread-safe statics
https://bugs.webkit.org/show_bug.cgi?id=224854

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2021-04-28
Reviewed by Kenneth Russell.

Compile ANGLE with normal thread-safe c++ local statics.
No known threading failures. Based on ad-hoc risk vs benefit
evaluation of today and after future merges, it appears
better to err in the side of caution.

  • Configurations/Base.xcconfig:
Note: See TracTimeline for information about the timeline view.