Timeline



Jun 21, 2017:

11:43 PM Changeset in webkit [218680] by bshafiei@apple.com
  • 1 copy in tags/Safari-604.1.25.3.3

New tag.

11:17 PM Changeset in webkit [218679] by commit-queue@webkit.org
  • 1 edit
    1 add in trunk/Source/WebInspectorUI

[GTK] Web Inspector: Add NavigationItemCheckers.svg
https://bugs.webkit.org/show_bug.cgi?id=173692

Patch by Fujii Hironori <Fujii Hironori> on 2017-06-21
Reviewed by Carlos Garcia Campos.

  • UserInterface/Images/gtk/NavigationItemCheckers.svg: Added.
9:46 PM Changeset in webkit [218678] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r218419): 3 NSMutableDiciontary leaks calling -[WKProcessPool _pluginLoadClientPolicies]
<https://webkit.org/b/173689>

Reviewed by Chris Dumez.

Caught by the clang static analyzer.

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(policiesHashMapToDictionary): Switch from using
[[NSMutableDictionary alloc] init] which returns a +1 retained
object in MRR to [NSMutableDictionary new] which returns an
autoreleased object under MRR. This bug caused 3 leaks when
calling -[WKProcessPool _pluginLoadClientPolicies], which should
return an autoreleased object based on its signature.

9:31 PM Changeset in webkit [218677] by commit-queue@webkit.org
  • 16 edits
    2 adds in trunk

[Fetch API] TypeError when called with body === {}
https://bugs.webkit.org/show_bug.cgi?id=173295
<rdar://problem/32746733>

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21
Reviewed by Sam Weinig.

Source/WebCore:

Test: fetch/body-init.html

Handling body of Request and Response using binding generator to correctly handle unions.
The biggest change is that any value that is not a specific type in the union will match a String.
This is matching WebIDL spec and Firefox behavior.

Handling of ReadableStream bodies remains in JS builtin for Response.
This allows easier handling cloning and consumption of body.
Adding setBodyAsReadableStream since this is no longer handled by extractBody.

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::extract): Using Variant instead of JSC::JSValue.
(WebCore::FetchBody::readableStreamBody): Introduced to handle the
case of readable stream bodies.

  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::extractBody):

  • Modules/fetch/FetchBodyOwner.h:

(WebCore::FetchBodyOwner::setBody):

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::setBody): Splitting setBody for ease of readability.
(WebCore::FetchRequest::setBodyFromInputRequest):

  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchRequest.idl:
  • Modules/fetch/FetchRequest.js:

(initializeFetchRequest):

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::initializeWith):
(WebCore::FetchResponse::setBodyAsReadableStream):

  • Modules/fetch/FetchResponse.h:
  • Modules/fetch/FetchResponse.idl:
  • Modules/fetch/FetchResponse.js:

(initializeFetchResponse):

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

  • fetch/body-init-expected.txt: Added.
  • fetch/body-init.html: Added.
7:44 PM Changeset in webkit [218676] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit2

Add release assertions help diagnose a hang in CallbackMap
https://bugs.webkit.org/show_bug.cgi?id=173680
<rdar://problem/32911286>

Reviewed by Chris Dumez.

Assert that these functions are only called in the main thread and the empty value is never used as a key.

  • UIProcess/GenericCallback.h:

(WebKit::CallbackMap::put):
(WebKit::CallbackMap::take):

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

Add z-index to compositing logging output
https://bugs.webkit.org/show_bug.cgi?id=173684

Reviewed by Zalan Bujtas.

Show z-index, which is often useful to find negative z-index items.

Log "+foreground" rather than "foreground" to indicate that this layer has an
additional foreground/background layer, and fix spacing.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::logLayerInfo):

7:22 PM Changeset in webkit [218674] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

ArrayPrototype.map builtin declares a var it does not use
https://bugs.webkit.org/show_bug.cgi?id=173685

Reviewed by Keith Miller.

  • builtins/ArrayPrototype.js:

(map):

6:54 PM Changeset in webkit [218673] by sbarati@apple.com
  • 3 edits
    1 add in trunk

eval virtual call is incorrect in the baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=173587
<rdar://problem/32867897>

Reviewed by Michael Saboff.

JSTests:

  • stress/do-eval-virtual-call-correctly.js: Added.

(assert):
(f):
(i.test):
(catch):

Source/JavaScriptCore:

When making a virtual call for call_eval, e.g, when the thing
we're calling isn't actually eval, we end up calling the caller
instead of the callee. This is clearly wrong. The code ends up
issuing a load for the Callee in the callers frame instead of
the callee we're calling. The fix is simple, we just need to
load the real callee. Only the 32-bit baseline JIT had this bug.

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEvalSlowCase):

6:41 PM Changeset in webkit [218672] by Wenson Hsieh
  • 5 edits in trunk

[iOS DnD] [WK2] Cancelling a drag interaction using the ObjC SPI causes subsequent dragging to fail
https://bugs.webkit.org/show_bug.cgi?id=173659
<rdar://problem/32879788>

Reviewed by Tim Horton.

Source/WebKit2:

Currently, a drag session that failed to begin is cleaned up either when the web process responds in
-[WKContentView _didHandleStartDataInteractionRequest:] with started = NO, or if started is YES, in
-dragInteraction:session:didEndWithOperation: instead. However, it is possible that even when the pasteboard has
items and the drag has started in the web process, something in the UI process may then cause the drag to be
cancelled (for instance, an SPI client returning empty arrays for all adjusted item providers, or UIKit not even
calling into -dragInteraction:itemsForBeginningSession: when we invoke their completion block).

In any case, if the drag session is drag-item-less after calling the drag start completion block, clean up and
cancel the drag.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _didHandleStartDataInteractionRequest:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):

Tools:

Adds a new test to verify that a lift cancelled within the UI process does not cause subsequent dragging to fail.

  • TestWebKitAPI/Tests/WebKit2Cocoa/link-and-target-div.html:

Augment this test page to log dragend and dragstart events on the drag source as well.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(checkStringArraysAreEqual):
(TestWebKitAPI::TEST):

6:25 PM Changeset in webkit [218671] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix Window Debug build after r218660.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForWithReason):

6:22 PM Changeset in webkit [218670] by commit-queue@webkit.org
  • 96 edits
    15 copies
    3 moves
    27 adds
    6 deletes in trunk/Source/ThirdParty/libwebrtc

Update libyuv to 8cab2e31d76246263206318f3568d452e7f3ff3e
https://bugs.webkit.org/show_bug.cgi?id=173675

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21
Reviewed by Sam Weinig.

  • Source/third_party/libyuv/.clang-format: Added.
  • Source/third_party/libyuv/.gitignore: Added.
  • Source/third_party/libyuv/Android.mk:
  • Source/third_party/libyuv/BUILD.gn:
  • Source/third_party/libyuv/CM_linux_packages.cmake: Added.
  • Source/third_party/libyuv/CMakeLists.txt:
  • Source/third_party/libyuv/DEPS:
  • Source/third_party/libyuv/PRESUBMIT.py:

(_RunPythonTests):
(_RunPythonTests.join):
(_CommonChecks):
(CheckChangeOnUpload):
(CheckChangeOnCommit):

  • Source/third_party/libyuv/README.chromium:
  • Source/third_party/libyuv/build_overrides/build.gni:
  • Source/third_party/libyuv/chromium/.gclient: Removed.
  • Source/third_party/libyuv/chromium/README: Removed.
  • Source/third_party/libyuv/cleanup_links.py: Added.

(WebRTCLinkSetup):
(WebRTCLinkSetup.init):
(WebRTCLinkSetup.CleanupLinks):
(_initialize_database):
(main):

  • Source/third_party/libyuv/codereview.settings:
  • Source/third_party/libyuv/docs/deprecated_builds.md:
  • Source/third_party/libyuv/docs/getting_started.md:
  • Source/third_party/libyuv/gyp_libyuv.py:
  • Source/third_party/libyuv/include/libyuv/basic_types.h:
  • Source/third_party/libyuv/include/libyuv/compare.h:
  • Source/third_party/libyuv/include/libyuv/compare_row.h:
  • Source/third_party/libyuv/include/libyuv/convert.h:
  • Source/third_party/libyuv/include/libyuv/convert_argb.h:
  • Source/third_party/libyuv/include/libyuv/convert_from.h:
  • Source/third_party/libyuv/include/libyuv/convert_from_argb.h:
  • Source/third_party/libyuv/include/libyuv/cpu_id.h:
  • Source/third_party/libyuv/include/libyuv/macros_msa.h:
  • Source/third_party/libyuv/include/libyuv/mjpeg_decoder.h:
  • Source/third_party/libyuv/include/libyuv/planar_functions.h:
  • Source/third_party/libyuv/include/libyuv/rotate.h:
  • Source/third_party/libyuv/include/libyuv/rotate_argb.h:
  • Source/third_party/libyuv/include/libyuv/rotate_row.h:
  • Source/third_party/libyuv/include/libyuv/row.h:
  • Source/third_party/libyuv/include/libyuv/scale.h:
  • Source/third_party/libyuv/include/libyuv/scale_argb.h:
  • Source/third_party/libyuv/include/libyuv/scale_row.h:
  • Source/third_party/libyuv/include/libyuv/version.h:
  • Source/third_party/libyuv/include/libyuv/video_common.h:
  • Source/third_party/libyuv/infra/config/OWNERS: Added.
  • Source/third_party/libyuv/infra/config/README.md: Added.
  • Source/third_party/libyuv/infra/config/cq.cfg: Added.
  • Source/third_party/libyuv/libyuv.gyp:
  • Source/third_party/libyuv/libyuv.gypi:
  • Source/third_party/libyuv/libyuv_test.gyp:
  • Source/third_party/libyuv/linux.mk:
  • Source/third_party/libyuv/pylintrc: Added.
  • Source/third_party/libyuv/setup_links.py: Removed.
  • Source/third_party/libyuv/source/compare.cc:
  • Source/third_party/libyuv/source/compare_common.cc:
  • Source/third_party/libyuv/source/compare_gcc.cc:
  • Source/third_party/libyuv/source/compare_neon.cc:
  • Source/third_party/libyuv/source/compare_neon64.cc:
  • Source/third_party/libyuv/source/compare_win.cc:
  • Source/third_party/libyuv/source/convert.cc:
  • Source/third_party/libyuv/source/convert_argb.cc:
  • Source/third_party/libyuv/source/convert_from.cc:
  • Source/third_party/libyuv/source/convert_from_argb.cc:
  • Source/third_party/libyuv/source/convert_jpeg.cc:
  • Source/third_party/libyuv/source/convert_to_argb.cc:
  • Source/third_party/libyuv/source/convert_to_i420.cc:
  • Source/third_party/libyuv/source/cpu_id.cc:
  • Source/third_party/libyuv/source/mjpeg_decoder.cc:
  • Source/third_party/libyuv/source/mjpeg_validate.cc:
  • Source/third_party/libyuv/source/planar_functions.cc:
  • Source/third_party/libyuv/source/rotate.cc:
  • Source/third_party/libyuv/source/rotate_any.cc:
  • Source/third_party/libyuv/source/rotate_argb.cc:
  • Source/third_party/libyuv/source/rotate_common.cc:
  • Source/third_party/libyuv/source/rotate_dspr2.cc: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/rotate_mips.cc.
  • Source/third_party/libyuv/source/rotate_gcc.cc:
  • Source/third_party/libyuv/source/rotate_msa.cc: Added.
  • Source/third_party/libyuv/source/rotate_neon.cc:
  • Source/third_party/libyuv/source/rotate_neon64.cc:
  • Source/third_party/libyuv/source/rotate_win.cc:
  • Source/third_party/libyuv/source/row_any.cc:
  • Source/third_party/libyuv/source/row_common.cc:
  • Source/third_party/libyuv/source/row_dspr2.cc: Added.
  • Source/third_party/libyuv/source/row_gcc.cc:
  • Source/third_party/libyuv/source/row_mips.cc: Removed.
  • Source/third_party/libyuv/source/row_msa.cc:
  • Source/third_party/libyuv/source/row_neon.cc:
  • Source/third_party/libyuv/source/row_neon64.cc:
  • Source/third_party/libyuv/source/row_win.cc:
  • Source/third_party/libyuv/source/scale.cc:
  • Source/third_party/libyuv/source/scale_any.cc:
  • Source/third_party/libyuv/source/scale_argb.cc:
  • Source/third_party/libyuv/source/scale_common.cc:
  • Source/third_party/libyuv/source/scale_dspr2.cc: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/source/scale_mips.cc.
  • Source/third_party/libyuv/source/scale_gcc.cc:
  • Source/third_party/libyuv/source/scale_msa.cc: Added.
  • Source/third_party/libyuv/source/scale_neon.cc:
  • Source/third_party/libyuv/source/scale_neon64.cc:
  • Source/third_party/libyuv/source/scale_win.cc:
  • Source/third_party/libyuv/source/video_common.cc:
  • Source/third_party/libyuv/sync_chromium.py: Removed.
  • Source/third_party/libyuv/third_party/gflags/BUILD.gn: Removed.
  • Source/third_party/libyuv/third_party/gflags/LICENSE: Removed.
  • Source/third_party/libyuv/third_party/gflags/README.libyuv: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/posix/include/gflags/gflags.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/posix/include/gflags/gflags_completions.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/posix/include/gflags/gflags_declare.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/posix/include/gflags/gflags_gflags.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/posix/include/private/config.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/win/include/gflags/gflags.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/win/include/gflags/gflags_completions.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/win/include/gflags/gflags_declare.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/win/include/gflags/gflags_gflags.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gen/win/include/private/config.h: Removed.
  • Source/third_party/libyuv/third_party/gflags/gflags.gyp: Removed.
  • Source/third_party/libyuv/tools/gritsettings/README: Removed.
  • Source/third_party/libyuv/tools/gritsettings/resource_ids: Removed.
  • Source/third_party/libyuv/tools/valgrind-libyuv/tsan/OWNERS: Removed.
  • Source/third_party/libyuv/tools/valgrind-libyuv/tsan/PRESUBMIT.py: Removed.
  • Source/third_party/libyuv/tools/valgrind-libyuv/tsan/suppressions.txt: Removed.
  • Source/third_party/libyuv/tools/valgrind-libyuv/tsan/suppressions_mac.txt: Removed.
  • Source/third_party/libyuv/tools/valgrind-libyuv/tsan/suppressions_win32.txt: Removed.
  • Source/third_party/libyuv/tools_libyuv/OWNERS: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/OWNERS.
  • Source/third_party/libyuv/tools_libyuv/autoroller/roll_deps.py: Added.

(RollError):
(ParseDepsDict):
(ParseLocalDepsFile):
(ParseRemoteCrDepsFile):
(ParseCommitPosition):
(_RunCommand):
(_GetBranches):
(_ReadGitilesContent):
(ReadRemoteCrFile):
(ReadRemoteCrCommit):
(ReadUrlContent):
(GetMatchingDepsEntries):
(BuildDepsentryDict):
(BuildDepsentryDict.AddDepsEntries):
(CalculateChangedDeps):
(CalculateChangedClang):
(CalculateChangedClang.GetClangRev):
(GenerateCommitMessage):
(UpdateDepsFile):
(_IsTreeClean):
(_EnsureUpdatedMasterBranch):
(_CreateRollBranch):
(_RemovePreviousRollBranch):
(_LocalCommit):
(_UploadCL):
(_SendToCQ):
(main):

  • Source/third_party/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py: Added.

(TestError):
(FakeCmd):
(FakeCmd.init):
(FakeCmd.add_expectation):
(FakeCmd.call):
(TestRollChromiumRevision):
(TestRollChromiumRevision.setUp):
(TestRollChromiumRevision.tearDown):
(TestRollChromiumRevision.testUpdateDepsFile):
(TestRollChromiumRevision.testParseDepsDict):
(TestRollChromiumRevision.testParseDepsDict.assertVar):
(TestRollChromiumRevision.testGetMatchingDepsEntriesReturnsPathInSimpleCase):
(TestRollChromiumRevision.testGetMatchingDepsEntriesHandlesSimilarStartingPaths):
(TestRollChromiumRevision.testGetMatchingDepsEntriesHandlesTwoPathsWithIdenticalFirstParts):
(TestRollChromiumRevision.testCalculateChangedDeps):
(_SetupGitLsRemoteCall):

  • Source/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS: Added.
  • Source/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.new: Added.
  • Source/third_party/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old: Added.
  • Source/third_party/libyuv/tools_libyuv/get_landmines.py: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/get_landmines.py.
  • Source/third_party/libyuv/tools_libyuv/msan/OWNERS: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/msan/OWNERS.
  • Source/third_party/libyuv/tools_libyuv/msan/blacklist.txt: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/msan/blacklist.txt.
  • Source/third_party/libyuv/tools_libyuv/ubsan/OWNERS: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/ubsan/OWNERS.
  • Source/third_party/libyuv/tools_libyuv/ubsan/blacklist.txt: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/ubsan/blacklist.txt.
  • Source/third_party/libyuv/tools_libyuv/ubsan/vptr_blacklist.txt: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/ubsan/vptr_blacklist.txt.
  • Source/third_party/libyuv/tools_libyuv/valgrind/libyuv_tests.bat: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/valgrind-libyuv/libyuv_tests.bat.
  • Source/third_party/libyuv/tools_libyuv/valgrind/libyuv_tests.py: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/valgrind-libyuv/libyuv_tests.py.

(LibyuvTest._DefaultCommand):

  • Source/third_party/libyuv/tools_libyuv/valgrind/libyuv_tests.sh: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/valgrind-libyuv/libyuv_tests.sh.
  • Source/third_party/libyuv/tools_libyuv/valgrind/memcheck/OWNERS: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/valgrind-libyuv/memcheck/OWNERS.
  • Source/third_party/libyuv/tools_libyuv/valgrind/memcheck/PRESUBMIT.py: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/valgrind-libyuv/memcheck/PRESUBMIT.py.

(CheckChange):

  • Source/third_party/libyuv/tools_libyuv/valgrind/memcheck/suppressions.txt: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/valgrind-libyuv/memcheck/suppressions.txt.
  • Source/third_party/libyuv/tools_libyuv/valgrind/memcheck/suppressions_mac.txt: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/valgrind-libyuv/memcheck/suppressions_mac.txt.
  • Source/third_party/libyuv/tools_libyuv/valgrind/memcheck/suppressions_win32.txt: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/tools/valgrind-libyuv/memcheck/suppressions_win32.txt.
  • Source/third_party/libyuv/unit_test/color_test.cc:
  • Source/third_party/libyuv/unit_test/compare_test.cc:
  • Source/third_party/libyuv/unit_test/convert_test.cc:
  • Source/third_party/libyuv/unit_test/cpu_test.cc:
  • Source/third_party/libyuv/unit_test/cpu_thread_test.cc: Added.
  • Source/third_party/libyuv/unit_test/math_test.cc:
  • Source/third_party/libyuv/unit_test/planar_test.cc:
  • Source/third_party/libyuv/unit_test/rotate_argb_test.cc:
  • Source/third_party/libyuv/unit_test/rotate_test.cc:
  • Source/third_party/libyuv/unit_test/scale_argb_test.cc:
  • Source/third_party/libyuv/unit_test/scale_test.cc:
  • Source/third_party/libyuv/unit_test/unit_test.cc:
  • Source/third_party/libyuv/unit_test/unit_test.h:

(SizeValid):

  • Source/third_party/libyuv/unit_test/video_common_test.cc:
  • Source/third_party/libyuv/util/compare.cc:
  • Source/third_party/libyuv/util/cpuid.c:

(main):

  • Source/third_party/libyuv/util/psnr.cc:
  • Source/third_party/libyuv/util/psnr_main.cc:
  • Source/third_party/libyuv/util/ssim.cc:
  • Source/third_party/libyuv/util/ssim.h:
  • Source/third_party/libyuv/util/yuvconvert.cc: Renamed from Source/ThirdParty/libwebrtc/Source/third_party/libyuv/util/convert.cc.
6:09 PM Changeset in webkit [218669] by akling@apple.com
  • 5 edits in trunk/Source

Increase memory kill limits for WebContent processes that manage multiple tabs.
https://bugs.webkit.org/show_bug.cgi?id=173674

Reviewed by Geoffrey Garen.

Source/WebCore:

Plumb the non-utility Page count down to WTF::MemoryPressureHandler.

  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::~Page):

Source/WTF:

When opening <a target=_blank> links, we currently have to use the same WebContent
process for the new tab, to support scripting the window.opener object.
This means that some WebContent processes end up hosting multiple tabs, making it
more likely that those processes will hit the memory limits.

Address this by adding some additional allowance for multi-tab processes:

For each additional tab, up to 4 tabs, add 1GB to the memory kill limit.

  • wtf/MemoryPressureHandler.cpp:

(WTF::thresholdForMemoryKillWithProcessState):
(WTF::MemoryPressureHandler::setTabCount):
(WTF::MemoryPressureHandler::thresholdForMemoryKill):
(WTF::MemoryPressureHandler::measurementTimerFired):

  • wtf/MemoryPressureHandler.h:
5:56 PM Changeset in webkit [218668] by bshafiei@apple.com
  • 2 edits in branches/safari-604.1.25.3-branch/Source/JavaScriptCore

Roll out r217530. rdar://problem/32912916

5:54 PM Changeset in webkit [218667] by bshafiei@apple.com
  • 7 edits in branches/safari-604.1.25.3-branch/Source

Versioning.

5:40 PM Changeset in webkit [218666] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

[WebCrypto] Restore ordering of CryptoAlgorithmIdentifier in SerializedScriptValue
https://bugs.webkit.org/show_bug.cgi?id=173678
<rdar://problem/32879314>

Reviewed by Sam Weinig.

r218030 reorders the ordering of CryptoAlgorithmIdentifier in SerializedScriptValue,
which introduces backward compatibility issues with CryptoKey objects stored in the
IndexedDB. Hence, we should restore it back.

No tests.

  • bindings/js/SerializedScriptValue.cpp:
5:27 PM Changeset in webkit [218665] by dbates@webkit.org
  • 7 edits in trunk/Source/WebCore

Change FrameLoadRequest from a struct to a class

FrameLoadRequest is underutilizing the purpose of a struct - default visibility of
members is public, as FrameLoadRequest explicitly groups its members under public:
or private: sections. Maybe in the future we can make FrameLoadRequest a struct
with only public members. For now, we should consider FrameLoadRequest a class.

  • loader/FormSubmission.h:
  • loader/FrameLoadRequest.h:
  • loader/FrameLoader.h:
  • page/Chrome.h:
  • page/ChromeClient.h:
  • replay/UserInputBridge.h:
5:25 PM Changeset in webkit [218664] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Compiler error while building with !HAVE(ACCESSIBILITY)
https://bugs.webkit.org/show_bug.cgi?id=173670

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-21
Reviewed by Chris Fleizach.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::getOrCreate):
(WebCore::AXObjectCache::childrenChanged):

5:24 PM Changeset in webkit [218663] by graouts@webkit.org
  • 3 edits in trunk/Source/WebCore

Build fix.

Reviewed by Tim "Mr. T" Horton.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::logSuspendCount):

  • page/Page.cpp:

(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):

4:55 PM Changeset in webkit [218662] by graouts@webkit.org
  • 13 edits in trunk

Ensure DRT always logs rAF suspension debugging code
https://bugs.webkit.org/show_bug.cgi?id=173681

Reviewed by Tim "Mr. T" Horton.

Source/WebCore:

Instead of using a setting to check whether we should log information related to rAF
callbacks being suspended with WK1, we now check whether we're using in DRT to avoid
any potential issue with settings being in the incorrect state when a test is run.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::logSuspendCount):

  • page/Page.cpp:

(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):

  • page/Settings.in:
  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::MacApplication::isDumpRenderTree):

Source/WebKit/mac:

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

(+[WebPreferences initialize]):
(-[WebPreferences shouldLogScriptedAnimationControllerSuspensionChange]): Deleted.
(-[WebPreferences setShouldLogScriptedAnimationControllerSuspensionChange:]): Deleted.

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

(-[WebView _preferencesChanged:]):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

3:55 PM Changeset in webkit [218661] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-604.1.27/Source/WebKit2

Cherry-pick r218656. rdar://problem/32905541

3:53 PM Changeset in webkit [218660] by Chris Dumez
  • 12 edits in trunk

Allow constructing a WTF:Function from a function pointer
https://bugs.webkit.org/show_bug.cgi?id=173660

Reviewed by Alex Christensen.

Source/WebCore:

Construct WTF:Function directly from a function pointer when possible
instead of constructing a lambda to do so.

  • Modules/encryptedmedia/InitDataRegistry.cpp:

(WebCore::InitDataRegistry::InitDataRegistry):

  • page/Page.cpp:
  • page/mac/PageMac.mm:

(WebCore::Page::platformInitialize):

  • platform/cf/MainThreadSharedTimerCF.cpp:

(WebCore::setupPowerObserver):

  • platform/mac/WebCoreNSURLExtras.mm:
  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForWithReason):

  • workers/Worker.cpp:

(WebCore::Worker::Worker):

Source/WTF:

Allow constructing a WTF:Function from a function pointer and
assigning a function pointer to a WTF:Function.

  • wtf/Function.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WTF/Function.cpp:

(TestWebKitAPI::returnThree):
(TestWebKitAPI::returnFour):
(TestWebKitAPI::returnPassedValue):
(TestWebKitAPI::TEST):

3:46 PM Changeset in webkit [218659] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.27

Tag Safari-604.1.27.

3:43 PM Changeset in webkit [218658] by Ryan Haddad
  • 6 edits in branches/safari-604.1.25.3-branch/LayoutTests

Unreviewed test gardening.

LayoutTests/imported/w3c:

  • web-platform-tests/html/dom/reflection-metadata-expected.txt:
  • web-platform-tests/html/dom/reflection-misc-expected.txt:
  • web-platform-tests/html/dom/self-origin.sub-expected.txt:

LayoutTests:

  • platform/mac/TestExpectations:
3:13 PM Changeset in webkit [218657] by commit-queue@webkit.org
  • 4 edits in trunk/Source/ThirdParty/libwebrtc

Fix build after r218645
https://bugs.webkit.org/show_bug.cgi?id=173668

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21

  • Source/webrtc/base/sigslottester.h: Removing executable right.
  • Source/webrtc/modules/video_coding/codecs/vp8/temporal_layers.h:

(webrtc::TemporalLayersFactory::Create): Inline a default implementation.

  • Source/webrtc/modules/video_processing/util/skin_detection.h: Removing executable right.
3:11 PM Changeset in webkit [218656] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r218606): 3D Touch action menu for links is missing items
https://bugs.webkit.org/show_bug.cgi?id=173669
<rdar://problem/32905541>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
defaultActionsForLinkSheet is used outside the usual action sheet flow,
by 3D Touch code. Therefore, we're not guaranteed to have a _positionInformation.
We don't need one, though -- we can get the URL from the passed-in
_WKActivatedElementInfo, exactly like defaultActionsForImageSheet already did.

(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
Remove the delegate null check, which isn't used after r218606.

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

CSS text properties affect <video> shadow root
https://bugs.webkit.org/show_bug.cgi?id=173664
<rdar://problem/32904328>

Patch by Antoine Quint <Antoine Quint> on 2017-06-21
Reviewed by Dean Jackson.

Source/WebCore:

Ensure that we reset all inheritable styles back to their initial value for media shadow roots.

Test: media/modern-media-controls/time-label/time-label-inherited-text-indent.html

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

(.media-controls-container):

LayoutTests:

Add a test that ensures that setting an inheritable style on the <video> does not affect
time labels within the shadow root.

  • media/modern-media-controls/time-label/time-label-inherited-text-indent-expected.txt: Added.
  • media/modern-media-controls/time-label/time-label-inherited-text-indent.html: Added.
2:50 PM Changeset in webkit [218654] by jmarcell@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

2:35 PM Changeset in webkit [218653] by jmarcell@apple.com
  • 1 copy in tags/Safari-603.3.7

Tag Safari-603.3.7.

2:32 PM Changeset in webkit [218652] by commit-queue@webkit.org
  • 6 edits
    4 adds in trunk

Web Inspector: Using "break on all exceptions" when throwing stack overflow hangs inspector
https://bugs.webkit.org/show_bug.cgi?id=172432
<rdar://problem/29870873>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-06-21
Reviewed by Saam Barati.

Source/JavaScriptCore:

Avoid pausing on StackOverflow and OutOfMemory errors to avoid a hang.
We will proceed to improve debugging of these cases in the follow-up bugs.

  • debugger/Debugger.cpp:

(JSC::Debugger::exception):
Ignore pausing on these errors.

  • runtime/ErrorInstance.h:

(JSC::ErrorInstance::setStackOverflowError):
(JSC::ErrorInstance::isStackOverflowError):
(JSC::ErrorInstance::setOutOfMemoryError):
(JSC::ErrorInstance::isOutOfMemoryError):

  • runtime/ExceptionHelpers.cpp:

(JSC::createStackOverflowError):

  • runtime/Error.cpp:

(JSC::createOutOfMemoryError):
Mark these kinds of errors.

LayoutTests:

  • inspector/debugger/no-pause-out-of-memory-exception-expected.txt: Added.
  • inspector/debugger/no-pause-out-of-memory-exception.html: Added.
  • inspector/debugger/no-pause-stack-overflow-exception-expected.txt: Added.
  • inspector/debugger/no-pause-stack-overflow-exception.html: Added.
2:29 PM Changeset in webkit [218651] by Simon Fraser
  • 11 edits
    8 deletes in trunk

Remove WILL_REVEAL_EDGE_EVENTS code
https://bugs.webkit.org/show_bug.cgi?id=173632

Reviewed by Sam Weinig, Beth Dakin.

Remove will-reveal-edge events, which never took off.

Source/WebCore:

  • dom/Document.cpp:

(WebCore::Document::clearScriptedAnimationController):
(WebCore::Document::sendWillRevealEdgeEventsIfNeeded): Deleted.

  • dom/Document.h:
  • dom/GlobalEventHandlers.idl:
  • html/HTMLBodyElement.idl:
  • html/HTMLFrameSetElement.idl:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollPositionChanged):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollTo):

Source/WTF:

  • wtf/FeatureDefines.h:

LayoutTests:

  • fast/events/will-reveal-edge-on-div-expected.txt: Removed.
  • fast/events/will-reveal-edge-on-div.html: Removed.
  • fast/events/will-reveal-edges-body-attributes-expected.txt: Removed.
  • fast/events/will-reveal-edges-body-attributes.html: Removed.
  • fast/events/will-reveal-edges-event-listeners-expected.txt: Removed.
  • fast/events/will-reveal-edges-event-listeners.html: Removed.
  • fast/events/will-reveal-edges-window-attributes-expected.txt: Removed.
  • fast/events/will-reveal-edges-window-attributes.html: Removed.
2:20 PM Changeset in webkit [218650] by jmarcell@apple.com
  • 3 edits in branches/safari-603-branch/Source/WebKit/win

rdar://problem/32869380

2:19 PM Changeset in webkit [218649] by dbates@webkit.org
  • 19 edits in trunk/Source

Cleanup FrameLoadRequest
https://bugs.webkit.org/show_bug.cgi?id=173564
<rdar://problem/32903570>

Reviewed by Brent Fulgham.

Source/WebCore:

FrameLoadRequest has too many constructors. Use default values to reduce the number of
constructors. Have FrameLoadRequest hold a Ref<SecurityOrigin> instead of a RefPtr<SecurityOrigin>
as FrameLoadRequest must always hold a valid SecurityOrigin, the security origin of the
document that initiated the request.

  • inspector/InspectorFrontendClientLocal.cpp:

(WebCore::InspectorFrontendClientLocal::openInNewTab): Explicitly pass the null-string for
the target frame name as we do not have one. Use C++11 brace initialization syntax and ASCIILiteral().
Rename local variable from request to frameLoadRequest to better describe its purpose. Fix up
FIXME comment added in r105600 to better describe the issue we should fix as the code as
changed since the FIXME was added.

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::navigate): No need to pass ShouldReplaceDocumentIfJavaScriptURL::ReplaceDocumentIfJavaScriptURL
now that the FrameLoadRequests constructor uses this policy by default. Use C++11 brace
initialization syntax and ASCIILiteral(). Rename local variable from frameRequest to frameLoadRequest
to better describe its purpose.

  • loader/FrameLoadRequest.cpp:

(WebCore::FrameLoadRequest::FrameLoadRequest): Use C++11 brace initialization syntax.

  • loader/FrameLoadRequest.h: Remove many constructor overloads. Changed m_requester from

RefPtr<SecurityOrigin> to Ref<SecurityOrigin> as we can never be instantiated with a null
SecurityOrigin. Moved m_shouldCheckNewWindowPolicy to be under ShouldOpenExternalURLsPolicy
to reduce the size of the class by 8 bytes.

  • loader/FrameLoadRequest.h:

(WebCore::FrameLoadRequest::FrameLoadRequest): Added copy constructor as we must use Ref::copyRef()
to copy the Ref<SecurityOrigin>.
(WebCore::FrameLoadRequest::requester): Return a const SecurityOrigin& instead of a const SecurityOrigin*.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::urlSelected): Update now that the order of the ShouldReplaceDocumentIfJavaScriptURL
and ShouldOpenExternalURLsPolicy arguments in the FrameLoadRequest constructor has changed.
(WebCore::FrameLoader::loadURLIntoChildFrame): Ditto. Also use C++11 brace initialization syntax
and ASCIILiteral().
(WebCore::FrameLoader::loadFrameRequest): Update code now that FrameLoadRequest::requester() returns a
SecurityOrigin& instead of a SecurityOrigin*. Use C++11 brace initialization syntax.

  • loader/NavigationScheduler.cpp:

(WebCore::NavigationScheduler::scheduleLocationChange): Use C++11 brace initialization syntax.
Rename local variable from frameRequest to frameLoadRequest to better describe its purpose.

  • page/ContextMenuController.cpp:

