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

Timeline



Feb 9, 2017:

11:57 PM Changeset in webkit [212082] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r211967 - [GTK] scroll with transparent background not repainted after scrollY >= 32768
https://bugs.webkit.org/show_bug.cgi?id=154283

Reviewed by Carlos Garcia Campos.

Due to a limitation of the pixman backend, which uses 16 bits to hold signed integers, cairo is
not able to draw anything when using transformation matrices with values bigger than 32768. When
drawing patterns into large pages, the matrices values can overflow those 16 bits, so cairo doesn't
draw anything in, which causes the reported transparent backgrounds.

The patch modifies the transformation matrices both from the current context and the pattern we
are painting, to avoid them to hold values that cannot stored in 16 bits.

There's still the possibility that this happens, but it would require using a pattern with a size
bigger than 32768.

Based on a previous patch by Gwang Yoon Hwang <yoon@igalia.com>.

No new tests.

  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::drawPatternToCairoContext):

11:53 PM Changeset in webkit [212081] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r211867 - [GTK] Reduce TiledBackingStore tile coverage when on memory pressure state
https://bugs.webkit.org/show_bug.cgi?id=167980

Reviewed by Carlos Garcia Campos.

Use a smaller coverAreaMultiplier in the TiledBackingStore when in memory pressure situation, to reduce
the amount of tiles created.

No new tests.

  • platform/graphics/texmap/coordinated/TiledBackingStore.cpp:

(WebCore::TiledBackingStore::createTilesIfNeeded):
(WebCore::TiledBackingStore::createTiles):

  • platform/graphics/texmap/coordinated/TiledBackingStore.h:
11:53 PM Changeset in webkit [212080] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r211721 - [GTK][EFL] Release unused UpdateAtlas when in memory pressure situation
https://bugs.webkit.org/show_bug.cgi?id=167872

Reviewed by Carlos Garcia Campos.

In a memory pressure situation, release all the unused UpdateAtlas as soon as possible, instead
of waiting 3 seconds before releasing them.

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
(WebKit::CompositingCoordinator::releaseAtlases):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
11:53 PM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
11:32 PM Changeset in webkit [212079] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r212024 - Tear down existing renderers when adding a shadow root.
https://bugs.webkit.org/show_bug.cgi?id=167117

Patch by Antti Koivisto <Antti Koivisto> on 2017-02-09
Reviewed by Andreas Kling.

Source/WebCore:

Adding a shadow root may cause children no longer be part of the flat tree. If they had renderers
tear down code would no longer reach them.

Test: fast/shadow-dom/attach-shadow-teardown.html

  • dom/Element.cpp:

(WebCore::Element::addShadowRoot):

Tear down existing render tree when adding a shadow root.

LayoutTests:

  • fast/shadow-dom/attach-shadow-teardown-expected.txt: Added.
  • fast/shadow-dom/attach-shadow-teardown.html: Added.
11:31 PM Changeset in webkit [212078] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r212023 - Handle synchronous layout when setting a selection range
https://bugs.webkit.org/show_bug.cgi?id=167092
<rdar://problem/30041640>

Reviewed by Antti Koivisto.

Source/WebCore:

The 'innerTextElement' of a form control can change during layout due
to arbitrary JavaScript executing. Handle the case where the inner text
element has changed so that current render box height is while setting
a selection range.

Test: fast/forms/input-type-change-during-selection.html

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setSelectionRange):

LayoutTests:

  • fast/forms/input-type-change-during-selection-expected.txt: Added.
  • fast/forms/input-type-change-during-selection.html: Added.
11:31 PM Changeset in webkit [212077] by Carlos Garcia Campos
  • 3 edits
    3 adds in releases/WebKitGTK/webkit-2.14

Merge r211999 - Disconnect shadow children of root when detaching a frame
https://bugs.webkit.org/show_bug.cgi?id=166851
<rdar://problem/29930443>

Reviewed by Andy Estes.

Source/WebCore:

If the root of the tree we are disconnecting has a shadow element, include it in the set of
things to disconnect.

Tests: fast/shadow-dom/shadow-at-root-during-disconnect.html

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::disconnectSubframes):

LayoutTests:

  • fast/shadow-dom/resources/start.html: Added.
  • fast/shadow-dom/shadow-at-root-during-disconnect-expected.txt: Added.
  • fast/shadow-dom/shadow-at-root-during-disconnect.html: Added.
11:12 PM Changeset in webkit [212076] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Update expectations of tests using CSS3 Text each-line and hanging indent.

  • platform/gtk/TestExpectations:
10:37 PM Changeset in webkit [212075] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211966. rdar://problem/30149422

10:37 PM Changeset in webkit [212074] by matthew_hanson@apple.com
  • 23 edits
    4 adds in branches/safari-603-branch

Merge r211965. rdar://problem/30149422

10:37 PM Changeset in webkit [212073] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch

Merge r211763. rdar://problem/30380075

10:37 PM Changeset in webkit [212072] by matthew_hanson@apple.com
  • 6 edits in branches/safari-603-branch

Merge r211382. rdar://problem/29738514

10:37 PM Changeset in webkit [212071] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/LayoutTests

Merge r211968. rdar://problem/28062149

10:37 PM Changeset in webkit [212070] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211957. rdar://problem/30029354

10:37 PM Changeset in webkit [212069] by matthew_hanson@apple.com
  • 11 edits
    4 adds in branches/safari-603-branch

Merge r211949. rdar://problem/30119483

10:37 PM Changeset in webkit [212068] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-603-branch

Merge r211926. rdar://problem/30275036

10:37 PM Changeset in webkit [212067] by matthew_hanson@apple.com
  • 4 edits in branches/safari-603-branch

Merge r211915. rdar://problem/27607520

10:37 PM Changeset in webkit [212066] by matthew_hanson@apple.com
  • 10 edits in branches/safari-603-branch

Merge r211913. rdar://problem/28062149

10:37 PM Changeset in webkit [212065] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211895. rdar://problem/30129966

10:37 PM Changeset in webkit [212064] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r211893. rdar://problem/30423806

10:36 PM Changeset in webkit [212063] by matthew_hanson@apple.com
  • 8 edits in branches/safari-603-branch

Merge r211891. rdar://problem/30423806

10:36 PM Changeset in webkit [212062] by matthew_hanson@apple.com
  • 3 edits in branches/safari-603-branch/Source/WebKit2

Merge r211094. rdar://problem/30423806

10:36 PM Changeset in webkit [212061] by matthew_hanson@apple.com
  • 3 edits in branches/safari-603-branch

Merge r211845. rdar://problem/30187368

10:36 PM Changeset in webkit [212060] by matthew_hanson@apple.com
  • 6 edits in branches/safari-603-branch/Source

Merge r211835. rdar://problem/27439617

10:36 PM Changeset in webkit [212059] by matthew_hanson@apple.com
  • 10 edits
    2 adds in branches/safari-603-branch

Merge r211758. rdar://problem/30096129

10:36 PM Changeset in webkit [212058] by matthew_hanson@apple.com
  • 12 edits
    1 add in branches/safari-603-branch/Source/WebKit2

Merge r211747. rdar://problem/30183825

10:36 PM Changeset in webkit [212057] by matthew_hanson@apple.com
  • 14 edits
    10 adds in branches/safari-603-branch

Merge r211746. rdar://problem/30107622

10:36 PM Changeset in webkit [212056] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r211736. rdar://problem/30229358

10:36 PM Changeset in webkit [212055] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211730. rdar://problem/30251840

10:36 PM Changeset in webkit [212054] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-603-branch

Merge r211667. rdar://problem/28193222

10:36 PM Changeset in webkit [212053] by matthew_hanson@apple.com
  • 8 edits in branches/safari-603-branch

Merge r211663. rdar://problem/30343810

10:36 PM Changeset in webkit [212052] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r211655. rdar://problem/30344753

10:36 PM Changeset in webkit [212051] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebKit2

Merge r211652. rdar://problem/30040618

10:36 PM Changeset in webkit [212050] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211625. rdar://problem/29168795

10:36 PM Changeset in webkit [212049] by matthew_hanson@apple.com
  • 19 edits
    2 copies in branches/safari-603-branch/Source

Merge r211622. rdar://problem/30116072

10:36 PM Changeset in webkit [212048] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch

Merge r211621. rdar://problem/30221102

10:35 PM Changeset in webkit [212047] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/Source/WebCore

Merge r211613. rdar://problem/30132707

10:35 PM Changeset in webkit [212046] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-603-branch

Merge r211564. rdar://problem/29012252

10:35 PM Changeset in webkit [212045] by matthew_hanson@apple.com
  • 38 edits
    8 adds in branches/safari-603-branch

Merge r211254. rdar://problem/30188490

10:35 PM Changeset in webkit [212044] by matthew_hanson@apple.com
  • 2 edits in branches/safari-603-branch/LayoutTests

Merge r211041. rdar://problem/29931587

9:26 PM Changeset in webkit [212043] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Improve IOSurfacePool logging
https://bugs.webkit.org/show_bug.cgi?id=168098

Reviewed by Tim Horton.

Pass a string to DUMP_POOL_STATISTICS so we can tell what's triggering the
logging.

  • platform/graphics/cg/IOSurfacePool.cpp:

(WebCore::IOSurfacePool::takeSurface):
(WebCore::IOSurfacePool::addSurface):
(WebCore::IOSurfacePool::evict):
(WebCore::IOSurfacePool::collectionTimerFired):
(WebCore::IOSurfacePool::showPoolStatistics):

  • platform/graphics/cg/IOSurfacePool.h:
9:08 PM Changeset in webkit [212042] by achristensen@apple.com
  • 9 edits in trunk

Unreviewed, rolling out r212040.

Broke build. I'm not surprised

Reverted changeset:

"[WebRTC][Mac] Activate libwebrtc"
https://bugs.webkit.org/show_bug.cgi?id=167293
http://trac.webkit.org/changeset/212040

8:00 PM Changeset in webkit [212041] by Chris Dumez
  • 19 edits
    4 adds in trunk

[Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames when missing
https://bugs.webkit.org/show_bug.cgi?id=168077
<rdar://problem/30412595>

Reviewed by Alex Christensen.

Source/WebCore:

Add utility function to MIMETypeRegistry that appends an extension to
a filename if necessary, based on a provided MIME type.

Tests: fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html

http/tests/download/anchor-download-no-extension.html

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):

  • platform/MIMETypeRegistry.h:
  • platform/cocoa/MIMETypeRegistryCocoa.mm:

(WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):

Source/WebKit2:

Use MIME type to add file extension to downloads' suggested filenames when missing:

This new behavior matches Chrome.

  • NetworkProcess/Downloads/BlobDownloadClient.cpp:

(WebKit::BlobDownloadClient::didReceiveResponseAsync):

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::didReceiveResponse):
(WebKit::Download::decideDestinationWithSuggestedFilename):

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::findPendingDownloadLocation):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxy.messages.in:

LayoutTests:

Rebaseline a couple of download tests where suggested filenames now have an extension
and extend test coverage.

  • fast/dom/HTMLAnchorElement/anchor-download-expected.txt:
  • fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click-expected.txt:
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension-expected.txt: Added.
  • fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html: Added.
  • fast/dom/HTMLAnchorElement/anchor-nodownload-set-expected.txt:
  • http/tests/download/anchor-download-no-extension-expected.txt: Added.
  • http/tests/download/anchor-download-no-extension.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
7:39 PM Changeset in webkit [212040] by achristensen@apple.com
  • 8 edits in trunk/Source

[WebRTC][Mac] Activate libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=167293

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-09
Reviewed by Alex Christensen.

Source/WebCore:

  • Configurations/WebCore.xcconfig:
  • Configurations/WebCoreTestSupport.xcconfig:

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h:

Source/WTF:

  • wtf/Platform.h:
7:33 PM Changeset in webkit [212039] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix libwebrtc build on case-sensitive file systems.

  • WebProcess/Network/webrtc/WebRTCMonitor.cpp:
7:27 PM Changeset in webkit [212038] by pdr@google.com
  • 3 edits
    2 adds in trunk

SVG clip-path references can clip out later content
https://bugs.webkit.org/show_bug.cgi?id=164181

Reviewed by Said Abou-Hallawa.

Source/WebCore:

RenderSVGResourceClipper can modify the GraphicsContext state (through the path-only
clipping codepath) so we need to ensure RenderLayer::setupClipPath saves the context
and its caller restores it back so later content is not clipped as well.

This patch is based on a chromium patch by fs@opera.com:
https://chromium.googlesource.com/chromium/src/+/b3f7e7d2c4afb3c7e5c7eb438ff5933cbe2109b3

Test: css3/masking/clip-path-reference-restore.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setupClipPath): Add a GC save and return true to restore. Also switch to downcast instead of static_cast.

LayoutTests:

Make sure applying multiple clip-path references does not clip out later content.

  • css3/masking/clip-path-reference-restore-expected.html: Added.
  • css3/masking/clip-path-reference-restore.html: Added.
7:02 PM Changeset in webkit [212037] by achristensen@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Fix El Capitan build.

  • libwebrtc.xcodeproj/project.pbxproj:

Remove more SSE4 code.

6:59 PM Changeset in webkit [212036] by achristensen@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Fix El Capitan build.

  • libwebrtc.xcodeproj/project.pbxproj:

Remove more SSE4 code.

6:42 PM Changeset in webkit [212035] by fpizlo@apple.com
  • 16 edits
    16 adds in trunk

SharedArrayBuffer does not need to be in the transfer list
https://bugs.webkit.org/show_bug.cgi?id=168079

Reviewed by Geoffrey Garen and Keith Miller.
Source/JavaScriptCore:


Exposes a simple shareWith() API for when you know you want to share the contents of
a shared buffer. Also a useful explicit operator bool.

  • runtime/ArrayBuffer.cpp:

(JSC::ArrayBuffer::shareWith):

  • runtime/ArrayBuffer.h:

(JSC::ArrayBufferContents::operator bool):

Source/WebCore:

Tests: workers/sab/multi-memory-multi-buffer.html

workers/sab/multi-memory.html
workers/sab/no-transfer.html
workers/sab/postMessage-clones.html
workers/sab/sent-from-worker-no-transfer.html
workers/sab/sent-from-worker-transfer.html

The SAB API that we originally implemented required that SABs get put in transfer lists
when they are sent to workers.

The new SAB API that everyone is converging towards requires that you do not put the
SAB in the transfer list. That's supposed to be an error. Instead, anytime that a SAB
is part of any message to or from a dedicated worker then it is automatically shared.

The new API provides a lot more clarity about what is supposed to happen in contexts
that support transfering but don't support sharing.

Right now this patch allows both styles to work, but I hope we can disable the transfer
list capability soon.

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::deserializeIDBValueToJSValue):

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::JSMessageEvent::data):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):

  • bindings/js/SerializedScriptValue.h:

(): Deleted.

  • dom/CustomEvent.cpp:

(WebCore::CustomEvent::trySerializeDetail):

  • dom/ErrorEvent.cpp:

(WebCore::ErrorEvent::trySerializeError):

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::trySerializeData):

  • dom/PopStateEvent.cpp:

(WebCore::PopStateEvent::trySerializeState):

  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::postMessage):

  • workers/Worker.cpp:

(WebCore::Worker::postMessage):

LayoutTests:


This adds tests that ensure that SABs behave correctly (are either cloned or shared)
depending on context, and that we currently share SABs whether they are in the transfer
list or not. This also adds tests for SABs being passed around via more complicated
data structures.

  • workers/sab/multi-memory-expected.txt: Added.
  • workers/sab/multi-memory-multi-buffer-expected.txt: Added.
  • workers/sab/multi-memory-multi-buffer.html: Added.
  • workers/sab/multi-memory-worker-1.js: Added.

(onmessage):

  • workers/sab/multi-memory-worker-2.js: Added.

(onmessage):

  • workers/sab/multi-memory.html: Added.
  • workers/sab/no-transfer-expected.txt: Added.
  • workers/sab/no-transfer.html: Added.
  • workers/sab/postMessage-clones-expected.txt: Added.
  • workers/sab/postMessage-clones.html: Added.
  • workers/sab/sab-creator-no-transfer.js: Added.
  • workers/sab/sab-creator-transfer.js: Added.
  • workers/sab/sent-from-worker-no-transfer-expected.txt: Added.
  • workers/sab/sent-from-worker-no-transfer.html: Added.
  • workers/sab/sent-from-worker-transfer-expected.txt: Added.
  • workers/sab/sent-from-worker-transfer.html: Added.
  • workers/sab/worker-resources.js:
6:35 PM Changeset in webkit [212034] by achristensen@apple.com
  • 2 edits in trunk/Tools

Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

  • Scripts/build-webkit:
6:35 PM Changeset in webkit [212033] by achristensen@apple.com
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Fix iOS and El Capitan builds of libwebrtc.

  • Configurations/libwebrtc.xcconfig:

Skip building audio_mixer_manager_mac.cc on iOS.

  • libwebrtc.xcodeproj/project.pbxproj:

El Capitan doesn't like the SSE4 optimizations in opus.
Just don't include them for now.

6:34 PM Changeset in webkit [212032] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

Unreviewed build fix after r212025.

inDocument -> isConnected

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::didMoveToNewDocument):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::formElementIndex):

6:29 PM Changeset in webkit [212031] by matthew_hanson@apple.com
  • 6 edits in tags/Safari-604.1.5.5.1/Source

Versioning.

6:21 PM Changeset in webkit [212030] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.5.5.1

Tag Safari-604.1.5.5.1.

6:21 PM Changeset in webkit [212029] by Brent Fulgham
  • 4 edits
    2 adds in trunk

Make sure Event keeps its current target element alive
https://bugs.webkit.org/show_bug.cgi?id=167885
<rdar://problem/30376972>

Patch by Chris Dumez <Chris Dumez> on 2017-02-09
Reviewed by Brent Fulgham.

Source/WebCore:

Make sure Event keeps its current target element alive to avoid
crashes if it is accessed by JS after it has been garbage collected.

Test: fast/events/currentTarget-gc-crash.html

  • dom/Event.cpp:

(WebCore::Event::setCurrentTarget):

  • dom/Event.h:

(WebCore::Event::currentTarget):

LayoutTests:

Add layout test reproducing the crash.

  • fast/events/currentTarget-gc-crash-expected.txt: Added.
  • fast/events/currentTarget-gc-crash.html: Added.
6:19 PM Changeset in webkit [212028] by Brent Fulgham
  • 6 edits
    4 adds in trunk

Crash in render tree after dynamically mutating the slot value
https://bugs.webkit.org/show_bug.cgi?id=167502

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2017-02-09
Reviewed by Antti Koivisto.

Source/WebCore:

The crash was caused by attributeChanged not destructing the render tree after an assigned element had been
removed from its slot. Since the style resolver can no longer find this element in the flat tree, we need to
delete its render object as if the element had been removed from the DOM tree.

Tests: fast/html/details-summary-slot.html

fast/shadow-dom/shadow-slot-attribute-change-crash.html

  • dom/Element.cpp:

(WebCore::Element::attributeChanged):

  • html/HTMLSummaryElement.cpp:

(WebCore::SummarySlotElement): Added. Always use the default slot regardless of the slot attribute's value.
(WebCore::HTMLSummaryElement::create): Use SummarySlotElement

LayoutTests:

Added regression tests for the crash, and one for assigning non-empty slot value to a child
of a summary element. The slot attribute should always be ignored since the fact summary
element has its own shadow tree is an implementation detail that should never be exposed.

  • fast/html/details-summary-slot-expected.html: Added.
  • fast/html/details-summary-slot.html: Added.
  • fast/shadow-dom/shadow-slot-attribute-change-crash-expected.txt: Added.
  • fast/shadow-dom/shadow-slot-attribute-change-crash.html: Added.
6:17 PM Changeset in webkit [212027] by Brent Fulgham
  • 3 edits
    4 adds in trunk

Details element doesn't work correctly when mutating content between closing and opening
https://bugs.webkit.org/show_bug.cgi?id=167310

Patch by Antti Koivisto <Antti Koivisto> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: fast/html/details-close-modify-open.html

fast/shadow-dom/slot-remove-mutate-add.html

  • dom/SlotAssignment.cpp:

(WebCore::SlotAssignment::didChangeSlot):

Always reset the slot assignment when content is mutated.

LayoutTests:

  • fast/html/details-close-modify-open-expected.html: Added.
  • fast/html/details-close-modify-open.html: Added.
  • fast/shadow-dom/slot-remove-mutate-add-expected.html: Added.
  • fast/shadow-dom/slot-remove-mutate-add.html: Added.
