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

Timeline



Aug 10, 2020:

11:11 PM Changeset in webkit [265490] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

Fix bad merge in r265488
https://bugs.webkit.org/show_bug.cgi?id=214769

Unreviewed. This is something that got dropped in a bad merge from r265488.

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::layoutSimpleText const):

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::originAt const):
(WebCore::GlyphBuffer::expandInitialAdvance):

10:40 PM Changeset in webkit [265489] by mmaxfield@apple.com
  • 23 edits
    18 copies
    7 adds in trunk/LayoutTests

[BigSur] 5 fast/text/international/system-language/navigator-language/navigator-language tests are constant failures
https://bugs.webkit.org/show_bug.cgi?id=214629
<rdar://problem/64047392>

Unreviewed test gardening.

The behavior of +[NSLocale minimizedLanguagesFromLanguages:] has changed.

  • fast/text/international/system-language/navigator-language/navigator-language-en-US-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-en-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-en.html:
  • fast/text/international/system-language/navigator-language/navigator-language-es-ES-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-es-MX-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-es-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-es.html:
  • fast/text/international/system-language/navigator-language/navigator-language-fr-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-fr.html:
  • fast/text/international/system-language/navigator-language/navigator-language-hi-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-hi.html:
  • fast/text/international/system-language/navigator-language/navigator-language-pt-BR-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-ru-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-ru.html:
  • fast/text/international/system-language/navigator-language/navigator-language-zh-Hant-expected.txt:
  • fast/text/international/system-language/navigator-language/navigator-language-zh-Hant.html:
  • platform/ios/fast/text/international/system-language/navigator-language/navigator-language-en-US-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-en-US-expected.txt.
  • platform/ios/fast/text/international/system-language/navigator-language/navigator-language-en-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-en-US-expected.txt.
  • platform/ios/fast/text/international/system-language/navigator-language/navigator-language-es-ES-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-es-ES-expected.txt.
  • platform/ios/fast/text/international/system-language/navigator-language/navigator-language-es-MX-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-es-MX-expected.txt.
  • platform/ios/fast/text/international/system-language/navigator-language/navigator-language-es-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-es-ES-expected.txt.
  • platform/ios/fast/text/international/system-language/navigator-language/navigator-language-fr-expected.txt: Copied from LayoutTests/platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-fr-expected.txt.
  • platform/ios/fast/text/international/system-language/navigator-language/navigator-language-hi-expected.txt: Copied from LayoutTests/platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-hi-expected.txt.
  • platform/ios/fast/text/international/system-language/navigator-language/navigator-language-pt-BR-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-pt-BR-expected.txt.
  • platform/ios/fast/text/international/system-language/navigator-language/navigator-language-ru-expected.txt: Copied from LayoutTests/platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-ru-expected.txt.
  • platform/mac-catalina/fast/text/international/system-language/navigator-language/navigator-language-en-US-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-en-US-expected.txt.
  • platform/mac-catalina/fast/text/international/system-language/navigator-language/navigator-language-en-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-en-US-expected.txt.
  • platform/mac-catalina/fast/text/international/system-language/navigator-language/navigator-language-es-ES-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-es-ES-expected.txt.
  • platform/mac-catalina/fast/text/international/system-language/navigator-language/navigator-language-es-MX-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-es-MX-expected.txt.
  • platform/mac-catalina/fast/text/international/system-language/navigator-language/navigator-language-es-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-es-ES-expected.txt.
  • platform/mac-catalina/fast/text/international/system-language/navigator-language/navigator-language-fr-expected.txt: Copied from LayoutTests/platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-fr-expected.txt.
  • platform/mac-catalina/fast/text/international/system-language/navigator-language/navigator-language-hi-expected.txt: Copied from LayoutTests/platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-hi-expected.txt.
  • platform/mac-catalina/fast/text/international/system-language/navigator-language/navigator-language-pt-BR-expected.txt: Copied from LayoutTests/fast/text/international/system-language/navigator-language/navigator-language-pt-BR-expected.txt.
  • platform/mac-catalina/fast/text/international/system-language/navigator-language/navigator-language-ru-expected.txt: Copied from LayoutTests/platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-ru-expected.txt.
  • platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-en-expected.txt:
  • platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-es-expected.txt:
  • platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-fr-expected.txt:
  • platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-hi-expected.txt:
  • platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-ru-expected.txt:
  • platform/mac-mojave/fast/text/international/system-language/navigator-language/navigator-language-zh-Hant-expected.txt:
10:17 PM Changeset in webkit [265488] by mmaxfield@apple.com
  • 8 edits
    4 adds in trunk

Spacing of Chinese characters is inconsistent in macOS 11/Safari 14 beta
https://bugs.webkit.org/show_bug.cgi?id=214769

Reviewed by Darin Adler.

Source/WebCore:

This is in preparation for https://bugs.webkit.org/show_bug.cgi?id=206208..

In the general case, text shaping is Turing-complete. In order for it to work properly,
we need to feed the text shaping virtual machine the correct inputs so that it can
produce correct outputs. The input to text shaping is supposed to be the raw glyph
advances straight from CTFontGetAdvancesForGlyphs().

Previously, we were applying letter-spacing, word-spacing, justification, and tab stops
before shaping. Most fonts don't care about this and still produce the correct results.
However, Ping Fang on macOS Big Sur and iOS 14 _does_ care about this, and its shaping
rules operate incorrectly when fed these pre-expanded glyph widths.

The solution is to apply this extra spacing after shaping occurs. However, because
shaping is Turing-complete, it is free to add or remove glyphs willy-nilly. This means
we need some way of tracing back which character in the input string correspond to which
output glyphs, so we know which glyphs to add additional spacing to. This is what
https://bugs.webkit.org/show_bug.cgi?id=215059 does: It switches from using
CTFontTransformGlyphsWithLanguage() to CTFontShapeGlyphs(), which outputs this
glyph-character tracing info. Then, once we have this tracing info, we can apply spacing
properly after shaping has completed. That's what this patch does.

Tests: fast/text/letter-spacing-shaping.html

fast/text/tab-letter-space.html

  • platform/graphics/FontCascade.cpp: Clients of WidthIterator::advance() need to call

WidthIterator::finalize() (see below).
(WebCore::FontCascade::widthOfTextRange const):
(WebCore::FontCascade::layoutSimpleText const):
(WebCore::FontCascade::floatWidthForSimpleText const):
(WebCore::FontCascade::adjustSelectionRectForSimpleText const):
(WebCore::FontCascade::offsetForPositionForSimpleText const):

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::expandInitialAdvance):
(WebCore::GlyphBuffer::expandAdvance):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::WidthIterator):
(WebCore::WidthIterator::hasExtraSpacing const):
(WebCore::WidthIterator::advanceInternal): Delete the code that used to apply spacing
before shaping. Instead, it gets moved to applyExtraSpacingAfterShaping().
(WebCore::WidthIterator::calculateAdditionalWidth const): This is a refactoring of
the additional space calculation code. This is a const function, and has no side-effects.
It outputs 4 floats:

  • How much space needs to be added to the left of the current character
  • How much space needs to be added to the right of the current character
  • How much space needs to be added to the left of the current character due to justification
  • How much space needs to be added to the right of the current character due to justification

We need these last two values because one of the outputs of WidthIterator::advance() is
a bool which represents whether or not we are ending on a justification space, so that the
next WidthIterator that gets created for the next thing on the line can forbid/require a
leading justification appropriately.
(WebCore::WidthIterator::applyAdditionalWidth): Given the 4 values calculated in
calculateAdditionalWidth(), apply them. We're operating in logical order, so this function has
to do some translation from visual order to logical order (hence all the m_run.ltr() calls).
If we're trying to add size to the left of the first character in LTR, we can't directly do
that, because advances can only add space to the right side of a character, and there is no
character to the left of the first character to expand. Therefore, we do this by increasing
the initial advance of the GlyphBuffer, which is a special advance created just to solve this
problem. In RTL, the problem is a bit more complicated - we don't know whether advance() will
be called again, thereby delivering a glyph which we _can_ expand, so we instead store what
would have been expanded inside m_leftoverJustificationWidth, and wait for the next call to
advance(). If none comes, clients have to call finalize() instead, which will apply
m_leftoverJustificationWidth to the GlyphBuffer's initial advance.
(WebCore::WidthIterator::applyExtraSpacingAfterShaping):
(WebCore::WidthIterator::finalize):
(WebCore::WidthIterator::advance):

  • platform/graphics/WidthIterator.h:
  • rendering/svg/SVGTextMetricsBuilder.cpp:

(WebCore::SVGTextMetricsBuilder::measureTextRenderer):

LayoutTests:

  • fast/text/letter-spacing-shaping-expected.html: Added.
  • fast/text/letter-spacing-shaping.html: Added.
  • fast/text/tab-letter-space-expected.html: Added.
  • fast/text/tab-letter-space.html: Added.
9:23 PM Changeset in webkit [265487] by mmaxfield@apple.com
  • 19 edits
    3 copies
    2 moves
    5 adds
    8 deletes in trunk

[Cocoa] Migrate from CTFontTransformGlyphsWithLanguage() to CTFontShapeGlyphs()
https://bugs.webkit.org/show_bug.cgi?id=215059

Reviewed by Darin Adler.

Source/WebCore:

This is in preparation for https://bugs.webkit.org/show_bug.cgi?id=214769
and https://bugs.webkit.org/show_bug.cgi?id=206208.

The solution for https://bugs.webkit.org/show_bug.cgi?id=214769 requires applying
letter-spacing after text shaping. Today, we apply letter-spacing before text shaping
which is wrong. However, if we want to apply letter-spacing after text shaping, we need
to use CTFontShapeGlyphs(), which returns the glyph -> string mapping, which allows us
to determine which glyphs to add letter-spacing to.

Updates existing tests.

Tests: fast/text/international/kana-voiced-sound-marks-1.html

fast/text/international/kana-voiced-sound-marks-2.html

  • platform/graphics/Font.cpp:

(WebCore::Font::applyTransforms const):

  • platform/graphics/Font.h:
  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):
(WebCore::FontCascade::characterRangeCodePath):
(WebCore::FontCascade::layoutSimpleText const):

  • platform/graphics/FontCascade.h:
  • platform/graphics/SurrogatePairAwareTextIterator.cpp:

(WebCore::SurrogatePairAwareTextIterator::consumeSlowCase): Now that we're using
CTFontShapeGlyphs(), the shaping routine can and does look at the underlying character
string to perform character composition. This means that the glyph buffer needs to
match exactly what is in the string. We can't do any shenanigans where we pretend the
string has characters that aren't actually there.

  • platform/graphics/SurrogatePairAwareTextIterator.h:

(WebCore::SurrogatePairAwareTextIterator::consume):

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::shouldApplyFontTransforms const):
(WebCore::WidthIterator::applyFontTransforms): Reversing the glyph buffer for rtl
content needs to be done inside platform-specific code, because its behavior depends on
which platform shaping routine is being used.
(WebCore::WidthIterator::commitCurrentFontRange):
(WebCore::WidthIterator::advanceInternal):

  • platform/graphics/WidthIterator.h:
  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::applyTransforms const):

  • platform/graphics/mac/SimpleFontDataCoreText.cpp:

(WebCore::Font::getCFStringAttributes const):

Source/WebCore/PAL:

  • pal/spi/cocoa/CoreTextSPI.h:

Source/WTF:

  • wtf/PlatformUse.h: Rename CTFONTTRANSFORMGLYPHSWITHLANGUAGE to CTFONTSHAPEGLYPHS,

because that's the new function.

LayoutTests:

  • fast/encoding/denormalised-voiced-japanese-chars-expected.html: Copied from LayoutTests/fast/encoding/denormalised-voiced-japanese-chars.html.
  • fast/encoding/denormalised-voiced-japanese-chars.html: Update to be a reftest.
  • fast/text/international/kana-voiced-sound-marks-1-expected.html: Copied from LayoutTests/imported/blink/fast/text/international/kana-voiced-sound-marks-expected.html.

Make the test more robust.

  • fast/text/international/kana-voiced-sound-marks-1.html: Renamed from LayoutTests/imported/blink/fast/text/international/kana-voiced-sound-marks.html.

Make the test more robust.

  • fast/text/international/kana-voiced-sound-marks-2-expected.html: Copied from LayoutTests/imported/blink/fast/text/international/kana-voiced-sound-marks-expected.html.

Make the test more robust.

  • fast/text/international/kana-voiced-sound-marks-2.html: Renamed from LayoutTests/imported/blink/fast/text/international/kana-voiced-sound-marks-expected.html.

Make the test more robust.

  • fast/text/soft-hyphen-min-preferred-width-expected.html:
  • fast/text/soft-hyphen-min-preferred-width.html: Update to be more robust.
  • platform/gtk/fast/encoding/denormalised-voiced-japanese-chars-expected.png: Removed.
  • platform/gtk/fast/encoding/denormalised-voiced-japanese-chars-expected.txt: Removed.
  • platform/ios/fast/encoding/denormalised-voiced-japanese-chars-expected.txt: Removed.
  • platform/mac-bigsur/svg/W3C-I18N/tspan-direction-rtl-expected.txt: Added Big Sur -expected result.
  • platform/mac-bigsur/svg/text/bidi-tspans-expected.txt: Ditto.
  • platform/mac/fast/encoding/denormalised-voiced-japanese-chars-expected.png: Removed.
  • platform/mac/fast/encoding/denormalised-voiced-japanese-chars-expected.txt: Removed.
  • platform/win/fast/encoding/denormalised-voiced-japanese-chars-expected.txt: Removed.
  • platform/wincairo/fast/encoding/denormalised-voiced-japanese-chars-expected.txt: Removed.
  • platform/wpe/fast/encoding/denormalised-voiced-japanese-chars-expected.txt: Removed.
8:52 PM Changeset in webkit [265486] by Lauro Moura
  • 4 edits
    1 move
    5 adds
    1 delete in trunk/LayoutTests

[GTK][WPE] Gardening failures and rebaseline some tests.

Unreviewed test gardening.

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w-expected.txt: Added.
  • platform/glib/webaudio/audiobuffersource-loop-points-expected.wav: Renamed from LayoutTests/platform/wpe/webaudio/audiobuffersource-loop-points-expected.wav.
  • platform/gtk/TestExpectations:
  • platform/gtk/webaudio/audiobuffersource-loop-points-expected.wav: Removed.
  • platform/wpe/TestExpectations:
6:48 PM Changeset in webkit [265485] by Devin Rousso
  • 5 edits in trunk/Source/WebCore

Add quirk to force touch events on mail.yahoo.com
https://bugs.webkit.org/show_bug.cgi?id=215329
<rdar://problem/59824469>

Reviewed by Darin Adler and Tim Horton.

<https://mail.yahoo.com/> serves a mobile site even in desktop browsing "mode", meaning
that certain actions, such as selecting an aufotill contact, expect mobile behaviors,
such as mouse events being dispatched after touch events rather than instantly (in the
case of a connected trackpad with an iPad). This quirk ensures always mobile behavior for
those actions, matching the expectations of <https://mail.yahoo.com/>.

  • page/Quirks.h:
  • page/Quirks.cpp:

(WebCore::isYahooMail): Added.
(WebCore::Quirks::shouldSynthesizeTouchEvents const): Added.
(WebCore::Quirks::shouldAvoidPastingImagesAsWebContent const):

  • loader/DocumentLoader.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::mouseEventPolicy const):

6:27 PM Changeset in webkit [265484] by Hector Lopez
  • 3 edits in trunk/LayoutTests

[ macOS iOS ] svg/animations/smil-leak-element-instances-noBaseValRef.svg is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215353

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
6:00 PM Changeset in webkit [265483] by Alan Coon
  • 8 edits in branches/safari-610.1.25.1-branch/Source

Versioning.