(WebCore::openNewWindow):
(WebCore::ContextMenuController::contextMenuItemSelected): ove FrameLoadRequest instantiation
into a local variable and use C++11 brace initialization syntax to make it easier to identify
the arguments passed to FrameLoader::loadFrameRequest().

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow): Update now that the order of the ShouldReplaceDocumentIfJavaScriptURL
and ShouldOpenExternalURLsPolicy arguments in the FrameLoadRequest constructor has changed.
Use C++11 brace initialization syntax and ASCIILiteral(). Rename some local variables to better
describe their purpose.

Source/WebKit/ios:

Move FrameLoadRequest instantiation into a local variable and use C++11 brace initialization
syntax to make it easier to identify the arguments passed to FrameLoader::loadFrameRequest().

  • WebView/WebPDFViewPlaceholder.mm:

(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):

Source/WebKit/mac:

  • WebView/WebPDFView.mm:

(-[WebPDFView PDFViewWillClickOnLink:withURL:]): Move FrameLoadRequest instantiation
into a local variable and use C++11 brace initialization syntax to make it easier to identify
the arguments passed to FrameLoader::loadFrameRequest().

Source/WebKit/win:

  • Plugins/PluginView.cpp:

(WebCore::PluginView::start): Explicitly pass an empty ResourceRequest (we populate it after
we instantiate the FrameLoadRequest) and pass the null-string for the target frame name as
we do not have one. Use C++11 brace initialization syntax.
(WebCore::PluginView::getURLNotify): Explicitly pass the null-string for the target frame
name as we do not have one. Use C++11 brace initialization syntax.
(WebCore::PluginView::getURL): Ditto.
(WebCore::PluginView::handlePost): Move instantiation of FrameLoadRequest from the top of the
function to closer to where it is actually used. Explicitly pass the null-string for the target
frame name as we do not have one. Use C++11 brace initialization syntax.

Source/WebKit2:

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::loadURL): Explicitly pass the null-string for the target frame
name as we do not have one. Use C++11 brace initialization syntax.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchCreatePage): Ditto.

  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::openInNewTab): It is no longer necessary to pass ReplaceDocumentIfJavaScriptURL
when instantiating the FrameLoadRequest as it defaults to this policy. Use C++11 brace initialization syntax.

2:13 PM Changeset in webkit [218648] by Simon Fraser
  • 3 edits
    2 adds in trunk

svgPath.getTotalLength() freezes webkit
https://bugs.webkit.org/show_bug.cgi?id=173566
<rdar://problem/32866731>

Reviewed by Dean Jackson.

Source/WebCore:

Ensure that curveLength() progresses by making split() return a bool indicating
whether either of the resulting curves are the same as the original. This can happen
when midPoint() on two close points returns a point that is the same as one of the
arguments because of floating-point precision limitations.

Test: svg/custom/path-getTotalLength-hang.html

  • platform/graphics/PathTraversalState.cpp:

(WebCore::QuadraticBezier::operator ==):
(WebCore::QuadraticBezier::split):
(WebCore::CubicBezier::operator ==):
(WebCore::CubicBezier::split):
(WebCore::curveLength):

LayoutTests:

  • svg/custom/path-getTotalLength-hang.html: Added.
2:06 PM Changeset in webkit [218647] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Fix AVVideoCaptureSource frameRate setter and getter
https://bugs.webkit.org/show_bug.cgi?id=173637

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21
Reviewed by Eric Carlson.

Covered by manual testing.

Using activeVideoMaxFrameDuration to get the frame rate.
Setting the frame rate according the given vale if in the allowed range.

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

(WebCore::AVVideoCaptureSource::updateSettings):
(WebCore::AVVideoCaptureSource::applyFrameRate):
(WebCore::AVVideoCaptureSource::applySizeAndFrameRate):
(WebCore::AVVideoCaptureSource::shutdownCaptureSession):
(WebCore::AVVideoCaptureSource::processNewFrame):
(WebCore::AVVideoCaptureSource::updateFramerate): Deleted.

1:52 PM Changeset in webkit [218646] by commit-queue@webkit.org
  • 1 edit
    1 delete in trunk/Source/ThirdParty/libwebrtc

Remove expat source code from Source/ThirdParty/libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=173656

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21
Reviewed by Brent Fulgham.

  • Source/third_party/expat/BUILD.gn: Removed.
  • Source/third_party/expat/OWNERS: Removed.
  • Source/third_party/expat/README.chromium: Removed.
  • Source/third_party/expat/files/COPYING: Removed.
  • Source/third_party/expat/files/Changes: Removed.
  • Source/third_party/expat/files/MANIFEST: Removed.
  • Source/third_party/expat/files/README: Removed.
  • Source/third_party/expat/files/lib/amigaconfig.h: Removed.
  • Source/third_party/expat/files/lib/ascii.h: Removed.
  • Source/third_party/expat/files/lib/asciitab.h: Removed.
  • Source/third_party/expat/files/lib/expat.h: Removed.
  • Source/third_party/expat/files/lib/expat_config.h: Removed.
  • Source/third_party/expat/files/lib/expat_external.h: Removed.
  • Source/third_party/expat/files/lib/iasciitab.h: Removed.
  • Source/third_party/expat/files/lib/internal.h: Removed.
  • Source/third_party/expat/files/lib/latin1tab.h: Removed.
  • Source/third_party/expat/files/lib/libexpat.def: Removed.
  • Source/third_party/expat/files/lib/libexpatw.def: Removed.
  • Source/third_party/expat/files/lib/macconfig.h: Removed.
  • Source/third_party/expat/files/lib/nametab.h: Removed.
  • Source/third_party/expat/files/lib/utf8tab.h: Removed.
  • Source/third_party/expat/files/lib/winconfig.h: Removed.
  • Source/third_party/expat/files/lib/winconfig.h.original: Removed.
  • Source/third_party/expat/files/lib/xmlparse.c: Removed.
  • Source/third_party/expat/files/lib/xmlparse.c.original: Removed.
  • Source/third_party/expat/files/lib/xmlrole.c: Removed.
  • Source/third_party/expat/files/lib/xmlrole.h: Removed.
  • Source/third_party/expat/files/lib/xmltok.c: Removed.
  • Source/third_party/expat/files/lib/xmltok.h: Removed.
  • Source/third_party/expat/files/lib/xmltok_impl.c: Removed.
  • Source/third_party/expat/files/lib/xmltok_impl.c.original: Removed.
  • Source/third_party/expat/files/lib/xmltok_impl.h: Removed.
  • Source/third_party/expat/files/lib/xmltok_ns.c: Removed.
  • Source/third_party/expat/fuzz/OWNERS: Removed.
  • Source/third_party/expat/fuzz/expat_xml_parse_fuzzer.cc: Removed.
1:40 PM Changeset in webkit [218645] by commit-queue@webkit.org
  • 1388 edits
    2 copies
    54 moves
    550 adds
    209 deletes in trunk/Source

Refresh libwebrtc code up to a87675d4a160e2c49c3e754cd9ca291d6c8f36ae
https://bugs.webkit.org/show_bug.cgi?id=173602

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21
Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Source/WebCore:

No feature change.

Updated according small libwebrtc API changes.

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::configurationFromMediaEndpointConfiguration):

  • platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::pixelBufferFromVideoFrame):

  • platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::sendBlackFramesIfNeeded):
(WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable):

1:05 PM Changeset in webkit [218644] by commit-queue@webkit.org
  • 9 edits in trunk

Add support for structured serialization of CSS Geometry types
https://bugs.webkit.org/show_bug.cgi?id=173631

Patch by Sam Weinig <sam@webkit.org> on 2017-06-21
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/geometry-1/structured-serialization-expected.txt:

Update test results now that they pass.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/css/geometry-1/structured-serialization.html

Adds support for serializing the new geometry types as specified by:
https://drafts.fxtf.org/geometry-1/#structured-serialization

  • WebCore.xcodeproj/project.pbxproj:

Move a few custom bindings into the "GC / Wrapping Only" since they have no more custom operations or attributes.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpDOMPoint):
(WebCore::CloneSerializer::dumpDOMRect):
(WebCore::CloneSerializer::dumpDOMMatrix):
(WebCore::CloneSerializer::dumpDOMQuad):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::getJSValue):
(WebCore::CloneDeserializer::readDOMPoint):
(WebCore::CloneDeserializer::readDOMMatrix):
(WebCore::CloneDeserializer::readDOMRect):
(WebCore::CloneDeserializer::readDOMPointInit):
(WebCore::CloneDeserializer::readDOMQuad):
(WebCore::CloneDeserializer::readTerminal):
Add serialization/deserialization of the geometry types.

  • css/DOMMatrix.cpp:

(WebCore::DOMMatrix::DOMMatrix):

  • css/DOMMatrix.h:

(WebCore::DOMMatrix::create):

  • css/DOMMatrixReadOnly.cpp:

(WebCore::DOMMatrixReadOnly::DOMMatrixReadOnly):

  • css/DOMMatrixReadOnly.h:

(WebCore::DOMMatrixReadOnly::create):
Add create functions and constructors that take a TransformationMatrix by r-value reference
so they can be moved into the DOM type.

12:49 PM Changeset in webkit [218643] by akling@apple.com
  • 5 edits in trunk

[iOS] Ensure that GraphicsServices is initialized before calling GSFontPurgeFontCache().
https://bugs.webkit.org/show_bug.cgi?id=173616
<rdar://problem/30780050>

Reviewed by Chris Dumez.

Source/WebCore:

Fix for crash in GSFontPurgeFontCache() seen in apps embedding WebKit.
Ensure GSFontInitialize() has been called first, since the former depends on state
set up by this function.

  • page/cocoa/MemoryReleaseCocoa.mm:

(WebCore::platformReleaseMemory):

  • platform/spi/ios/GraphicsServicesSPI.h:

WebKitLibraries:

  • WebKitPrivateFrameworkStubs/iOS/10/GraphicsServices.framework/GraphicsServices.tbd:
11:54 AM Changeset in webkit [218642] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit2

[iOS DnD] [WK2] Add drag-and-drop release logging around WKContentView
https://bugs.webkit.org/show_bug.cgi?id=173636

Reviewed by Tim Horton.

Add logging at key points in the drag-and-drop lifecycle in the UI process, so that sysdiagnoses will contain
sufficient information to debug sparse failures.

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

(-[WKContentView _didHandleStartDataInteractionRequest:]):
(-[WKContentView cleanUpDragSourceSessionState]):
(-[WKContentView _didPerformDataInteractionControllerOperation:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:sessionWillBegin:]):
(-[WKContentView _api_dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dropInteraction:canHandleSession:]):
(-[WKContentView _api_dropInteraction:sessionDidEnter:]):
(-[WKContentView dropInteraction:sessionDidExit:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):

11:42 AM Changeset in webkit [218641] by sbarati@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Make it clear that regenerating ICs are holding the CodeBlock's lock by passing the locker as a parameter
https://bugs.webkit.org/show_bug.cgi?id=173609

Reviewed by Keith Miller.

This patch makes many of the IC generating functions require a locker as
a parameter. We do this in other places in JSC to indicate that
a particular API is only valid while a particular lock is held.
This is the case when generating ICs. This patch just makes it
explicit in the IC generating interface.

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::addCases):
(JSC::PolymorphicAccess::addCase):
(JSC::PolymorphicAccess::commit):
(JSC::PolymorphicAccess::regenerate):

  • bytecode/PolymorphicAccess.h:
  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::addAccessCase):
(JSC::StructureStubInfo::initStub): Deleted.

  • bytecode/StructureStubInfo.h:
  • jit/Repatch.cpp:

(JSC::tryCacheGetByID):
(JSC::repatchGetByID):
(JSC::tryCachePutByID):
(JSC::repatchPutByID):
(JSC::tryRepatchIn):
(JSC::repatchIn):

11:37 AM Changeset in webkit [218640] by commit-queue@webkit.org
  • 11 edits in trunk

Add logging to identify when the Page suspends scripted animations
https://bugs.webkit.org/show_bug.cgi?id=173626

Patch by Antoine Quint <Antoine Quint> on 2017-06-21
Reviewed by Tim Horton.

Source/WebCore:

We have a longstanding issue that some media/modern-media-controls tests time out due to
requestAnimationFrame callbacks not being serviced, which is tracked by webkit.org/b/173628.
We added some logging to identify when ScriptedAnimationController would get suspended in
webkit.org/b/173326. This logging points to the fact that the reason rAF callbacks aren't
serviced is because Document::requestAnimationFrame() suspends rAF when the page reports
that scripted animations ought to be suspended, which is true when m_scriptedAnimationsSuspended
is true. This patch adds logging that tracks when this flag is set, provided a new setting
shouldLogScriptedAnimationControllerSuspensionChange is true.

  • dom/ScriptedAnimationController.cpp:

(WebCore::ScriptedAnimationController::logSuspendCount):

  • page/Page.cpp:

(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):

  • page/Settings.in:

Source/WebKit/mac:

Add a new preference to control the new shouldLogScriptedAnimationControllerSuspensionChange settings
through WebKit. This is specific to WK1 since the issue we're trying to pinpoint only occurs on WK1 bots.

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

(+[WebPreferences initialize]):
(-[WebPreferences shouldLogScriptedAnimationControllerSuspensionChange]):
(-[WebPreferences setShouldLogScriptedAnimationControllerSuspensionChange:]):

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

(-[WebView _preferencesChanged:]):

Tools:

Turn the new logging on for WK1/DRT since the issue we're trying to pinpoint only occurs on WK1 bots.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

10:08 AM Changeset in webkit [218639] by commit-queue@webkit.org
  • 5 edits
    19 adds in trunk/LayoutTests/imported/w3c

Import W3C tests regarding navigation inside sandboxed iframes
https://bugs.webkit.org/show_bug.cgi?id=173649

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-21
Reviewed by Youenn Fablet.

This import new tests added in https://github.com/w3c/web-platform-tests/pull/6221 to verify
sandboxing of iframes and will help to test the changes in bug 173162.

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/content_document_changes_only_after_load_matures.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-1.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-2.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_descendants.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself-expected.txt: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_itself.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-on-popup.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-tries-to-navigate-parent-and-sends-result-to-grandparent.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-its-child.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-its-child.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-trying-to-navigate-itself.html: Added.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log:
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
10:05 AM Changeset in webkit [218638] by commit-queue@webkit.org
  • 2 edits in trunk

[MSVC] Fix compilation in CP932 (Shift_JIS) environment
https://bugs.webkit.org/show_bug.cgi?id=173638

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-06-21
Reviewed by Alex Christensen.

Give "/utf-8 /validate-charset" options to the MSVC compiler
to specify the source code encoding.

  • Source/cmake/OptionsMSVC.cmake:
9:48 AM Changeset in webkit [218637] by achristensen@apple.com
  • 7 edits
    2 adds in trunk/Source/WebCore

[Curl] Extract CurlDownloadManager as shared background task handler
https://bugs.webkit.org/show_bug.cgi?id=173557

Curl resource handling should be shared by other part of Curl
network stack. CurlDownloadManager is extracted as stand alone
CurlManager singleton class to be ready for others
(i.e. ResourceHandle).

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-06-21
Reviewed by Alex Christensen.

  • PlatformWinCairo.cmake:
  • platform/network/curl/CookieJarCurl.cpp:

(WebCore::setCookiesFromDOM):
(WebCore::cookiesForSession):

  • platform/network/curl/CurlDownload.cpp:

(WebCore::CurlDownload::init):
(WebCore::CurlDownload::start):
(WebCore::CurlDownload::cancel):
(WebCore::CurlDownload::didReceiveHeader):
(WebCore::CurlDownload::handleCurlMsg):
(WebCore::CurlDownloadManager::CurlDownloadManager): Deleted.
(WebCore::CurlDownloadManager::~CurlDownloadManager): Deleted.
(WebCore::CurlDownloadManager::add): Deleted.
(WebCore::CurlDownloadManager::remove): Deleted.
(WebCore::CurlDownloadManager::getActiveDownloadCount): Deleted.
(WebCore::CurlDownloadManager::getPendingDownloadCount): Deleted.
(WebCore::CurlDownloadManager::startThreadIfNeeded): Deleted.
(WebCore::CurlDownloadManager::stopThread): Deleted.
(WebCore::CurlDownloadManager::stopThreadIfIdle): Deleted.
(WebCore::CurlDownloadManager::updateHandleList): Deleted.
(WebCore::CurlDownloadManager::addToCurl): Deleted.
(WebCore::CurlDownloadManager::removeFromCurl): Deleted.
(WebCore::CurlDownloadManager::downloadThread): Deleted.

  • platform/network/curl/CurlDownload.h:

(WebCore::CurlDownloadManager::getMultiHandle): Deleted.
(WebCore::CurlDownloadManager::runThread): Deleted.
(WebCore::CurlDownloadManager::setRunThread): Deleted.

  • platform/network/curl/CurlManager.cpp: Added.

(WebCore::CurlManager::CurlManager):
(WebCore::CurlManager::~CurlManager):
(WebCore::CurlManager::add):
(WebCore::CurlManager::remove):
(WebCore::CurlManager::getActiveCount):
(WebCore::CurlManager::getPendingCount):
(WebCore::CurlManager::startThreadIfNeeded):
(WebCore::CurlManager::stopThread):
(WebCore::CurlManager::stopThreadIfIdle):
(WebCore::CurlManager::updateHandleList):
(WebCore::CurlManager::addToCurl):
(WebCore::CurlManager::removeFromCurl):
(WebCore::CurlManager::workerThread):
(WebCore::CurlUtils::getEffectiveURL):
(WebCore::CurlSharedResources::mutexFor):
(WebCore::CurlSharedResources::lock):
(WebCore::CurlSharedResources::unlock):

  • platform/network/curl/CurlManager.h: Added.

(WebCore::CurlManager::singleton):
(WebCore::CurlManager::getCurlShareHandle):
(WebCore::CurlManager::getMultiHandle):
(WebCore::CurlManager::runThread):
(WebCore::CurlManager::setRunThread):

  • platform/network/curl/ResourceHandleManager.cpp:

(WebCore::ResourceHandleManager::ResourceHandleManager):
(WebCore::ResourceHandleManager::~ResourceHandleManager):
(WebCore::handleLocalReceiveResponse):
(WebCore::getProtectionSpace):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):
(WebCore::getCurlEffectiveURL): Deleted.
(WebCore::sharedResourceMutex): Deleted.
(WebCore::curl_lock_callback): Deleted.
(WebCore::curl_unlock_callback): Deleted.
(WebCore::ResourceHandleManager::getCurlShareHandle): Deleted.

  • platform/network/curl/ResourceHandleManager.h:
9:25 AM Changeset in webkit [218636] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Unreviewed gardening

Update expectations to known flaky http/appcache tests and also a
couple of flaky crashing tests.

  • platform/wpe/TestExpectations:
9:19 AM Changeset in webkit [218635] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests/imported/w3c

LayoutTests/imported/w3c/resources/import-expectations.json is broken after http://trac.webkit.org/changeset/218181
https://bugs.webkit.org/show_bug.cgi?id=173651

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-21
Reviewed by Chris Dumez.

  • resources/import-expectations.json: Fix the merge.
9:04 AM Changeset in webkit [218634] by commit-queue@webkit.org
  • 8 edits in trunk

Include audio/vnd.wave as a valid mime-type for wav files.
https://bugs.webkit.org/show_bug.cgi?id=173635
rdar://problem/32656568

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-21
Reviewed by Eric Carlson.

audio/vnd.wave is a valid mime-type for wav files per https://tools.ietf.org/html/rfc2361

Updated test and test results:
LayoutTests/media/media-can-play-wav-audio.html

  • platform/MIMETypeRegistry.cpp:

(WebCore::initializeSupportedImageMIMETypes):
(WebCore::mimeTypeAssociationMap):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::mimeTypeSet):

8:58 AM Changeset in webkit [218633] by Chris Fleizach
  • 8 edits
    2 adds in trunk

AX: Cannot call setValue() on contenteditable or ARIA text controls
https://bugs.webkit.org/show_bug.cgi?id=173520

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add support for changing the value of a contenteditable and any other aria text control in setValue().

Test: accessibility/set-value-editable-types.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::setValue):

Tools:

Add setValue() method to WKTR (already existed in DRT).

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:

(WTR::AccessibilityUIElement::setValue):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::setValue):

LayoutTests:

  • accessibility/set-value-editable-types-expected.txt: Added.
  • accessibility/set-value-editable-types.html: Added.
8:56 AM Changeset in webkit [218632] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit2

Don't clear audio mute when muting capture.
https://bugs.webkit.org/show_bug.cgi?id=173639
rdar://problem/32749737

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-21
Reviewed by Eric Carlson.

Setting capture mute was clearing audio mute.
Added setMediaStreamCaptureMuted to set just the capture mute bit.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _muteMediaCapture]):

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::muteCaptureMediaStreamsExceptIn):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setMediaStreamCaptureMuted):

  • UIProcess/WebPageProxy.h:
8:50 AM Changeset in webkit [218631] by magomez@igalia.com
  • 3 edits in trunk

[GTK] Fix the condition to enable/disable GSTREAMER_GL
https://bugs.webkit.org/show_bug.cgi?id=173650

Reviewed by Carlos Garcia Campos.

If GSTREAMER_GL is enabled, check for the GStreamer version. If the version is < 1.10, disable
GSTREAMER_GL and continue. If the version is >= 1.10 but there's no gstreamer-gl package available
then fail.

  • Source/cmake/FindGStreamer.cmake:
  • Source/cmake/OptionsGTK.cmake:
5:33 AM Changeset in webkit [218630] by magomez@igalia.com
  • 2 edits in trunk

[GTK] Enable GStreamer GL by default on production builds
https://bugs.webkit.org/show_bug.cgi?id=173406

Reviewed by Carlos Garcia Campos.

Enable GStreamer GL by default when the GStreamer version >= 1.10.

  • Source/cmake/OptionsGTK.cmake:
5:29 AM Changeset in webkit [218629] by magomez@igalia.com
  • 6 edits
    2 adds in trunk/Source/WebKit2

[GTK][WAYLAND] Create WaylandCompositorDisplay unconditionally when initializing the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=173598

Reviewed by Carlos Garcia Campos.

Move WaylandCompositorDisplay code to its own files so it can be used from other classes. Then, instead of
storing the waylandCompositorDisplayName in the WebProcess, keep a WaylandCompositorDisplay instance that
is created during the initialization. This way the appropriate sharedDisplayForCompositing will be set
since the creation of the WebProcess.

  • PlatformGTK.cmake:
  • WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp:

(WebKit::AcceleratedSurfaceWayland::create):
(WebKit::AcceleratedSurfaceWayland::AcceleratedSurfaceWayland):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

  • WebProcess/WebProcess.h:

(WebKit::WebProcess::waylandCompositorDisplay):

  • WebProcess/gtk/WaylandCompositorDisplay.cpp: Added.

(WebKit::WaylandCompositorDisplay::create):
(WebKit::WaylandCompositorDisplay::bindSurfaceToPage):
(WebKit::WaylandCompositorDisplay::WaylandCompositorDisplay):
(WebKit::WaylandCompositorDisplay::registryGlobal):

  • WebProcess/gtk/WaylandCompositorDisplay.h: Added.
  • WebProcess/soup/WebProcessSoup.cpp:

(WebKit::WebProcess::platformInitializeWebProcess):

12:49 AM Changeset in webkit [218628] by Carlos Garcia Campos
  • 4 edits
    3 moves in trunk

[GTK] Move WebGtkExtensionManager and WebGtkInjectedBundleMain to glib API dir
https://bugs.webkit.org/show_bug.cgi?id=173606

Reviewed by Žan Doberšek.

.:

Update public symbols that were renamed.

  • Source/cmake/gtksymbols.filter:

Source/WebKit2:

And rename them to use WebKit prefix instead of WebGtk.

  • PlatformGTK.cmake:
  • WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp.

(WebKit::WebKitExtensionManager::singleton):
(WebKit::WebKitExtensionManager::WebKitExtensionManager):
(WebKit::WebKitExtensionManager::scanModules):
(WebKit::WebKitExtensionManager::initializeWebExtension):
(WebKit::WebKitExtensionManager::initialize):

  • WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h.
  • WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp.

(WKBundleInitialize):

12:09 AM Changeset in webkit [218627] by zandobersek@gmail.com
  • 3 edits in trunk/Tools

List libtasn1 packages in GTK+ and WPE install-dependencies scripts
as one of the dependencies required to build the product.

Rubber-stamped by Carlos Garcia Campos.

  • gtk/install-dependencies:
  • wpe/install-dependencies:

Jun 20, 2017:

11:52 PM Changeset in webkit [218626] by zandobersek@gmail.com
  • 12 edits
    5 adds in trunk

[GCrypt] Implement CryptoKeyEC SPKI imports
https://bugs.webkit.org/show_bug.cgi?id=172927

Reviewed by Jiewen Tan, Michael Catanzaro and Carlos Garcia Campos.

.:

  • Source/cmake/FindLibtasn1.cmake: Added.
  • Source/cmake/OptionsGTK.cmake: Require libtasn1 when SUBTLE_CRYPTO is enabled.
  • Source/cmake/OptionsWPE.cmake: Ditto.

Source/WebCore:

No new tests -- affected tests are now passing and are unskipped.

Implement libgcrypt-based support for SPKI imports of EC keys.

Using libtasn1 through the utility functions and wrappers, the given key data
is decoded against the SubjectPublicKeyInfo ASN.1 definition. The algorithm
member is then properly validated, making sure that the key algorithm idenfitier
is supported and that the algorithm parameters specify the correct EC curve.

The public key bit string is then retrieved and validated, ensuring it represents
an uncompressed EC point that is of valid size for the specified EC curve. The
point is then tested through an EC context to make sure it's positioned on the
specified EC curve.

Finally, the curve name and uncompressed point data are embedded into a
public-key s-expression that will be used through the libgcrypt API. This is
then used, along with other information, to create a valid CryptoKeyEC object.

  • PlatformGTK.cmake: Use LIBTASN1_INCLUDE_DIRECTORIES and LIBTASN1_LIBRARIES.
  • PlatformWPE.cmake: Ditto.
  • crypto/gcrypt/CryptoKeyECGCrypt.cpp:

(WebCore::supportedAlgorithmIdentifier):
(WebCore::curveForIdentifier):
(WebCore::CryptoKeyEC::platformImportSpki):

Source/WebCore/PAL:

Add a file that provides utility functions for operating with libtasn1 APIs.

The precomputed ASN.1 declarations, generated from the WebCrypto.asn file with
the asn1Parser tool, are used to enable construction of ASN.1 structures that
are then used to decode the SPKI or PKCS#8 data through the decodeStructure()
function. Raw data of each element in that structure can be retrieved throug the
elementData() function.

The Structure class is added as a wrapper for asn1_node objects that are used
as decoding targets, simplifying lifetime management of these objects.

  • pal/PlatformGTK.cmake:
  • pal/PlatformWPE.cmake:
  • pal/crypto/tasn1/Utilities.cpp: Added.

(PAL::TASN1::asn1Definitions):
(PAL::TASN1::decodeStructure):
(PAL::TASN1::elementData):

  • pal/crypto/tasn1/Utilities.h: Added.

(PAL::TASN1::Structure::~Structure):
(PAL::TASN1::Structure::operator&):
(PAL::TASN1::Structure::operator asn1_node):

  • pal/crypto/tasn1/WebCrypto.asn: Added.

LayoutTests:

  • platform/gtk/TestExpectations:

Unskip or enable the EC-based SPKI import tests that are now passing.

11:24 PM Changeset in webkit [218625] by fred.wang@free.fr
  • 7 edits in trunk/Source/WebKit2

Pass the argument of DrawingArea::shouldUseTiledBackingForFrameView by reference
https://bugs.webkit.org/show_bug.cgi?id=173605

DrawingArea::shouldUseTiledBackingForFrameView is only called from
WebChromeClient::shouldUseTiledBackingForFrameView where the frame view is already available
as a reference. This patch makes the argument of
DrawingArea::shouldUseTiledBackingForFrameView a reference, so it does not need to be
converted to a pointer or to perform nullchecks.

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-20
Reviewed by Simon Fraser.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::shouldUseTiledBackingForFrameView): Just pass the reference.

  • WebProcess/WebPage/DrawingArea.h: Make the parameter a reference.
  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Ditto.
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Ditto.
  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::shouldUseTiledBackingForFrameView): Use the reference
to frame view and remove the nullcheck.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::shouldUseTiledBackingForFrameView): Ditto.

9:17 PM Changeset in webkit [218624] by Devin Rousso
  • 2 edits in trunk/Source/WebCore

WebGPU contexts should have a back reference to the canvas element
https://bugs.webkit.org/show_bug.cgi?id=173633

Reviewed by Jon Lee.

No tests added, as this is already implemented within other canvas types.

  • html/canvas/WebGPURenderingContext.idl:
8:13 PM Changeset in webkit [218623] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: change the selected ScopeBarItem on mousedown instead of click
https://bugs.webkit.org/show_bug.cgi?id=173586

Reviewed by Matt Baker.

Both the Tab bar and Sidebar navigation bar switch the active item on "mousedown" instead of
on "click". ScopeBarItem should follow this pattern, as it is faster and keeps consistency.

  • UserInterface/Views/MultipleScopeBarItem.js:

(WebInspector.MultipleScopeBarItem):
(WebInspector.MultipleScopeBarItem.prototype._handleMouseDown):
(WebInspector.MultipleScopeBarItem.prototype._clicked): Deleted.

  • UserInterface/Views/ScopeBarItem.js:

(WebInspector.ScopeBarItem):
(WebInspector.ScopeBarItem.prototype._handleMouseDown):
(WebInspector.ScopeBarItem.prototype._clicked): Deleted.

8:05 PM Changeset in webkit [218622] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

WebAudioSourceProvider should be thread safe ref counted
https://bugs.webkit.org/show_bug.cgi?id=173623

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-20
Reviewed by Eric Carlson.

No observable change of behavior.

  • platform/mediastream/WebAudioSourceProvider.h:
6:04 PM Changeset in webkit [218621] by yoav@yoav.ws
  • 2 edits in trunk/Source/WebCore

[preload] Turn on preload's feature flag by default.
https://bugs.webkit.org/show_bug.cgi?id=173139

Reviewed by Youenn Fablet.

Turn on the runtime enabled feature flag for link preload by default.

No new tests as this just turns on a feature that was already on-by-default for tests.

  • page/RuntimeEnabledFeatures.h:
5:54 PM Changeset in webkit [218620] by mmaxfield@apple.com
  • 24 edits
    8 deletes in trunk

Disable font variations on macOS Sierra and iOS 10
https://bugs.webkit.org/show_bug.cgi?id=173618
<rdar://problem/32879164>

Reviewed by Jon Lee.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

On macOS Sierra and iOS 10, there are some platform problems involved with font variations. They
were previously enabled on those OSes just as a preview development tool. These platform bugs have
been fixed in macOS High Sierra and iOS 11, so we should align our feature flags with the eventual
configurations.

  • Configurations/FeatureDefines.xcconfig:
  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::defaultVariationValues):
(WebCore::preparePlatformFont):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

Update expected test results. The old test results are now High Sierra- and iOS 11-expected.

  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/text/font-selection-font-face-parse-expected.txt:
  • fast/text/font-selection-font-loading-api-parse-expected.txt:
  • fast/text/font-stretch-parse-expected.txt:
  • fast/text/font-style-parse-expected.txt:
  • fast/text/font-weight-parse-expected.txt:
  • platform/ios/TestExpectations:
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-font-family-expected.txt: Removed.
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
  • platform/mac-elcapitan/fast/text/font-selection-font-face-parse-expected.txt: Removed.
  • platform/mac-elcapitan/fast/text/font-selection-font-loading-api-parse-expected.txt: Removed.
  • platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt: Removed.
  • platform/mac-elcapitan/fast/text/font-style-parse-expected.txt: Removed.
  • platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt: Removed.
  • platform/mac-elcapitan/svg/css/getComputedStyle-basic-expected.txt: Removed
  • platform/mac/TestExpectations:
  • platform/mac/svg/css/getComputedStyle-basic-expected.txt: Removed
5:32 PM Changeset in webkit [218619] by keith_miller@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix leak of ModuleInformations in BBQPlan constructors.
https://bugs.webkit.org/show_bug.cgi?id=173577

Reviewed by Saam Barati.

This patch fixes a leak in the BBQPlan constructiors. Previously,
the plans were calling makeRef on the newly constructed objects.
This patch fixes the issue and uses adoptRef instead. Additionally,
an old, incorrect, attempt to fix the leak is removed.

  • inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:

(Inspector::RemoteInspectorXPCConnection::RemoteInspectorXPCConnection):

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::Thread::Thread):

  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::addPendingPromise):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::BBQPlan):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):

5:07 PM Changeset in webkit [218618] by Devin Rousso
  • 9 edits
    2 adds in trunk

Web Inspector: Send context attributes for tracked canvases
https://bugs.webkit.org/show_bug.cgi?id=173327

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Canvas.json:

Add ContextAttributes object type that is optionally used for WebGL canvases.

Source/WebCore:

Test: inspector/canvas/context-attributes.html

  • inspector/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::buildObjectForCanvas):

Source/WebInspectorUI:

  • UserInterface/Models/Canvas.js:

(WebInspector.Canvas.fromPayload):
(WebInspector.Canvas.prototype.get contextAttributes):

  • UserInterface/Views/CanvasDetailsSidebarPanel.js:

(WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CanvasDetailsSidebarPanel.prototype.layout):
(WebInspector.CanvasDetailsSidebarPanel.prototype.sizeDidChange):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection):

  • UserInterface/Views/DataGridNode.js:

(WebInspector.DataGridNode.prototype.createCellContent):
Instead of checking if the value of the cell is falsy, check that the key exists in the data.
This allows values like false to be displayed.

LayoutTests:

  • inspector/canvas/context-attributes-expected.txt: Added.
  • inspector/canvas/context-attributes.html: Added.
5:02 PM Changeset in webkit [218617] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked webrtc/video-replace-muted-track.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173486

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
4:52 PM Changeset in webkit [218616] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

[Cocoa] The system Japanese font cannot be italicized
https://bugs.webkit.org/show_bug.cgi?id=173300
<rdar://problem/31805407>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Items in the system font cascade list may lie about whether or not they support italics.
In order to get the truth, we need to use the physical font underlying the font in question,
because this one won't lie. Then, we can interrogate this physical font about its traits
in order to synthesize italics correctly.