6:15 PM Changeset in webkit [212026] by Brent Fulgham
  • 4 edits
    2 adds in trunk

Crash under FormSubmission::create()
https://bugs.webkit.org/show_bug.cgi?id=167200
<rdar://problem/30096323>

Patch by Chris Dumez <Chris Dumez> on 2017-02-09
Reviewed by Darin Adler.

Source/WebCore:

The issue is that FormSubmission::create() was iterating over
form.associatedElements() as was calling Element::appendFormData()
in the loop. HTMLObjectElement::appendFormData() was calling
pluginWidget(PluginLoadingPolicy::Load) which causes a synchronous
layout and can fire events (such as focus event) synchronously.
Firing those events synchronously allows the JS to modify the
form.associatedElements() vector we are currently iterating on.

To avoid this issue, we now call pluginWidget(PluginLoadingPolicy::DoNotLoad)
in HTMLObjectElement::appendFormData() as we are not allowed to fire
synchronous events at this point. I also added a security assertion
in FormSubmission::create() to catch cases where we fire JS events
while iterating over the form associated elements to more easily
notice these things in the future.

Test: fast/forms/formsubmission-appendFormData-crash.html

  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::appendFormData):

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::create):

LayoutTests:

Add layout test coverage.

  • fast/forms/formsubmission-appendFormData-crash-expected.txt: Added.
  • fast/forms/formsubmission-appendFormData-crash.html: Added.
6:13 PM Changeset in webkit [212025] by Brent Fulgham
  • 4 edits
    2 adds in trunk

Crash under HTMLFormElement::registerFormElement()
https://bugs.webkit.org/show_bug.cgi?id=167162

Patch by Chris Dumez <Chris Dumez> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

didMoveToNewDocument() was re-registering FormAttributeTargetObserver
even if the element's inDocument was not set yet. As a result, it was
possible for FormAssociatedElement::resetFormOwner() to be called
when the element was in the tree but with its inDocument still being
false (because insertedInto() has not been called yet). This could
end up calling HTMLFormElement::registerFormElement() even though
the element is still recognized as detached. This is an issue because
HTMLFormElement::m_associatedElements's order and its corresponding
indexes (m_associatedElementsBeforeIndex / m_associatedElementsAfterIndex)
rely on the position of the element with regards to the form element
(before / inside / after).

To address the issue, we now only register the FormAttributeTargetObserver
in didMoveToNewDocument() if the inDocument flag is set to true. This
is similar to what is done at other call sites of
resetFormAttributeTargetObserver(). We also ignore the form content
attribute in HTMLFormElement::formElementIndex() if the element is
not connected.

As per the HTML specification [1], the form content attribute is only
taken if the element is connected (i.e. inDocument flag is true).

Note that FormAssociatedElement::findAssociatedForm() was already
ignoring the form content attribute if the element is disconnected.

[1] https://html.spec.whatwg.org/#reset-the-form-owner (step 3)

Test: fast/forms/registerFormElement-crash.html

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::didMoveToNewDocument):
Only call resetFormAttributeTargetObserver() if inDocument flag is set,
similarly to what is done at other call sites.

(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
Add an assertion to make sure no one call this method on an element that
is not connected.

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::formElementIndex):
Ignore the form content attribute if the element is not connected, as
per the HTML specification [1].

LayoutTests:

Add layout test coverage.

  • fast/forms/registerFormElement-crash-expected.txt: Added.
  • fast/forms/registerFormElement-crash.html: Added.
6:11 PM Changeset in webkit [212024] by Brent Fulgham
  • 3 edits
    2 adds in trunk

Tear down existing renderers when adding a shadow root.
https://bugs.webkit.org/show_bug.cgi?id=167117

Patch by Antti Koivisto <Antti Koivisto> on 2017-02-09
Reviewed by Andreas Kling.

Source/WebCore:

Adding a shadow root may cause children no longer be part of the flat tree. If they had renderers
tear down code would no longer reach them.

Test: fast/shadow-dom/attach-shadow-teardown.html

  • dom/Element.cpp:

(WebCore::Element::addShadowRoot):

Tear down existing render tree when adding a shadow root.

LayoutTests:

  • fast/shadow-dom/attach-shadow-teardown-expected.txt: Added.
  • fast/shadow-dom/attach-shadow-teardown.html: Added.
6:09 PM Changeset in webkit [212023] by Brent Fulgham
  • 3 edits
    2 adds in trunk

Handle synchronous layout when setting a selection range
https://bugs.webkit.org/show_bug.cgi?id=167092
<rdar://problem/30041640>

Reviewed by Antti Koivisto.

Source/WebCore:

The 'innerTextElement' of a form control can change during layout due
to arbitrary JavaScript executing. Handle the case where the inner text
element has changed so that current render box height is while setting
a selection range.

Test: fast/forms/input-type-change-during-selection.html

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setSelectionRange):

LayoutTests:

  • fast/forms/input-type-change-during-selection-expected.txt: Added.
  • fast/forms/input-type-change-during-selection.html: Added.
6:07 PM Changeset in webkit [212022] by Brent Fulgham
  • 3 edits
    1 add in trunk

B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
https://bugs.webkit.org/show_bug.cgi?id=167437
<rdar://problem/30198083>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo.

JSTests:

  • stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.

Source/JavaScriptCore:

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::deleteOrphans):

6:02 PM Changeset in webkit [212021] by Brent Fulgham
  • 3 edits
    1 add in trunk

Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list
https://bugs.webkit.org/show_bug.cgi?id=167319
<rdar://problem/30149432>

Patch by Saam Barati <sbarati@apple.com> on 2017-02-09
Reviewed by Mark Lam.

JSTests:

  • stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added.

(assert):
(assert.arguments):
(assert.b):
(x.arguments):
(x.b):
(x):

Source/JavaScriptCore:

When hoisting a function inside sloppy mode, we were assuming all "var"s are inside
what we call the "var" SymbolTableEntry. This was almost true, execpt for "arguments",
which has sufficiently weird behavior. "arguments" can be visible to the default
parameter expressions inside a function, therefore can't go inside the "var"
SymbolTableEntry since the parameter SymbolTableEntry comes before the "var"
SymbolTableEntry in the scope chain. Therefore, if we hoist a function named
"arguments", then we must also look for that variable inside the parameter scope
stack entry.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):

5:55 PM Changeset in webkit [212020] by keith_miller@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, fix test for new .caller with native code caller semantics.

  • js/dom/function-dot-arguments-and-caller.html:
5:54 PM Changeset in webkit [212019] by Brent Fulgham
  • 7 edits
    2 adds in trunk

Fix max length check in ArrayPrototype.js' concatSlowPath().
https://bugs.webkit.org/show_bug.cgi?id=167270
<rdar://problem/30128133>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo.

JSTests:

  • stress/array-prototype-concat-of-long-spliced-arrays.js: Added.
  • stress/array-prototype-concat-of-long-spliced-arrays2.js: Added.

Source/JavaScriptCore:

  1. Fixed concatSlowPath() to ensure that the result array length does not exceed @MAX_ARRAY_INDEX. The old code was checking against @MAX_SAFE_INTEGER in some cases, but this is overly permissive.
  1. Changed concatSlowPath() to throw a RangeError instead of a TypeError to be consistent with the C++ runtime functions in JSArray.cpp.
  1. Changed the RangeError message in concatSlowPath() and JSArray.cpp to "Length exceeded the maximum array length" when the error is that the result length exceeds MAX_ARRAY_INDEX. We do this for 2 reasons:
    1. "Length exceeded the maximum array length" is more informative than "Invalid array length".
    2. We want to use the same string consistently for the same error.

There are still 2 places in JSArray.cpp that still throws a RangeError with
message "Invalid array length". In those cases, the error is not necessarily
due to the result length exceeding MAX_ARRAY_INDEX, but is due to attempting to
set a length value that is not an integer that fits in MAX_ARRAY_INDEX e.g.
an attempt to set a fractional length value. Hence, "Invalid array length" is
appropriate for those cases.

  1. Fixed JSArray::appendMemcpy() to handle overflows when computing the result array length.
  • builtins/ArrayPrototype.js:

(concatSlowPath):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • runtime/ArrayPrototype.cpp:

(JSC::concatAppendOne):
(JSC::arrayProtoPrivateFuncAppendMemcpy):

  • runtime/JSArray.cpp:

(JSC::JSArray::appendMemcpy):
(JSC::JSArray::push):

5:49 PM Changeset in webkit [212018] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r211896. rdar://problem/29754721

5:49 PM Changeset in webkit [212017] by matthew_hanson@apple.com
  • 9 edits in branches/safari-603-branch/Source/JavaScriptCore

Merge r211642. rdar://problem/29542720

5:49 PM Changeset in webkit [212016] by matthew_hanson@apple.com
  • 17 edits
    5 adds in branches/safari-603-branch/Source

Merge r211603. rdar://problem/30318237

5:39 PM Changeset in webkit [212015] by Brent Fulgham
  • 16 edits
    2 adds in trunk

Constructed object's global object should be the global object of the constructor.
https://bugs.webkit.org/show_bug.cgi?id=167121
<rdar://problem/30054759>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo and Geoffrey Garen.

Source/JavaScriptCore:

The realm (i.e. globalObject) of any object should be the same as the constructor
that instantiated the object. Changed PrototypeMap::createEmptyStructure() to
be passed the correct globalObject to use instead of assuming it's the same one
as the prototype object.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecode/InternalFunctionAllocationProfile.h:

(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):

  • bytecode/ObjectAllocationProfile.h:

(JSC::ObjectAllocationProfile::initialize):

  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::initializeObjectAllocationProfile):

  • runtime/FunctionRareData.h:

(JSC::FunctionRareData::createInternalFunctionAllocationStructureFromBase):

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::createSubclassStructure):

  • runtime/IteratorOperations.cpp:

(JSC::createIteratorResultObjectStructure):

  • runtime/JSBoundFunction.cpp:

(JSC::getBoundFunctionStructure):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSProxy.cpp:

(JSC::JSProxy::setTarget):

  • runtime/ObjectConstructor.h:

(JSC::constructEmptyObject):

  • runtime/PrototypeMap.cpp:

(JSC::PrototypeMap::createEmptyStructure):
(JSC::PrototypeMap::emptyStructureForPrototypeFromBaseStructure):
(JSC::PrototypeMap::emptyObjectStructureForPrototype):
(JSC::PrototypeMap::clearEmptyObjectStructureForPrototype):

  • runtime/PrototypeMap.h:

LayoutTests:

  • http/tests/security/xssAuditor/regress-167121-expected.txt: Added.
  • http/tests/security/xssAuditor/regress-167121.html: Added.
5:33 PM Changeset in webkit [212014] by achristensen@apple.com
  • 2 edits in trunk/Tools

Don't build libwebrtc.

  • Scripts/build-webkit:

Not ready yet. It broke El Capitan and iOS.

5:27 PM Changeset in webkit [212013] by achristensen@apple.com
  • 6 edits in trunk/Source

Fix CMake build.

  • PlatformMac.cmake:
5:23 PM Changeset in webkit [212012] by Chris Dumez
  • 3 edits in trunk/LayoutTests

REGRESSION: LayoutTest http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=161650

Reviewed by Alexey Proskuryakov.

Make sure we clear the memory cache before trigerring new loads as this
test is meant to cover the disk cache.

  • http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html:
  • platform/mac/TestExpectations:
5:11 PM Changeset in webkit [212011] by achristensen@apple.com
  • 2 edits in trunk/Tools

Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

  • Scripts/build-webkit:
5:07 PM Changeset in webkit [212010] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/model/remote-object-weak-collection.html as a flaky timeout.

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:59 PM Changeset in webkit [212009] by Brent Fulgham
  • 3 edits
    1 add in trunk

We should not allow Function.caller to be used on native functions
https://bugs.webkit.org/show_bug.cgi?id=165628

Patch by Keith Miller <keith_miller@apple.com> on 2017-02-09
Reviewed by Mark Lam.

JSTests:

  • stress/caller-native-code.js: Added.

(f):

Source/JavaScriptCore:

Also remove unneeded dynamic cast.

  • runtime/JSFunction.cpp:

(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor):
(JSC::JSFunction::callerGetter):

4:52 PM Changeset in webkit [212008] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-604.1.5.5/Source/WebCore

Merge r211852. rdar://problem/30382347

4:49 PM Changeset in webkit [212007] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark pointer-lock/mouse-event-delivery.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167965

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:46 PM Changeset in webkit [212006] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/worker/resources-in-worker.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168091

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:42 PM Changeset in webkit [212005] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604.1.5-branch/Source/WebCore

Merge r211852. rdar://problem/30382347

4:42 PM Changeset in webkit [212004] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/debugger/breakpoint-columns.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=168090

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:41 PM Changeset in webkit [212003] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167186

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:38 PM Changeset in webkit [212002] by matthew_hanson@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

4:37 PM Changeset in webkit [212001] by achristensen@apple.com
  • 3 edits
    1 delete in trunk/Source/ThirdParty/libwebrtc

Fix warnings in libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=168088

Reviewed by Youenn Fablet.

  • Source/third_party/opus/src/src/opus_decoder.c:

Silence a warning. Debug builds of opus can be slow. No big deal.

  • libwebrtc.xcodeproj/project.pbxproj:

More sdk files need ARC.

4:21 PM Changeset in webkit [212000] by beidson@apple.com
  • 8 edits in trunk/Source

Transition "WebKit Library Version" checks to SDK version checks.
<rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056

Reviewed by Geoffrey Garen.

Source/WebKit2:

When doing linkedOnOrAfter checks, relying solely on the WebKit library version number is error prone,
since apps may not link against WebKit directly and therefore the linked WebKit is unknown.

We should first prefer a version check on the SDK that the app was built with.

If that check fails, we can fallback to the linked WebKit library version number if it exists.

  • Shared/Cocoa/CompletionHandlerCallChecker.mm:

(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

For each "linked-on-or-after" feature, include both the WebKit library version and SDK version:

  • UIProcess/Cocoa/VersionChecks.h:

(WebKit::linkedOnOrAfter):

  • UIProcess/Cocoa/VersionChecks.mm:

(WebKit::linkedOnOrAfter):
(WebKit::linkTimeVersion): Deleted.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::isNetworkCacheEnabled):

Source/WTF:

  • wtf/spi/darwin/dyldSPI.h: Add entries for the iOS 10.3, macOS 10.11, and macOS 10.12.4 SDKs.
4:11 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
4:11 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
4:10 PM Changeset in webkit [211999] by Brent Fulgham
  • 3 edits
    3 adds in trunk

Disconnect shadow children of root when detaching a frame
https://bugs.webkit.org/show_bug.cgi?id=166851
<rdar://problem/29930443>

Reviewed by Andy Estes.

Source/WebCore:

If the root of the tree we are disconnecting has a shadow element, include it in the set of
things to disconnect.

Tests: fast/shadow-dom/shadow-at-root-during-disconnect.html

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::disconnectSubframes):

LayoutTests:

  • fast/shadow-dom/resources/start.html: Added.
  • fast/shadow-dom/shadow-at-root-during-disconnect-expected.txt: Added.
  • fast/shadow-dom/shadow-at-root-during-disconnect.html: Added.
4:08 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
4:07 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
4:06 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
4:04 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:55 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:54 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:52 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:48 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:46 PM Changeset in webkit [211998] by commit-queue@webkit.org
  • 14 edits in trunk/Tools

Rename isAppleMacWebKit to isAppleCocoaWebKit
https://bugs.webkit.org/show_bug.cgi?id=168075

Patch by Alex Christensen <achristensen@webkit.org> on 2017-02-09
Reviewed by Geoffrey Garen.

It returns true for Mac and iOS. "isAppleMacWebKit" is confusing and wrong.

  • Scripts/build-api-tests:
  • Scripts/build-dumprendertree:
  • Scripts/build-jsc:

(buildMyProject):

  • Scripts/build-layouttestrelay:
  • Scripts/build-webkit:
  • Scripts/build-webkittestrunner:
  • Scripts/run-api-tests:

(isSupportedPlatform):
(runTest):
(listAllTests):
(prepareEnvironmentForRunningTestTool):

  • Scripts/run-content-extension-tester:
  • Scripts/run-javascriptcore-tests:
  • Scripts/run-minibrowser:
  • Scripts/show-pretty-diff:
  • Scripts/webkitdirs.pm:

(determineBaseProductDir):
(determineArchitecture):
(determinePassedArchitecture):
(safariPath):
(builtDylibPathForName):
(checkFrameworks):
(isAppleWebKit):
(isAppleCocoaWebKit):
(determineNmPath):
(launcherName):
(wrapperPrefixIfNeeded):
(isCMakeBuild):
(mobileSafariBundle):
(debugSafari):
(runSafari):
(runMiniBrowser):
(debugMiniBrowser):
(runWebKitTestRunner):
(debugWebKitTestRunner):
(isAppleMacWebKit): Deleted.

  • Scripts/webkitperl/FeatureList.pm:
3:40 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:39 PM Changeset in webkit [211997] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/contentextensions/async-xhr-onerror.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168081

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:36 PM Changeset in webkit [211996] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/contentextensions/invalid-selector.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168082

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:35 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:33 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:32 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:28 PM Changeset in webkit [211995] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/security/credentials-iframes.html as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=167967

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
3:24 PM UpdatingBugzilla edited by ddkilzer@apple.com
(diff)
3:18 PM Changeset in webkit [211994] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/css-grid-layout/grid-simplified-layout-positioned.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167538

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
2:19 PM Changeset in webkit [211993] by matthew_hanson@apple.com
  • 6 edits in branches/safari-604.1.5-branch/Source

Versioning.

2:06 PM Changeset in webkit [211992] by achristensen@apple.com
  • 2 edits in trunk/Tools

Revert r211991
https://bugs.webkit.org/show_bug.cgi?id=168062

  • Scripts/build-webkit:

Not quite ready yet.

1:48 PM Changeset in webkit [211991] by achristensen@apple.com
  • 2 edits in trunk/Tools

Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

  • Scripts/build-webkit:

Build libwebrtc on Mac when we build ANGLE.

1:47 PM Changeset in webkit [211990] by Ryan Haddad
  • 8 edits in trunk/Source

Unreviewed, rolling out r211980 and r211987.
https://bugs.webkit.org/show_bug.cgi?id=168072

Caused API test WebKit2.DuplicateCompletionHandlerCalls to
fail (Requested by ryanhaddad on #webkit).

Reverted changesets:

"Transition "WebKit Library Version" checks to SDK version
checks."
https://bugs.webkit.org/show_bug.cgi?id=168056
http://trac.webkit.org/changeset/211980

"Build fix for APPLE_INTERNAL_SDK builds after r211980."
http://trac.webkit.org/changeset/211987

Patch by Commit Queue <commit-queue@webkit.org> on 2017-02-09

1:34 PM Changeset in webkit [211989] by ap@apple.com
  • 7 edits in trunk/Source

Remove unused WebThreadRunSync
https://bugs.webkit.org/show_bug.cgi?id=168024

Reviewed by Tim Horton.

Source/WebCore:

  • platform/ios/wak/WebCoreThreadRun.cpp:
  • platform/ios/wak/WebCoreThreadRun.h:
  • platform/ios/wak/WebCoreThreadSystemInterface.cpp:

(InitWebCoreThreadSystemInterface):

Source/WTF:

  • wtf/ios/WebCoreThread.cpp:
  • wtf/ios/WebCoreThread.h:
1:33 PM Changeset in webkit [211988] by achristensen@apple.com
  • 4 edits in trunk

Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

.:

  • Source/Makefile:

Source/ThirdParty:

  • Makefile:
1:32 PM Changeset in webkit [211987] by beidson@apple.com
  • 2 edits in trunk/Source/WTF

Build fix for APPLE_INTERNAL_SDK builds after r211980.

Unreviewed.

  • wtf/spi/darwin/dyldSPI.h:
1:31 PM Changeset in webkit [211986] by Ryan Haddad
  • 11 edits
    2 deletes in trunk

Unreviewed, rolling out r211802.

This change caused fast/regions/inline-block-inside-anonymous-
overflow-with-covered-controls.html to be a flaky failure.

Reverted changeset:

"[Modern Media Controls] Improve handling of <video> with only
audio tracks"
https://bugs.webkit.org/show_bug.cgi?id=167836
http://trac.webkit.org/changeset/211802

1:20 PM Changeset in webkit [211985] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/media/track-in-band-hls-metadata-crash.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=167749

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:20 PM Changeset in webkit [211984] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark two scroll-snap tests as flaky.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:11 PM Changeset in webkit [211983] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark inspector/unit-tests/heap-snapshot.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168065

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:11 PM Changeset in webkit [211982] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark two performance-api tests as flaky.

Unreviewed test gardening.

1:10 PM Changeset in webkit [211981] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix i386 libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=168038

  • Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:

DataChannelInterface::buffered_amount returns a uint64_t, and we want a size_t.
If this overflows, then we've run out of memory and crashed a long time ago.

12:37 PM Changeset in webkit [211980] by beidson@apple.com
  • 8 edits in trunk/Source

Transition "WebKit Library Version" checks to SDK version checks.
<rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056

Reviewed by Geoffrey Garen.

Source/WebKit2:

Library version linkedOnOrAfter checks are error prone since apps may not link directly to WebKit.

We always know what version of the SDK an app was built with, so we should use SDK version checks
whenever possible.

  • Shared/Cocoa/CompletionHandlerCallChecker.mm:

(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

Add SDKVersion form of the linkedOnOrAfter check, and transition over the current Library Version checks:

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

(WebKit::linkedOnOrAfter):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::isNetworkCacheEnabled):

Source/WTF:

  • wtf/spi/darwin/dyldSPI.h: Add entries for the iOS 10.3, macOS 10.11, and macOS 10.12.4 SDKs.
12:32 PM Changeset in webkit [211979] by akling@apple.com
  • 15 edits in trunk/Source/WebCore

Document::settings() should return a const Settings&.
<https://webkit.org/b/168061>

Reviewed by Geoffrey Garen.

  • Make Document::settings() return a const reference.
  • Added Document::mutableSettings() for all your non-const needs.
  • Fixed up settings generator to produce const getters.
  • Simplify a few settings() call sites that exposed themselves.
  • Modules/applepay/ApplePaySession.cpp:

(WebCore::shouldDiscloseApplePayCapability):

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::canCallGetUserMedia):

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::appendSources):

  • css/CSSFontSelector.cpp:

(WebCore::resolveGenericFamily):

  • css/StyleResolver.h:

(WebCore::StyleResolver::settings):

  • dom/Document.h:

(WebCore::Document::settings):
(WebCore::Document::mutableSettings):

  • html/FTPDirectoryDocument.cpp:

(WebCore::createTemplateDocumentData):

  • html/HTMLCanvasElement.cpp:

(WebCore::shouldEnableWebGL):

  • html/HTMLEmbedElement.cpp:

(WebCore::HTMLEmbedElement::rendererIsNeeded):

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::menuListDefaultEventHandler):

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::updateDuringParsing):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtocol):

  • page/make_settings.pl:

(printGetterAndSetter):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::toggleSimpleLineLayout):

12:28 PM Changeset in webkit [211978] by jer.noble@apple.com
  • 11 edits in trunk/Source/WebCore

Make passing PlatformAudioData in audioSamplesAvaliable const-correct.
https://bugs.webkit.org/show_bug.cgi?id=168051

Reviewed by Eric Carlson.

Modify all the functions which take a (conceptually) read-only audio buffer const-correct.

Drive-by fix: AudioSampleBufferList::copyFrom() set a ivar pointer to the passed in
AudioBufferList. Ensure that the ivar is reset when copyFrom() returns by using a
SetForScope.

  • platform/audio/mac/AudioSampleBufferList.cpp:

(WebCore::AudioSampleBufferList::copyFrom):

  • platform/audio/mac/AudioSampleBufferList.h:
  • platform/audio/mac/AudioSampleDataSource.cpp:

(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pushSamples):

  • platform/audio/mac/AudioSampleDataSource.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::audioSamplesAvailable):

  • platform/mediastream/RealtimeMediaSource.h:

(WebCore::RealtimeMediaSource::Observer::audioSamplesAvailable):

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:

(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
  • platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:

(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):

  • platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
12:22 PM Changeset in webkit [211977] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Fix some logging statements in MediaPlayerPrivateMediaStreamAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=168063

Reviewed by Eric Carlson.

Make the format string match the types passed in (i.e., floats, not strings).

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateSampleTimes):

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

Web Inspector: changing dock side from windowed to bottom should cause split console to collapse on Timeline and Network tabs
https://bugs.webkit.org/show_bug.cgi?id=167841

Patch by Devin Rousso <Devin Rousso> on 2017-02-09
Reviewed by Matt Baker.

  • UserInterface/Base/Main.js:

(WebInspector.updateDockedState):

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

Skip media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html.

Unreviewed test gardening.

This test relies on touch events.

  • platform/ios-simulator/TestExpectations:
12:10 PM Changeset in webkit [211974] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream Mac] Handle NULL m_sampleBufferDisplayLayer
https://bugs.webkit.org/show_bug.cgi?id=168060

Reviewed by Jer Noble.

No new tests, this avoids an occasional crash on the bots.

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerStatusDidChange): Don't assume
m_sampleBufferDisplayLayer is valid.

11:29 AM Changeset in webkit [211973] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Option+hover on -webkit-transform in Styles sidebar underlines only half the property
https://bugs.webkit.org/show_bug.cgi?id=167949

Patch by Devin Rousso <Devin Rousso> on 2017-02-09
Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/CodeMirrorTokenTrackingController.js:

(WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
Attempt to merge tokens (specifically the text and start values) if the either the
previous or next token is of the type "meta".

11:23 AM Changeset in webkit [211972] by achristensen@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Fix iOS libwebrtc build after r211960
https://bugs.webkit.org/show_bug.cgi?id=168038

  • Source/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.h:

GlContextType declaration needs to be platform specific here like it is in RTCOpenGLDefines.h

11:10 AM Changeset in webkit [211971] by Ryan Haddad
  • 3 edits in branches/safari-603-branch/LayoutTests/imported/w3c

Rebaseline tests for rdar://problem/30181081.

Unreviewed test gardening.

  • web-platform-tests/fetch/api/basic/request-upload-expected.txt:
  • web-platform-tests/fetch/api/basic/request-upload-worker-expected.txt:
10:54 AM Changeset in webkit [211970] by Chris Dumez
  • 8 edits in trunk

Object.getPrototypeOf(NodeFilter) should be Function.prototype, not Object.prototype
https://bugs.webkit.org/show_bug.cgi?id=167964

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline web platform test now that more checks are passing.

  • web-platform-tests/dom/interfaces-expected.txt:

Source/WebCore:

Object.getPrototypeOf(NodeFilter) should be Function.prototype, not Object.prototype
after the following WebIDL spec change:

This aligns our behavior with other browsers as the spec has been updated to match
the majority.

No new tests, rebaselined existing test.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorHelperMethods):

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

(WebCore::JSTestCallbackInterfaceConstructor::prototypeForStructure):

LayoutTests:

Rebaseline existing tests now that output differs a bit.

  • http/tests/security/cross-frame-access-put-expected.txt:
  • platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
10:50 AM Changeset in webkit [211969] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.5.5

Tag Safari-604.1.5.5.

10:15 AM Changeset in webkit [211968] by Yusuke Suzuki
  • 2 edits in trunk/LayoutTests

Unreviewed, fix module test that has a meaningless onload handler
https://bugs.webkit.org/show_bug.cgi?id=161291

  • http/tests/misc/module-absolute-url.html:
10:11 AM Changeset in webkit [211967] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] scroll with transparent background not repainted after scrollY >= 32768
https://bugs.webkit.org/show_bug.cgi?id=154283

Reviewed by Carlos Garcia Campos.

Due to a limitation of the pixman backend, which uses 16 bits to hold signed integers, cairo is
not able to draw anything when using transformation matrices with values bigger than 32768. When
drawing patterns into large pages, the matrices values can overflow those 16 bits, so cairo doesn't
draw anything in, which causes the reported transparent backgrounds.

The patch modifies the transformation matrices both from the current context and the pattern we
are painting, to avoid them to hold values that cannot stored in 16 bits.

There's still the possibility that this happens, but it would require using a pattern with a size
bigger than 32768.

Based on a previous patch by Gwang Yoon Hwang <yoon@igalia.com>.

No new tests.

  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::drawPatternToCairoContext):

10:10 AM Changeset in webkit [211966] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r211965.

  • dom/Document.cpp:

(WebCore::Document::adoptNode): inDocument -> isConnected

9:59 AM Changeset in webkit [211965] by Brent Fulgham
  • 23 edits
    4 adds in trunk

Adopting a child node of a script element can run script
https://bugs.webkit.org/show_bug.cgi?id=167318

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2017-02-09
Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by ScriptElement::childrenChanged indiscriminately running the script.
Do this only if some node has been inserted as spec'ed:

https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model
"The script element is connected and a node or document fragment is inserted into
the script element, after any script elements inserted at that time."

Split NonContentsChildChanged into NonContentsChildInserted and NonContentsChildRemoved to disambiguate
non-contents child such as text and element being removed or inserted. New behavior matches that of
Gecko and Chrome as well as the latest HTML5 specification.

Also deploy NoEventDispatchAssertion in more places. Unfortunately, this results in some DOM trees
internal to WebKit to be mutated while there is NoEventDispatchAssertion in the stack. Added a new RAII
object "EventAllowedScope" to temporarily disable this assertion within such a tree. CachedSVGFont's
ensureCustomFontData used to completely disable this assertion but we no longer have to do this either.

To clarify the new semantics, renamed isEventDispatchForbidden to isEventAllowedInMainThread with
the negated boolean value, and added a new variant isEventDispatchAllowedInSubtree, which checks
isEventDispatchForbidden() is true or if the node was one of an internal DOM node or its descendent
held by EventAllowedScope.

Inspired by https://chromium.googlesource.com/chromium/src/+/604e798ec6ee30f44d57a5c4a44ce3dab3a871ed

Tests: fast/html/script-must-not-run-when-child-is-adopted.html

fast/html/script-must-not-run-when-child-is-removed.html

  • dom/CharacterData.cpp:

(WebCore::CharacterData::notifyParentAfterChange): Added NoEventDispatchAssertion.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::insertBefore): Added NoEventDispatchAssertion around TreeScope's adoptIfNeeded
and insertBeforeCommon as done elsewhere.
(WebCore::ContainerNode::appendChildCommon): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::changeForChildInsertion): Use NonContentsChildInserted here.
(WebCore::ContainerNode::notifyChildRemoved): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::replaceChild): Moved adoptIfNeeded into NoEventDispatchAssertion.
(WebCore::ContainerNode::removeChild): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::parserRemoveChild): Added NoEventDispatchAssertion.
(WebCore::ContainerNode::removeChildren): Call childrenChanged in NoEventDispatchAssertion.
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck): Moved adoptIfNeeded into
NoEventDispatchAssertion.
(WebCore::dispatchChildInsertionEvents): Check the forbidden-ness more precisely.
(WebCore::dispatchChildRemovalEvents): Ditto.

  • dom/ContainerNode.h:

(WebCore::ContainerNode::ChildChange::isInsertion): Added.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyChildNodeInserted): Check the forbidden-ness more precisely. Here, we check against
insertionPoint since EventAllowedScope checks against the root node.

  • dom/Document.cpp:

(WebCore::Document::adoptNode): Assert the node to be adopted has not been inserted back, or else
remove() had resulted in an exception before calling TreeScope::adoptIfNeeded.

  • dom/Element.cpp:

(WebCore::Element::childrenChanged):

  • dom/NoEventDispatchAssertion.h:

(WebCore::NoEventDispatchAssertion::isEventDispatchForbidden): Added a new variant that takes a node.
If this node is a descendent of a node "marked as safe" by EventAllowedScope, then we don't consider
the event dispatch to be forbidden.
(WebCore::NoEventDispatchAssertion::dropTemporarily): Deleted.
(WebCore::NoEventDispatchAssertion::restoreDropped): Deleted.
(WebCore::NoEventDispatchAssertion::EventAllowedScope): Added. A RAII object which marks descendants of
a given node as "safe" for the purpose of checking isEventDispatchForbidden.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::EventAllowedScope): Added. There can be a chain
of EventAllowedScope objects in the stack. s_currentScope points to the most recently instantiated
RAII object, and each instance remembers prior instance.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::~EventAllowedScope): Added.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::isAllowedNode): Added. Returns true if the given
node is a descendent of any node held by instances of EventAllowedScope.
(WebCore::NoEventDispatchAssertion::EventAllowedScope::isAllowedNodeInternal): Added. A helper function
for isAllowedNode.

  • dom/Node.cpp:

(WebCore::Node::dispatchSubtreeModifiedEvent): Check the forbidden-ness more precisely.

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::childrenChanged): Only prepare the script if we've inserted nodes.
(WebCore::ScriptElement::executeClassicScript): Assert isEventDispatchForbidden is false since running
arbitrary author scripts can, indeed, result dispatch any events.

  • dom/ScriptElement.h:
  • html/HTMLElement.cpp:

(WebCore::textToFragment): Made this a static local function and not return an exception since there
is no way appendChild called in this function can throw an exception.
(WebCore::HTMLElement::setInnerText): Create EventAllowedScope for the fragment. It's called called by
HTMLTextAreaElement's childrenChanged to update its UA shadow tree, and it's dispatching as event on
a new fragment can't execute arbitrary scripts since it has never been exposed to author scripts.
Because of the precise-ness of this check, this does not disable the assertion for "this" element.
HTMLTextFormControlElement::setInnerTextValue explicitly creates another EventAllowedScope to mark
the shadow tree into which the fragment is inserted safe.
(WebCore::HTMLElement::setOuterText):

  • html/HTMLElement.h:
  • html/HTMLScriptElement.cpp:

(WebCore::HTMLScriptElement::childrenChanged):

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setInnerTextValue): See above (setInnerText).

  • html/track/VTTCue.cpp:

(WebCore::VTTCue::createCueRenderingTree): Create EventAllowedScope for the cloned fragment here since
the VTT tree is never exposed to author scripts.
(WebCore::VTTCue::updateDisplayTree): Ditto.

  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::ensureCustomFontData): Use EventAllowedScope to disable assertions only on
the new SVG document we just created instead of disabling for all DOM trees.

  • svg/SVGScriptElement.cpp:

(WebCore::SVGScriptElement::childrenChanged):

LayoutTests:

Added regression tests for adopting or removing a child node of a script element.
The script must not run when nodes are adopted or removed.

  • fast/html/script-must-not-run-when-child-is-adopted-expected.txt: Added.
  • fast/html/script-must-not-run-when-child-is-adopted.html: Added.
  • fast/html/script-must-not-run-when-child-is-removed-expected.txt: Added.
  • fast/html/script-must-not-run-when-child-is-removed.html: Added.
9:47 AM Changeset in webkit [211964] by akling@apple.com
  • 47 edits in trunk/Source/WebCore

Document should always have a Settings.
<https://webkit.org/b/120172>

Reviewed by Antti Koivisto.

Since a Document can't move between Frames, and it's either frameless
or partnered with a Frame provided at construction time, we know that
it will never need to switch between different Settings objects either.

Give Document a Ref<Settings> that contains either the Frame's Settings
or a default-constructed Settings object if frameless.
Document::settings() is promoted to a reference getter.

The bulk of this patch is removing now-unnecessary null checks.

  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:

(WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory):

  • Modules/plugins/PluginReplacement.h:

(WebCore::ReplacementPlugin::isEnabledBySettings):

  • Modules/plugins/QuickTimePluginReplacement.h:
  • Modules/plugins/QuickTimePluginReplacement.mm:

(WebCore::QuickTimePluginReplacement::isEnabledBySettings):

  • Modules/plugins/YouTubePluginReplacement.cpp:

(WebCore::YouTubePluginReplacement::isEnabledBySettings):

  • Modules/plugins/YouTubePluginReplacement.h:
  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::constructCommon):

  • bindings/js/CachedScriptFetcher.cpp:

(WebCore::CachedScriptFetcher::requestScriptWithCache):

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::appendSources):
(WebCore::CSSFontFace::webFontsShouldAlwaysFallBack):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::fallbackFontCount):
(WebCore::CSSFontSelector::fallbackFontAt):

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertResize):

  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyValueFontFamily):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::defaultStyleForElement):
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::checkForGenericFamilyChange):
(WebCore::StyleResolver::initializeFontStyle):

  • css/StyleResolver.h:

(WebCore::StyleResolver::settings):
(WebCore::StyleResolver::documentSettings): Deleted.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):

  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::setReadyState):
(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::defaultCharsetForLegacyBindings):
(WebCore::Document::recalcStyle):
(WebCore::Document::implicitClose):
(WebCore::Document::minimumLayoutDelay):
(WebCore::Document::setDomain):
(WebCore::Document::audioPlaybackRequiresUserGesture):
(WebCore::Document::videoPlaybackRequiresUserGesture):
(WebCore::Document::storageBlockingStateDidChange):
(WebCore::Document::isTelephoneNumberParsingEnabled):
(WebCore::Document::initSecurityContext):
(WebCore::Document::initDNSPrefetch):
(WebCore::Document::getCachedLocale):
(WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox):
(WebCore::Document::settings): Deleted.

  • dom/Document.h:

(WebCore::Document::settings):

  • dom/Element.cpp:

(WebCore::subpixelMetricsEnabled):

  • dom/ExtensionStyleSheets.cpp:

(WebCore::ExtensionStyleSheets::pageUserSheet):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::dispatchErrorEvent):

  • dom/ScriptableDocumentParser.cpp:

(WebCore::ScriptableDocumentParser::ScriptableDocumentParser):

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::requestAnimationFrameEnabled):

  • dom/make_names.pl:

(printConstructorInterior):

  • editing/Editor.cpp:
  • editing/markup.cpp:

(WebCore::createMarkupInternal):

  • html/FTPDirectoryDocument.cpp:

(WebCore::createTemplateDocumentData):

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::setActive):
(WebCore::HTMLAnchorElement::sendPings):
(WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):

  • html/HTMLAppletElement.cpp:

(WebCore::HTMLAppletElement::canEmbedJava):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::getContext2d):
(WebCore::shouldEnableWebGL):
(WebCore::HTMLCanvasElement::shouldAccelerate):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::submitImplicitly):

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::setLocation):

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::updateImageControls):

  • html/HTMLImageLoader.cpp:

(WebCore::HTMLImageLoader::sourceURI):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::setupDateTimeChooserParameters):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory):
(WebCore::HTMLMediaElement::mediaPlayerAcceleratedCompositingEnabled):
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::exitFullscreen):
(WebCore::HTMLMediaElement::mediaPlayerNeedsSiteSpecificHacks):
(WebCore::HTMLMediaElement::mediaPlayerNetworkInterfaceName):
(WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor):
(WebCore::HTMLMediaElement::doesHaveAttribute):

  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::HTMLVideoElement):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
(WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
(WebCore::MediaElementSession::allowsAutomaticMediaDataLoading):
(WebCore::MediaElementSession::allowsPictureInPicture):
(WebCore::MediaElementSession::maximumMediaSourceBufferSize):

  • html/parser/HTMLParserOptions.cpp:

(WebCore::HTMLParserOptions::HTMLParserOptions):

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::loadLink):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtocol):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::toggleSimpleLineLayout):

  • style/StyleFontSizeFunctions.cpp:

(WebCore::Style::computedFontSizeFromSpecifiedSize):
(WebCore::Style::fontSizeForKeyword):
(WebCore::Style::legacyFontSizeForPixelSize):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::collectActiveStyleSheets):

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::usesDashboardBackwardCompatibilityMode):

9:36 AM Changeset in webkit [211963] by Antti Koivisto
  • 6 edits in trunk/Source

Use all cacheable speculatively loaded responses
https://bugs.webkit.org/show_bug.cgi?id=168052

Reviewed by Andreas Kling.

Source/WebCore:

  • platform/network/CacheValidation.cpp:

(WebCore::isStatusCodeCacheableByDefault):
(WebCore::isStatusCodePotentiallyCacheable):

Moved here from WebKit2.

  • platform/network/CacheValidation.h:

Source/WebKit2:

We currently only allow 200 responses. There is no reason not to use speculative responses
that have other cacheable status codes. This is helpful for 204s and 404s.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::makeStoreDecision):
(WebKit::NetworkCache::isStatusCodeCacheableByDefault): Deleted.
(WebKit::NetworkCache::isStatusCodePotentiallyCacheable): Deleted.

Move to CacheValidation.h/cpp

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):

Allow all cacheable-by-default responses.