WebKit-610.1.25.1.2

5:52 PM Changeset in webkit [265482] by Alan Coon
  • 8 edits in branches/safari-610.1.25.0-branch/Source

Versioning.

WebKit-610.1.25.0.2

5:36 PM Changeset in webkit [265481] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] http/wpt/service-workers/module-meta-url-fragment.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215351

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
5:26 PM Changeset in webkit [265480] by Chris Dumez
  • 18 edits in trunk

AuxiliaryProcess::didReceiveInvalidMessage() for WebPage::PerformDragControllerAction IPC
https://bugs.webkit.org/show_bug.cgi?id=215341
<rdar://problem/59344091>

Reviewed by Alex Christensen.

Source/WebCore:

Consistently use OptionSet<DragApplicationFlags> instead of DragApplicationFlags.

  • page/gtk/DragControllerGtk.cpp:

(WebCore::DragController::isCopyKeyDown):

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • platform/DragData.cpp:

(WebCore::DragData::DragData):

  • platform/DragData.h:

(WebCore::DragData::flags const):

  • platform/cocoa/DragDataCocoa.mm:

(WebCore::DragData::DragData):

  • platform/win/DragDataWin.cpp:

(WebCore::DragData::DragData):

Source/WebKit:

DragApplicationFlags is an enum containing flags. It was being sent over IPC as a DragApplicationFlags
instead of an OptionSet<DragApplicationFlags>, and thus would fail enum value validation when decoding
when more than one flag is set.

  • Scripts/webkit/messages.py:
  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<DragData>::decode):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::applicationFlagsForDrag):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:

(overrideCurrentEvent):
(TEST):

5:25 PM Changeset in webkit [265479] by Lauro Moura
  • 2 edits in trunk/Source/JavaScriptCore

[CMake][JSC] Fix testapiScripts copy location
https://bugs.webkit.org/show_bug.cgi?id=215338

file(COPY src/dir DESTINATION target/dir) copies the entire dir
inside target/dir instead of only the contents.

Reviewed by Alex Christensen.

  • shell/CMakeLists.txt:
5:14 PM Changeset in webkit [265478] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] http/tests/xmlhttprequest/overridemimetype-headers-received-state-force-shiftjis.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=215350

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
5:07 PM Changeset in webkit [265477] by Alan Coon
  • 1 copy in tags/Safari-610.1.25.0.1

Tag Safari-610.1.25.0.1.

4:59 PM Changeset in webkit [265476] by Alan Coon
  • 1 copy in tags/Safari-610.1.25.1.1

Tag Safari-610.1.25.1.1.

4:50 PM Changeset in webkit [265475] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] imported/w3c/web-platform-tests/css/css-fonts/font-display/font-display-failure-fallback.html is a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=215345

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:48 PM Changeset in webkit [265474] by Alan Coon
  • 2 edits in branches/safari-610.1.25.10-branch/Source/WebKitLegacy/ios

Cherry-pick r265424. rdar://problem/66803405

REGRESSION (r265176): Cannot make or extend selections in iOS WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=215319
<rdar://problem/66688560>

Reviewed by Devin Rousso.

  • WebCoreSupport/WebVisiblePosition.mm: (+[DOMRange rangeForFirstPosition:second:]): We want to ensure that firstPosition is *before* secondPosition, so the change in r265176 got the condition backwards. Swap it.

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

4:48 PM Changeset in webkit [265473] by Alan Coon
  • 2 edits in branches/safari-610.1.25.10-branch/Source/WebKit

Cherry-pick r265303. rdar://problem/66644025

[Cocoa] Sandbox extension token not cleared from memory
https://bugs.webkit.org/show_bug.cgi?id=215136

Reviewed by Geoffrey Garen.

As a security mitigation, an invalidated sandbox extension should have its token cleared from memory.

No new tests, covered by existing tests.

  • Shared/Cocoa/SandboxExtensionCocoa.mm: (WebKit::SandboxExtensionImpl::m_length): (WebKit::SandboxExtensionImpl::~SandboxExtensionImpl):

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

4:48 PM Changeset in webkit [265472] by Alan Coon
  • 7 edits in branches/safari-610.1.25.10-branch/Source/WebKit

Cherry-pick r265295. rdar://problem/66643989

[Cocoa] Remove obsolete sandbox extension after r264178
https://bugs.webkit.org/show_bug.cgi?id=215154

Reviewed by Brent Fulgham.

After r264178, the code related to issuing an extension to com.apple.lsd.mapdb is obsolete, and should be removed.

No new tests, covered by existing tests.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode):
  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess):
  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
  • WebProcess/com.apple.WebProcess.sb.in:

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

4:48 PM Changeset in webkit [265471] by Alan Coon
  • 2 edits in branches/safari-610.1.25.10-branch/Source/WebCore

Cherry-pick r265282. rdar://problem/66643985

SWServerJobQueue::didResolveRegistrationPromise should not assume its registration key relates to an existing worker
https://bugs.webkit.org/show_bug.cgi?id=215123
<rdar://problem/65096786>

Reviewed by Geoffrey Garen.

We know that in some cases, the registration is null in SWServerJobQueue::didResolveRegistrationPromise.
This might happen for instance in case a worker gets terminated, thus removing a job and the next job is clearing the registration.
Also, SWServerJobQueue::didResolveRegistrationPromise is not checking that the job identifier is the same in SWServerJobQueue::install
and SWServerJobQueue::didResolveRegistrationPromise while other code paths do.

A future refactoring might allow to call SWServerJobQueue::didResolveRegistrationPromise code synchronously from SWServerJobQueue::install.
In the meantime, let's add a null check and add release logging for that case.

  • workers/service/server/SWServerJobQueue.cpp: (WebCore::SWServerJobQueue::install): (WebCore::SWServerJobQueue::didResolveRegistrationPromise):

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

4:47 PM Changeset in webkit [265470] by Alan Coon
  • 13 edits
    1 add in branches/safari-610.1.25.10-branch

Cherry-pick r265272. rdar://problem/66604070

CheckpointSideState shoud play nicely with StackOverflowException unwinding.
https://bugs.webkit.org/show_bug.cgi?id=215114

Reviewed by Saam Barati.

JSTests:

  • stress/stack-overflow-into-frame-with-pending-checkpoint.js: Added. (foo.catch.async bar): (foo.catch): (foo):

Source/JavaScriptCore:

This patch fixes an issue where we the StackVisitor would
automatically unwind into the first frame before calling into the
provided functor. As a note, we do this because the first frame is
not fully initialized at the time we check for stack
overflow. When this happened we would fail to clear the side state
causing a memory leak. To fix this the unwind function now clears
every checkpoint up to and including the call frame containing our
handler. Some care needs to be taken that we don't clear
checkpoint side state for other threads, which could happen if
there are no checkpoints on the current thread and an API
miggrated us from another thread below the current thread.

This patch also makes two refacorings. The first is to make the
checkpoint side state into a stack, which is how we used it
anyway. The second is that CallFrame::dump and everything associated
with it is now marked const so we can PointerDump a CallFrame*.

  • dfg/DFGOSRExit.cpp: (JSC::DFG::OSRExit::compileExit):
  • ftl/FTLOSRExitCompiler.cpp: (JSC::FTL::compileStub):
  • interpreter/CallFrame.cpp: (JSC::CallFrame::bytecodeIndex const): (JSC::CallFrame::codeOrigin const): (JSC::CallFrame::dump const): (JSC::CallFrame::bytecodeIndex): Deleted. (JSC::CallFrame::codeOrigin): Deleted. (JSC::CallFrame::dump): Deleted.
  • interpreter/CallFrame.h: (JSC::CallFrame::argument const): (JSC::CallFrame::uncheckedArgument const): (JSC::CallFrame::getArgumentUnsafe const): (JSC::CallFrame::thisValue const): (JSC::CallFrame::newTarget const): (JSC::CallFrame::argument): Deleted. (JSC::CallFrame::uncheckedArgument): Deleted. (JSC::CallFrame::getArgumentUnsafe): Deleted. (JSC::CallFrame::thisValue): Deleted. (JSC::CallFrame::newTarget): Deleted.
  • interpreter/CheckpointOSRExitSideState.h: (JSC::CheckpointOSRExitSideState::CheckpointOSRExitSideState):
  • interpreter/Interpreter.cpp: (JSC::UnwindFunctor::operator() const): (JSC::Interpreter::unwind): (): Deleted.
  • llint/LLIntSlowPaths.cpp: (JSC::LLInt::slow_path_checkpoint_osr_exit_from_inlined_call): (JSC::LLInt::slow_path_checkpoint_osr_exit):
  • runtime/VM.cpp: (JSC::VM::scanSideState const): (JSC::VM::pushCheckpointOSRSideState): (JSC::VM::popCheckpointOSRSideState): (JSC::VM::popAllCheckpointOSRSideStateUntil): (JSC::VM::addCheckpointOSRSideState): Deleted. (JSC::VM::findCheckpointOSRSideState): Deleted.
  • runtime/VM.h:

Source/WTF:

Add a helper so we can have soft stack bounds.

  • wtf/StackBounds.h: (WTF::StackBounds::withSoftOrigin const):

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

4:47 PM Changeset in webkit [265469] by Alan Coon
  • 6 edits in branches/safari-610.1.25.10-branch

Cherry-pick r265264. rdar://problem/66644041

[iOS] Check that Accessibility is enabled when receiving the enable Accessibility notification
https://bugs.webkit.org/show_bug.cgi?id=215112
Source/WebCore/PAL:

Reviewed by Youenn Fablet.

Declare NSApplication methods to enable enhanced accessibility user interface, and check if it is enabled.

  • pal/spi/mac/NSApplicationSPI.h:

Source/WebKit:

<rdar://problem/66498397>

Reviewed by Youenn Fablet.

As a security mitigation, return early when handling this notification if Accessibility is not enabled.

API test: WebKit.AccessibilityHasNoPreferencesServiceAccessWhenPostingNotification

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::registerNotificationObservers):

Tools:

Reviewed by Youenn Fablet.

Added test WebKit.AccessibilityHasNoPreferencesServiceAccessWhenPostingNotification.

  • TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm: (TEST):

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

4:47 PM Changeset in webkit [265468] by Alan Coon
  • 3 edits in branches/safari-610.1.25.10-branch/Source/WebCore

Cherry-pick r265257. rdar://problem/66644029

REGRESSION (r265019): ASSERTION FAILED: !m_impl
m_impl->wasConstructedOnMainThread() == isMainThread() under WebCore::PlaybackSessionInterfaceAVKit::invalidate()

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

Reviewed by Jer Noble.

Revert the change about using a WeakPtr of PlaybackSessionModel in r265019.
On WK1, a VideoFullscreenControllerContext (a subclass of PlaybackSessionModel)
object is created on the main thread, so we cannot use a WeakPtr of it on
the UI thread.

No new tests, fix an API test failure: WebKitLegacy.AudioSessionCategoryIOS.

  • platform/ios/PlaybackSessionInterfaceAVKit.h:
  • platform/ios/PlaybackSessionInterfaceAVKit.mm: (WebCore::PlaybackSessionInterfaceAVKit::PlaybackSessionInterfaceAVKit): (WebCore::PlaybackSessionInterfaceAVKit::playbackSessionModel const):

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

4:47 PM Changeset in webkit [265467] by Alan Coon
  • 2 edits in branches/safari-610.1.25.10-branch/Source/WebKitLegacy/ios

Cherry-pick r265255. rdar://problem/66644016

Try to fix Catalyst build
https://bugs.webkit.org/show_bug.cgi?id=215133
rdar://66534119

  • WebCoreSupport/WebVisiblePosition.mm: Add include of SimpleRange.h.

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

4:47 PM Changeset in webkit [265466] by Alan Coon
  • 2 edits in branches/safari-610.1.25.10-branch/Source/WTF

Cherry-pick r265252. rdar://problem/66645897

about: scheme URL constants should be backed by StaticStringImpl
https://bugs.webkit.org/show_bug.cgi?id=215113

Reviewed by Darin Adler.

  • wtf/URL.cpp: (WTF::aboutBlankURL): (WTF::aboutSrcDocURL):

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

4:47 PM Changeset in webkit [265465] by Alan Coon
  • 5 edits in branches/safari-610.1.25.10-branch

Cherry-pick r265238. rdar://problem/66645891

Allow -accessoryDone to blur the focused element on iPad when AutoFilling strong passwords
https://bugs.webkit.org/show_bug.cgi?id=215105
<rdar://problem/65143984>

Reviewed by Tim Horton.

Source/WebKit:

-accessoryDone is now used to dismiss the strong password AutoFill keyboard after choosing a password on iOS,
due to how it hides the keyboard without causing the content view to resign first responder; being stuck in a
state where the content view is not first responder causes several issues when choosing strong passwords on iOS,
such as keyboard shortcuts no longer working.

On iPad, to ensure that -accessoryDone actually dismisses the keyboard, we need to additionally teach
-endEditingAndUpdateFocusAppearanceWithReason: (when given EndEditingReasonAccessoryDone) to allow the
focused element to blur when dismissing the strong password input view.

Test: KeyboardInputTests.TestWebViewAccessoryDoneDuringStrongPasswordAssistance

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]):

Refactor this logic into a local helper lambda with early returns, instead of using a single if statement.

Tools:

Add an API test that exercises the behavior change when run on iPad simulator.

  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
  • TestWebKitAPI/ios/UIKitSPI.h:

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

4:47 PM Changeset in webkit [265464] by Alan Coon
  • 2 edits in branches/safari-610.1.25.10-branch/Source/WebKit

Cherry-pick r265230. rdar://problem/66643993

Null check parentProcessConnection when creating a NetworkDataTaskCocoa
https://bugs.webkit.org/show_bug.cgi?id=215109
<rdar://problem/64853922>

Patch by Alex Christensen <achristensen@webkit.org> on 2020-08-03
Reviewed by Chris Dumez.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::sessionWrapperForTask): Null check parentProcessConnection. Otherwise, we can dereference null and crash between disconnecting with the parent process and terminating, which isn't the worst time to crash because we are trying to terminate anyways. But we may as well not crash.

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

4:47 PM Changeset in webkit [265463] by Alan Coon
  • 4 edits in branches/safari-610.1.25.10-branch/Source

Cherry-pick r265215. rdar://problem/66643571

Finalize the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=215095
<rdar://problem/66034080>

Reviewed by Geoffrey Garen.

Source/WebCore/PAL:

Declare constants for MobileGestalt questions.

  • pal/spi/ios/MobileGestaltSPI.h:

Source/WebKit:

When the MobileGestalt cache is invalid, we issue a temporary extension to the MobileGestalt daemon for the WebContent process,
which will populate the in-memory cache by doing a set of MobileGestalt queries before revoking the extension. This patch
finalizes the list of MobileGestalt queries needed to populate the in-memory cache in the WebContent process on iOS before
revoking the temporary extension to com.apple.mobilegestalt.xpc. This list was compiled by querying every possible MobileGestalt
key after the temporary extension was revoked, and make a note of all queries that were contacting the MobileGestalt daemon to
get the answer. The added queries in this patch should make the list complete, and ensures that all cachable values are in the
in-memory cache before revoking the extension, since every possible MobileGestalt query was tested. This again means that users
that have an invalid MobileGestalt cache, will have access to the exact same MobileGestalt values, as those users who have a
valid MobileGestalt cache.

  • WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):

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

4:47 PM Changeset in webkit [265462] by Alan Coon
  • 5 edits
    2 adds in branches/safari-610.1.25.10-branch

Cherry-pick r265198. rdar://problem/66644002

REGRESSION(r259585) Text decoration color with value currentColor miscomputed in some cases
https://bugs.webkit.org/show_bug.cgi?id=215079

Reviewed by Zalan Bujtas.

Source/WebCore:

r259585 did some refactoring that broke a special case where text decoration color comes from
'-webkit-text-fill-color' property.

Test: fast/text/text-decoration-currentcolor-fill-color.html

  • rendering/TextDecorationPainter.cpp: (WebCore::TextDecorationPainter::decorationColor):

Move resolving currentColor to RenderStyle.

  • rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::colorResolvingCurrentColor const):

Handle CSSPropertyTextDecorationColor as a special case here.

(WebCore::RenderStyle::visitedDependentColor const):

LayoutTests:

  • fast/text/text-decoration-currentcolor-fill-color-expected.html: Added.
  • fast/text/text-decoration-currentcolor-fill-color.html: Added.

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

4:47 PM Changeset in webkit [265461] by Alan Coon
  • 4 edits in branches/safari-610.1.25.10-branch

Cherry-pick r265188. rdar://problem/66643973

Table data is incorrectly translated in some articles on en.wikipedia.org
https://bugs.webkit.org/show_bug.cgi?id=215071
<rdar://problem/66354013>

Reviewed by Darin Adler.

Source/WebCore:

Text in table cells sometimes end up in adjacent cells after translation, since adjacent cells are currently
extracted as different tokens in a single item; mitigate this by splitting text in table cells into different
text manipulation items instead.

Test: TextManipulation.StartTextManipulationExtractsTableCellsAsSeparateItems

  • editing/TextManipulationController.cpp: (WebCore::isEnclosingItemBoundaryElement):

Tools:

Add a new API test to exercise the change.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm: (TestWebKitAPI::TEST):

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

4:16 PM Changeset in webkit [265460] by Alan Coon
  • 8 edits in branches/safari-610.1.25.10-branch/Source

Versioning.

WebKit-610.1.25.10.1

3:53 PM Changeset in webkit [265459] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ macOS wk1 Release ] imported/w3c/web-platform-tests/IndexedDB/blob-delete-objectstore-db.any.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215339

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
3:42 PM Changeset in webkit [265458] by Alan Coon
  • 1 copy in branches/safari-610.1.25.10-branch

New branch.

3:17 PM Changeset in webkit [265457] by Peng Liu
  • 2 edits in trunk/Source/WebCore

MobileSafari crashes at WebCore: -[WebAVPlayerController seekToTime:toleranceBefore:toleranceAfter:]
https://bugs.webkit.org/show_bug.cgi?id=215332

Reviewed by Eric Carlson.

Add a NULL pointer check to fix a crash.

  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController seekToTime:toleranceBefore:toleranceAfter:]):

3:01 PM Changeset in webkit [265456] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit

Use RefPtr for WebKit::WebOpenPanelResultListenerProxy
<https://webkit.org/b/215252>
<rdar://problem/65753821>

Reviewed by Geoffrey Garen.

Unable to create an API test for this.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::runOpenPanel):

  • Use RefPtr<WebOpenPanelResultListenerProxy> when passing listener into the block.
2:51 PM Changeset in webkit [265455] by mmaxfield@apple.com
  • 4 edits
    3 adds in trunk

Shaping can be performed on glyphIDs from the wrong font
https://bugs.webkit.org/show_bug.cgi?id=215333

Reviewed by Darin Adler.

Source/WebCore:

The problem is this line:
if (font != lastFontData && width)

This means we will only trigger shaping code if width is non-zero.
However, even if width is non-zero, we will still happily add glyphs
to the glyph buffer, and when we do eventually get around to shaping,
we shape all yet-unshaped glyphs, regardless of which font they came
from.

Test: fast/text/zero-width-shaping-font-mismatch.html

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::commitCurrentFontRange):
(WebCore::WidthIterator::advanceInternal):

  • platform/graphics/WidthIterator.h:

LayoutTests:

  • fast/text/resources/Ahem-zero-width-shaping-font-mismatch.ttf: Added. This is a font where

U+2C95 COPTIC SMALL LETTER KAPA (which Times doesn't support) is mapped to glyph 73. Also,
the font has fewer than 192 glyphs.

  • fast/text/zero-width-shaping-font-mismatch-expected-mismatch.html: Added. Times has a

ligature where the glyph sequence 73,76 gets replaced with glyph 192. The test has characters
U+2C95 COPTIC SMALL LETTER KAPA (which Times doesn't support but the webfont does, so we map
this to glyph 73 inside the web font) followed by U+0069 LATIN SMALL LETTER I, (which Times
does support, so we map this to glyph 76 inside Times). Then, because of this bug, we'll try
to shape glyphs 73,76 using Times, which replaces them with glyph 192, but then try to render
glyph 192 with the web font, which doesn't support it, so we get a white screen.

  • fast/text/zero-width-shaping-font-mismatch.html: Added.
2:50 PM Changeset in webkit [265454] by Russell Epstein
  • 2 edits in branches/safari-610.1.25.1-branch/Source/WebKitLegacy/ios

Cherry-pick r265424. rdar://problem/66797266

REGRESSION (r265176): Cannot make or extend selections in iOS WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=215319
<rdar://problem/66688560>

Reviewed by Devin Rousso.

  • WebCoreSupport/WebVisiblePosition.mm: (+[DOMRange rangeForFirstPosition:second:]): We want to ensure that firstPosition is *before* secondPosition, so the change in r265176 got the condition backwards. Swap it.

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

2:13 PM Changeset in webkit [265453] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ macOS wk1 Release ] svg/text/hidpi-text-selection-rect-position.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215336

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:54 PM Changeset in webkit [265452] by Simon Fraser
  • 2 edits in trunk/Tools

Add Sam Sneddon to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=215334

Reviewed by Simon Fraser.

  • Scripts/webkitpy/common/config/contributors.json:
1:53 PM Changeset in webkit [265451] by Alan Coon
  • 8 edits in branches/safari-610.1.25.1-branch/Source

Versioning.

WebKit-610.1.25.1.1

1:46 PM Changeset in webkit [265450] by Alan Coon
  • 2 edits in branches/safari-610.1.25.0-branch/Source/WebKitLegacy/ios

Cherry-pick r265424. rdar://problem/66792464

REGRESSION (r265176): Cannot make or extend selections in iOS WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=215319
<rdar://problem/66688560>

Reviewed by Devin Rousso.

  • WebCoreSupport/WebVisiblePosition.mm: (+[DOMRange rangeForFirstPosition:second:]): We want to ensure that firstPosition is *before* secondPosition, so the change in r265176 got the condition backwards. Swap it.

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

1:38 PM Changeset in webkit [265449] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ macOS wk1 Release ] webanimations/css-transition-retargeting-during-ready-promise.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215335

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
1:35 PM Changeset in webkit [265448] by Alan Coon
  • 8 edits in branches/safari-610.1.25.0-branch/Source

Versioning.

WebKit-610.1.25.0.1

1:25 PM Changeset in webkit [265447] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

Add myself (Patrick Angle) to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=215328

Patch by Patrick Angle <Patrick Angle> on 2020-08-10
Reviewed by Brian Burg.

  • Scripts/webkitpy/common/config/contributors.json: Added myself.
1:16 PM Changeset in webkit [265446] by Alan Coon
  • 1 copy in branches/safari-610.1.25.2-branch

New branch.

1:16 PM Changeset in webkit [265445] by Alan Coon
  • 1 copy in branches/safari-610.1.25.1-branch

New branch.

1:16 PM Changeset in webkit [265444] by Alan Coon
  • 1 copy in branches/safari-610.1.25.0-branch

New branch.

12:39 PM Changeset in webkit [265443] by commit-queue@webkit.org
  • 13 edits
    4 adds in trunk

Add AudioProcessingEvent Constructor
https://bugs.webkit.org/show_bug.cgi?id=215237

Patch by Clark Wang <clark_wang@apple.com> on 2020-08-10
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Re-baselined existing tests that now pass.

  • web-platform-tests/webaudio/idlharness.https.window-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam-expected.txt:

Source/WebCore:

Added constructor according to spec: https://bugs.webkit.org/show_bug.cgi?id=215237.
Added in AudioProcessingEventInit files.