Test: fast/text/system-font-japanese-synthetic-italic.html

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::lookupFallbackFont):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationCoreText::fontRanges):

LayoutTests:

  • fast/text/system-font-japanese-synthetic-italic-expected-mismatch.html: Added.
  • fast/text/system-font-japanese-synthetic-italic.html: Added.
  • platform/mac/TestExpectations: This codepath doesn't work in El Capitan.
4:42 PM Changeset in webkit [218615] by Chris Dumez
  • 68 edits in trunk/Source/WebCore

Use WTF::Function instead of std::function in more places in WebCore/
https://bugs.webkit.org/show_bug.cgi?id=173583

Reviewed by Darin Adler.

Use WTF::Function instead of std::function in more places in WebCore/ to
reduce copying.

  • page/Page.cpp:
  • platform/HysteresisActivity.h:

(WebCore::HysteresisActivity::HysteresisActivity):

  • platform/Logging.cpp:

(WebCore::registerNotifyCallback):

  • platform/Logging.h:
  • platform/MainThreadSharedTimer.cpp:

(WebCore::MainThreadSharedTimer::setFiredFunction):

  • platform/MainThreadSharedTimer.h:
  • platform/PlatformPasteboard.h:
  • platform/ScopeGuard.h:

(WebCore::ScopeGuard::ScopeGuard):
(WebCore::ScopeGuard::enable):

  • platform/ScrollAnimationSmooth.cpp:

(WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):

  • platform/ScrollAnimationSmooth.h:
  • platform/SharedTimer.h:
  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::currentSessionsMatching):

  • platform/audio/PlatformMediaSessionManager.h:
  • platform/cf/MainThreadSharedTimerCF.cpp:

(WebCore::setupPowerObserver):

  • platform/cf/RunLoopObserver.h:

(WebCore::RunLoopObserver::RunLoopObserver):

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::traverse):

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::addMediaEngine):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/Path.h:
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
(WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:

(WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
(WebCore::MediaPlayerPrivateAVFoundation::Notification::function):

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

(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

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

(WebCore::runWithoutAnimations):

  • platform/graphics/cocoa/IOSurface.h:
  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::convertToFormat):

  • platform/graphics/gstreamer/MainThreadNotifier.h:
  • platform/graphics/gstreamer/MediaPlayerRequestInstallMissingPluginsCallback.h:

(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::create):
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::MediaPlayerRequestInstallMissingPluginsCallback):

  • platform/graphics/win/GraphicsContextDirect2D.cpp:

(WebCore::GraphicsContext::drawWithoutShadow):
(WebCore::GraphicsContext::drawWithShadow):

  • platform/gtk/PasteboardHelper.cpp:

(WebCore::ClipboardSetData::ClipboardSetData):
(WebCore::PasteboardHelper::writeClipboardContents):

  • platform/gtk/PasteboardHelper.h:
  • platform/gtk/PlatformPasteboardGtk.cpp:

(WebCore::PlatformPasteboard::writeToClipboard):

  • platform/ios/WebVideoFullscreenInterfaceAVKit.h:
  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
(WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):

  • platform/mac/PowerObserverMac.cpp:

(WebCore::PowerObserver::PowerObserver):

  • platform/mac/PowerObserverMac.h:
  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::isSecondLevelDomainNameAllowedByTLDRules):

  • platform/mediastream/CaptureDeviceManager.cpp:

(CaptureDeviceManager::addCaptureDeviceChangedObserver):

  • platform/mediastream/CaptureDeviceManager.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::scheduleDeferredTask):

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:

(-[WebAVAudioSessionAvailableInputsListener initWithCallback:]):

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mock/ScrollAnimatorMock.cpp:

(WebCore::ScrollAnimatorMock::ScrollAnimatorMock):

  • platform/mock/ScrollAnimatorMock.h:
  • platform/network/CookieStorage.h:
  • platform/network/NetworkStateNotifier.cpp:

(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):

  • platform/network/NetworkStateNotifier.h:
  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::forEach):

  • platform/network/NetworkStorageSession.h:
  • platform/network/cf/CookieStorageCFNet.cpp:

(WebCore::cookieChangeCallbackMap):
(WebCore::startObservingCookieChanges):

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::callOnMainThreadAndWait):

  • platform/network/mac/CookieStorageMac.mm:

(-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]):
(WebCore::startObservingCookieChanges):

  • platform/network/soup/CookieStorageSoup.cpp:

(WebCore::startObservingCookieChanges):

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::checkTLSErrors):

  • platform/network/soup/SoupNetworkSession.h:
  • platform/sql/SQLiteDatabase.cpp:

(WebCore::destroyCollationFunction):
(WebCore::callCollationFunction):
(WebCore::SQLiteDatabase::setCollationFunction):

  • platform/sql/SQLiteDatabase.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::traverseVisibleNonCompositedDescendantLayers):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::paintItem):

  • rendering/RenderListBox.h:
  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::InlineIteratorHistory::push):
(WebCore::BreakingContext::InlineIteratorHistory::update):

  • workers/Worker.cpp:

(WebCore::Worker::Worker):

  • workers/WorkerRunLoop.cpp:
4:22 PM Changeset in webkit [218614] by Ryan Haddad
  • 5 edits
    2 deletes in trunk

Unreviewed, rolling out r218524.

This change broke internal builds.

Reverted changeset:

"[Cocoa] The system Japanese font cannot be italicized"
https://bugs.webkit.org/show_bug.cgi?id=173300
http://trac.webkit.org/changeset/218524

3:57 PM Changeset in webkit [218613] by Simon Fraser
  • 2 edits in trunk/LayoutTests

<rdar://problem/32862652> [REGRESSION] r218374: fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html

Rebaseline.

  • fast/events/ios/rotation/layout-viewport-during-safari-type-rotation-expected.txt:
3:54 PM Changeset in webkit [218612] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline fast/events/touch/document-create-touch-list tests.

Unreviewed test gardening.

  • fast/events/touch/document-create-touch-list-crash-expected.txt:
  • fast/events/touch/document-create-touch-list-ios-expected.txt:
3:45 PM Changeset in webkit [218611] by dbates@webkit.org
  • 14 edits in trunk/Source

Have FrameLoadRequest takes a Frame& instead of a Frame*
https://bugs.webkit.org/show_bug.cgi?id=173614
<rdar://problem/32884890>

Reviewed by Brent Fulgham.

Source/WebCore:

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::handleProvisionalLoadFailure):

  • loader/FrameLoadRequest.cpp:

(WebCore::FrameLoadRequest::FrameLoadRequest):

  • loader/FrameLoadRequest.h:
  • page/DragController.cpp:

(WebCore::DragController::performDragOperation):

Source/WebKit/mac:

  • Plugins/WebPluginController.mm:

(-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):

  • WebView/WebFrame.mm:

(-[WebFrame loadRequest:]):
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):

Source/WebKit/win:

  • Plugins/PluginView.cpp:

(WebCore::PluginView::performRequest):

  • WebFrame.cpp:

(WebFrame::loadRequest):

Source/WebKit2:

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::performFrameLoadURLRequest):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadURLInFrame):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):

3:44 PM Changeset in webkit [218610] by Matt Baker
  • 3 edits in trunk/LayoutTests

LayoutTest inspector/canvas/create-canvas-contexts.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=173603

Reviewed by Joseph Pecoraro.

Removed test case CheckCanvasesCleared, which involved a page reload
and would intermittently timeout.

  • inspector/canvas/create-canvas-contexts-expected.txt:
  • inspector/canvas/create-canvas-contexts.html:
3:04 PM Changeset in webkit [218609] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Skip Content Security Policy check for a media request using standard schemes initiated from
an element in user agent shadow tree
https://bugs.webkit.org/show_bug.cgi?id=155505
<rdar://problem/25169452>

Reviewed by Brent Fulgham.

This change makes the following tests pass on iOS 11:

http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html

  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResourceLoader::requestResource):

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

(WebCore::WebCoreAVFResourceLoader::startLoading):

1:45 PM Changeset in webkit [218608] by Ryan Haddad
  • 2 edits in trunk/JSTests

Update test262 test expectations after r218581.

Unreviewed test gardening.

  • test262.yaml:
1:37 PM Changeset in webkit [218607] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

REGRESSION: media/remote-control-command-seek.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=173615
<rdar://problem/32626498>

Reviewed by Eric Carlson.

This test assumes that we load metadata and video data that can be seeked through
at the same time, but this is incorrect. Using the "canplaythrough" event guarantees
that the video is seekable, so we switch to this event to make the test more robust.

  • media/remote-control-command-seek-expected.txt:
  • media/remote-control-command-seek.html:
12:46 PM Changeset in webkit [218606] by timothy_horton@apple.com
  • 8 edits in trunk/Source/WebKit2

Occasional deadlocks under ensurePositionInformationIsUpToDate (incoming sync message with waitForAndDispatchImmediately)
https://bugs.webkit.org/show_bug.cgi?id=173570
<rdar://problem/32720928>

Reviewed by Wenson Hsieh.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::getPositionInformation): Deleted.
Get rid of getPositionInformation; it only has one caller, and it's easier
to reason about the code if it's all in one place. Also, we shouldn't
add more callers...

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

(-[WKContentView ensurePositionInformationIsUpToDate:]):
Add a return value to ensurePositionInformationIsUpToDate that indicates
whether we succeeded in that effort.

Add the flag to our waitForAndDispatchImmediately that causes the wait
to be interrupted if a sync message arrives.

(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsNearMarkedText:]):
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
If anything happens to interrupt our position information update, fail
in the most graceful possible way at each callsite (generally by bailing
from doing whatever action required position information).

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView positionInformationForActionSheetAssistant:]):

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

(-[WKActionSheetAssistant synchronouslyRetrievePositionInformation]):
(-[WKActionSheetAssistant presentationRectForElementUsingClosestIndicatedRect]):
(-[WKActionSheetAssistant presentationRectForIndicatedElement]):
(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):
Instead of constantly re-querying the position information, save it aside
when presenting an action sheet, and use it to respond to all of the
subsequent questions. Also, bail from presenting the action sheet if we fail
to retrieve correct position information.

11:57 AM Changeset in webkit [218605] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Added additional test expectations for media/video-buffered.html.
https://bugs.webkit.org/show_bug.cgi?id=173611

Uneviewed test gardening.

  • platform/ios/TestExpectations:
11:48 AM Changeset in webkit [218604] by akling@apple.com
  • 5 edits in trunk/Source/WebCore

Remove no-op calls to purge SQLite caches on memory pressure.
<https://webkit.org/b/173604>

Reviewed by Chris Dumez.

The implementation of _sqlite3_purgeEligiblePagerCacheMemory() is empty
since a few releases ago, so there's no point in calling it.

  • page/MemoryRelease.cpp:

(WebCore::registerMemoryReleaseNotifyCallbacks):
(WebCore::registerSQLiteMemoryPressureHandler): Deleted.

  • page/MemoryRelease.h:
  • page/cocoa/MemoryReleaseCocoa.mm:

(WebCore::platformReleaseMemory):
(WebCore::registerSQLiteMemoryPressureHandler): Deleted.

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::initializeSQLiteIfNecessary):

11:35 AM Changeset in webkit [218603] by Devin Rousso
  • 11 edits
    2 adds in trunk

Web Inspector: add console messages for WebGL shader compile and program link errors/warnings
https://bugs.webkit.org/show_bug.cgi?id=143236
<rdar://problem/20352149>

Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/canvas/webgl/shader-compile-logging.html

  • html/canvas/WebGLRenderingContextBase.h:
  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::checkFramebufferStatus):
(WebCore::WebGLRenderingContextBase::compileShader):
(WebCore::WebGLRenderingContextBase::recycleContext):
(WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
(WebCore::WebGLRenderingContextBase::printToConsole):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::synthesizeGLError):
(WebCore::WebGLRenderingContextBase::printGLErrorToConsole): Deleted.
(WebCore::WebGLRenderingContextBase::printWarningToConsole): Deleted.
(WebCore::WebGLRenderingContextBase::printGLWarningToConsole): Deleted.
Unify console logging helper functions to all follow the same path. Additionally, errors
now generate stack traces. Shader compilation errors are now logged as well.

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

(WebCore::Document::addConsoleMessage):

  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):

  • page/PageConsoleClient.h:
  • page/PageConsoleClient.cpp:

(WebCore::PageConsoleClient::addMessage):

  • workers/WorkerGlobalScope.h:

Add new path for logging to the console that accepts a ConsoleMessage.

LayoutTests:

  • fast/canvas/webgl/fragment-shader-assertion.html:
  • fast/canvas/webgl/shader-compile-logging-expected.txt: Added.
  • fast/canvas/webgl/shader-compile-logging.html: Added.
11:27 AM Changeset in webkit [218602] by sbarati@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Try to fix the build after r218594.

  • dom/Document.h:
10:53 AM Changeset in webkit [218601] by Matt Lewis
  • 17 edits
    1 copy
    1 add in trunk/Source

Unreviewed, rolling out r218530.

This revision caused multiple media stream test crashes on
Debug builds.

Reverted changeset:

"Merge MediaDevicesRequest and MediaDevicesEnumerationRequest
to tighten up code and object lifetime"
https://bugs.webkit.org/show_bug.cgi?id=173527
http://trac.webkit.org/changeset/218530

10:38 AM Changeset in webkit [218600] by graouts@webkit.org
  • 8 edits
    4 adds in trunk

Media document experience with long-loading files is poor
https://bugs.webkit.org/show_bug.cgi?id=173575
<rdar://problem/32178119>

Reviewed by Dean Jackson.

Source/WebCore:

In order to avoid showing media controls at a different size than that of the video when we've
received enough information to determine whether it's audio or video and what the video frame size
is, we do not show any UI until we have enough information to show the controls in their correct
initial state. This works well with local files and fast-loading files, but does not work well with
invalid files, which never load and fail to ever show any UI, and files that load slowly where there
is no visible feedback that content will be visible.

Instead, we now default to showing audio controls in their loading state, which provides a seamless
transition if we will be loading an audio file since the controls are initially in the correct state,
and at least provide feedback that data is loading even if we eventually transition to a video layout.

Additionally, we remove the invalid placard background in case the media is invalid, showing only the
crossed-out play icon in the center of the page in that state.

Tests: media/modern-media-controls/media-documents/media-document-invalid.html

media/modern-media-controls/media-documents/media-document-video-with-initial-audio-layout.html

  • Modules/modern-media-controls/controls/media-document.css:

(:host(.media-document)): Remove "visibility: hidden" since we want the media controls to be visible
at all times.
(:host(.media-document.audio)): Add a little padding on the x-axis to ensure audio controls never snap
directly to the edges of the window.
(:host(.media-document.audio.iphone)): Remove the iPhone-specific styling since we moved it to the
general case.
(:host(.media-document.video.invalid) .placard): Remove the background from the invalid placard when
showing invalid media.
(:host(.media-document.ready)): Deleted.

  • Modules/modern-media-controls/media/audio-support.js:

(AudioSupport.prototype.syncControl): Make sure we invalidate the media document layout when a media
document's media type changes.

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

(MediaController): Instantiate the controls prior to creating the MediaDocumentController since the
MediaDocumentController will need to access the controls.

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

(MediaDocumentController): Set the default layout for media controls for a media document to be audio
and in the waiting state.
(MediaDocumentController.prototype.layout): Toggle the "invalid", "audio" and "video" CSS classes for
the next possible commit to the DOM, provided we have established the media document's media type.
(MediaDocumentController.prototype.handleEvent): Deal with the "play" and "error" events to trigger
a layout.
(MediaDocumentController.prototype._mediaDocumentHasMetadata): Deleted.
(MediaDocumentController.prototype._mediaDocumentHasSize): Deleted.

LayoutTests:

Fix a test that started failing with this patch and add two new tests that check we are adding
the expected CSS classes when loading video and invalid media documents.

  • media/modern-media-controls/media-documents/media-document-invalid-expected.txt: Added.
  • media/modern-media-controls/media-documents/media-document-invalid.html: Added.
  • media/modern-media-controls/media-documents/media-document-video-with-initial-audio-layout-expected.txt: Added.
  • media/modern-media-controls/media-documents/media-document-video-with-initial-audio-layout.html: Added.
  • media/modern-media-controls/volume-up-support/volume-up-support-expected.txt:
  • media/modern-media-controls/volume-up-support/volume-up-support.html:
10:21 AM Changeset in webkit [218599] by dbates@webkit.org
  • 7 edits in trunk/Source/WebCore

NavigationAction has too many constructors
https://bugs.webkit.org/show_bug.cgi?id=173484

Reviewed by Brady Eidson.

A NavigationAction object is an immutable object that represents the details of a
navigation, including the type of a navigation (e.g. link click), what triggered
the navigation, and the external URL policy to use for the navigation. Over time
the number of NavigationAction constructor overloads (not including copy/move
constructors) has grown to 12 to support different combinations of details.
We can use default values to reduce the number of constructors to 2 (not including
copy/move constructors).

No behavior changed. So, no new tests.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Pass NavigationType::Other when
instantiating NavigationAction.
(WebCore::FrameLoader::loadDifferentDocumentItem): Fix order of arguments now that
the constructor overload that takes a NavigationType takes the Event* as the fourth argument,
not the third. Also, use C++11 brace initialization syntax when instantiating a NavigationAction.
(WebCore::createWindow):

  • loader/NavigationAction.cpp: Remove unnecessary #include of header ScriptController.h.

Include header Event.h.
(WebCore::NavigationAction::NavigationAction):

  • loader/NavigationAction.h: Forward declare class Event and remove #include of header Event.h.

Make copy constructor, copy assignment operator, move constructor, and move assignment operator
out-of-line to avoid the need to include header Event.h. Export the copy constructor so that it
can be used from WebKit on the Apple Windows port. Move ShouldOpenExternalURLsPolicy to be after
NavigationType to reduce the size of the class by 8 bytes.
(WebCore::NavigationAction::NavigationAction):

  • loader/PolicyChecker.cpp: Include header Event.h.
  • page/Performance.cpp: Ditto.
  • replay/ReplayController.cpp: Ditto.
10:09 AM Changeset in webkit [218598] by jmarcell@apple.com
  • 11 edits
    1 add in tags/Safari-604.1.26.2

Cherry-pick r218295. rdar://problem/32723779

10:03 AM Changeset in webkit [218597] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.26.2/Source

Versioning.

9:59 AM Changeset in webkit [218596] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.26.2

New tag.

9:46 AM Changeset in webkit [218595] by Konstantin Tokarev
  • 6 edits
    1 move in trunk/Source/WebCore

Rename OrientationNotifer.h to OrientationNotifier.h
https://bugs.webkit.org/show_bug.cgi?id=173600

Reviewed by Youenn Fablet.

No new tests needed.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.h:
  • platform/OrientationNotifier.h: Renamed from Source/WebCore/platform/OrientationNotifer.h.
  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
  • testing/Internals.h:
9:32 AM Changeset in webkit [218594] by Konstantin Tokarev
  • 34 edits in trunk/Source

Remove excessive include directives from WTF
https://bugs.webkit.org/show_bug.cgi?id=173553

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • profiler/ProfilerDatabase.cpp: Added missing include directive.
  • runtime/SamplingProfiler.cpp: Ditto.

Source/WebCore:

No new tests needed.

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

Added missing include directive.

Source/WTF:

  • wtf/AutomaticThread.h:
  • wtf/BagToHashMap.h:
  • wtf/CrossThreadCopier.h:
  • wtf/CrossThreadQueue.h:
  • wtf/DateMath.h:
  • wtf/Expected.h:
  • wtf/HashMap.h:
  • wtf/Indenter.h:
  • wtf/MessageQueue.h:
  • wtf/MetaAllocator.h:
  • wtf/MetaAllocatorHandle.h:
  • wtf/RandomNumberSeed.h:
  • wtf/Ref.h:
  • wtf/RefPtr.h:
  • wtf/RunLoop.h:
  • wtf/SchedulePair.h:
  • wtf/StackStats.h:
  • wtf/SynchronizedFixedQueue.h:
  • wtf/ThreadMessage.h:
  • wtf/Threading.cpp:
  • wtf/Threading.h:
  • wtf/ThreadingPthreads.cpp:
  • wtf/ThreadingWin.cpp:
  • wtf/WTFThreadData.h:
  • wtf/WorkQueue.h:
  • wtf/glib/GRefPtr.h:
  • wtf/text/AtomicStringTable.h:
  • wtf/text/LineBreakIteratorPoolICU.h:
9:31 AM Changeset in webkit [218593] by Konstantin Tokarev
  • 37 edits in trunk/Source/WebCore

Remove excessive include directives from WebCore/dom
https://bugs.webkit.org/show_bug.cgi?id=173591

Reviewed by Darin Adler.

No new tests needed.

  • bindings/js/JSCustomElementRegistryCustom.cpp:
  • dom/Attr.h:
  • dom/ChildListMutationScope.h:
  • dom/ContainerNodeAlgorithms.cpp:
  • dom/ContainerNodeAlgorithms.h:
  • dom/CustomElementRegistry.h:
  • dom/DOMRect.h:
  • dom/DocumentMarkerController.h:
  • dom/ElementIteratorAssertions.h:
  • dom/ElementRareData.h:
  • dom/EventContext.h:
  • dom/EventDispatcher.h:
  • dom/ExtensionStyleSheets.h:
  • dom/GenericEventQueue.h:
  • dom/LiveNodeList.h:
  • dom/LoadableClassicScript.h:
  • dom/LoadableScript.h:
  • dom/MutationCallback.h:
  • dom/NativeNodeFilter.h:
  • dom/NodeRareData.h:
  • dom/PromiseRejectionEvent.h:
  • dom/PseudoElement.h:
  • dom/Range.h:
  • dom/RegisteredEventListener.h:
  • dom/RejectedPromiseTracker.cpp:
  • dom/ScopedEventQueue.h:
  • dom/ScriptElement.h:
  • dom/ScriptExecutionContext.h:
  • dom/ScriptedAnimationController.cpp:
  • dom/ScriptedAnimationController.h:
  • dom/SelectorQuery.h:
  • dom/StaticNodeList.h:
  • dom/StaticRange.h:
  • dom/default/PlatformMessagePortChannel.h:
  • testing/Internals.cpp:
  • workers/WorkerGlobalScope.h:
8:26 AM Changeset in webkit [218592] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Enable appcache tests

Unreviewed gardening.

Most of these tests are passing, so enable them. For known GTK+
failures, copy the expectations. Mark as failing deferred events
tests that have slight differences that need to be investigated.

  • platform/wpe/TestExpectations:
6:07 AM Changeset in webkit [218591] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Skip geolocation tests

Geolocation was disabled since r218553 and thus far tests were
only using the mock provider. Skip until we add geoclue
support.

  • platform/wpe/TestExpectations:
4:44 AM Changeset in webkit [218590] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.16.4

WebKitGTK+ 2.16.4

4:44 AM Changeset in webkit [218589] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.16.4 release.

.:

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.16.4.
4:38 AM Changeset in webkit [218588] by Konstantin Tokarev
  • 58 edits in trunk/Source/WebCore

Remove excessive include directives from WebCore/css
https://bugs.webkit.org/show_bug.cgi?id=173554

Reviewed by Alex Christensen.

No new tests needed.

  • css/CSSComputedStyleDeclaration.h:
  • css/CSSContentDistributionValue.h:
  • css/CSSCursorImageValue.h:
  • css/CSSFilterImageValue.h:
  • css/CSSFontFace.h:
  • css/CSSFontFeatureValue.h:
  • css/CSSFontStyleRangeValue.h:
  • css/CSSFontVariationValue.h:
  • css/CSSImageGeneratorValue.h:
  • css/CSSImageSetValue.h:
  • css/CSSInheritedValue.h:
  • css/CSSInitialValue.h:
  • css/CSSKeyframeRule.cpp:
  • css/CSSKeyframeRule.h:
  • css/CSSLineBoxContainValue.h:
  • css/CSSPrimitiveValue.h:
  • css/CSSPrimitiveValueMappings.h:
  • css/CSSPropertySourceData.h:
  • css/CSSReflectValue.h:
  • css/CSSRevertValue.h:
  • css/CSSSelector.h:
  • css/CSSStyleSheet.h:
  • css/CSSToLengthConversionData.h:
  • css/CSSUnsetValue.h:
  • css/CSSValue.h:
  • css/CSSValuePool.h:
  • css/CSSVariableData.h:
  • css/DeprecatedCSSOMCounter.h:
  • css/DeprecatedCSSOMRGBColor.h:
  • css/DeprecatedCSSOMRect.h:
  • css/DeprecatedCSSOMValue.h:
  • css/RuleSet.h:
  • css/SelectorChecker.h:
  • css/StyleBuilderConverter.h:
  • css/StyleBuilderCustom.h:
  • css/StyleProperties.h:
  • css/StyleResolver.cpp:
  • css/StyleResolver.h:
  • css/StyleSheet.h:
  • css/StyleSheetContents.h:
  • css/ViewportStyleResolver.h:
  • css/parser/CSSDeferredParser.h:
  • css/parser/CSSParserIdioms.h:
  • css/parser/CSSParserImpl.cpp:
  • css/parser/CSSParserImpl.h:
  • css/parser/CSSParserObserver.h:
  • css/parser/CSSParserSelector.h:
  • css/parser/CSSPropertyParserHelpers.h:
  • css/parser/MediaQueryParser.cpp:
  • css/parser/MediaQueryParser.h:
  • css/parser/SizesAttributeParser.cpp:
  • css/parser/SizesAttributeParser.h:
  • html/BaseCheckableInputType.cpp:
  • html/MediaController.cpp:
  • html/track/TextTrack.cpp:
  • html/track/TextTrackCue.cpp:
  • html/track/VideoTrack.cpp:
  • loader/TextTrackLoader.cpp:
3:48 AM WebKitGTK/2.16.x edited by Carlos Garcia Campos
(diff)
3:44 AM Changeset in webkit [218587] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r218516 - Various IndexedDB crashes as an after effect of previous test.
<rdar://problem/31418761> and https://bugs.webkit.org/show_bug.cgi?id=170436

Reviewed by Chris Dumez.

No new test (No consistent test possible, in practice covered by all existing IDB tests)

This is timing related, where a UniqueIDBDatabase can be destroyed on the main thread while
it still has one task left to try to execute on the IDBServer thread.

The background thread tasks don't Ref<> the UniqueIDBDatabase, so even though task execution
took a Ref<> protector, there was still a small window for a race.

Should be closed up by making the background thread tasks themselves protect this.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):
(WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
(WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask):
(WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
3:40 AM Changeset in webkit [218586] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r218471 - [GStreamer] MainThreadNotifier ASSERTION FAILED: m_boundThread == currentThread() in _WebKitWebSrcPrivate::~_WebKitWebSrcPrivate
https://bugs.webkit.org/show_bug.cgi?id=152043

Reviewed by Xabier Rodriguez-Calvar.

Stop using a WeakPtr in MainThreadNotifier, because it's not thread safe, which causes a crash in debug builds when
the notifier is destroyed in a different thread. Make MainThreadNotifier thread safe refcounted instead, and add
an invalidate() method to mark it as invalid.

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:

(WebCore::InbandTextTrackPrivateGStreamer::handleSample):
(WebCore::InbandTextTrackPrivateGStreamer::streamChanged):

  • platform/graphics/gstreamer/MainThreadNotifier.h:

(WebCore::MainThreadNotifier::MainThreadNotifier): Deleted.
(WebCore::MainThreadNotifier::notify): Deleted.
(WebCore::MainThreadNotifier::cancelPendingNotifications): Deleted.
(WebCore::MainThreadNotifier::addPendingNotification): Deleted.
(WebCore::MainThreadNotifier::removePendingNotification): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::textChangedCallback):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::muteChangedCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:

(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
(WebCore::TrackPrivateBaseGStreamer::~TrackPrivateBaseGStreamer):
(WebCore::TrackPrivateBaseGStreamer::disconnect):
(WebCore::TrackPrivateBaseGStreamer::activeChangedCallback):
(WebCore::TrackPrivateBaseGStreamer::tagsChanged):

  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_init):
(webKitWebSrcDispose):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcNeedData):
(webKitWebSrcEnoughData):
(webKitWebSrcSeek):

3:38 AM Changeset in webkit [218585] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r218326 - Unreviewed. Fix copy-paste error in GTK+ WEBKIT_JAVASCRIPT_ERROR definition.

The print one was copied there.

  • UIProcess/API/gtk/WebKitError.h:
3:38 AM Changeset in webkit [218584] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r218386 - Unreviewed. Remove wrong headers check from some GTK+ API files.

Remove the WEBKIT_WEB_EXTENSION_H_INSIDE check since these are not actually shared.

  • UIProcess/API/gtk/WebKitEditorState.h:
  • UIProcess/API/gtk/WebKitOptionMenu.h:
  • UIProcess/API/gtk/WebKitPrintCustomWidget.h:
3:34 AM Changeset in webkit [218583] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r218451 - Crash due to infinite recursion via FrameSelection::updateAppearanceAfterLayout
https://bugs.webkit.org/show_bug.cgi?id=173468

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: editing/selection/updateAppearanceAfterLayout-recursion.html

Calling FrameSelection::updateAppearanceAfterLayout() from Document::resolveStyle is unsafe
because it may cause another call to resolveStyle. We have some cases where the style
is still unclean when updateAppearanceAfterLayout() is called. This can lead to infinite
recursion.

The test case is not the common stack seen in CrashTracer (couldn't quit replicate it) but
the updateAppearanceAfterLayout/resolveStyle recursion is the same.

  • dom/Document.cpp:

(WebCore::Document::resolveStyle):

Normally selection appearance update is done in post-layout but not all style resolutions schedule a layout.
Invoke it asynchronously in that case instead of the previous synchronous call.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::updateAppearanceAfterLayout):
(WebCore::FrameSelection::scheduleAppearanceUpdateAfterStyleChange):
(WebCore::FrameSelection::appearanceUpdateTimerFired):
(WebCore::FrameSelection::updateAppearanceAfterLayoutOrStyleChange):

  • editing/FrameSelection.h:

LayoutTests:

  • editing/selection/updateAppearanceAfterLayout-recursion-expected.txt: Added.
  • editing/selection/updateAppearanceAfterLayout-recursion.html: Added.
3:29 AM Changeset in webkit [218582] by Carlos Garcia Campos
  • 32 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r218446 - REGRESSION(r209495): materiauxlaverdure.com fails to load
https://bugs.webkit.org/show_bug.cgi?id=173301
<rdar://problem/32624850>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaselined the tests that are now passing.

  • web-platform-tests/cssom/CSSNamespaceRule-expected.txt:
  • web-platform-tests/cssom/serialize-values-expected.txt:

Source/WebCore:

The bug was caused by WebKit wrapping CSS string values with single quotation marks instead of
double quotation marks as spec'ed in https://drafts.csswg.org/cssom/#serialize-a-string and
implemented in Firefox and Chrome.

The website eval's the computed value of the content CSS property with the value '{name: "flat"}'
after stripping single quotation marks from both ends. Prior to r209495, WebKit serialized this CSS value
in single quotations without escaping double quotations. After r209495, double quotations are escaped
with backslashes as '{name: \"flat\"}'. As a result, eval is invoked with {name: \"flat\"}
after stripping single quotations from both ends, which resulted in an exception.

Chrome and Firefox don't encounter this exception despite of the fact they escape double quotations
as well because serialize with double quotations as "{name: \"flat\"}". Because there is no code
to strip double quotations, eval is invoked with the same string, resulting in the entire value as
being parsed as string, instead of an object with a single key "name" with the value of "flat" as
was the case in WebKit prior to r209495. While this behavior was most certainly not the intent of
the website author, Chrome and Firefox don't encounter an exception and the website continues to work.

This patch aligns WebKit's behavior to that of the CSS OM specification, Firefox, and Chrome by
serializing CSS string values using double quotation marks instead of single quotation marks.

Note: inline change log comments are added below for every call site of serializeString for clarity.

Test: fast/css/getPropertyValue-serialization-with-double-quotes.html

  • css/CSSBasicShapes.cpp:

(WebCore::buildPathString): Use double quotation marks in path(~) of shapes.

  • css/CSSMarkup.cpp:

(WebCore::serializeString):
(WebCore::serializeURL): Use double quotation marks to serialize URLs.
(WebCore::serializeAsStringOrCustomIdent): Use double quotation marks to serialize strings. We still avoid
using wrapping the value with double quotations when the value can be an identifier. See r209495.
(WebCore::serializeFontFamily): Ditto for font-family names such as "San Francisco".

  • css/CSSMarkup.h:
  • css/CSSNamespaceRule.cpp:

(WebCore::CSSNamespaceRule::cssText): Use double quotation marks to serialize namespace URIs.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Use double quotation marks to serialize
the separators; e.g. counter(sectionNumber, ".") to produce "1.".

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText): Use double quotation marks to serialize attribute values.

  • css/parser/CSSParserToken.cpp:

(WebCore::CSSParserToken::serialize): Use double quotation marks to serialize strings in @support.

  • editing/EditingStyle.cpp:

(WebCore::StyleChange::extractTextStyles): Updated to strip double quotation marks in font family names to
maintain the compatibility with old versions of Microsoft Outlook.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::mapLanguageAttributeToLocale): Use double quotations marks to serialize the value
of the lang content attribute. It doesn't matter which one is used here because it's only a temporary value
only fed into the CSS parser to set the equivalent CSS value from the content attribute.

LayoutTests:

Rebaselined the existing tests and added a new regression test for serializing CSS properties and values.

  • accessibility/mac/alt-for-css-content-expected.txt:
  • accessibility/mac/webkit-alt-for-css-content-expected.txt:
  • editing/pasteboard/cjk-line-height-expected.txt:
  • fast/css/alt-inherit-initial-expected.txt:
  • fast/css/alt-inherit-initial.html:
  • fast/css/content-language-comma-separated-list-expected.txt:
  • fast/css/content-language-empty-expected.txt:
  • fast/css/content-language-only-whitespace-expected.txt:
  • fast/css/content-language-with-whitespace-expected.txt:
  • fast/css/counters/counter-cssText-expected.txt:
  • fast/css/counters/counter-cssText.html:
  • fast/css/font-family-trailing-bracket-gunk-expected.txt:
  • fast/css/font-family-trailing-bracket-gunk.html:
  • fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • fast/css/getComputedStyle/computed-style-properties-expected.txt:
  • fast/css/getComputedStyle/computed-style-properties.html:
  • fast/css/getComputedStyle/font-family-fallback-reset-expected.txt:
  • fast/css/getComputedStyle/font-family-fallback-reset.html:
  • fast/css/lang-mapped-to-webkit-locale-expected.txt:
  • fast/css/lang-mapped-to-webkit-locale.xhtml:
  • fast/css/serialization-with-double-quotes-expected.txt: Added.
  • fast/css/serialization-with-double-quotes.html: Added.
  • fast/css/uri-token-parsing-expected.txt:
  • fast/css/uri-token-parsing.html:
  • fast/inspector-support/cssURLQuotes-expected.txt:
  • fast/inspector-support/style-expected.txt:
  • fast/text/font-stretch-parse-expected.txt:
  • fast/text/font-stretch-parse.html:
  • fast/text/font-style-parse-expected.txt:
  • fast/text/font-style-parse.html:
  • fast/text/font-weight-parse-expected.txt:
  • fast/text/font-weight-parse.html:
  • media/controls/track-menu.html:
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt:
  • platform/mac-elcapitan/fast/text/font-style-parse-expected.txt:
  • platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt:
3:27 AM Changeset in webkit [218581] by gskachkov@gmail.com
  • 11 edits in trunk

Revert changes in bug#160417 about extending null not being a derived class https://bugs.webkit.org/show_bug.cgi?id=169293

Reviewed by Saam Barati.

Source/JavaScriptCore:

Reverted changes in bug#160417 about extending null not being a derived class
according to changes in spec:
https://github.com/tc39/ecma262/commit/c57ef95c45a371f9c9485bb1c3881dbdc04524a2

  • builtins/BuiltinNames.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitReturn):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ClassExprNode::emitBytecode):

JSTests:

  • stress/class-derived-from-null.js:

LayoutTests:

  • js/class-syntax-extends-expected.txt:
  • js/class-syntax-super-expected.txt:
  • js/script-tests/class-syntax-extends.js:
  • js/script-tests/class-syntax-super.js:
3:10 AM Changeset in webkit [218580] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

[WTF] Enable WTF::Signals only when HAVE(MACHINE_CONTEXT) is true
https://bugs.webkit.org/show_bug.cgi?id=173590

Reviewed by Carlos Garcia Campos.

WTF::Signals require a feature rewriting a value of a machine context.
This is only available under HAVE(MACHINE_CONTEXT).
This patch disables WTF::Signals on !HAVE(MACHINE_CONTEXT) environments.

  • wtf/threads/Signals.cpp:
  • wtf/threads/Signals.h:
3:09 AM Changeset in webkit [218579] by Wenson Hsieh
  • 7 edits in trunk

[iOS DnD] [WK2] Remove custom logic for disambiguating long press action sheet gestures and drag lift
https://bugs.webkit.org/show_bug.cgi?id=173578
<rdar://problem/32825028>

Reviewed by Tim Horton.

Source/WebKit2:

Custom logic to cancel the long press action gesture recognizer in WebKit2 was added months ago to achieve
spec'ed behavior when initiating a drag on an element with an action sheet to show on long press. Now that UIKit
defers firing long-press gesture recognizers while a drag lift is recognizing, no extra work in WebKit is needed
to achieve expected behavior.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _simulateLongPressActionAtLocation:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Add testing SPI for showing an action sheet popover at a given location in content view coordinates.

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

(-[WKContentView _startDataInteractionWithImage:withIndicatorData:atClientPosition:anchorPoint:action:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:sessionWillBegin:]):
(-[WKContentView _api_dragInteraction:session:didEndWithOperation:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(longPressActionDelayAfterLift): Deleted.
(-[WKContentView performDeferredActionAtDragOrigin]): Deleted.
(-[WKContentView cancelDeferredActionAtDragOrigin]): Deleted.

Tools:

Slight tweak to ensure that DataInteractionTests.CustomActionSheetPopover still passes and verifies that showing
a custom popover does not cause dragging to fail when the popover is presented.

  • TestWebKitAPI/ios/DataInteractionSimulator.mm:

(-[DataInteractionSimulator _advanceProgress]):

3:00 AM Changeset in webkit [218578] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r218392 - REGRESSION(r166799): LogsPageMessagesToSystemConsoleEnabled corrupts non-ASCII characters
https://bugs.webkit.org/show_bug.cgi?id=173470

Reviewed by Joseph Pecoraro.

ConsoleClient::printConsoleMessageWithArguments() incorrectly uses
const char* overload of StringBuilder::append() that assummes Latin1
encoding, not UTF8.

  • runtime/ConsoleClient.cpp:

(JSC::ConsoleClient::printConsoleMessageWithArguments):

2:51 AM Changeset in webkit [218577] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r218253 - REGRESSION(r216901): ImageDecoders: rendering of large images is broken since r216901
https://bugs.webkit.org/show_bug.cgi?id=172502

Reviewed by Carlos Garcia Campos.

When using GTK and WPE image decoders, the decoded frames are stored inside a Vector of
ImageFrames inside the decoders. These ImageFrames have and ImageBackingStore with the
pixels. When a NativeImagePtr is requested, a cairo surface is created from the data
in those ImageBackingStores, but the data keeps being owned by the backing stores. Due
to this, if the decoder that created the image gets destroyed, the backing stores for
the decoded frames get destroyed as well, causing the cairo surfaces that were using
that data to contain garbage (and potentially cause a crash).

To fix this, we change ImageBackingStore so the pixels are stored in a SharedBuffer. The
buffer will be reffed everytime a cairo surface is created with it, and the cairo surfaces
will unref the buffer when they are destroyed. This way, the pixel data won't be freed
while there are cairo surfaces using it.

No new tests, no behaviour change.

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::setSize):
(WebCore::ImageBackingStore::ImageBackingStore):

  • platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:

(WebCore::ImageBackingStore::image):

2:11 AM Changeset in webkit [218576] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r218190 - Protect lifetime of media element during HTMLMediaElement::notifyAboutPlaying()
https://bugs.webkit.org/show_bug.cgi?id=173320
<rdar://problem/32590276>

Reviewed by Brent Fulgham.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::notifyAboutPlaying):

2:10 AM Changeset in webkit [218575] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.16

Merge r218185 - [GTK] Blob download doesn't work
https://bugs.webkit.org/show_bug.cgi?id=172442

Reviewed by Carlos Alberto Lopez Perez.

Source/WebKit2:

GTK+ API uses URIs for download destination paths, and passes that URIs to the WebKit internals. But WebKit
expects download destination location to be a local path. This is not a problem for normal downloads, because
the soup backend handles the cases of download destination being a URI and a path. For blob downloads
NetworkDataTaskBlob is used, and it always expects the download destination to be a local path, failing in
FileSystem::openFile() when a URI is passed. We need to keep using local files internally and convert to URIs
only when exposing those paths to the API.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::download): Stop handling URIs here, we should always expect local files.

  • UIProcess/API/gtk/WebKitDownload.cpp:

(webkitDownloadDecideDestinationWithSuggestedFilename): Convert destination URI to filanme before pasing it to DownloadClient.
(webkitDownloadDestinationCreated): Convert the destination path to a URI before passing it to WebKitDownload::created-destionation signal.

  • UIProcess/API/gtk/WebKitDownloadClient.cpp:
  • UIProcess/API/gtk/WebKitDownloadPrivate.h:

Tools:

Add a unit test to check blob downloads.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:

(testBlobDownload):
(beforeAll):

2:02 AM Changeset in webkit [218574] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r218046 - Crash inside WebKit::PluginView::getAuthenticationInfo
https://bugs.webkit.org/show_bug.cgi?id=173083
<rdar://problem/32513144>

Address Darin's review comment.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::getAuthenticationInfo):

1:59 AM Changeset in webkit [218573] by Carlos Garcia Campos
  • 5 edits
    3 adds in releases/WebKitGTK/webkit-2.16

Merge r218041 - Crash when IndexedDB's getAll is used inside a Web Worker.
https://bugs.webkit.org/show_bug.cgi?id=172434

Reviewed by Andy Estes.

Source/WebCore:

Test: storage/indexeddb/modern/worker-getall.html

  • Modules/indexeddb/IDBGetAllResult.cpp:

(WebCore::IDBGetAllResult::IDBGetAllResult): Add an isolated-copying constructor.
(WebCore::IDBGetAllResult::isolatedCopy):

  • Modules/indexeddb/IDBGetAllResult.h:
  • Modules/indexeddb/shared/IDBResultData.cpp:

(WebCore::IDBResultData::isolatedCopy): Actually copy the IDBGetAllResult.

LayoutTests:

  • storage/indexeddb/modern/resources/worker-getall.js: Added.
  • storage/indexeddb/modern/worker-getall-expected.txt: Added.
  • storage/indexeddb/modern/worker-getall.html: Added.
1:52 AM Changeset in webkit [218572] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r217958 - Crash inside InsertNodeBeforeCommand via InsertParagraphSeparatorCommand
https://bugs.webkit.org/show_bug.cgi?id=173085
Source/WebCore:

<rdar://problem/32575059>

Reviewed by Wenson Hsieh.

The crash was caused by the condition to check for special cases failing when visiblePos is null.
Exit early in these extreme cases.

Also replaced the use of deprecatedNode and deprecatedEditingOffset to modern idioms.

Test: editing/inserting/insert-horizontal-rule-in-empty-document-crash.html

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

LayoutTests:

Reviewed by Wenson Hsieh.

Added a regresion test.

  • editing/inserting/insert-horizontal-rule-in-empty-document-crash-expected.txt: Added.
  • editing/inserting/insert-horizontal-rule-in-empty-document-crash.html: Added.
1:43 AM Changeset in webkit [218571] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.16

Merge r217928 - MediaTime class has rounding issues in different platforms
https://bugs.webkit.org/show_bug.cgi?id=172640

Reviewed by Jer Noble.

Source/WTF:

The way a timescale is set when creating a MediaTime from a double
can create rounding issues in different platforms because in some
rounding is made and in others, it truncates. This way we ensure a
common behavior.

Dumping MediaTimes is also confusing and by the output you don't
know if it's containing a double or a fraction. Now, if it
contains a double, it only prints the double because printing the
fraction is misleading (it currently prints the double read as an
integer) and if it contains a fraction it shows the fraction and
its double representation separated by an = instead of a ,.

  • wtf/MediaTime.cpp:

(WTF::MediaTime::createWithDouble): When creating MediaTime from
double, we round instead of leaving it to the cast operation.
(WTF::MediaTime::dump):

LayoutTests:

Update expectations because the MediaTime printing changed, but
results are the same.

  • media/media-source/media-source-overlapping-append-expected.txt:
  • media/media-source/media-source-overlapping-decodetime-expected.txt:
  • media/media-source/media-source-seek-back-expected.txt:
  • media/media-source/media-source-sequence-timestamps-expected.txt:
  • media/media-source/media-source-timeoffset-expected.txt:
1:41 AM Changeset in webkit [218570] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r217914 - Crash inside WebKit::PluginView::getAuthenticationInfo
https://bugs.webkit.org/show_bug.cgi?id=173083

Reviewed by Chris Dumez.

Added a null pointer check. The content document may have went away by the time we get there from IPC.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::getAuthenticationInfo):

1:34 AM Changeset in webkit [218569] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r217848 - Safari doesn't load newest The Order of the Stick comic.
https://bugs.webkit.org/show_bug.cgi?id=172949
<rdar://problem/32389730>

Reviewed by Antti Koivisto.

Source/WebCore:

As part of the table layout, RenderTableSection::layoutRows calls the RenderTableCell's layout() directly
(skipping the RenderTableRow parent). If during this call the RenderTableCell (or any of its descendant) marks the ancestor
chain dirty, this dirty flag on the RenderTableRows will never be cleared and we'll end up early returning from RenderTableSection::paint.
For certain type of float objects, we need to invalidate the line layout path during layout (and we mark the ancestors dirty).
This patch takes a conservative approach and marks the ancestors dirty only when the renderer is not dirty yet, but
as part of webkit.org/b/172947 we should revisit and validate whether the setNeedsLayout() is required at all.

Test: fast/table/floating-table-sibling-is-invisible.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::invalidateLineLayoutPath):

LayoutTests:

  • fast/table/floating-table-sibling-is-invisible-expected.html: Added.
  • fast/table/floating-table-sibling-is-invisible.html: Added.
1:31 AM Changeset in webkit [218568] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/LayoutTests

Merge r217813 - ASSERTION FAILED: RunLoop::isMain() in com.apple.WebKit: IPC::Connection::sendSyncMessage + 128
https://bugs.webkit.org/show_bug.cgi?id=172943
<rdar://problem/31288058>

Reviewed by Alexey Proskuryakov.

Make test clean a little bit more robust.

  • storage/domstorage/sessionstorage/set-item-synchronous-keydown.html:
1:28 AM Changeset in webkit [218567] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r217810 - ASSERTION FAILED: RunLoop::isMain() in com.apple.WebKit: IPC::Connection::sendSyncMessage + 128
https://bugs.webkit.org/show_bug.cgi?id=172943
<rdar://problem/31288058>

Reviewed by Alexey Proskuryakov.

Source/WebKit2:

In Connection::sendMessage(), make sure we only ever transform asynchronous messages into synchronous
ones if sendMessage() is called on the main thread. This is necessary because we no longer support
sending synchronous messages from a background thread since r205125.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::sendMessage):
(IPC::Connection::sendSyncMessage):

LayoutTests:

Add better test coverage.

  • storage/domstorage/sessionstorage/set-item-synchronous-keydown-expected.txt: Added.
  • storage/domstorage/sessionstorage/set-item-synchronous-keydown.html: Added.
1:25 AM Changeset in webkit [218566] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/JavaScriptCore

Merge r217650 - RELEASE_ASSERT_NOT_REACHED() in InferredType::kindForFlags() on Big-Endians
https://bugs.webkit.org/show_bug.cgi?id=170945

Patch by Tomas Popela <tpopela@redhat.com>, Mark Lam <mark.lam@apple.com> on 2017-06-01
Reviewed by Mark Lam.

Re-define PutByIdFlags as a int32_t enum explicitly because it is
stored as an int32_t value in UnlinkedInstruction. This prevents
a bug on 64-bit big endian architectures where the word order is
inverted (when we convert the UnlinkedInstruction into a CodeBlock
Instruction), resulting in the PutByIdFlags value not being stored in
the 32-bit word that the rest of the code expects it to be in.

  • bytecode/PutByIdFlags.h:
1:08 AM Changeset in webkit [218565] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r217794 - Destroy the associated renderer subtree when display: contents node is deleted.
https://bugs.webkit.org/show_bug.cgi?id=172920
<rdar://problem/32446045>

Reviewed by Antti Koivisto.

Since display: contents node does not create a renderer, we need to explicitly check
and distinguish it from the display: none case.

Covered by existing tests.

  • dom/ContainerNode.cpp:

(WebCore::destroyRenderTreeIfNeeded):

  • dom/Node.cpp:

(WebCore::Node::~Node): Promote ASSERT(!renderer()) to ASSERT_WITH_SECURITY_IMPLICATION.

  • dom/Text.cpp:

(WebCore::Text::~Text): Redundant assert. Text is a Node.

1:06 AM Changeset in webkit [218564] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r217786 - [GStreamer] Deadlock in MediaPlayerPrivateGStreamer::changePipelineState, web process often locks up on seeking in a youtube video that has already fully buffered
https://bugs.webkit.org/show_bug.cgi?id=170003

Reviewed by Michael Catanzaro.

When video sink is requested to render a frame, the GstBaseSink preroll mutex is taken. Then WebKit media player
schedules a repaint in the main thread, taking the draw mutex and waiting on draw condition. It can happen that
before the repaint is done in the main thread, a pause is requested in the main thread, causing a change state
from PLAYING to PAUSE. When the change state reaches the video sink gst_base_sink_change_state() tries to get
the preroll mutex. This causes a deadlock because the main thread is waiting to get the preroll mutex, but the
other thread is waiting for the main thread to do the repaint. GStreamer handles this case by calling unlock()
on the video sink before trying to get the preroll mutex, but the media player doesn't cancel the pending
repaint when using coordinated graphics. This patch adds a new signal to WebKitVideoSink "repaint-cancelled" to
notify the media player to cancel the pending prepaint.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint): Release the draw mutex and notify the condition.
(WebCore::MediaPlayerPrivateGStreamerBase::repaintCancelledCallback): Call cancelRepaint().
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): Connect to WebKitVideoSink::repaint-cancelled.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(webkitVideoSinkRepaintCancelled): Emit WebKitVideoSink::repaint-cancelled.
(webkitVideoSinkUnlock): Call webkitVideoSinkRepaintCancelled().
(webkitVideoSinkStop): Ditto.
(webkit_video_sink_class_init): Add WebKitVideoSink::repaint-cancelled signal.

12:56 AM Changeset in webkit [218563] by zandobersek@gmail.com
  • 2 edits
    3 adds in trunk/LayoutTests

Unreviewed WPE gardening.

Unskipping AES-CTR and RSA-PSS layout tests that already pass.

Adding layout test baselines for two imported W3C tests that cover AES-CBC.
The subtests there pass, but the generic baseline expects failures, so we
work around that by adding baselines that expect passing tests.

  • platform/wpe/TestExpectations:
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_cbc.https-expected.txt: Added.
12:50 AM Changeset in webkit [218562] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r217702 - [GTK] Cache RenderThemeGadget hierarchies for rendering themed elements with GTK+ 3.20+
https://bugs.webkit.org/show_bug.cgi?id=162673

Reviewed by Michael Catanzaro.

Because of the way the new theming system works in GTK+ >= 3.20 we are currently creating a gadget hierarchy
every time we need to render a styled element or get layout information about it. That's happening on every
repaint, and it's specially problematic for overlay scrollbar indicators that fade in/out when shown/hidden. We
need to cache the gadgets and simply apply the state before every paint or layout query. When using GtkWidgetPath,
calling gtk_style_context_save() breaks the gadget hierarchy, and style classes need to be set when building the
GtkWidgetPath. That means we can't cache RenderThemeGadgets, call save, apply style classes and state, and then
call restore. We need to cache gadget hierarchies with fixed style classes. Fortunately, setting the state does
work, so we don't need to also cache a different hierarchy for every possible state. For example, for the
particular case of scrollbars we would cache VerticalScrollbarRight, VerticalScrollbarLeft, HorizontalScrollbar,
VerticalScrollIndicatorRight, VerticalScrollIndicatorLeft and HorizontalScrollIndicator. In practice, we will
only have 4 of those at the same time in the cache.
This patch adds RenderThemeWidget to represent a hierarchy of gadgets with fixed style classes that can be
cached and reused to render or query style of those "widgets". It also simplifies the RenderThemeGtk and
ScrollbarThemeGtk code by removing a lot of duplicated code to build the gadget hierarchies.

  • PlatformGTK.cmake:
  • platform/gtk/RenderThemeGadget.cpp:

(WebCore::createStyleContext):
(WebCore::appendElementToPath):
(WebCore::RenderThemeGadget::state):
(WebCore::RenderThemeGadget::setState):

  • platform/gtk/RenderThemeGadget.h:
  • platform/gtk/RenderThemeWidget.cpp: Added.

(WebCore::widgetMap):
(WebCore::RenderThemeWidget::getOrCreate):
(WebCore::RenderThemeWidget::clearCache):
(WebCore::RenderThemeWidget::~RenderThemeWidget):
(WebCore::RenderThemeScrollbar::RenderThemeScrollbar):
(WebCore::RenderThemeScrollbar::stepper):
(WebCore::RenderThemeToggleButton::RenderThemeToggleButton):
(WebCore::RenderThemeButton::RenderThemeButton):
(WebCore::RenderThemeComboBox::RenderThemeComboBox):
(WebCore::RenderThemeEntry::RenderThemeEntry):
(WebCore::RenderThemeSearchEntry::RenderThemeSearchEntry):
(WebCore::RenderThemeSpinButton::RenderThemeSpinButton):
(WebCore::RenderThemeSlider::RenderThemeSlider):
(WebCore::RenderThemeProgressBar::RenderThemeProgressBar):
(WebCore::RenderThemeListView::RenderThemeListView):
(WebCore::RenderThemeIcon::RenderThemeIcon):

  • platform/gtk/RenderThemeWidget.h: Added.

(WebCore::RenderThemeEntry::entry):
(WebCore::RenderThemeEntry::selection):

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::ScrollbarThemeGtk::themeChanged):
(WebCore::ScrollbarThemeGtk::updateThemeProperties):
(WebCore::widgetTypeForScrollbar):
(WebCore::contentsRectangle):
(WebCore::ScrollbarThemeGtk::trackRect):
(WebCore::ScrollbarThemeGtk::backButtonRect):
(WebCore::ScrollbarThemeGtk::forwardButtonRect):
(WebCore::ScrollbarThemeGtk::paint):
(WebCore::ScrollbarThemeGtk::scrollbarThickness):
(WebCore::ScrollbarThemeGtk::minimumThumbLength):

  • rendering/RenderThemeGtk.cpp:

(WebCore::createStyleContext):
(WebCore::setToggleSize):
(WebCore::paintToggle):
(WebCore::RenderThemeGtk::paintButton):
(WebCore::menuListColor):
(WebCore::RenderThemeGtk::popupInternalPaddingBox):
(WebCore::RenderThemeGtk::paintMenuList):
(WebCore::RenderThemeGtk::adjustTextFieldStyle):
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::adjustSearchFieldIconStyle):
(WebCore::paintSearchFieldIcon):
(WebCore::RenderThemeGtk::paintSliderTrack):
(WebCore::RenderThemeGtk::adjustSliderThumbSize):
(WebCore::RenderThemeGtk::paintSliderThumb):
(WebCore::RenderThemeGtk::progressBarRectForBounds):
(WebCore::RenderThemeGtk::paintProgressBar):
(WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
(WebCore::RenderThemeGtk::paintInnerSpinButton):
(WebCore::styleColor):
(WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
(WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
(WebCore::RenderThemeGtk::paintMediaButton):

12:48 AM Changeset in webkit [218561] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r217729 - REGRESSION (r206386): Xactimate Website Crashes @ com.apple.WebKit: WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant + 255
https://bugs.webkit.org/show_bug.cgi?id=172846
<rdar://problem/31093005>

Reviewed by Mark Lam.

Follow-up to r217695 to deal with exceptions potentially thrown by
NPRuntimeObjectMap::convertJSValueToNPVariant() as well.

  • WebProcess/Plugins/Netscape/NPJSObject.cpp:

(WebKit::NPJSObject::invoke):

12:48 AM Changeset in webkit [218560] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r217695 - REGRESSION (r206386): Xactimate Website Crashes @ com.apple.WebKit: WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant + 255
https://bugs.webkit.org/show_bug.cgi?id=172846
<rdar://problem/31093005>

Reviewed by Andreas Kling.

In NPJSObject::invoke(), return early if there was an exception when calling JSC::call().
Using the value returned by JSC::call() when an exception occurred is unsafe.

  • WebProcess/Plugins/Netscape/NPJSObject.cpp:

(WebKit::NPJSObject::invoke):

12:46 AM Changeset in webkit [218559] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r217682 - Make WebCore::defaultPortForProtocol() thread-safe
https://bugs.webkit.org/show_bug.cgi?id=172797

Reviewed by Brent Fulgham.

Make WebCore::defaultPortForProtocol() thread-safe since it is called from the SecurityOrigin
constructor and SecurityOrigin objects are constructed from various threads.

This should not regress the non-testing code paths since we only pay locking costs if
a default port override has been set by the tests.

  • platform/URL.cpp:

(WebCore::defaultPortForProtocolMapLock):
(WebCore::defaultPortForProtocolMapForTesting):
(WebCore::ensureDefaultPortForProtocolMapForTesting):
(WebCore::registerDefaultPortForProtocolForTesting):
(WebCore::clearDefaultPortForProtocolMapForTesting):
(WebCore::defaultPortForProtocol):

12:45 AM Changeset in webkit [218558] by magomez@igalia.com
  • 4 edits in trunk

[GTK] Layout Test fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html makes the subsequent test case flaky crash.
https://bugs.webkit.org/show_bug.cgi?id=173459

Reviewed by Carlos Garcia Campos.

Source/WebCore:

When destructing the VideoTextureCopierGStreamer, ensure that there's a previous gl context before trying
to make it current again. There are situations where no previous context may exist, which can trigger a crash.
Also, add DefaultImageOrientation to the switch that handles the video frame possible orientations, as it's the
value used when no rotation needs to be performed, and it's currently triggering an assertion.

Covered by existent tests.

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:

(WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::updateTextureSpaceMatrix):

LayoutTests:

Unskip fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html.

  • platform/gtk/TestExpectations:
12:39 AM Changeset in webkit [218557] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

[WTF] Rebaseline std::optional
https://bugs.webkit.org/show_bug.cgi?id=173582

Reviewed by JF Bastien.

Update the copy of our std::optional to the latest version.
It adds std::optional::has_value() and std::optional::reset().

  • wtf/Optional.h:
12:35 AM Changeset in webkit [218556] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r217589 - Fixed the build after r217588.

  • page/FrameView.h: Stopped exporting a function defined inline.
12:35 AM Changeset in webkit [218555] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore
Merge r217588 - ASSERTION FAILED: m_layoutPhase == InPostLayerPositionsUpdatedAfterLayout
m_layoutPhase == OutsideLayout

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

Reviewed by Simon Fraser.

We should be able to paint as long as the tree is clean and we are in paintable state.

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

12:24 AM Changeset in webkit [218554] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r217581 - m_resourceSelectionTaskQueue tasks should be cleared when player is destroyed to prevent invalid state.
https://bugs.webkit.org/show_bug.cgi?id=172726
rdar://problem/30867764

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-05-30
Reviewed by Eric Carlson.

I haven't found a reproducible way to make a test case for this race condition.

If m_player is cleared while there is an outstanding task in m_resourceSelectionTaskQueue,
that task may assume m_player is not null and crash. It is better to cancel that task than
to perform it part way with null checks.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::clearMediaPlayer):

12:20 AM Changeset in webkit [218553] by Carlos Garcia Campos
  • 33 edits
    2 copies
    52 adds in trunk

[WPE] Add initial implementation of glib API
https://bugs.webkit.org/show_bug.cgi?id=173546

Reviewed by Žan Doberšek.

.:

Add some definitions required to build WPE glib API.

  • Source/cmake/OptionsWPE.cmake:

Source/WebCore/platform/gtk/po:

Add WebKitWebViewGtk.cpp to the list of files with translatable strings.

  • POTFILES.in:

Source/WebKit2:

Make current API files under glib directories build in WPE, and add the minimum implementation to make it
work. For now it doesn't have web extensions API, and there are a few FIXMEs that will be fixed in follow up
commits. It doesn't include install rules yet, since it's still not ready to be installed.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • Shared/API/glib/WebKitContextMenuActions.cpp:

(webkitContextMenuActionGetActionTag):
(webkitContextMenuActionGetForContextMenuItem):
(webkitContextMenuActionGetLabel):

  • Shared/API/glib/WebKitContextMenuItem.cpp:
  • UIProcess/API/glib/WebKitEditorState.cpp:

(webkitEditorStateChanged):

  • UIProcess/API/glib/WebKitError.cpp:
  • UIProcess/API/glib/WebKitFileChooserRequest.cpp:

(webkitFileChooserRequestGetProperty):
(webkit_file_chooser_request_class_init):

  • UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp:

(createGstInstallPluginsContext):
(webkitInstallMissingMediaPluginsPermissionRequestAllow):

  • UIProcess/API/glib/WebKitNavigationAction.cpp:
  • UIProcess/API/glib/WebKitNavigationActionPrivate.h:

(_WebKitNavigationAction::_WebKitNavigationAction):

  • UIProcess/API/glib/WebKitNotificationPrivate.h:
  • UIProcess/API/glib/WebKitNotificationProvider.cpp:

(WebKitNotificationProvider::show):

  • UIProcess/API/glib/WebKitPrivate.cpp:

(toPlatformModifiers):
(toWebKitError):
(toWebCoreError):

  • UIProcess/API/glib/WebKitPrivate.h:
  • UIProcess/API/glib/WebKitSettings.cpp:

(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_set_user_agent):
(webkit_settings_set_user_agent_with_application_details):

  • UIProcess/API/glib/WebKitUIClient.cpp:
  • UIProcess/API/glib/WebKitURISchemeRequest.cpp:

(webkit_uri_scheme_request_get_web_view):

  • UIProcess/API/glib/WebKitUserContentManager.cpp:
  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextConstructed):

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewCreate):
(webkit_web_view_class_init):
(webkitWebViewCreatePage):
(webkitWebViewRunAsModal):
(webkitWebViewMouseTargetChanged):
(webkitWebViewEnterFullScreen):
(webkitWebViewExitFullScreen):
(webkitWebViewPopulateContextMenu):

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/API/glib/WebKitWindowProperties.cpp:

(webkitWindowPropertiesGetProperty):
(webkitWindowPropertiesSetProperty):
(webkit_window_properties_class_init):
(webkitWindowPropertiesUpdateFromWebWindowFeatures):

  • UIProcess/API/glib/WebKitWindowPropertiesPrivate.h:
  • UIProcess/API/gtk/WebKitWebViewGtk.cpp: Added.

(webkitWebViewAuthenticate):
(webkitWebViewCreateJavaScriptDialog):
(webkitWebViewScriptDialog):
(fileChooserDialogResponseCallback):
(webkitWebViewRunFileChooser):
(webkit_web_view_new):
(webkit_web_view_new_with_context):
(webkit_web_view_new_with_related_view):
(webkit_web_view_new_with_settings):
(webkit_web_view_new_with_user_content_manager):

  • UIProcess/API/wpe/WPEView.h:
  • UIProcess/API/wpe/WebKitAuthenticationRequest.h: Added.
  • UIProcess/API/wpe/WebKitAutomationSession.h: Added.
  • UIProcess/API/wpe/WebKitBackForwardList.h: Added.
  • UIProcess/API/wpe/WebKitBackForwardListItem.h: Added.
  • UIProcess/API/wpe/WebKitContextMenu.h: Added.
  • UIProcess/API/wpe/WebKitContextMenuActions.h: Added.
  • UIProcess/API/wpe/WebKitContextMenuItem.h: Added.
  • UIProcess/API/wpe/WebKitCookieManager.h: Added.
  • UIProcess/API/wpe/WebKitCredential.h: Added.
  • UIProcess/API/wpe/WebKitDefines.h: Copied from Source/WebKit2/UIProcess/API/glib/WebKitPrivate.h.
  • UIProcess/API/wpe/WebKitDownload.h: Added.
  • UIProcess/API/wpe/WebKitEditingCommands.h: Added.
  • UIProcess/API/wpe/WebKitEditorState.h: Added.
  • UIProcess/API/wpe/WebKitEnumTypes.cpp.template: Added.
  • UIProcess/API/wpe/WebKitEnumTypes.h.template: Copied from Source/WebKit2/UIProcess/API/glib/WebKitNotificationPrivate.h.
  • UIProcess/API/wpe/WebKitError.h: Added.
  • UIProcess/API/wpe/WebKitFaviconDatabase.h: Added.
  • UIProcess/API/wpe/WebKitFileChooserRequest.h: Added.
  • UIProcess/API/wpe/WebKitFindController.h: Added.
  • UIProcess/API/wpe/WebKitFormSubmissionRequest.h: Added.
  • UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h: Added.
  • UIProcess/API/wpe/WebKitHitTestResult.h: Added.
  • UIProcess/API/wpe/WebKitInstallMissingMediaPluginsPermissionRequest.h: Added.
  • UIProcess/API/wpe/WebKitJavascriptResult.h: Added.
  • UIProcess/API/wpe/WebKitMimeInfo.h: Added.
  • UIProcess/API/wpe/WebKitNavigationAction.h: Added.
  • UIProcess/API/wpe/WebKitNavigationPolicyDecision.h: Added.
  • UIProcess/API/wpe/WebKitNetworkProxySettings.h: Added.
  • UIProcess/API/wpe/WebKitNotification.h: Added.
  • UIProcess/API/wpe/WebKitNotificationPermissionRequest.h: Added.
  • UIProcess/API/wpe/WebKitPermissionRequest.h: Added.
  • UIProcess/API/wpe/WebKitPlugin.h: Added.
  • UIProcess/API/wpe/WebKitPolicyDecision.h: Added.
  • UIProcess/API/wpe/WebKitResponsePolicyDecision.h: Added.
  • UIProcess/API/wpe/WebKitScriptDialog.h: Added.
  • UIProcess/API/wpe/WebKitSecurityManager.h: Added.
  • UIProcess/API/wpe/WebKitSecurityOrigin.h: Added.
  • UIProcess/API/wpe/WebKitSettings.h: Added.
  • UIProcess/API/wpe/WebKitURIRequest.h: Added.
  • UIProcess/API/wpe/WebKitURIResponse.h: Added.
  • UIProcess/API/wpe/WebKitURISchemeRequest.h: Added.
  • UIProcess/API/wpe/WebKitUserContent.h: Added.
  • UIProcess/API/wpe/WebKitUserContentManager.h: Added.
  • UIProcess/API/wpe/WebKitUserMediaPermissionRequest.h: Added.
  • UIProcess/API/wpe/WebKitWebContext.h: Added.
  • UIProcess/API/wpe/WebKitWebResource.h: Added.
  • UIProcess/API/wpe/WebKitWebView.h: Added.
  • UIProcess/API/wpe/WebKitWebViewSessionState.h: Added.
  • UIProcess/API/wpe/WebKitWebViewWPE.cpp: Added.

(webkitWebViewAuthenticate):
(webkitWebViewScriptDialog):
(webkitWebViewRunFileChooser):
(webkit_web_view_new):
(webkit_web_view_new_with_context):
(webkit_web_view_new_with_related_view):
(webkit_web_view_new_with_settings):
(webkit_web_view_new_with_user_content_manager):

  • UIProcess/API/wpe/WebKitWebsiteData.h: Added.
  • UIProcess/API/wpe/WebKitWebsiteDataManager.h: Added.
  • UIProcess/API/wpe/WebKitWindowProperties.h: Added.
  • UIProcess/API/wpe/webkit.h: Added.