9:29 AM Changeset in webkit [211962] by eric.carlson@apple.com
  • 20 edits
    6 deletes in trunk

[MediaStream] Remove legacy Navigator.webkitGetUserMedia
https://bugs.webkit.org/show_bug.cgi?id=168016
Source/WebCore:

Reviewed by Youenn Fablet.

No new tests, existing tests updated.

  • WebCore.xcodeproj/project.pbxproj: NavigatorUserMedia.
  • DerivedSources.make: Ditto.
  • CMakeLists.txt: Ditto.
  • Modules/mediastream/NavigatorUserMedia.idl: Removed.
  • Modules/mediastream/NavigatorUserMedia.js: Removed.
  • WebCore.xcodeproj/project.pbxproj:
  • page/Navigator.idl: Add some whitespace to force derived sources to be rebuild correctly.

Source/WebInspectorUI:

Reviewed by Youenn Fablet.

  • UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

<rdar://problem/30431544>

Reviewed by Youenn Fablet.

Update valid tests to use navigator.mediaDevices.getUserMedia. Remove tests
specific to Navigator.webkitGetUserMedia.

  • fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
  • fast/mediastream/argument-types.html: Removed.
  • fast/mediastream/delayed-permission-allowed.html:
  • fast/mediastream/delayed-permission-denied.html:
  • fast/mediastream/enabled-expected.txt:
  • fast/mediastream/error.html:
  • fast/mediastream/getusermedia.html: Removed.
  • fast/mediastream/script-tests/argument-types.js: Removed.
  • fast/mediastream/script-tests/enabled.js:

(hasGetUserMediaProperty):

  • fast/mediastream/success.html:
  • fast/mediastream/webkitGetUserMedia-shadowing-then.html: Removed.
  • http/tests/media/media-stream/disconnected-frame-already-expected.txt:
  • http/tests/media/media-stream/disconnected-frame-already.html:
  • http/tests/media/media-stream/disconnected-frame-permission-denied.html:
  • http/tests/media/media-stream/disconnected-frame.html:
9:13 AM Changeset in webkit [211961] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[Modern Media Controls] Tapping the skip back button on iOS inline media controls make the controls disappear
https://bugs.webkit.org/show_bug.cgi?id=168049
<rdar://problem/30442660>

Patch by Antoine Quint <Antoine Quint> on 2017-02-09
Reviewed by Eric Carlson.

Source/WebCore:

Calling elementAtPoint() on the Document will not return an element in the ShadowRoot,
we need to call it on the ShadowRoot. So we now iterate over ancestors of the controls
bar to find the ShadowRoot, if any, and check whether the tapped element is contained
within the controls bar. We only fade the controls bar out if the tapped element is
outside of the controls bar hierarchy.

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

  • Modules/modern-media-controls/controls/controls-bar.js:

(ControlsBar.prototype.gestureRecognizerStateDidChange):

LayoutTests:

Add a new iOS-specific test that checks that tapping a button does not automatically dismisses the controls bar.

  • media/modern-media-controls/media-controller/media-controller-ios-do-not-hide-controls-when-tapping-button-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-ios-do-not-hide-controls-when-tapping-button.html: Added.
  • platform/mac/TestExpectations:
8:37 AM Changeset in webkit [211960] by achristensen@apple.com
  • 48 edits in trunk/Source/ThirdParty/libwebrtc

Fix i386 libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=168038

Reviewed by Geoffrey Garen.

Unfortunately, 32-bit ObjC can't use all the coolest new features of ObjC.
Fortunately, we can move things around a bit to become valid old ObjC.

  • Source/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCAudioSource.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCFileLogger.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCI420Shader.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCMediaConstraints.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCMediaSource+Private.h:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCMediaSource.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCMediaStream.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCMediaStreamTrack+Private.h:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCMediaStreamTrack.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.h:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCOpenGLVideoRenderer.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCPeerConnectionFactory.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCRtpReceiver.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCRtpSender.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCShader.h:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCVideoFrame.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCVideoRendererAdapter.h:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCVideoRendererAdapter.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCVideoSource.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/RTCVideoTrack.mm:
  • Source/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioTrack.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCConfiguration.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFileLogger.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIceCandidate.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIceServer.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaConstraints.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaSource.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaStream.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpParameters.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpSender.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCSessionDescription.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoTrack.h:

Make code compile for i386.

  • libwebrtc.xcodeproj/project.pbxproj:

Added missing headers so Xcode can search them.

8:33 AM Changeset in webkit [211959] by jer.noble@apple.com
  • 16 edits
    3 adds in trunk/Source/WebCore

Configure MockRealtimeAudioSourceMac to generate stereo audio
https://bugs.webkit.org/show_bug.cgi?id=168027

Reviewed by Eric Carlson.

Update MockRealtimeAudioSourceMac to generate stereo audio.

First, because the pattern of creating a AudioBufferList structure (with all it's quirks and
weird requirements) was repeated multiple places, add a new wrapper around ABL called
WebAudioBufferList which takes care of correctly initializing the ABL structure and manages
the lifetime of its data members.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/PlatformAudioData.h: Added.

(WebCore::PlatformAudioData::kind):

  • platform/audio/WebAudioBufferList.cpp: Added.

(WebCore::WebAudioBufferList::WebAudioBufferList):
(WebCore::WebAudioBufferList::buffers):
(WebCore::WebAudioBufferList::bufferCount):
(WebCore::WebAudioBufferList::buffer):

  • platform/audio/WebAudioBufferList.h: Added.

(WebCore::WebAudioBufferList::list):
(WebCore::WebAudioBufferList::operator AudioBufferList&):
(WebCore::WebAudioBufferList::kind):
(isType):

Then update existing code to work in terms of WebAudioBufferList:

  • platform/audio/mac/AudioSampleBufferList.cpp:

(WebCore::AudioSampleBufferList::AudioSampleBufferList):
(WebCore::AudioSampleBufferList::mixFrom):
(WebCore::AudioSampleBufferList::copyFrom):
(WebCore::AudioSampleBufferList::copyTo):
(WebCore::AudioSampleBufferList::reset):
(WebCore::AudioSampleBufferList::configureBufferListForStream): Deleted.

  • platform/audio/mac/AudioSampleBufferList.h:

(WebCore::AudioSampleBufferList::bufferList):

  • platform/audio/mac/AudioSampleDataSource.cpp:

(WebCore::AudioSampleDataSource::pushSamples):

  • platform/audio/mac/AudioSampleDataSource.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::audioSamplesAvailable):

  • platform/mediastream/RealtimeMediaSource.h:

(WebCore::RealtimeMediaSource::Observer::audioSamplesAvailable):

  • platform/mediastream/mac/AVAudioCaptureSource.h:
  • platform/mediastream/mac/AVAudioCaptureSource.mm:

(WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection):

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:

(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
  • platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:

(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):

  • platform/mediastream/mac/RealtimeOutgoingAudioSource.h:

Finally, actually update MockRealtimeAudioSource to emit stereo samples. Importantly, set
the correct values for the m_streamFormat; mBytesPerFrame and mBytesPerPacket are not
multiplied by the channelCount. When generating audio, write to both channels of data.

  • platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
  • platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:

(WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
(WebCore::MockRealtimeAudioSourceMac::reconfigure):
(WebCore::MockRealtimeAudioSourceMac::render):

8:32 AM Changeset in webkit [211958] by Carlos Garcia Campos
  • 11 edits
    12 adds in releases/WebKitGTK/webkit-2.14

Merge r209145 - Use 'childOfType' template when retrieving Shadow DOM elements
https://bugs.webkit.org/show_bug.cgi?id=165145
<rdar://problem/29331830>

Reviewed by Antti Koivisto.

Source/WebCore:

Tests: fast/shadow-dom/color-input-element-shadow-manipulation.html

fast/shadow-dom/file-input-element-shadow-manipulation.html
fast/shadow-dom/keygen-shadow-manipulation.html
fast/shadow-dom/media-shadow-manipulation.html
fast/shadow-dom/range-input-element-shadow-manipulation.html
fast/shadow-dom/textarea-shadow-manipulation.html

Switch to using 'childOfType' when retrieving Shadow DOM elements, rather
than relying on expected element positions, as these can be changed by
JavaScript.

Drive by fix: Make more use of is<> and downcast<> templates rather than blindly casting.

  • dom/Element.h:

(WebCore::Element::isUploadButton): Added.
(WebCore::Element::isSliderContainerElement): Added.

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::shadowColorSwatch): Use 'childOfType' rather than assuming
the first child is the one we want.

  • html/FileInputType.cpp:

(isType): Added.
(WebCore::FileInputType::disabledAttributeChanged): Use 'childOfType' rather than assuming
the first child is the one we want.
(WebCore::FileInputType::multipleAttributeChanged): Ditto.

  • html/HTMLKeygenElement.cpp:

(WebCore::HTMLKeygenElement::shadowSelect): Ditto.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaControls): Ditto.
(WebCore::HTMLMediaElement::hasMediaControls): Ditto.

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::innerTextElement): Ditto.

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::sliderTrackElement): Ditto.

  • html/shadow/SliderThumbElement.h:

(isType): Added.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::targetClone): Use 'childOfType' rather than assuming
the first child is the one we want.

LayoutTests:

  • fast/shadow-dom/color-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/color-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/file-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/file-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/keygen-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/keygen-shadow-manipulation.html: Added.
  • fast/shadow-dom/media-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/media-shadow-manipulation.html: Added.
  • fast/shadow-dom/range-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/range-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/textarea-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/textarea-shadow-manipulation.html: Added.
8:32 AM Changeset in webkit [211957] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Nullptr crash under styleForFirstLetter
https://bugs.webkit.org/show_bug.cgi?id=167756
rdar://problem/30029354

Reviewed by Zalan Bujtas.

Don't know how we get here. Paper over the crash.

  • rendering/RenderBlock.cpp:

(WebCore::styleForFirstLetter):

Use parent first line style if we compute null style for the first letter renderer.

8:22 AM Changeset in webkit [211956] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Skip tests that require UIScriptController::zoomToScale.

  • platform/gtk/TestExpectations:
8:20 AM Changeset in webkit [211955] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

[Modern Media Controls] Playing an <audio> element on iOS makes the controls disappear
https://bugs.webkit.org/show_bug.cgi?id=168047
<rdar://problem/30441939>

Reviewed by Eric Carlson.

Source/WebCore:

The controls bar auto-hide behavior is disabled for <audio> elements, but on iOS we have
a TapGestureRecognizer to identify when controls are tapped to toggle controls visibility.
This gesture recognizer would be on at all times, but it should only be enabled when
fadesToIdle is set to true.

Test: media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html

  • Modules/modern-media-controls/controls/controls-bar.js:

(ControlsBar.prototype.set fadesWhileIdle):

LayoutTests:

Add a new iOS-specific test that checks the TapGestureRecognizer is only enabled when
fadesToIdle is true.

  • media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-ios-only-enable-tap-gesture-recognizer-with-fades-when-idle.html: Added.
  • platform/mac/TestExpectations:
8:03 AM Changeset in webkit [211954] by commit-queue@webkit.org
  • 5 edits in trunk

Improve W3C importer command line options
https://bugs.webkit.org/show_bug.cgi?id=167448

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-09
Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • resources/TestRepositories: Skipped module generation and gitignore generation for the moment.

Tools:

Making the list of test paths to import the main arguments of the script.
Allow passing the source directory to import as a -s option.
Adding a warning when given test paths are skipped by default in ImportExpectations.

Making link conversion off by default when importing from a specific directory since this script is mostly used with web-platform-tests.
Link conversion rules do not change when imported tests are downloaded by the script.

  • Scripts/webkitpy/w3c/test_importer.py:

(main):
(parse_args):
(TestImporter.init):
(TestImporter.do_import):
(TestImporter):
(TestImporter.check_imported_expectations):

7:59 AM Changeset in webkit [211953] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[Modern Media Controls] <audio> element does not show any background on iOS
https://bugs.webkit.org/show_bug.cgi?id=168046
<rdar://problem/30441872>

Patch by Antoine Quint <Antoine Quint> on 2017-02-09
Reviewed by Eric Carlson.

Source/WebCore:

Use a solid gray background for <audio> elements on iOS.

Test: media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-audio-background.html

  • Modules/modern-media-controls/controls/ios-inline-media-controls.css:

(:host(audio) .media-controls.ios.inline > .controls-bar:before):

LayoutTests:

Add an iOS-specific test that checks that <audio> elements have a solid gray background.

  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-audio-background-expected.txt: Added.
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-audio-background.html: Added.
  • platform/mac/TestExpectations:
7:13 AM Changeset in webkit [211952] by commit-queue@webkit.org
  • 12 edits
    2 adds in trunk

[Modern Media Controls] Controls fail to instantiate in an XHTML document
https://bugs.webkit.org/show_bug.cgi?id=168045
<rdar://problem/30290095>

Patch by Antoine Quint <Antoine Quint> on 2017-02-09
Reviewed by Eric Carlson.

Source/WebCore:

Always use valid HTML and XHTML strings when creating HTML elements.

Test: media/modern-media-controls/media-controller/media-controller-in-xhtml.xhtml

  • Modules/modern-media-controls/controls/button.js:

(Button):

  • Modules/modern-media-controls/controls/buttons-container.js:
  • Modules/modern-media-controls/controls/controls-bar.js:
  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:
  • Modules/modern-media-controls/controls/media-controls.js:
  • Modules/modern-media-controls/controls/slider.js:
  • Modules/modern-media-controls/controls/status-label.js:
  • Modules/modern-media-controls/controls/time-control.js:
  • Modules/modern-media-controls/controls/time-label.js:
  • Modules/modern-media-controls/controls/tracks-panel.js:

LayoutTests:

Add a new test to check that controls are created correctly when the media element
is hosted in an XHTML document.

  • media/modern-media-controls/media-controller/media-controller-in-xhtml-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-in-xhtml.xhtml: Added.
6:43 AM Changeset in webkit [211951] by Carlos Garcia Campos
  • 2 edits
    5 deletes in trunk/LayoutTests

Unreviewed GTK+ gardening. Update tests that pass now with the URLParser enabled.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate-expected.txt: Removed.
  • platform/gtk/fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate-expected.txt: Removed.
  • platform/gtk/fast/loader/url-parse-1-expected.txt: Removed.
  • platform/gtk/fast/loader/window-open-to-invalid-url-calls-policy-delegate-expected.txt: Removed.
  • platform/gtk/fast/url/invalid-idn-expected.txt: Removed.
  • platform/gtk/fast/url/segments-userinfo-vs-host-expected.txt: Removed.
  • platform/gtk/fast/url/tab-and-newline-stripping-expected.txt: Removed.
  • platform/gtk/fast/url/url-credentials-escaping-expected.txt: Removed.
5:57 AM Changeset in webkit [211950] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix typo in comment

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::replaceDocument):

5:55 AM Changeset in webkit [211949] by akling@apple.com
  • 11 edits
    4 adds in trunk

Disallow accelerated rendering for ginormous 2D canvases.
<https://webkit.org/b/167968>
<rdar://problem/30119483>

Reviewed by Antti Koivisto.

Source/WebCore:

Add a "maximumAccelerated2dCanvasSize" setting that defaults to 5120x2880
which is the 5K resolution for 16:9.

Also added a way to include the "accelerates drawing" flag in layer tree dumps.

Test: compositing/canvas/accelerated-canvas-compositing-size-limit.html

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::shouldAccelerate):

  • page/Frame.h:
  • page/Settings.in:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties):

  • platform/graphics/GraphicsLayerClient.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerTreeAsText):

  • testing/Internals.cpp:

(WebCore::toLayerTreeFlags):

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

LayoutTests:

Add a simple test that documents the fact that we no longer accelerate canvases
larger than 5120x2880.

  • compositing/canvas/accelerated-canvas-compositing-size-limit-expected.txt: Added.
  • compositing/canvas/accelerated-canvas-compositing-size-limit.html: Added.
  • platform/ios-simulator/compositing/canvas/accelerated-canvas-compositing-size-limit-expected.txt: Added.
5:52 AM Changeset in webkit [211948] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Add expectations for more tests that require drag and drop.

  • platform/gtk/TestExpectations:
4:20 AM Changeset in webkit [211947] by tpopela@redhat.com
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix gtk-doc warning

html/WebKitSettings.html:4435: warning: no link for: 'api-index-2.3' -> (2.3).

  • UIProcess/API/gtk/WebKitSettings.cpp:

(webkit_settings_class_init):

3:09 AM Changeset in webkit [211946] by Antti Koivisto
  • 51 edits in trunk/Source

Remove most cases of #if ENABLE(CACHE_PARTITIONING)
https://bugs.webkit.org/show_bug.cgi?id=167990

Reviewed by Sam Weinig.

Source/WebCore:

We'll just return empty string for the partition if partitioning is not enabled.

  • html/DOMURL.cpp:

(WebCore::DOMURL::revokeObjectURL):

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResource):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::create):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::url):
(WebCore::CachedResource::cachePartition):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::setDomainForCachePartition):

  • loader/cache/CachedResourceRequest.h:
  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequestImpl):
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::removeResourcesWithOrigin):
(WebCore::MemoryCache::removeResourcesWithOrigins):
(WebCore::MemoryCache::getOriginsWithCache):
(WebCore::MemoryCache::originsWithCache):

  • loader/cache/MemoryCache.h:
  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::domainForCachePartition):

  • page/SecurityOrigin.h:
  • platform/SchemeRegistry.cpp:

(WebCore::cachePartitioningSchemes):
(WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme):

  • platform/SchemeRegistry.h:
  • platform/ios/WebCoreSystemInterfaceIOS.mm:
  • platform/mac/WebCoreSystemInterface.h:
  • platform/mac/WebCoreSystemInterface.mm:
  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setAsIsolatedCopy):
(WebCore::ResourceRequestBase::setCachePartition):
(WebCore::ResourceRequestBase::partitionName):

  • platform/network/ResourceRequestBase.h:

(WebCore::ResourceRequestBase::cachePartition):
(WebCore::ResourceRequestBase::setDomainForCachePartition):

  • platform/network/cf/ResourceRequest.h:

(WebCore::ResourceRequest::cachePartition): Deleted.
(WebCore::ResourceRequest::setCachePartition): Deleted.
(WebCore::ResourceRequest::setDomainForCachePartition): Deleted.

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::partitionName): Deleted.
(WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy): Deleted.

  • platform/network/cf/ResourceResponse.h:
  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):

  • testing/Internals.cpp:

(WebCore::Internals::isLoadingFromMemoryCache):

Source/WebKit/mac:

  • Misc/WebCache.mm:

(+[WebCache addImageToCache:forURL:forFrame:]):
(+[WebCache removeImageFromCacheForURL:forFrame:]):

  • WebCoreSupport/WebSystemInterface.mm:

(InitWebCoreSystemInterface):

Source/WebKit2:

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::makeCacheKey):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::constructRevalidationRequest):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ResourceRequest>::encode):
(IPC::ArgumentCoder<ResourceRequest>::decode):

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/API/C/WKContext.cpp:

(WKContextRegisterURLSchemeAsCachePartitioned):

  • UIProcess/WebProcessPool.cpp:

(WebKit::m_hiddenPageThrottlingTimer):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::registerURLSchemeAsCachePartitioned):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:

(InitWebCoreSystemInterface):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsCachePartitioned):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
2:41 AM Changeset in webkit [211945] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Add Web Bluetooth as Not Considering
https://bugs.webkit.org/show_bug.cgi?id=168042

Reviewed by Yusuke Suzuki.

Add Web Bluetooth as a feature not being considered to be implemented in WebKit.

  • features.json:
12:57 AM Changeset in webkit [211944] by Carlos Garcia Campos
  • 5 edits
    3 adds in releases/WebKitGTK/webkit-2.14

Merge r210122 - Nested calls to setDocument can omit firing 'unload' events
https://bugs.webkit.org/show_bug.cgi?id=166422
<rdar://problem/29763012>

Reviewed by Alex Christensen.

Source/WebCore:

Test: fast/loader/nested-document-handling.html

Only allow a single document change to be taking place during a given runloop cycle.

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeIfJavaScriptURL): Block script changing the document
when we are in the middle of changing the document.

  • page/Frame.cpp:

(WebCore::Frame::setDocument): Keep track of document change state.

  • page/Frame.h:

LayoutTests:

  • fast/loader/nested-document-handling-expected.txt: Added.
  • fast/loader/nested-document-handling.html: Added.
  • fast/loader/resources/subframe-success.html: Added.