Test: webaudio/audioprocessingevent-constructor.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/webaudio/AudioProcessingEvent.cpp:

(WebCore::AudioProcessingEvent::create):
(WebCore::AudioProcessingEvent::AudioProcessingEvent):

  • Modules/webaudio/AudioProcessingEvent.h:
  • Modules/webaudio/AudioProcessingEvent.idl:
  • Modules/webaudio/AudioProcessingEventInit.h: Added.
  • Modules/webaudio/AudioProcessingEventInit.idl: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Added new file to test AudioProcessingEvent constructor.

  • webaudio/audioprocessingevent-constructor-expected.txt: Added.
  • webaudio/audioprocessingevent-constructor.html: Added.
12:36 PM Changeset in webkit [265442] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Handle logs with unicode characters in ews emails
https://bugs.webkit.org/show_bug.cgi?id=215330

Reviewed by Darin Adler.

  • BuildSlaveSupport/ews-build/send_email.py:

(send_email): Encode email content as utf-8.

  • BuildSlaveSupport/ews-build/steps.py:

(AnalyzeCompileWebKitResults.send_email_for_new_build_failure):
(AnalyzeCompileWebKitResults.send_email_for_preexisting_build_failure):

12:29 PM Changeset in webkit [265441] by Wenson Hsieh
  • 9 edits in trunk

Add more logging to diagnose editing/selection/ios/select-all-non-editable-text-using-keyboard.html
https://bugs.webkit.org/show_bug.cgi?id=215089
<rdar://problem/66282806>

Reviewed by Tim Horton.

Source/WebKit:

Remove some unnecessary declarations that were only used for debug logging in WebKitTestRunner, and add some
more logging to check whether the web view is even getting a call to select all from UIKit.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView selectAllForWebView:]):

Tools:

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptControllerIOS::keyDown):

  • WebKitTestRunner/ios/mainIOS.mm:

(-[WebKitTestRunnerApp handleKeyHIDEvent:]): Deleted.

LayoutTests:

  • editing/selection/ios/select-all-non-editable-text-using-keyboard-expected.txt:
  • editing/selection/ios/select-all-non-editable-text-using-keyboard.html:
12:29 PM Changeset in webkit [265440] by Chris Dumez
  • 15 edits in trunk

Align existing AudioParam API with the specification
https://bugs.webkit.org/show_bug.cgi?id=215301

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-exceptional-values-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-exponentialRampToValueAtTime-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-linearRampToValueAtTime-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-method-chaining-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-audioparam-interface/audioparam-setValueCurve-exceptions-expected.txt:
  • web-platform-tests/webaudio/the-audio-api/the-pannernode-interface/panner-automation-position-expected.txt:

Source/WebCore:

Align existing AudioParam API with the specification:

In particular, the following changes were made:

This allows us to pass some more WPT webaudio tests.

No new tests, rebaselined existing tests.

  • Modules/webaudio/AudioParam.cpp:
  • Modules/webaudio/AudioParam.h:
  • Modules/webaudio/AudioParam.idl:
  • Modules/webaudio/AudioParamTimeline.cpp:

(WebCore::AudioParamTimeline::setValueAtTime):
(WebCore::AudioParamTimeline::linearRampToValueAtTime):
(WebCore::AudioParamTimeline::exponentialRampToValueAtTime):
(WebCore::AudioParamTimeline::setTargetAtTime):
(WebCore::AudioParamTimeline::setValueCurveAtTime):
(WebCore::AudioParamTimeline::insertEvent):
(WebCore::AudioParamTimeline::cancelScheduledValues):
(WebCore::AudioParamTimeline::valuesForTimeRangeImpl):

  • Modules/webaudio/AudioParamTimeline.h:

(WebCore::AudioParamTimeline::ParamEvent::ParamEvent):
(WebCore::AudioParamTimeline::ParamEvent::time const):
(WebCore::AudioParamTimeline::ParamEvent::duration const):
(WebCore::AudioParamTimeline::ParamEvent::curve):

LayoutTests:

Rebaseline existing test because I have switch the precision of the timeline times from float
to double. This introduced some very subtle differences but before / after audio files sound
the same.

  • platform/mac/webaudio/audiobuffersource-playbackrate-expected.wav:
12:25 PM Changeset in webkit [265439] by BJ Burg
  • 2 edits in trunk/Tools

Unreviewed, fix ordering of contributors.

  • Scripts/webkitpy/common/config/contributors.json:
10:55 AM Changeset in webkit [265438] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] imported/w3c/web-platform-tests/css/css-images/image-set/image-set-parsing.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=215326

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:49 AM Changeset in webkit [265437] by eric.carlson@apple.com
  • 4 edits in trunk/Source/WebCore

r262456 broke sites that expect webkitDisplayingFullscreen to be true almost immediately
https://bugs.webkit.org/show_bug.cgi?id=215240
<rdar://problem/66284042>

Reviewed by Darin Adler.

Add a quirk for sites that use the Akamai Media Player, which begins polling
webkitDisplayingFullscreen every 100ms immediately after entering video fullscreen
mode and exits fullscreen as soon as it returns false. r262456 changed the HTMLMediaPlayer
state machine so webkitDisplayingFullscreen doesn't return true until the fullscreen
window has been opened in the UI process. This was done to fix bugs triggered by
rapidly entering and exiting fullscreen and PiP and make our own fullscreen/PiP tests
less flakey, so instead of reverting the change universally do it as a quirk for sites
using the Akamai Media Player.

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::webkitDisplayingFullscreen):

  • page/Quirks.cpp:

(WebCore::Quirks::needsAkamaiMediaPlayerQuirk const):

  • page/Quirks.h:
10:25 AM Changeset in webkit [265436] by Chris Lord
  • 5 edits
    65 adds in trunk/LayoutTests/imported/w3c

Update WPT OffscreenCanvas tests to include manually written tests
https://bugs.webkit.org/show_bug.cgi?id=215322

Reviewed by Carlos Alberto Lopez Perez.

  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.html: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.html: Added.
  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/2d.gradient.conic.worker.js: Added.

(t_fail.t.step_func):
(t.step):

  • web-platform-tests/html/canvas/offscreen/fill-and-stroke-styles/w3c-import.log:
  • web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.w.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/convert-to-blob/w3c-import.log: Added.
  • web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.js: Added.

(getRegularContextForFilter):
(matchImageDataResults):
(createPatternCanvas):

  • web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/filter/offscreencanvas.filter.w.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/filter/w3c-import.log: Added.
  • web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/image-smoothing/image.smoothing.worker.js: Added.

(createTestImage):
(test):
(test.draw):

  • web-platform-tests/html/canvas/offscreen/manual/image-smoothing/w3c-import.log: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.commit.w.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.constructor.worker.js: Added.

(t1.step):
(t2.step):

  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js: Added.

(test):

  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.resize.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfercontrol.to.offscreen.w.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable.w.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/w3c-import.log: Added.
  • web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/manual/transformations/2d.transformation.getTransform.html: Added.
  • web-platform-tests/html/canvas/offscreen/manual/transformations/w3c-import.log: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.html: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker-expected.txt: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.html: Added.
  • web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.basic.worker.js: Added.

(t_fail.t.step_func):
(t.step):

  • web-platform-tests/html/canvas/offscreen/path-objects/w3c-import.log:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.html:
  • web-platform-tests/html/canvas/offscreen/text/2d.text.measure.width.space.worker.js:

(t.step):

10:05 AM Changeset in webkit [265435] by Hector Lopez
  • 2 edits in trunk/LayoutTests

[ iOS wk2 ] compositing/clipping/border-radius-on-webgl.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215324

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
9:58 AM Changeset in webkit [265434] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, unmark imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html as flaky.

  • platform/mac-wk2/TestExpectations:
9:51 AM Changeset in webkit [265433] by sihui_liu@apple.com
  • 4 edits in trunk/Source/WebKit

Always suspend IDB work when network process is prepared to suspend
https://bugs.webkit.org/show_bug.cgi?id=215239
<rdar://problem/65690450>

