Timeline



Feb 27, 2018:

11:49 PM Changeset in webkit [229088] by commit-queue@webkit.org
  • 6 edits
    2 deletes in trunk

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

This patch causes crashes on two SVG tests (Requested by fredw
on #webkit).

Reverted changeset:

"Relayout frames after AsyncFrameScrolling or FrameFlattening
option is changed"
https://bugs.webkit.org/show_bug.cgi?id=183081
https://trac.webkit.org/changeset/229060

9:41 PM Changeset in webkit [229087] by keith_miller@apple.com
  • 24 edits in trunk/Source/JavaScriptCore

Replace TrustedImmPtr(0) with TrustedImmPtr(nullptr)
https://bugs.webkit.org/show_bug.cgi?id=183195

Reviewed by Mark Lam.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::patchableBranchPtr):
(JSC::MacroAssembler::patchableBranchPtrWithPatch):

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::branchPtrWithPatch):
(JSC::MacroAssemblerARM::storePtrWithPatch):

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::call):
(JSC::MacroAssemblerARM64::tailRecursiveCall):
(JSC::MacroAssemblerARM64::branchPtrWithPatch):
(JSC::MacroAssemblerARM64::patchableBranchPtrWithPatch):
(JSC::MacroAssemblerARM64::storePtrWithPatch):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::branchPtrWithPatch):
(JSC::MacroAssemblerARMv7::patchableBranchPtr):
(JSC::MacroAssemblerARMv7::patchableBranchPtrWithPatch):
(JSC::MacroAssemblerARMv7::storePtrWithPatch):

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::branchPtrWithPatch):
(JSC::MacroAssemblerMIPS::storePtrWithPatch):

  • assembler/MacroAssemblerX86.h:

(JSC::MacroAssemblerX86::branchPtrWithPatch):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::callWithSlowPathReturnType):
(JSC::MacroAssemblerX86_64::call):
(JSC::MacroAssemblerX86_64::tailRecursiveCall):
(JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
(JSC::MacroAssemblerX86_64::branchPtrWithPatch):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitAllocateRawObject):
(JSC::DFG::SpeculativeJIT::compileToLowerCase):
(JSC::DFG::SpeculativeJIT::compileMakeRope):
(JSC::DFG::SpeculativeJIT::compileGetTypedArrayByteOffset):
(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):
(JSC::DFG::SpeculativeJIT::compileCreateDirectArguments):
(JSC::DFG::SpeculativeJIT::compileNewArrayWithSpread):
(JSC::DFG::SpeculativeJIT::compileArraySlice):
(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::TrustedImmPtr::TrustedImmPtr):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileAllocateNewArrayWithSize):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::debugCall):
(JSC::AssemblyHelpers::sanitizeStackInline):

  • jit/IntrinsicEmitter.cpp:

(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCall):

  • jit/ScratchRegisterAllocator.cpp:

(JSC::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBufferForCall):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::initParenContextFreeList):
(JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
(JSC::Yarr::YarrGenerator::generate):

6:28 PM Changeset in webkit [229086] by commit-queue@webkit.org
  • 7 edits
    5 adds in trunk

Do not trigger a service worker match in case of document redirection if it will be already served by AppCache
https://bugs.webkit.org/show_bug.cgi?id=183185
<rdar://problem/37693796>

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-27
Reviewed by Chris Dumez.

Source/WebCore:

Disabling service worker matching in case there is a substitute data.
Otherwise there is a risk for a double load, substitute data first and the new load
triggered if matching a new registration.
A future fix should first do service worker registration matching and if there is no registration query appcache.

Test: http/tests/appcache/main-resource-redirect-with-sw.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::redirectReceived):

LayoutTests:

  • http/tests/appcache/main-resource-redirect-with-sw-expected.txt: Added.
  • http/tests/appcache/main-resource-redirect-with-sw.html: Added.
  • http/tests/appcache/resources/main-resource-redirect-with-sw.manifest: Added.
  • http/tests/appcache/resources/register-resources-service-worker.html: Added.
  • http/tests/appcache/service-worker-proxy.js: Added.
  • platform/gtk/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wpe/TestExpectations:
6:05 PM Changeset in webkit [229085] by Jonathan Bedard
  • 8 edits in trunk/Tools

Remove concept of 'future'
https://bugs.webkit.org/show_bug.cgi?id=183184
<rdar://problem/37958594>

Reviewed by Aakash Jain.

Remove concept of 'future' from expectations and instead
use a system of inheritance centered around the current version
of an OS for Mac and iOS.

Inheritance works like so:

| ....
V Future

High Sierra (mac)

mac-sierra
| mac-elcapitan
| ....

This does not change expectation inheritance for any currently running
configurations, it generalizes the logic already used.

  • Scripts/webkitpy/common/version_name_map.py:

(VersionNameMap.init): Remove all future versions.
(VersionNameMap.mapping_for_platform): Return empty dicts instead of
asserting.

  • Scripts/webkitpy/port/apple.py:

(ApplePort):
(ApplePort._allowed_versions): Return all available versions.
(ApplePort._generate_all_test_configurations): Instead of picking from a set
of allowed versions, assume that every specified version is allowed.
(ApplePort._port_name_with_version): Deleted.

  • Scripts/webkitpy/port/darwin.py: Add CURRENT_VERSION overridden by subclasses.

(DarwinPort):

  • Scripts/webkitpy/port/ios.py:

(IOSPort):
(IOSPort.default_baseline_search_path): Use system of inheritance centered around
the current version.

  • Scripts/webkitpy/port/mac.py:

(MacPort):
(MacPort.init): Use current version by default.
(MacPort.default_baseline_search_path): Use system of inheritance centered around
the current version.
(MacPort.configuration_specifier_macros): Use the same set of version names
supported in default_baseline_search_path.

  • Scripts/webkitpy/port/mac_unittest.py:

(MacTest.test_versions): Remove 'future' tests.

5:32 PM Changeset in webkit [229084] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=183094

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
5:24 PM Changeset in webkit [229083] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/dom/Window/window-focus-self.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=183164

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:46 PM WebKitGTK/Gardening/Calendar edited by Michael Catanzaro
(diff)
3:46 PM Changeset in webkit [229082] by Michael Catanzaro
  • 5 edits in trunk

Unreviewed GTK test gardening

Tools:

  • TestWebKitAPI/glib/TestExpectations.json:

LayoutTests:

3:45 PM Changeset in webkit [229081] by timothy_horton@apple.com
  • 6 edits in trunk/Source

Ensure target triple is propagated correctly to DerivedSources.make
https://bugs.webkit.org/show_bug.cgi?id=183189
<rdar://problem/37959694>

Reviewed by Dan Bernstein.

If we don't propagate the target triple, we can sometimes build with
the wrong options enabled.

  • Configurations/Base.xcconfig:

Mentioning LLVM_TARGET_TRIPLE_SUFFIX here is required to get it to be available to scripts.

  • DerivedSources.make:

Propagate the target triple into our compiler invocations.

2:57 PM Changeset in webkit [229080] by commit-queue@webkit.org
  • 14 edits
    5 adds in trunk

AX: Spell check and style attributes should be optional when fetching attributed string
https://bugs.webkit.org/show_bug.cgi?id=160744

Patch by Doug Russell <doug@getitdownonpaper.com> on 2018-02-27
Reviewed by Chris Fleizach.

The overhead of fetching a spell checked attributed string via AX API is substantial.
In some cases on the order of 7/8 of the total time spent fetching the string.

This change introduces the new attribute AXAttributedStringForTextMarkerRangeWithOptions which accepts an NSDictionary as it's parameter with keys "AXTextMarkerRange" (AXTextMarkerRangeRef) and "AXSpellCheck" (NSNumber(BOOL)).

AXAttributedStringForTextMarkerRange will remain unchanged.

Source/WebCore:

Tests: accessibility/mac/attributed-string/attributed-string-for-range-with-options.html

accessibility/mac/attributed-string/attributed-string-for-range.html

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(AXAttributedStringAppendText):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForRange:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Deleted.

Tools:

  • DumpRenderTree/AccessibilityUIElement.cpp:

(attributedStringForTextMarkerRangeCallback):
(attributedStringForTextMarkerRangeWithOptionsCallback):
(AccessibilityUIElement::attributedStringForTextMarkerRange):
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
(AccessibilityUIElement::getJSClass):

  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::attributedStringForTextMarkerRange):
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(createJSStringRef):
(AccessibilityUIElement::attributedStringForTextMarkerRange):
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::createJSStringRef):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):

LayoutTests:

  • accessibility/mac/attributed-string: Added.
  • accessibility/mac/attributed-string/attributed-string-for-range-expected.txt: Added.
  • accessibility/mac/attributed-string/attributed-string-for-range-with-options-expected.txt: Added.
  • accessibility/mac/attributed-string/attributed-string-for-range-with-options.html: Added.
  • accessibility/mac/attributed-string/attributed-string-for-range.html: Added.
  • accessibility/mac/bounds-for-range-expected.txt:
2:35 PM Changeset in webkit [229079] by dbates@webkit.org
  • 7 edits
    2 moves
    1 add
    1 delete in trunk

Standardize terminology for marked text
https://bugs.webkit.org/show_bug.cgi?id=180999

Reviewed by Zalan Bujtas.

The name MarkerSubrange is a misnomer for a data structure that associates a text subrange with a type
and optional document marker. In particular, a MarkerSubrange may not always correspond to a document
marker. For instance, selected text is represented using a MarkerSubrange that does not have a
corresponding document marker. Let's standardize on the phrase "marked text" as the canonical way to
describe these tagged text subranges.

Source/WebCore:

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::localSelectionRect const):
(WebCore::InlineTextBox::MarkedTextStyle::areBackgroundMarkedTextStylesEqual):
(WebCore::InlineTextBox::MarkedTextStyle::areForegroundMarkedTextStylesEqual):
(WebCore::InlineTextBox::MarkedTextStyle::areDecorationMarkedTextStylesEqual):
(WebCore::InlineTextBox::StyledMarkedText::StyledMarkedText):
(WebCore::createMarkedTextFromSelectionInBox):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintPlatformDocumentMarkers):
(WebCore::InlineTextBox::paintPlatformDocumentMarker):
(WebCore::InlineTextBox::computeStyleForUnmarkedMarkedText const):
(WebCore::InlineTextBox::resolveStyleForMarkedText):
(WebCore::InlineTextBox::subdivideAndResolveStyle):
(WebCore::InlineTextBox::coalesceAdjacentMarkedTexts):
(WebCore::InlineTextBox::collectMarkedTextsForDraggedContent):
(WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers):
(WebCore::InlineTextBox::paintMarkedTexts):
(WebCore::InlineTextBox::paintMarkedTextBackground):
(WebCore::InlineTextBox::paintMarkedTextForeground):
(WebCore::InlineTextBox::paintMarkedTextDecoration):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::MarkerSubrangeStyle::areBackgroundMarkerSubrangeStylesEqual): Deleted.
(WebCore::InlineTextBox::MarkerSubrangeStyle::areForegroundMarkerSubrangeStylesEqual): Deleted.
(WebCore::InlineTextBox::MarkerSubrangeStyle::areDecorationMarkerSubrangeStylesEqual): Deleted.
(WebCore::InlineTextBox::StyledMarkerSubrange::StyledMarkerSubrange): Deleted.
(WebCore::createMarkerSubrangeFromSelectionInBox): Deleted.
(WebCore::InlineTextBox::computeStyleForUnmarkedMarkerSubrange const): Deleted.
(WebCore::InlineTextBox::resolveStyleForSubrange): Deleted.
(WebCore::InlineTextBox::coalesceAdjacentSubranges): Deleted.
(WebCore::InlineTextBox::collectSubrangesForDraggedContent): Deleted.
(WebCore::InlineTextBox::collectSubrangesForDocumentMarkers): Deleted.
(WebCore::InlineTextBox::paintMarkerSubranges): Deleted.
(WebCore::InlineTextBox::paintTextSubrangeBackground): Deleted.
(WebCore::InlineTextBox::paintTextSubrangeForeground): Deleted.
(WebCore::InlineTextBox::paintTextSubrangeDecoration): Deleted.

  • rendering/InlineTextBox.h:

(WebCore::InlineTextBox::paintMarkedTexts):
(WebCore::InlineTextBox::paintMarkerSubranges): Deleted.

  • rendering/MarkedText.cpp: Renamed from Source/WebCore/rendering/MarkerSubrange.cpp.

(WebCore::subdivide):

  • rendering/MarkedText.h: Renamed from Source/WebCore/rendering/MarkerSubrange.h.

(WebCore::MarkedText::MarkedText):
(WebCore::MarkedText::isEmpty const):
(WebCore::MarkedText::operator!= const):
(WebCore::MarkedText::operator== const):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/MarkedText.cpp: Added.

(WebCore::operator<<):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp: Removed.
2:23 PM Changeset in webkit [229078] by jmarcell@apple.com
  • 7 edits in branches/safari-605-branch/Source

Versioning.

2:21 PM Changeset in webkit [229077] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.0-branch/Source

Versioning.

2:19 PM Changeset in webkit [229076] by jmarcell@apple.com
  • 7 edits in branches/safari-605.1.33.1-branch/Source

Versioning.

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

[Win64] JSCOnly compile error using VS2017 and cmake
https://bugs.webkit.org/show_bug.cgi?id=183176

Patch by Karlen Simonyan <szkarlen@gmail.com> on 2018-02-27
Reviewed by Alex Christensen.

  • wtf/PlatformJSCOnly.cmake:
2:12 PM Changeset in webkit [229074] by jmarcell@apple.com
  • 1 copy in branches/safari-605.1.33.1-branch

New branch.

2:12 PM Changeset in webkit [229073] by jmarcell@apple.com
  • 1 copy in branches/safari-605.1.33.0-branch

New branch.

2:11 PM Changeset in webkit [229072] by jmarcell@apple.com
  • 1 edit in branches/safari-605-branch/Source/WebCore/dom/EventTarget.cpp

Revert r229068. rdar://problem/37156477

1:47 PM Changeset in webkit [229071] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed, roll out r228430.

Roll out r228430 now that it is no longer needed after r228852.

No new tests, initial fix is still covered by WebKit.RespondToPolicyForNavigationResponseAsynchronously
API test.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::stopLoading):

  • loader/NavigationScheduler.cpp:

(WebCore::NavigationScheduler::schedule):

1:08 PM Changeset in webkit [229070] by graouts@webkit.org
  • 2 edits in trunk/LayoutTests