12:56 AM Changeset in webkit [211943] by Carlos Garcia Campos
  • 38 edits
    8 adds in releases/WebKitGTK/webkit-2.14

Merge r211254 - Crash when navigating back to a page in PacheCache when one of its frames has been removed
https://bugs.webkit.org/show_bug.cgi?id=167421
<rdar://problem/30188490>

Reviewed by Darin Adler.

Source/WebCore:

Disallow page caching of a page if:

  1. The main window has an opener (i.e. it was opened via window.open)
  2. It has ever used window.open()

This is because allowing page caching in this case would allow such
windows to script each other even after one of them entered Page
Cache. Allowing this is dangerous and easily causes crashes.

This is a short term workaround until we find a better solution to
the problem. One issue is this workaround is that navigating back
to a page that has an opener or used window.open() will not longer
get the page from PageCache. As a result, state may be lost upon
navigating back. However, we never guarantee that pages get page
cached, and Chrome does not have a PageCache.

Tests: fast/history/page-cache-after-window-open.html

fast/history/page-cache-back-navigation-crash.html
fast/history/page-cache-with-opener.html

  • dom/Document.cpp:

(WebCore::Document::hasEverCalledWindowOpen):
(WebCore::Document::markHasCalledWindowOpen):

  • dom/Document.h:
  • history/PageCache.cpp:

(WebCore::canCachePage):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::hasCalledWindowOpenKey):
(WebCore::DiagnosticLoggingKeys::hasOpenerKey):

  • page/DiagnosticLoggingKeys.h:
  • page/Page.cpp:

(WebCore::Page::openedByWindowOpen):

  • page/Page.h:
  • page/Settings.in:

Source/WebKit/mac:

Add a new setting allowing layout tests to enable PageCache in a window
that has an opener, for convenience.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences allowsPageCacheWithWindowOpener]):
(-[WebPreferences setAllowsPageCacheWithWindowOpener:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit/win:

Add a new setting allowing layout tests to enable PageCache in a window
that has an opener, for convenience.

  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):

  • WebPreferences.h:

Source/WebKit2:

Add a new setting allowing layout tests to enable PageCache in a window
that has an opener, for convenience.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetAllowsPageCacheWithWindowOpener):
(WKPreferencesGetAllowsPageCacheWithWindowOpener):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Add a new setting allowing layout tests to enable PageCache in a window
that has an opener, for convenience.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

  • fast/history/page-cache-after-window-open-expected.txt: Added.
  • fast/history/page-cache-after-window-open.html: Added.
  • fast/history/page-cache-back-navigation-crash-expected.txt: Added.
  • fast/history/page-cache-back-navigation-crash.html: Added.
  • fast/history/page-cache-with-opener-expected.txt: Added.
  • fast/history/page-cache-with-opener.html: Added.
  • fast/history/resources/page-cache-window-with-iframe.html: Added.
  • fast/history/resources/page-cache-window-with-opener.html: Added.

Add layout test coverage.

  • editing/mac/input/unconfirmed-text-navigation-with-page-cache.html:
  • fast/harness/page-cache-crash-on-data-urls.html:
  • fast/harness/use-page-cache.html:
  • fast/history/page-cache-after-window-open-expected.txt: Added.
  • fast/history/page-cache-after-window-open.html: Added.
  • fast/history/page-cache-with-opener-expected.txt: Added.
  • fast/history/page-cache-with-opener.html: Added.
  • fast/history/resources/page-cache-window-with-opener.html: Added.
  • fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html:
  • fast/loader/stateobjects/popstate-fires-with-page-cache.html:
  • tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:

These tests relied on using window.open() to test PageCache for convenience. They now
need to override a setting in order to be allowed to do so.

12:56 AM Changeset in webkit [211942] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r210120 - Do not destroy the RenderNamedFlowFragment as leftover anonymous block.
https://bugs.webkit.org/show_bug.cgi?id=166436
rdar://problem/29772233

Reviewed by Simon Fraser.

Source/WebCore:

When as the result of certain style change, the generated anonymous block is not needed anymore, we
move its descendants up to the parent and destroy the generated box. While RenderNamedFlowFragment is a generated
block, the cleanup code should just ignore it the same way we ignore boxes like multicolumn, mathml etc.

Test: fast/regions/flow-fragment-as-anonymous-block-crash.html

  • rendering/RenderObject.h:

(WebCore::RenderObject::isAnonymousBlock):

LayoutTests:

  • fast/regions/flow-fragment-as-anonymous-block-crash-expected.txt: Added.
  • fast/regions/flow-fragment-as-anonymous-block-crash.html: Added.
12:56 AM Changeset in webkit [211941] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r209926 - Defer certain accessibility callbacks until after layout is finished.
https://bugs.webkit.org/show_bug.cgi?id=165861
rdar://problem/29646301

Reviewed by Chris Fleizach.

Source/WebCore:

Currently with certain AXObjectCache callbacks, we can end up in a layout while the render tree is being mutated.
This patch ensures that such callbacks are deferred until after tree mutation/layout is finished.

Test: accessibility/accessibility-crash-with-dynamic-inline-content.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::performDeferredIsIgnoredChange):
(WebCore::AXObjectCache::insertDeferredIsIgnoredChange):

  • accessibility/AXObjectCache.h:
  • page/FrameView.cpp:

(WebCore::FrameView::performPostLayoutTasks):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::deleteLines):

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::createAndAppendRootInlineBox):

LayoutTests:

  • accessibility/accessibility-crash-with-dynamic-inline-content-expected.txt: Added.
  • accessibility/accessibility-crash-with-dynamic-inline-content.html: Added.
12:55 AM Changeset in webkit [211940] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r210288 - Correct DOMWindow handling during FrameLoader::clear
https://bugs.webkit.org/show_bug.cgi?id=166357
<rdar://problem/29741862>

Reviewed by Andy Estes.

Make sure that we always clean up the DOM window when clearing Window properties, even if the document will
remain in the page cache. Since 'clearWindowShell' is only used in FrameLoader, divide it's beahvior into
two steps:

  1. Rename 'clearWindowShell' to 'clearWIndowShellsNotMatchingDOMWindow' to better describe its function.

Switch to a modern C++ loop. Do not switch to the new DOMWindow here, but detach and clear existing
DOMWindow connections.

  1. Add a new method 'setDOMWindowForWindowShell'. Complete switch to the new DOMWindow.

This change allows us to disconnect the old DOMWindow, perform the 'setDocument(nullptr)' operation, and then
connect to the new Window without leaving the loader in an inconsistent state.

  • loader/bindings/js/ScriptController.cpp:

(WebCore::clearWindowShellsNotMatchingDOMWindow): Renamed from 'clearWindowShell'
(WebCore::setDOMWindowForWindowShell): Added.

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

(WebCore::FrameLoader::clear): Revise to use the new two-step DOMWindow switch logic.

12:55 AM Changeset in webkit [211939] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r209990 - Side effects while restting form elements
https://bugs.webkit.org/show_bug.cgi?id=165959
<rdar://problem/29705967>

Reviewed by Anders Carlsson.

Source/WebCore:

JavaScript logic can run while resetting FormElement objects. This can
lead to unintended side-effets and other unwanted behavior. We should
protect these elements during the reset.

Test: fast/html/form-mutate.html

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::HTMLFormElement): Switch to C++11 initialization.
(WebCore::HTMLFormElement::reset): Protect elements until the reset
operation is finished.
(WebCore::HTMLFormElement::resetAssociatedFormControlElements): Added to share
code with 'resumeFromDocument'.
(WebCore::HTMLFormElement::resumeFromDocument): Protect elements until the
reset operation is finished.

LayoutTests:

  • fast/html/form-mutate-expected.txt: Added.
  • fast/html/form-mutate.html: Added.
12:55 AM Changeset in webkit [211938] by Carlos Garcia Campos
  • 20 edits
    3 adds
    2 deletes in releases/WebKitGTK/webkit-2.14

Merge r209424 - Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
https://bugs.webkit.org/show_bug.cgi?id=165227
<rdar://problem/29442665>

Reviewed by Saam Barati.

JSTests:

  • stress/get-from-scope-dynamic-onto-proxy.js:
  • Updated error message.
  • stress/proxy-dont-infinite-loop.js: Removed.
  • stress/proxy-json-path.js: Removed.
  • stress/rest-parameter-allocation-elimination-watchpoints-6.js: Removed.
  • Removed these tests because the issue they are testing relies on being able to set Object.prototype.proto to something else (which is now not possible).

Source/JavaScriptCore:

  • runtime/JSObject.cpp:

(JSC::JSObject::setPrototypeWithCycleCheck):

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::isImmutablePrototypeExoticObject):

  • runtime/Structure.h:
  • Add flag for declaring immutable prototype exotic objects.
  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorSetPrototypeOf):

  • Use better error messages.

Source/WebCore:

Make all objects in window.proto's prototype chain immutable prototype exotic
objects. This gives us roughly equivalent behavior to other browsers.

Firefox's behavior differ slightly in that Firefox will fail any attempted
assignment their proto, while the immutable prototype exotic objects will
only fail if the assignment is of a different value. See
https://tc39.github.io/ecma262/#sec-immutable-prototype-exotic-objects.

Chrome differs in that assignment to window.proto is also handled like an
immutable prototype exotic object. Instead we adhere to the current HTML spec
that says that the assignment should fail unconditionally. See
https://html.spec.whatwg.org/#the-windowproxy-exotic-object and
https://html.spec.whatwg.org/#windowproxy-setprototypeof.

If the HTML spec is changed to make the WindowProxy and Location objects into
immutable prototype exotic objects later, we can update to match the spec then.

Test: js/prototype-assignment.html

  • bindings/js/JSDOMWindowProperties.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GeneratePrototypeDeclaration):

  • bindings/scripts/IDLAttributes.txt:
  • dom/EventTarget.idl:
  • page/DOMWindow.idl:

LayoutTests:

The new prototype-assignment.js test is currently only enabled for LLInt only
run in the JSC tests until webkit.org/b/165401 is fixed.

  • TestExpectations:
  • Skip js/prototype-assignment.html for now until webkit.org/b/165401 is fixed.
  • http/tests/security/window-named-valueOf-expected.txt:
  • js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt:
  • js/dom/proxy-is-not-allowed-in-global-prototype-chain.html:
  • Updated error messages.
  • js/prototype-assignment-expected.txt: Added.
  • js/prototype-assignment.html: Added.
  • js/script-tests/prototype-assignment.js: Added.

(else):
(reportError):
(shouldEqual):
(shouldThrow):
(stringify):
(makeTestID):
(doInternalSetPrototypeOf):
(ordinarySetPrototypeOf):
(setImmutablePrototype):
(windowProxySetPrototypeOf):
(initSetterExpectation):
(throwIfNoExceptionPending):
(objectSetPrototypeOf):
(setUnderscoreProto):
(reflectSetPrototypeOf):
(newObjectProto.toString):
(this.testObject.targets.push.value):
(this.testProxy.targets.push.setPrototypeOf):
(Symbol):
(test):
(runTests):

  • js/setPrototypeOf-expected.txt:
12:55 AM Changeset in webkit [211937] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r209149 - Proxy is not allowed in the global prototype chain.
https://bugs.webkit.org/show_bug.cgi?id=165205

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • We'll now throw a TypeError if we detect a Proxy in the global prototype chain.

LayoutTests:

  • js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt: Added.
  • js/dom/proxy-is-not-allowed-in-global-prototype-chain.html: Added.
12:54 AM Changeset in webkit [211936] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r208745 - Correct handling of changing input type
https://bugs.webkit.org/show_bug.cgi?id=164759
<rdar://problem/29211174>

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/forms/search-cancel-button-change-input.html

It is possible for JavaScript to change the type property of an input field. WebKit
needs to gracefully handle this case.

Add a type traits specialization so we can properly downcast InputType elements.
Use this to only call search functions on actual search input types.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::onSearch): Only perform search functions if the
input type is actually a search field.

  • html/InputType.h: Add type traits specialization for 'downcast' template.
  • html/SearchInputType.h: Ditto.

LayoutTests:

  • fast/forms/search-cancel-button-change-input-expected.txt: Added.
  • fast/forms/search-cancel-button-change-input.html: Added.
12:54 AM Changeset in webkit [211935] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.14

Merge r208628 - Neutered ArrayBuffers are not properly serialized
https://bugs.webkit.org/show_bug.cgi?id=164647
<rdar://problem/29213490>

Reviewed by David Kilzer.

Source/WebCore:

Correct binding logic to handle ImageBuffers being deserialized from neutered ArrayBuffers.

Test: fast/canvas/neutered-imagedata.html

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal):

LayoutTests:

  • fast/canvas/neutered-imagedata-expected.txt: Added.
  • fast/canvas/neutered-imagedata.html: Added.
12:54 AM Changeset in webkit [211934] by Carlos Garcia Campos
  • 3 edits
    4 adds in releases/WebKitGTK/webkit-2.14

Merge r208825 - Clear track client when removing a track
https://bugs.webkit.org/show_bug.cgi?id=164842
<rdar://problem/29213621>

Reviewed by Eric Carlson.

Source/WebCore:

Call 'clearClient' when removing a track from an HTMLMediaElement.

Test: media/track/audio-track-add-remove.html

media/track/video-track-add-remove.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::removeAudioTrack): Call 'clearClient'
(WebCore::HTMLMediaElement::removeVideoTrack): Ditto.

LayoutTests:

  • media/track/audio-track-add-remove-expected.txt: Added.
  • media/track/audio-track-add-remove.html: Added.
  • media/track/video-track-add-remove-expected.txt: Added.
  • media/track/video-track-add-remove.html: Added.
12:54 AM Changeset in webkit [211933] by Carlos Garcia Campos
  • 3 edits
    6 adds in releases/WebKitGTK/webkit-2.14

Merge r210112 - Bypass pop-up blocker from cross-origin or sandboxed frame
https://bugs.webkit.org/show_bug.cgi?id=166290
<rdar://problem/29742039>

Reviewed by Darin Adler.

Source/WebCore:

Tests: fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame.html

fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2.html
fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::open): Use FrameLoader::findFrameForNavigation() to find the
target frame to navigate with respect to the active document just as we do in WebCore::createWindow().

LayoutTests:

  • fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame-expected.txt: Added.
  • fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame.html: Added.
  • fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2-expected.txt: Added.
  • fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2.html: Added.
  • fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame-expected.txt: Added.
  • fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html: Added.
12:15 AM Changeset in webkit [211932] by achristensen@apple.com
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Remove svn:executable property from headers.

  • Source/webrtc/base/sigslottester.h: Removed property svn:executable.
  • Source/webrtc/modules/video_processing/util/skin_detection.h: Removed property svn:executable.

Feb 8, 2017:

10:07 PM Changeset in webkit [211931] by ap@apple.com
  • 13 edits
    6 moves in trunk/Source/WebKit

Don't migrate WebKit DOM headers in MigrateHeaders.make
https://bugs.webkit.org/show_bug.cgi?id=167608

Source/WebKit:

Reviewed by Darin Adler.

Stop migrating DOM headers that are now in WebKit.

  • WebKit.xcodeproj/project.pbxproj: Marked DOM headers as private, so that Xcode

takes care of making them available as SPI.

Source/WebKit/mac:

Reviewed by Darin Adler.

Stop migrating DOM headers that are now in WebKit.

  • DOM/DOMDOMImplementation.h: Removed.
  • DOM/DOMDOMImplementation.mm: Removed.
  • DOM/DOMDOMImplementationInternal.h: Removed.
  • DOM/DOMDOMTokenList.h: Removed.
  • DOM/DOMDOMTokenList.mm: Removed.
  • DOM/DOMDOMTokenListInternal.h: Removed.
  • DOM/DOMImplementation.h: Copied from Source/WebKit/mac/DOM/DOMDOMImplementation.h.
  • DOM/DOMImplementation.mm: Copied from Source/WebKit/mac/DOM/DOMDOMImplementation.mm.
  • DOM/DOMImplementationInternal.h: Copied from Source/WebKit/mac/DOM/DOMDOMImplementationInternal.h.
  • DOM/DOMTokenList.h: Copied from Source/WebKit/mac/DOM/DOMDOMTokenList.h.
  • DOM/DOMTokenList.mm: Copied from Source/WebKit/mac/DOM/DOMDOMTokenList.mm.
  • DOM/DOMTokenListInternal.h: Copied from Source/WebKit/mac/DOM/DOMDOMTokenListInternal.h.

As the files are not in WebCore any more, there is no need to differentiate from
WebCore internal headers with the same name. This makes it possible to make these
headers private using Xcode mechanisms, as opposed to copying with a shell script.

  • DOM/DOMElement.mm: Removed "using namespace WebCore". Other DOM implementation

files don't have it.

  • DOM/DOMCore.h:
  • DOM/DOMDocument.mm:
  • DOM/DOMHTMLAnchorElement.mm:
  • DOM/DOMHTMLAreaElement.mm:
  • DOM/DOMHTMLLinkElement.mm:
  • DOM/DOMUtility.mm:

No more "DOMDOM".

  • WebKit.exp:

No more "DOMDOM". DOMDOMTokenList was not directly exposed via an SPI header, so
renaming it is likely to be safe.

  • MigrateHeaders.make: Don't migrate WebKit headers.
  • Configurations/WebKitLegacy.xcconfig: Don't include two iOS specific SPI headers

on macOS.

9:52 PM Changeset in webkit [211930] by Chris Dumez
  • 75 edits
    11 adds
    3 deletes in trunk

Update web-platform-tests resources
https://bugs.webkit.org/show_bug.cgi?id=168026

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • resources/web-platform-tests-modules.json:
  • resources/web-platform-tests-modules/darobin/webidl2.js/archive/bd216bcd5596d60734450adc938155deab1e1a80.tar.gz: Removed.
  • resources/web-platform-tests-modules/dontcallmedom/widlproc/archive/4ef8dde69c0ba3d0167bccfa2775eea7f0d6c7fe.tar.gz: Removed.
  • resources/web-platform-tests-modules/w3c/testharness.js/archive/873f9680aff66553f84d38f21a038c4534cc2789.tar.gz: Removed.
  • web-platform-tests/.gitignore:
  • web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
  • web-platform-tests/dom/interfaces-expected.txt:
  • web-platform-tests/fetch/api/headers/headers-idl-expected.txt:
  • web-platform-tests/html/dom/interfaces-expected.txt:
  • web-platform-tests/html/webappapis/animation-frames/idlharness-expected.txt:
  • web-platform-tests/resources/LICENSE: Added.
  • web-platform-tests/resources/idlharness.js: Added.

(constValue):
(minOverloadLength):
(throwOrReject):
(awaitNCallbacks):
(return.fround):
(fround):
(self.IdlArray):
(IdlArray.prototype.add_idls):
(IdlArray.prototype.add_untested_idls):
(IdlArray.prototype.internal_add_idls):
(IdlArray.prototype.add_objects):
(IdlArray.prototype.prevent_multiple_testing):
(IdlArray.prototype.recursively_get_implements):
(exposed_in):
(IdlArray.prototype.test):
(IdlArray.prototype.assert_type_is):
(IdlObject):
(IdlObject.prototype.test):
(IdlObject.prototype.has_extended_attribute):
(IdlInterface):
(IdlInterface.prototype.is_callback):
(IdlInterface.prototype.has_constants):
(IdlInterface.prototype.is_global):
(IdlInterface.prototype.test):
(IdlInterface.prototype.test_self):
(IdlInterface.prototype.test_member_const):
(IdlInterface.prototype.test_member_attribute):
(IdlInterface.prototype.test_member_operation):
(IdlInterface.prototype.do_member_operation_asserts):
(IdlInterface.prototype.add_iterable_members):
(IdlInterface.prototype.test_member_iterable):
(IdlInterface.prototype.test_member_stringifier):
(IdlInterface.prototype.test_members):
(IdlInterface.prototype.test_object):
(IdlInterface.prototype.test_primary_interface_of):
(IdlInterface.prototype.test_interface_of):
(IdlInterface.prototype.has_stringifier):
(IdlInterface.prototype.do_interface_attribute_asserts):
(IdlInterfaceMember):
(create_suitable_object):
(IdlEnum):
(IdlTypedef):

  • web-platform-tests/resources/readme.md: Added.
  • web-platform-tests/resources/testharness.js: Added.