Reviewed by Geoffrey Garen.

We do not suspend IDB work in the network process when there is an ongoing transaction because the network
process is going to ask the UI process to hold a background process assertion for it. However, it is possible
that the request from the network process does not reach the UI process in time: RunningBoard may already decide
to suspend the network process after app is backgrounded and UI process drops the foreground assertion for the
network process.

In this case, IDB in the network process would continue its transaction and the network process will be killed
when it becomes suspened for holding database file locks. A network process crash can lead to a worse result
than suspending IDB work, which aborts ongoing transactions, because it will destroy all database connections
and transaction. Therefore, let's just suspend IDB work when the network process receives prepareToSuspend
message.

  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::suspend):

  • NetworkProcess/IndexedDB/WebIDBServer.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::prepareToSuspend):

9:41 AM Changeset in webkit [265432] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Return values of FontDatabase::collectionForFamily are not thread safe
https://bugs.webkit.org/show_bug.cgi?id=215320
<rdar://problem/66502539>

Reviewed by Anders Carlsson.

Font prewarming can add new entries to m_familyNameToFontDescriptors while lookups are being made.
Access to it is protected by a lock.

However if the hashmap ends up rehashing, the pointer returned from collectionForFamily may end up becoming invalid.
This can result in a crash later under findClosestFont.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontDatabase::collectionForFamily):

Heap allocate the hashmap values so they stay valid over hashtable mutations.

9:31 AM Changeset in webkit [265431] by achristensen@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r261159) PokerBros only shows black screen
https://bugs.webkit.org/show_bug.cgi?id=215293
<rdar://problem/66073740>

Reviewed by Keith Miller.

The PokerBros app has some logic that was broken by the change in behavior of r261159.
It caused the app do do nothing except show a black screen upon opening.
Revert to the old behavior for this app until they update to iOS14.

  • runtime/JSObject.cpp:

(JSC::needsOldStringName):
(JSC::JSObject::toStringName):

9:29 AM Changeset in webkit [265430] by Chris Dumez
  • 2 edits in trunk/LayoutTests/imported/w3c

Unreviewed, rebaseline imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam.html.

  • web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam-expected.txt:
8:29 AM Changeset in webkit [265429] by Hector Lopez
  • 2 edits in trunk/LayoutTests

REGRESSION [ macOS ] fullscreen/video-controls-rtl.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=214412

Unreviewed test gardening.

  • platform/mac/TestExpectations:
8:25 AM Changeset in webkit [265428] by Karl Rackler
  • 2 edits in trunk/LayoutTests

[ Win10 wk1 ews ] imported/blink/fast/css/fixed-overlaps-absolute-in-clip.html is a flaky image failure
https://bugs.webkit.org/show_bug.cgi?id=215172

Unreviewed test gardening.

  • platform/win/TestExpectations:
8:23 AM Changeset in webkit [265427] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Add required entitlement for Catalyst
https://bugs.webkit.org/show_bug.cgi?id=215244

Reviewed by Darin Adler.

The entitlement 'com.apple.private.webkit.use-xpc-endpoint' should be added to the WebContent process on Catalyst as well,
since it is needed on all Apple platforms. This entitlement is needed to support direct XPC communication between WebKit
processes, which is used to send the Launch Services database to the WebContent process from the Networking process. Also,
add some more logging related to this, to detect if it takes a long time for the WebContent process to receive the database.

  • Scripts/process-entitlements.sh:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::WebPage::platformDidReceiveLoadParameters):

7:52 AM Changeset in webkit [265426] by Karl Rackler
  • 2 edits in trunk/LayoutTests

[ Win10 wk1 ews ] webanimations/accelerated-animation-with-easing.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=215170

Unreviewed test gardening.

  • platform/win/TestExpectations:
2:21 AM Changeset in webkit [265425] by Diego Pino Garcia
  • 2 edits
    8 adds in trunk/LayoutTests

[GLIB] Unreviewed test gardening. Emit new baselines after r265403.

Some result values of tests failing are different in the WebKitGTK/WPE
ports, which makes the tests fail. However the total number of tests
passing and failing is the same as in the general baseline.

  • platform/glib/TestExpectations:
  • platform/glib/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audionode-interface/audionode-disconnect-audioparam-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-automation-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-highpass-expected.txt: Added.
  • platform/glib/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-lowpass-expected.txt: Added.
1:18 AM Changeset in webkit [265424] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/ios

REGRESSION (r265176): Cannot make or extend selections in iOS WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=215319
<rdar://problem/66688560>

Reviewed by Devin Rousso.

  • WebCoreSupport/WebVisiblePosition.mm:

(+[DOMRange rangeForFirstPosition:second:]):
We want to ensure that firstPosition is *before* secondPosition, so
the change in r265176 got the condition backwards. Swap it.

12:38 AM Changeset in webkit [265423] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] JSFinalObject::finishCreation's ASSERT has stale condition
https://bugs.webkit.org/show_bug.cgi?id=215317

Reviewed by Mark Lam.

JSFinalObject::finishCreation assumes that there is no out-of-line property storage (inline storage capacity == total storage capacity).
But this is wrong when passing Butterfly* parameter to JSFinalObject. Previously, this feature is not used and we instead used JSObject::createRawObject,
which bypasses this assertion. But now, we start using this when creating an object for MaterializeNewObject in DFG and FTL, and then we hit the crash
because this assertion does not consider about non-nullptr butterfly.

This patch makes create function explicit by introducing JSFinalObject::createWithButterfly, which is similar to JSArray::createWithButterfly.
And we fix the assertion by checking butterfly existence. By renaming JSFinalObject::create to JSFinalObject::createWithButterfly when getting butterfly,
this patch also clarifies that only MaterializeNewObject related functions, which were using JSObject::createRawObject to bypass this assertion, is passing
butterfly.

  • dfg/DFGOperations.cpp:
  • runtime/JSObject.h:

(JSC::JSFinalObject::createWithButterfly):
(JSC::JSFinalObject::create):

Aug 9, 2020:

10:12 PM Changeset in webkit [265422] by commit-queue@webkit.org
  • 15 edits
    1 copy
    1 move
    4 adds
    1 delete in trunk

[macOS] Drag/drop an image of a unsupported format to an file input element should convert it to a supported format
https://bugs.webkit.org/show_bug.cgi?id=212482
<rdar://problem/63731672>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-08-09
Reviewed by Darin Adler.

Source/WebCore:

Although the list of the dropped files are sent from the UI process to
the Web process through the WebPage channel, the file input settings are
only known by the Web process. So we have to do the image transcoding in
WebCore.

Tests: fast/forms/file/entries-api/image-no-transcode-drag-drop.html

fast/forms/file/entries-api/image-transcode-drag-drop.html

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/FileInputType.cpp:

(WebCore::FileInputType::handleDOMActivateEvent):
(WebCore::FileInputType::fileChooserSettings const):
Move filling FileChooserSettings to the function: fileChooserSettings().

(WebCore::FileInputType::applyFileChooserSettings):
Call fileChooserSettings() instead of receiving FileChooserSettings as
an argument.

(WebCore::FileInputType::filesChosen):
Add this function which can be called from receiveDroppedFiles() or
receiveDroppedFilesWithImageTranscoding().

(WebCore::FileInputType::receiveDroppedFilesWithImageTranscoding):
Finds out whether image transcoding is needed for the dropped files. If
it is needed, it will be done in a WorkQueue and call filesChosen() when
it is done. Otherwise it will call filesChosen() immediately.

(WebCore::FileInputType::receiveDroppedFiles):

  • html/FileInputType.h:
  • platform/graphics/ImageUtilities.h: Added.
  • platform/graphics/cg/ImageUtilitiesCG.cpp: Added.

(WebCore::sharedImageTranscodingQueue):
Provide a shared WorkQueue which can be used by WebCore and WebKit.

(WebCore::transcodeImage):
(WebCore::findImagesForTranscoding):
(WebCore::transcodeImages):

Source/WebKit:

Move ImageUtilities.h and ImageUtilitiesCG.cpp from WebKit to WebCore.
Use the image transcoding functions and shared WorkQueue from WebCore.

  • Platform/ImageUtilities.h: Removed.
  • Platform/cg: Removed.
  • SourcesCocoa.txt:
  • UIProcess/WebPageProxy.cpp:

(WebKit::m_limitsNavigationsToAppBoundDomains):
(WebKit::WebPageProxy::didChooseFilesForOpenPanelWithImageTranscoding):
(WebKit::m_transcodingQueue): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:

LayoutTests:

Enable the new tests on macOS WK1. eventSender.beginDragWithFiles is
supported on WK1 only.

  • fast/forms/file/entries-api/image-no-transcode-drag-drop-expected.txt: Added.
  • fast/forms/file/entries-api/image-no-transcode-drag-drop.html: Added.
  • fast/forms/file/entries-api/image-transcode-drag-drop-expected.txt: Added.
  • fast/forms/file/entries-api/image-transcode-drag-drop.html: Added.
  • platform/ios/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wincairo/TestExpectations:
  • platform/wk2/TestExpectations:
9:48 PM Changeset in webkit [265421] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r265392.
https://bugs.webkit.org/show_bug.cgi?id=215316

Crash ARM64 / ARM64E JSC tests

Reverted changeset:

"REGRESSION(r261159) PokerBros only shows black screen"
https://bugs.webkit.org/show_bug.cgi?id=215293
https://trac.webkit.org/changeset/265392

7:18 PM Changeset in webkit [265420] by Wenson Hsieh
  • 7 edits in trunk

REGRESSION (r260831): Web process crashes under Editor::setComposition() after navigating with marked text
https://bugs.webkit.org/show_bug.cgi?id=215315
<rdar://problem/64740092>

Reviewed by Darin Adler.

Source/WebCore:

To address a variety of crashes due to frames changing (or otherwise losing) their document while executing
editing commands, r260831 refactored the Editor class such that it extends the functionality of the Document
class, rather than the Frame class. In nearly all scenarios, this either leads to no behavior change or prevents
null pointer crashes, since a document is almost always attached to a frame when applying any editing commands.

However, there is one scenario where a document that has not yet been attached to its frame (and therefore does
not have a browsing context) will cause a null deref when trying to confirm an existing IME composition. The
logic added in <https://trac.webkit.org/r150291> will try and confirm any existing composition range on a
document right before committing provisional navigation. In the case where we are navigating back to a
previously visited page, m_frame's document in FrameLoader::commitProvisionalLoad() will not be attached
until the cached page's mainframe is opened underneath CachedPage::restore(). Since the call to
Editor::confirmComposition() currently happens before this step, we end up crashing while attempting to create
a UserTypingGestureIndicator. Note that even if we avoid this with a null check, we'll still end up crashing
shortly thereafter, underneath Editor::insertTextForConfirmedComposition. And even if this second crash is
avoided with another null check, we'll just end up with some version of webkit.org/b/59121, where the
composition range is present after navigation, but is out of sync with platform UI.

To fix the crash (and also not bring back bug #59121), we refactor this composition confirmation logic so that
it lives in Editor, and is also robust against the case where the document is not attached to a frame; we then
invoke this call after we're done committing the provisional load, so that any frame that is not yet attached
before commiting the load still has a chance to confirm its composition.

Test: WKWebViewMacEditingTests.ProcessSwapAfterSettingMarkedText

  • editing/Editor.cpp:

(WebCore::Editor::confirmCompositionAndNotifyClient):

Move functionality from willTransitionToCommitted to confirmCompositionAndNotifyClient, a helper method that
will bail if the document is not attached, but otherwise confirm the active composition (if it exists).

  • editing/Editor.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad):

Add a call to confirm the editor's current composition after we're done committing the load. Note that in the
case where we had a composition before committing the load, we'll end up confirming the composition earlier (in
the first call site), rather than confirming after the load has been committed. This means that this second call
will be a no-op, due to the editor not having any composition.

(WebCore::FrameLoader::willTransitionToCommitted): Deleted.

  • loader/FrameLoader.h:

Tools:

Add a new API that exercises the crash by:

  • Enabling PSON.
  • Navigating to page A and inserting some marked text.
  • Navigating to page B with a process swap (without confirming the marked text).
  • Navigating back to page A, and verifying that the previoulsy marked text is now committed.
  • TestWebKitAPI/Tests/mac/WKWebViewMacEditingTests.mm:
1:41 PM Changeset in webkit [265419] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Make CommandLine on Worker agent (JSC shell feature for testing) work on iOS
https://bugs.webkit.org/show_bug.cgi?id=215311
<rdar://problem/66660053>

Reviewed by Mark Lam.

We should not reconfigure Options since this is once initialized. Since Options are frozen,
this results in crash.

  • jsc.cpp:

(CommandLine::CommandLine):
(functionDollarAgentStart):

11:23 AM Changeset in webkit [265418] by Ben Nham
  • 4 edits in trunk/Source

Preload graphics drivers in Mac WebProcess
https://bugs.webkit.org/show_bug.cgi?id=215183

Reviewed by Darin Adler.

Source/WebCore:

In newer versions of Mac OS, graphics drivers are no longer part of the shared cache due to
size restrictions. This can cause first render to be blocked by ~10 ms when we dlopen those
drivers. To work around this, we preload the drivers when prewarming the WebProcess.

  • page/ProcessWarming.cpp:

(WebCore::ProcessWarming::prewarmGlobally):

Source/WTF:

Enable GPU driver preheating in versions of the OS that might not have the drivers in the dyld
shared cache due to size restrictions.

  • wtf/PlatformEnableCocoa.h:
8:34 AM Changeset in webkit [265417] by youenn@apple.com
  • 13 edits
    3 adds
    6 deletes in trunk

Always resolve ReadableStream's tee()'s cancel promise after the stream closes or errors
https://bugs.webkit.org/show_bug.cgi?id=215197

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/streams: Resynced to upstream WPT.

Source/WebCore:

Make sure to resolve the cancel promise if the source gets closed or errored.
Test: imported/w3c/web-platform-tests/streams/queuing-strategies-size-function-per-global.window.html

  • Modules/streams/ReadableStreamInternals.js:

(readableStreamTee):
(readableStreamTeePullFunction):

4:49 AM Changeset in webkit [265416] by commit-queue@webkit.org
  • 13 edits in trunk/Source

Unreviewed, reverting r263195, r263252, and r265394.
https://bugs.webkit.org/show_bug.cgi?id=215312

Revert all related GC Bitmap changes because some of perf is
not fully recovered

Reverted changesets:

"Replace JSC::FreeList linked list with a Bitmap."
https://bugs.webkit.org/show_bug.cgi?id=213071
https://trac.webkit.org/changeset/263195

"Unify Bitmap math loops in
MarkedBlock::Handle::specializedSweep()."
https://bugs.webkit.org/show_bug.cgi?id=213345
https://trac.webkit.org/changeset/263252

"[JSC] Disable ENABLE_BITMAP_FREELIST"
https://bugs.webkit.org/show_bug.cgi?id=215285
https://trac.webkit.org/changeset/265394

12:36 AM Changeset in webkit [265415] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

Update OriginalAdvancesForCharacterTreatedAsSpace to work correctly in the presence of inserted or removed glyphs
https://bugs.webkit.org/show_bug.cgi?id=215302

Reviewed by Darin Adler.

OriginalAdvancesForCharacterTreatedAsSpace is trying to make sure that shaping doesn't cause
spaces to get wider or thinner. However, the way it was doing that is, for all the space
characters, overwrite that glyph index's advance after shaping to be what it was before shaping.
However, this is wrong, because shaping can insert or delete glyphs. Instead, now that we have
explicit string indices for each glyph, we can use those to determine which glyphs come from
space characters. These glyphs are the ones which should be overwritten.

  • platform/graphics/WidthIterator.cpp:

(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::advanceInternal):

  • platform/graphics/WidthIterator.h:
Note: See TracTimeline for information about the timeline view.