Tools:

Disable geolocation because WPE doesn't implement any provider and update the style checker exceptions to
include WPE glib API files.

  • Scripts/webkitperl/FeatureList.pm:
  • Scripts/webkitpy/style/checker.py:
  • Scripts/webkitpy/style/checkers/cpp.py:

(check_identifier_name_in_declaration):

12:15 AM Changeset in webkit [218552] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

repatchIn needs to lock the CodeBlock's lock
https://bugs.webkit.org/show_bug.cgi?id=173573

Reviewed by Yusuke Suzuki.

CodeBlock::propagateTransitions and CodeBlock::visitWeakly grab the CodeBlock's
lock before modifying the StructureStubInfo/PolymorphicAccess. When regenerating
an IC, we must hold the CodeBlock's to prevent the executing thread from racing
with the marking thread. repatchIn was not grabbing the lock. I haven't been
able to get it to crash, but this is needed for the same reasons that get and put IC
regeneration grab the lock.

  • jit/Repatch.cpp:

(JSC::repatchIn):

12:11 AM Changeset in webkit [218551] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK] Upgrade to ICU to version 57.1
https://bugs.webkit.org/show_bug.cgi?id=173538

Reviewed by Žan Doberšek.

  • gtk/jhbuild.modules:
12:10 AM Changeset in webkit [218550] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

[GTK] Remove unneeded modules from the jhbuild
https://bugs.webkit.org/show_bug.cgi?id=170540

Reviewed by Michael Catanzaro.

We are building libxslt and libffi that we don't really need to build from sources.

  • gtk/jhbuild.modules:
12:04 AM Changeset in webkit [218549] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.16

Merge r218106 - [GTK] Stop dismissing menus attached to the web view for every injected event
https://bugs.webkit.org/show_bug.cgi?id=172708

Reviewed by Alex Christensen.

Source/WebKit2:

To actually simulate a right-click event we should also send the button release after the press, and let the page
handle the events in addition to sending the event to the context menu controller, like we do with normal
events. So, this is mostly the same as a real right-click event but without actually showing the menu.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::contextMenuAtPointInWindow):

Tools:

It's a workaround we added in r184015 that has worked so far for the context menu, but doesn't really work now
that we also attach popup menus to the web view. We really need to be able to show a popup menu, and then send
events while the menu is open.

  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::EventSendingController::contextClick): Use WKBundlePageCopyContextMenuAtPointInWindow() also in GTK+ port.

  • WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:

(WTR::EventSenderProxy::dispatchEvent): Stop calling PlatformWebView::dismissAllPopupMenus().

LayoutTests:

  • editing/selection/5354455-1.html: No need to click on editable area to focus it, contextClick already focuses

it, we even have another test to ensure it. Those fast clicks were causing a double click in GTK+ port which
selected the whole line. We don't need to dismiss the context menu either, because contextClick() doesn't really
show the menu.

  • fast/events/context-activated-by-key-event.html: Dismiss the context menu every time we show it.
  • fast/events/mouse-click-events.html: Dimiss the context menu when testing right click events.
12:04 AM Changeset in webkit [218548] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r215225 - [GTK] Attach popup menu to web view widget
https://bugs.webkit.org/show_bug.cgi?id=145866

Use gtk_menu_attach_to_widget() to let GTK+ know that popup menus belong to a certain web view.
This improves the positioning choices that the toolkit can do, and solves a long-standing issue
that caused long popup menus to hang outside of the available display area under Wayland.

Based on a patch by Jonas Ådahl <jadahl@gmail.com>.

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-04-11
Reviewed by Carlos Garcia Campos.

  • UIProcess/gtk/WebPopupMenuProxyGtk.cpp:

(WebKit::WebPopupMenuProxyGtk::showPopupMenu):

12:04 AM Changeset in webkit [218547] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.16

Merge r215190 - [GTK] Misplaced right click menu on web page due to deprecated gtk_menu_popup()
https://bugs.webkit.org/show_bug.cgi?id=170553

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-04-10
Reviewed by Michael Catanzaro.

Source/WebKit2:

Use gtk_menu_popup_at_pointer() and gtk_menu_popup_at_rect() when building with GTK+ 3.22 or
newer. This allows the Wayland GTK+ backend to properly position popup menus, and also avoids
using functions which were deprecated starting at that GTK+ release.

  • UIProcess/gtk/WebContextMenuProxyGtk.cpp:

(WebKit::WebContextMenuProxyGtk::show): Use gtk_menu_popup_at_pointer() as there is always a
pointer event that can be passed to it.

  • UIProcess/gtk/WebPopupMenuProxyGtk.cpp:

(WebKit::WebPopupMenuProxyGtk::showPopupMenu): Use gtk_menu_popup_at_rect(), using the coordinates
of the control passed as reference rectangle. Some conditional code is needed because with newer
GTK+ versions a relative offset instead of an absolute position is needed.

Tools:

Use gtk_menu_popup_at_pointer() and gtk_menu_popup_at_rect() when
building with GTK+ 3.22 or newer. This allows the Wayland GTK+ backend
to properly position popup menus, and also avoids using functions
which were deprecated starting at that GTK+ release.

  • MiniBrowser/gtk/BrowserSearchBar.c:

(searchEntryMenuIconPressedCallback):
Update MiniBrowser to use gtk_menu_popup_at_pointer().

12:04 AM Changeset in webkit [218546] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/LayoutTests

Merge r217554 - [GTK] Test cases for typehead in form menu lists should start from known state
https://bugs.webkit.org/show_bug.cgi?id=171792

Reviewed by Carlos Garcia Campos.

Since r215188 opening a popup menu in a form pre-selects the active
element to mimic GtkComboxBox behavior, but the layout test implicitly
assumed that type ahead search always started the beginning of the
list, which is no longer true now that GTK+ is informed of which one
is the active element.

  • platform/gtk/fast/forms/menulist-typeahead-find.html: Reset menu

list to the initial state (no element selected, unfocused) at the
beginning of testTypeAheadFunction().

12:03 AM Changeset in webkit [218545] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r215188 - [GTK] Opening a popup menu does not pre-select the active item
https://bugs.webkit.org/show_bug.cgi?id=170680

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-04-10
Reviewed by Michael Catanzaro.

  • UIProcess/gtk/WebPopupMenuProxyGtk.cpp:

(WebKit::WebPopupMenuProxyGtk::showPopupMenu): Use gtk_menu_shell_select_item() to
ensure that the active item appears selected right after popping up the menu.

Jun 19, 2017:

11:48 PM Changeset in webkit [218544] by Devin Rousso
  • 24 edits
    9 adds in trunk

Web Inspector: create canvas content view and details sidebar panel
https://bugs.webkit.org/show_bug.cgi?id=138941
<rdar://problem/19051672>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Canvas.json:
    • Add an optional nodeId attribute to the Canvas type.
    • Add requestNode command for getting the node id of the backing canvas element.
    • Add requestContent command for getting the current image content of the canvas.

Source/WebCore:

Tests: inspector/canvas/requestContent.html

inspector/canvas/requestNode.html

  • inspector/InspectorCanvasAgent.h:
  • inspector/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::requestNode):
Gets the node id of the backing canvas element.

(WebCore::InspectorCanvasAgent::requestContent):
Gets the current image content of the canvas.

(WebCore::InspectorCanvasAgent::frameNavigated):
(WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
Minor fixes from r218376 <https://webkit.org/b/172623>.

(WebCore::InspectorCanvasAgent::buildObjectForCanvas):
Optionally send the nodeId of the backing canvas element if it is available.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didCommitLoadImpl):

Source/WebInspectorUI:

  • UserInterface/Models/Canvas.js:

(WebInspector.Canvas):
(WebInspector.Canvas.fromPayload):
(WebInspector.Canvas.prototype.get displayName):
(WebInspector.Canvas.requestNode): Added.
(WebInspector.Canvas.prototype.requestContent): Added.
(WebInspector.Canvas.prototype.saveIdentityToCookie):

  • UserInterface/Controllers/CanvasManager.js:

(WebInspector.CanvasManager.prototype.canvasAdded):
(WebInspector.CanvasManager.prototype.canvasRemoved):

  • UserInterface/Models/Collection.js:
  • UserInterface/Models/Frame.js:

(WebInspector.Frame):
(WebInspector.Frame.prototype.get canvasCollection):
(WebInspector.Frame.prototype.commitProvisionalLoad):
Create a Collection for Canvas in each Frame, and modify it when canvas events are fired.

  • UserInterface/Views/CanvasContentView.css: Added.

(.content-view.canvas > .preview):
(.content-view.canvas > .preview > img):

  • UserInterface/Views/CanvasContentView.js: Added.

(WebInspector.CanvasContentView):
(WebInspector.CanvasContentView.prototype.get navigationItems):
(WebInspector.CanvasContentView.prototype.shown):
(WebInspector.CanvasContentView.prototype.hidden):
(WebInspector.CanvasContentView.prototype._showPreview):
(WebInspector.CanvasContentView.prototype._updateImageGrid):
(WebInspector.CanvasContentView.prototype._showGridButtonClicked):

  • UserInterface/Views/CanvasDetailsSidebarPanel.js: Added.

(WebInspector.CanvasDetailsSidebarPanel):
(WebInspector.CanvasDetailsSidebarPanel.prototype.inspect):
(WebInspector.CanvasDetailsSidebarPanel.prototype.get canvas):
(WebInspector.CanvasDetailsSidebarPanel.prototype.set canvas):
(WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CanvasDetailsSidebarPanel.prototype.layout):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection.this._canvas.requestNode.):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):

  • UserInterface/Views/CanvasTreeElement.js: Added.

(WebInspector.CanvasTreeElement):

  • UserInterface/Views/FrameTreeElement.js:

(WebInspector.FrameTreeElement.prototype.onattach):
(WebInspector.FrameTreeElement.prototype.ondetach):
(WebInspector.FrameTreeElement.prototype.onpopulate):
(WebInspector.FrameTreeElement.prototype._canvasWasAdded):
(WebInspector.FrameTreeElement.prototype._canvasWasRemoved):
(WebInspector.FrameTreeElement):

  • UserInterface/Base/Main.js:
  • UserInterface/Views/ContentView.js:

(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):

  • UserInterface/Views/ResourceSidebarPanel.js:

(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):

  • UserInterface/Views/ResourcesTabContentView.js:

(WebInspector.ResourcesTabContentView):
(WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
Show Canvas objects and tie them to the correct ContentView and TreeElement subclasses.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:
  • UserInterface/Images/Canvas.svg: Added.
  • UserInterface/Views/ResourceIcons.css:

(.canvas .icon):
Added new files/rules/strings related to Canvas UI.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings .navigation-bar):

  • UserInterface/Base/Setting.js:
  • UserInterface/Views/SettingsTabContentView.js:

(WebInspector.SettingsTabContentView.prototype.initialLayout):
(WebInspector.SettingsTabContentView.prototype._createGeneralSettingsView):
(WebInspector.SettingsTabContentView.prototype._createDebugSettingsView):
Add an experimental settings toggle in the Debug view for showing canvas contexts.

  • UserInterface/Views/FolderizedTreeElement.js:

(WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
Drive-by fix: ensure that sorting also includes numbers, so that 1 < 2 < 10.

  • UserInterface/Views/ImageResourceContentView.js:

(WebInspector.ImageResourceContentView.prototype.shown):
(WebInspector.ImageResourceContentView.prototype.hidden):
(WebInspector.ImageResourceContentView.prototype._updateImageGrid):
(WebInspector.ImageResourceContentView.prototype._showGridButtonClicked):
(WebInspector.ImageResourceContentView):
Drive-by fix: change the activated state of the Show Grid navigation item if it changes
in another view.

LayoutTests:

  • inspector/canvas/requestContent-expected.txt: Added.
  • inspector/canvas/requestContent.html: Added.
  • inspector/canvas/requestNode-expected.txt: Added.
  • inspector/canvas/requestNode.html: Added.
11:45 PM Changeset in webkit [218543] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16

Merge r217521 - enclosingIntRect returns a rect with -1 width/height when the input FloatRect overflows integer.
https://bugs.webkit.org/show_bug.cgi?id=172676

Reviewed by Simon Fraser.

Source/WebCore:

Clamp integer values soon after the enclosing rectangle is resolved.

  • platform/graphics/FloatRect.cpp:

(WebCore::enclosingIntRect):

Tools:

  • TestWebKitAPI/Tests/WebCore/FloatRect.cpp:

(TestWebKitAPI::TEST):

11:41 PM Changeset in webkit [218542] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r217494 - Minor clean-up related to DocumentThreadableLoader redirections
https://bugs.webkit.org/show_bug.cgi?id=172647

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-26
Reviewed by Chris Dumez.

No change of behavior.

Decrementing m_options redirect count directly instead of using an
additional counter.

To compare whether two URLs are same-origin, use scheme+host+port check
as per the spec.
This is fine as only the initial origin may have specific rules and we
are using the scheme+host+port checks when already being gone to
another origin.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::redirectReceived):

  • loader/DocumentThreadableLoader.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):

11:37 PM Changeset in webkit [218541] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r217473 - imported/w3c/web-platform-tests/html/semantics/forms/form-control-infrastructure/form_owner_and_table_2.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=172628
<rdar://problem/32418707>

Reviewed by Sam Weinig.

Source/WebCore:

In the event where a form is removed synchronously by a script during parsing,
FormAssociatedElement::m_formSetByParser may end up referring to a form that
is no longer in the document. As a result, we should make sure m_formSetByParser
is still connected in FormAssociatedElement::insertedInto() before we call
FormAssociatedElement::setForm(m_formSetByParser).

Test: fast/dom/HTMLFormElement/form-removed-during-parsing-crash.html

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::insertedInto):

LayoutTests:

Add reduced test case.

Unskip test that is no longer crashing in debug builds.

  • fast/dom/HTMLFormElement/form-removed-during-parsing-crash-expected.txt: Added.
  • fast/dom/HTMLFormElement/form-removed-during-parsing-crash.html: Added.
11:35 PM Changeset in webkit [218540] by Carlos Garcia Campos
  • 3 edits
    7 adds in releases/WebKitGTK/webkit-2.16

Merge r217472 - Frame's composited content is visible when the frame has visibility: hidden.
https://bugs.webkit.org/show_bug.cgi?id=125565
<rdar://problem/32196849>

Reviewed by Simon Fraser.

Source/WebCore:

Do not construct composited layers for hidden RenderWidgets (frameset, iframe, object).
Note that we still construct layers for the associated renderers as usual.

Tests: compositing/visibility/frameset-visibility-hidden.html

compositing/visibility/iframe-visibility-hidden.html
compositing/visibility/object-visibility-hidden.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForPlugin):
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):

LayoutTests:

  • compositing/resources/visibility.html: Added.
  • compositing/visibility/frameset-visibility-hidden-expected.html: Added.
  • compositing/visibility/frameset-visibility-hidden.html: Added.
  • compositing/visibility/iframe-visibility-hidden-expected.html: Added.
  • compositing/visibility/iframe-visibility-hidden.html: Added.
  • compositing/visibility/object-visibility-hidden-expected.html: Added.
  • compositing/visibility/object-visibility-hidden.html: Added.
11:31 PM Changeset in webkit [218539] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r217445 - DocumentThreadableLoader::redirectReceived() should not rely on the resource's loader
https://bugs.webkit.org/show_bug.cgi?id=172578
<rdar://problem/30754582>

Reviewed by Youenn Fablet.

Source/WebCore:

DocumentThreadableLoader::redirectReceived() should not rely on the resource's loader. The rest of the methods do not.
It is unsafe for it to rely on the resource's loader because it gets cleared when the load completes. A CachedRawresource
may be reused from the memory cache once its load has completed.

This would cause crashes in CachedRawResource::didAddClient() when replaying the redirects because it would call
DocumentThreadableLoader::redirectReceived() and potentially not have a loader anymore. To hit this exact code path,
you would need to make repeated XHR to a cacheable simple cross-origin resource that has cacheable redirect.

Test: http/tests/xmlhttprequest/cacheable-cross-origin-redirect-crash.html

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::redirectReceived):

  • loader/DocumentThreadableLoader.h:

LayoutTests:

Add layout test coverage.

  • http/tests/xmlhttprequest/cacheable-cross-origin-redirect-crash-expected.txt: Added.
  • http/tests/xmlhttprequest/cacheable-cross-origin-redirect-crash.html: Added.
11:24 PM Changeset in webkit [218538] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore
Merge r217441 - ASSERTION FAILED: !needsStyleRecalc()
!document().childNeedsStyleRecalc()

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

Reviewed by Brent Fulgham.

Ensure that we clean the subframe's document before start searching for a focusable element.

Covered by existing test.

  • page/FocusController.cpp:

(WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):

11:23 PM Changeset in webkit [218537] by Carlos Garcia Campos
  • 3 edits
    3 adds in releases/WebKitGTK/webkit-2.16

Merge r217439 - Crash on WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance + 1195
https://bugs.webkit.org/show_bug.cgi?id=172555
<rdar://problem/32004724>

Reviewed by Ryosuke Niwa.

Source/WebCore:

setSelectionWithoutUpdatingAppearance could dispatch a synchronous focusin event,
which could invoke an event handler that deteles the frame. Therefore, add a
protector before the call.

Test: editing/selection/select-iframe-focusin-document-crash.html

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setSelection):

LayoutTests:

  • editing/selection/resources/select-iframe-focusin-document-crash-frame.html: Added.
  • editing/selection/select-iframe-focusin-document-crash-expected.txt: Added.
  • editing/selection/select-iframe-focusin-document-crash.html: Added.
11:14 PM Changeset in webkit [218536] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r217286 - ASSERTION FAILED: !renderer().view().needsLayout() while running media/video-main-content-autoplay.html
https://bugs.webkit.org/show_bug.cgi?id=172476

Reviewed by Simon Fraser.

This patch decouples the layout call logic from the post layout task timer setup.
Just because we are switching over to asynchronous performPostLayoutTasks() it should not stop us from
running layout on a dirty tree (we could encounter a forced layout (which sets m_postLayoutTasksTimer active)
and a subsequent tree mutation during performPostLayoutTasks()).

There are a few different ways to end up here:
root layout is done -> call performPostLayoutTasks() synchronously ->

  1. tree stays clean -> no action needed.
  2. tree gets dirty -> setup performPostLayoutTasks timer -> run nested layout -> since m_postLayoutTasksTimer is active()

we don't try to run performPostLayoutTasks() while in the nested layout and we return with a clean tree.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

11:06 PM Changeset in webkit [218535] by fred.wang@free.fr
  • 5 edits
    1 copy
    3 adds
    1 delete in trunk

[iOS] Always include frames in the scrolling tree when async frame scrolling is enabled
https://bugs.webkit.org/show_bug.cgi?id=173405

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

Source/WebCore:

Currently "async frame scrolling" is ignored on iOS. This commit changes that behavior to
align on macOS and is a preliminary step to implement iframe scrolling on iOS (bug 149264).

Test: compositing/iframes/compositing-for-scrollable-iframe.html

fast/scrolling/scrolling-tree-includes-frame.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame): Do not require
compositing when "async frame scrolling" is enabled on iOS.

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebChromeClient.h: Set the ScrollableNonMainFrameTrigger bit by

default on iOS too. RenderLayerCompositor::requiresCompositingForScrollableFrame will ignore
this change when async frame scrolling is disabled.

LayoutTests:

Add some new expectations for iOS/WK2 now that the "async frame scrolling" setting is taken
into account for the layer and scrolling trees.

  • platform/ios-wk2/compositing/iframes/compositing-for-scrollable-iframe-expected.txt: Added.

A specific layer is created for the iframe.

  • platform/ios-wk2/fast/scrolling/scrolling-tree-includes-frame-expected.txt: Added.

The frame appears in the scrolling tree.

  • platform/ios/fast/scrolling/scrolling-tree-includes-frame-expected.txt: Renamed from LayoutTests/platform/ios-simulator/fast/scrolling/scrolling-tree-includes-frame-expected.txt.

Use this as a generic expectation for iOS.

11:04 PM Changeset in webkit [218534] by fred.wang@free.fr
  • 22 edits in trunk

[Mac] Add an experimental feature setting for async frame scrolling
https://bugs.webkit.org/show_bug.cgi?id=173359

Source/WebCore:

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

The necessary work to use compositing for frames and include them in the scrolling tree on
macOS was performed in r217726 and r217730. ScrollingTreeIncludesFrames was used to
determine when this behavior should be enabled. However, this does not work well on iOS where
ScrollingTreeIncludesFrames defaults to true and really means "include the frames in the
scrolling tree when necessary". Hence we instead introduce a new "async frame scrolling"
switch to enable the behavior on macOS, which will also be used in a follow-up commit on iOS.
This new setting is also made an "experimental feature", so that it will be more convenient
for developer to try it.

Test: compositing/iframes/compositing-for-scrollable-iframe.html

fast/scrolling/scrolling-tree-includes-frame.html

  • page/Settings.in: Declare new setting for async frame scrolling.
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView): Also include frames in
scrolling tree when async frame scrolling is enabled.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame): Rely on async frame
scrolling to decide when compositing is needed.

Source/WebKit/mac:

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

  • WebView/WebPreferenceKeysPrivate.h: Declare key for async frame scrolling preference.
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]): Initialize async frame scrolling preference to false.
(-[WebPreferences asyncFrameScrollingEnabled]): Define getter for async frame scrolling.
(-[WebPreferences setAsyncFrameScrollingEnabled:]): Define setter for async frame scrolling.

  • WebView/WebPreferencesPrivate.h: Declare setter and getter.
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]): Take into account preference update for async frame
scrolling.

Source/WebKit2:

Reviewed by Simon Fraser.

  • Shared/WebPreferencesDefinitions.h: Add experimental feature "async frame scrolling".
  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleSetAsyncFrameScrollingEnabled): Add setter for async frame scrolling.

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Declare setter.
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setAsyncFrameScrollingEnabled): Add setter for async frame scrolling.

  • WebProcess/InjectedBundle/InjectedBundle.h: Declare setter.
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Take into account preference update for async frame
scrolling.

Tools:

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures): Do not enable async frame scrolling for now.
(resetWebPreferencesToConsistentValues): Disable async frame scrolling by default.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting): Initalize to async frame scrolling to false.

LayoutTests:

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-19
Reviewed by Simon Fraser.

  • compositing/iframes/compositing-for-scrollable-iframe.html: Use "async frame scrolling" for

this test.

  • fast/scrolling/scrolling-tree-includes-frame.html: Ditto.
11:00 PM Changeset in webkit [218533] by zandobersek@gmail.com
  • 2 edits
    2 adds in trunk/LayoutTests

[WebCrypto] Add test for ECDH SPKI imports using the ecDH algorithm identifier
https://bugs.webkit.org/show_bug.cgi?id=173543

Reviewed by Jiewen Tan.

Add the ecdh-import-spki-key-ecdh-identifier.html layout test which
tests for successful import of EC keys through the SPKI format when
using the ecDH algorithm identifier (OID 1.3.132.1.12) and following
the ECDH algorithm import steps.

No implementation supports this yet, so the test is skipped on all ports.

  • TestExpectations:
  • crypto/subtle/ecdh-import-spki-key-ecdh-identifier-expected.txt: Added.
  • crypto/subtle/ecdh-import-spki-key-ecdh-identifier.html: Added.
10:19 PM Changeset in webkit [218532] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

AX: Remove redundant AXObjectCache::textChanged(RenderObject*).
https://bugs.webkit.org/show_bug.cgi?id=173579
<rdar://problem/32865367>

Reviewed by Antti Koivisto.

All calls go through textChanged(Node*) method.

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

(WebCore::AXObjectCache::getOrCreate):

9:20 PM Changeset in webkit [218531] by Darin Adler
  • 1 edit in trunk/Source/WebKit2/ChangeLog

fixed change log

9:18 PM Changeset in webkit [218530] by Darin Adler
  • 17 edits
    2 deletes in trunk/Source

Merge MediaDevicesRequest and MediaDevicesEnumerationRequest to tighten up code and object lifetime
https://bugs.webkit.org/show_bug.cgi?id=173527

Reviewed by Sam Weinig.

Source/WebCore:

  • CMakeLists.txt: Removed MediaDevicesRequest.cpp.
  • Modules/mediastream/MediaDeviceInfo.cpp:

(WebCore::MediaDeviceInfo::MediaDeviceInfo): Removed unneeded ScriptExecutionContext.
(WebCore::MediaDeviceInfo::create): Ditto.

  • Modules/mediastream/MediaDeviceInfo.h: Removed unnecessary derivation from

ContextDestructionObserver and ScriptExecutionContext arguments. Also removed
unused MediaDeviceInfoVector typedef.

  • Modules/mediastream/MediaDeviceInfo.idl: Added ImplementationLacksVTable.
  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::enumerateDevices): Call MediaDevicesEnumerationRequest
directly here instead of going through MediaDevicesRequest.

  • Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Moved code from

MediaDevicesRequest in here. Put the typical counts at the top of the file.
(WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest):
Marked inline and changed to take a DOM promise directly rather than having
a separate class do the mapping to DOM promises.
(WebCore::MediaDevicesEnumerationRequest::start): Replaced the create function
with this. The caller doesn't actually keep a reference to the object.
Added a FIXME about the behavior, not new, where we neither resolve nor reject
the promise if there is no page object present. Updated to use the new version
of UserMediaController::from.
(WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest):
Added a FIXME about the issue that we don't resolve or reject the promise if
the client drops the last reference to the request without calling setDeviceInfo.
(WebCore::MediaDevicesEnumerationRequest::document): Added. Private helper.
Returns nullptr if the request is no longer active.
(WebCore::MediaDevicesEnumerationRequest::frame): Added. For use by a caller
that was getting to the frame. Uses the document function so it will return
nullptr if the request is no longer active.
(WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin): Changed
to do the work using the document function.
(WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin): Ditto.
(WebCore::MediaDevicesEnumerationRequest::contextDestroyed): Simplified. We
now can simply set a boolean when the context is destroyed, so there are no
side effects and the code is simpler.
(WebCore::removeAtypicalDevices): Renamed and tightened up the code a bit.
(WebCore::MediaDevicesEnumerationRequest::setDeviceInfo): Moved the code
here from MediaDevicesEnumerationRequest to pass the devices along.

  • Modules/mediastream/MediaDevicesEnumerationRequest.h: Made the

ContextDestructionObserver use private inheritance. Cut down the includes
and removed various unneeded functions.

  • Modules/mediastream/MediaDevicesRequest.cpp: Removed.
  • Modules/mediastream/MediaDevicesRequest.h: Removed.
  • Modules/mediastream/UserMediaController.cpp:

(WebCore::UserMediaController::UserMediaController): Use reference rather
than pointer for the client.
(WebCore::UserMediaController::~UserMediaController): Ditto.
(WebCore::provideUserMediaTo): Ditto.

  • Modules/mediastream/UserMediaController.h:

Changed constructor to take a refeference, removed client function, and
changed data member to be a reference rather than a pointer.
(WebCore::UserMediaController::from): Take and return a reference rather
than taking a pointer that is checked for null.
(WebCore::UserMediaController::requestUserMediaAccess): Use reference.
(WebCore::UserMediaController::cancelUserMediaAccessRequest): Ditto.
(WebCore::UserMediaController::enumerateMediaDevices): Ditto.
(WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): Ditto.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::start): Updated to use the new version
of UserMediaController::from.

  • WebCore.xcodeproj/project.pbxproj: Updated for file removals.
  • testing/Internals.cpp: Removed unneeded include of UserMediaController.h.

Source/WebKit2:

  • UIProcess/API/C/WKUserMediaPermissionCheck.h: Fixed incorrect file name in comment.
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::enumerateMediaDevices): Use the new frame
function from MediaDevicesEnumerationRequest rather than finding the frame with our
own code.

8:25 PM Changeset in webkit [218529] by weinig@apple.com
  • 10 edits
    3 adds in trunk/Source/WebCore

[WebIDL] Move Touch related bindings in Document to their own IDL file
https://bugs.webkit.org/show_bug.cgi?id=173521

Reviewed by Alex Christensen.

Rather than #including in the middle of an IDL file, this moves the touch related
bindings in Document.idl to a new partial interface for Document in DocumentTouch.idl.
While here, remove the custom binding for createTouchList.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:

Add new files.

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::createTouchList): Deleted.
Remove createTouchList. It can be generated now.

  • dom/Document.cpp:

(WebCore::Document::createTouch): Deleted.

  • dom/Document.h:

Move touch related bindings code to DocumentTouch.h/cpp.
Remove DocumentIOSForward as it is no longer needed.

  • dom/Document.idl:

Move touch related bindings to DocumentTouch.idl

  • dom/DocumentTouch.h: Added.
  • dom/DocumentTouch.cpp: Added.

(WebCore::DocumentTouch::createTouch):
Moved from Document.

(WebCore::DocumentTouch::createTouchList):
Added to aid generated binding.

  • dom/DocumentTouch.idl: Added.

Moved operations from Document.h

  • dom/TouchList.h:

(WebCore::TouchList::create):
(WebCore::TouchList::TouchList):
Added create that works with the bindings.

  • dom/ios/TouchEvents.cpp:

Add DocumentTouchIOS.h and sort.

8:17 PM Changeset in webkit [218528] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

Regression(r217570): com.apple.WebKit.Networking crash at com.apple.WebKit: WebKit::ChildProcess::didReceiveInvalidMessage (Breaks 32-bit apps)
https://bugs.webkit.org/show_bug.cgi?id=173576
<rdar://problem/32416291>

Reviewed by Tim Horton.

The IPC encoding / decoding code cannot be architecture-specific because a 32bit UIProcess
talks to a 64bit NetworkProcess. The WEB_RTC build time flag is enabled on 64bit only.
Therefore, we should not use #if ENABLE(WEB_RTC) in IPC encoding / decoding code.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
8:14 PM Changeset in webkit [218527] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for ARM

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::internalCompare32):

7:59 PM Changeset in webkit [218526] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

[WTF] Include execinfo.h and dlfcn.h based on platform defines
https://bugs.webkit.org/show_bug.cgi?id=173531

Reviewed by Alex Christensen.

execinfo.h and dlfcn.h can be missing in some libc libraries.
When including it, we should honor platform defines like HAVE(DLADDR).

  • wtf/StackTrace.cpp:
7:46 PM Changeset in webkit [218525] by Yusuke Suzuki
  • 6 edits
    5 adds in trunk

[DFG] More ArrayIndexOf fixups for various types
https://bugs.webkit.org/show_bug.cgi?id=173176

Reviewed by Saam Barati.

JSTests:

  • stress/array-indexof-arraystorage.js: Added.

(shouldBe):
(indexOfInt32Other):
(indexOfInt32Cell):
(indexOfInt32Boolean):
(indexOfDoubleOther):
(indexOfDoubleCell):
(indexOfDoubleBoolean):
(indexOfInt32):
(indexOfDouble):

  • stress/array-indexof-constant-folding.js: Added.

(shouldBe):
(indexOfInt32Other):
(indexOfInt32Cell):
(indexOfInt32Boolean):
(indexOfDoubleOther):
(indexOfDoubleCell):
(indexOfDoubleBoolean):

  • stress/array-indexof-hole-and-other.js: Added.

(shouldBe):
(indexOf):

  • stress/array-indexof-other.js: Added.

(shouldBe):
(indexOfInt32):
(indexOfDouble):
(indexOfString):
(indexOfObject):

  • stress/array-indexof-symbol.js: Added.

(shouldBe):
(indexOfInt32):
(indexOfDouble):
(indexOfString):
(indexOfObject):

Source/JavaScriptCore:

This patch further expands coverage of ArrayIndexOf optimization in DFG and FTL.

  1. We attempt to fold ArrayIndexOf to constant (-1) if we know that its array

never contains the given search value.

  1. We support Symbol and Other specialization additionally. Especially, Other is

useful because null/undefined can be used as a sentinel value.

One interesting thing is that Array.prototype.indexOf does not consider holes as
undefineds. Thus,

var array = [,];
array.indexOf(undefined); => -1

This can be trivially achieved in JSC because Empty and Undefined are different values.

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArrayIndexOf):
(JSC::DFG::SpeculativeJIT::speculateOther):

  • dfg/DFGSpeculativeJIT.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArrayIndexOf):

7:28 PM Changeset in webkit [218524] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

[Cocoa] The system Japanese font cannot be italicized
https://bugs.webkit.org/show_bug.cgi?id=173300
<rdar://problem/31805407>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Items in the system font cascade list may lie about whether or not they support italics.
In order to get the truth, we need to use the physical font underlying the font in question,
because this one won't lie. Then, we can interrogate this physical font about its traits
in order to synthesize italics correctly.

Test: fast/text/system-font-japanese-synthetic-italic.html

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::lookupFallbackFont):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationCoreText::fontRanges):

LayoutTests:

  • fast/text/system-font-japanese-synthetic-italic-expected-mismatch.html: Added.
  • fast/text/system-font-japanese-synthetic-italic.html: Added.
  • platform/mac/TestExpectations: This codepath doesn't work in El Capitan.
6:47 PM Changeset in webkit [218523] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[cURL] Move file scope static variables into function scopes
https://bugs.webkit.org/show_bug.cgi?id=173567

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-19
Reviewed by Alex Christensen.

  • platform/network/curl/SSLHandle.cpp:

(WebCore::allowedHosts):
(WebCore::allowedClientHosts):
(WebCore::allowsAnyHTTPSCertificateHosts):
(WebCore::addAllowedClientCertificate):
(WebCore::setSSLClientCertificate):
(WebCore::sslIgnoreHTTPSCertificate):
(WebCore::certVerifyCallback):

6:23 PM Changeset in webkit [218522] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Unreviewed, partial rollout of r218501 to address crashes on iOS.

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::tryAppLink):

6:17 PM Changeset in webkit [218521] by Devin Rousso
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: Unify contextmenu items for all node links/previews
https://bugs.webkit.org/show_bug.cgi?id=173187

Reviewed by Joseph Pecoraro.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/ContextMenuUtilities.js:

(WebInspector.appendContextMenuItemsForDOMNode.didGetFunctionDetails): Added.
(WebInspector.appendContextMenuItemsForDOMNode.didGetProperty): Added.
(WebInspector.appendContextMenuItemsForDOMNode.didResolveNode): Added.
(WebInspector.appendContextMenuItemsForDOMNode): Added.

  • UserInterface/Views/DOMTreeElement.js:

(WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
(WebInspector.DOMTreeElement.prototype._showCustomElementDefinition): Deleted.

  • UserInterface/Views/DOMTreeOutline.js:

(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.revealElement): Deleted.
(WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement): Deleted.
(WebInspector.DOMTreeOutline.prototype._populateContextMenu): Deleted.

  • UserInterface/Views/RulesStyleDetailsPanel.js:

(WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
Unify common DOM node context menu actions into a single helper function.

  • UserInterface/Base/DOMUtilities.js:

(WebInspector.linkifyNodeReference):
(WebInspector.linkifyNodeReferenceElement):
Rework parameters to use options dictionary.

6:04 PM Changeset in webkit [218520] by guijemont@igalia.com
  • 2 edits in trunk/Tools

Unreviewed, adding myself to contributors.json

  • Scripts/webkitpy/common/config/contributors.json:
5:50 PM Changeset in webkit [218519] by Caio Lima
  • 2 edits in trunk/Source/JavaScriptCore

[ARMv6][DFG] ARM MacroAssembler is always emitting cmn when immediate is 0
https://bugs.webkit.org/show_bug.cgi?id=172972

Reviewed by Mark Lam.

We are changing internalCompare32 implementation in ARM
MacroAssembler to emit "cmp" when the "right.value" is 0.
It is generating wrong comparison cases, since the
semantics of cmn is opposite of cmp[1]. One case that it's breaking is
"branch32(MacroAssembler::Above, gpr, TrustedImm32(0))", where ends
resulting in following assembly code:

`
cmn $r0, #0
bhi <address>
`

However, as cmn is similar to "adds", it will never take the branch
when $r0 > 0. In that case, the correct opcode is "cmp". With this
patch we will fix current broken tests that uses
"branch32(MacroAssembler::Above, gpr, TrustedImm32(0))",
such as ForwardVarargs, Spread and GetRestLength.

[1] - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204j/Cihiddid.html

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::internalCompare32):

4:53 PM Changeset in webkit [218518] by commit-queue@webkit.org
  • 8 edits in trunk/LayoutTests

Improve debugging ability of some webrtc tests
https://bugs.webkit.org/show_bug.cgi?id=173549

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-19
Reviewed by Eric Carlson.

Improve debugging ability for first two tests.
Improve reliability for the next three tests.

  • webrtc/audio-replace-track-expected.txt:
  • webrtc/audio-replace-track.html: Checking connected state.
  • webrtc/video-mute-expected.txt:
  • webrtc/video-mute.html: Ditto.
  • webrtc/video-replace-track-to-null.html: Improving reliability of test.
  • webrtc/video-rotation.html: Adding some delay before testing black frames and increasing delay between the tests..
  • webrtc/video-unmute.html: Using counter based testing of black frames.
4:51 PM Changeset in webkit [218517] by Darin Adler
  • 17 edits
    3 adds
    1 delete in trunk

[Cocoa] implement URLSession:task:needNewBodyStream: delegate method
https://bugs.webkit.org/show_bug.cgi?id=173551
rdar://problem/32250512

Source/WebCore:

Reviewed by Alex Christensen.

Covered by http/tests/misc/form-blob-challenge.html

  • WebCore.xcodeproj/project.pbxproj: Removed NSURLRequestSPI.h.
  • platform/network/cf/FormDataStreamCFNet.cpp:

(WebCore::createHTTPBodyCFReadStream): Factored this out from setHTTPBody.
(WebCore::setHTTPBody): Factored out the function above.

  • platform/network/cf/FormDataStreamCFNet.h: Added createHTTPBodyCFReadStream.
  • platform/network/cocoa/ResourceRequestCocoa.mm: Use CFNetworkSPI.h.
  • platform/network/ios/ResourceRequestIOS.mm: Ditto.
  • platform/network/mac/FormDataStreamMac.h: Added createHTTPBodyNSInputStream.
  • platform/network/mac/FormDataStreamMac.mm:

(WebCore::createHTTPBodyNSInputStream): Added/

  • platform/network/mac/ResourceHandleMac.mm: Use CFNetworkSPI.h.
  • platform/network/mac/ResourceRequestMac.mm: Ditto.
  • platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Ditto.
  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: Ditto.
  • platform/network/mac/WebCoreURLResponse.h: Moved SPI declarations from

here into CFNetworkSPI.h.

  • platform/spi/cf/CFNetworkSPI.h: Use #pragma once, consolidated SPI that was

defined in scattered locations.

  • platform/spi/cocoa/NSURLRequestSPI.h: Removed. Superceded by CFNetworkSPI.h.

Source/WebKit2:

Reviewed by Alex Christensen.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate existingTask:]): Added helper method.
(-[WKNetworkSessionDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:]):
Updated to use existingTask: method.
(-[WKNetworkSessionDelegate URLSession:task:needNewBodyStream:]): Added.
(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
Updated to use existingTask: method.
(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveData:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]): Ditto.
(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Ditto.
(WebKit::globalAllowsCellularAccess): Deleted. Just use a normal global.
(WebKit::globalLegacyCustomProtocolManager): Deleted. Just use a normal global.
(WebKit::NetworkSessionCocoa::setLegacyCustomProtocolManager): Updated for normal global.
(WebKit::NetworkSessionCocoa::setAllowsCellularAccess): Ditto.
(WebKit::NetworkSessionCocoa::defaultSession): Ditto.
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa): Ditto.

LayoutTests:

Reviewed by Alex Christensen.

  • http/tests/misc/form-blob-challenge-expected.txt: Added.
  • http/tests/misc/form-blob-challenge.html: Added.
  • http/tests/misc/resources/basic-echo-post.php: Added.
4:19 PM Changeset in webkit [218516] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

Various IndexedDB crashes as an after effect of previous test.
<rdar://problem/31418761> and https://bugs.webkit.org/show_bug.cgi?id=170436

Reviewed by Chris Dumez.

No new test (No consistent test possible, in practice covered by all existing IDB tests)

This is timing related, where a UniqueIDBDatabase can be destroyed on the main thread while
it still has one task left to try to execute on the IDBServer thread.

The background thread tasks don't Ref<> the UniqueIDBDatabase, so even though task execution
took a Ref<> protector, there was still a small window for a race.

Should be closed up by making the background thread tasks themselves protect this.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):
(WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
(WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask):
(WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
4:08 PM Changeset in webkit [218515] by jmarcell@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

3:47 PM Changeset in webkit [218514] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Adjusted test ecpectaions for webrtc/libwebrtc/descriptionGetters.html.
https://bugs.webkit.org/show_bug.cgi?id=171703

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:25 PM Changeset in webkit [218513] by jmarcell@apple.com
  • 1 copy in tags/Safari-603.3.6

Tag Safari-603.3.6.

3:04 PM Changeset in webkit [218512] by commit-queue@webkit.org
  • 20 edits
    1 add in trunk

test262: Completion values for control flow do not match the spec
https://bugs.webkit.org/show_bug.cgi?id=171265

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-06-19
Reviewed by Saam Barati.

JSTests:

  • stress/completion-value.js:

Condensed test for completion values in top level statements.

  • stress/super-get-by-id.js:

ClassDeclaration when evaled no longer produce values. Convert
these to ClassExpressions so they produce the class value.

  • ChakraCore/test/GlobalFunctions/evalreturns3.baseline-jsc:

This is a progression for currect spec behavior.

  • mozilla/mozilla-tests.yaml:

This test is now outdated, so mark it as failing for that reason.

  • test262.yaml:

Passing all "cptn" completion value tests.

Source/JavaScriptCore:

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::shouldBeConcernedWithCompletionValue):
When we care about having proper completion values (global code
in programs, modules, and eval) insert undefined results for
control flow statements.

  • bytecompiler/NodesCodegen.cpp:

(JSC::SourceElements::emitBytecode):
Reduce writing a default undefined value to the completion result to
only once before the last statement we know will produce a value.

(JSC::IfElseNode::emitBytecode):
(JSC::WithNode::emitBytecode):
(JSC::WhileNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitBytecode):
(JSC::ForOfNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
Insert an undefined to handle cases where code may break out of an
if/else or with statement (break/continue).

(JSC::TryNode::emitBytecode):
Same handling for break cases. Also, finally block statement completion
values are always ignored for the try statement result.

(JSC::ClassDeclNode::emitBytecode):
Class declarations, like function declarations, produce an empty result.

  • parser/Nodes.cpp:

(JSC::SourceElements::lastStatement):
(JSC::SourceElements::hasCompletionValue):
(JSC::SourceElements::hasEarlyBreakOrContinue):
(JSC::BlockNode::lastStatement):
(JSC::BlockNode::singleStatement):
(JSC::BlockNode::hasCompletionValue):
(JSC::BlockNode::hasEarlyBreakOrContinue):
(JSC::ScopeNode::singleStatement):
(JSC::ScopeNode::hasCompletionValue):
(JSC::ScopeNode::hasEarlyBreakOrContinue):
The only non-trivial cases need to loop through their list of statements
to determine if this has a completion value or not. Likewise for
determining if there is an early break / continue, meaning a break or
continue statement with no preceding statement that has a completion value.

  • parser/Nodes.h:

(JSC::StatementNode::next):
(JSC::StatementNode::hasCompletionValue):
Helper to check if a statement nodes produces a completion value or not.

Tools:

  • Scripts/run-jsc-stress-tests:

Include a :failDueToOutdatedOrBadTest to mark failures with justification.

LayoutTests:

  • js/eval-throw-return-expected.txt:
  • js/kde/completion-expected.txt:
  • js/kde/script-tests/completion.js:
  • js/script-tests/eval-throw-return.js:
  • sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A9-expected.txt:
  • sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.3_The_for_Statement/S12.6.3_A9.1-expected.txt:

Rebaseline expectations. These are all outdated. In fact the sputnik
tests were imported into test262 and modified for ES2015.

  • js/script-tests/function-toString-vs-name.js:

ClassDeclarations on their own don't produce a value. So output
the class value so the test behaves as expected.

2:55 PM Changeset in webkit [218511] by commit-queue@webkit.org
  • 7 edits
    1 copy
    4 adds in trunk

[WebIDL] Add support for serializers that have members that are themselves serializers (or inherit being a serializer from a parent)
https://bugs.webkit.org/show_bug.cgi?id=173395

Patch by Sam Weinig <sam@webkit.org> on 2017-06-19
Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/css/DOMQuad-serialization.html

  • bindings/scripts/CodeGenerator.pm:

(InheritsSerializable):
Helper to determine if an interface inherits from any interfaces
that are serializable. This is necessary because an attribute is
serializable even if its interface is not marked as serializable.

(IsSerializableAttribute):
Check ancestor interfaces as well to determine serializability.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateSerializerDefinition):
Specialize attributes that are serializable interfaces to call its interfaces
serialize function, thus allowing nested objects to be serialized.

  • dom/DOMQuad.idl:

Add serializer.

  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: Added.
  • bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h: Added.
  • bindings/scripts/test/TestSerialization.idl:
  • bindings/scripts/test/TestSerializationIndirectInheritance.idl: Added.

Add and update tests.

LayoutTests:

  • fast/css/DOMQuad-serialization-expected.txt: Added.
  • fast/css/DOMQuad-serialization.html: Added.

Add test for DOMQuad serialization, now that it is supported.

2:27 PM Changeset in webkit [218510] by commit-queue@webkit.org
  • 16 edits
    1 delete in trunk

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

"It would break internal builds" (Requested by youenn on
#webkit).

Reverted changeset:

"[WebRTC] Prevent capturing at unconventional resolutions when
using the SW encoder on Mac"
https://bugs.webkit.org/show_bug.cgi?id=172602
http://trac.webkit.org/changeset/218505

2:22 PM Changeset in webkit [218509] by Alan Bujtas
  • 4 edits in trunk

Opening certain mails brings up a mail that grows indefinitely.
https://bugs.webkit.org/show_bug.cgi?id=173562
<rdar://problem/32766579>

Reviewed by Tim Horton.

Source/WebCore:

This reverts the logic where m_autoSizeContentSize always reflects the final layout's.
When the ICB's height is 100%, it causes infinite recursion.
See also webkit.org/b/173561.

  • page/FrameView.cpp:

(WebCore::FrameView::autoSizeIfEnabled):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm:

(TEST):

2:12 PM Changeset in webkit [218508] by Wenson Hsieh
  • 10 edits
    1 add in trunk

[iOS DnD] Support .zip archives for file uploads via drag and drop
https://bugs.webkit.org/show_bug.cgi?id=173511
<rdar://problem/32521025>

Reviewed by Tim Horton.

Source/WebCore:

Allows dropped .zip archives to be uploaded as files by accepting types conforming to either
"public.zip-archive" or "public.content" as potential file types. Initially, I opted to accept the more general
"public.data" type; however, this includes UTIs such as "public.url" that should not be represented as files, so
this is a more targeted fix that allows us to very easily add additional content types in the future by adding
more types to supportedFileUploadPasteboardTypes.

Tests:
DataInteractionTests.ExternalSourceZIPArchiveToUploadArea
DataInteractionTests.ExternalSourceZIPArchiveAndURLToSingleFileInput

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::updateSupportedTypeIdentifiersForDragHandlingMethod):

  • platform/Pasteboard.h:
  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::read):
(WebCore::Pasteboard::supportedWebContentPasteboardTypes):
(WebCore::Pasteboard::supportedFileUploadPasteboardTypes):

Rename supportedPasteboardTypes to supportedWebContentPasteboardTypes, and also introduce
supportedFileUploadPasteboardTypes which returns an list of types, such that if a type conforms to any type in
this array, that type may be represented as a file. So far, this list contains "public.content" and
"public.zip-archive".

(WebCore::Pasteboard::types):
(WebCore::Pasteboard::supportedPasteboardTypes): Deleted.

  • platform/ios/WebItemProviderPasteboard.mm:

(typeConformsToTypes):

Remove -typeIsAppropriateForSupportedTypes: and replace it with typeConformsToTypes. Use this both when
determining the number of files on the pasteboard, and when determining preferred UTIs to load when dropping.

(-[WebItemProviderPasteboard numberOfFiles]):
(-[WebItemProviderPasteboard typeIdentifierToLoadForRegisteredTypeIdentfiers:]):
(-[WebItemProviderPasteboard typeIsAppropriateForSupportedTypes:]): Deleted.

  • platform/mac/DragDataMac.mm:

(WebCore::DragData::containsFiles):

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::supportedFileUploadPasteboardTypes):

Tools:

Adds tests for dropping .zip archives into a JavaScript-based file upload area, as well as into a file input.
Also verifies that URLs are not handled as file drops. See WebCore ChangeLog for more details.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/compressed-files.zip: Added.
  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(testZIPArchive):
(TestWebKitAPI::TEST):

2:01 PM Changeset in webkit [218507] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[WebIDL] Remove custom binding for Document.getCSSCanvasContext()
https://bugs.webkit.org/show_bug.cgi?id=173516

Patch by Sam Weinig <sam@webkit.org> on 2017-06-19
Reviewed by Chris Dumez.

  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::visitAdditionalChildren):
(WebCore::JSDocument::getCSSCanvasContext): Deleted.

  • dom/Document.cpp:

(WebCore::Document::getCSSCanvasContext):

  • dom/Document.h:
  • dom/Document.idl:

Use a Variant to pass the context and type to the bindings.

1:54 PM Changeset in webkit [218506] by Ryan Haddad
  • 5 edits in trunk/Source/WebKit2

Unreviewed, rolling out r218503.

This change broke the macOS Sierra build.

Reverted changeset:

"Removed unused lambda captures from WebKit2"
https://bugs.webkit.org/show_bug.cgi?id=173555
http://trac.webkit.org/changeset/218503

1:42 PM Changeset in webkit [218505] by commit-queue@webkit.org
  • 16 edits
    3 adds in trunk

[WebRTC] Prevent capturing at unconventional resolutions when using the SW encoder on Mac
https://bugs.webkit.org/show_bug.cgi?id=172602
<rdar://problem/32407693>

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-19
Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Adding a parameter to disable hardware encoder.

  • Source/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.h:
  • Source/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_encoder.mm:

(webrtc::H264VideoToolboxEncoder::CreateCompressionSession):

Source/WebCore:

Test: platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html

Add internal API to switch on/off hardware H264 encoder.
Add checks for standard size. If using a software encoder and frame size is not standard,
the session is destroyed and no frame is sent at all.

Added tests based on captureStream.
Fixed the case of capturing a canvas which size is changing.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:

(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasResized):

  • platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.h:
  • platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.mm:

(WebCore::H264VideoToolboxEncoder::setHardwareEncoderForWebRTCAllowed):
(WebCore::H264VideoToolboxEncoder::hardwareEncoderForWebRTCAllowed):
(WebCore::isUsingSoftwareEncoder):
(WebCore::H264VideoToolboxEncoder::CreateCompressionSession):
(isStandardFrameSize): Added.
(isUsingSoftwareEncoder): Added.

  • testing/Internals.cpp:

(WebCore::Internals::setH264HardwareEncoderAllowed):

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

LayoutTests:

  • platform/mac-wk1/TestExpectations: Mark captureCanvas as flaky due to AVDCreateGPUAccelerator: Error loading GPU renderer" appearing on some bots.
  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder-expected.txt: Copied from LayoutTests/webrtc/captureCanvas-webrtc-expected.txt.
  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html: Added.
  • webrtc/captureCanvas-webrtc-expected.txt:
  • webrtc/captureCanvas-webrtc.html:
1:25 PM Changeset in webkit [218504] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit2

[iOS DnD] [WK2] Add an internal hook to change the drag lift delay
https://bugs.webkit.org/show_bug.cgi?id=173523
<rdar://problem/32224510>

Reviewed by Tim Horton.

Add a new private property on WKWebViewConfiguration, _dragLiftDelay, for changing the UIDragInteraction's lift
delay to one of three values: short, medium or long. The short setting simply uses UIKit's default drag lift
delay (at the time of writing, this is 325ms); medium and long are 500ms and 650ms, respectively.

In combination with an internal switch to toggle between lift delays, the purpose of this change is to make it
easier to choose a drag lift delay for web content that doesn't easily cause unintended dragging while panning.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(toDragLiftDelay):

Converts an integer (e.g. retrieved from user defaults) to a drag lift delay type.

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration encodeWithCoder:]):
(-[WKWebViewConfiguration initWithCoder:]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _dragLiftDelay]):

Add boilerplate plumbing for the _dragLiftDelay setting.

(-[WKWebViewConfiguration _setDragLiftDelay:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Add _dragLiftDelay to as a private property of WKWebViewConiguration.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dragLiftDelay]):

Convert the web view configuration's _WKDragLiftDelay to an actual time interval.

(-[WKContentView setupDataInteractionDelegates]):

1:14 PM Changeset in webkit [218503] by Konstantin Tokarev
  • 5 edits in trunk/Source/WebKit2

Removed unused lambda captures from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=173555

Reviewed by Alex Christensen.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::fetchWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteData):
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):

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

Cleanup IconLoader stuff when a DocumentLoader detaches from its frame.
<rdar://problem/31418761> and https://bugs.webkit.org/show_bug.cgi?id=173473

Reviewed by Alex Christensen.

No new tests (No known change in behavior)

I discovered the need to make these changes here due to a transient bug
introduced in r218015 but already explicitly fixed in r218409.

This change adds an assert to guard against a detached DocumentLoader having active IconLoaders.

It also clears out all pending IconLoader and icon load decisions when stopLoading() is called,
as even attempting to start an icon load after detachment is a waste of cycles.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::stopLoading): Also explicitly clear all IconLoaders and icons pending

load decision.

(WebCore::DocumentLoader::finishedLoadingIcon): Assert that this DocumentLoader is not detached.

12:53 PM Changeset in webkit [218501] by Chris Dumez
  • 77 edits in trunk/Source

Use WTF::Function instead of std::function in more places in WebCore/
https://bugs.webkit.org/show_bug.cgi?id=173535

Reviewed by Antti Koivisto.

Use WTF::Function instead of std::function in more places in WebCore/ to avoid copying.

Source/WebCore:

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::matchedParent):

  • accessibility/AccessibilityObject.h:
  • animation/DocumentAnimation.cpp:

(WebCore::DocumentAnimation::getAnimations):

  • animation/DocumentAnimation.h:

(WebCore::DocumentAnimation::getAnimations):

  • contentextensions/CombinedURLFilters.cpp:

(WebCore::ContentExtensions::CombinedURLFilters::processNFAs):

  • contentextensions/CombinedURLFilters.h:
  • contentextensions/DFACombiner.cpp:

(WebCore::ContentExtensions::DFACombiner::combineDFAs):

  • contentextensions/DFACombiner.h:
  • css/CSSCrossfadeValue.cpp:

(WebCore::CSSCrossfadeValue::traverseSubresources):

  • css/CSSCrossfadeValue.h:
  • css/CSSFilterImageValue.cpp:

(WebCore::CSSFilterImageValue::traverseSubresources):

  • css/CSSFilterImageValue.h:
  • css/CSSFontFaceSrcValue.cpp:

(WebCore::CSSFontFaceSrcValue::traverseSubresources):

  • css/CSSFontFaceSrcValue.h:
  • css/CSSImageSetValue.cpp:

(WebCore::CSSImageSetValue::traverseSubresources):

  • css/CSSImageSetValue.h:
  • css/CSSImageValue.cpp:

(WebCore::CSSImageValue::traverseSubresources):

  • css/CSSImageValue.h:
  • css/CSSValue.cpp:

(WebCore::CSSValue::traverseSubresources):

  • css/CSSValue.h:
  • css/CSSValueList.cpp:

(WebCore::CSSValueList::traverseSubresources):

  • css/CSSValueList.h:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::traverseSubresources):

  • css/StyleProperties.h:
  • css/StyleSheetContents.cpp:

(WebCore::traverseSubresourcesInRules):
(WebCore::StyleSheetContents::traverseSubresources):

  • css/StyleSheetContents.h:
  • dom/Element.cpp:

(WebCore::Element::getAnimations):

  • editing/TextIterator.cpp:

(WebCore::findPlainTextMatches):
(WebCore::findClosestPlainText):
(WebCore::findPlainText):

  • editing/mac/DictionaryLookup.h:
  • editing/mac/DictionaryLookup.mm:

(WebCore::showPopupOrCreateAnimationController):
(WebCore::DictionaryLookup::showPopup):
(WebCore::DictionaryLookup::animationControllerForPopup):

  • fileapi/AsyncFileStream.cpp:

(WebCore::AsyncFileStream::perform):
(WebCore::AsyncFileStream::getSize):
(WebCore::AsyncFileStream::openForRead):
(WebCore::AsyncFileStream::read):

  • fileapi/AsyncFileStream.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
(WebCore::HTMLMediaElement::setVideoFullscreenLayer):

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
(WebCore::HTMLMediaElement::setVideoFullscreenLayer):

  • loader/EmptyClients.cpp:

(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):

  • loader/FrameLoaderClient.h:
  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::create):

  • loader/archive/cf/LegacyWebArchive.h:
  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::forEachResource):
(WebCore::MemoryCache::forEachSessionResource):

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

(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::showModalDialog):

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

(WebCore::FrameView::applyRecursivelyWithVisibleRect):

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

(WebCore::Page::forEachPage):
(WebCore::Page::decrementNestedRunLoopCount):
(WebCore::Page::whenUnnested):

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

(WebCore::WheelEventTestTrigger::clearAllTestDeferrals):
(WebCore::WheelEventTestTrigger::setTestCallbackAndStartNotificationTimer):
(WebCore::WheelEventTestTrigger::triggerTestTimerFired):

  • page/WheelEventTestTrigger.h:
  • page/WindowFeatures.cpp:

(WebCore::processFeaturesString):

  • page/WindowFeatures.h:
  • page/cocoa/ResourceUsageOverlayCocoa.mm:

(WebCore::RingBuffer::forEach):

  • platform/cocoa/WebVideoFullscreenModelVideoElement.h:

(WebCore::WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
(WebCore::WebVideoFullscreenModelVideoElement::waitForPreparedForInlineThen):

  • platform/cocoa/WebVideoFullscreenModelVideoElement.mm:

(WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
(WebVideoFullscreenModelVideoElement::waitForPreparedForInlineThen):

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::setVideoFullscreenLayer):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayer::setVideoFullscreenLayer):

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::setVideoFullscreenLayer):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer):

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

(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchWillSubmitForm):
(WebFrameLoaderClient::setUpPolicyListener):
(-[WebFramePolicyListener initWithFrame:policyFunction:]):
(-[WebFramePolicyListener initWithFrame:policyFunction:appLinkURL:]):

Source/WebKit/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchWillSubmitForm):
(WebFrameLoaderClient::setUpPolicyListener):
(WebFrameLoaderClient::receivedPolicyDecision):

  • WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::setUpPolicyListener):
(WebKit::WebFrame::invalidatePolicyListener):

  • WebProcess/WebPage/WebFrame.h:
11:41 AM Changeset in webkit [218500] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html.

Unreviewed test gardening.

  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
11:21 AM Changeset in webkit [218499] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

[WK2] Add WKProcessPool SPI to efficiently reset all plugin load client policies
https://bugs.webkit.org/show_bug.cgi?id=173472
<rdar://problem/28858817>

Reviewed by Antti Koivisto.

Follow-up to r218419 to avoid copying the HashMap unnecessarily.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::resetPluginLoadClientPolicies):

  • UIProcess/WebProcessPool.h:
10:44 AM Changeset in webkit [218498] by Chris Dumez
  • 12 edits in trunk/Source/WebCore

Use WTF::Function instead of std::function in WebCore/Modules
https://bugs.webkit.org/show_bug.cgi?id=173534

Reviewed by Alex Christensen.

Use WTF::Function instead of std::function in WebCore/Modules to avoid
copying.

  • Modules/applepay/PaymentCoordinatorClient.h:
  • Modules/encryptedmedia/CDM.h:
  • Modules/encryptedmedia/legacy/LegacyCDM.cpp:

(WebCore::CDMFactory::CDMFactory):
(WebCore::CDM::registerCDMFactory):

  • Modules/encryptedmedia/legacy/LegacyCDM.h:
  • Modules/mediasession/MediaSession.cpp:

(WebCore::MediaSession::changeActiveMediaElements):
(WebCore::MediaSession::safelyIterateActiveMediaElements):

  • Modules/mediasession/MediaSession.h:
  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::matchTransceiver):

  • Modules/mediastream/MediaStreamRegistry.cpp:

(WebCore::MediaStreamRegistry::forEach):

  • Modules/mediastream/MediaStreamRegistry.h:
10:12 AM Changeset in webkit [218497] by commit-queue@webkit.org
  • 37 edits
    3 adds in trunk

A cloned MediaStreamTrack should mute independently other tracks using the same source
https://bugs.webkit.org/show_bug.cgi?id=172831
<rdar://problem/32518527>

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-19
Reviewed by Eric Carlson.

Source/WebCore:

Test: webrtc/clone-audio-track.html

Move enabled handling in MediaStreamTrackPrivate instead of RealtimeMediaSource.
Move WebRTC and WebAudio customers of RealtimeMediaSource to MediaStreamTrackPrivate.
Move creation of WebAudio provider to MediaStreamTrackPrivate.

This allows changing some parameters of tracks having the same source independently.
Using this for enabled track attribute.

We no longer stop generating frames in case track is disabled.
This should be added back as an optimization in a follow-up.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::addTrack):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::replaceTrack):

  • Modules/webaudio/MediaStreamAudioSource.cpp:
  • Modules/webaudio/MediaStreamAudioSource.h:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::create):
(WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::setEnabled):
(WebCore::MediaStreamTrackPrivate::audioSourceProvider):
(WebCore::MediaStreamTrackPrivate::videoSampleAvailable):
(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable):

  • platform/mediastream/MediaStreamTrackPrivate.h:

(WebCore::MediaStreamTrackPrivate::Observer::audioSamplesAvailable):

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::removeObserver):

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/mac/AVMediaCaptureSource.h:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::stopProducingData):

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

(WebCore::MockRealtimeAudioSourceMac::render):

  • platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:

(WebCore::RealtimeIncomingAudioSource::~RealtimeIncomingAudioSource):
(WebCore::RealtimeIncomingAudioSource::OnData):

  • platform/mediastream/mac/RealtimeIncomingAudioSource.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::pixelBufferFromVideoFrame):

  • platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:

(WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
(WebCore::RealtimeOutgoingAudioSource::setSource):

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

(WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::setSource):
(WebCore::RealtimeOutgoingVideoSource::initializeFromSource):

  • platform/mediastream/mac/RealtimeOutgoingVideoSource.h:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:

(WebCore::WebAudioSourceProviderAVFObjC::create):
(WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::setClient):
(WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::generateFrame):

  • platform/spi/cocoa/PassKitSPI.h:

Source/WebKit2:

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::setStorage):

LayoutTests:

  • webrtc/clone-audio-track.html: Added.
  • webrtc/video-disabled-black.html:
  • webrtc/video-unmute-expected.txt:
  • webrtc/video-unmute.html:
10:01 AM Changeset in webkit [218496] by Darin Adler
  • 11 edits in trunk

Fix Ref to deref before assignment, add tests for this to RefPtr, Ref, Function
https://bugs.webkit.org/show_bug.cgi?id=173526

Reviewed by Sam Weinig.

Source/WTF:

  • wtf/Ref.h: Changed operator= to not be defined inside the class definition.

Added swap functions. Changed operator= implementations to use swap in the
conventional manner, the same way that RefPtr does.

Tools:

  • TestWebKitAPI/CMakeLists.txt: Added Function.cpp.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
  • TestWebKitAPI/Tests/WTF/Function.cpp: Added. Contains basic tests and some

tests for assignment before destruction ones.

  • TestWebKitAPI/Tests/WTF/MoveOnly.h: Added a () operator so this can be used

as a function, so it can be used in WTF::Function tests.

  • TestWebKitAPI/Tests/WTF/Ref.cpp: Use EXPECT macros insead of ASSERT.

Added tests for swap and for assignment before deref.

  • TestWebKitAPI/Tests/WTF/RefLogger.cpp: Stopped using inlining; no good reason

to inline everything. Also removed the unnecessary clearing of the log every time
the DerivedRefLogger constructor is called.

  • TestWebKitAPI/Tests/WTF/RefLogger.h: Ditto.
  • TestWebKitAPI/Tests/WTF/RefPtr.cpp: Use EXPECT macros instead of ASSERT.

Added tests for assignment before deref and similar for releaseNonNull.

9:47 AM Changeset in webkit [218495] by commit-queue@webkit.org
  • 34 edits in trunk

[WebIDL] Properly model buffer source / typed arrays as their own IDL types
https://bugs.webkit.org/show_bug.cgi?id=173513

Patch by Sam Weinig <sam@webkit.org> on 2017-06-19
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf.https-expected.txt:

Update results for changed exception language.

Source/WebCore:

  • Adds IDL type hierarchy for buffer source types.
  • Includes a special type, IDLArrayBufferView, which WebIDL defines as the union of DataView and all the typed array types, but we model as shared base class. This should not be observable, and allows us to avoid using a Variant for ArrayBufferView and instead use the existing base class.
  • Add builtin typedefs for BufferSource and DOMTimeStamp as defined in WebIDL. As noted above, rather than define a typedef of ArrayBufferView that maps to a union, we treat it as a special type.
  • bindings/IDLTypes.h:

Add type hierarchy for buffer source types.

  • IDLBufferSource is the root
  • IDLArrayBuffer, IDLArrayBufferView, IDLDataView, IDLTypedArray derive from it.
  • And then the specific typed array types derive from IDLTypedArray, and are defined in JSDOMConvertBufferSource so we don't have to include a ton of typed array includes in this file, as they cannot be forward declared.
  • bindings/js/JSDOMConvertBufferSource.h:

(WebCore::Detail::BufferSourceConverter::convert):
(WebCore::Converter<IDLArrayBuffer>::convert):
(WebCore::JSConverter<IDLArrayBuffer>::convert):
(WebCore::Converter<IDLDataView>::convert):
(WebCore::JSConverter<IDLDataView>::convert):
(WebCore::Converter<IDLInt8Array>::convert):
(WebCore::JSConverter<IDLInt8Array>::convert):
(WebCore::Converter<IDLInt16Array>::convert):
(WebCore::JSConverter<IDLInt16Array>::convert):
(WebCore::Converter<IDLInt32Array>::convert):
(WebCore::JSConverter<IDLInt32Array>::convert):
(WebCore::Converter<IDLUint8Array>::convert):
(WebCore::JSConverter<IDLUint8Array>::convert):
(WebCore::Converter<IDLUint16Array>::convert):
(WebCore::JSConverter<IDLUint16Array>::convert):
(WebCore::Converter<IDLUint32Array>::convert):
(WebCore::JSConverter<IDLUint32Array>::convert):
(WebCore::Converter<IDLUint8ClampedArray>::convert):
(WebCore::JSConverter<IDLUint8ClampedArray>::convert):
(WebCore::Converter<IDLFloat32Array>::convert):
(WebCore::JSConverter<IDLFloat32Array>::convert):
(WebCore::Converter<IDLFloat64Array>::convert):
(WebCore::JSConverter<IDLFloat64Array>::convert):
(WebCore::Converter<IDLArrayBufferView>::convert):
(WebCore::JSConverter<IDLArrayBufferView>::convert):
Add native and javascript conversion for all the new types.

  • bindings/js/JSDOMConvertUnion.h:

Add support for steps 7, 8, and 9 of the union conversion algorithm now that
buffer source types are properly modeled.

  • bindings/js/JSSubtleCryptoCustom.cpp:
  • bindings/js/JSWebKitSubtleCryptoCustom.cpp:

Replace use of now repurposed IDLBufferSource, with its definition, IDLUnion<IDLArrayBufferView, IDLArrayBuffer>.

  • bindings/scripts/CodeGenerator.pm:

(IsBufferSourceType):
Renamed from IsTypedArrayType.

(IsNonPointerType): Deleted.
Was only used by DumpRenderTree and WebKitTestRunner generators. They have
been switched to the equivalent IsPrimitiveType.

(IsTypedArrayType): Deleted.
Renamed to IsBufferSourceType.

(IsRefPtrType): Deleted. Unused.

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType):
(AddClassForwardIfNeeded):
(GetArgumentExceptionFunction):
(GetAttributeExceptionFunction):
(PassArgumentExpression):
(GenerateDefaultValue):
(GenerateOverloadDispatcher):
(ShouldPassArgumentByReference):
(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
Update for rename of IsTypedArrayType -> IsBufferSourceType and remove specialized BufferSource
condition.

(GetBaseIDLType):
Add mappings for new buffer source types.

  • bindings/scripts/IDLParser.pm:

(Parse):
Insert builtin typedefs to the typedef map before parsing.

(addBuiltinTypedefs):
Generate typedefs for BufferSource and DOMTimeStamp as specified by WebIDL.

(applyTypedefs):
Add support for applying typedefs to iterable and maplike, necessary now because BufferSource
is used as the key to iterable in MediaKeyStatusMap.idl

  • bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
  • bindings/scripts/test/JS/JSTestCallbackInterface.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
  • bindings/scripts/test/JS/JSTestVoidCallbackFunction.h:

Update test results.

  • bindings/scripts/test/TestTypedefs.idl:

Add tests for builtin typedefs.

  • Modules/geolocation/Geoposition.idl:
  • dom/Event.idl:
  • fileapi/Blob.idl:
  • fileapi/File.idl:
  • page/FrameView.h:
  • xml/XMLHttpRequest.idl:

Remove typedef for DOMTimeStamp and BufferSource which are now automatically included.

Tools:

  • DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
  • WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:

Replace IsNonPointerType subroutine with IsPrimitiveType so we can remove IsNonPointerType.

LayoutTests:

  • crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt:
  • crypto/subtle/hkdf-derive-bits-malformed-parametrs-expected.txt:
  • crypto/subtle/pbkdf2-derive-bits-malformed-parametrs-expected.txt:

Update results for changed exception language.

9:34 AM Changeset in webkit [218494] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] fast/dom/assign-to-window-status.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=173512

Reviewed by Alex Christensen.

We should not dump status callbacks when test is done.

  • DumpRenderTree/win/UIDelegate.cpp:

(UIDelegate::setStatusText):

8:50 AM Changeset in webkit [218493] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening

Unmarked a bunch of http multimedia tests that were failing with gst 1.6.3.
We're now depending on 1.10.4 and these are passing. Also marked as slow
a couple more.

  • platform/gtk/TestExpectations:
6:22 AM Changeset in webkit [218492] by zandobersek@gmail.com
  • 2 edits in trunk/LayoutTests

Unreviewed GTK+ gardening.

Enable RSA-PSS tests on the GTK+ port. Tests covering this Web Crypto
algorithm are skipped on all platforms, but since the libgcrypt-based
implementation is operating properly, we can enable the majority of
these tests for GTK+. The tests that remain skipped cover SPKI and
PKCS#8 import and export capabilities that still have to be landed.

WPE will enable these tests in a separate patch.

  • platform/gtk/TestExpectations:
6:09 AM Changeset in webkit [218491] by clopez@igalia.com
  • 2 edits in trunk/Tools

[WPE][JHBuild] Update WPEBackend-mesa
https://bugs.webkit.org/show_bug.cgi?id=173433

Unreviewed.

Update WPEBackend-mesa back (like it was done originally in r218344)
after fixing the issue with the DISPLAY environment variables that
caused the crashes.

  • wpe/jhbuild.modules:
6:01 AM Changeset in webkit [218490] by clopez@igalia.com
  • 1 edit
    1 move in trunk/Tools

Rename unit test file after r218482
https://bugs.webkit.org/show_bug.cgi?id=173483

Unreviewed.

  • Scripts/webkitpy/port/waylanddriver_unittest.py: Renamed from Tools/Scripts/webkitpy/port/wayland_unittest.py.
5:54 AM Changeset in webkit [218489] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix wrong style checker condition added in r218487.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_identifier_name_in_declaration):

5:51 AM Changeset in webkit [218488] by Adrian Perez de Castro
  • 14 edits in trunk

Missing <functional> includes make builds fail with GCC 7.x
https://bugs.webkit.org/show_bug.cgi?id=173544

Unreviewed gardening.

Fix compilation with GCC 7.

Source/JavaScriptCore:

  • API/tests/CompareAndSwapTest.cpp:
  • runtime/VMEntryScope.h:

Source/WebCore:

  • Modules/mediastream/MediaStreamRegistry.h:
  • animation/DocumentAnimation.h:
  • page/WheelEventTestTrigger.h:
  • page/csp/ContentSecurityPolicy.h:
  • platform/Timer.h:
  • platform/graphics/gstreamer/MainThreadNotifier.h:
  • platform/network/NetworkStorageSession.h:

Tools:

  • TestWebKitAPI/Tests/WTF/HashSet.cpp:
  • TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.h:
5:45 AM Changeset in webkit [218487] by Carlos Garcia Campos
  • 8 edits
    126 moves
    3 adds in trunk

[GTK] Move GTK+ API files that could be shared to glib dirs
https://bugs.webkit.org/show_bug.cgi?id=173545

Reviewed by Žan Doberšek.

Source/WebCore/platform/gtk/po:

Update paths on files with translatable string.

  • POTFILES.in:

Source/WebKit2:

Most of the files don't use GTK+ at all, or only for a few things that could be ifdefed. Public headers can
never be shared, so move only private headers and cpp files. This patch moves the files without any
modification to make everything easier, in follow up commits we will add the required ifdefs and refactorings to
ensure the code can actually be shared.

  • PlatformGTK.cmake:
  • Shared/API/glib/WebKitContextMenu.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenu.cpp.
  • Shared/API/glib/WebKitContextMenuActions.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuActions.cpp.
  • Shared/API/glib/WebKitContextMenuActionsPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h.
  • Shared/API/glib/WebKitContextMenuItem.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItem.cpp.
  • Shared/API/glib/WebKitContextMenuItemPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuItemPrivate.h.
  • Shared/API/glib/WebKitContextMenuPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuPrivate.h.
  • Shared/API/glib/WebKitHitTestResult.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResult.cpp.
  • Shared/API/glib/WebKitHitTestResultPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitHitTestResultPrivate.h.
  • Shared/API/glib/WebKitURIRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURIRequest.cpp.
  • Shared/API/glib/WebKitURIRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURIRequestPrivate.h.
  • Shared/API/glib/WebKitURIResponse.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURIResponse.cpp.
  • Shared/API/glib/WebKitURIResponsePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURIResponsePrivate.h.
  • UIProcess/API/glib/WebKitAuthenticationRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequest.cpp.
  • UIProcess/API/glib/WebKitAuthenticationRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitAuthenticationRequestPrivate.h.
  • UIProcess/API/glib/WebKitAutomationSession.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitAutomationSession.cpp.
  • UIProcess/API/glib/WebKitAutomationSessionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitAutomationSessionPrivate.h.
  • UIProcess/API/glib/WebKitBackForwardList.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardList.cpp.
  • UIProcess/API/glib/WebKitBackForwardListItem.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp.
  • UIProcess/API/glib/WebKitBackForwardListPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListPrivate.h.
  • UIProcess/API/glib/WebKitContextMenuClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.cpp.
  • UIProcess/API/glib/WebKitContextMenuClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.h.
  • UIProcess/API/glib/WebKitCookieManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp.
  • UIProcess/API/glib/WebKitCookieManagerPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCookieManagerPrivate.h.
  • UIProcess/API/glib/WebKitCredential.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCredential.cpp.
  • UIProcess/API/glib/WebKitCredentialPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCredentialPrivate.h.
  • UIProcess/API/glib/WebKitCustomProtocolManagerClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp.
  • UIProcess/API/glib/WebKitCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h.
  • UIProcess/API/glib/WebKitDownload.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitDownload.cpp.
  • UIProcess/API/glib/WebKitDownloadClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitDownloadClient.cpp.
  • UIProcess/API/glib/WebKitDownloadClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitDownloadClient.h.
  • UIProcess/API/glib/WebKitDownloadPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitDownloadPrivate.h.
  • UIProcess/API/glib/WebKitEditorState.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitEditorState.cpp.
  • UIProcess/API/glib/WebKitEditorStatePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitEditorStatePrivate.h.
  • UIProcess/API/glib/WebKitError.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitError.cpp.
  • UIProcess/API/glib/WebKitFaviconDatabase.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp.
  • UIProcess/API/glib/WebKitFaviconDatabasePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h.
  • UIProcess/API/glib/WebKitFileChooserRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequest.cpp.
  • UIProcess/API/glib/WebKitFileChooserRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h.
  • UIProcess/API/glib/WebKitFindController.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp.
  • UIProcess/API/glib/WebKitFormClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFormClient.cpp.
  • UIProcess/API/glib/WebKitFormClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFormClient.h.
  • UIProcess/API/glib/WebKitFormSubmissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp.
  • UIProcess/API/glib/WebKitFormSubmissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h.
  • UIProcess/API/glib/WebKitGeolocationPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp.
  • UIProcess/API/glib/WebKitGeolocationPermissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h.
  • UIProcess/API/glib/WebKitGeolocationProvider.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.cpp.
  • UIProcess/API/glib/WebKitGeolocationProvider.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.h.
  • UIProcess/API/glib/WebKitInjectedBundleClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitInjectedBundleClient.cpp.
  • UIProcess/API/glib/WebKitInjectedBundleClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitInjectedBundleClient.h.
  • UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequest.cpp.
  • UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitInstallMissingMediaPluginsPermissionRequestPrivate.h.
  • UIProcess/API/glib/WebKitJavascriptResult.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitJavascriptResult.cpp.
  • UIProcess/API/glib/WebKitJavascriptResultPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitJavascriptResultPrivate.h.
  • UIProcess/API/glib/WebKitLoaderClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp.
  • UIProcess/API/glib/WebKitLoaderClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.h.
  • UIProcess/API/glib/WebKitMimeInfo.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitMimeInfo.cpp.
  • UIProcess/API/glib/WebKitMimeInfoPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitMimeInfoPrivate.h.
  • UIProcess/API/glib/WebKitNavigationAction.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNavigationAction.cpp.
  • UIProcess/API/glib/WebKitNavigationActionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNavigationActionPrivate.h.
  • UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp.
  • UIProcess/API/glib/WebKitNavigationPolicyDecisionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h.
  • UIProcess/API/glib/WebKitNetworkProxySettings.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNetworkProxySettings.cpp.
  • UIProcess/API/glib/WebKitNetworkProxySettingsPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNetworkProxySettingsPrivate.h.
  • UIProcess/API/glib/WebKitNotification.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotification.cpp.
  • UIProcess/API/glib/WebKitNotificationPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationPermissionRequest.cpp.
  • UIProcess/API/glib/WebKitNotificationPermissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationPermissionRequestPrivate.h.
  • UIProcess/API/glib/WebKitNotificationPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationPrivate.h.
  • UIProcess/API/glib/WebKitNotificationProvider.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationProvider.cpp.
  • UIProcess/API/glib/WebKitNotificationProvider.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitNotificationProvider.h.
  • UIProcess/API/glib/WebKitPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPermissionRequest.cpp.
  • UIProcess/API/glib/WebKitPlugin.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPlugin.cpp.
  • UIProcess/API/glib/WebKitPluginPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPluginPrivate.h.
  • UIProcess/API/glib/WebKitPolicyClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.cpp.
  • UIProcess/API/glib/WebKitPolicyClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.h.
  • UIProcess/API/glib/WebKitPolicyDecision.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPolicyDecision.cpp.
  • UIProcess/API/glib/WebKitPolicyDecisionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h.
  • UIProcess/API/glib/WebKitPrivate.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.cpp.
  • UIProcess/API/glib/WebKitPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h.
  • UIProcess/API/glib/WebKitResponsePolicyDecision.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp.
  • UIProcess/API/glib/WebKitResponsePolicyDecisionPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h.
  • UIProcess/API/glib/WebKitScriptDialog.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitScriptDialog.cpp.
  • UIProcess/API/glib/WebKitScriptDialogPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitScriptDialogPrivate.h.
  • UIProcess/API/glib/WebKitSecurityManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSecurityManager.cpp.
  • UIProcess/API/glib/WebKitSecurityManagerPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSecurityManagerPrivate.h.
  • UIProcess/API/glib/WebKitSecurityOrigin.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSecurityOrigin.cpp.
  • UIProcess/API/glib/WebKitSecurityOriginPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSecurityOriginPrivate.h.
  • UIProcess/API/glib/WebKitSettings.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp.
  • UIProcess/API/glib/WebKitSettingsPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitSettingsPrivate.h.
  • UIProcess/API/glib/WebKitUIClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp.
  • UIProcess/API/glib/WebKitUIClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.h.
  • UIProcess/API/glib/WebKitURISchemeRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp.
  • UIProcess/API/glib/WebKitURISchemeRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h.
  • UIProcess/API/glib/WebKitUserContent.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserContent.cpp.
  • UIProcess/API/glib/WebKitUserContentManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserContentManager.cpp.
  • UIProcess/API/glib/WebKitUserContentManagerPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserContentManagerPrivate.h.
  • UIProcess/API/glib/WebKitUserContentPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserContentPrivate.h.
  • UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp.
  • UIProcess/API/glib/WebKitUserMediaPermissionRequestPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitUserMediaPermissionRequestPrivate.h.
  • UIProcess/API/glib/WebKitWebContext.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp.
  • UIProcess/API/glib/WebKitWebContextPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h.
  • UIProcess/API/glib/WebKitWebResource.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebResource.cpp.
  • UIProcess/API/glib/WebKitWebResourcePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebResourcePrivate.h.
  • UIProcess/API/glib/WebKitWebView.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp.
  • UIProcess/API/glib/WebKitWebViewPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h.
  • UIProcess/API/glib/WebKitWebViewSessionState.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewSessionState.cpp.
  • UIProcess/API/glib/WebKitWebViewSessionStatePrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewSessionStatePrivate.h.
  • UIProcess/API/glib/WebKitWebsiteData.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebsiteData.cpp.
  • UIProcess/API/glib/WebKitWebsiteDataManager.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebsiteDataManager.cpp.
  • UIProcess/API/glib/WebKitWebsiteDataManagerPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebsiteDataManagerPrivate.h.
  • UIProcess/API/glib/WebKitWebsiteDataPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebsiteDataPrivate.h.
  • UIProcess/API/glib/WebKitWindowProperties.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWindowProperties.cpp.
  • UIProcess/API/glib/WebKitWindowPropertiesPrivate.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h.
  • WebProcess/InjectedBundle/API/glib/WebKitConsoleMessage.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessage.cpp.
  • WebProcess/InjectedBundle/API/glib/WebKitConsoleMessagePrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitConsoleMessagePrivate.h.
  • WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp.
  • WebProcess/InjectedBundle/API/glib/WebKitFramePrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h.
  • WebProcess/InjectedBundle/API/glib/WebKitScriptWorld.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp.
  • WebProcess/InjectedBundle/API/glib/WebKitScriptWorldPrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h.
  • WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebEditor.cpp.
  • WebProcess/InjectedBundle/API/glib/WebKitWebEditorPrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebEditorPrivate.h.
  • WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp.
  • WebProcess/InjectedBundle/API/glib/WebKitWebExtensionPrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h.
  • WebProcess/InjectedBundle/API/glib/WebKitWebHitTestResult.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp.
  • WebProcess/InjectedBundle/API/glib/WebKitWebHitTestResultPrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h.
  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp.
  • WebProcess/InjectedBundle/API/glib/WebKitWebPagePrivate.h: Renamed from Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h.

Tools:

Update paths of GTK+ API in watchlist and style checker.

  • Scripts/webkitpy/common/config/watchlist:
  • Scripts/webkitpy/style/checker.py:
  • Scripts/webkitpy/style/checkers/cpp.py:

(check_identifier_name_in_declaration):

5:44 AM Changeset in webkit [218486] by Claudio Saavedra
  • 3 edits in trunk/LayoutTests

[GTK] Rebaseline js/dom/dom-static-property-for-in-iteration.html
https://bugs.webkit.org/show_bug.cgi?id=133868

Unreviewed gardening

This test needs expectations to be updated after changes to DOM
static properties. Update and unskip.

  • platform/gtk/TestExpectations: Unskip.
  • platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt:
5:03 AM Changeset in webkit [218485] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebCore

Unreviewed build fix after r218484.

Source/WebCore:

Properly access the GCryptCipherOperation type (now CipherOperation)
in the PAL::GCrypt namespace. This somehow worked in local builds.

  • crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp:

(WebCore::callOperation):
(WebCore::gcryptAES_CTR):

Source/WebCore/PAL:

  • pal/crypto/gcrypt/Utilities.h: Drop the GCrypt prefix from the

GCryptCipherOperation type definition, since it's already nested
in the PAL::GCrypt namespace.

4:56 AM Changeset in webkit [218484] by zandobersek@gmail.com
  • 6 edits in trunk

[GCrypt] AES_CTR support
https://bugs.webkit.org/show_bug.cgi?id=171420

Reviewed by Michael Catanzaro.

Source/WebCore:

Implement AES_CTR support for build configurations that use libgcrypt.

Both encryption and decryption operations are handled in a single gcryptAES_CTR() function,
with the specific operation being passed as the first argument. The appropriate AES
algorithm is picked, and a gcry_cipher_hd_t object is created and has the given key set.
This key will remain the same throughout the gcry_cipher_hd_t lifetime, even after
gcry_cipher_reset() calls.

The encrypt/decrypt operation is wrapped into a helper lambda functor that accepts the
given counter and input data. It resets the cipher object, sets the counter data, and
performs the specified operation, returning the output data.

libgcrypt doesn't support setting counter data on a gcry_cipher_hd_t object with only
part of that data being used as the actual counter, with the rest acting as a nonce, like
the Web Crypto specification allows. We have to implement the support for that on our own.

We compute the number of blocks we'll be processing and the upper exclusive limit for the
given counter length. We immediately bail if the counter limit is less than the computed
block count, since that would mean that the counter values would be repeated.

We short-cut to a direct operation call if the counter length matches size of the counter
data -- we don't have to adjust the counter data in any way if that's the case.

Otherwise we move counter data into the MPI format. The nonce and the actual counter MPIs
can split out of the counter data MPI with the modulus operation and the counter limit MPI.

We take another shortcut straight to the operation call if we're able to determine that the
'counter leeway' value, i.e. the difference between the initial counter MPI and the counter
limit MPI, is larger or equal to the predicted block size -- if that's the case, the counter
won't wrap around and change the nonce data.

In worst-case scenario the counter data will wrap around and we have to address that. The
current implementation takes the slowest possible path for the moment, encrypting/decrypting
each block separately. For each step the counter is combined with the nonce, the resulting
MPI data retrieved and passed to the operation function, and the returned block output
appended to the final output vector. The counter MPI is then incremented and ran through the
modulus operation, limiting the MPI value to the previously-computed counter limit.

No new tests -- relevant tests are passing and are unskipped.

  • crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp:

(WebCore::callOperation):
(WebCore::gcryptAES_CTR):
(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

Source/WebCore/PAL:

  • pal/crypto/gcrypt/Utilities.h: Add a GCryptCipherOperation type alias that can be used

for the gcry_cipher_decrypt or gcry_cipher_encrypt function pointers.

LayoutTests:

  • platform/gtk/TestExpectations: Unskip the relevant AES_CTR tests.
4:39 AM Changeset in webkit [218483] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Layout Test imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-createOffer.html crashes
https://bugs.webkit.org/show_bug.cgi?id=173456

Unreviewed gardening.

Patch by Fujii Hironori <Fujii Hironori> on 2017-06-19

  • platform/gtk/TestExpectations: Marked

imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-createOffer.html,
webrtc/createOfferAnswer.html and webrtc/video-addTransceiver.html Crash.

3:39 AM Changeset in webkit [218482] by clopez@igalia.com
  • 9 edits
    2 adds in trunk/Tools

Port setup_environ_for_server should not set environment variables related with the driver.
https://bugs.webkit.org/show_bug.cgi?id=173483

Reviewed by Carlos Garcia Campos.

The port setup_environ_for_server() should not set environment variables
that depend on the type of driver (like DISPLAY or GDK_BACKEND).
This varibles should be only set on the driver setup_environ_for_test().

This causes that (for example) the variable DISPLAY or XAUTHORITY leaks
into the test environment even when running the tests with a driver
that is not the Xorg or Xvfb one.

  • Scripts/webkitpy/port/base.py: Stop setting XAUTHORITY and DISPLAY here.

(Port.to.setup_environ_for_server):

  • Scripts/webkitpy/port/driver.py: Remove unneded WEBKIT_OUTPUTDIR that is already set on base.py

(Driver._setup_environ_for_driver):

  • Scripts/webkitpy/port/driver_unittest.py:

(DriverTest.test_setup_environ_for_test):
(DriverTest):
(DriverTest.test_setup_environ_base_vars):

  • Scripts/webkitpy/port/gtk.py: Stop setting GDK_BACKEND here and do that on the driver (Xvfb).

(GtkPort.setup_environ_for_server):

  • Scripts/webkitpy/port/wayland_unittest.py: Added.

(WaylandDriverTest):
(WaylandDriverTest.make_driver):
(WaylandDriverTest.make_environment):
(WaylandDriverTest.test_checkdriver):
(WaylandDriverTest.test_environment_needed_variables):
(WaylandDriverTest.test_environment_forbidden_variables):
(WaylandDriverTest.test_environment_optional_variables):

  • Scripts/webkitpy/port/waylanddriver.py: Allow the driver to run also with WAYLAND_SOCKET.

(WaylandDriver.check_driver):
(WaylandDriver._setup_environ_for_test):

  • Scripts/webkitpy/port/xorgdriver.py:

(XorgDriver.check_driver):
(XorgDriver._setup_environ_for_test):

  • Scripts/webkitpy/port/xorgdriver_unittest.py: Added.

(XorgDriverTest):
(XorgDriverTest.make_driver):
(XorgDriverTest.make_environment):
(XorgDriverTest.test_checkdriver):
(XorgDriverTest.test_environment_needed_variables):
(XorgDriverTest.test_environment_forbidden_variables):
(XorgDriverTest.test_environment_optional_variables):

  • Scripts/webkitpy/port/xvfbdriver.py:

(XvfbDriver._setup_environ_for_test):

  • Scripts/webkitpy/port/xvfbdriver_unittest.py:

(XvfbDriverTest.assertDriverStartSuccessful):

3:03 AM Changeset in webkit [218481] by Claudio Saavedra
  • 4 edits in trunk/LayoutTests

[GTK][WPE] Rebaseline after r218458

Unreviewed gardening.

Add new DOMQuad attribute to the test expectations.

  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/wpe/js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • platform/wpe/js/dom/global-constructors-attributes-expected.txt:
12:41 AM Changeset in webkit [218480] by commit-queue@webkit.org
  • 65 edits
    2 adds in trunk

Add heuristic to avoid flattening "fullscreen" iframes
https://bugs.webkit.org/show_bug.cgi?id=171914

Patch by Frederic Wang <fwang@igalia.com> on 2017-05-14
Reviewed by Simon Fraser.

Source/WebCore:

Some authors implement fullscreen popups as out-of-flow iframes with size set to full viewport (using vw/vh CSS units).
When iframe flattening is enabled, such iframes may unexpectedly become larger than the viewport.
This commit adds a simple heuristic to avoid frame flattening in that case.
It is experimented by introducing a "enable for non-fullscreen iframes" state for the frame
flattening setting.
The default frame flattening is still either disabled or (fully) enabled on all platforms.
InternalSettings is also adjusted so that the tests can still set the frame flattening setting.

Test: fast/frames/flattening/iframe-flattening-fullscreen.html

  • page/FrameView.cpp:

(WebCore::FrameView::frameFlatteningEnabled): Use the frame flattening enum setting.

  • page/Settings.h: Define a frame flattening enum that includes a "enable for non-fullscreen

iframes" state.

  • page/Settings.in: Redefine frame flattening using that enum.
  • rendering/RenderFrameSet.cpp:

(WebCore::RenderFrameSet::flattenFrameSet): Use the frame flattening enum setting.

  • rendering/RenderIFrame.cpp:

(WebCore::RenderIFrame::isFullScreenIFrame): Add a heuristic when partial frame flattening
is enabled setting is enabled.
There is not a strict comparison against the viewport size since authors may not exactly use
100vw/100vh.
Anyway, it is hard to do such comparison using the resolved width & height on RenderStyle.
(WebCore::RenderIFrame::flattenFrame): Add a comment for the existing "zero size" heuristic.
Use isFullScreenIFrame heuristic.

  • rendering/RenderView.cpp:

(WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower): Use the frame flattening enum setting.

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup): Add backup for frame flattening.
(WebCore::InternalSettings::Backup::restoreTo): Ditto.
(WebCore::internalSettingsToWebCoreValue): Helper function to cast the frame flattening values.
(WebCore::InternalSettings::setFrameFlattening): Redefine setFrameFlattening to accept an enum.

  • testing/InternalSettings.h: Define new enum & setter for frame flattening as well as a backup value.
  • testing/InternalSettings.idl: Define new enum & setter for frame flattening.

Source/WebKit/mac:

This commit adjusts the mac/ios preference interface to treat frame flattening as an enum.

  • WebView/WebPreferenceKeysPrivate.h: Rename the key.
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]): Handle frame flattening as an enum.
(-[WebPreferences isFrameFlatteningEnabled]): Ditto.
(-[WebPreferences setFrameFlatteningEnabled:]): Ditto.
(-[WebPreferences frameFlattening]): New function to get frame flattening as an enum.
(-[WebPreferences setFrameFlattening:]): New function to set frame flattening as an enum.

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

(-[WebView _preferencesChanged:]): Ditto.

  • WebView/WebPreferencesPrivate.h: Add new enum definition.

Source/WebKit/win:

This commit ajusts the window port to internally use the new preference type for frame flattening.
However, the "partial frame flattening" value is not exposed yet.

  • WebView.cpp:

(WebView::notifyPreferencesChanged): Use the new type for frame flattening.

Source/WebKit2:

This commit ajusts the preference API to internally treat frame flattening as an enum.
However, the "partial frame flattening" value is not exposed to GTK, C or InjectedBundle APIs yet.

  • Shared/WebPreferencesDefinitions.h: Define frame flattening as an enum.
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetFrameFlatteningEnabled): Treat frame flattening as an enum.
(WKPreferencesGetFrameFlatteningEnabled): Ditto.

  • UIProcess/API/gtk/WebKitSettings.cpp:

(webkit_settings_get_enable_frame_flattening): Ditto.
(webkit_settings_set_enable_frame_flattening): Ditto.

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Do not handle frame flattening since it is an enum.
For now, this breaks one test checking preference overriding because of bug 128594.
(WebKit::InjectedBundle::setFrameFlatteningEnabled): Treat frame flattening as an enum.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::contentsSizeChanged): Use enum value.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Ditto.

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues): Use WebKitFrameFlatteningDisabled.

LayoutTests:

This commit adjusts tests to work when frame flattening is an enum.
It also adds a test to check the new heuristic when "frame flattening for non-fullscreen
iframes" is enabled.
set-preference.html is disabled for now, as the test suite does not support overridePreference()
for non-boolean values (bug 128594).

  • fast/forms/ios/delete-in-input-in-iframe.html: Use enum value "FullyEnabled".
  • fast/forms/ios/focus-input-in-iframe.html: Ditto.
  • fast/forms/ios/programmatic-focus-input-in-iframe.html: Ditto.
  • fast/forms/ios/typing-in-input-in-iframe.html: Ditto.
  • fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html: Ditto.
  • fast/frames/flattening/crash-svg-document.html: Ditto.
  • fast/frames/flattening/crash-when-sibling-iframe-is-destroyed-with-subtree-layoutroot.html: Ditto.
  • fast/frames/flattening/frameset-flattening-advanced.html: Ditto.
  • fast/frames/flattening/frameset-flattening-grid.html: Ditto.
  • fast/frames/flattening/frameset-flattening-simple.html: Ditto.
  • fast/frames/flattening/frameset-flattening-subframe-resize.html: Ditto.
  • fast/frames/flattening/frameset-flattening-subframesets.html: Ditto.
  • fast/frames/flattening/hittest-iframe-while-style-changes-crash.html: Ditto.

Be sure to use single quotes for the inline iframe page.

  • fast/frames/flattening/iframe-flattening-crash.html: Use enum value "FullyEnabled".
  • fast/frames/flattening/iframe-flattening-fixed-height.html: Ditto.
  • fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-with-js-forced-layout.html: Ditto.
  • fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling.html: Ditto.
  • fast/frames/flattening/iframe-flattening-fixed-width-and-height-zero-size.html: Ditto.
  • fast/frames/flattening/iframe-flattening-fixed-width-and-height.html: Ditto.
  • fast/frames/flattening/iframe-flattening-fixed-width.html: Ditto.
  • fast/frames/flattening/iframe-flattening-fullscreen.html: Added. Check the new heuristic.
  • fast/frames/flattening/iframe-flattening-fullscreen-expected.txt: Added.
  • fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html: Use enum value "FullyEnabled".
  • fast/frames/flattening/iframe-flattening-nested.html: Ditto.
  • fast/frames/flattening/iframe-flattening-offscreen.html: Ditto.
  • fast/frames/flattening/iframe-flattening-out-of-view-and-scroll.html: Ditto.
  • fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout.html: Ditto.
  • fast/frames/flattening/iframe-flattening-out-of-view.html: Ditto.
  • fast/frames/flattening/iframe-flattening-resize-event-count.html: Ditto.
  • fast/frames/flattening/iframe-flattening-selection-crash.html: Ditto.
  • fast/frames/flattening/iframe-flattening-simple.html: Ditto.
  • fast/frames/flattening/iframe-tiny.html: Ditto.
  • fast/frames/flattening/scrollable-flexbox-inside-iframe-with-zero-height-and-needs-full-repaint-crash.html: Ditto.
  • fast/frames/flattening/scrollable-flexbox-inside-iframe-with-zero-height-assertion-failure.html: Ditto.
  • fast/frames/flattening/scrolling-in-object.html: Ditto.
  • fast/spatial-navigation/snav-iframe-flattening-simple.html: Ditto.
  • http/tests/misc/iframe-flattening-3level-nesting-with-blocking-resource.html: Ditto.
  • platform/mac/TestExpectations: Disable this due to limitation in the test infrastructure.
  • plugins/frameset-with-plugin-frame.html: Use enum value "FullyEnabled".
12:21 AM Changeset in webkit [218479] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.17.4

WebKitGTK+ 2.17.4

Jun 18, 2017:

11:37 PM Changeset in webkit [218478] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.17.4 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.17.4.
10:40 PM Changeset in webkit [218477] by bshafiei@apple.com
  • 8 edits in branches/safari-603-branch/Source/WebCore

Roll out r210226 via r217676. rdar://problem/32842498

10:39 PM Changeset in webkit [218476] by bshafiei@apple.com
  • 7 edits in branches/safari-603-branch

Roll out r211501 via r217677. rdar://problem/32842498

10:36 PM Changeset in webkit [218475] by bshafiei@apple.com
  • 39 edits
    1 delete in branches/safari-603-branch

Roll out r212173 via r217678. rdar://problem/32842498

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

Roll out r212174 via r217679. rdar://problem/32842498

10:26 PM Changeset in webkit [218473] by bshafiei@apple.com
  • 6 edits
    8 deletes in branches/safari-603-branch/LayoutTests

Roll out r216126 via r217788. rdar://problem/32842615

10:22 PM Changeset in webkit [218472] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

REGRESSION(r218253): Infinite animated gifs no longer loop
https://bugs.webkit.org/show_bug.cgi?id=173464

Reviewed by Carlos Alberto Lopez Perez.

After the first loop iteration we keep rendering the same frame all the time, so it looks like if the animation
stopped. This is because in r218253 we changed to use SharedBuffer instead of a Vector in ImageBackingStore, but
we are not correctly copying the data in the copy constructor. We are using SharedBuffer::copy() that doesn't
actually copy the data of the segments.

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::ImageBackingStore): Copy the data of the other SharedBuffer.

10:12 PM Changeset in webkit [218471] by Carlos Garcia Campos
  • 9 edits in trunk/Source/WebCore

[GStreamer] MainThreadNotifier ASSERTION FAILED: m_boundThread == currentThread() in _WebKitWebSrcPrivate::~_WebKitWebSrcPrivate
https://bugs.webkit.org/show_bug.cgi?id=152043

Reviewed by Xabier Rodriguez-Calvar.

Stop using a WeakPtr in MainThreadNotifier, because it's not thread safe, which causes a crash in debug builds when
the notifier is destroyed in a different thread. Make MainThreadNotifier thread safe refcounted instead, and add
an invalidate() method to mark it as invalid.

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:

(WebCore::InbandTextTrackPrivateGStreamer::handleSample):
(WebCore::InbandTextTrackPrivateGStreamer::streamChanged):

  • platform/graphics/gstreamer/MainThreadNotifier.h:

(WebCore::MainThreadNotifier::MainThreadNotifier): Deleted.
(WebCore::MainThreadNotifier::notify): Deleted.
(WebCore::MainThreadNotifier::cancelPendingNotifications): Deleted.
(WebCore::MainThreadNotifier::addPendingNotification): Deleted.
(WebCore::MainThreadNotifier::removePendingNotification): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback):
(WebCore::MediaPlayerPrivateGStreamer::textChangedCallback):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::muteChangedCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:

(WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
(WebCore::TrackPrivateBaseGStreamer::~TrackPrivateBaseGStreamer):
(WebCore::TrackPrivateBaseGStreamer::disconnect):
(WebCore::TrackPrivateBaseGStreamer::activeChangedCallback):
(WebCore::TrackPrivateBaseGStreamer::tagsChanged):

  • platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_init):