(WindowTestEnvironment):
(WindowTestEnvironment.prototype._dispatch):
(WindowTestEnvironment.prototype._forEach_windows):
(WindowTestEnvironment.prototype.on_tests_ready):
(WindowTestEnvironment.prototype.setup_messages):
(WindowTestEnvironment.prototype.next_default_test_name):
(WindowTestEnvironment.prototype.on_new_harness_properties):
(WindowTestEnvironment.prototype.add_on_loaded_callback):
(WindowTestEnvironment.prototype.test_timeout):
(WindowTestEnvironment.prototype.global_scope):
(WorkerTestEnvironment):
(WorkerTestEnvironment.prototype._dispatch):
(WorkerTestEnvironment.prototype._add_message_port):
(WorkerTestEnvironment.prototype.next_default_test_name):
(WorkerTestEnvironment.prototype.on_new_harness_properties):
(WorkerTestEnvironment.prototype.on_tests_ready):
(WorkerTestEnvironment.prototype.add_on_loaded_callback):
(WorkerTestEnvironment.prototype.test_timeout):
(WorkerTestEnvironment.prototype.global_scope):
(DedicatedWorkerTestEnvironment):
(DedicatedWorkerTestEnvironment.prototype.on_tests_ready):
(SharedWorkerTestEnvironment):
(SharedWorkerTestEnvironment.prototype.on_tests_ready):
(ServiceWorkerTestEnvironment):
(ServiceWorkerTestEnvironment.prototype.add_on_loaded_callback):
(create_test_environment):
(is_shared_worker):
(is_service_worker):
(test):
(async_test):
(promise_test):
(this.wait_for):
(EventWatcher):
(setup):
(done):
(generate_tests):
(step_timeout):
(truncate):
(is_node):
(format_value):

  • web-platform-tests/resources/webidl2/LICENSE: Added.
  • web-platform-tests/resources/webidl2/README.md: Added.
  • web-platform-tests/resources/webidl2/lib/webidl2.js: Added.

(tokenise):
(WebIDLParseError):
(WebIDLParseError.prototype.toString):
(error):
(consume):
(ws):
(all_ws):
(integer_type):
(float_type):
(primitive_type):
(const_value):
(type_suffix):
(single_type):
(union_type):
(type):
(argument):
(argument_list):
(type_pair):
(simple_extended_attr):
(extended_attrs):
(default_):
(const_):
(inheritance):
(operation_rest):
(callback):
(attribute):
(return_type):
(operation):
(identifiers):
(serialiser):
(iterable_type):
(readonly_iterable_type):
(iterable):
(interface_):
(partial):
(dictionary):
(exception):
(enum_):
(parse):

  • web-platform-tests/resources/webidl2/lib/writer.js: Added.

(noop):
(literal):
(wsPea):
(wsTPea):
(lineComment):
(multilineComment):
(type):
(const_value):
(argument):
(args):
(make_ext_at):
(extended_attributes):
(operation):
(attribute):
(interface_):
(dictionary):
(field):
(exception):
(const_):
(typedef):
(implements_):
(callback):
(enum_):
(dispatch):
(iterate):
(write):
(obj.write):

  • web-platform-tests/url/interfaces-expected.txt:

Tools:

Stop copying testharness.js from resources/ to web-platform-tests/resources.

  • Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:

(WebPlatformTestServer._copy_webkit_test_files):

9:22 PM Changeset in webkit [211929] by Simon Fraser
  • 9 edits in trunk/Source

Put names on more UIViews for ease of debugging
https://bugs.webkit.org/show_bug.cgi?id=168035

Reviewed by Tim Horton.

Source/WebCore:

Name the page overlay layers.

  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::createRootLayersIfNeeded):
(WebCore::PageOverlayController::installPageOverlay):

Source/WebKit2:

Put names on the various bare UIViews that we create.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):

  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setupInteraction]):

  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:

(WebKit::WebInspectorClient::showPaintRect):

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):

9:10 PM Changeset in webkit [211928] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline emoji tests for ios-simulator.

Unreviewed test gardening.

  • platform/ios-simulator/editing/deleting/delete-emoji-expected.txt:
  • platform/ios-simulator/fast/text/emoji-expected.txt:
8:49 PM Changeset in webkit [211927] by commit-queue@webkit.org
  • 16 edits
    6 adds in trunk

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

http/tests/media/media-stream/disconnected-frame-permission-
denied.html should be updated (Requested by youenn on
#webkit).

Reverted changeset:

"[MediaStream] Remove legacy Navigator.webkitGetUserMedia"
https://bugs.webkit.org/show_bug.cgi?id=168016
http://trac.webkit.org/changeset/211912

6:50 PM Changeset in webkit [211926] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

HTML Link elements should load data URLs as same origin
https://bugs.webkit.org/show_bug.cgi?id=168032
<rdar://problem/30275036>

Patch by Youenn Fablet <youennf@gmail.com> on 2017-02-08
Reviewed by Alex Christensen.

Source/WebCore:

Test: fast/dom/data-url-css-link-element-cors-active.html

Making CSS data URLs resources considered as same origin when loaded through link elements.
In the future, we should consider remove the data URL same origin flag and fully align with the fetch and HTML spec.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):

LayoutTests:

  • fast/dom/data-url-css-link-element-cors-active-expected.txt: Added.
  • fast/dom/data-url-css-link-element-cors-active.html: Added.
6:13 PM Changeset in webkit [211925] by aakash_jain@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Don't re-export PluginData.h from WebKit
https://bugs.webkit.org/show_bug.cgi?id=168020

Reviewed by Alexey Proskuryakov.

  • MigrateHeaders.make: Removed PluginData.h
6:06 PM Changeset in webkit [211924] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604.1.5-branch/Source/JavaScriptCore

Merge r211300. rdar://problem/30425272

6:06 PM Changeset in webkit [211923] by matthew_hanson@apple.com
  • 5 edits
    2 adds in branches/safari-604.1.5-branch

Merge r211906. rdar://problem/30315079

6:06 PM Changeset in webkit [211922] by matthew_hanson@apple.com
  • 3 edits in branches/safari-604.1.5-branch/Source/WebCore

Merge r211716. rdar://problem/30368405

6:06 PM Changeset in webkit [211921] by matthew_hanson@apple.com
  • 14 edits in branches/safari-604.1.5-branch/Source/WebKit2

Merge r211679. rdar://problem/30363014

6:05 PM Changeset in webkit [211920] by matthew_hanson@apple.com
  • 3 edits in branches/safari-604.1.5-branch/Source/WebKit2

Merge r211643. rdar://problem/30334861

6:05 PM Changeset in webkit [211919] by matthew_hanson@apple.com
  • 26 edits in branches/safari-604.1.5-branch/Source

Merge r211597. rdar://problem/30295261

6:05 PM Changeset in webkit [211918] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604.1.5-branch/Source/WebCore

Merge r211453. rdar://problem/30294240

6:05 PM Changeset in webkit [211917] by matthew_hanson@apple.com
  • 3 edits in branches/safari-604.1.5-branch/Source/WebKit2

Merge r211442. rdar://problem/30272380

6:05 PM Changeset in webkit [211916] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604.1.5-branch/Source/WebCore

Merge r211377. rdar://problem/30267849

5:57 PM Changeset in webkit [211915] by aestes@apple.com
  • 4 edits in trunk

Custom protocols should not continue loading after a network process crash
https://bugs.webkit.org/show_bug.cgi?id=168028
<rdar://problem/27607520>

Reviewed by Brady Eidson.

Source/WebKit2:

WKCustomProtocolLoaders are meant to be owned by CustomProtocolManagerProxy and have their
loads cancelled when CustomProtocolManagerProxy is destroyed. However, WKCustomProtocolLoader
creates a NSURLConnection for which it is the client, so NSURLConnection retains it for the
duration of the load.

These loaders should be explicitly cancelled when their CustomProtocolManagerProxy is destroyed.

New API test: WebKit2CustomProtocolsTest.CloseDuringCustomProtocolLoad

  • UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:

(-[WKCustomProtocolLoader customProtocolManagerProxyDestroyed]): Added. Cancels the
_urlConnection and sets _customProtocolManagerProxy to nullptr.
(WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
Called -customProtocolManagerProxyDestroyed on every loader in m_loaderMap.

Tools:

  • TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm:

(processGroup):
(-[CloseWhileStartingProtocol startLoading]):
(-[CloseWhileStartingProtocol stopLoading]):
(TestWebKitAPI::runTest):
(TestWebKitAPI::TEST):

5:56 PM Changeset in webkit [211914] by mitz@apple.com
  • 6 edits in trunk

[Cocoa] WKRemoteObjectCoder doesn’t handle CGSize
https://bugs.webkit.org/show_bug.cgi?id=168031

Reviewed by Tim Horton.

Source/WebKit2:

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm:

(encodeInvocationArguments): Encode CGSize by encoding two NSNumbers. Somewhat sadly,

+[NSValue valueWithCGSize:] is not available in macOS.

(decodeInvocationArguments): Decode wrapped numbers.

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.h:
  • TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistry.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/RemoteObjectRegistryPlugIn.mm:

(-[RemoteObjectRegistryPlugIn takeSize:completionHandler:]):

5:42 PM Changeset in webkit [211913] by weinig@apple.com
  • 10 edits in trunk

REGRESSION (r193286): Promise chain no longer prevent UI refresh
<rdar://problem/28062149>
https://bugs.webkit.org/show_bug.cgi?id=161291

Reviewed by Geoffrey Garen.

LayoutTests/imported/w3c:

  • web-platform-tests/custom-elements/adopted-callback-expected.txt:
  • web-platform-tests/custom-elements/upgrading-expected.txt:
  • web-platform-tests/html/webappapis/scripting/event-loops/microtask_after_script-expected.txt:

Update results for improved promise support.

Source/WebCore:

Add new subtest to js/dom/Promise.html

  • dom/Microtasks.cpp:

(WebCore::MicrotaskQueue::append):
(WebCore::MicrotaskQueue::remove):
(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):

  • dom/Microtasks.h:

The microtask queue needs to be completely drained, even of new microtasks added while
the previous task was run. Remove the m_tasksAppendedDuringMicrotaskCheckpoint as it is
no longer needed.

LayoutTests:

  • js/dom/Promise.html:

Add a new subtest that ensures the ordering of multiple thenables and a setTimeout.

5:30 PM Changeset in webkit [211912] by eric.carlson@apple.com
  • 16 edits
    6 deletes in trunk

[MediaStream] Remove legacy Navigator.webkitGetUserMedia
https://bugs.webkit.org/show_bug.cgi?id=168016

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, existing tests updated.

  • WebCore.xcodeproj/project.pbxproj: NavigatorUserMedia.
  • DerivedSources.make: Ditto.
  • CMakeLists.txt: Ditto.
  • Modules/mediastream/NavigatorUserMedia.idl: Removed.
  • Modules/mediastream/NavigatorUserMedia.js: Removed.
  • WebCore.xcodeproj/project.pbxproj:
  • page/Navigator.idl: Add some whitespace to force derived sources to be rebuild correctly.

Source/WebInspectorUI:

  • UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

Update valid tests to use navigator.mediaDevices.getUserMedia. Remove tests
specific to Navigator.webkitGetUserMedia.

  • fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
  • fast/mediastream/argument-types.html: Removed.
  • fast/mediastream/delayed-permission-allowed.html:
  • fast/mediastream/delayed-permission-denied.html:
  • fast/mediastream/enabled-expected.txt:
  • fast/mediastream/error.html:
  • fast/mediastream/getusermedia.html: Removed.
  • fast/mediastream/script-tests/argument-types.js: Removed..
  • fast/mediastream/script-tests/enabled.js:

(hasGetUserMediaProperty):

  • fast/mediastream/success.html:
  • fast/mediastream/webkitGetUserMedia-shadowing-then.html: Removed.
5:24 PM Changeset in webkit [211911] by matthew_hanson@apple.com
  • 6 edits in branches/safari-604.1.5-branch/Source

Versioning.

4:56 PM Changeset in webkit [211910] by Chris Dumez
  • 14 edits
    4 adds in trunk

Use smaller tiles in windows that are not active to facilitate App Napping
https://bugs.webkit.org/show_bug.cgi?id=167997
<rdar://problem/30358835>

Reviewed by Simon Fraser.

Source/WebCore:

Use smaller / non-adaptative tiles in windows that are not active to facilitate
App Napping after <https://trac.webkit.org/r197594>.

Test: compositing/tiling/non-active-window-tiles-size.html

  • page/FrameView.cpp:

(WebCore::FrameView::contentsResized):
(WebCore::FrameView::addedOrRemovedScrollbar):
(WebCore::FrameView::computeScrollability):
(WebCore::FrameView::updateTiledBackingAdaptiveSizing):
(WebCore::FrameView::unobscuredContentSizeChanged):
(WebCore::FrameView::setViewExposedRect):

  • page/FrameView.h:
  • page/Page.cpp:

(WebCore::Page::setActivityState):
(WebCore::Page::isWindowActive):

  • page/Page.h:
  • platform/graphics/TiledBacking.h:
  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::setTileSizeUpdateDelayDisabledForTesting):
(WebCore::TileController::notePendingTileSizeChange):

  • platform/graphics/ca/TileController.h:
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::disableTileSizeUpdateDelay):

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

Tools:

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::setWindowIsKey):
Actually update windowIsKey state of NSWindow so the WebView
properly updates its activity state.

LayoutTests:

Add layout test coverage.

  • compositing/tiling/non-active-window-tiles-size-expected.txt: Added.
  • compositing/tiling/non-active-window-tiles-size.html: Added.
  • platform/ios-simulator-wk2/compositing/tiling/non-active-window-tiles-size-expected.txt: Added.
  • platform/mac-wk1/compositing/tiling/non-active-window-tiles-size-expected.txt: Added.
4:26 PM Changeset in webkit [211909] by Chris Dumez
  • 15 edits
    6 adds in trunk

Unreviewed, rolling out r211907.

Broke the build

Reverted changeset:

"[MediaStream] Remove legacy Navigator.webkitGetUserMedia"
https://bugs.webkit.org/show_bug.cgi?id=168016
http://trac.webkit.org/changeset/211907

4:02 PM Changeset in webkit [211908] by keith_miller@apple.com
  • 20 edits in trunk/Source/JavaScriptCore

[JSC] op_in should have ArrayProfile
https://bugs.webkit.org/show_bug.cgi?id=164581

Reviewed by Filip Pizlo.

This patch adds an ArrayProfile to the op_in bytecode. In the
DFG, if we see that we the key is an int32 we will convert the In
DFG node to a HasIndexedProperty node instead.

This patch also flips the two arguments of op_in and the In node
to reflect the other property lookup bytecodes.

  • bytecode/BytecodeList.json:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finishCreation):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitIn):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitIn): Deleted.

  • bytecompiler/NodesCodegen.cpp:

(JSC::InNode::emitBytecode):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasArrayMode):
(JSC::DFG::Node::hasInternalMethodType):
(JSC::DFG::Node::internalMethodType):
(JSC::DFG::Node::setInternalMethodType):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileIn):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileIn):
(JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • llint/LowLevelInterpreter.asm:
  • parser/Nodes.h:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::opIn):

3:51 PM Changeset in webkit [211907] by eric.carlson@apple.com
  • 15 edits
    6 deletes in trunk

[MediaStream] Remove legacy Navigator.webkitGetUserMedia
https://bugs.webkit.org/show_bug.cgi?id=168016

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, existing tests updated.

  • WebCore.xcodeproj/project.pbxproj: NavigatorUserMedia.
  • DerivedSources.make: Ditto.
  • CMakeLists.txt: Ditto.
  • Modules/mediastream/NavigatorUserMedia.idl: Removed.
  • Modules/mediastream/NavigatorUserMedia.js: Removed.
  • WebCore.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

  • UserInterface/Models/NativeFunctionParameters.js:

LayoutTests:

Update valid tests to use navigator.mediaDevices.getUserMedia. Remove tests
specific to Navigator.webkitGetUserMedia.

  • fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
  • fast/mediastream/argument-types.html: Removed.
  • fast/mediastream/delayed-permission-allowed.html:
  • fast/mediastream/delayed-permission-denied.html:
  • fast/mediastream/enabled-expected.txt:
  • fast/mediastream/error.html:
  • fast/mediastream/getusermedia.html: Removed.
  • fast/mediastream/script-tests/argument-types.js: Removed..
  • fast/mediastream/script-tests/enabled.js:

(hasGetUserMediaProperty):

  • fast/mediastream/success.html:
  • fast/mediastream/webkitGetUserMedia-shadowing-then.html: Removed.
3:30 PM Changeset in webkit [211906] by Wenson Hsieh
  • 5 edits
    2 adds in trunk

Add kUTTypeUTF8PlainText and kUTTypeJPEG to the list of compatible content types in DragData
https://bugs.webkit.org/show_bug.cgi?id=167942
<rdar://problem/30315079>

Reviewed by Tim Horton.

Source/WebCore:

Adds UTI types for dragging UTF8 plain text and JPEG images to the list of supported types in DragDataMac.mm.
Also handles reading these types in PasteboardMac.mm. I verified manually with a test app that if a platform
NSView vends only UTF8 plaintext or JPEG images when dragging, WebKit is able to read the contents of the
pasteboard as text and an image, respectively.

New TestWebKitAPI tests in DragAndDropPasteboardTests.mm.

  • platform/mac/DragDataMac.mm:

(WebCore::DragData::containsCompatibleContent):

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::read):

Tools:

Adds a new test case that simulates dragging from a source that only vends JPEG images or UTF8 plaintext into a
contenteditable area. An image element and the plain text content, respectively, should be inserted into the
contenteditable in these cases.

The DragSource and DragInfo are used to mock dragging into the WebView. There is no reliance on using mouse
events in this test, since we call the dragging delegate methods (draggingEntered:, draggingUpdated:, and
performDragOperation:) directly.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm: Added.