Unreviewed, marking a number of Web Animations WPT tests non-flaky.

1:05 PM Changeset in webkit [229069] by graouts@webkit.org
  • 19 edits in trunk

[Web Animations] Correct implementation of pending tasks and promises
https://bugs.webkit.org/show_bug.cgi?id=183161

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update test expectations with progressions (+32 WPT PASS).

  • web-platform-tests/web-animations/interfaces/Animatable/animate-no-browsing-context-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/finish-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/finished-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/onfinish-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/pause-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/pending-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/startTime-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/canceling-an-animation-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/pausing-an-animation-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/play-states-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/reversing-an-animation-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
  • web-platform-tests/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:

Source/WebCore:

We had an incorrect implementation of the spec due to two misinterpretations.

The first one is about pending tasks (play and pause) which the spec says should
be performed by "scheduling a task". In WebCore, this means using postTask() on a
ScriptExecutionContext, such as Document. One of the big practical changes is that
calling play() on an animation correctly sets its startTime to null (unresolved)
immediately after the call to play() returns before setting it to a resolved value
when the task is performed asynchronously. As a result, the playState is now always
accurate.

The second one is about promises where new promises need to be created in certain
situations called out by the spec. We used to call clear() on them, but this merely
resets the fulfillment or rejection state of the promise, while the spec requires
a different object to be returned for the promise. We now create our promises using
makeUniqueRef<> when new promise objects are expected to be created.

This patch also corrects a few smaller bugs and spec compliant issues, called out
below, related to pending tasks and promises uncovered while looking at relevant
WPT tests.

  • animation/DocumentTimeline.h: Expose the Document used to create this timeline such

that it may be used by WebAnimation objects registered for this timeline when scheduling
a task is required via postTask().

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::WebAnimation):
(WebCore::WebAnimation::setBindingsStartTime):
(WebCore::WebAnimation::setCurrentTime):
(WebCore::WebAnimation::cancel): Ensure the finished promise has not already been fulfilled
before rejecting it. While the spec does not specifically call this out, a promise may not
be rejected after being fulfilled, and we would hit an ASSERT if we didn't also check that
it was in the correct pending state before attemping to reject it.
(WebCore::WebAnimation::resetPendingTasks):
(WebCore::WebAnimation::finish):
(WebCore::WebAnimation::updateFinishedState):
(WebCore::WebAnimation::finishNotificationSteps):
(WebCore::WebAnimation::play): We used to only check for a pending pause task before canceling
that task, but the spec says to check for either a pending pause or play task (ie. pending())
and to cancel whichever is scheduled.
(WebCore::WebAnimation::runPendingPlayTask): We were missing an assertion called out by the
spec when running a pending task.
(WebCore::WebAnimation::pause):
(WebCore::WebAnimation::runPendingPauseTask):
(WebCore::WebAnimation::updatePendingTasks): We now use postTask() on the animation's associated
timeline's document to schedule pending tasks for which the criteria to run are met, ie. there
is an associated timeline.

  • animation/WebAnimation.h:
12:33 PM Changeset in webkit [229068] by jmarcell@apple.com
  • 1 edit in branches/safari-605-branch/Source/WebCore/dom/EventTarget.cpp

Apply patch. rdar://problem/37156477

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

Make it possible to set suggestions in extra zoom mode.
https://bugs.webkit.org/show_bug.cgi?id=183154
<rdar://problem/35227450>

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2018-02-27
Reviewed by Tim Horton.

In extra zoom mode, when presenting WKFocusedFormControlViewController, make it the inputDelegate for
WKContentView. This is needed to ensure we can capture/cache the suggestions when _WKInputSession's
suggestions is updated. Later, when we present WKTextInputViewController, we can pass the cached
suggestions.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView presentFocusedFormControlViewController:]): Set _focusedFormControlViewController as

the inputDelegate for WKContentView.

(-[WKContentView dismissFocusedFormControlViewController:]): Null the inputDelegate on dismissal.
(-[WKContentView presentTextInputViewController:]): Pass the suggestions from WKFocusedFormControlViewController to

WKTextInputViewController when the latter is presented.

(-[WKContentView textInputController:didCommitText:]): Call the new delegate method textInputController:didCommitText:withSuggestion:.
(-[WKContentView textInputController:didCommitText:withSuggestion:]): When a suggestions is selected, insert the

suggestion which will notify the client.

(-[WKContentView focusedFormControllerDidUpdateSuggestions:]): Called when the suggestion is updated after the input

view controller is presented.

10:21 AM Changeset in webkit [229066] by timothy_horton@apple.com
  • 6 edits
    1 add in trunk/Source

Stop using deprecated CADisplay SPI
https://bugs.webkit.org/show_bug.cgi?id=183150
<rdar://problem/37918297>

Reviewed by Simon Fraser.

  • pal/spi/cocoa/QuartzCoreSPI.h:

Switch to the more modern way of getting the display name.

  • Platform/spi/ios/FrontBoardServicesSPI.h: Added.
  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

  • WebKit.xcodeproj/project.pbxproj:

Switch to the more modern way of getting the display name.

10:04 AM Changeset in webkit [229065] by Ryan Haddad
  • 6 edits
    1 delete in trunk/Source

Unreviewed, rolling out r229055.

Breaks internal builds.

Reverted changeset:

"Stop using deprecated CADisplay SPI"
https://bugs.webkit.org/show_bug.cgi?id=183150
https://trac.webkit.org/changeset/229055

9:54 AM Changeset in webkit [229064] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

webkitpy Bugzilla transactions should retry on URLError
https://bugs.webkit.org/show_bug.cgi?id=183156

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/common/net/bugzilla/bugzilla.py:

(Bugzilla): Use NetworkTransaction.
(Bugzilla._fetch_bug_page_by_url):
(Bugzilla.bug_id_for_attachment_id):
(Bugzilla.get_bug_id_for_attachment_id):

9:16 AM Changeset in webkit [229063] by Wenson Hsieh
  • 20 edits
    1 add in trunk

[Extra zoom mode] Implement additional SPI for adjusting viewport shrink-to-fit behavior
https://bugs.webkit.org/show_bug.cgi?id=183100
<rdar://problem/37840987>

Reviewed by Tim Horton.

Source/WebCore:

Introduce new customization options to ViewportConfiguration. The first is m_forceHorizontalShrinkToFit, which
(when set to true) forces the viewport to scale using shrink-to-fit heuristics, regardless of whether
"shrink-to-fit=no" is specified via viewport parameters or if content width did not exceed minimum layout size.
The second is m_viewSize, which reflects the true size of the viewport. See WebKit ChangeLog for more details.

Tests: ViewportSizingTests.ForceShrinkToFitViewportOverridesViewportParameters

ViewportSizingTests.ShrinkToFitViewportWithMinimumAllowedLayoutWidth

  • page/ViewportConfiguration.cpp:

(WebCore::ViewportConfiguration::ViewportConfiguration):
(WebCore::ViewportConfiguration::setMinimumLayoutSize):

Plumb the real size of the view alongside the minimum layout size when updating the minimum layout size.

(WebCore::ViewportConfiguration::setForceHorizontalShrinkToFit):
(WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints const):

Bail early and return true if forceHorizontalShrinkToFit is set. This forces shrink-to-fit even in cases where
"shrink-to-fit" is set to "no", or content dimensions don't exceed layout dimensions.

(WebCore::ViewportConfiguration::initialScaleFromSize const):

Use view dimensions rather than minimum layout dimensions when computing the initial scale. Minimum layout size
is no longer always equal to the size of the view if the client has specified a minimum allowed layout width. As
such, when computing the initial scale, to ensure that the content (which was laid out using the minimum layout
size) fits within the real viewport, we need to divide real viewport dimensions by content dimensions.

(WebCore::ViewportConfiguration::minimumScale const):

Similarly, use view size instead of minimum layout size to compute minimum scale.

(WebCore::ViewportConfiguration::description const):

  • page/ViewportConfiguration.h:

Source/WebKit:

Add new SPI hooks to provide finer control over certain aspects of the shrink-to-fit viewport heuristic.
Currently, in certain cases of iPad multitasking, Safari allows shrinking content to fit by default. This means
that even when "width=device-width" is used, if the contents of the page are too wide to fit within the
viewport's width, we'll adjust the initial scale such that the viewport can fit all of the content.

However, in certain viewport dimensions, this heuristic is insufficient to ensure that pages are laid out and
displayed properly within the viewport. Namely, one could imagine that an element with a hard-coded width that
is larger than the real viewport width would cause all other elements with dimensions relative to the body to be
excessively shrunk down once shrink-to-fit is applied, so the page would still look broken even if the contents
of the page all fit within the viewport.

To mitigate this, we decouple the notions of minimum layout size from the size of the actual viewport (which we
simply refer to as "view size"). This allows us to introduce a mechanism where we lay out the page at a given
minimum layout size that is larger than the size of the view; later, when we determine the initial scale, we
then apply shrink-to-fit scaling using the view size rather than the minimum layout size. This grants us the
ability to lay out content as if our view were large, but still ensure that the contents of the page fit within
the actual view.

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::encode const):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::forceHorizontalShrinkToFit const):
(WebKit::operator==):

Plumb the forceHorizontalShrinkToFit flag through VisibleContentRectUpdateInfo.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:

Plumb viewSize through IPC to WebPage.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

Start off WKWebView flags at their initial values.

(-[WKWebView _minimumAllowedLayoutWidth]):
(-[WKWebView _setMinimumAllowedLayoutWidth:]):

This provides the minimum width at which the page will lay out, such that if the view width dips below this
value, we'll use this minimum allowed layout width instead. 0 by default.

(-[WKWebView activeMinimumLayoutSizes:]):

Refactor this from a static function to a helper method on WKWebView that computes both the minimum layout size
(which takes minimum allowed layout width into account) as well as the real view size. Refactor all call sites
to use this new method, and also propagate the view size down via IPC, alongside the minimum layout size.

(-[WKWebView _dispatchSetMinimumLayoutSize:viewSize:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _setMinimumLayoutSizeOverride:]):
(-[WKWebView _setForceHorizontalViewportShrinkToFit:]):
(-[WKWebView _forceHorizontalViewportShrinkToFit]):

Setting this flag to YES forces us to always shrink-to-fit in the horizontal axis. NO by default.

(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
(activeMinimumLayoutSize): Deleted.

More refactoring to replace activeMinimumLayoutSize() with -activeMinimumLayoutSizes:.

(-[WKWebView _dispatchSetMinimumLayoutSize:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):

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

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

Pass _forceHorizontalViewportShrinkToFit into the visible content rect update.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):

Plumb viewSize alongside the existing minimumLayoutSize.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_credentialsMessenger):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::updateVisibleContentRects):

Set forceHorizontalShrinkToFit on the viewport configuration here.

Tools:

Add API tests that exercise -_setMinimumAllowedLayoutWidth: and -_setForceHorizontalViewportShrinkToFit:. See
WebKit ChangeLog for more detail.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/ViewportSizingTests.mm: Added.

(TestWebKitAPI::while):
(viewportTestPageMarkup):
(TestWebKitAPI::TEST):

8:55 AM WebKitGTK/2.20.x edited by Michael Catanzaro
(diff)
8:43 AM Changeset in webkit [229062] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the debug build after r228877.

In the case where CAN_DISALLOW_USER_INSTALLED_FONTS is enabled, this function doesn't return anything when
allowUserInstalledFonts != AllowUserInstalledFonts::No. Fix the build by moving return nullptr; back out of
the #else.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::installedFontMandatoryAttributes):

8:39 AM Changeset in webkit [229061] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Potential privacy issue: DNS prefetching can be re-enabled
https://bugs.webkit.org/show_bug.cgi?id=182924

Patch by Milan Crha <mcrha@redhat.com> on 2018-02-27
Reviewed by Michael Catanzaro.

  • dom/Document.cpp:

(WebCore::Document::parseDNSPrefetchControlHeader):

6:00 AM Changeset in webkit [229060] by fred.wang@free.fr
  • 5 edits
    2 adds in trunk

Relayout frames after AsyncFrameScrolling or FrameFlattening option is changed
https://bugs.webkit.org/show_bug.cgi?id=183081

Patch by Frederic Wang <fwang@igalia.com> on 2018-02-27
Reviewed by Antonio Gomes.

Add a test to check whether an iframe changes its flattening status after one of the option
AsyncFrameScrolling/FrameFlattening is enabled/disabled.

  • platform/ios-simulator/TestExpectations: Remove failure.
  • platform/ios/fast/frames/flattening/iframe-flattening-async-frame-scrolling-dynamic-expected.txt: Added.
  • platform/ios/fast/frames/flattening/iframe-flattening-async-frame-scrolling-dynamic.html: Added.
5:03 AM Changeset in webkit [229059] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

[Web Animations] Implement the procedure to set the target effect of an animation
https://bugs.webkit.org/show_bug.cgi?id=183146

Reviewed by Dean Jackson.

We only had a partial implementation of setEffect() and we now update it to cover the entire
implementation as mandated by the spec. While this doesn't yield any WPT results changes, this
patch will help getting a significant number of new PASS results when we get around to implement
correct support for async procedures (pending pause/play tasks and promises) in the next patch.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setEffect):

5:00 AM Changeset in webkit [229058] by graouts@webkit.org
  • 6 edits in trunk

[Web Animations] Update the playState implementation
https://bugs.webkit.org/show_bug.cgi?id=183145

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update test expectations with slightly different failures later on in a couple of tests.

  • web-platform-tests/web-animations/timing-model/animations/set-the-timeline-of-an-animation-expected.txt:

Source/WebCore:

The Web Animations spec has changed since we first implemented the playState property and the "pending"
enum value has been dropped since then (there is a separate "pending" property which we also implement).
We update our implementation to match the latest spec text. This does not change WPT test results a lot,
but this patch will help getting a significant number of new PASS results when we get around to implementing
correct support for async procedures (pending pause/play tasks and promises) in a couple of patches.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::playState const):

  • animation/WebAnimation.h:
  • animation/WebAnimation.idl:
1:36 AM Changeset in webkit [229057] by Yusuke Suzuki
  • 5 edits in trunk

Unreviewed, skip FTL tests if FTL is disabled
https://bugs.webkit.org/show_bug.cgi?id=183071

JSTests:

  • stress/has-indexed-property-array-storage-ftl.js:
  • stress/has-indexed-property-slow-put-array-storage-ftl.js:

Tools:

  • Scripts/run-jsc-stress-tests:
12:06 AM Changeset in webkit [229056] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Address post-review comment after r229049.
https://bugs.webkit.org/show_bug.cgi?id=183142

Reviewed by Tim Horton.

Wrap a newly added string literal with ASCIILiteral.

  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::extraDefaultStyleSheet):

12:00 AM Changeset in webkit [229055] by timothy_horton@apple.com
  • 6 edits
    1 add in trunk/Source

Stop using deprecated CADisplay SPI
https://bugs.webkit.org/show_bug.cgi?id=183150
<rdar://problem/37918297>

Reviewed by Simon Fraser.

Source/WebCore/PAL:

  • pal/spi/cocoa/QuartzCoreSPI.h:

Switch to the more modern way of getting the display name.

Source/WebKit:

  • Platform/spi/ios/FrontBoardServicesSPI.h: Added.
  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):

  • WebKit.xcodeproj/project.pbxproj:

Switch to the more modern way of getting the display name.

Feb 26, 2018:

11:50 PM Changeset in webkit [229054] by mark.lam@apple.com
  • 35 edits in trunk/Source

Modernize FINALIZE_CODE and peer macros to use VA_ARGS arguments.
https://bugs.webkit.org/show_bug.cgi?id=183159
<rdar://problem/37930837>

Reviewed by Keith Miller.

Source/JavaScriptCore:

  • assembler/LinkBuffer.h:
  • assembler/testmasm.cpp:

(JSC::compile):

  • b3/B3Compile.cpp:

(JSC::B3::compile):

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

(JSC::B3::testEntrySwitchSimple):
(JSC::B3::testEntrySwitchNoEntrySwitch):
(JSC::B3::testEntrySwitchWithCommonPaths):
(JSC::B3::testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint):
(JSC::B3::testEntrySwitchLoop):

  • bytecode/InlineAccess.cpp:

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

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • dfg/DFGJITFinalizer.cpp:

(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileOSRExit):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitThunkGenerator):
(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::osrEntryThunkGenerator):

  • ftl/FTLJITFinalizer.cpp:

(JSC::FTL::JITFinalizer::finalizeCommon):

  • ftl/FTLLazySlowPath.cpp:

(JSC::FTL::LazySlowPath::generate):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):
(JSC::FTL::slowPathCallThunkGenerator):

  • jit/ExecutableAllocator.cpp:
  • jit/JIT.cpp:

(JSC::JIT::link):

  • jit/JITMathIC.h:

(JSC::isProfileEmpty):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompileGetByValWithCachedId):
(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::privateCompilePutByValWithCachedId):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::stringGetByValStubGenerator):

  • jit/JITStubRoutine.h:
  • jit/Repatch.cpp:

(JSC::linkPolymorphicCall):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::finalize):

  • jit/ThunkGenerators.cpp:

(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::linkCallThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::arityFixupGenerator):
(JSC::unreachableGenerator):
(JSC::boundThisNoArgsFunctionCallGenerator):

  • llint/LLIntThunks.cpp:

(JSC::LLInt::generateThunkWithJumpTo):

  • wasm/WasmBBQPlan.cpp:

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

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
(JSC::Wasm::throwStackOverflowFromWasmThunkGenerator):
(JSC::Wasm::triggerOMGTierUpThunkGenerator):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::handleBadI64Use):
(JSC::Wasm::wasmToJS):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::compile):

Source/WebCore:

No new tests needed because this is just a refactoring patch.

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):

11:32 PM Changeset in webkit [229053] by Yusuke Suzuki
  • 10 edits
    3 adds in trunk

[FTL] Support PutByVal(ArrayStorage/SlowPutArrayStorage)
https://bugs.webkit.org/show_bug.cgi?id=182965

Reviewed by Saam Barati.

JSTests:

  • stress/put-by-val-array-storage.js: Added.

(shouldBe):
(testArrayStorageInBounds):

  • stress/put-by-val-direct-out-of-bounds-setter.js: Added.

(shouldBe):
(testInt32.createBuiltin):
(set for):

  • stress/put-by-val-slow-put-array-storage.js: Added.

(shouldBe):
(testArrayStorageInBounds):

Source/JavaScriptCore:

This patch extends FTL coverage for PutByVal by adding ArrayStorage and SlwoPutArrayStorage support.
Basically large part of the patch is porting from DFG code. Since PutByVal already emits CheckInBounds
for InBounds case, we do not have OutOfBounds check for that case.
This is the last change for FTL to support all the types of DFG nodes except for CreateThis.

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

(JSC::DFG::SpeculativeJIT::compileDoublePutByVal):

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::contiguousPutByValOutOfBounds):
For consistency, we use operationPutByValXXX and operationPutByValDirectXXX.
But except for SlowPutArrayStorage case, basically it is meaningless since
we do not have indexed accessors.

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

Versioning.

7:00 PM Changeset in webkit [229051] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Removed references to files that were removed in r228912.

  • WebCore.xcodeproj/project.pbxproj: Removed references to SourcesIOS.txt and SourcesMac.txt.
6:31 PM Changeset in webkit [229050] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.32

Tag Safari-605.1.32.

5:32 PM Changeset in webkit [229049] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[Extra zoom mode] Tweak UA stylesheet to improve legibility of rendered text
https://bugs.webkit.org/show_bug.cgi?id=183142
<rdar://problem/37912966>

Reviewed by Tim Horton.

Force text-size-adjust and hyphens to be always on in EXTRA_ZOOM_MODE. To accomplish this, we override the extra
style sheet in RenderTheme to include these two style rules.

  • rendering/RenderThemeIOS.h:
  • rendering/RenderThemeIOS.mm:

(WebCore::RenderThemeIOS::extraDefaultStyleSheet):

5:31 PM Changeset in webkit [229048] by don.olmstead@sony.com
  • 33 edits in trunk

Fix WebCore includes within WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=183147

Reviewed by Tim Horton.

Source/WebCore:

No new tests. No change in behavior.

  • PlatformWin.cmake:
  • platform/win/GDIUtilities.h:

Source/WebKitLegacy:

  • CMakeLists.txt:

Source/WebKitLegacy/win:

  • Plugins/PluginDatabase.cpp:
  • Plugins/PluginDatabaseWin.cpp:
  • Plugins/PluginDebug.cpp:
  • Plugins/PluginDebug.h:
  • Plugins/PluginMainThreadScheduler.cpp:
  • Plugins/PluginMessageThrottlerWin.cpp:
  • Plugins/PluginMessageThrottlerWin.h:
  • Plugins/PluginPackage.cpp:
  • Plugins/PluginPackage.h:
  • Plugins/PluginPackageWin.cpp:
  • Plugins/PluginStream.cpp:
  • Plugins/PluginStream.h:
  • Plugins/PluginView.cpp:
  • Plugins/PluginView.h:
  • Plugins/PluginViewWin.cpp:
  • Plugins/npapi.cpp:
  • WebCoreSupport/WebChromeClient.cpp:
  • WebCoreSupport/WebContextMenuClient.cpp:
  • WebCoreSupport/WebFrameLoaderClient.cpp:
  • WebCoreSupport/WebInspectorClient.cpp:
  • WebCoreSupport/WebPlatformStrategies.cpp:
  • WebFrame.cpp:
  • WebKitMessageLoop.cpp:
  • WebView.cpp:
  • storage/WebDatabaseProvider.cpp:

Tools:

  • MiniBrowser/win/ResourceLoadDelegate.cpp:
4:56 PM Changeset in webkit [229047] by Ryan Haddad
  • 2 edits in branches/safari-605-branch/LayoutTests

Work towards rdar://problem/36837397.

Unreviewed test gardening.

  • inspector/canvas/recording-2d-expected.txt:
4:20 PM Changeset in webkit [229046] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Add some more release logging related to DocumentWriter::addData crash
https://bugs.webkit.org/show_bug.cgi?id=183141

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

No change of behavior.
Add some additional release logging to verify whether DocumentWriter::begin was called and exited before updating its state.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::commitData):

  • loader/DocumentWriter.cpp:

(WebCore::DocumentWriter::begin):

  • loader/DocumentWriter.h:
4:04 PM Changeset in webkit [229045] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Caches::m_storage should be set to null in case of error at initialization time
https://bugs.webkit.org/show_bug.cgi?id=183068

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

In case of error, we need to set m_storage back to nullptr so that
next tries to initialize it will restart from scratch.
If we do not set it to nullptr, we end up storing the initialize
callback in a queue and the callback will never be called.

This is difficult to test as we need the following conditions:

  • we need to have an error case, like a disk writing error
  • we need the web app to open a cache in two different pages/frames at about the same time.
  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::initialize):

3:52 PM Changeset in webkit [229044] by webkit@devinrousso.com
  • 3 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Canvas Tab: Scroll into view / Inspect element if Canvas has DOM node
https://bugs.webkit.org/show_bug.cgi?id=181769

Reviewed by Matt Baker.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Images/Markup.svg: Added.
  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView):
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype._canvasElementButtonClicked):

3:20 PM Changeset in webkit [229043] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

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

incorrectly assumes enumeration callback happens once
(Requested by alexchristensen on #webkit).

Reverted changeset:

"Use BlockPtrs and lambdas instead of new/delete to pass
parameters to blocks in WebViewImpl::performDragOperation"
https://bugs.webkit.org/show_bug.cgi?id=180795
https://trac.webkit.org/changeset/226330

1:38 PM Changeset in webkit [229042] by dbates@webkit.org
  • 1 edit in trunk/LayoutTests/ChangeLog

Fix up ChangeLog description for r229041 to clarify that we are skipping tests on GTK and WPE.

1:31 PM Changeset in webkit [229041] by dbates@webkit.org
  • 4 edits in trunk/LayoutTests

testRunner.setWindowIsKey() has no effect on the web process side in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=81736
<rdar://problem/11088268>

Remove some tests from the platform-independent WebKit2 TestExpectation file that
now pass on iOS and Mac following r189959 and r211910, respectively. Mark these
tests are failing on GTK and WPE. For GTK we need to fix <https://bugs.webkit.org/show_bug.cgi?id=183140>
For WPE we need to fix <https://bugs.webkit.org/show_bug.cgi?id=183144>.

The test fast/selectors/querySelector-window-inactive.html still fails on WebKit2,
but for a different reason. See <https://bugs.webkit.org/show_bug.cgi?id=183140>
for more details.

  • platform/gtk/TestExpectations:
  • platform/wk2/TestExpectations:
  • platform/wpe/TestExpectations:
1:15 PM Changeset in webkit [229040] by graouts@webkit.org
  • 4 edits in trunk

[Web Animations] Implement the procedure to set the start time
https://bugs.webkit.org/show_bug.cgi?id=183137

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update test expectations with progressions.

  • web-platform-tests/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:

Source/WebCore:

Implement the procedure to set the start time as setBindingsStartTime() and use the setStartTime() method as
an internal method to set the m_startTime instance variable and invalidate the timing model rather than run
the entire procedure which should only be called when setting the "startTime" property through the JS API.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setTimeline):
(WebCore::WebAnimation::setBindingsStartTime):
(WebCore::WebAnimation::setStartTime):
(WebCore::WebAnimation::silentlySetCurrentTime):
(WebCore::WebAnimation::finish):
(WebCore::WebAnimation::updateFinishedState):
(WebCore::WebAnimation::runPendingPlayTask):
(WebCore::WebAnimation::runPendingPauseTask):

1:02 PM Changeset in webkit [229039] by jmarcell@apple.com
  • 3 edits in branches/safari-605-branch/Source/WebKit

Cherry-pick r229037. rdar://problem/37912529

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

Cherry-pick r229031. rdar://problem/37912128

12:44 PM Changeset in webkit [229037] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebKit

Release assertion in WebPage::updatePreferences
https://bugs.webkit.org/show_bug.cgi?id=183075

Reviewed by Youenn Fablet and Chris Dumez.

Replaced the release assertion added in r228589 with a more graceful disabling of the feature when the entitlement is missing.

  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::didReceiveMessage): Added an early exit with an entitlement check to disable the feature.
(WebKit::StorageProcess::initializeWebsiteDataStore): Ditto.
(WebKit::StorageProcess::createStorageToWebProcessConnection): Replaced the release assertion with a debug assertion.
(WebKit::StorageProcess::swServerForSession): Removed the assertion. This code can be reached when the service worker is disabled.
(WebKit::StorageProcess::registerSWServerConnection): Replaced the release assertion with a debug assertion.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Disable the feature instead of crashing when the entitlement is missing.

12:42 PM Changeset in webkit [229036] by sbarati@apple.com
  • 3 edits
    1 add in trunk

validateStackAccess should not validate if the offset is within the stack bounds
https://bugs.webkit.org/show_bug.cgi?id=183067
<rdar://problem/37749988>

Reviewed by Mark Lam.

JSTests:

  • stress/dont-validate-stack-offset-in-b3-because-it-might-be-guarded-by-control-flow.js: Added.

(assert):
(test.a):
(test.b):
(test):

Source/JavaScriptCore:

The validation rule was saying that any load from the stack must be
within the stack bounds of the frame. However, it's natural for a user
of B3 to emit code that may be outside of B3's stack bounds, but guard
such a load with a branch. The FTL does exactly this with GetMyArgumentByVal.
B3 is wrong to assert that this is a static property about all stack loads.

  • b3/B3Validate.cpp:
12:23 PM Changeset in webkit [229035] by jmarcell@apple.com
  • 9 edits in branches/safari-605-branch

Cherry-pick r229027. rdar://problem/37909130

12:23 PM Changeset in webkit [229034] by jmarcell@apple.com
  • 13 edits in branches/safari-605-branch

Cherry-pick r228978. rdar://problem/37909154

12:23 PM Changeset in webkit [229033] by jmarcell@apple.com
  • 6 edits in branches/safari-605-branch/Source/WebCore

Cherry-pick r228972. rdar://problem/37909121

12:02 PM Changeset in webkit [229032] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[Curl] Cookies are not being added to the Cookie field in Request Headers
https://bugs.webkit.org/show_bug.cgi?id=183095

Patch by Christopher Reid <chris.reid@sony.com> on 2018-02-26
Reviewed by Alex Christensen.

Populating the Cookie request header field now that cookies are no longer handled in libcurl.

  • platform/network/curl/CookieJarCurlDatabase.cpp: Renaming the httpOnly variable as its actual use wasn't clear
  • platform/network/curl/ResourceHandleCurl.cpp:
11:53 AM Changeset in webkit [229031] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Regression(r223431): Crash under didReceiveChallenge in NetworkSessionCocoa
https://bugs.webkit.org/show_bug.cgi?id=183134
<rdar://problem/36339049>

Reviewed by Alex Christensen.

Like other delegates functions in this file, it is possible for didReceiveChallenge to get called
after _session has been nulled out. Other delegate functions already had early returns when
_session is null. However, such early return was missing in didReceiveChallenge.

This patch ends the early return to didReceiveChallenge so that we do not end up calling
_session->downloadID(taskIdentifier) on a null _session.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):

11:43 AM Changeset in webkit [229030] by graouts@webkit.org
  • 9 edits in trunk

[Web Animations] Ensure setting the hold time invalidates the timing model
https://bugs.webkit.org/show_bug.cgi?id=183136

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update test expectations with progressions.

  • web-platform-tests/css/css-multicol/multicol-gap-animation-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/cancel-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/finish-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/iterationComposite-expected.txt:

Source/WebCore:

We used to always set the m_holdTime member variable directly, but the computation of the currentTime
depends on the value of m_holdTime, so setting the hold time should invalidate the timing model as well
as setting the m_holdTime member variable. In this patch we add a new setHoldTime() private method that
sets the member variable and invalidates the timing model.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::setTimeline):
(WebCore::WebAnimation::setHoldTime):
(WebCore::WebAnimation::silentlySetCurrentTime):
(WebCore::WebAnimation::setCurrentTime):
(WebCore::WebAnimation::cancel):
(WebCore::WebAnimation::finish):
(WebCore::WebAnimation::updateFinishedState):
(WebCore::WebAnimation::play):
(WebCore::WebAnimation::runPendingPlayTask):
(WebCore::WebAnimation::pause):
(WebCore::WebAnimation::runPendingPauseTask):

  • animation/WebAnimation.h:
11:08 AM Changeset in webkit [229029] by commit-queue@webkit.org
  • 4 edits in trunk

[WinCairo] WebKit2_C.h should be included for TestWebKit
https://bugs.webkit.org/show_bug.cgi?id=182682

Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2018-02-26
Reviewed by Yusuke Suzuki.

.:

Added a new definition "BUILDING_WIN_CAIRO_WEBKIT" to specify
the wincairo webkit build.

  • Source/cmake/OptionsWinCairo.cmake:

Tools:

  • TestWebKitAPI/config.h:
10:01 AM Changeset in webkit [229028] by commit-queue@webkit.org
  • 7 edits in trunk/Source

MessagePort is not always destroyed in the right thread
https://bugs.webkit.org/show_bug.cgi?id=183053

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

Source/WebCore:

Make existingMessagePortForIdentifier take a lambda so that we hold the lock until there
is no longer a need to keep the MessagePort around.
This is very time sensitive and does not happen a lot when running WPT tests.

Update existing call sites to pass a lambda.

  • dom/MessagePort.cpp:

(WebCore::MessagePort::existingMessagePortForIdentifier):

  • dom/MessagePort.h:
  • dom/messageports/MessagePortChannelProviderImpl.cpp:

(WebCore::MessagePortChannelProviderImpl::postMessageToRemote):
(WebCore::MessagePortChannelProviderImpl::checkProcessLocalPortForActivity):

Source/WebKit:

Update code to pass a lambda to MessagePort::existingMessagePortForIdentifier.

  • WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp:

(WebKit::WebMessagePortChannelProvider::checkProcessLocalPortForActivity):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::messagesAvailableForPort):

9:38 AM Changeset in webkit [229027] by commit-queue@webkit.org
  • 9 edits in trunk

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

This is breaking some websites (Requested by youenn on
#webkit).

Reverted changeset:

"Use no-cache fetch mode when loading main documents with
location.reload()"
https://bugs.webkit.org/show_bug.cgi?id=181285
https://trac.webkit.org/changeset/226745

8:25 AM Changeset in webkit [229026] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, USE_GSTREAMER_PLAYBIN3 build fix.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

There is no such ENABLE_GSTREAMER_PLAYBIN3.

8:06 AM Changeset in webkit [229025] by Carlos Garcia Campos
  • 59 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228908 - [RenderTreeBuilder] ::willBeRemoved() does not need RenderTreeBuilder anymore.
https://bugs.webkit.org/show_bug.cgi?id=183019
<rdar://problem/37761421>

Reviewed by Antti Koivisto.

All the willBeDestroyed() mutations have been moved over to RenderTreeBuilder.

No change in functionality.

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::willBeDestroyed):

  • rendering/RenderBlock.h:
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::willBeDestroyed):

  • rendering/RenderBlockFlow.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::willBeDestroyed):

  • rendering/RenderBox.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::willBeDestroyed):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderCounter.cpp:

(WebCore::RenderCounter::willBeDestroyed):

  • rendering/RenderCounter.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::willBeDestroyed):

  • rendering/RenderElement.h:
  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::willBeDestroyed):

  • rendering/RenderEmbeddedObject.h:
  • rendering/RenderFragmentedFlow.cpp:

(WebCore::RenderFragmentedFlow::willBeDestroyed):

  • rendering/RenderFragmentedFlow.h:
  • rendering/RenderImage.cpp:

(WebCore::RenderImage::willBeDestroyed):

  • rendering/RenderImage.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::willBeDestroyed):

  • rendering/RenderInline.h:
  • rendering/RenderLayerModelObject.cpp:

(WebCore::RenderLayerModelObject::willBeDestroyed):

  • rendering/RenderLayerModelObject.h:
  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::willBeDestroyed):

  • rendering/RenderListBox.h:
  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::willBeDestroyed):

  • rendering/RenderListMarker.h:
  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::willBeDestroyed):

  • rendering/RenderMenuList.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::destroy):

  • rendering/RenderObject.h:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::willBeDestroyed):

  • rendering/RenderReplaced.h:
  • rendering/RenderSearchField.cpp:

(WebCore::RenderSearchField::willBeDestroyed):

  • rendering/RenderSearchField.h:
  • rendering/RenderSnapshottedPlugIn.cpp:

(WebCore::RenderSnapshottedPlugIn::willBeDestroyed):

  • rendering/RenderSnapshottedPlugIn.h:
  • rendering/RenderText.cpp:

(WebCore::RenderText::willBeDestroyed):

  • rendering/RenderText.h:
  • rendering/RenderTextControlMultiLine.cpp:

(WebCore::RenderTextControlMultiLine::willBeDestroyed):

  • rendering/RenderTextControlMultiLine.h:
  • rendering/RenderVideo.cpp:

(WebCore::RenderVideo::willBeDestroyed):

  • rendering/RenderVideo.h:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::willBeDestroyed):

  • rendering/RenderWidget.h:
  • rendering/svg/RenderSVGBlock.cpp:

(WebCore::RenderSVGBlock::willBeDestroyed):

  • rendering/svg/RenderSVGBlock.h:
  • rendering/svg/RenderSVGImage.cpp:

(WebCore::RenderSVGImage::willBeDestroyed):

  • rendering/svg/RenderSVGImage.h:
  • rendering/svg/RenderSVGInline.cpp:

(WebCore::RenderSVGInline::willBeDestroyed):

  • rendering/svg/RenderSVGInline.h:
  • rendering/svg/RenderSVGModelObject.cpp:

(WebCore::RenderSVGModelObject::willBeDestroyed):

  • rendering/svg/RenderSVGModelObject.h:
  • rendering/svg/RenderSVGResourceContainer.cpp:

(WebCore::RenderSVGResourceContainer::willBeDestroyed):

  • rendering/svg/RenderSVGResourceContainer.h:
  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::willBeDestroyed):

  • rendering/svg/RenderSVGRoot.h:
  • rendering/svg/RenderSVGText.cpp:

(WebCore::RenderSVGText::willBeDestroyed):

  • rendering/svg/RenderSVGText.h:
8:05 AM Changeset in webkit [229024] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228899 - [RenderTreeBuilder] Move RenderBoxModelObject::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=183014
<rdar://problem/37757428>

Reviewed by Antti Koivisto.

No change in functionality.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::~RenderBoxModelObject):
(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::continuationChainNode const):
(): Deleted.
(WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations): Deleted.

  • rendering/RenderBoxModelObject.h:
  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::RenderTreeBuilder):
(WebCore::RenderTreeBuilder::removeAndDestroy):

  • rendering/updating/RenderTreeBuilder.h:

(WebCore::RenderTreeBuilder::continuationBuilder):

  • rendering/updating/RenderTreeBuilderContinuation.cpp: Added.

(WebCore::RenderTreeBuilder::Continuation::Continuation):
(WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy):

  • rendering/updating/RenderTreeBuilderContinuation.h: Added.
8:05 AM Changeset in webkit [229023] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Tools

[GTK] Unsafe g_setenv use in MiniBrowser main
https://bugs.webkit.org/show_bug.cgi?id=182978

Reviewed by Carlos Garcia Campos.

setenv (and g_setenv) will randomly crash if called too late.

  • MiniBrowser/gtk/main.c:

(main):

6:34 AM Changeset in webkit [229022] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, manual rollout of r228866 causing EGL_BAD_CONTEXT errors

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
Create an EGL display, even in Wayland.

6:19 AM Changeset in webkit [229021] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228869 - [GStreamer] We need to adopt GstGlDisplays after GStreamer 1.13.1
https://bugs.webkit.org/show_bug.cgi?id=182996

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
Adopt references when running with GStreamer 1.13.1 to avoid
memory leaks.

6:19 AM Changeset in webkit [229020] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Revert "Merge r228866 - [GStreamer] Create a Wayland GL display instead of EGL"

This reverts commit ae0522d9bdcd6cb914d9a475abdf17172bd9be4a.

6:19 AM Changeset in webkit [229019] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Revert "Merge r228869 - [GStreamer] We need to adopt GstGlDisplays after GStreamer 1.13.1"

This reverts commit 48050e16b968b35602398e0764a44f3f646e6f00.

5:57 AM Changeset in webkit [229018] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228889 - [RenderTreeBuilder] Move RenderView::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=183009

Reviewed by Antti Koivisto.

No change in functionality.

  • dom/Document.cpp:

(WebCore::Document::destroyRenderTree):

  • rendering/RenderView.cpp:

(WebCore::RenderView::~RenderView):
(WebCore::RenderView::willBeDestroyed): Deleted.

  • rendering/RenderView.h:
5:57 AM Changeset in webkit [229017] by Carlos Garcia Campos
  • 6 edits
    1 delete in releases/WebKitGTK/webkit-2.20

Merge r228888 - [GTK] USE_UPOWER causes crashes inside a chroot or on systems with broken dbus/upower
https://bugs.webkit.org/show_bug.cgi?id=181825

Reviewed by Carlos Garcia Campos.

.:

Get rid of the upower-glib dependency. We will use upower's D-Bus API instead.

  • Source/cmake/FindUPowerGLib.cmake: Removed.
  • Source/cmake/OptionsGTK.cmake:

Source/WebCore:

We could fix this crash, but that would not be good enough, because upower-glib is a
synchronous API that wraps D-Bus calls. That's not acceptable for use in the web process.
Rewrite LowPowerModeNotifierGLib to use upower's D-Bus API directly, instead.

Note that this also enables LowPowerModeNotifier for WPE, since the USE(UPOWER) build
flag is no longer needed.

  • platform/LowPowerModeNotifier.cpp:
  • platform/LowPowerModeNotifier.h:
  • platform/glib/LowPowerModeNotifierGLib.cpp:

(WebCore::LowPowerModeNotifier::LowPowerModeNotifier):
(WebCore::LowPowerModeNotifier::updateWarningLevel):
(WebCore::LowPowerModeNotifier::warningLevelChanged):
(WebCore::LowPowerModeNotifier::gPropertiesChangedCallback):
(WebCore::LowPowerModeNotifier::~LowPowerModeNotifier):
(WebCore::LowPowerModeNotifier::updateState): Deleted.
(WebCore::LowPowerModeNotifier::warningLevelCallback): Deleted.

5:57 AM Changeset in webkit [229016] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebKit

Merge r228887 - Web Automation: failed provisional loads cause "Navigate To" command to hang
https://bugs.webkit.org/show_bug.cgi?id=183007
<rdar://problem/37751819>

Reviewed by Andy Estes.

This hang was revealed by WPT test current_url.py::get_current_url_file_protocol. Now the
test simply fails because Safari chooses a policy of 'Ignore' for externally-opened files.
I filed an upstream issue with the test here: https://github.com/w3c/webdriver/issues/1232

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
Notify the session that the load failed in the frame, just like we do
for non-provisional failed loads and successful loads.

5:57 AM Changeset in webkit [229015] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.20

Merge r228886 - VTTCue constructor should use 'double' type for startTime / endTime
https://bugs.webkit.org/show_bug.cgi?id=182988

Reviewed by Eric Carlson.

Source/WebCore:

VTTCue constructor should use 'double' type for startTime / endTime, not
'unrestricted double':

Otherwise, we end up potentially returning NaN for TextTrackCue.startTime / endTime,
even though those correctly use type 'double':

The new behavior is consistent with Firefox and Chrome.

No new tests, updated existing test.

  • bindings/js/JSDOMConvertNumbers.h:

(WebCore::JSConverter<IDLDouble>::convert):
Add assertion to make sure our implementation never tries to return NaN
for an IDL attribute of type 'double'. This would be invalid as per Web
IDL spec and would crash if the NaN being returned was impure as JSValue
could not store it as a double.

  • html/track/VTTCue.idl:

Update constructor parameters to use 'double' type instead of 'unrestricted
double', as per:

LayoutTests:

Update existing test to reflect behavior change.

  • media/track/track-add-remove-cue-expected.txt:
  • media/track/track-add-remove-cue.html:
5:37 AM Changeset in webkit [229014] by svillar@igalia.com
  • 6 edits in trunk/Source/WebCore

[WebVR][OpenVR] Retrieve displayId and the z-depth of eye view frustum
https://bugs.webkit.org/show_bug.cgi?id=182999

Reviewed by Žan Doberšek.

Retrieve the z-depth of the eye view frustum and the HMD unique id.
The unique identifier is generated by the VRPlatormManager whereas
we use the default values from the spec for the z-depth (those can
be changed by applications later via JavaScript).

Once this lands the only remaining data to be retrieved from VR
backends for VRDisplay is the pose (getPose() call) and the frame
data (getFrameData() call).

  • Modules/webvr/VRDisplay.cpp:

(WebCore::VRDisplay::VRDisplay):
(WebCore::VRDisplay::displayId const): Deleted.
(WebCore::VRDisplay::displayName const): Deleted.
(WebCore::VRDisplay::depthNear const): Deleted.
(WebCore::VRDisplay::setDepthNear): Deleted.
(WebCore::VRDisplay::depthFar const): Deleted.
(WebCore::VRDisplay::setDepthFar): Deleted.

  • Modules/webvr/VRDisplay.h:

(WebCore::VRDisplay::displayId const): Moved implementation from
source file.
(WebCore::VRDisplay::displayName const): Ditto.
(WebCore::VRDisplay::depthNear const):
(WebCore::VRDisplay::setDepthNear):
(WebCore::VRDisplay::depthFar const):
(WebCore::VRDisplay::setDepthFar):

  • platform/vr/VRManager.cpp:

(WebCore::VRManager::generateUniqueDisplayIdentifier):

  • platform/vr/VRManager.h:
  • platform/vr/VRPlatformDisplay.h:
  • platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:

(WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):

5:32 AM WebKitGTK/2.20.x edited by Carlos Garcia Campos
(diff)
5:27 AM WebKitGTK/2.20.x edited by Carlos Garcia Campos
(diff)
5:22 AM Changeset in webkit [229013] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228884 - [RenderTreeBuilder] Move RenderTextFragment::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182946
<rdar://problem/37690039>

Reviewed by Antti Koivisto.

No change in functionality.

  • rendering/RenderTextFragment.cpp:

(WebCore::RenderTextFragment::willBeDestroyed):

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::takeChild):

  • rendering/updating/RenderTreeBuilderFirstLetter.cpp:

(WebCore::RenderTreeBuilder::FirstLetter::cleanupOnRemoval):

  • rendering/updating/RenderTreeBuilderFirstLetter.h:
5:22 AM Changeset in webkit [229012] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228882 - [GCrypt] Remove unsound assertion from CryptoKeyRSA::exportData().
https://bugs.webkit.org/show_bug.cgi?id=183001

Reviewed by Philippe Normand.

This function is called from structured cloning, in particular when storing
a key in IndexedDB. This would trip the assertion if the key in question is
non-exportable.

The assertion was copied from the macOS implementation in r172389; it was
subsequently removed there in r172898 to handle this case.

Test: crypto/subtle/rsa-indexeddb-non-exportable.html

  • crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:

(WebCore::CryptoKeyRSA::exportData const): remove assertion.

5:22 AM Changeset in webkit [229011] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.20/Tools

Merge r228881 - [WTR][WPE] Correct the process names in TestController.
https://bugs.webkit.org/show_bug.cgi?id=178700

Reviewed by Michael Catanzaro.

Similar to r228731 for GTK.

  • Scripts/webkitpy/port/wpe.py:

(WPEPort._get_crash_log): removed the code to convert WebProcess name.

  • WebKitTestRunner/TestController.cpp: return the correct process names for WPE.

(WTR::TestController::webProcessName):
(WTR::TestController::networkProcessName):
(WTR::TestController::databaseProcessName):

5:22 AM Changeset in webkit [229010] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Tools

Merge r228879 - [ATK] Remove attributeSet variable from AccessibilityUIElement::attributedStringForRange().
https://bugs.webkit.org/show_bug.cgi?id=183000

Reviewed by Joanmarie Diggs.

It is never initialized, but is passed to atk_attribute_set_free.
This caused a crash in accessibility/content-editable-as-textarea.html on the debug bots.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::attributedStringForRange):

5:22 AM Changeset in webkit [229009] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228869 - [GStreamer] We need to adopt GstGlDisplays after GStreamer 1.13.1
https://bugs.webkit.org/show_bug.cgi?id=182996

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
Adopt references when running with GStreamer 1.13.1 to avoid
memory leaks.

5:14 AM Changeset in webkit [229008] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228866 - [GStreamer] Create a Wayland GL display instead of EGL
https://bugs.webkit.org/show_bug.cgi?id=182968

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
Add logging and instantiate a GstDisplayWayland display instead of
an EGL display when running under a Wayland compositor.

5:14 AM Changeset in webkit [229007] by Carlos Garcia Campos
  • 8 edits
    2 adds in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228862 - [RenderTreeBuilder] Move RenderFullScreen::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182947
<rdar://problem/37690848>

Reviewed by Antti Koivisto.

No change in functionality.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderFullScreen.cpp:

(WebCore::RenderFullScreen::willBeDestroyed):

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::takeChild):

  • rendering/updating/RenderTreeBuilder.h:

(WebCore::RenderTreeBuilder::fullScreenBuilder):

  • rendering/updating/RenderTreeBuilderFullScreen.cpp: Added.

(WebCore::RenderTreeBuilder::FullScreen::FullScreen):
(WebCore::RenderTreeBuilder::FullScreen::cleanupOnRemoval):

  • rendering/updating/RenderTreeBuilderFullScreen.h: Added.
  • rendering/updating/RenderTreeBuilderMathML.cpp:
5:14 AM Changeset in webkit [229006] by Carlos Garcia Campos
  • 11 edits
    1 add in releases/WebKitGTK/webkit-2.20

Merge r228860 - DFG::VarargsForwardingPhase should eliminate getting argument length
https://bugs.webkit.org/show_bug.cgi?id=182959

Reviewed by Keith Miller.

JSTests:

  • microbenchmarks/forward-arguments-dont-escape-on-arguments-length.js: Added.

Source/JavaScriptCore:

This patch teaches the DFG VarargsForwardingPhase to not treat
length accesses on Cloned/Direct Arguments objects as escapes.
It teaches this phase to materialize the length in the same
way the ArgumentsEliminationPhase does.

This is around a 0.5-1% speedup on ARES6 on my iMac. It speeds
up the ML subtest by 2-4%.

This patch also extends compileGetArgumentCountIncludingThis to take
a parameter that is the inline call frame to load from (in the case
where the inline call frame is a varargs frame). This allows the
the emitCodeToGetArgumentsArrayLength helper function to just emit
a GetArgumentCountIncludingThis node instead of a GetLocal. If we
emitted a GetLocal, we'd need to rerun CPS rethreading.

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArgumentsUtilities.cpp:

(JSC::DFG::emitCodeToGetArgumentsArrayLength):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::getArgumentCount):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGNode.h:

(JSC::DFG::Node::argumentsInlineCallFrame):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetArgumentCountIncludingThis):

  • dfg/DFGVarargsForwardingPhase.cpp:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetArgumentCountIncludingThis):

5:14 AM Changeset in webkit [229005] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228858 - [RenderTreeBuilder] Move RenderListItem::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182943
<rdar://problem/37689029>

Reviewed by Antti Koivisto.

We don't need to destroy the marker in RenderListItem::willBeRemoved(), because it gets deleted
in RenderTreeBuilder::removeAndDestroy() together with RenderListItem (as long as the marker is
the RenderListItem's descendent).

Covered by existing tests.

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::~RenderListItem):
(WebCore::RenderListItem::willBeDestroyed): Deleted.

  • rendering/RenderListItem.h:
5:07 AM Changeset in webkit [229004] by cturner@igalia.com
  • 2 edits in trunk/Source/WebCore

Fix build error with !LOG_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=183049

Reviewed by Philippe Normand.

The following error message was being reported when doing a
release build with -DLOG_DISABLED=0:

../../Source/WebCore/dom/messageports/MessagePortChannel.cpp: In member function ‘void WebCore::MessagePortChannel::entanglePortWithProcess(const WebCore::MessagePortIdentifier&, WebCore::ProcessIdentifier)’:

3:15 AM Changeset in webkit [229003] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.20/Source

Merge r228856 - Web Automation: combine session commands to resize and move top-level browsing contexts
https://bugs.webkit.org/show_bug.cgi?id=182749
<rdar://problem/37515170>

Reviewed by Andy Estes.

Source/WebDriver:

The new command can take either size or origin. Just have one session command for use by endpoints.

  • Session.cpp:

(WebDriver::Session::setWindowRect):
(WebDriver::Session::moveToplevelBrowsingContextWindow): Deleted.
(WebDriver::Session::resizeToplevelBrowsingContextWindow): Deleted.

  • Session.h:

Source/WebKit:

Since moving and resizing the window are both accomplished by setting the window frame,
and the W3C WebDriver specification has a Get/Set Window Rect command, it's time to
deduplicate these two methods which basically do the same thing.

Adopt modern JSON::Value getters that return std::optional<float>. I have been trying
to move the protocol over to this style wholesale, but it is probably easier to do
this conversion in smaller pieces. And so, I have started to do so.

This change is covered by existing WebDriver tests.

  • UIProcess/Automation/Automation.json: Add new command.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): Added.
(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext): Deleted.
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext): Deleted.

  • UIProcess/Automation/WebAutomationSession.h:

Source/WTF:

  • wtf/JSONValues.h: add a getDouble() implementation that returns a std::optional<T>

rather than using an out-parameter. I'd like to move more code to this style.

3:14 AM Changeset in webkit [229002] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebKit

Merge r228434 - Web Automation: don't return an error if resizing/moving a window has no effect
https://bugs.webkit.org/show_bug.cgi?id=182742

Reviewed by Tim Horton.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext):
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext):
Unify the behavior for all ports. Don't raise an error if the command was
idempotent (by mistake or not). It should not be an error to re-maximize a window.

3:14 AM Changeset in webkit [229001] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.20/Source/WebKit

Merge r228854 - ASSERT under WebAutomationSession::setProcessPool() when running W3C test suite a second time
https://bugs.webkit.org/show_bug.cgi?id=182991
<rdar://problem/37620578>

Reviewed by Timothy Hatcher.

Sometimes when running more than one session end-to-end with the same browser instance,
UIProcess would crash under addMessageReceiver because another WebAutomationSession was still
registered. This is hard to reproduce, but upon code inspection, the receiver management code
is somewhat problematic because it only runs when the WebAutomationSession destructor runs.
In some cases the client could retain two sessions and cause the first one to never remove itself
as the message receiver.

Instead of unregistering the session as a message receiver underneath the session's destructor,
do this whenever a new session supplants an old session since there is only one active session at a time.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::~WebAutomationSession):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::setAutomationSession):

2:45 AM Changeset in webkit [229000] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.20

Merge r228851 - Crash under JSC::JSCell::toNumber(JSC::ExecState*)
https://bugs.webkit.org/show_bug.cgi?id=182984
<rdar://problem/37694346>

Reviewed by Mark Lam.

Source/WebCore:

The issue was caused by DOMMatrix attributes potentially returning "impure"
NaN values. We would call JSC::jsNumber(double) to construct the JSValue
but this is only safe for pure NaN values. Make sure we purify the double
returned by the implementation for IDL attributes of type 'unrestricted double'
before calling JSC::jsNumber(double).

No new tests, extended existing test.

  • bindings/js/JSDOMConvertNumbers.h:

(WebCore::JSConverter<IDLUnrestrictedDouble>::convert):

  • testing/TypeConversions.h:

(WebCore::TypeConversions::testImpureNaNUnrestrictedDouble const):
(WebCore::TypeConversions::testImpureNaN2UnrestrictedDouble const):
(WebCore::TypeConversions::testQuietNaNUnrestrictedDouble const):

  • testing/TypeConversions.idl:

LayoutTests:

Add layout test coverage.

  • js/dom/webidl-type-mapping-expected.txt:
  • js/dom/webidl-type-mapping.html:
2:45 AM Changeset in webkit [228999] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.20

Merge r228828 - Make WebResourceLoadStatisticsStore::processStatisticsAndDataRecords() call WebProcessProxy::notifyPageStatisticsAndDataRecordsProcessed() in a proper callback
https://bugs.webkit.org/show_bug.cgi?id=182719
<rdar://problem/37517370>

Reviewed by Brent Fulgham.

Source/WebKit:

This will allow the page notification, statistics pruning, and persistence write
to be done at the right time and hopefully stabilize the layout tests including:
http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):

Now takes a callback parameter.

(WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):

  • UIProcess/WebResourceLoadStatisticsStore.h:

Now calls WebProcessProxy::notifyPageStatisticsAndDataRecordsProcessed()
in a callback provided to WebResourceLoadStatisticsStore::removeDataRecords().

LayoutTests:

  • platform/mac-wk2/TestExpectations:

Marked http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html
as [ Pass ].

  • platform/wk2/TestExpectations:

Marked http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store.html
as [ Pass ]. This should have been done already in r227223:
https://bugs.webkit.org/show_bug.cgi?id=181822

2:45 AM Changeset in webkit [228998] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20

Merge r228826 - [GTK][CMake] Support building with Enchant 2.x
https://bugs.webkit.org/show_bug.cgi?id=182933

Reviewed by Michael Catanzaro.

  • Source/cmake/FindEnchant.cmake: Check for both the "enchant" and "enchant-2"

pkg-config components, picking the first available for which the headers and
library are usable.

2:45 AM Changeset in webkit [228997] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.20

Merge r228822 - Handle all writing-modes in downcast
https://bugs.webkit.org/show_bug.cgi?id=182949
<rdar://problem/37710687>

Reviewed by Myles Maxfield.

Source/WebCore:

It appears we forgot to handle the deprecated "lr"
writing-mode value.

Test: fast/writing-mode/svg-writing-modes.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::operator WritingMode const):

LayoutTests:

Test all the deprecated SVG writing modes.

  • fast/writing-mode/svg-writing-modes-expected.html: Added.
  • fast/writing-mode/svg-writing-modes.html: Added.
2:05 AM Changeset in webkit [228996] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228796 - [GTK] whatsapp web blurry in some parts, sharp on others
https://bugs.webkit.org/show_bug.cgi?id=182673

Reviewed by Carlos Garcia Campos.

CoordinatedGraphicsLayer::createBackingStore() uses the scale factor returned by effectiveContentsScale(),
which is always 1 if selfOrAncestorHaveNonAffineTransforms() returns true. But this fuction always returns
true if the layer has an AnimatedPropertyTransform animation, which means that layers with those animations
won't use the appropriate scale factor, causing blurry renderings.

This patch removes the animations check, so animated layers properly use the required scale factor.

No new tests, no behavior change.

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

(WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):

2:05 AM Changeset in webkit [228995] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.20/Tools

Merge r228731 - [WTR][GTK] crash log backtrace doesn't show symbol names for DatabaseProcess and NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=182953

Patch by Fujii Hironori <Fujii Hironori> on 2018-02-19
Reviewed by Carlos Garcia Campos.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort._get_crash_log): Removed the code to convert WebProcess name.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::webProcessName): Return the correct program name for GTK+ port.
(WTR::TestController::networkProcessName): Ditto.
(WTR::TestController::databaseProcessName): Ditto.