(webKitWebSrcDispose):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcNeedData):
(webKitWebSrcEnoughData):
(webKitWebSrcSeek):

9:53 PM Changeset in webkit [218470] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Drop redundant IPC in WebPage::tryClose()
https://bugs.webkit.org/show_bug.cgi?id=173533

Reviewed by Sam Weinig.

Drop redundant IPC to stop the responsiveness timer in WebPage::tryClose(). The
destructor for the SendStopResponsivenessTimer already takes care of sending the
IPC.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::tryClose):

9:19 PM Changeset in webkit [218469] by bshafiei@apple.com
  • 5 edits in branches/safari-603-branch/Source

Versioning.

9:00 PM Changeset in webkit [218468] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

Meter element doesn't respect the writing direction
https://bugs.webkit.org/show_bug.cgi?id=173507

Reviewed by Sam Weinig.

Source/WebCore:

The bug was caused by NSLevelIndicatorCell no longer using the value of baseWritingDirection
to determine the direction of rendering in macOS Sierra and later. It instead relies on
the value of userInterfaceLayoutDirection.

Fixed the bug by setting both values. Once we dropped the support for macOS El Capitan
and earlier, we can remove the code to set baseWritingDirection.

Test: fast/dom/HTMLMeterElement/meter-rtl.html

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::levelIndicatorFor):

LayoutTests:

A regression ref test since existing tests were pixel tests and did not catch this regression.
Note that black border was added to workaround the anti-aliasing differences in macOS High Sierra.

  • fast/dom/HTMLMeterElement/meter-rtl-expected.html: Added.
  • fast/dom/HTMLMeterElement/meter-rtl.html: Added.
8:12 PM Changeset in webkit [218467] by Dewei Zhu
  • 2 edits in trunk/Source/WebCore

Remove 'EditCommand::isEditCommandComposition'.
https://bugs.webkit.org/show_bug.cgi?id=173525

Reviewed by Wenson Hsieh.

Should remove 'isEditCommandComposition' from 'EditCommand' for:

  1. 'EditCommandComposition' is no longer a subclass of EditCommand.
  2. 'isEditCommandComposition' is not used at all.
  • editing/EditCommand.h:

(WebCore::EditCommand::isCompositeEditCommand):
(WebCore::EditCommand::isEditCommandComposition): Deleted.

6:59 PM Changeset in webkit [218466] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

Drop unused UserMediaPermissionRequestManager::cancelPendingRequests()
https://bugs.webkit.org/show_bug.cgi?id=173529
<rdar://problem/32836986>

Reviewed by Sam Weinig.

Drop UserMediaPermissionRequestManager::cancelPendingRequests() as it is unused
and its implementation is wrong (modifies the hash maps it is iterating on).

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::cancelPendingRequests): Deleted.

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.h:
1:25 PM Changeset in webkit [218465] by Chris Dumez
  • 7 edits
    4 adds in trunk

Crash when re-entering MediaDevicesEnumerationRequest::cancel()
https://bugs.webkit.org/show_bug.cgi?id=173522
<rdar://problem/31185739>

Reviewed by Darin Adler.

Source/WebCore:

When a MediaDevicesRequest is started, it creates a MediaDevicesEnumerationRequest
object and passes a completion handler to that MediaDevicesEnumerationRequest
object. The completion handler holds a reference to the MediaDevicesRequest object
so that its stays alive until the MediaDevicesEnumerationRequest either completes
or is canceled. MediaDevicesRequest also holds a reference to the
MediaDevicesEnumerationRequest object via its m_enumerationRequest data member.

When the document is destroyed, both MediaDevicesRequest::contextDestroyed() and
MediaDevicesEnumerationRequest::contextDestroyed() gets called and the other is not
pre-determined. If MediaDevicesEnumerationRequest::contextDestroyed() gets called
first then it calls MediaDevicesEnumerationRequest::cancel(). Calling cancel() ends
up destroying the completion handler. Destroying the completion handler ends up
dereferencing and destroying the MediaDevicesRequest object. The MediaDevicesRequest
destructor would call MediaDevicesEnumerationRequest::cancel() again, causing us to
re-enter it and assign nullptr to the completion callback again. Re-entering
std::function's operator=(nullptr_t) is not safe because of the way it is implemented
as we end up trying to destroy the lambda twice and crashing. Using a WTF::Function
instead fixes this particular issue because re-entering WTF::Function's operator=(nullptr_t)
is safe.

However, this fix is not sufficient. Calling the MediaDevicesRequest destructor also
dereferencing and destroys the MediaDevicesEnumerationRequest object. As a result,
when MediaDevicesEnumerationRequest::contextDestroyed() returns from its call to cancel
|this| is already dead when we call ContextDestructionObserver::contextDestroyed().
To address this issue, we now protect |this| in MediaDevicesEnumerationRequest::contextDestroyed().

Test: fast/mediastream/destroy-document-while-enumerating-devices.html

  • Modules/mediastream/MediaDevicesEnumerationRequest.cpp:

(WebCore::MediaDevicesEnumerationRequest::contextDestroyed):
Protect |this| as the call to cancel() may destroy |this| before calling
ContextDestructionObserver::contextDestroyed() otherwise.

  • Modules/mediastream/MediaDevicesEnumerationRequest.h:

Use WTF::Function instead of std::function for the completion handler as
it is safer (in terms of re-entrency) and avoids unnecessary copying.

  • Modules/mediastream/MediaDevicesRequest.cpp:

(WebCore::MediaDevicesRequest::~MediaDevicesRequest):
Stop calling MediaDevicesEnumerationRequest::cancel(). When the destructor
is called, the MediaDevicesEnumerationRequest has either completed or been
canceled so there is no need to cancel again. I added an assertion to
make sure it is the case. This avoids re-entering
MediaDevicesEnumerationRequest::cancel() is some cases, which was risky.

(WebCore::MediaDevicesRequest::start):
Add comment for clarity and capture a Ref<> instead of a RefPtr<> now that
we can since we use WTF::Function.

Tools:

Add API test for re-entering Function's assignment operators.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/Function.cpp: Added.

(TestWebKitAPI::TestObject::TestObject):
(TestWebKitAPI::TestObject::~TestObject):
(TestWebKitAPI::TestObject::operator()):
(TestWebKitAPI::TEST):

LayoutTests:

Add layout test coverage. This test would flakily crash before the fix because it
relies on the order in which contextDestroyed() is called for MediaDevicesRequest
and MediaDevicesEnumerationRequest.

  • fast/mediastream/destroy-document-while-enumerating-devices-expected.txt: Added.
  • fast/mediastream/destroy-document-while-enumerating-devices.html: Added.
  • fast/mediastream/resources/enumerate-devices-frame.html: Added.
12:49 PM Changeset in webkit [218464] by Chris Dumez
  • 19 edits in trunk/Source

Use WTF::Function instead of std::function in WTF/
https://bugs.webkit.org/show_bug.cgi?id=173519

Reviewed by Sam Weinig.

Source/WebCore:

Replace a few uses of std::function with WTF::Function in WebCore/
as well. It was either this or including <functional> and I decided
it made more sense to port the code.

  • platform/graphics/FontSelectionAlgorithm.h:

(WebCore::FontSelectionAlgorithm::iterateActiveCapabilitiesWithReturn):

  • platform/mediastream/MediaConstraints.cpp:

(WebCore::StringConstraint::find):
(WebCore::MediaTrackConstraintSetMap::forEach):
(WebCore::MediaTrackConstraintSetMap::filter):
(WebCore::MediaConstraints::isConstraintSet):

  • platform/mediastream/MediaConstraints.h:

(WebCore::NumericConstraint::find):

  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::applyConstraint):

Source/WTF:

Use WTF::Function instead of std::function in WTF/ to avoid
copying.

  • wtf/Brigand.h:
  • wtf/Condition.h:
  • wtf/Expected.h:
  • wtf/FunctionDispatcher.h:
  • wtf/MainThread.h:
  • wtf/MemoryPressureHandler.h:

(WTF::MemoryPressureHandler::setMemoryKillCallback):
(WTF::MemoryPressureHandler::setMemoryPressureStatusChangedCallback):
(WTF::MemoryPressureHandler::setDidExceedInactiveLimitWhileActiveCallback):

  • wtf/Optional.h:
  • wtf/ParkingLot.h:
  • wtf/RefCounter.h:

(WTF::RefCounter<T>::RefCounter):

  • wtf/WorkQueue.h:
  • wtf/linux/MemoryPressureHandlerLinux.cpp:

(WTF::MemoryPressureHandler::EventFDPoller::EventFDPoller):

  • wtf/text/WTFString.cpp:

(WTF::String::split):

  • wtf/text/WTFString.h:
8:55 AM Changeset in webkit [218463] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

[MSE] Seeking or entering fullscreen can cause extreme CPU usage
https://bugs.webkit.org/show_bug.cgi?id=173505

Reviewed by Tim Horton.

When support for painting MSE to WebGL was added in r217185, the implementation of
SourceBufferPrivateAVFObjC::isReadyForMoreSamples() was modified to support asking
the decompression session if it was ready. That change, however, caused an extreme
performance regression in the normal playback path, where WebKit will effectively
append samples endlessly to the AVSampleBufferDisplayLayer, which admirably enqueued
each of them for decoding. Eventually, the cost of iterating over the CMBufferQueue
overwhelmed the cost of decoding, and caused the extreme lag seen when seeking.

Make sure to property query the AVSampleBufferDisplayLayer for isReadyForMoreMediaData
before enqueuing.

A previous version of this patch exposed some errors which caused failing tests:

In sourceBufferPrivateDidReceiveSample(), we were using local versions of
presentationTimestamp and decodeTimestamp as keys to the decodeQueue; those local versions
were floating point values (because MediaTime + float = float), but the sample itself uses
non-floating point MediaTimes. This causes samples to be left in the queue when they should
be removed.

In didBecomeReadyForMoreSamples(), we were getting spurious assertions when a
AVSampleBufferDisplayLayer or a AVSampleBufferAudioRenderer would fire a callback from
-requestMediaDataWhenReadyOnQueue:usingBlock: even after it had been told to
-stopRequestingMediaData. Apparently it's expected behavior and so an ASSERT_NOT_REACHED is
inappropriate here.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

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

(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples):

Jun 17, 2017:

8:57 PM Changeset in webkit [218462] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Addressing post-review comment after r218456.
https://bugs.webkit.org/show_bug.cgi?id=173509

Reviewed by Darin Adler.

  • dom/Document.cpp:

(WebCore::Document::destroyRenderTree):

6:36 PM Changeset in webkit [218461] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

DOMQuad::getBounds() should return a Ref<>
https://bugs.webkit.org/show_bug.cgi?id=173517

Reviewed by Simon Fraser.

DOMQuad::getBounds() should return a Ref<> as it cannot return
null.

  • dom/DOMQuad.cpp:

(WebCore::DOMQuad::getBounds):

  • dom/DOMQuad.h:
5:10 PM Changeset in webkit [218460] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Unreviewed, follow-up build fix after r218457.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):

4:55 PM Changeset in webkit [218459] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Unreviewed, follow-up build fix after r218457.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):

3:34 PM Changeset in webkit [218458] by Simon Fraser
  • 12 edits
    6 adds in trunk

Implement DOMQuad
https://bugs.webkit.org/show_bug.cgi?id=163534

Reviewed by Sam Weinig.
LayoutTests/imported/w3c:

Implement DOMQuad per https://drafts.fxtf.org/geometry/#DOMQuad.

  • web-platform-tests/css/geometry-1/DOMQuad-001-expected.txt: Tests against an older version

of the spec, so some failures.

  • web-platform-tests/css/geometry-1/DOMQuad-002-expected.txt: All tests pass other than a NaN

propagation issue which needs spec clarification.

  • web-platform-tests/css/geometry-1/structured-serialization-expected.txt:

Source/WebCore:

Implement DOMQuad per https://drafts.fxtf.org/geometry/#DOMQuad, other than serialization
which requires some bindings changes.

web-platform-tests/css/geometry-1/DOMRect-001.html tests against an older version of the spec,
so has some failures. DOMQuad-002.html passes, other than a NaN propagation issue that requires
spec clarification.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMQuadCustom.cpp: Added.

(WebCore::JSDOMQuad::getBounds):

  • bindings/scripts/CodeGenerator.pm:

(IsSerializableDOMType):
(IsSerializableAttribute):

  • dom/DOMPoint.h:
  • dom/DOMQuad.cpp: Added.

(WebCore::DOMQuad::DOMQuad):
(WebCore::DOMQuad::getBounds):

  • dom/DOMQuad.h: Added.

(WebCore::DOMQuad::create):
(WebCore::DOMQuad::fromRect):
(WebCore::DOMQuad::fromQuad):
(WebCore::DOMQuad::p1):
(WebCore::DOMQuad::p2):
(WebCore::DOMQuad::p3):
(WebCore::DOMQuad::p4):

  • dom/DOMQuad.idl: Added.
  • dom/DOMQuadInit.h: Added.
  • dom/DOMQuadInit.idl: Added.

LayoutTests:

Implement DOMQuad per https://drafts.fxtf.org/geometry/#DOMQuad.

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
1:55 PM Changeset in webkit [218457] by Chris Dumez
  • 103 edits in trunk/Source

Use WTF::Function instead of std::function in WebKit2/
https://bugs.webkit.org/show_bug.cgi?id=173504

Reviewed by Darin Adler.

Use WTF::Function instead of std::function in WebKit2/ to avoid
unnecessary copying.

Source/WebCore:

  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::canMakePaymentsWithActiveCard):
(WebCore::PaymentCoordinator::openPaymentSetup):

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinatorClient.h:
  • loader/EmptyClients.cpp:
  • loader/NetscapePlugInStreamLoader.cpp:

(WebCore::NetscapePlugInStreamLoader::willSendRequest):

  • loader/NetscapePlugInStreamLoader.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::willSendRequest):

  • loader/ResourceLoader.h:

Source/WebKit/mac:

  • Plugins/Hosted/HostedNetscapePluginStream.h:
  • Plugins/Hosted/HostedNetscapePluginStream.mm:

(WebKit::HostedNetscapePluginStream::willSendRequest):

  • Plugins/WebNetscapePluginStream.h:
  • Plugins/WebNetscapePluginStream.mm:

(WebNetscapePluginStream::willSendRequest):

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::canMakePaymentsWithActiveCard):
(WebPaymentCoordinatorClient::openPaymentSetup):

Source/WebKit/win:

  • Plugins/PluginStream.cpp:

(WebCore::PluginStream::willSendRequest):

  • Plugins/PluginStream.h:

Source/WebKit2:

  • DatabaseProcess/DatabaseProcess.cpp:

(WebKit::DatabaseProcess::getSandboxExtensionsForBlobFiles):

  • DatabaseProcess/DatabaseProcess.h:
  • NetworkProcess/cache/NetworkCacheData.h:
  • NetworkProcess/cache/NetworkCacheFileSystem.h:
  • Platform/IPC/Connection.cpp:

(IPC::Connection::installIncomingSyncMessageCallback):

  • Platform/IPC/Connection.h:
  • Platform/IPC/glib/GSocketMonitor.h:
  • Platform/Logging.h:
  • Shared/API/APIObject.h:
  • Shared/AsyncRequest.cpp:

(WebKit::AsyncRequest::AsyncRequest):
(WebKit::AsyncRequest::setAbortHandler):

  • Shared/AsyncRequest.h:
  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:

(WebKit::CompositingRunLoop::CompositingRunLoop):

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h:
  • Shared/WebContextMenuItemData.h:
  • UIProcess/API/APIDownloadClient.h:

(API::DownloadClient::willSendRequest):

  • UIProcess/API/APIIconLoadingClient.h:

(API::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/API/APIUIClient.h:

(API::UIClient::createNewPageAsync):

  • UIProcess/API/C/WKPage.cpp:

(toGenericCallbackFunction):

  • UIProcess/API/Cocoa/WKWebView.mm:
  • UIProcess/API/mac/WKView.mm:

(-[WKView maybeInstallIconLoadingClient]):

  • UIProcess/AcceleratedDrawingAreaProxy.cpp:

(WebKit::AcceleratedDrawingAreaProxy::dispatchAfterEnsuringDrawing):

  • UIProcess/AcceleratedDrawingAreaProxy.h:
  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):

  • UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:

(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):

  • UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:

(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::performKeyboardInteractions):

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

(WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::tryAppLink):

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

(WebKit::UIDelegate::UIClient::createNewPageCommon):
(WebKit::UIDelegate::UIClient::createNewPageAsync):

  • UIProcess/Cocoa/ViewGestureController.cpp:

(WebKit::ViewGestureController::SnapshotRemovalTracker::start):

  • UIProcess/Cocoa/ViewGestureController.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::prepareForMoveToWindow):

  • UIProcess/Databases/DatabaseProcessProxy.cpp:

(WebKit::DatabaseProcessProxy::fetchWebsiteData):
(WebKit::DatabaseProcessProxy::deleteWebsiteData):
(WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/Databases/DatabaseProcessProxy.h:
  • UIProcess/DrawingAreaProxy.h:

(WebKit::DrawingAreaProxy::dispatchAfterEnsuringDrawing):

  • UIProcess/DrawingAreaProxyImpl.cpp:

(WebKit::DrawingAreaProxyImpl::DrawingMonitor::start):
(WebKit::DrawingAreaProxyImpl::dispatchAfterEnsuringDrawing):

  • UIProcess/DrawingAreaProxyImpl.h:
  • UIProcess/GenericCallback.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::fetchWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteData):
(WebKit::NetworkProcessProxy::deleteWebsiteDataForOrigins):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/PageClient.h:
  • UIProcess/Plugins/PlugInAutoStartProvider.cpp:

(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):

  • UIProcess/Plugins/PlugInAutoStartProvider.h:
  • UIProcess/Plugins/PluginProcessManager.cpp:

(WebKit::PluginProcessManager::fetchWebsiteData):
(WebKit::PluginProcessManager::deleteWebsiteData):
(WebKit::PluginProcessManager::deleteWebsiteDataForHostNames):

  • UIProcess/Plugins/PluginProcessManager.h:
  • UIProcess/Plugins/PluginProcessProxy.cpp:

(WebKit::PluginProcessProxy::fetchWebsiteData):
(WebKit::PluginProcessProxy::deleteWebsiteData):
(WebKit::PluginProcessProxy::deleteWebsiteDataForHostNames):

  • UIProcess/Plugins/PluginProcessProxy.h:
  • UIProcess/ProcessAssertion.h:
  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::backForwardListState):

  • UIProcess/WebBackForwardList.h:
  • UIProcess/WebCookieManagerProxy.cpp:

(WebKit::WebCookieManagerProxy::setCookieObserverCallback):
(WebKit::WebCookieManagerProxy::cookiesDidChange):

  • UIProcess/WebCookieManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setInitialFocus):
(WebKit::WebPageProxy::validateCommand):
(WebKit::WebPageProxy::sessionState):
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
(WebKit::WebPageProxy::getSourceForFrame):
(WebKit::WebPageProxy::getContentsAsString):
(WebKit::WebPageProxy::getBytecodeProfile):
(WebKit::WebPageProxy::getSamplingProfilerOutput):
(WebKit::WebPageProxy::isWebProcessResponsive):
(WebKit::WebPageProxy::getSelectionOrContentsAsString):
(WebKit::WebPageProxy::createNewPage):
(WebKit::WebPageProxy::getMarkedRangeAsync):
(WebKit::WebPageProxy::getSelectedRangeAsync):
(WebKit::WebPageProxy::characterIndexForPointAsync):
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
(WebKit::WebPageProxy::takeSnapshot):
(WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
(WebKit::WebPageProxy::callAfterNextPresentationUpdate):
(WebKit::WebPageProxy::getLoadDecisionForIcon):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::isResponsive):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/gtk/AcceleratedBackingStoreX11.cpp:

(WebKit::XDamageNotifier::add):

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

(WebKit::PageClientImpl::requestPasswordForQuickLookDocument):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::selectWithGesture):
(WebKit::WebPageProxy::updateSelectionWithTouches):
(WebKit::WebPageProxy::requestAutocorrectionData):
(WebKit::WebPageProxy::applyAutocorrection):
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectPositionAtPoint):
(WebKit::WebPageProxy::beginSelectionInDirection):
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
(WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
(WebKit::WebPageProxy::requestDictationContext):
(WebKit::WebPageProxy::requestAutocorrectionContext):
(WebKit::WebPageProxy::getSelectionContext):
(WebKit::WebPageProxy::selectWithTwoTouches):
(WebKit::WebPageProxy::requestRectsForGranularityWithSelectionOffset):
(WebKit::WebPageProxy::requestRectsAtSelectionOffsetWithText):
(WebKit::WebPageProxy::moveSelectionByOffset):
(WebKit::WebPageProxy::focusNextAssistedNode):
(WebKit::WebPageProxy::didRequestPasswordForQuickLookDocumentInMainFrame):

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):

  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:

(WebKit::TiledCoreAnimationDrawingAreaProxy::dispatchAfterEnsuringDrawing):

  • UIProcess/mac/WKTextFinderClient.mm:
  • UIProcess/mac/WebContextMenuProxyMac.mm:

(-[WKSelectionHandlerWrapper initWithSelectionHandler:]):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPageProxy::fontAtSelection):

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::WebPaymentCoordinator::canMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinator::openPaymentSetup):

  • WebProcess/ApplePay/WebPaymentCoordinator.h:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::Stream::willSendRequest):

  • WebProcess/WebPage/DrawingArea.cpp:

(WebKit::DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):

  • WebProcess/WebPage/DrawingArea.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::markLayersVolatile):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::markLayersVolatile):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::markAllLayersVolatile):

  • WebProcess/WebProcess.h:
1:37 PM Changeset in webkit [218456] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Demote the "we have navigated away" check to an assertion.
https://bugs.webkit.org/show_bug.cgi?id=173509

Reviewed by Simon Fraser.

Now that the expected behavior is that the render tree can't get to the page cache, it's ok to assert.
TODO: We should also have view() check removed at some point.

  • dom/Document.cpp:

(WebCore::Document::destroyRenderTree):

1:03 PM Changeset in webkit [218455] by achristensen@apple.com
  • 8 edits in trunk/Source

Fix CMake build

Source/WebCore:

  • PlatformMac.cmake:
  • bindings/js/ScriptGlobalObject.cpp:

Source/WebKit2:

  • CMakeLists.txt:
  • NetworkProcess/capture/NetworkCaptureEvent.cpp:
  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
12:50 PM Changeset in webkit [218454] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

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

Caused imported/w3c/web-platform-tests/media-
source/mediasource* tests to fail (Requested by smfr on
#webkit).

Reverted changeset:

"[MSE] Seeking or entering fullscreen can cause extreme CPU
usage"
https://bugs.webkit.org/show_bug.cgi?id=173505
http://trac.webkit.org/changeset/218438

8:49 AM Changeset in webkit [218453] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit2

Tried to fix non-iOS builds.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
7:13 AM Changeset in webkit [218452] by keith_miller@apple.com
  • 4 edits in trunk

ArrayBuffer constructor needs to create subclass structures before its buffer
https://bugs.webkit.org/show_bug.cgi?id=173510

Reviewed by Yusuke Suzuki.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

  • runtime/JSArrayBufferConstructor.cpp:

(JSC::constructArrayBuffer):

6:02 AM Changeset in webkit [218451] by Antti Koivisto
  • 5 edits
    2 adds in trunk

Crash due to infinite recursion via FrameSelection::updateAppearanceAfterLayout
https://bugs.webkit.org/show_bug.cgi?id=173468

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: editing/selection/updateAppearanceAfterLayout-recursion.html

Calling FrameSelection::updateAppearanceAfterLayout() from Document::resolveStyle is unsafe
because it may cause another call to resolveStyle. We have some cases where the style
is still unclean when updateAppearanceAfterLayout() is called. This can lead to infinite
recursion.

The test case is not the common stack seen in CrashTracer (couldn't quit replicate it) but
the updateAppearanceAfterLayout/resolveStyle recursion is the same.

  • dom/Document.cpp:

(WebCore::Document::resolveStyle):

Normally selection appearance update is done in post-layout but not all style resolutions schedule a layout.
Invoke it asynchronously in that case instead of the previous synchronous call.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::updateAppearanceAfterLayout):
(WebCore::FrameSelection::scheduleAppearanceUpdateAfterStyleChange):
(WebCore::FrameSelection::appearanceUpdateTimerFired):
(WebCore::FrameSelection::updateAppearanceAfterLayoutOrStyleChange):

  • editing/FrameSelection.h:

LayoutTests:

  • editing/selection/updateAppearanceAfterLayout-recursion-expected.txt: Added.
  • editing/selection/updateAppearanceAfterLayout-recursion.html: Added.
5:31 AM Changeset in webkit [218450] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

[Win] Update expectations for layout tests.
https://bugs.webkit.org/show_bug.cgi?id=172437

Unreviewed test gardening, update test expectations for failing tests.

  • platform/win/TestExpectations:
3:52 AM Changeset in webkit [218449] by keith_miller@apple.com
  • 11 edits in trunk

ArrayPrototype methods should use JSValue::toLength for non-Arrays.
https://bugs.webkit.org/show_bug.cgi?id=173506

JSTests:

Reviewed by Ryosuke Niwa.

Re-baseline tests.

  • ChakraCore/test/Function/apply3.baseline-jsc:
  • test262.yaml:

Source/JavaScriptCore:

Reviewed by Ryosuke Niwa.

This patch changes the result of unshift if old length +
unshift.arguments.length > (2 53) - 1 to be a type error. Also,
the getLength function, which was always incorrect to use, has
been removed. Additionally, some cases where we were using a
constant for (2
53) - 1 have been replaced with
maxSafeInteger()

  • interpreter/Interpreter.cpp:

(JSC::sizeOfVarargs):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToLocaleString):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):

  • runtime/JSArrayInlines.h:

(JSC::getLength): Deleted.

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::toLength):

  • runtime/NumberConstructor.cpp:

(JSC::numberConstructorFuncIsSafeInteger):

LayoutTests:

Unreviewed test gardening.

12:54 AM Changeset in webkit [218448] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening. Remove duplicate entries for tests.

  • platform/win/TestExpectations:
12:47 AM Changeset in webkit [218447] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix Mac CMake build.

  • PlatformMac.cmake:
12:21 AM Changeset in webkit [218446] by rniwa@webkit.org
  • 44 edits
    2 adds in trunk

REGRESSION(r209495): materiauxlaverdure.com fails to load
https://bugs.webkit.org/show_bug.cgi?id=173301
<rdar://problem/32624850>

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaselined the tests that are now passing.

  • web-platform-tests/cssom/CSSNamespaceRule-expected.txt:
  • web-platform-tests/cssom/serialize-values-expected.txt:

Source/WebCore:

The bug was caused by WebKit wrapping CSS string values with single quotation marks instead of
double quotation marks as spec'ed in https://drafts.csswg.org/cssom/#serialize-a-string and
implemented in Firefox and Chrome.

The website eval's the computed value of the content CSS property with the value '{name: "flat"}'
after stripping single quotation marks from both ends. Prior to r209495, WebKit serialized this CSS value
in single quotations without escaping double quotations. After r209495, double quotations are escaped
with backslashes as '{name: \"flat\"}'. As a result, eval is invoked with {name: \"flat\"}
after stripping single quotations from both ends, which resulted in an exception.

Chrome and Firefox don't encounter this exception despite of the fact they escape double quotations
as well because serialize with double quotations as "{name: \"flat\"}". Because there is no code
to strip double quotations, eval is invoked with the same string, resulting in the entire value as
being parsed as string, instead of an object with a single key "name" with the value of "flat" as
was the case in WebKit prior to r209495. While this behavior was most certainly not the intent of
the website author, Chrome and Firefox don't encounter an exception and the website continues to work.

This patch aligns WebKit's behavior to that of the CSS OM specification, Firefox, and Chrome by
serializing CSS string values using double quotation marks instead of single quotation marks.

Note: inline change log comments are added below for every call site of serializeString for clarity.

Test: fast/css/getPropertyValue-serialization-with-double-quotes.html

  • css/CSSBasicShapes.cpp:

(WebCore::buildPathString): Use double quotation marks in path(~) of shapes.

  • css/CSSMarkup.cpp:

(WebCore::serializeString):
(WebCore::serializeURL): Use double quotation marks to serialize URLs.
(WebCore::serializeAsStringOrCustomIdent): Use double quotation marks to serialize strings. We still avoid
using wrapping the value with double quotations when the value can be an identifier. See r209495.
(WebCore::serializeFontFamily): Ditto for font-family names such as "San Francisco".

  • css/CSSMarkup.h:
  • css/CSSNamespaceRule.cpp:

(WebCore::CSSNamespaceRule::cssText): Use double quotation marks to serialize namespace URIs.

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Use double quotation marks to serialize
the separators; e.g. counter(sectionNumber, ".") to produce "1.".

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::selectorText): Use double quotation marks to serialize attribute values.

  • css/parser/CSSParserToken.cpp:

(WebCore::CSSParserToken::serialize): Use double quotation marks to serialize strings in @support.

  • editing/EditingStyle.cpp:

(WebCore::StyleChange::extractTextStyles): Updated to strip double quotation marks in font family names to
maintain the compatibility with old versions of Microsoft Outlook.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::mapLanguageAttributeToLocale): Use double quotations marks to serialize the value
of the lang content attribute. It doesn't matter which one is used here because it's only a temporary value
only fed into the CSS parser to set the equivalent CSS value from the content attribute.

LayoutTests:

Rebaselined the existing tests and added a new regression test for serializing CSS properties and values.

  • accessibility/mac/alt-for-css-content-expected.txt:
  • accessibility/mac/webkit-alt-for-css-content-expected.txt:
  • editing/pasteboard/cjk-line-height-expected.txt:
  • fast/css/alt-inherit-initial-expected.txt:
  • fast/css/alt-inherit-initial.html:
  • fast/css/content-language-comma-separated-list-expected.txt:
  • fast/css/content-language-empty-expected.txt:
  • fast/css/content-language-only-whitespace-expected.txt:
  • fast/css/content-language-with-whitespace-expected.txt:
  • fast/css/counters/counter-cssText-expected.txt:
  • fast/css/counters/counter-cssText.html:
  • fast/css/font-family-trailing-bracket-gunk-expected.txt:
  • fast/css/font-family-trailing-bracket-gunk.html:
  • fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • fast/css/getComputedStyle/computed-style-properties-expected.txt:
  • fast/css/getComputedStyle/computed-style-properties.html:
  • fast/css/getComputedStyle/font-family-fallback-reset-expected.txt:
  • fast/css/getComputedStyle/font-family-fallback-reset.html:
  • fast/css/lang-mapped-to-webkit-locale-expected.txt:
  • fast/css/lang-mapped-to-webkit-locale.xhtml:
  • fast/css/serialization-with-double-quotes-expected.txt: Added.
  • fast/css/serialization-with-double-quotes.html: Added.
  • fast/css/uri-token-parsing-expected.txt:
  • fast/css/uri-token-parsing.html:
  • fast/inspector-support/cssURLQuotes-expected.txt:
  • fast/inspector-support/style-expected.txt:
  • fast/text/font-stretch-parse-expected.txt:
  • fast/text/font-stretch-parse.html:
  • fast/text/font-style-parse-expected.txt:
  • fast/text/font-style-parse.html:
  • fast/text/font-weight-parse-expected.txt:
  • fast/text/font-weight-parse.html:
  • media/controls/track-menu.html:
  • platform/mac-elcapitan/fast/css/getComputedStyle/computed-style-font-family-expected.txt:
  • platform/mac-elcapitan/fast/text/font-stretch-parse-expected.txt:
  • platform/mac-elcapitan/fast/text/font-style-parse-expected.txt:
  • platform/mac-elcapitan/fast/text/font-weight-parse-expected.txt:
12:21 AM Changeset in webkit [218445] by Carlos Garcia Campos
  • 11 edits
    2 moves in trunk/Source/WebKit2

[GTK] Rename WebContextMenuItemGtk as WebContextMenuItemGlib
https://bugs.webkit.org/show_bug.cgi?id=173469

Reviewed by Michael Catanzaro.

Now that we switched to GAction this is actually a glib implementation, we keep the GtkAction support only for
backwards compatibility. We could rename the file and make the GtkAction action conditional to the GTK+ port.

  • PlatformGTK.cmake:
  • Shared/glib/WebContextMenuItemGlib.cpp: Renamed from Source/WebKit2/Shared/gtk/WebContextMenuItemGtk.cpp.

(WebKit::gtkStockIDFromContextMenuAction):
(WebKit::WebContextMenuItemGlib::WebContextMenuItemGlib):
(WebKit::WebContextMenuItemGlib::~WebContextMenuItemGlib):
(WebKit::WebContextMenuItemGlib::buildActionName):
(WebKit::WebContextMenuItemGlib::createActionIfNeeded):

  • Shared/glib/WebContextMenuItemGlib.h: Renamed from Source/WebKit2/Shared/gtk/WebContextMenuItemGtk.h.
  • UIProcess/API/gtk/WebKitContextMenu.cpp:

(webkitContextMenuPopulate):

  • UIProcess/API/gtk/WebKitContextMenuActions.cpp:

(webkitContextMenuActionGetForContextMenuItem):

  • UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h:
  • UIProcess/API/gtk/WebKitContextMenuItem.cpp:

(webkitContextMenuItemCreate):
(webkitContextMenuItemToWebContextMenuItemGlib):
(webkit_context_menu_item_new):
(webkit_context_menu_item_new_from_gaction):
(webkit_context_menu_item_new_from_stock_action):
(webkit_context_menu_item_new_from_stock_action_with_label):
(webkit_context_menu_item_new_with_submenu):
(webkit_context_menu_item_new_separator):

  • UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
  • UIProcess/API/gtk/WebKitContextMenuPrivate.h:
  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewPopulateContextMenu):

  • UIProcess/gtk/WebContextMenuProxyGtk.cpp:

(WebKit::WebContextMenuProxyGtk::append):
(WebKit::WebContextMenuProxyGtk::buildMenu):
(WebKit::WebContextMenuProxyGtk::populate):

  • UIProcess/gtk/WebContextMenuProxyGtk.h:
Note: See TracTimeline for information about the timeline view.