(+[FrameLoadCompletionListener listenerWithCompletionBlock:]):
(-[FrameLoadCompletionListener initWithCompletionBlock:]):
(-[FrameLoadCompletionListener webView:didFinishLoadForFrame:]):
(-[DragSource draggingSourceOperationMaskForLocal:]):
(-[DragInfo initWithImage:offset:pasteboard:source:destinationWindow:]):
(-[DragInfo lastMousePosition]):
(-[DragInfo setLastMousePosition:]):
(-[DragInfo draggingDestinationWindow]):
(-[DragInfo draggingSourceOperationMask]):
(-[DragInfo draggingLocation]):
(-[DragInfo draggedImageLocation]):
(-[DragInfo draggedImage]):
(-[DragInfo draggingPasteboard]):
(-[DragInfo draggingSource]):
(-[DragInfo draggingSequenceNumber]):
(-[DragInfo slideDraggedImageTo:]):
(-[DragInfo namesOfPromisedFilesDroppedAtDestination:]):
(-[DragInfo draggingFormation]):
(-[DragInfo setDraggingFormation:]):
(-[DragInfo animatesToDestination]):
(-[DragInfo setAnimatesToDestination:]):
(-[DragInfo numberOfValidItemsForDrop]):
(-[DragInfo setNumberOfValidItemsForDrop:]):
(-[DragInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
(-[DragInfo springLoadingHighlight]):
(-[DragInfo resetSpringLoading]):
(TestWebKitAPI::getTestImage):
(TestWebKitAPI::webViewAfterPerformingDragOperation):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/mac/full-page-contenteditable.html: Added.
3:15 PM Changeset in webkit [211905] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

getIntersectionList always returns empty NodeList until layout is complete
https://bugs.webkit.org/show_bug.cgi?id=81423

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-02-08
Reviewed by Simon Fraser.

Source/WebCore:

Layout needs to be forced before trying to figure out which SVGElements
intersect with a given SVGRect. We do the same thing in the DOM API
Element::getBoundingClientRect().

Test: svg/custom/intersection-list-before-layout.html

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::getIntersectionList):

LayoutTests:

  • svg/custom/intersection-list-before-layout-expected.txt: Added.
  • svg/custom/intersection-list-before-layout.html: Added.
2:57 PM Changeset in webkit [211904] by commit-queue@webkit.org
  • 9 edits
    1 copy
    17 adds
    2 deletes in trunk

[Modern Media Controls] Implement reduced and tight padding modes
https://bugs.webkit.org/show_bug.cgi?id=167933
<rdar://problem/30396994>

Patch by Antoine Quint <Antoine Quint> on 2017-02-08
Reviewed by Dean Jackson.

Source/WebCore:

The design specs for modern media controls mandate the following for inline media controls:

  • controls at or below 300pt width use a 12pt left margin for the left buttons container, and a 12pt right margin for the right buttons container, and 16pth button margin inside both containers ("reduced padding mode").
  • when dropping at or below 120pt width, controls use an 8pt left margin for the left buttons container, and an 8pt right margin for the right buttons container, and 12pt button margin inside both containers and a shorter bar (25pt) ("compact mode").
  • in the case of audio controls, at 400pt or less, controls switch to 12pt margins and button margins for both buttons containers ("tight padding mode").

The "compact" mode was already implemented as a dedicated MacOSInlineMediaControls subclass.
Since we now have a more generic need to vary the metrics used for inline media controls on
macOS, we add new features to MacOSInlineMediaControls to support varying metrics based on
the controls' "layoutTraits" property.

So MediaController is changed such that it knows to use the new TightPadding and ReducedPadding
layout traits based on the conditions defined above, and _updateControlsIfNeeded() is changed
to set the "layoutTraits" property on the controls whenever called, which in our case is most
relevantly a "resize" event on the shadow root or a TrackEvent on the video tracks (to determine
when we're possibly changing between a video and audio file).

As a result, the "layoutTraits" setter is called on MacOSInlineMediaControls, which updates
the metrics for the various buttons containers, but also notifies the buttons contained
within that layout traits may have changed, since some buttons support a "compact" appearance
that is shorter and require a different image file. To that end, IconButton has been updated
so that it may be notified of a layout traits change through a new layoutTraitsDidChange()
method, that checks whether the current layout traits differ from those last used when loading
the icon.

Tests: media/modern-media-controls/icon-button/icon-button-change-layout-traits.html

media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles.html
media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles.html
media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact.html
media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-reduced-padding.html
media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-tight-padding.html
media/modern-media-controls/media-controller/media-controller-compact.html
media/modern-media-controls/media-controller/media-controller-reduced-padding.html
media/modern-media-controls/media-controller/media-controller-tight-padding.html

  • Modules/modern-media-controls/controls/icon-button.js:

(IconButton.prototype.set iconName):
(IconButton.prototype.layoutTraitsDidChange):
(IconButton.prototype._loadImage):

  • Modules/modern-media-controls/controls/layout-item.js:
  • Modules/modern-media-controls/controls/macos-compact-inline-media-controls.js: Removed.
  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:

(MacOSInlineMediaControls.prototype.get layoutTraits):
(MacOSInlineMediaControls.prototype.set layoutTraits):
(MacOSInlineMediaControls.prototype._matchLayoutTraits):

  • Modules/modern-media-controls/js-files:
  • Modules/modern-media-controls/media/media-controller.js:

(MediaController):
(MediaController.prototype.get layoutTraits):
(MediaController.prototype.handleEvent):
(MediaController.prototype._updateControlsIfNeeded):
(MediaController.prototype._controlsClassForLayoutTraits):
(MediaController.prototype._shouldFadeBetweenControls): Deleted.
(MediaController.prototype._controlsClass): Deleted.

  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

We rewrite the previously-written tests for "compact" mode and add some new tests for
"reduced padding" and "tight padding" modes as well as new support in IconButton to
update the icon based on a change of layout traits.

  • media/modern-media-controls/icon-button/icon-button-change-layout-traits-expected.txt: Added.
  • media/modern-media-controls/icon-button/icon-button-change-layout-traits.html: Added.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-buttons-styles-expected.txt: Removed.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor-expected.txt: Removed.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-constructor.html: Removed.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles-expected.txt: Removed.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-controls-bar-styles.html: Removed.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout-expected.txt: Removed.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-layout.html: Removed.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles-expected.txt: Removed.
  • media/modern-media-controls/macos-compact-inline-media-controls/macos-compact-inline-media-controls-volume-styles.html: Removed.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles-expected.txt: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-buttons-styles.html: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles-expected.txt: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-controls-bar-styles.html: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-expected.txt: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact.html: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-reduced-padding-expected.txt: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-reduced-padding.html: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-tight-padding-expected.txt: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-tight-padding.html: Added.
  • media/modern-media-controls/media-controller/media-controller-compact-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-compact.html: Added.
  • media/modern-media-controls/media-controller/media-controller-reduced-padding-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-reduced-padding.html: Added.
  • media/modern-media-controls/media-controller/media-controller-tight-padding-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-tight-padding.html: Added.
  • platform/ios-simulator/TestExpectations:
2:50 PM Changeset in webkit [211903] by achristensen@apple.com
  • 3 edits in trunk/Source/ThirdParty/libwebrtc

Fix libwebrtc build.
https://bugs.webkit.org/show_bug.cgi?id=168017

  • Configurations/libwebrtc.xcconfig:

Trying to compile audio_device_not_implemented_ios.mm on Mac doesn't work.

  • libwebrtc.xcodeproj/project.pbxproj:

Add some neon files. They are nicely protected by macros at the top, so their contents are only compiled if necessary.

2:26 PM Changeset in webkit [211902] by achristensen@apple.com
  • 14 edits in trunk/Source/ThirdParty/libwebrtc

Fix libwebrtc build on iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=168017

Reviewed by Tim Horton.

  • Configurations/libwebrtc.xcconfig:
  • Configurations/libwebrtcpcrtc.xcconfig:

Use $(inherited)

  • Source/webrtc/modules/audio_device/ios/audio_device_ios.h:
  • Source/webrtc/modules/audio_device/ios/audio_device_ios.mm:
  • Source/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Configuration.mm:
  • Source/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h:
  • Source/webrtc/modules/audio_device/ios/objc/RTCAudioSession.h:
  • Source/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm:
  • Source/webrtc/modules/audio_device/ios/objc/RTCAudioSessionConfiguration.h:
  • Source/webrtc/modules/audio_device/ios/objc/RTCAudioSessionConfiguration.m:
  • Source/webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h:
  • Source/webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.mm:

Renamed RTCAudioSession* to WebRTCAudioSession* so that all ObjC classes in WebCore start with Web prefix.

  • libwebrtc.xcodeproj/project.pbxproj:

Add necessary files. Some iOS-specific files need ARC,
and this matches the Build.gn in Source/webrtc/modules/audio_device

2:04 PM Changeset in webkit [211901] by aakash_jain@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Don't re-export WKUtilities.h from WebKit
https://bugs.webkit.org/show_bug.cgi?id=167977

Reviewed by Alexey Proskuryakov.

  • MigrateHeaders.make: Removed WKUtilities.h
2:01 PM Changeset in webkit [211900] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 23

Added a tag for Safari Technology Preview release 23.

1:58 PM Changeset in webkit [211899] by aakash_jain@apple.com
  • 5 edits
    1 copy in trunk/Source/WebCore

Move private methods from WKGraphics.h to a separate header file
https://bugs.webkit.org/show_bug.cgi?id=167996

Reviewed by Alexey Proskuryakov.

  • platform/ios/wak/WKGraphicsInternal.h: Added.
  • WebCore.xcodeproj/project.pbxproj: Added WKGraphicsInternal.h
  • platform/ios/wak/WKGraphics.h: Moved methods to WKGraphicsInternal.h
  • platform/graphics/mac/GraphicsContextMac.mm: Included new header file.
  • platform/ios/wak/WKGraphics.mm: Same.
1:37 PM Changeset in webkit [211898] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

Tried to fix the build after r211897.

  • UIProcess/ios/WKContentViewInteraction.h:
1:34 PM Changeset in webkit [211897] by mitz@apple.com
  • 4 edits in trunk/Source/WebKit2

[iOS] WKWebView doesn’t have implementations of UIResponderStandardEditActions that can be overridden
https://bugs.webkit.org/show_bug.cgi?id=167974

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKWebView.mm: Gave each of the actions in FOR_EACH_WKCONTENTVIEW_ACTION an implementation that sends it to the WKContentView if we’re using one.

(-[WKWebView canPerformAction:withSender:]): Override and for each of the actions in

FOR_EACH_WKCONTENTVIEW_ACTION, forward to
-[WKContentView canPerformActionForWebView:withSender:] if we’re using a WKContentView,
otherwise returning NO.

  • UIProcess/ios/WKContentViewInteraction.h: Declared -canPerformActionForWebView:withSender: and several internal methods we override.
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformAction:withSender:]): Now returns NO so that the target for any

action is the WKWebView.

(-[WKContentView canPerformActionForWebView:withSender:]): Moved the logic previously in

-canPerformAction:withSender: to here.

1:21 PM Changeset in webkit [211896] by sbarati@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Air IRC might spill a terminal that produces a value after the terminal
https://bugs.webkit.org/show_bug.cgi?id=167919
<rdar://problem/29754721>

Reviewed by Filip Pizlo.

IRC may spill a value-producing terminal (a patchpoint can be a value-producing terminal).
It used to do this by placing the spill *after* the terminal. This produces an invalid
graph because no instructions are allowed after the terminal.

I fixed this bug by having a cleanup pass over the IR after IRC is done.
The pass detects this problem, and fixes it by moving the spill into the
successors. However, it is careful to detect when the edge to the
successor is a critical edge. If the value-producing patchpoint is
the only predecessor of the successor, it just moves the spill
code to the beginning of the successor. Otherwise, it's a critical
edge and it breaks it by adding a block that does the spilling then
jumps to the successor.

  • b3/air/AirInsertionSet.cpp:
  • b3/air/AirInsertionSet.h:

(JSC::B3::Air::InsertionSet::insertInsts):

  • b3/air/AirIteratedRegisterCoalescing.cpp:
  • b3/testb3.cpp:

(JSC::B3::testTerminalPatchpointThatNeedsToBeSpilled):
(JSC::B3::testTerminalPatchpointThatNeedsToBeSpilled2):
(JSC::B3::run):

1:19 PM Changeset in webkit [211895] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

Opt-out iBooks from synchronous willSendRequest on iOS.
<rdar://problem/30129966> and https://bugs.webkit.org/show_bug.cgi?id=168006

Reviewed by Brent Fulgham.

No new tests (Not a testable behavior change at this time).

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::synchronousWillSendRequestEnabled): iBooks never gets synchronous willSendRequest:

1:11 PM Changeset in webkit [211894] by Antti Koivisto
  • 9 edits in trunk/Source/WebKit2

Allow speculative redirects
https://bugs.webkit.org/show_bug.cgi?id=167982

Reviewed by Andreas Kling.

If speculative loader hits a redirect it will drop it on the floor. We should use it instead.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):

Reset m_isWaitingContinueWillSendRequestForCachedRedirect bit immediately.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::makeRedirectEntry):

Factor to a function.

(WebKit::NetworkCache::Cache::storeRedirect):

  • NetworkProcess/cache/NetworkCache.h:

(WebKit::NetworkCache::Cache::speculativeLoadManager):

  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::Entry):

Use std::optional instead std::unique_ptr for the redirect request.

(WebKit::NetworkCache::Entry::decodeStorageRecord):

  • NetworkProcess/cache/NetworkCacheEntry.h:

(WebKit::NetworkCache::Entry::redirectRequest):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):

Make a cache entry for speculative redirect.
Redirect is not actually performed, the target resource will have a separate
speculative entry.

(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
(WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
(WebKit::NetworkCache::SpeculativeLoad::didComplete):

Protect against multiple completions.

(WebKit::NetworkCache::SpeculativeLoad::abort): Deleted.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::retrieve):

Make successful retrieves asynchronous to avoid re-entrancy problems.

12:40 PM Changeset in webkit [211893] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

Unreviewed build fix; FullscreenClient only avaialble on 32-bit builds.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::WebViewImpl):

12:24 PM Changeset in webkit [211892] by commit-queue@webkit.org
  • 38 edits
    1 copy
    1 move
    7 adds in trunk/Source/WebCore

Split JSDOMConstructor.h/cpp up by class
https://bugs.webkit.org/show_bug.cgi?id=167958

Patch by Sam Weinig <sam@webkit.org> on 2017-02-08
Reviewed by Tim Horton.

Splits JSDOMConstructor up by class.

  • Renames DOMConstructorObject to JSDOMConstructorBase.
  • Renames DOMConstructorWithDocument to JSDOMConstructorWithDocument.
  • Renames DOMConstructorJSBuiltinObject to JSDOMBuiltinConstructorBase.
  • Renames JSBuiltinConstructor to JSDOMBuiltinConstructor.
  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:

Add new files.

  • bindings/js/JSDOMBinding.h:

(WebCore::propertyNameToString): Deleted.
(WebCore::propertyNameToAtomicString): Deleted.

  • bindings/js/JSDOMBuiltinConstructor.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
  • bindings/js/JSDOMBuiltinConstructorBase.cpp: Copied from Source/WebCore/bindings/js/JSDOMConstructor.cpp.
  • bindings/js/JSDOMBuiltinConstructorBase.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
  • bindings/js/JSDOMConstructor.cpp: Removed.
  • bindings/js/JSDOMConstructor.h: Remove all classes other than JSDOMConstructor.
  • bindings/js/JSDOMConstructorBase.cpp: Copied from Source/WebCore/bindings/js/JSDOMConstructor.cpp.
  • bindings/js/JSDOMConstructorBase.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
  • bindings/js/JSDOMConstructorNotConstructable.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
  • bindings/js/JSDOMConstructorWithDocument.cpp: Copied from Source/WebCore/bindings/js/JSDOMConstructor.cpp.
  • bindings/js/JSDOMConstructorWithDocument.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
  • bindings/js/JSDOMNamedConstructor.h: Copied from Source/WebCore/bindings/js/JSDOMConstructor.h.
  • bindings/js/JSDOMConvertStrings.h:

(WebCore::propertyNameToString):
(WebCore::propertyNameToAtomicString):
Move these here from JSDOMBinding.

  • bindings/js/JSHTMLElementCustom.cpp:

(WebCore::constructJSHTMLElement):

  • bindings/js/JSMutationObserverCustom.cpp:

(WebCore::constructJSMutationObserver):

  • bindings/js/JSReadableStreamPrivateConstructors.cpp:
  • bindings/js/JSStorageCustom.cpp:
  • bindings/js/JSUserMessageHandlersNamespaceCustom.cpp:

(WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):

  • bindings/js/JSWorkerCustom.cpp:

(WebCore::constructJSWorker):

  • bindings/scripts/CodeGeneratorJS.pm:

(GetConstructorTemplateClassName):
(GenerateConstructorDeclaration):
Update includes/names.

  • dom/StaticRange.cpp:

(WebCore::StaticRange::~StaticRange):

  • dom/StaticRange.h:

Add out-of-line destructor, so Node.h does not have to be included.

12:16 PM Changeset in webkit [211891] by jer.noble@apple.com
  • 8 edits in trunk

Move FullscreenClient creation into WebViewImpl, for use in (deprecated) WKView.
https://bugs.webkit.org/show_bug.cgi?id=168007

Reviewed by Alex Christensen.

Source/WebKit2:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/_WKFullscreenDelegate.h:
  • UIProcess/Cocoa/FullscreenClient.h:
  • UIProcess/Cocoa/FullscreenClient.mm:

(WebKit::FullscreenClient::FullscreenClient):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::WebViewImpl):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/FullscreenDelegate.mm:

(didFinishLoadForFrame):
(TestWebKitAPI::TEST):

12:04 PM Changeset in webkit [211890] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Initialize the main RunLoop in iOS WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=167953

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-02-08
Reviewed by Alexey Proskuryakov.

  • platform/ios/wak/WebCoreThread.mm:

(StartWebThread):
Initialize the main runloop on the main thread during iOS WebKit initialization.

11:42 AM Changeset in webkit [211889] by aakash_jain@apple.com
  • 7 edits
    1 copy in trunk/Source/WebCore

Move private methods from WKContentObservation.h to a separate header file
https://bugs.webkit.org/show_bug.cgi?id=167998

Reviewed by Alexey Proskuryakov.

  • WebCore.xcodeproj/project.pbxproj: Added WKContentObservationInternal.h
  • platform/ios/wak/WKContentObservationInternal.h: Added.
  • platform/ios/wak/WKContentObservation.h: Moved methods to WKContentObservationInternal.h
  • platform/ios/wak/WKContentObservation.cpp: Included new header file.
  • page/DOMTimer.cpp: Same.
  • page/DOMWindow.cpp: Same.
  • style/RenderTreeUpdater.cpp: Same.
11:36 AM Changeset in webkit [211888] by achristensen@apple.com
  • 5 edits in trunk/Source/ThirdParty/libwebrtc

Fix iOS libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=168004

Reviewed by Youenn Fablet.

We might still need to add some neon files.

  • Configurations/libwebrtc.xcconfig:
  • Configurations/libwebrtcpcrtc.xcconfig:
  • Configurations/opus.xcconfig:

Don't build sse-specific files for iOS.

  • libwebrtc.xcodeproj/project.pbxproj:

Don't include the sse4 optimization for now.
We can add the optimization for CPUs that support it later.

10:55 AM Changeset in webkit [211887] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

GUM is crashing in Debug mode when access is granted/denied for a page that is gone
https://bugs.webkit.org/show_bug.cgi?id=168003

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-08
Reviewed by Eric Carlson.

Removing the assertion since manager can be null and case is coevered by the if statement behind it.

  • UIProcess/UserMediaPermissionRequestProxy.cpp:

(WebKit::UserMediaPermissionRequestProxy::deny):

10:54 AM Changeset in webkit [211886] by commit-queue@webkit.org
  • 11 edits in trunk

RTCPeerConnection constructor can take null as input
https://bugs.webkit.org/show_bug.cgi?id=167992

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-08
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/datachannel-emptystring-expected.txt:
  • web-platform-tests/webrtc/no-media-call-expected.txt:
  • web-platform-tests/webrtc/promises-call-expected.txt:
  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:
  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt:

Source/WebCore:

Covered by updated test.

RTCPeerConnection takes an optional Dictionary as input.
As per https://heycam.github.io/webidl/#es-dictionary, null is converted to an empty dictionary.

  • Modules/mediastream/RTCPeerConnection.js:

(initializeRTCPeerConnection):

LayoutTests:

Covered by updated and rebased tests.

  • fast/mediastream/RTCPeerConnection-expected.txt:
  • fast/mediastream/RTCPeerConnection.html:
10:37 AM Changeset in webkit [211885] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

No need for CachedFrame to detach custom scrollbars.
<https://webkit.org/b/167995>

Reviewed by Sam Weinig.

Custom scrollbars have already been torn down with the rest of the render tree
by the time we're creating a CachedFrame.

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::CachedFrame):

10:33 AM Changeset in webkit [211884] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Simple line layout: Fix printReason for unsupported overflow values.
https://bugs.webkit.org/show_bug.cgi?id=168000

Reviewed by Simon Fraser.

Not testable.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::printReason):

10:02 AM Changeset in webkit [211883] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

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

It's in jhbuild for consistent layout tests (Requested by
mcatanzaro on #webkit).

Reverted changeset:

"[GTK] Add icu packages to Tools/gtk/install-dependencies"
https://bugs.webkit.org/show_bug.cgi?id=167993
http://trac.webkit.org/changeset/211873

9:52 AM Changeset in webkit [211882] by Ryan Haddad
  • 9 edits in trunk/Source/WebKit2

Unreviewed, rolling out r211869.

This change caused assertion failures on macOS WK2.

Reverted changeset:

"Allow speculative redirects"
https://bugs.webkit.org/show_bug.cgi?id=167982
http://trac.webkit.org/changeset/211869

9:48 AM Changeset in webkit [211881] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Mark several imported w3c fetch API tests as failing.

See bug #167999.

  • platform/gtk/TestExpectations:
9:31 AM Changeset in webkit [211880] by aakash_jain@apple.com
  • 3 edits in trunk/Source/WebCore

Remove WebCoreObjCDeallocWithWebThreadLock from header file
https://bugs.webkit.org/show_bug.cgi?id=167987

Reviewed by Alexey Proskuryakov.

  • platform/ios/wak/WebCoreThread.mm: Added WebCoreObjCDeallocWithWebThreadLock.
  • platform/ios/wak/WebCoreThreadMessage.h: Removed WebCoreObjCDeallocWithWebThreadLock.
9:29 AM Changeset in webkit [211879] by eric.carlson@apple.com
  • 4 edits in trunk/Source/WebKit2

Add WebRTC as an off-by-default experimental feature menu item.
https://bugs.webkit.org/show_bug.cgi?id=167972
<rdar://problem/30293429>

Reviewed by Jon Lee.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/WebPreferences.cpp:

(WebKit::WebPreferences::setPeerConnectionAndMediaStreamEnabled): We need to enable/disable
peer connection and media stream preferences at the same time, so special case them.
(WebKit::WebPreferences::setEnabledForFeature):

  • UIProcess/WebPreferences.h:
9:26 AM Changeset in webkit [211878] by aakash_jain@apple.com
  • 4 edits in trunk/Source/WebCore

Move WKMouseInRect to WAKView.mm
https://bugs.webkit.org/show_bug.cgi?id=167989

Reviewed by Alexey Proskuryakov.

  • platform/ios/wak/WAKAppKitStubs.h: Removed WKMouseInRect.
  • platform/ios/wak/WAKAppKitStubs.m:

(WKMouseInRect): Deleted.

  • platform/ios/wak/WAKView.mm:

(-[WAKView mouse:inRect:]): Added the logic of WKMouseInRect here instead of separate function call.

9:24 AM WebKitGTK/StartHacking edited by eocanha@igalia.com
(diff)
9:22 AM Changeset in webkit [211877] by aakash_jain@apple.com
  • 3 edits in trunk/Source/WebCore

Remove unused method WebCore::PluginData::pluginNameForMimeType
https://bugs.webkit.org/show_bug.cgi?id=167986

Reviewed by Anders Carlsson.

  • plugins/PluginData.cpp:

(WebCore::PluginData::pluginNameForWebVisibleMimeType): Deleted.

  • plugins/PluginData.h: Removed pluginNameForWebVisibleMimeType.
9:19 AM Changeset in webkit [211876] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Skip more tests that require drag and drop.

It's not supported by WTR. See bug #157179.

  • platform/gtk/TestExpectations:
9:16 AM Changeset in webkit [211875] by achristensen@apple.com
  • 5 edits in trunk/Source/ThirdParty/libwebrtc

[WebRTC] Fix libwebrtc build system
https://bugs.webkit.org/show_bug.cgi?id=167978

Patch by Youenn Fablet <youennf@gmail.com> on 2017-02-08
Reviewed by Alex Christensen.

  • Configurations/libwebrtc.xcconfig:
  • Configurations/libwebrtcpcrtc.xcconfig:
  • Configurations/usrsctp.xcconfig:
  • libwebrtc.xcodeproj/project.pbxproj:
9:11 AM Changeset in webkit [211874] by Carlos Garcia Campos
  • 1 edit
    2 adds in trunk/LayoutTests

Unreviewed GTK+ gardening. Add platform specific results for drag-select-when-zoomed tests.

It's quite difficult that those tests can generate common results in all ports, because the scale factor will
cause a text reflow that will be different. I think this is why they are marked as failure in all other
ports. I'm assuming our result is correct for our port.

  • platform/gtk/fast/events/drag-select-when-zoomed-expected.txt: Added.
  • platform/gtk/fast/events/drag-select-when-zoomed-with-header-expected.txt: Added.
8:54 AM Changeset in webkit [211873] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] Add icu packages to Tools/gtk/install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=167993

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-02-08
Reviewed by Michael Catanzaro.

  • gtk/install-dependencies: Add "icu" to the list of required packages (or "icu-dev", or "icu-devel"

depending in the GNU/Linux distribution)

8:25 AM Changeset in webkit [211872] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

[GTK] Test fast/forms/select-empty-option-height.html fails
https://bugs.webkit.org/show_bug.cgi?id=167985

Reviewed by Michael Catanzaro.

This seems to be a problem with the differences in scroll step or the size of the items in the list. The thing
is that 10 attempts with an scroll amount of 10 is not enough in the GTk+ port to scroll the list to the desired
point. Either increasing the scroll amount or the maximum attempts would fix the test. Increasing the scroll
amount would break the test in other ports so better use a higher number of maximum attempts.

  • fast/forms/listbox-respects-padding-bottom.html:
8:20 AM Changeset in webkit [211871] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK] Fix translatable form validation messages
https://bugs.webkit.org/show_bug.cgi?id=167984

Reviewed by Michael Catanzaro.

Most of them are just wrong. Use the same mesages than mac, which also makes some tests pass.

Fixes: fast/forms/validation-message-maxLength.html

fast/forms/validationMessage.html

  • platform/gtk/LocalizedStringsGtk.cpp:

(WebCore::validationMessageValueMissingText):
(WebCore::validationMessageValueMissingForCheckboxText):
(WebCore::validationMessageValueMissingForFileText):
(WebCore::validationMessageValueMissingForMultipleFileText):
(WebCore::validationMessageValueMissingForRadioText):
(WebCore::validationMessageValueMissingForSelectText):
(WebCore::validationMessageTypeMismatchText):
(WebCore::validationMessageTypeMismatchForEmailText):
(WebCore::validationMessageTypeMismatchForMultipleEmailText):
(WebCore::validationMessageTypeMismatchForURLText):
(WebCore::validationMessagePatternMismatchText):
(WebCore::validationMessageTooShortText):
(WebCore::validationMessageTooLongText):
(WebCore::validationMessageRangeUnderflowText):
(WebCore::validationMessageRangeOverflowText):
(WebCore::validationMessageStepMismatchText):
(WebCore::validationMessageBadInputForNumberText):

7:50 AM WebKitGTK/2.14.x edited by Michael Catanzaro
Propose r211868 (diff)
7:39 AM Changeset in webkit [211870] by Chris Dumez
  • 19 edits in trunk/Source

Add support for enhanced privacy diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=167948
<rdar://problem/30385112>

Reviewed by Antti Koivisto.

Source/WebCore:

Add new logDiagnosticMessageWithEnhancedPrivacy() method to DiagnosticLoggingClient
that is used for enhanced privacy logging. Start using this new API to log domains
that are visited.

  • loader/EmptyClients.cpp:
  • loader/FrameLoader.cpp:

(WebCore::logNavigation):
(WebCore::FrameLoader::loadWithDocumentLoader):

  • page/DiagnosticLoggingClient.h:
  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::domainVisitedKey):

  • page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Implement new DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy()
virtual method on WebKit2 and expose it to the client via the WKPageDiagnosticLogging
delegate.

  • UIProcess/API/APIDiagnosticLoggingClient.h:

(API::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):

  • UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
  • UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
  • UIProcess/Cocoa/DiagnosticLoggingClient.h:
  • UIProcess/Cocoa/DiagnosticLoggingClient.mm:

(WebKit::DiagnosticLoggingClient::setDelegate):
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):

  • UIProcess/WebPageDiagnosticLoggingClient.cpp:

(WebKit::WebPageDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):

  • UIProcess/WebPageDiagnosticLoggingClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::logDiagnosticMessageWithEnhancedPrivacy):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:

(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithEnhancedPrivacy):

  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
7:10 AM Changeset in webkit [211869] by Antti Koivisto
  • 9 edits in trunk/Source/WebKit2

Allow speculative redirects
https://bugs.webkit.org/show_bug.cgi?id=167982

Reviewed by Andreas Kling.

If speculative loader hits a redirect it will drop it on the floor. We should use it.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::dispatchWillSendRequestForCacheEntry):

Reset the m_isWaitingContinueWillSendRequestForCachedRedirect bit immediately.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::makeRedirectEntry):

Factor to a function.

(WebKit::NetworkCache::Cache::storeRedirect):

  • NetworkProcess/cache/NetworkCache.h:

(WebKit::NetworkCache::Cache::speculativeLoadManager):

  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::Entry):

Use std::optional instead std::unique_ptr for the redirect request.

(WebKit::NetworkCache::Entry::decodeStorageRecord):

  • NetworkProcess/cache/NetworkCacheEntry.h:

(WebKit::NetworkCache::Entry::redirectRequest):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::willSendRedirectedRequest):

Make cache entry for speculative redirect.
The redirect is not actually performed, the target resource will have separate
a speculative entry.

(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):
(WebKit::NetworkCache::SpeculativeLoad::didFailLoading):
(WebKit::NetworkCache::SpeculativeLoad::didComplete):

Protect against multiple completions.

(WebKit::NetworkCache::SpeculativeLoad::abort): Deleted.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::retrieve):

Make successful retrieves asynchronous to avoid re-entrancy problems.

4:39 AM Changeset in webkit [211868] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GStreamer] Critical warnings when media player is destroyed
https://bugs.webkit.org/show_bug.cgi?id=167981

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-02-08
Reviewed by Xabier Rodriguez-Calvar.

It can happen that the source doesn't have a parent when we try to disconnect the element-added signal.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::sourceChanged):

4:19 AM Changeset in webkit [211867] by magomez@igalia.com
  • 3 edits in trunk/Source/WebCore

[GTK] Reduce TiledBackingStore tile coverage when on memory pressure state
https://bugs.webkit.org/show_bug.cgi?id=167980

Reviewed by Carlos Garcia Campos.

Use a smaller coverAreaMultiplier in the TiledBackingStore when in memory pressure situation, to reduce
the amount of tiles created.

No new tests.

  • platform/graphics/texmap/coordinated/TiledBackingStore.cpp:

(WebCore::TiledBackingStore::createTilesIfNeeded):
(WebCore::TiledBackingStore::createTiles):

  • platform/graphics/texmap/coordinated/TiledBackingStore.h:
4:17 AM Changeset in webkit [211866] by Carlos Garcia Campos
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening. Skip animations/font-variations/ tests.

They are marked as ImageOnlyFailure, but are actually failing now. I think it's better to simply skip all font
variations tests since the build flag is always disabled in GTK+ port.

  • platform/gtk/TestExpectations:
3:51 AM Changeset in webkit [211865] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r211040 - [GTK] asserting on unknown locale for hyphenation is wrong
https://bugs.webkit.org/show_bug.cgi?id=167312

Reviewed by Carlos Garcia Campos.

The fact that we hit the assert on a test called 'hyphenation-unknown-locale' is already
a strong indication we should not have it. In addition to that, Carlos Lopez pointed out
a similar assert was removed from the Mac codepaths when the test was introduced.

  • platform/text/hyphen/HyphenationLibHyphen.cpp:

(WebCore::lastHyphenLocation): early return when a locale that is not available is provided
for hyphenation, instead of asserting.

3:50 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
3:49 AM Changeset in webkit [211864] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r211627 - [GStreamer] Store preloaded media in webkit's cache
https://bugs.webkit.org/show_bug.cgi?id=119477

Reviewed by Xabier Rodriguez-Calvar.

Files cached on disk by MediaPlayerPrivateGStreamer are deleted only when the player is closed. If the
WebProcess crashed, they're just left there in the cache directory. This patch changes the location
of those temporary files to a proper temporary directory (/var/tmp, as those files aren't actually
reusable, so they don't belong to a cache directory, and /tmp is a bad place because it's RAM-based on
some distros), unlinks (deletes) them right after creation and also deletes any other stalled temporary
file on the old legacy cache directory.

There's no API in GstPlaybin to control the temporary file location, so we do it manually by locating
the GstDownloadBuffer element in the pipeline as soon as it's created, reconfiguring it with the right
temporary file path and deleting the file as soon as it's created.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): Stop listening to element-added.
(WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback): Look for GstDownloadBuffer.
(WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback): Remove the file after creation.
(WebCore::MediaPlayerPrivateGStreamer::purgeOldDownloadFiles): Delete legacy files.
(WebCore::MediaPlayerPrivateGStreamer::sourceChanged): Listen to element-added signals on GstUriDecodeBin.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: New reference to GstDownloadBuffer.
3:47 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
3:11 AM Changeset in webkit [211863] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r211225 - [GStreamer] ASSERTION FAILED: !g_object_is_floating(ptr) in adoptGRef(GstContext* ptr)
https://bugs.webkit.org/show_bug.cgi?id=167458

Reviewed by Xabier Rodriguez-Calvar.

GstContext is a mini_object, not a GObject. Therefore it shouldn't (and can't) be checked for floatingness.

  • platform/graphics/gstreamer/GRefPtrGStreamer.cpp:

(WTF::adoptGRef): Removed incorrect assertion.

3:07 AM Changeset in webkit [211862] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebCore

Merge r211815 - [GStreamer] Deadlock when media player is destroyed
https://bugs.webkit.org/show_bug.cgi?id=167861

Reviewed by Michael Catanzaro.

The problem is that we are calling notifyOne() for the draw mutex without taking the lock.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::repaint):

3:05 AM Changeset in webkit [211861] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r211816 - [Soup] WebKitSoupRequestInputStream can still leave requests unfinished after r211773
https://bugs.webkit.org/show_bug.cgi?id=167929

Reviewed by Michael Catanzaro.

The while loop to process the pending data requests was not a good idea, because having a new pending request
doesn't mean we have more data available, but that more data was requested.

  • WebProcess/soup/WebKitSoupRequestInputStream.cpp:

(webkitSoupRequestInputStreamPendingReadAsyncComplete): Process only one request if needed.

3:05 AM Changeset in webkit [211860] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r211773 - [Soup] Long resources loaded by custom protocols sometimes never finish loading
https://bugs.webkit.org/show_bug.cgi?id=167890

Reviewed by Michael Catanzaro.

It's another bug that has appeared in WebKitSoupRequestInputStream after moving the custom protocols handling to
the main thread. The problem is that webkitSoupRequestInputStreamPendingReadAsyncComplete invalidates
pendingAsyncRead after calling webkitSoupRequestInputStreamReadAsyncResultComplete, but in some cases
webkitSoupRequestInputStreamReadAsyncResultComplete completes the task in the same run loop iteration. In that
case webkitSoupRequestInputStreamReadAsync is called again creating a new AsyncReadData that is destroyed right
after webkitSoupRequestInputStreamReadAsyncResultComplete returns.

  • WebProcess/soup/WebKitSoupRequestInputStream.cpp:

(AsyncReadData::AsyncReadData): Use an rvalue reference for the task.
(webkitSoupRequestInputStreamPendingReadAsyncComplete): Use WTFMove to ensure pendingAsyncRead is cleared before
webkitSoupRequestInputStreamReadAsyncResultComplete is called, and continue processing pending requests if there
are new ones after webkitSoupRequestInputStreamReadAsyncResultComplete.
(webkitSoupRequestInputStreamReadAsync): Use WTFMove to transfer the task to AsyncReadData.
(webkitSoupRequestInputStreamDidFailWithError): Use WTFMove to ensure pendingAsyncRead is cleared.

3:05 AM Changeset in webkit [211859] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge r211734 - [Soup] Deadlock in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=167876

Reviewed by Michael Catanzaro.

WebKitSoupRequestInputStream uses a read lock. What is happening is that webkitSoupRequestInputStreamAddData
takes the lock, and it calls webkitSoupRequestInputStreamPendingReadAsyncComplete with the lock help. That
causes webkitSoupRequestInputStreamReadAsync to be called again to read the next chunk, but in the same run loop
operation. We don't really need the read lock because both webkitSoupRequestInputStreamAddData and
webkitSoupRequestInputStreamReadAsync shoudl always be called from the main thread.

  • WebProcess/soup/WebKitSoupRequestInputStream.cpp:

(webkitSoupRequestInputStreamReadAsync): Remove the read lock and assert if called from a secondary thread.
(webkitSoupRequestInputStreamAddData): Ditto.

3:05 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
3:05 AM Changeset in webkit [211858] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

[SOUP] Network process crash in WebKit::CustomProtocolManagerImpl::didFailWithError
https://bugs.webkit.org/show_bug.cgi?id=165082

CustomProtocolManager uses a Workqueue to receive the IPC messages since r149194. Then we added the Soup
implementation adopting that approach, but without making our implementation thread safe. The crash happens
because the CustomProtocolManager implementation is used by two threads at the same time, the main thread
because of a ping load (probably caused by an image load in the unload handler, I haven't been able to reproduce
the crash) and the work queue thread. I'm not sure if the reasons to make CustomProtocolManager use a WorkQueue
are still valid for Mac, but I don't think they are for Soup. CustomProtocolManager is now only used in the
network process and sync loads don't use any nested run loop, they are just an IPC sync message. So this patch
makes CustomProtocolManager a normal message receiver again for Soup to ensure messages are handled in the main
thread as expected by the Soup implementation.

  • NetworkProcess/CustomProtocols/CustomProtocolManager.h:

(WebKit::CustomProtocolManager::childProcess): Remove WorkQueue initialization.

  • NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:

(WebKit::CustomProtocolManager::CustomProtocolManager): Register the message receiver.
(WebKit::CustomProtocolManager::initializeConnection): Deleted.

3:03 AM WebKitGTK/2.14.x edited by Carlos Garcia Campos
(diff)
2:39 AM Changeset in webkit [211857] by zandobersek@gmail.com
  • 8 edits
    2 adds in trunk

[EME] Implement MediaKeySession::remove()
https://bugs.webkit.org/show_bug.cgi?id=167870

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement MediaKeySession::remove() as outlined in the specification.

The CDMInstance::removeSessionData() virtual method is added. CDMInstance
implementors should remove any session data stored for the session that's
represented by the passed-in session ID and session type.

Once the session data is removed, the passed-in callback should be invoked
by the CDMInstance object so that MediaKeySession can immediately queue a
task in which it updates key statuses and expiration, reject the promise if
the data removal failed, or enqueue any license-release message and finally
successfully resolve the promise.

MockCDMFactory gains the removeKeysFromSessionWithID() method that purges
the keys for a given session ID. The method is called from
MockCDMInstance::removeSessionData() implementation, which passes the
removed keys to the RemoveSessionDataCallback, along with a license-release
message that is checked in the tests. The key removal itself isn't tested
yet because the MediaKeySession's update key statuses algorithm isn't
implemented yet.

Test: media/encrypted-media/mock-MediaKeySession-remove.html

  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::remove):

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMFactory::removeKeysFromSessionWithID):
(WebCore::MockCDMInstance::removeSessionData):

  • testing/MockCDMFactory.h:

LayoutTests:

Add the mock-MediaKeySession-remove.html test that tests the functionality
of the MediaKeySession::remove() implementation. The test checks that the
calls to that method properly resolve or reject the returned promise,
depending on the object state. Another test checks the message that's
queued upon a successful removal.

Additional tests will be added later once MediaKeySession properly
implements the close() method and key status updates.

  • media/encrypted-media/mock-MediaKeySession-remove-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeySession-remove.html: Added.
  • platform/efl/TestExpectations:
  • platform/mac/TestExpectations:
2:25 AM Changeset in webkit [211856] by zandobersek@gmail.com
  • 8 edits
    2 adds in trunk

[EME] Implement MediaKeySession::close()
https://bugs.webkit.org/show_bug.cgi?id=167869

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement MediaKeySession::close() as outlined in the specification.

The CDMInstance::closeSession() virtual method, when called, should
close the session that's represented by the passed-in session ID on
the CDMInstance implementor object. That's the same session ID that
the CDMInstance object passes to the MediaKeySession class through
the callback that's provided to the updateLicense call.

The CloseSessionCallback, passed to CDMInstance::closeSession(),
should be invoked by the CDMInstance implementor once the session
is closed. When that is invoked, another task is queued for the
MediaKeySession object that runs the session closed algorithm
and resolves the promise.

MockCDMInstance::closeSession() is defined to remove the session
from the MockCDMFactory object and invoke the CloseSessionCallback.

Test: media/encrypted-media/mock-MediaKeySession-close.html

  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::close):

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMInstance::closeSession):

  • testing/MockCDMFactory.h:

LayoutTests:

Add the mock-MediaKeySession-close.html test case which checks proper
behavior of MediaKeySession::close(), specifically that under specific
conditions the promise returned by that method is properly resolved or
rejected. The test is skipped on all platforms for now.

  • media/encrypted-media/mock-MediaKeySession-close-expected.txt: Added.
  • media/encrypted-media/mock-MediaKeySession-close.html: Added.
  • platform/efl/TestExpectations:
  • platform/mac/TestExpectations:
1:34 AM Changeset in webkit [211855] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebCore

[EME] Alias CDMInstance enums to the specification-defined enums
https://bugs.webkit.org/show_bug.cgi?id=167896

Reviewed by Sam Weinig.

Simplify the enums in the CDMInstance class by simply aliasing them
to the EME specification-defined enums. CDMInstance::KeyStatus and
CDMInstance::MessageType were already direct copies of the
MediaKeyStatus and MediaKeyMessageType enums, while the
CDMInstance::LicenseType had the members as MediaKeySessionType,
but with slightly different names.

No changes in behavior.

  • Modules/encryptedmedia/CDMInstance.h:
  • Modules/encryptedmedia/MediaKeySession.cpp:

(WebCore::MediaKeySession::generateRequest):
(WebCore::MediaKeySession::update):

  • testing/MockCDMFactory.cpp:

(WebCore::MockCDMInstance::requestLicense):

Note: See TracTimeline for information about the timeline view.