2:03 AM Changeset in webkit [228994] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.20/Source/WebCore

Merge r228729 - Use selector filter when invalidating descendants
https://bugs.webkit.org/show_bug.cgi?id=182839
<rdar://problem/37581072>

Reviewed by Zalan Bujtas.

We can make descendant invalidation faster by enabling filtering.

  • css/SelectorFilter.cpp:

(WebCore::SelectorFilter::initializeParentStack):

Traverse and reverse the ancestor chain, and push it.

(WebCore::SelectorFilter::pushParent):
(WebCore::SelectorFilter::pushParentInitializingIfNeeded):

Add a version of pushParent that can initialize the stack.

(WebCore::SelectorFilter::popParent):
(WebCore::SelectorFilter::popParentsUntil):

Pop until a given parent element.

(WebCore::SelectorFilter::pushParentStackFrame): Deleted.
(WebCore::SelectorFilter::popParentStackFrame): Deleted.

These were the same as push/popParent.

  • css/SelectorFilter.h:

(WebCore::SelectorFilter::popParent): Deleted.

  • style/StyleInvalidator.cpp:

(WebCore::Style::Invalidator::invalidateStyleForDescendants):

Use pushParentInitializingIfNeeded.

(WebCore::Style::Invalidator::invalidateStyleWithMatchElement):

Use selector filter when doing descendant tree invalidation.
Make sure to pop it until the parent when reusing.

2:03 AM Changeset in webkit [228993] by Carlos Garcia Campos
  • 4 edits
    4 adds in releases/WebKitGTK/webkit-2.20

Merge r228728 - [FTL] Support ArrayPush for ArrayStorage
https://bugs.webkit.org/show_bug.cgi?id=182782

Reviewed by Saam Barati.

JSTests:

Existing array-push-multiple-storage.js covers ArrayPush(ArrayStorage) multiple arguments case.

  • stress/array-push-array-storage-beyond-int32.js: Added.

(shouldBe):
(test):

  • stress/array-push-array-storage.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-array-storage-beyond-int32.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-storage-continuous.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

This patch adds support for ArrayPush(ArrayStorage). We just port ArrayPush(ArrayStorage) in DFG to FTL.

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):

2:03 AM Changeset in webkit [228992] by Carlos Garcia Campos
  • 5 edits
    1 add in releases/WebKitGTK/webkit-2.20

Merge r228727 - [FTL] Support ArrayPop for ArrayStorage
https://bugs.webkit.org/show_bug.cgi?id=182783

Reviewed by Saam Barati.

JSTests:

  • stress/array-pop-array-storage.js: Added.

(shouldBe):
(test):

Source/JavaScriptCore:

This patch adds ArrayPop(ArrayStorage) support to FTL. We port the implementation in DFG to FTL.

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArrayPop):

2:03 AM Changeset in webkit [228991] by Carlos Garcia Campos
  • 6 edits
    5 adds in releases/WebKitGTK/webkit-2.20

Merge r228726 - [FTL] Add Arrayify for ArrayStorage and SlowPutArrayStorage
https://bugs.webkit.org/show_bug.cgi?id=182731

Reviewed by Saam Barati.

JSTests:

  • stress/arrayify-array-storage-array.js: Added.

(shouldBe):
(testArrayStorage):

  • stress/arrayify-array-storage-non-array.js: Added.

(shouldBe):
(testArrayStorage):

  • stress/arrayify-array-storage.js: Added.

(shouldBe):
(testArrayStorage):

  • stress/arrayify-slow-put-array-storage-pass-array-storage.js: Added.

(shouldBe):
(testArrayStorage):

  • stress/arrayify-slow-put-array-storage.js: Added.

(shouldBe):
(testArrayStorage):

Source/JavaScriptCore:

This patch adds support for Arrayify(ArrayStorage/SlowPutArrayStorage) to FTL.
Due to ArrayifyToStructure and CheckArray changes, necessary changes for
supporting Arrayify in FTL are already done. Just allowing it in FTLCapabilities.cpp
is enough.

We fix FTL's CheckArray logic. Previously, CheckArray(SlowPutArrayStorage) does not pass
ArrayStorage in FTL. But now it passes this as DFG does. Moreover, we fix DFG's CheckArray
where CheckArray(ArrayStorage+NonArray) can pass ArrayStorage+Array.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::silentFill):
(JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):

  • dfg/DFGSpeculativeJIT.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::isArrayTypeForArrayify):

1:55 AM Changeset in webkit [228990] by Carlos Garcia Campos
  • 8 edits
    1 add in releases/WebKitGTK/webkit-2.20

Merge r228725 - Don't use JSFunction's allocation profile when getting the prototype can be effectful
https://bugs.webkit.org/show_bug.cgi?id=182942
<rdar://problem/37584764>

Reviewed by Mark Lam.

JSTests:

  • stress/get-prototype-create-this-effectful.js: Added.

Source/JavaScriptCore:

Prior to this patch, the create_this implementation assumed that anything
that is a JSFunction can use the object allocation profile and go down the
fast path to allocate the |this| object. Implied by this approach is that
accessing the 'prototype' property of the incoming function is not an
effectful operation. This is inherent to the ObjectAllocationProfile
data structure: it caches the prototype field. However, getting the
'prototype' property might be an effectful operation, e.g, it could
be a getter. Many variants of functions in JS have the 'prototype' property
as non-configurable. However, some functions, like bound functions, do not
have the 'prototype' field with these attributes.

This patch adds the notion of 'canUseAllocationProfile' to JSFunction
and threads it through so that we only go down the fast path and use
the allocation profile when the prototype property is non-configurable.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ClassExprNode::emitBytecode):

  • dfg/DFGOperations.cpp:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::prototypeForConstruction):
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::canUseAllocationProfileNonInline):

  • runtime/JSFunction.h:

(JSC::JSFunction::ensureRareDataAndAllocationProfile):

  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::canUseAllocationProfile):

1:55 AM Changeset in webkit [228989] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.20

Merge r228724 - null m_lastNodeInserted dereference at ReplaceSelectionCommand::InsertedNodes::lastLeafInserted
https://bugs.webkit.org/show_bug.cgi?id=161947

Patch by Fujii Hironori <Fujii Hironori> on 2018-02-19
Reviewed by Ryosuke Niwa.

Source/WebCore:

InsertedNodes happened to be empty if the inserted nodes were
removed. Add more checks if InsertedNodes is empty.

No new tests (Covered by existing tests).

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::doApply): Return early if InsertedNodes becomes empty.

  • editing/ReplaceSelectionCommand.h:

(WebCore::ReplaceSelectionCommand::InsertedNodes::isEmpty): New method.
(WebCore::ReplaceSelectionCommand::InsertedNodes::lastLeafInserted const):
Assert m_lastNodeInserted is not null.
(WebCore::ReplaceSelectionCommand::InsertedNodes::pastLastLeaf const): Ditto.

LayoutTests:

  • platform/gtk/TestExpectations:

Unmarked editing/execCommand/crash-replacing-list-by-list.html and editing/inserting/insert-table-in-paragraph-crash.html.

1:55 AM Changeset in webkit [228988] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.20/Source/JavaScriptCore

Merge r228720 - Don't mark an array profile out of bounds for the cases where the DFG will convert the access to SaneChain
https://bugs.webkit.org/show_bug.cgi?id=182912
<rdar://problem/37685083>

Reviewed by Keith Miller.

In the baseline JIT and LLInt, when we loading a hole from an original array,
with the array prototype chain being normal, we end up marking the ArrayProfile
for that GetByVal as out of bounds. However, the DFG knows exactly how to
optimize this case by returning undefined when loading from a hole. Currently,
it only does this for Contiguous arrays (and sometimes Double arrays).
This patch just makes sure to not mark the ArrayProfile as out of bounds
in this scenario for Contiguous arrays, since the DFG will always optimize
this case.

However, we should extend this by profiling when a GetByVal loads a hole. By
doing so, we can optimize this for Int32, ArrayStorage, and maybe even Double
arrays. That work will happen in:
https://bugs.webkit.org/show_bug.cgi?id=182940

This patch is a 30-50% speedup on JetStream's hash-map test. This patch
speeds up JetStream by 1% when testing on my iMac.

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::refine const):

  • dfg/DFGFixupPhase.cpp:

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

  • jit/JITOperations.cpp:

(JSC::getByVal):
(JSC::canAccessArgumentIndexQuickly): Deleted.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getByVal):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::canAccessArgumentIndexQuickly):

1:43 AM Changeset in webkit [228987] by Carlos Garcia Campos
  • 5 edits in trunk/Source

[GStreamer] User current executable name instead of g_get_prgname() for gst_init
https://bugs.webkit.org/show_bug.cgi?id=183119

Reviewed by Philippe Normand.

Source/WebCore:

g_get_prgname() is only set for programs using GOptionContext, calling gtk_init or explicitly calling
g_set_prgname(). Use WTF::getCurrentExecutableName() instead.

  • platform/graphics/gstreamer/GStreamerUtilities.cpp:

(WebCore::initializeGStreamer):

Source/WTF:

Add getCurrentExecutableName() helper function to get the name of the current executable.

  • wtf/glib/GLibUtilities.cpp:

(getCurrentExecutableName): Get the basename of getCurrentExecutablePath() falling back to g_get_prgname().

  • wtf/glib/GLibUtilities.h:
12:57 AM Changeset in webkit [228986] by Yusuke Suzuki
  • 3 edits in trunk/JSTests

Unreviewed, skip FTL tests if FTL is disabled
https://bugs.webkit.org/show_bug.cgi?id=183071

  • stress/has-indexed-property-array-storage-ftl.js:
  • stress/has-indexed-property-slow-put-array-storage-ftl.js:
12:01 AM Changeset in webkit [228985] by commit-queue@webkit.org
  • 2 edits in trunk

[CMake][OpenVR] Linkage errors happen because only OpenVR is compiled with -stdlib=libc++ if Clang is used
https://bugs.webkit.org/show_bug.cgi?id=183116

Patch by Fujii Hironori <Fujii Hironori> on 2018-02-26
Reviewed by Žan Doberšek.

OpenVR has a option USE_LIBCXX to enable/disable that behavior. Let's disable it.

  • Source/CMakeLists.txt: Added a option command for USE_LIBCXX to set OFF as default.

Feb 25, 2018:

6:50 PM Changeset in webkit [228984] by commit-queue@webkit.org
  • 5 edits in trunk

[WK2] http/tests/navigation/new-window-redirect-history.html crashes
https://bugs.webkit.org/show_bug.cgi?id=127683

Patch by Fujii Hironori <Fujii Hironori> on 2018-02-25
Reviewed by Dan Bernstein.

Tools:

m_previousTestBackForwardListItem was null for the new window.
m_previousTestBackForwardListItem is initialized only for the main
window in InjectedBundlePage::prepare.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::dumpBackForwardList):
Do null-check of m_previousTestBackForwardListItem.

LayoutTests:

  • platform/ios-wk2/TestExpectations:

Unmarked http/tests/navigation/new-window-redirect-history.html.

  • platform/wk2/TestExpectations: Ditto.
6:18 PM Changeset in webkit [228983] by ap@apple.com
  • 7 edits in trunk/Tools

Various crashes in WebKitTestRunner, especially when system is under heavy load
https://bugs.webkit.org/show_bug.cgi?id=183109

Reviewed by Tim Horton.

WebKitTestRunner had many places where it sent messages to WebContent with a timeout,
but it didn't handle the timeout when it did occur. Nearly all of those would result
in logic errors and failing tests, and most would even result in stack corruption,
as the response handler modified local variables.

There is only one timeout scenario that we actually mean to handle in WKTR. That's
when a test freezes after it is done (e.g. an infinite loop in beforeunload) - we don't
want to blame the next test for freezing, so we silently relaunch WebContent.
Everything else is cargo cult code that never worked.

This patch addresses the crashes, and actually makes tests pass a lot more on an
overloaded system.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues): Moved m_doneResetting assignment
to where it's actually needed, for clarity.
(WTR::TestController::reattachPageToWebProcess): This function used to always hit
and ignore message timeout, as m_doneResetting is only updated by navigation callback
when the state is Resetting. This change makes it faster.
(WTR::TestController::platformResetStateToConsistentValues): Style fix.
(WTR::TestController::clearServiceWorkerRegistrations): Timing out here wasn't
handled in a meaningful manner, and would even corrupt the stack.
(WTR::TestController::clearDOMCache): Ditto.
(WTR::TestController::clearDOMCaches): Ditto.
(WTR::TestController::hasDOMCache): Ditto.
(WTR::TestController::domCacheSize): Ditto.
(WTR::TestController::isStatisticsPrevalentResource): Ditto.
(WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): Ditto.
(WTR::TestController::isStatisticsRegisteredAsRedirectingTo): Ditto.
(WTR::TestController::isStatisticsHasHadUserInteraction): Ditto.
(WTR::TestController::isStatisticsGrandfathered): Ditto.
(WTR::TestController::statisticsUpdateCookiePartitioning): Ditto.
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Ditto.
(WTR::TestController::statisticsClearInMemoryAndPersistentStore): Ditto.
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto.
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval): Ditto.

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::shortTimeout const): Made shortTimeout shorter (on a hunch).
(WTR::TestInvocation::invoke): Removed a timeout waiting for initial response. There
is never a logical reason for such a timeout, as we always have a new or responsive
WebContent process here.
(WTR::TestInvocation::dumpResults): Removed another timeout that we don't know how to
properly handle.
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Removed assignment to
m_errorMessage, which had no effect in this context.

  • WebKitTestRunner/TestInvocation.h: Removed no longer used code.
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::cocoaResetStateToConsistentValues): Use a named constant for
no timeout.

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformConfigureViewForTest): Removed a useless timeout.
Not sure if timing out here would corrupt the stack or not, but there is no reason
to impose arbitrary limits on individual steps of a test.

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::TestController::platformConfigureViewForTest): Use a named constant for
no timeout.

6:13 PM Changeset in webkit [228982] by ap@apple.com
  • 2 edits in trunk/Source/WebKit

Font smoothing doesn't get disabled if the preference is set before launching WebContent process
https://bugs.webkit.org/show_bug.cgi?id=183108

Reviewed by Tim Horton.

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

Fix the bug. While at it, also avoid the anti-pattern in setAlwaysUsesComplexTextCodePath.

2:36 PM Changeset in webkit [228981] by Wenson Hsieh
  • 4 edits in trunk/Source/WebCore

[Extra zoom mode] Disable downloadable binary fonts by default
https://bugs.webkit.org/show_bug.cgi?id=183102
<rdar://problem/37860699>

Reviewed by Tim Horton.

Disable downloadable binary fonts by default in extra zoom mode by making the initial value of
downloadableBinaryFontsEnabled conditional. Layout tests are not possible at this time; test to be added once
layout test support is in place.

  • page/Settings.yaml:
  • page/SettingsBase.cpp:

(WebCore::SettingsBase::defaultDownloadableBinaryFontsEnabled):

  • page/SettingsBase.h:
1:48 PM Changeset in webkit [228980] by ajuma@chromium.org
  • 2 edits in trunk/Tools

Unreviewed. Change my status to committer.

  • Scripts/webkitpy/common/config/contributors.json:
11:37 AM Changeset in webkit [228979] by Philippe Normand
  • 2 edits in trunk/Source/WebKit

Unreviewed GTK Debug build fix after r228942.

  • UIProcess/API/glib/IconDatabase.cpp:

(WebKit::IconDatabase::iconDatabaseSyncThread):
(WebKit::IconDatabase::syncThreadMainLoop):
(WebKit::IconDatabase::readFromDatabase):
(WebKit::IconDatabase::writeToDatabase):
(WebKit::IconDatabase::cleanupSyncThread):

11:02 AM Changeset in webkit [228978] by Chris Dumez
  • 13 edits in trunk

Service workers do not work well inside Web.app
https://bugs.webkit.org/show_bug.cgi?id=183105
<rdar://problem/37864140>

Reviewed by Youenn Fablet.

Source/WebCore:

SessionID::defaultSessionID() was hardcoded in the ServiceWorkerThread constructor
instead of using the sessionID of the SWServer that created the service worker thread.
As a result, when the Service Worker would establish a SWClientConnection to the
server, it would use the wrong sessionID and would end up using a different SWServer
(Since we have a different SWServer instance per sessionID). As a result,
ServiceWorkerRegistration / ServiceWorker objects inside the service worker would not
be kept in sync with the server (since they registered themselves with the wrong
SWServer).

Covered by new API test.

  • workers/service/ServiceWorkerContextData.cpp:

(WebCore::ServiceWorkerContextData::isolatedCopy const):

  • workers/service/ServiceWorkerContextData.h:

(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):

  • workers/service/context/ServiceWorkerThread.cpp:

(WebCore::ServiceWorkerThread::ServiceWorkerThread):

  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::createPageForServiceWorker):
(WebCore::ServiceWorkerThreadProxy::ServiceWorkerThreadProxy):

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::RegistrationDatabase::importRecords):

  • workers/service/server/RegistrationStore.h:

(WebCore::RegistrationStore::server):

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::updateWorker):

  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::contextData const):

Source/WebKit:

  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::didReceiveMessage):
We were failing to forward IPC messages to the ChildProcess class here. As a result,
the ChildProcess::RegisterURLSchemeServiceWorkersCanHandle IPC was being ignored
by the StorageProcess.

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
10:38 AM Changeset in webkit [228977] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[build.webkit.org] unit-tests fail if buildbot 0.8.6p1 is not installed locally
https://bugs.webkit.org/show_bug.cgi?id=183103

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Removed extra imports.
10:28 AM WebKitGTK/2.20.x edited by Michael Catanzaro
Review Safari backports through r228970 (diff)

Feb 24, 2018:

3:30 PM Changeset in webkit [228976] by Wenson Hsieh
  • 2 edits in trunk/Tools

Unreviewed, fix the TestWebKitAPI build after r228825.

I removed a >= iOS 11 check in r228825, but forgot that this was also neeed to guard against tvOS and watchOS
builds. This fixes the build by restoring the compile-time guard and also makes it explicit for these platforms.

  • TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
2:06 PM Changeset in webkit [228975] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Null-dereference of the second argument resource of DocumentLoader::scheduleSubstituteResourceLoad
https://bugs.webkit.org/show_bug.cgi?id=182920

Patch by Fujii Hironori <Fujii Hironori> on 2018-02-24
Reviewed by Darin Adler.

A test case
imported/w3c/web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker.html
always crashes due to a null-dereference if compiled and optimized
by GCC 7.2. The second argument resource of
DocumentLoader::scheduleSubstituteResourceLoad can be null if the
resource can't be found in cache. I guess GCC optimizes inline
HashMap::add based on assuming the resource never becomes null
because its type is SubstituteResource&.

This changes introduces a new method
DocumentLoader::scheduleCannotShowURLError because it looks tricky
to pass a nullptr to the second argument of
scheduleSubstituteResourceLoad.

No new tests (Covered by existing tests).

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::scheduleCannotShowURLError): Added a new method.

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

(WebCore::ApplicationCacheHost::maybeLoadResource):
Call scheduleCannotShowURLError if the resource not found in the appcache.

1:47 PM Changeset in webkit [228974] by Darin Adler
  • 23 edits in trunk/Source

Prepare for ExtendedColor changes (first step)
https://bugs.webkit.org/show_bug.cgi?id=182904

Reviewed by Sam Weinig.

Source/WebCore:

  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::createColorValue): Use HashMap::ensure.
(WebCore::CSSValuePool::createFontFamilyValue): Ditto.
(WebCore::CSSValuePool::createFontFaceValue): Ditto.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::maybeParseValue): Tightened up
the logic a bit.

  • html/canvas/CanvasRenderingContext2D.cpp: Removed many unneeded includes.
  • inspector/InspectorCanvas.cpp:

(WebCore::InspectorCanvas::recordAction): Updated for Ref instead of
RefPtr and to use move semantics.
(WebCore::buildArrayForAffineTransform): Return Ref instead of RefPtr.
(WebCore::buildArrayForVector): Ditto.
(WebCore::InspectorCanvas::buildInitialState): Ditto. Also use auto more.
(WebCore::InspectorCanvas::buildAction): Ditto.
(WebCore::InspectorCanvas::buildArrayForCanvasGradient): Ditto.
(WebCore::InspectorCanvas::buildArrayForCanvasPattern): Ditto.
(WebCore::InspectorCanvas::buildArrayForImageData): Ditto.

  • inspector/InspectorCanvas.h: Updated for the above. Also us "using" instead

of typedef and removed unneeded ErrorString typedef and some includes.

  • page/DragController.cpp:

(WebCore::DragController::concludeEditDrag): Use auto and Ref.

  • platform/DragData.h: Used pragma once and reorganized includes a bit.
  • platform/graphics/ImageFrame.h:

(WebCore::ImageFrame::frameBytes const): Use uint32_t instead of RGBA32 to
prepare for removal of the RGBA32 type coming in a future patch.

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::cacheNativeImageAtIndex): Ditto.
(WebCore::ImageSource::canUseAsyncDecoding): Ditto.

  • platform/graphics/cocoa/GraphicsContextCocoa.mm: Tweaked #if for Mac-only

code to use PLATFORM(MAC) to be easier to read.
(WebCore::GraphicsContext::focusRingColor): Use sRGBColorSpaceRef instead of
calling CGColorSpaceCreateWithName each time.

  • platform/graphics/texmap/TextureMapperFPSCounter.cpp: Added include needed

now that it was removed from some header.

  • platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: Use uint32_t

instead of RGBA32 to prepare for removal of the RGBA32 type coming in a future patch.

  • platform/image-decoders/ScalableImageDecoder.cpp:

(WebCore::ScalableImageDecoder::frameBytesAtIndex const): Ditto.

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

(WebCore::ImageBackingStore::image const): Ditto.

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::haveDecodedRow): Ditto.

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::setPixel): Ditto.
(WebCore::JPEGImageDecoder::outputScanlines): Ditto.

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::rowAvailable): Ditto.
(WebCore::PNGImageDecoder::frameComplete): Ditto.

  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::decodeFrame): Ditto.
(WebCore::WEBPImageDecoder::applyPostProcessing): Ditto.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::color): Added comments.

  • rendering/EllipsisBox.cpp:

(WebCore::EllipsisBox::paintSelection): Use Color::isVisible.

Source/WebKitLegacy/mac:

  • Misc/WebKitNSStringExtras.mm:

(-[NSString _web_drawAtPoint:font:textColor:]): Use colorFromNSColor.

3:31 AM Changeset in webkit [228973] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit

Unreviewed WPE breakage fix.

  • WebProcess/wpe/WebProcessMainWPE.cpp: Call g_set_prgname() in WebProcess

to prepare the GLib state for subsequent GStreamer initialization.

Feb 23, 2018:

10:36 PM Changeset in webkit [228972] by Chris Dumez
  • 6 edits in trunk/Source/WebCore

Crash under SchemeRegistry::shouldTreatURLSchemeAsLocal(WTF::String const&)
https://bugs.webkit.org/show_bug.cgi?id=183066
<rdar://problem/37804111>

Reviewed by Ryosuke Niwa.

SecurityOrigin objects are constructed on various threads. However, someone added a
shouldTreatAsPotentiallyTrustworthy() call to the SecurityOrigin constructor which
was not thread safe. This is because this function relies on SchemeRegistry::shouldTreatURLSchemeAsSecure()
and SchemeRegistry::shouldTreatURLSchemeAsLocal() which were relying on global static HashMaps without
locks.

Update SecurityOrigin to initialize m_isPotentiallyTrustworthy lazily, to avoid paying
initialization cost in the constructor. This is only queries by SecurityContext::isSecureContext().

Make SchemeRegistry::shouldTreatURLSchemeAsLocal() and SchemeRegistry::shouldTreatURLSchemeAsSecure()
thread-safe, since they are needed to initialize SecurityOrigin::m_isPotentiallyTrustworthy from
various threads.

SchemeRegistry::shouldTreatURLSchemeAsSecure() is only called from SecurityOrigin (which requires
thread-safety), and getUserMedia() which is not hot code so the extra locking there should not
be an issue.

SchemeRegistry::shouldTreatURLSchemeAsLocal() is called from SecurityOrigin (which requires thread-
safety). It is also called from isQuickLookPreviewURL(), MHTMLArchive::create(), Page::userStyleSheetLocationChanged(),
isRemoteWebArchive() and HTMLPlugInImageElement. All these are not hot code so I do not think
we need a fast path.

  • page/SecurityOrigin.cpp:

(WebCore::isLoopbackIPAddress):
(WebCore::shouldTreatAsPotentiallyTrustworthy):
(WebCore::SecurityOrigin::isPotentiallyTrustworthy const):
(WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress):

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

(WebCore::localURLSchemesLock):
(WebCore::localURLSchemes):
(WebCore::secureSchemesLock):
(WebCore::secureSchemes):
(WebCore::SchemeRegistry::registerURLSchemeAsLocal):
(WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal):
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal):
(WebCore::SchemeRegistry::registerURLSchemeAsSecure):
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure):

  • platform/SchemeRegistry.h:
6:01 PM Changeset in webkit [228971] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[Curl] Cookie Database files are wrongfully getting deleted when the database is opened
https://bugs.webkit.org/show_bug.cgi?id=183051

Patch by Christopher Reid <chris.reid@sony.com> on 2018-02-23
Reviewed by Per Arne Vollan.

The file stat logic was backwards causing a wrongful detection of database corruption.
Fixed the logic and abstracted these calls to use FileSystem.

  • platform/network/curl/CookieJarDB.cpp:
5:20 PM Changeset in webkit [228970] by jmarcell@apple.com
  • 7 edits in branches/safari-605-branch/Source

Versioning.

5:18 PM Changeset in webkit [228969] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.31

Tag Safari-605.1.31.

4:48 PM Changeset in webkit [228968] by sbarati@apple.com
  • 20 edits
    1 add in trunk

Make Number.isInteger an intrinsic
https://bugs.webkit.org/show_bug.cgi?id=183088

Reviewed by JF Bastien.

JSTests:

  • stress/number-is-integer-intrinsic.js: Added.

Source/JavaScriptCore:

When profiling the ML subtest in ARES, I noticed it was spending some
time in Number.isInteger. This patch makes that operation an intrinsic
in the DFG/FTL. It might be a speedup by 1% or so on that subtest, but
it's likely not an aggregate speedup on ARES. However, it is definitely
faster than calling into a builtin function, so we might as well have
it as an intrinsic.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNumberIsInteger):
(JSC::FTL::DFG::LowerDFGToB3::unboxDouble):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/NumberConstructor.cpp:

(JSC::NumberConstructor::finishCreation):
(JSC::numberConstructorFuncIsInteger):

  • runtime/NumberConstructor.h:

(JSC::NumberConstructor::isIntegerImpl):

3:26 PM Changeset in webkit [228967] by wilander@apple.com
  • 7 edits in trunk/Source

Introduce ITP debug logging as an opt-in developer feature
https://bugs.webkit.org/show_bug.cgi?id=183065
<rdar://problem/37803761>

Reviewed by Brent Fulgham.

Source/WebKit:

  • Platform/Logging.h:

Added a dedicated channel for Resource Load Statistics debug logging
since this will be part of a developer-facing feature and should not
be mixed with general Resource Load Statistics logging.

  • UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:

(WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):

Now picks up the user default setting for
ResourceLoadStatisticsDebugLoggingEnabled.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):

Now logs for which domains it purges website data if
ResourceLoadStatisticsDebugLoggingEnabled is set.

(WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):

Now logs for which domains it partitions and blocks cookies
in third-party contexts if ResourceLoadStatisticsDebugLoggingEnabled
is set.

  • UIProcess/WebResourceLoadStatisticsStore.h:

Source/WTF:

  • wtf/Assertions.h:

Introduces RELEASE_LOG_INFO() and RELEASE_LOG_INFO_IF().

3:16 PM Changeset in webkit [228966] by gskachkov@gmail.com
  • 9 edits
    1 add in trunk

WebAssembly: cache memory address / size on instance
https://bugs.webkit.org/show_bug.cgi?id=177305

Reviewed by JF Bastien.

JSTests:

  • wasm/function-tests/memory-reuse.js: Added.

(createWasmInstance):
(doCheckTrap):
(doMemoryGrow):
(doCheck):
(checkWasmInstancesWithSharedMemory):

Source/JavaScriptCore:

Cache memory address/size in wasm:Instance to avoid load wasm:Memory
object during access to memory and memory size property in JiT

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::addCurrentMemory):
(JSC::Wasm::B3IRGenerator::addCallIndirect):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::cachedMemory const):
(JSC::Wasm::Instance::cachedMemorySize const):
(JSC::Wasm::Instance::createWeakPtr):
(JSC::Wasm::Instance::setMemory):
(JSC::Wasm::Instance::updateCachedMemory):
(JSC::Wasm::Instance::offsetOfCachedMemory):
(JSC::Wasm::Instance::offsetOfCachedMemorySize):
(JSC::Wasm::Instance::offsetOfCachedIndexingMask):
(JSC::Wasm::Instance::allocationSize):

  • wasm/WasmMemory.cpp:

(JSC::Wasm::Memory::grow):
(JSC::Wasm::Memory::registerInstance):

  • wasm/WasmMemory.h:

(JSC::Wasm::Memory::indexingMask):

  • wasm/js/JSToWasm.cpp:

(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::evaluate):

2:23 PM Changeset in webkit [228965] by jmarcell@apple.com
  • 7 edits in tags/Safari-606.1.6.1/Source

Versioning.

2:19 PM Changeset in webkit [228964] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[macOS] Correct sandbox violation during media playback
https://bugs.webkit.org/show_bug.cgi?id=183092
<rdar://problem/37718495>

Reviewed by Eric Carlson.

  • WebProcess/com.apple.WebProcess.sb.in:
1:40 PM Changeset in webkit [228963] by jmarcell@apple.com
  • 5 edits in branches/safari-605-branch/Source

Apply patch. rdar://problem/37836719

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

Cherry-pick r228930. rdar://problem/37836719

1:39 PM Changeset in webkit [228961] by jmarcell@apple.com
  • 6 edits in branches/safari-605-branch/Source

Cherry-pick r228919. rdar://problem/37836719

12:30 PM Changeset in webkit [228960] by jmarcell@apple.com
  • 5 edits
    2 adds in branches/safari-605-branch

Cherry-pick r228947. rdar://problem/37833040

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

Cherry-pick r228937. rdar://problem/37833035

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

Cherry-pick r228934. rdar://problem/37816677

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

Cherry-pick r228931. rdar://problem/37816658

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

Cherry-pick r228928. rdar://problem/37816673

12:06 PM WebKitGTK/2.20.x edited by Michael Catanzaro
Review Safari backports through r228941 (diff)
12:02 PM Changeset in webkit [228955] by jmarcell@apple.com
  • 1 copy in tags/Safari-606.1.6.1

New tag.

11:33 AM WebKitGTK/2.20.x edited by Michael Catanzaro
(diff)
10:39 AM Changeset in webkit [228954] by Alan Bujtas
  • 15 edits in trunk/Source/WebCore

[RenderTreeBuilder] Make RenderTreeBuilder::* classes WTF_MAKE_FAST_ALLOCATED
https://bugs.webkit.org/show_bug.cgi?id=183084
<rdar://problem/37828706>

Reviewed by Antti Koivisto.

  • rendering/updating/RenderTreeBuilderBlock.h:
  • rendering/updating/RenderTreeBuilderBlockFlow.h:
  • rendering/updating/RenderTreeBuilderContinuation.h:
  • rendering/updating/RenderTreeBuilderFirstLetter.h:
  • rendering/updating/RenderTreeBuilderFormControls.h:
  • rendering/updating/RenderTreeBuilderFullScreen.h:
  • rendering/updating/RenderTreeBuilderInline.h:
  • rendering/updating/RenderTreeBuilderList.h:
  • rendering/updating/RenderTreeBuilderMathML.h:
  • rendering/updating/RenderTreeBuilderMultiColumn.h:
  • rendering/updating/RenderTreeBuilderRuby.h:
  • rendering/updating/RenderTreeBuilderSVG.h:
  • rendering/updating/RenderTreeBuilderTable.h:
  • rendering/updating/RenderTreeUpdaterGeneratedContent.h:
10:37 AM Changeset in webkit [228953] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

warning: unused variable 'InitialBufferSize' in Assertions.cpp
https://bugs.webkit.org/show_bug.cgi?id=183076

Patch by Fujii Hironori <Fujii Hironori> on 2018-02-23
Reviewed by Yusuke Suzuki.

  • wtf/Assertions.cpp: Moved the definition of InitialBufferSize to inside #if.
10:35 AM Changeset in webkit [228952] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

ArgumentsEliminationPhase has a branch on GetByOffset that should be an assert
https://bugs.webkit.org/show_bug.cgi?id=182982

Reviewed by Yusuke Suzuki.

I don't know why this check was not always an assert. When we see
a GetByOffset on an eliminated allocation, that allocation *must*
be a PhantomClonedArguments. If it weren't, the GetByOffset would
have escaped it. Because this transformation happens by visiting
blocks in pre-order, and by visiting nodes in a block starting from
index zero to index block->size() - 1, we're guaranteed that eliminated
allocations get transformed before users of it, since we visit nodes
in dominator order.

  • dfg/DFGArgumentsEliminationPhase.cpp:
10:32 AM Changeset in webkit [228951] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[MSVC] Unknown a type definition error in WebResourceLoadStatisticsStore on wincairo webkit
https://bugs.webkit.org/show_bug.cgi?id=182873

Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2018-02-23
Reviewed by Yusuke Suzuki.

  • UIProcess/WebResourceLoadStatisticsStore.h:
9:54 AM Changeset in webkit [228950] by Yusuke Suzuki
  • 32 edits
    2 adds in trunk

[JSC] Implement $vm.ftlTrue function for FTL testing
https://bugs.webkit.org/show_bug.cgi?id=183071

Reviewed by Mark Lam.

JSTests:

  • stress/dead-fiat-value-to-int52-then-exit-not-double.js:

(foo):

  • stress/dead-fiat-value-to-int52-then-exit-not-int52.js:

(foo):

  • stress/dead-fiat-value-to-int52.js:

(foo):

  • stress/dead-osr-entry-value.js:

(foo):

  • stress/fiat-value-to-int52-then-exit-not-double.js:

(foo):

  • stress/fiat-value-to-int52-then-exit-not-int52.js:

(foo):

  • stress/fiat-value-to-int52-then-fail-to-fold.js:

(foo):

  • stress/fiat-value-to-int52-then-fold.js:

(foo):

  • stress/fiat-value-to-int52.js:

(foo):

  • stress/fold-based-on-int32-proof-mul-branch.js:

(foo):

  • stress/fold-profiled-call-to-call.js:

(foo):

  • stress/fold-to-double-constant-then-exit.js:

(foo):

  • stress/fold-to-int52-constant-then-exit.js:

(foo):

  • stress/fold-to-primitive-in-cfa.js:

(foo):

  • stress/fold-to-primitive-to-identity-in-cfa.js:

(foo):

  • stress/has-indexed-property-array-storage-ftl.js: Added.

(shouldBe):
(test1):
(test2):

  • stress/has-indexed-property-slow-put-array-storage-ftl.js: Added.

(shouldBe):
(test1):
(test2):

  • stress/int52-ai-add-then-filter-int32.js:

(foo):

  • stress/int52-ai-mul-and-clean-neg-zero-then-filter-int32.js:

(foo):

  • stress/int52-ai-mul-then-filter-int32.js:

(foo):

  • stress/int52-ai-neg-then-filter-int32.js:

(foo):

  • stress/int52-ai-sub-then-filter-int32.js:

(foo):

  • stress/licm-pre-header-cannot-exit-nested.js:

(foo):

  • stress/licm-pre-header-cannot-exit.js:

(foo):

  • stress/sparse-array-entry-update-144067.js:

(useMemoryToTriggerGCs):

  • stress/test-spec-misc.js:

(foo):

  • stress/tricky-array-bounds-checks.js:

(foo):

Source/JavaScriptCore:

Add $vm.ftlTrue, which becomes true if the caller is compiled in FTL.
This is useful for testing whether the caller function is compiled in FTL.

We also remove duplicate DFGTrue function in jsc.cpp. We have $vm.dfgTrue.

  • dfg/DFGByteCodeParser.cpp:

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

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionFalse1):
(functionFalse2): Deleted.

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • tools/JSDollarVM.cpp:

(JSC::functionFTLTrue):
(JSC::JSDollarVM::finishCreation):

8:16 AM Changeset in webkit [228949] by Alan Bujtas
  • 9 edits in trunk/Source/WebCore

[RenderTreeBuilder] Move RenderFullScreen::createPlaceholder to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=183027
<rdar://problem/37773058>

Reviewed by Antti Koivisto.

No change in functionality.

  • dom/Document.cpp:

(WebCore::Document::setFullScreenRenderer):

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

(WebCore::RenderFullScreenPlaceholder::RenderFullScreenPlaceholder):
(WebCore::RenderFullScreenPlaceholder::isRenderFullScreenPlaceholder const):
(WebCore::RenderFullScreen::wrapNewRenderer):
(WebCore::RenderFullScreen::wrapExistingRenderer):
(): Deleted.
(WebCore::RenderFullScreen::createPlaceholder): Deleted.

  • rendering/RenderFullScreen.h:
  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::createPlaceholderForFullScreen):

  • rendering/updating/RenderTreeBuilder.h:
  • rendering/updating/RenderTreeBuilderFullScreen.cpp:

(WebCore::RenderTreeBuilder::FullScreen::createPlaceholder):

  • rendering/updating/RenderTreeBuilderFullScreen.h:
6:52 AM Changeset in webkit [228948] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[RenderTreeBuilder] Add WARN_UNUSED_RETURN to detach()
https://bugs.webkit.org/show_bug.cgi?id=183073
<rdar://problem/37814585>

Reviewed by Antti Koivisto.

So that we don't destroy a renderer accidentally.

  • rendering/updating/RenderTreeBuilderBlock.h:
  • rendering/updating/RenderTreeBuilderRuby.h:
  • rendering/updating/RenderTreeBuilderSVG.h:
5:53 AM Changeset in webkit [228947] by graouts@webkit.org
  • 5 edits
    2 adds in trunk

REGRESSION (r228445): A big pause button shows over YouTube videos if you tap "Tap To Unmute" on iOS
https://bugs.webkit.org/show_bug.cgi?id=183074
<rdar://problem/37747028>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/modern-media-controls/start-support/start-support-disable-controls-and-re-enable-post-play.html

In the fix for webkit.org/b/182668, we made it so that when the "controls" attribute is absent from a media
element we stop listening to the bulk of media events and prevent controls from updating any DOM properties
so as to minimize the amount of CPU usage by the Web process.

An unfortunate side effect was that, if the media controls were disabled at the time the video starts playing,
the StartSupport class would thus not catch the "play" event and would not be able to set the "hasPlayed"
property to "true" on the MediaController, which would then prevent the _shouldShowStartButton() from returning
"false". As a result, if the "controls" attribute was turned back on after the media started playing, they
would default to showing the start button, which would be then in the play state, ie. showing the pause icon.

We now set the "hasPlayed" property in the "play" event handler on MediaController, which is always registered
regardless of the "controls" attribute setting. We also ensure we invalidate the "showStartButton" property on
the media controls when StartSupport is enabled, which is the case when the "controls" attribute is toggled back
to "true" from a previous "false" value.

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

(MediaController.prototype.handleEvent):

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

(StartSupport):
(StartSupport.prototype.enable):
(StartSupport.prototype.handleEvent):
(StartSupport.prototype._updateShowsStartButton):

LayoutTests:

Add a new test that set controls on the video, then immediately removes them, plays the video and turns the controls
back on as soon as the video starts to check that the "showsStartButton" property is false on the media controls.
Prior to this patch this test would fail.

  • media/modern-media-controls/start-support/start-support-disable-controls-and-re-enable-post-play-expected.txt: Added.
  • media/modern-media-controls/start-support/start-support-disable-controls-and-re-enable-post-play.html: Added.
  • platform/ios/TestExpectations:
4:53 AM Changeset in webkit [228946] by Carlos Garcia Campos
  • 8 edits in trunk/Source

[GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=173655
<rdar://problem/37706341>

Reviewed by Philippe Normand.

Source/WebCore:

Do not assume gst is only used in the WebProcess, the MIMETypeRegistry also uses gst to get the list of
supported media types. Move the code to extract gst options from the process command line to a helper function
and use it in the UI process to pass the options to the WebProcess, but also in the current process when gst is
initialized without providing options.

Fixes several unit tests that use MIMETypeRegistry in the UI process.

  • platform/graphics/gstreamer/GStreamerUtilities.cpp:

(WebCore::extractGStreamerOptionsFromCommandLine): Helper to get the gst options from the current process
command line.
(WebCore::initializeGStreamer): Ensure this is called once. Get the gst options from the given vector or extract
it from the command line if not provided.

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

(WebCore::MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements): Bring back the gst
initialization here.

Source/WebKit:

Actually pass the gst command line options to the WebProcess. The options in /proc/self/cmdline are separated by
null characters, so we are effectively passing always the first option only, which is the program name. Then, in
the web process we always ignore the first option and providing WebProcess unconditionally, so we were doing
nothing.

  • UIProcess/gtk/WebProcessPoolGtk.cpp:

(WebKit::WebProcessPool::platformInitializeWebProcess): Use WebCore::extractGStreamerOptionsFromCommandLine()

  • UIProcess/wpe/WebProcessPoolWPE.cpp:

(WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.

  • WebProcess/soup/WebProcessSoup.cpp:

(WebKit::WebProcess::platformInitializeWebProcess): Move the vector.

2:06 AM Changeset in webkit [228945] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer] HTTP totalBytes query returns 0 after seeking (sometimes)
https://bugs.webkit.org/show_bug.cgi?id=183002

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webkit_web_src_init): Initialize member variables. Also no need
to set the appsrc size at that point.
(webKitWebSrcStop): There is no need to reset the size when
seeking. Size should in most cases represent the Content-Length
response attribute, even when seeking.
(webKitWebSrcStart): No need to reset the size attribute.
(webKitWebSrcQueryWithParent): Let appsrc handle DURATION queries.
(CachedResourceStreamingClient::responseReceived): Emit duration notification one time only.

1:57 AM Changeset in webkit [228944] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[GStreamer] media/video-src-blob-using-open-panel.html crashes in Debug
https://bugs.webkit.org/show_bug.cgi?id=183005

Reviewed by Xabier Rodriguez-Calvar.

Test: media/video-src-blob-using-open-panel.html

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::convertToInternalProtocol): Also convert blob URIs
because they're handled by our httpsrc element.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webKitWebSrcGetProtocols): Prefix blob URIs too, for consistency purpose.

Note: See TracTimeline for information about the timeline view.