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

Timeline



Jun 16, 2016:

11:23 PM Changeset in webkit [202160] by commit-queue@webkit.org
  • 4 edits
    4 deletes in trunk

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

Broke scrolling tests on iOS Simulator (Requested by ap on
#webkit).

Reverted changeset:

"Focus event dispatched in iframe causes parent document to
scroll incorrectly"
https://bugs.webkit.org/show_bug.cgi?id=158629
http://trac.webkit.org/changeset/202147

10:19 PM Changeset in webkit [202159] by commit-queue@webkit.org
  • 8 edits
    12 adds in trunk

:in-range & :out-of-range CSS pseudo-classes shouldn't match disabled or readonly inputs
https://bugs.webkit.org/show_bug.cgi?id=156530

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-16
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt:

Source/WebCore:

Elements should only match :in-range and :out-of-range
when they are candidate for constraint validation.

Tests: fast/css/pseudo-in-range-on-disabled-input-basics.html

fast/css/pseudo-in-range-on-readonly-input-basics.html
fast/css/pseudo-in-range-out-of-range-on-disabled-input-trivial.html
fast/css/pseudo-out-of-range-on-disabled-input-basics.html
fast/css/pseudo-out-of-range-on-readonly-input-basics.html
fast/selectors/in-range-out-of-range-style-update.html

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged):

  • html/NumberInputType.cpp:

(WebCore::NumberInputType::minOrMaxAttributeChanged):
I forgot to handle style update in r202143.
This is covered by the new style invalidation test.

  • html/BaseDateAndTimeInputType.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::isInRange):
(WebCore::HTMLInputElement::isOutOfRange):

LayoutTests:

  • fast/css/pseudo-in-range-on-disabled-input-basics-expected.html: Added.
  • fast/css/pseudo-in-range-on-disabled-input-basics.html: Added.
  • fast/css/pseudo-in-range-on-readonly-input-basics-expected.html: Added.
  • fast/css/pseudo-in-range-on-readonly-input-basics.html: Added.
  • fast/css/pseudo-in-range-out-of-range-on-disabled-input-trivial-expected.html: Added.
  • fast/css/pseudo-in-range-out-of-range-on-disabled-input-trivial.html: Added.
  • fast/css/pseudo-out-of-range-on-disabled-input-basics-expected.html: Added.
  • fast/css/pseudo-out-of-range-on-disabled-input-basics.html: Added.
  • fast/css/pseudo-out-of-range-on-readonly-input-basics-expected.html: Added.
  • fast/css/pseudo-out-of-range-on-readonly-input-basics.html: Added.
  • fast/selectors/in-range-out-of-range-style-update-expected.txt: Added.
  • fast/selectors/in-range-out-of-range-style-update.html: Added.
9:56 PM Changeset in webkit [202158] by Gyuyoung Kim
  • 5 edits
    1 add in trunk

[EFL][GTK] LayoutTest doesn't run on Ubuntu 16.04
https://bugs.webkit.org/show_bug.cgi?id=158141

Reviewed by Michael Catanzaro.

Tools:

  • Scripts/webkitpy/port/base.py: Detect php version in system, then use it.

(Port._is_debian_php_version_7):
(Port._debian_php_version):
(Port._apache_config_file_name_for_platform):

  • efl/install-dependencies:
  • gtk/install-dependencies:

LayoutTests:

  • http/conf/debian-httpd-2.4-php7.conf: Added.
9:48 PM Changeset in webkit [202157] by fpizlo@apple.com
  • 25 edits
    5 adds in trunk

Baseline JIT should be concurrent
https://bugs.webkit.org/show_bug.cgi?id=158755

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This makes the baseline JIT concurrent. We want it to be concurrent because it takes up
about 1% of PLT3 and 10% of JSBench (though the JSBench number might be down from recent
optimizations).

The idea is really simple: I separated the compile and link phases of JIT::privateCompile(),
and arranged to call the compile phase from another thread. This doesn't reuse the old
DFG::Worklist code, because that code does things we don't need (like compilation plan
cancellation to allow GC to interleave with compilations) and is structured in a way that
would have required more changes to the baseline JIT. Also, I think that code uses the wrong
API, and as a result, clients of that API have a bad time. For example, it's never clear who
has the responsibility of setting the JIT thresholds and the DFG::Worklist goes to great
lengths to try to help its client set those things correctly, but since it doesn't set them
directly, the client then has to have additional complex logic to combine what it learned
from the Worklist and what it knows to set the thresholds. This patch takes a simpler
approach: the JITWorklist takes complete control over scheduling compilations. It's like a
combination of DFG::Worklist and operationOptimize().

Because the baseline JIT runs quickly, we can take some shortcuts. The JITWorklist requires
that all of its plans complete before a GC begins. This ensures that we don't have to worry
about interactions between the concurrent baseline JIT and the GC.

I needed to do a bunch of minor changes to the JIT to handle the races that emerged. For
example, I needed to do things to opcodes that read profiling both in the main path code
generator and the slow path one. One trick I used was to create a copy of the instruction
stream and provide that for anyone interested in the original value of the profiles. Most
code still uses the CodeBlock's instruction stream because it may emit JIT code that points
at the stream.

This also fixes a LLInt bug in prototype caching. This bug was revealed by this change
because more of our LayoutTests now run in LLInt.

This looks like it might be a ~1% Octane speed-up (on command line) and a ~0.7% PLT3
speed-up. This also looks like a ~2% JSBench speed-up.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • debugger/Debugger.cpp:

(JSC::Debugger::setSteppingMode):
(JSC::Debugger::toggleBreakpoint):
(JSC::Debugger::clearBreakpoints):
(JSC::Debugger::clearDebuggerRequests):

  • dfg/DFGOSRExitPreparation.cpp:

(JSC::DFG::prepareCodeOriginForOSRExit):

  • heap/Heap.cpp:

(JSC::Heap::didFinishIterating):
(JSC::Heap::completeAllJITPlans):
(JSC::Heap::deleteAllCodeBlocks):
(JSC::Heap::collectImpl):
(JSC::Heap::completeAllDFGPlans): Deleted.

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::forEachCodeBlock):

  • jit/JIT.cpp:

(JSC::JIT::emitNotifyWrite):
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::compileWithoutLinking):
(JSC::JIT::link):
(JSC::JIT::privateCompile):
(JSC::JIT::privateCompileExceptionHandlers):

  • jit/JIT.h:

(JSC::JIT::compile):
(JSC::JIT::getSlowCase):
(JSC::JIT::linkSlowCase):
(JSC::JIT::linkDummySlowCase):

  • jit/JITInlines.h:

(JSC::JIT::emitTagBool):
(JSC::JIT::originalInstruction):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emitSlow_op_put_to_scope):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitSlow_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emitSlow_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emitSlow_op_put_to_scope):

  • jit/JITWorklist.cpp: Added.

(JSC::JITWorklist::Plan::Plan):
(JSC::JITWorklist::Plan::compileInThread):
(JSC::JITWorklist::Plan::finalize):
(JSC::JITWorklist::Plan::codeBlock):
(JSC::JITWorklist::Plan::vm):
(JSC::JITWorklist::Plan::isFinishedCompiling):
(JSC::JITWorklist::Plan::isFinalized):
(JSC::JITWorklist::JITWorklist):
(JSC::JITWorklist::~JITWorklist):
(JSC::JITWorklist::completeAllForVM):
(JSC::JITWorklist::poll):
(JSC::JITWorklist::compileLater):
(JSC::JITWorklist::compileNow):
(JSC::JITWorklist::runThread):
(JSC::JITWorklist::finalizePlans):
(JSC::JITWorklist::instance):

  • jit/JITWorklist.h: Added.
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::jitCompileAndSetHeuristics):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

  • runtime/VM.cpp:

(JSC::VM::~VM):

Source/WTF:

The concurrent baseline JIT needs to be able to clone bytecode to get a consistent snapshot.
So, this adds such a method.

  • wtf/RefCountedArray.h:

(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::clone):

Tools:

Need to disable concurrent JIT when running profiler tests. We should have been doing this
all along.

  • Scripts/run-jsc-stress-tests:

LayoutTests:

This change revealed a latent bug in the LLInt. The non-llint version of this new test
would usually fail because it was still in LLInt. This new test always fails.

  • js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-llint.html: Added.
  • js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-llint-expected.txt: Added.
  • js/dom/script-tests/prototype-chain-caching-with-impure-get-own-property-slot-traps-llint.js: Added.
9:36 PM MathML/Early_2016_Refactoring edited by fred.wang@free.fr
(diff)
9:34 PM Changeset in webkit [202156] by fred.wang@free.fr
  • 22 edits in trunk

Add separate MathOperator for selection/measuring/drawing of stretchy operators
https://bugs.webkit.org/show_bug.cgi?id=152244

Patch by Frederic Wang <fwang@igalia.com> on 2016-06-16
Reviewed by Brent Fulgham.

Source/WebCore:

We complete the class to select, measure and draw stretchy operators that is independent
from RenderMathMLOperator. That way, we will be able use stretchy operator without having
to introduce & manage anonymous RenderMathMLOperator's
(e.g for <mroot>, <msqrt> and <mfenced>).

No new tests, already covered by existing tests.

  • rendering/mathml/MathOperator.cpp:

(WebCore::ascentForGlyph): Add this helper function to get glyph ascent.
(WebCore::descentForGlyph): Add this helper function to get glyph descent.
(WebCore::MathOperator::reset): Initialize all the data and calculate ascent/descent of the
base glyph.
(WebCore::MathOperator::setSizeVariant): Set the width/ascent/descent.
(WebCore::MathOperator::setGlyphAssembly): Ditto.
(WebCore::MathOperator::calculateDisplayStyleLargeOperator): Remove the STIX Word hack and
change m_maxPreferredWidth to use the actual width instead.
(WebCore::MathOperator::stretchTo): New functions to execute the actual operator streching.
(WebCore::MathOperator::fillWithVerticalExtensionGlyph): Add a FIXME for bug 155434.
(WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Align all the glyph baselines on
the same axis, given by m_ascent.
Add a FIXME for bug 155434.
(WebCore::MathOperator::paintHorizontalGlyphAssembly): Ditto.
(WebCore::MathOperator::paint): Public function to do the painting.
(WebCore::MathOperator::paintVerticalGlyphAssembly): Deleted.

  • rendering/mathml/MathOperator.h: Update declarations and make most of the members private.

(WebCore::MathOperator::ascent): Function to expose m_ascent.
(WebCore::MathOperator::descent): Function to expose m_descent.

  • rendering/mathml/RenderMathMLOperator.cpp:

(WebCore::RenderMathMLOperator::stretchTo): Forward the stretching call to MathOperator.
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Unfold advanceForGlyph
since we delete RenderMathMLOperator::advanceForGlyph. Just rely on
MathOperator::maxPreferredWidth to determine the preferred width of stretchy operators.
For horizontal operators, we just use the width of the base glyph.
Finally, we remove the dirty flag on preferred logical width.
(WebCore::RenderMathMLOperator::rebuildTokenContent): Reinit the MathOperator instance.
(WebCore::RenderMathMLOperator::updateFromElement): Force more updates of
RenderMathMLOperator to avoid test breakage.
(WebCore::RenderMathMLOperator::styleDidChange): Call MathOperator::reset to take into
account style change.
(WebCore::RenderMathMLOperator::updateStyle): Remove unused code.
(WebCore::RenderMathMLOperator::firstLineBaseline): Use MathOperator::ascent() function.
(WebCore::RenderMathMLOperator::computeLogicalHeight): Use MathOperator::ascent() and
MathOperator::descent() functions to calculate the height.
(WebCore::RenderMathMLOperator::paint): Only stretched operators are treated specially.
We center horizontal operator and forward the paint() call to MathOperator.
(WebCore::RenderMathMLOperator::trailingSpaceError): The error is now just the difference
between the values returned by MathOperator::maxPreferredWidth() and
MathOperator::width().
(WebCore::boundsForGlyph): Deleted.
(WebCore::heightForGlyph): Deleted.
(WebCore::advanceWidthForGlyph): Deleted.
(WebCore::RenderMathMLOperator::updateStyle): Deleted.

LayoutTests:

Update expectations for some MathML tests containing operators/radicals
to take into account small rendering changes.

  • platform/gtk/mathml/opentype/horizontal-expected.png:
  • platform/gtk/mathml/opentype/horizontal-expected.txt:
  • platform/gtk/mathml/opentype/horizontal-munderover-expected.txt:
  • platform/gtk/mathml/opentype/large-operators-expected.png:
  • platform/gtk/mathml/opentype/large-operators-expected.txt:
  • platform/gtk/mathml/opentype/opentype-stretchy-expected.png:
  • platform/gtk/mathml/opentype/opentype-stretchy-expected.txt:
  • platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.png:
  • platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
  • platform/gtk/mathml/opentype/vertical-expected.png:
  • platform/gtk/mathml/opentype/vertical-expected.txt:
  • platform/gtk/mathml/presentation/mo-stretch-expected.png:
  • platform/gtk/mathml/presentation/mo-stretch-expected.txt:
  • platform/gtk/mathml/presentation/roots-expected.txt:
  • platform/ios-simulator/mathml/opentype/horizontal-munderover-expected.txt:
  • platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.png:
  • platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt:
8:51 PM Changeset in webkit [202155] by jiewen_tan@apple.com
  • 3 edits
    1 copy
    1 move
    7 adds
    5 deletes in trunk

CSP: Content Security Policy should allow '*' to match the originating page's scheme
https://bugs.webkit.org/show_bug.cgi?id=158811
<rdar://problem/26819568>

Reviewed by Daniel Bates.

Source/WebCore:

Tests: security/contentSecurityPolicy/image-with-file-url-allowed-by-img-src-star.html

security/contentSecurityPolicy/link-with-file-url-allowed-by-style-src-star.html
security/contentSecurityPolicy/script-with-file-url-allowed-by-script-src-star.html
security/contentSecurityPolicy/video-with-file-url-allowed-by-media-src-star.html

  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar):

LayoutTests:

  • security/contentSecurityPolicy/image-with-file-url-allowed-by-img-src-star-expected.html: Added.
  • security/contentSecurityPolicy/image-with-file-url-allowed-by-img-src-star.html: Added.
  • security/contentSecurityPolicy/image-with-file-url-blocked-by-img-src-star-expected.html: Removed.
  • security/contentSecurityPolicy/image-with-file-url-blocked-by-img-src-star.html: Removed.
  • security/contentSecurityPolicy/link-with-file-url-allowed-by-style-src-star-expected.html: Added.
  • security/contentSecurityPolicy/link-with-file-url-allowed-by-style-src-star.html: Added.
  • security/contentSecurityPolicy/link-with-file-url-blocked-by-style-src-star-expected.html: Removed.
  • security/contentSecurityPolicy/link-with-file-url-blocked-by-style-src-star.html: Removed.
  • security/contentSecurityPolicy/resources/alert-pass.js: Added.
  • security/contentSecurityPolicy/script-with-file-url-allowed-by-script-src-star-expected.txt: Added.
  • security/contentSecurityPolicy/script-with-file-url-allowed-by-script-src-star.html: Added.
  • security/contentSecurityPolicy/video-with-file-url-allowed-by-media-src-star-expected.html: Copied from LayoutTests/security/contentSecurityPolicy/video-with-file-url-blocked-by-media-src-star.html.
  • security/contentSecurityPolicy/video-with-file-url-allowed-by-media-src-star.html: Renamed from LayoutTests/security/contentSecurityPolicy/video-with-file-url-blocked-by-media-src-star.html.
  • security/contentSecurityPolicy/video-with-file-url-blocked-by-media-src-star-expected.html: Removed.
7:50 PM Changeset in webkit [202154] by Chris Dumez
  • 8 edits in trunk/Source

No need to ref connection in lambda inside NetworkResourceLoader::tryStoreAsCacheEntry()
https://bugs.webkit.org/show_bug.cgi?id=158862

Reviewed by Darin Adler.

Source/WebKit2:

No need to ref connection in lambda inside NetworkResourceLoader::tryStoreAsCacheEntry().
We already ref the NetworkResourceLoader which hold a ref to the connection. Also update
the lambda capture to use Ref<> for the NetworkResourceLoader instead of RefPtr<>.
Switch callback type from std::function to WTF::NoncopyableFunction so we can capture a
Ref<>.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::store):

  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):

  • NetworkProcess/cache/NetworkCacheStorage.h:

Source/WTF:

Add NoncopyableFunction constructor that takes a nullptr_t in, in order
to match the std::function API and make porting from one to the other
easier.

  • wtf/NoncopyableFunction.h:
7:30 PM Changeset in webkit [202153] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Add HTTPHeaderMap::set() overload taking a NSString*
https://bugs.webkit.org/show_bug.cgi?id=158857

Reviewed by Darin Adler.

Add HTTPHeaderMap::set() overloading taking a NSString* in addition to
the one taking a CFStringRef. It is useful for the Cocoa implementation
of ResourceRequest::doUpdateResourceRequest().

  • platform/network/HTTPHeaderMap.h:

(WebCore::HTTPHeaderMap::set):

7:26 PM Changeset in webkit [202152] by commit-queue@webkit.org
  • 21 edits
    2 adds in trunk

Web Inspector: console.profile should use the new Sampling Profiler
https://bugs.webkit.org/show_bug.cgi?id=153499
<rdar://problem/24352431>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-16
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Currently console.profile/profileEnd behave slightly differently
between JSContext and Web inspection. Unifying will be part of:
<https://webkit.org/b/158753> Generalize the concept of Instruments on the backend

Both JSContext and Web inspection keep track of active
profiles started and stopped via console.profile/profileEnd.

JSContext inspection sends its programmatic start/stop
via the ScriptProfiler domain.

Web inspection sends its programmatic start/stop
via the Timeline domain, and also will start/stop backend
list of Instruments.

The functional differences between these is that for JSContext
inspection, console.profile only starts/stops the ScriptProfiler
domain, and does not auto-start other instruments. This isn't really
a problem right now given the instruments available for JSContext
inspection; but it will be nice to unify as we add more instruments.
Also, JSContext inspection won't have "Profile (name)" records in
its Events view, since those are currently generated only by the
Web's Timeline domain.

  • inspector/protocol/ScriptProfiler.json:
  • inspector/protocol/Timeline.json:

Events to inform the frontend of programmatic start/stop.

  • debugger/Debugger.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::breakpointsActive):
(Inspector::InspectorDebuggerAgent::isPaused):

  • inspector/agents/InspectorDebuggerAgent.h:

Expose breakpoints active state, since programmatic recording
will temporarily disabled breakpoints if needed.

  • inspector/JSGlobalObjectConsoleClient.cpp:

(Inspector::JSGlobalObjectConsoleClient::JSGlobalObjectConsoleClient):
(Inspector::JSGlobalObjectConsoleClient::profile):
(Inspector::JSGlobalObjectConsoleClient::profileEnd):
(Inspector::JSGlobalObjectConsoleClient::startConsoleProfile):
(Inspector::JSGlobalObjectConsoleClient::stopConsoleProfile):

  • inspector/JSGlobalObjectConsoleClient.h:
  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):

  • inspector/agents/InspectorScriptProfilerAgent.cpp:

(Inspector::InspectorScriptProfilerAgent::programmaticCaptureStarted):
(Inspector::InspectorScriptProfilerAgent::programmaticCaptureStopped):

  • inspector/agents/InspectorScriptProfilerAgent.h:

JSContext implementation of console.profile/profileEnd.

Source/WebCore:

Test: inspector/timeline/setInstruments-programmatic-capture.html

  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::startFromConsole):
(WebCore::InspectorTimelineAgent::stopFromConsole):
(WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
(WebCore::InspectorTimelineAgent::startProgrammaticCapture):
(WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
(WebCore::InspectorTimelineAgent::toggleInstruments):
(WebCore::InspectorTimelineAgent::toggleScriptProfilerInstrument):
(WebCore::InspectorTimelineAgent::toggleHeapInstrument):
(WebCore::InspectorTimelineAgent::toggleMemoryInstrument):
(WebCore::InspectorTimelineAgent::toggleTimelineInstrument):

  • inspector/InspectorTimelineAgent.h:

Web implementation of console.profile/profileEnd.
Make helpers for startings / stopping instruments.

Source/WebInspectorUI:

  • UserInterface/Controllers/TimelineManager.js:

(WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
(WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
(WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
(WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
For programmatic captures, automatically show the Script Timeline, since
that is guarenteed to have been started by the backend. Start capturing
without creating a new recording.

  • UserInterface/Models/TimelineRecording.js:

(WebInspector.TimelineRecording.prototype.stop):
(WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
When stopping for programmatic capture we don't need to disable
instruments, the backend would have already done this.

  • UserInterface/Protocol/ScriptProfilerObserver.js:

(WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
(WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
(WebInspector.ScriptProfilerObserver):

  • UserInterface/Protocol/TimelineObserver.js:

(WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
(WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
(WebInspector.TimelineObserver):
Pass through Web and JSContext programmatic capture events.

LayoutTests:

  • inspector/timeline/setInstruments-programmatic-capture-expected.txt: Added.
  • inspector/timeline/setInstruments-programmatic-capture.html: Added.

New test that the backend auto-starts instruments during programmatic capture.

6:10 PM Changeset in webkit [202151] by wilander@apple.com
  • 5 edits
    4 adds in trunk

Restrict security origin inheritance to empty, about:blank, and about:srcdoc URLs
https://bugs.webkit.org/show_bug.cgi?id=158855
<rdar://problem/26142632>

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/dom/window-open-about-blank-and-access-document.html

http/tests/dom/window-open-about-webkit-org-and-access-document.html

Document.cpp previously checked whether a document should inherit its owner's
security origin by checking if the URL is either empty or blank. URL.cpp in
turn only checks if the protocol is "about:" in the isBlankURL() function.
Thus all about:* URLs inherited security origin. This patch restricts
security origin inheritance to empty, about:blank, and about:srcdoc URLs.

Quotes and links from the WHATWG spec regarding about:srcdoc:

7.1 Browsing contexts
A browsing context can have a creator browsing context, the browsing context
that was responsible for its creation. If a browsing context has a parent
browsing context, then that is its creator browsing context. Otherwise, if the
browsing context has an opener browsing context, then that is its creator
browsing context. Otherwise, the browsing context has no creator browsing
context.
https://html.spec.whatwg.org/multipage/browsers.html#concept-document-bc

7.1.1 Nested browsing contexts
Certain elements (for example, iframe elements) can instantiate further
browsing contexts. These are called nested browsing contexts. If a browsing
context P has a Document D with an element E that nests another browsing
context C inside it, then C is said to be nested through D, and E is said to
be the browsing context container of C. If the browsing context container
element E is in the Document D, then P is said to be the parent browsing
context of C and C is said to be a child browsing context of P. Otherwise,
the nested browsing context C has no parent browsing context.
https://html.spec.whatwg.org/multipage/browsers.html#nested-browsing-context

4.8.5 The iframe element
The iframe element represents a nested browsing context.
...
If the srcdoc attribute is specified

Navigate the element's child browsing context to a new response whose
url list consists of about:srcdoc ...

https://html.spec.whatwg.org/multipage/embedded-content.html#attr-iframe-srcdoc

  • dom/Document.cpp:

(WebCore::Document::initSecurityContext):

Now uses the URL::shouldInheritSecurityOriginFromOwner() function instead.

(WebCore::Document::initContentSecurityPolicy):

Now uses the URL::shouldInheritSecurityOriginFromOwner() function instead.

(WebCore::shouldInheritSecurityOriginFromOwner): Deleted.

Moved to URL::shouldInheritSecurityOriginFromOwner() and restricted the check.

  • platform/URL.cpp:

(WebCore::URL::shouldInheritSecurityOriginFromOwner):

  • platform/URL.h:

Moved the function from Document and restricted the check to only allow
security origin inheritance for empty, about:blank, and about:srcdoc URLs.

LayoutTests:

  • http/tests/dom/window-open-about-blank-and-access-document-expected.txt: Added.
  • http/tests/dom/window-open-about-blank-and-access-document.html: Added.
  • http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt: Added.
  • http/tests/dom/window-open-about-webkit-org-and-access-document.html: Added.
5:45 PM Changeset in webkit [202150] by jiewen_tan@apple.com
  • 4 edits
    40 moves
    2 adds in trunk/LayoutTests

Move most of CSP tests into security/contentSecurityPolicy/
https://bugs.webkit.org/show_bug.cgi?id=158859

Reviewed by Daniel Bates.

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/wk2/TestExpectations:
  • security/contentSecurityPolicy/blocks-video-expected.txt: Renamed from LayoutTests/media/csp-blocks-video-expected.txt.
  • security/contentSecurityPolicy/blocks-video.html: Renamed from LayoutTests/media/csp-blocks-video.html.
  • security/contentSecurityPolicy/font-loading-block-all-expected.txt: Renamed from LayoutTests/fast/text/font-loading-csp-block-all-expected.txt.
  • security/contentSecurityPolicy/font-loading-block-all.html: Renamed from LayoutTests/fast/text/font-loading-csp-block-all.html.
  • security/contentSecurityPolicy/image-with-blob-url-allowed-by-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-blob-url-allowed-by-csp-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html.
  • security/contentSecurityPolicy/image-with-blob-url-allowed-by-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-blob-url-allowed-by-csp-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html.
  • security/contentSecurityPolicy/image-with-blob-url-blocked-by-img-src-star-expected.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-blob-url-blocked-by-csp-img-src-star-expected.html.
  • security/contentSecurityPolicy/image-with-blob-url-blocked-by-img-src-star.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-blob-url-blocked-by-csp-img-src-star.html.
  • security/contentSecurityPolicy/image-with-data-url-allowed-by-img-src-star-expected.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-data-url-allowed-by-csp-img-src-star-expected.html.
  • security/contentSecurityPolicy/image-with-data-url-allowed-by-img-src-star.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-data-url-allowed-by-csp-img-src-star.html.
  • security/contentSecurityPolicy/image-with-file-url-allowed-by-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-file-url-allowed-by-csp-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html.
  • security/contentSecurityPolicy/image-with-file-url-allowed-by-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-file-url-allowed-by-csp-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html.
  • security/contentSecurityPolicy/image-with-file-url-blocked-by-img-src-star-expected.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-file-url-blocked-by-csp-img-src-star-expected.html.
  • security/contentSecurityPolicy/image-with-file-url-blocked-by-img-src-star.html: Renamed from LayoutTests/fast/dom/HTMLImageElement/image-with-file-url-blocked-by-csp-img-src-star.html.
  • security/contentSecurityPolicy/link-with-blob-url-allowed-by-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-blob-url-allowed-by-csp-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html.
  • security/contentSecurityPolicy/link-with-blob-url-allowed-by-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-blob-url-allowed-by-csp-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html.
  • security/contentSecurityPolicy/link-with-blob-url-blocked-by-style-src-star-expected.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-blob-url-blocked-by-csp-style-src-star-expected.html.
  • security/contentSecurityPolicy/link-with-blob-url-blocked-by-style-src-star.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-blob-url-blocked-by-csp-style-src-star.html.
  • security/contentSecurityPolicy/link-with-data-url-allowed-by-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-data-url-allowed-by-csp-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html.
  • security/contentSecurityPolicy/link-with-data-url-allowed-by-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-data-url-allowed-by-csp-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html.
  • security/contentSecurityPolicy/link-with-data-url-blocked-by-style-src-star-expected.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-data-url-blocked-by-csp-style-src-star-expected.html.
  • security/contentSecurityPolicy/link-with-data-url-blocked-by-style-src-star.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-data-url-blocked-by-csp-style-src-star.html.
  • security/contentSecurityPolicy/link-with-file-url-allowed-by-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-file-url-allowed-by-csp-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html.
  • security/contentSecurityPolicy/link-with-file-url-allowed-by-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-file-url-allowed-by-csp-style-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html.
  • security/contentSecurityPolicy/link-with-file-url-blocked-by-style-src-star-expected.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-file-url-blocked-by-csp-style-src-star-expected.html.
  • security/contentSecurityPolicy/link-with-file-url-blocked-by-style-src-star.html: Renamed from LayoutTests/fast/dom/HTMLLinkElement/link-with-file-url-blocked-by-csp-style-src-star.html.
  • security/contentSecurityPolicy/resources/worker-inherits-blocks-eval.js: Renamed from LayoutTests/fast/workers/resources/worker-inherits-csp-blocks-eval.js.

(catch):

  • security/contentSecurityPolicy/resources/worker-inherits-blocks-xhr.js: Renamed from LayoutTests/fast/workers/resources/worker-inherits-csp-blocks-xhr.js.

(catch):

  • security/contentSecurityPolicy/video-with-blob-url-allowed-by-media-src-star-expected.html: Renamed from LayoutTests/media/video-with-blob-url-allowed-by-csp-media-src-star-expected.html.
  • security/contentSecurityPolicy/video-with-blob-url-allowed-by-media-src-star.html: Renamed from LayoutTests/media/video-with-blob-url-allowed-by-csp-media-src-star.html.
  • security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star-expected.html: Renamed from LayoutTests/media/video-with-data-url-allowed-by-csp-media-src-star-expected.html.
  • security/contentSecurityPolicy/video-with-data-url-allowed-by-media-src-star.html: Renamed from LayoutTests/media/video-with-data-url-allowed-by-csp-media-src-star.html.
  • security/contentSecurityPolicy/video-with-file-url-allowed-by-media-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html: Renamed from LayoutTests/media/video-with-file-url-allowed-by-csp-media-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled-expected.html.
  • security/contentSecurityPolicy/video-with-file-url-allowed-by-media-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html: Renamed from LayoutTests/media/video-with-file-url-allowed-by-csp-media-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.html.
  • security/contentSecurityPolicy/video-with-file-url-blocked-by-media-src-star-expected.html: Renamed from LayoutTests/media/video-with-file-url-blocked-by-csp-media-src-star-expected.html.
  • security/contentSecurityPolicy/video-with-file-url-blocked-by-media-src-star.html: Renamed from LayoutTests/media/video-with-file-url-blocked-by-csp-media-src-star.html.
  • security/contentSecurityPolicy/worker-inherits-blocks-eval-expected.txt: Renamed from LayoutTests/fast/workers/worker-inherits-csp-blocks-eval-expected.txt.
  • security/contentSecurityPolicy/worker-inherits-blocks-eval.html: Renamed from LayoutTests/fast/workers/worker-inherits-csp-blocks-eval.html.
  • security/contentSecurityPolicy/worker-inherits-blocks-xhr-expected.txt: Renamed from LayoutTests/fast/workers/worker-inherits-csp-blocks-xhr-expected.txt.
  • security/contentSecurityPolicy/worker-inherits-blocks-xhr.html: Renamed from LayoutTests/fast/workers/worker-inherits-csp-blocks-xhr.html.
5:00 PM Changeset in webkit [202149] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] Accessibility implementation unable to recurse through document (sometimes) to find named elements
https://bugs.webkit.org/show_bug.cgi?id=140798

Reviewed by Brent Fulgham.

Make sure layout is up-to-date before trying to find named elements.

  • DumpRenderTree/win/AccessibilityControllerWin.cpp:

(AccessibilityController::rootElement):

4:39 PM Changeset in webkit [202148] by Chris Dumez
  • 9 edits in trunk/Source/WebKit2

[WK2] Improve serialization of SubresourcesEntry to network disk cache
https://bugs.webkit.org/show_bug.cgi?id=158851

Reviewed by Antti Koivisto.

Improve serialization of SubresourcesEntry to network disk cache:

  • Do not bother serializing SubresourceInfo's first party for cookies and HTTP headers data members if the resource is transient. This is because those are never used for transient resources. This patch also makes it so that we do not even bother initializing those data members if the transient flag is set.
  • Update SubresourceInfo::encode() / decode() to encode and decode the HTTPHeaderMap data member with the right NetworkCache::Coder template specialization instead of using directly HTTPHeaderMap::decode() and HTTPHeaderMap::encode(). HTTPHeaderMap::decode() / encode() is unsafe in the disk cache case (see r200394).

Also update entry types as so:

  • "resource" -> "Resource"
  • "subresources" -> "SubResources"

These entry types are used a folder names in the disk cache and other
folder names were capitalized. Antti suggested this was a good time
to harmonize since we're bumping the cache version.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::constructRevalidationRequest):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
  • NetworkProcess/cache/NetworkCacheStorage.h:
  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp:

(WebKit::NetworkCache::SubresourceInfo::encode):
(WebKit::NetworkCache::SubresourceInfo::decode):

  • NetworkProcess/cache/NetworkCacheSubresourcesEntry.h:

(WebKit::NetworkCache::SubresourceInfo::SubresourceInfo):
(WebKit::NetworkCache::SubresourceInfo::isTransient):
(WebKit::NetworkCache::SubresourceInfo::firstPartyForCookies):
(WebKit::NetworkCache::SubresourceInfo::requestHeaders):

4:34 PM Changeset in webkit [202147] by Simon Fraser
  • 4 edits
    4 adds in trunk

Source/WebCore:
[iOS] Focus event dispatched in iframe causes parent document to scroll incorrectly
https://bugs.webkit.org/show_bug.cgi?id=158629
rdar://problem/26521616

Reviewed by Enrica Casucci.

When focussing elements in iframes, the page could scroll to an incorrect location.
This happened because code in Element::focus() tried to disable scrolling on focus,
but did so only for the current frame, so ancestor frames got programmatically scrolled.
On iOS we handle the scrolling in the UI process, so never want the web process to
do programmatic scrolling.

Fix by changing the focus and cache restore code to use SelectionRevealMode::DoNotReveal,
rather than manually prohibiting frame scrolling.

Tests: fast/forms/ios/focus-input-in-iframe.html

fast/forms/ios/programmatic-focus-input-in-iframe.html

  • dom/Element.cpp:

(WebCore::Element::focus):

  • history/CachedPage.cpp:

(WebCore::CachedPage::restore):

LayoutTests:
Focus event dispatched in iframe causes parent document to scroll incorrectly
https://bugs.webkit.org/show_bug.cgi?id=158629
rdar://problem/26521616

Reviewed by Enrica Casucci.

Tests for user-initiated and programmatic focus in frames.

  • fast/forms/ios/focus-input-in-iframe-expected.txt: Added.
  • fast/forms/ios/focus-input-in-iframe.html: Added.
  • fast/forms/ios/programmatic-focus-input-in-iframe.html: Added.
  • fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt: Added.
4:27 PM Changeset in webkit [202146] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[New Block-Inside-Inline Model] Do not attempt to re-run margin collapsing on the block sequence.
https://bugs.webkit.org/show_bug.cgi?id=158854

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/block/inside-inlines/crash-on-first-line-change.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::marginCollapseLinesFromStart):

LayoutTests:

  • fast/block/inside-inlines/crash-on-first-line-change-expected.txt: Added.
  • fast/block/inside-inlines/crash-on-first-line-change.html: Added.
4:03 PM Changeset in webkit [202145] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Include cstdlib before using std::atexit
https://bugs.webkit.org/show_bug.cgi?id=158681

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2016-06-16
Reviewed by Brent Fulgham.

  • platform/graphics/PlatformDisplay.cpp:
3:55 PM Changeset in webkit [202144] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Use StringView::toAtomicString() in HTMLImageElement::setBestFitURLAndDPRFromImageCandidate()
https://bugs.webkit.org/show_bug.cgi?id=158853

Reviewed by Brent Fulgham.

Use StringView::toAtomicString() in HTMLImageElement::setBestFitURLAndDPRFromImageCandidate()
as m_bestFitImageURL data member is an AtomicString. This avoids constructing a String and
then atomizing it.

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):

3:47 PM Changeset in webkit [202143] by commit-queue@webkit.org
  • 15 edits
    6 adds in trunk

:in-range & :out-of-range CSS pseudo-classes shouldn't match inputs without range limitations
https://bugs.webkit.org/show_bug.cgi?id=156558

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-16
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt:

One of the previous match was erroneous.
Our results are still very far from being correct. There are several
bugs affecting our range validation.

Source/WebCore:

The pseudo selectors :in-range and :out-of-range should only
apply if:
-minimum/maximum are defined for the input type
-the input value is/is-not suffering from underflow/overflow.

Only certain types have a valid minimum and maximum:
-number
-range
-date
-month
-week
-time
-datetime-local

Of those, only one has a default minimum and maximum: range.
For all the others, the minimum or maximum is only defined
if the min/max attribute is defined and valid.

This patch addresses these constraints for number and range.
The date types range validation is severely broken and is
left untouched. It really needs a clean rewrite.

Tests: fast/css/pseudo-in-range-basics.html

fast/css/pseudo-in-range-out-of-range-trivial.html
fast/css/pseudo-out-of-range-basics.html

  • html/DateInputType.cpp:

(WebCore::DateInputType::createStepRange):

  • html/DateTimeInputType.cpp:

(WebCore::DateTimeInputType::createStepRange):

  • html/DateTimeLocalInputType.cpp:

(WebCore::DateTimeLocalInputType::createStepRange):

  • html/InputType.cpp:

(WebCore::InputType::isInRange):
(WebCore::InputType::isOutOfRange):
Notice the isEmpty() shortcut.
A value can only overflow/underflow if it is not empty.

  • html/MonthInputType.cpp:

(WebCore::MonthInputType::createStepRange):

  • html/NumberInputType.cpp:

(WebCore::NumberInputType::createStepRange):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::createStepRange):

  • html/StepRange.cpp:

(WebCore::StepRange::StepRange):

  • html/StepRange.h:

(WebCore::StepRange::hasRangeLimitations):

  • html/WeekInputType.cpp:

(WebCore::WeekInputType::createStepRange):

LayoutTests:

  • fast/css/pseudo-in-range-basics-expected.html: Added.
  • fast/css/pseudo-in-range-basics.html: Added.
  • fast/css/pseudo-in-range-out-of-range-trivial-expected.html: Added.
  • fast/css/pseudo-in-range-out-of-range-trivial.html: Added.
  • fast/css/pseudo-out-of-range-basics-expected.html: Added.
  • fast/css/pseudo-out-of-range-basics.html: Added.
3:44 PM Changeset in webkit [202142] by andersca@apple.com
  • 6 edits in trunk/Source

Fix macOS Sierra build
https://bugs.webkit.org/show_bug.cgi?id=158849

Reviewed by Tim Horton.

Source/WebCore:

Add WebCore:: qualifiers for IOSurface, to avoid conflicts with the IOSurface Objective-C class.

Also, add an asLayerContents() getter that will return an id that's suitable for setting
as the contents of a CALayer.

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

Source/WebKit2:

Add WebCore:: qualifiers for IOSurface, to avoid conflicts with the IOSurface Objective-C class
and adopt IOSurface::asLayerContents().

  • Shared/mac/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::decode):
(WebKit::RemoteLayerBackingStore::bytesPerPixel):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
(WebKit::RemoteLayerBackingStore::setBufferVolatility):
(WebKit::RemoteLayerBackingStore::Buffer::discard):

  • UIProcess/mac/ViewSnapshotStore.mm:

(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::asLayerContents):

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

Kraken/stanford-crypto-pbkdf2.js sometimes crashes with an OSR assertion in FTL
https://bugs.webkit.org/show_bug.cgi?id=158850

Reviewed by Keith Miller.

Bytecode liveness was incorrectly claiming that all tail-deleted locals are live! That's
crazy! We never noticed this because extending OSR liveness is usually not a showstopper and
until recently we didn't have a lot of tail-call test cases to play with. Well, we do now,
thanks to the increasing reliance on tail calls in our builtins.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::localsLiveInBytecode): Fix the bug and add some optional tracing. Also restructure the code so that we don't break to return true, since that's counterintuitive.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::buildExitArguments): Make this assertion print more useful information.

3:06 PM Changeset in webkit [202140] by beidson@apple.com
  • 5 edits in trunk/Source/WebKit2

When a WebsiteDataStore finds no ProcessPools and creates one from scratch, it should represent the data store's config.
rdar://problem/26586991 and https://bugs.webkit.org/show_bug.cgi?id=158844

Reviewed by Anders Carlsson.

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::processPools):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
2:47 PM Changeset in webkit [202139] by akling@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r196217): 3% JSBench regression on iPhone 5.
<https://webkit.org/b/158848>
<rdar://problem/26609622>

Unreviewed rollout.

Don't jettison linked code on every top-level navigation as that was hurting JSBench on iPhone 5.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad):

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

REGRESSION (r201538): Web Inspector: Border over Allocations Views is too thick
https://bugs.webkit.org/show_bug.cgi?id=158846

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-16
Reviewed by Timothy Hatcher.

  • UserInterface/Views/HeapAllocationsTimelineView.css:

(.timeline-view.heap-allocations > .content-view-container > .content-view): Deleted.

1:41 PM Changeset in webkit [202137] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.1.37

New tag.

1:39 PM Changeset in webkit [202136] by Chris Dumez
  • 12 edits in trunk

Unreviewed, rolling out r202002 and r202111.

Ryosuke says this was a JSBench regression on iOS

Reverted changesets:

"Make HashMap and HashSet work with Refs"
https://bugs.webkit.org/show_bug.cgi?id=158638
http://trac.webkit.org/changeset/202002

"Improve HashMap and HashSet support for Ref"
https://bugs.webkit.org/show_bug.cgi?id=158789
http://trac.webkit.org/changeset/202111

1:39 PM Changeset in webkit [202135] by bshafiei@apple.com
  • 5 edits in trunk/Source

Versioning.

12:50 PM Changeset in webkit [202134] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Unreviewed build fix.

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid.prototype.createSettings):
"showColumn" -> "setColumnVisible".

12:39 PM Changeset in webkit [202133] by Matt Baker
  • 14 edits in trunk/Source/WebInspectorUI

Web Inspector: DataGrid should manage its own settings
https://bugs.webkit.org/show_bug.cgi?id=158675
<rdar://problem/26761338>

Reviewed by Timothy Hatcher.

Move grid sorting settings (sort order, column identifier) into DataGrid,
removing duplicated code from various views. A new grid method, "createSettings",
takes an identifier which is used as a prefix for naming the grid's settings.

So that the new behavior is easy to use and hard to misuse, default values
for each setting are set to the current value of the associated property.
The result is that:

grid.sortColumnIdentifier = "columnA";
grid.createSettings("myGrid");

will use "columnA" as the default value the first time the setting is created.

  • UserInterface/Views/ApplicationCacheFrameContentView.js:

(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):

  • UserInterface/Views/CookieStorageContentView.js:

(WebInspector.CookieStorageContentView.prototype._rebuildTable):

  • UserInterface/Views/DOMStorageContentView.js:

(WebInspector.DOMStorageContentView):

  • UserInterface/Views/DataGrid.js:

(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.createSettings):
(WebInspector.DataGrid.prototype.get identifier): Deleted.
(WebInspector.DataGrid.prototype.set identifier): Deleted.
(WebInspector.DataGrid.prototype.set sortOrderSetting): Deleted.
(WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Deleted.

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WebInspector.HeapAllocationsTimelineView):

  • UserInterface/Views/HeapSnapshotContentView.js:

(WebInspector.HeapSnapshotContentView):

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):

  • UserInterface/Views/LayoutTimelineView.js:

(WebInspector.LayoutTimelineView):

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView):

  • UserInterface/Views/ProfileView.js:

(WebInspector.ProfileView):

  • UserInterface/Views/RenderingFrameTimelineView.js:

(WebInspector.RenderingFrameTimelineView):

  • UserInterface/Views/ScriptDetailsTimelineView.js:

(WebInspector.ScriptDetailsTimelineView):

11:49 AM Changeset in webkit [202132] by Simon Fraser
  • 14 edits
    6 adds in trunk

[iOS WK2] On iPad, indirect focussing of a text field doesn't always scroll to the correct location
https://bugs.webkit.org/show_bug.cgi?id=158828

Reviewed by Enrica Casucci.

Source/WebKit2:

WebPage::getAssistedNodeInformation() unconditionally set information.selectionRect()
to a 1x1 rect at the last interaction location. This caused -[WKWebView _zoomToFocusRect:...]
to early return under the !forceScroll clause if the last interaction rect was visible, but
the elementRect was not. This would happen, for example, if a click in a <button> focussed
an input on some other portion of the page. This behavior is iPad-only, because forceScroll
is only NO there.

Fix by making getAssistedNodeInformation() only set the selectionRect to the last interaction
location if that is inside of the elementRect (this caters to the case where a tap is inside
an input which is larger than the screen). Otherwise, set it to the empty rect.

Make this testable by allowing a test to opt into the iPad-style scrolling/zooming behavior
in this code path (essentially, making forceScroll NO for testing), via testing SPI on WKWebView,
plumbed through to WKContentView.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView forceIPadStyleZoomOnInputFocus]):
(-[WKWebView setForceIPadStyleZoomOnInputFocus:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView requiresAccessoryView:]):
(-[WKContentView inputAccessoryView]):
(-[WKContentView forceIPadStyleZoomOnInputFocus]):
(-[WKContentView setForceIPadStyleZoomOnInputFocus:]):
(-[WKContentView requiresAccessoryView]): Remove redundant returns, and allow testing to
override the "isIPad" condition.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getAssistedNodeInformation):

Tools:

Expose "forceIPadStyleZoomOnInputFocus" on UIScriptController, which allows iPad-style
zooming behavior on <input> focus in the iPhone simulator, which is used for testing.

  • WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl:
  • WebKitTestRunner/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::forceIPadStyleZoomOnInputFocus):
(WTR::UIScriptController::setForceIPadStyleZoomOnInputFocus):

  • WebKitTestRunner/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::forceIPadStyleZoomOnInputFocus):
(WTR::UIScriptController::setForceIPadStyleZoomOnInputFocus):

LayoutTests:

Add various tests for focusing form fields. focus-input-via-button-ipad.html tests
the change in the current patch.

  • fast/forms/ios/focus-input-in-fixed-expected.txt: Added.
  • fast/forms/ios/focus-input-in-fixed.html: Added.
  • fast/forms/ios/focus-input-via-button-ipad-expected.txt: Added.
  • fast/forms/ios/focus-input-via-button-ipad.html: Added.
  • fast/forms/ios/focus-long-textarea-expected.txt: Added.
  • fast/forms/ios/focus-long-textarea.html: Added.
  • fast/forms/ios/resources/zooming-test-utils.js:

(testZoomAfterTap):

11:25 AM Changeset in webkit [202131] by mark.lam@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

Add collecting of LLINT slow path stats.
https://bugs.webkit.org/show_bug.cgi?id=158829

Reviewed by Keith Miller.

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::dumpStats):

  • llint/LLIntData.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
11:12 AM Changeset in webkit [202130] by adam.bergkvist@ericsson.com
  • 5 edits
    2 adds in trunk

WebRTC: Check type of this in RTCPeerConnection JS built-in functions
https://bugs.webkit.org/show_bug.cgi?id=151303

Reviewed by Youenn Fablet.

Source/WebCore:

Check type of 'this' in RTCPeerConnection JS built-in functions.

Test: fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html

  • Modules/mediastream/RTCPeerConnection.js:

(createOffer):
(createAnswer):
(setLocalDescription):
(setRemoteDescription):
(addIceCandidate):
(getStats):
Reject if 'this' isn't of type RTCPeerConnection.

  • Modules/mediastream/RTCPeerConnectionInternals.js:

(isRTCPeerConnection):
Add helper function to perform type check. Needs further robustifying.

LayoutTests:

Verify that the RTCPeerConnection JS built-in methods checks 'this'. The test has expected
failures (bug: http://webkit.org/b/158831).

  • fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt: Added.
  • fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html: Added.
  • platform/mac/TestExpectations:

The mac port does not build with WEB_RTC enabled yet.

10:54 AM Changeset in webkit [202129] by weinig@apple.com
  • 15 edits
    1 add in trunk

Forward/Back keyboard shortcuts need to flip for RTL
https://bugs.webkit.org/show_bug.cgi?id=158823
<rdar://problem/25975359>

Reviewed by Darin Adler.

Source/WebKit2:

Pipe the UserInterfaceLayoutDirection down to the WebContentProcess on initialization
and when it changes, and use it to flip the behavior of command-left and command-right
when in RTL mode.

Tests:

WebKit2_CommandBackForwardTestWKView.LTR
WebKit2_CommandBackForwardTestWKView.RTL
WebKit2_CommandBackForwardTestWKWebView.LTR
WebKit2_CommandBackForwardTestWKWebView.RTL

  • Shared/WebPageCreationParameters.cpp:

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

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _webViewPrintFormatter]):
(-[WKWebView setSemanticContentAttribute:]):
(-[WKWebView _printOperationWithPrintInfo:forFrame:]):
(-[WKWebView setUserInterfaceLayoutDirection:]):

  • UIProcess/API/mac/WKView.mm:

(-[WKView setUserInterfaceLayoutDirection:]):

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

(WebKit::WebViewImpl::windowIsFrontWindowUnderMouse):
(WebKit::toUserInterfaceLayoutDirection):
(WebKit::WebViewImpl::userInterfaceLayoutDirection):
(WebKit::WebViewImpl::setUserInterfaceLayoutDirection):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::userInterfaceLayoutDirection):
(WebKit::WebPageProxy::setUserInterfaceLayoutDirection):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::hasHadSelectionChangesFromUserInteraction):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _commonInitializationWithProcessPool:configuration:]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_userInterfaceLayoutDirection):
(WebKit::WebPage::setResourceCachingDisabled):
(WebKit::WebPage::setUserInterfaceLayoutDirection):
(WebKit::m_shouldDispatchFakeMouseMoveEvents): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::performNonEditingBehaviorForSelector):

Tools:

Add tests for flipping the behavior of command-left and command-right
under RTL mode.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/CommandBackForward.mm: Added.

(-[CommandBackForwardOffscreenWindow isKeyWindow]):
(-[CommandBackForwardOffscreenWindow isVisible]):
(simulateCommandArrow):
(WebKit2_CommandBackForwardTest::SetUp):
(WebKit2_CommandBackForwardTestWKView::didFinishLoadForFrame):
(WebKit2_CommandBackForwardTestWKView::SetUp):
(WebKit2_CommandBackForwardTestWKView::loadFiles):
(-[CommandBackForwardNavigationDelegate webView:didFinishNavigation:]):
(WebKit2_CommandBackForwardTestWKWebView::SetUp):
(WebKit2_CommandBackForwardTestWKWebView::loadFiles):

10:43 AM Changeset in webkit [202128] by dino@apple.com
  • 2 edits in trunk/LayoutTests

[mac] LayoutTest transforms/undecomposable.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=158816

Another attempt to deflake this test. Or is it unflake? I don't know.

  • transforms/undecomposable.html:
10:10 AM Changeset in webkit [202127] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

Sporadic crash in HashTableAddResult following CSSValuePool::createFontFamilyValue
https://bugs.webkit.org/show_bug.cgi?id=158297

Reviewed by Darin Adler.

Source/WebCore:

In an effort to reduce the flash of unstyled content, we force all elements
to have display: none during an external stylesheet load. We do this by
ignoring the CSS cascade and forcing all elements to have a placeholder style
which hardcodes display: none. (This is necessary to make elements created by
script during the stylesheet load not flash.)

This style is exposed to web content via getComputedStyle(), which means it
needs to maintain the invariant that font-families can never be null strings.
We enforce this by forcing the font-family to be the standard font name.

Test: fast/text/placeholder-renderstyle-null-font.html

  • style/StyleTreeResolver.cpp:

(WebCore::Style::ensurePlaceholderStyle):

LayoutTests:

  • fast/text/placeholder-renderstyle-null-font-expected.txt: Added.
  • fast/text/placeholder-renderstyle-null-font.html: Added.
9:32 AM Changeset in webkit [202126] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Avoid some temporary String allocations for common HTTP headers in ResourceResponse::platformLazyInit()
https://bugs.webkit.org/show_bug.cgi?id=158827

Reviewed by Darin Adler.

Add a HTTPHeaderMap::set() overload taking in a CFStringRef. The
implementation has a fast path which gets the internal characters
of the CFStringRef when possible and constructs a StringView for
it in order to call findHTTPHeaderName(). As a result, we avoid
allocating a temporary String when findHTTPHeaderName() succeeds.

This new HTTPHeaderMap::set() overload is called from both the
CF and Cocoa implementations of ResourceResponse::platformLazyInit().

I have confirmed locally on both Mac and iOS that the fast path
is used ~93% of the time. CFStringGetCStringPtr() returns null in
rare cases, causing the regular code path to be used.

  • platform/network/HTTPHeaderMap.cpp:

(WebCore::HTTPHeaderMap::set):

  • platform/network/HTTPHeaderMap.h:

Jun 15, 2016:

11:01 PM Changeset in webkit [202125] by keith_miller@apple.com
  • 56 edits
    5 adds in trunk

Add support for Symbol.isConcatSpreadable (round 2)
https://bugs.webkit.org/show_bug.cgi?id=158769

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch adds support for Symbol.isConcatSpreadable. In order to
do so, it was necessary to move the Array.prototype.concat function
to JS. A number of different optimizations were needed to make
such the move to a builtin performant. First, this patch adds a
new Bytecode intrinsic, isJSArray, that checks if the value is a
JSArray object. Specifically, isJSArray checks that the array
object is a normal instance of JSArray and not a RuntimeArray or
Array.prototype. isJSArray can also be converted into a constant
by the DFG if we are able to prove that the incomming value is
already a JSArray.

In order to further improve the perfomance we also now cover more
indexing types in our fast path memcpy code. Before we would only
memcpy Arrays if they had the same indexing type and did not have
Array storage or were undecided. Now the memcpy code covers the
following additional three cases:

1) One array is undecided and the other does not have array storage

2) One array is Int32 and the other is contiguous (we map this
into a contiguous array).

3) The this value is an array and first argument is a non-array
that does not have Symbol.isConcatSpreadable set.

This patch also adds a new fast path for concat with more than one
array argument by using memcpy to append values onto the result
array. This works roughly the same as the two array fast path
using the same methodology to decide if we can memcpy the other
butterfly into the result butterfly.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/ArrayPrototype.js:

(concatSlowPath):
(concat):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitIsJSArray):

  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_isJSArray):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • 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/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::compileIsJSArray):
(JSC::DFG::SpeculativeJIT::compileCallObjectConstructor):

  • dfg/DFGSpeculativeJIT.h:

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

  • 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::compileCallObjectConstructor):
(JSC::FTL::DFG::LowerDFGToB3::compileIsJSArray):
(JSC::FTL::DFG::LowerDFGToB3::isArray):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_is_jsarray):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_is_jsarray):

  • jit/JITOperations.h:
  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ArrayConstructor.h:

(JSC::isArrayConstructor):

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::finishCreation):
(JSC::speciesWatchpointsValid):
(JSC::speciesConstructArray):
(JSC::moveElements):
(JSC::concatAppendOne):
(JSC::arrayProtoFuncConcat): Deleted.

  • runtime/ArrayPrototype.h:
  • runtime/CommonIdentifiers.h:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/IndexingType.h:

(JSC::indexingTypeForValue):

  • runtime/JSArray.cpp:

(JSC::JSArray::appendMemcpy):
(JSC::JSArray::fastConcatWith): Deleted.

  • runtime/JSArray.h:

(JSC::JSArray::createStructure):
(JSC::isJSArray):
(JSC::JSArray::fastConcatType): Deleted.

  • runtime/JSArrayInlines.h: Added.

(JSC::JSArray::mergeIndexingTypeForCopying):
(JSC::JSArray::canFastCopy):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSObject.cpp:

(JSC::JSObject::convertUndecidedForValue):

  • runtime/JSType.h:
  • runtime/ObjectConstructor.h:

(JSC::constructObject):

  • tests/es6.yaml:
  • tests/stress/array-concat-spread-object.js: Added.

(arrayEq):

  • tests/stress/array-concat-spread-proxy-exception-check.js: Added.

(arrayEq):

  • tests/stress/array-concat-spread-proxy.js: Added.

(arrayEq):

  • tests/stress/array-concat-with-slow-indexingtypes.js: Added.

(arrayEq):

  • tests/stress/array-species-config-array-constructor.js:

LayoutTests:

Fix tests for Symbol.isConcatSpreadable. Also, add new test that
the array species construction does not use the callees' global
object's Array[Symbol.species] when given an array from another
global object.

  • js/Object-getOwnPropertyNames-expected.txt:
  • js/array-species-different-globalobjects.html:
  • js/dom/array-prototype-properties-expected.txt:
  • js/script-tests/Object-getOwnPropertyNames.js:
9:41 PM Changeset in webkit [202124] by mark.lam@apple.com
  • 2 edits
    1 add in trunk/Source/JavaScriptCore

Assertion failure when returning incomplete property descriptor from proxy trap.
https://bugs.webkit.org/show_bug.cgi?id=157078

Reviewed by Saam Barati.

If the proxy returns a descriptor that expects a value but does not specify one,
we should use undefined for the value.

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performInternalMethodGetOwnProperty):

  • tests/stress/proxy-returning-incomplete-property-descriptor.js: Added.

(truthiness):
(compare):
(shouldBe):
(test):
(get test):

8:30 PM Changeset in webkit [202123] by Alan Bujtas
  • 6 edits
    2 copies
    2 adds in trunk

Decouple the percent height and positioned descendants maps.
https://bugs.webkit.org/show_bug.cgi?id=158773

Reviewed by David Hyatt and Chris Dumez.

Source/WebCore:

We track renderers with percent height across multiple containers using
HashMap<const RenderBox*, std::unique_ptr<HashSet<const RenderBlock*>>>.
We also use the same data structure to track positioned descendants.
However a positioned renderer can have only one containing block so tracking it
with a 1:many type is defective.
It allows multiple inserts for positioned descendants, which could lead to
inconsistent layout state as the rendering logic expects these type of renderers
with only one containing block.
This patch decouples percent height and positioned tracking by introducing
the PositionedDescendantsMap class. This class is responsible for tracking
the positioned descendants inbetween layouts.

No change in functionality.

Tests: fast/block/positioning/change-containing-block-for-absolute-positioned.html

fast/block/positioning/change-containing-block-for-fixed-positioned.html

  • rendering/RenderBlock.cpp:

(WebCore::insertIntoTrackedRendererMaps):
(WebCore::removeFromTrackedRendererMaps):
(WebCore::PositionedDescendantsMap::addDescendant): Add more defensive ASSERT_NOT_REACHED
to the double insert branch when webkit.org/b/158772 gets fixed.
(WebCore::PositionedDescendantsMap::removeDescendant):
(WebCore::PositionedDescendantsMap::removeContainingBlock):
(WebCore::PositionedDescendantsMap::positionedRenderers):
(WebCore::positionedDescendantsMap):
(WebCore::removeBlockFromPercentageDescendantAndContainerMaps):
(WebCore::RenderBlock::~RenderBlock):
(WebCore::RenderBlock::positionedObjects):
(WebCore::RenderBlock::insertPositionedObject):
(WebCore::RenderBlock::removePositionedObject):
(WebCore::RenderBlock::addPercentHeightDescendant):
(WebCore::RenderBlock::removePercentHeightDescendant):
(WebCore::RenderBlock::percentHeightDescendants):
(WebCore::RenderBlock::checkPositionedObjectsNeedLayout):
(WebCore::removeBlockFromDescendantAndContainerMaps): Deleted.

  • rendering/RenderBlock.h:

LayoutTests:

Various dynamic containing block changing tests.

  • fast/block/fixed-position-reparent-when-transition-is-removed.html:
  • fast/block/positioning/change-containing-block-for-absolute-positioned-expected.txt: Added.
  • fast/block/positioning/change-containing-block-for-absolute-positioned.html: Added.
  • fast/block/positioning/change-containing-block-for-fixed-positioned-expected.txt: Added.
  • fast/block/positioning/change-containing-block-for-fixed-positioned.html: Added.
8:22 PM Changeset in webkit [202122] by ddkilzer@apple.com
  • 3 edits
    1 move in trunk/Source/WebCore

Move SoftLinking.h to platform/cococa from platform/mac
<https://webkit.org/b/158825>

Reviewed by Andy Estes.

  • PlatformMac.cmake: Update for new directory.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/cocoa/SoftLinking.h: Renamed from Source/WebCore/platform/mac/SoftLinking.h.
7:59 PM Changeset in webkit [202121] by Chris Dumez
  • 6 edits in trunk/Source

[Cocoa] Clean up / optimize ResourceResponse::platformLazyInit(InitLevel)
https://bugs.webkit.org/show_bug.cgi?id=158809

Reviewed by Darin Adler.

Source/WebCore:

Clean up / optimize ResourceResponse::platformLazyInit(InitLevel).

  • platform/network/HTTPParsers.cpp:

(WebCore::extractReasonPhraseFromHTTPStatusLine):

  • platform/network/HTTPParsers.h:

Have extractReasonPhraseFromHTTPStatusLine() return an AtomicString as the
Reason is stored as an AtomicString on ResourceResponse. Have the
implementation use StringView::subString()::toAtomicString().

  • platform/network/cocoa/ResourceResponseCocoa.mm:

(WebCore::stripLeadingAndTrailingDoubleQuote):
Move the stripLeadingAndTrailingDoubleQuote logic from platformLazyInit()
to its own function. Have it use StringView::subString()::toAtomicString()
to avoid unnecessarily atomizing the textEncodingName that has surrounding
double-quotes.

(WebCore::initializeHTTPHeaders):
Move HTTP headers initialization to its own function for clarity.

(WebCore::extractHTTPStatusText):
Move HTTP status Text extraction to its own function for clarity.

(WebCore::ResourceResponse::platformLazyInit):

  • The function is streamlined a bit because most of the logic was moved into separate functions.
  • Drop unnecessary (initLevel >= CommonFieldsOnly) check in the first if case and replace with an assertion. This function is always called with CommonFieldsOnly or above (AllFields).
  • Drop unnecessary (m_initLevel < AllFields) check in the second if case as this is always true. If not, we would have returned early at the beginning of the function when checking m_initLevel >= initLevel.
  • Use AutodrainedPool instead of NSAutoreleasePool for convenience and have only 1 pool instead of 2.
  • Drop unnecessary copyNSURLResponseStatusLine() function and call directly CFHTTPMessageCopyResponseStatusLine() since we already have a CFHTTPMessageRef at the call site.

Source/WTF:

Add toAtomicString() method to StringView to avoid having to call toString()
and then atomizing the String at call sites.

  • wtf/text/StringView.h:

(WTF::StringView::toAtomicString):

7:20 PM Changeset in webkit [202120] by timothy_horton@apple.com
  • 5 edits in trunk

Expose _shouldExpandContentToViewHeightForAutoLayout SPI on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=158824
<rdar://problem/23713857>

Reviewed by Simon Fraser.

Test: TestWebKitAPI/WebKit2.AutoLayoutIntegration

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _shouldExpandContentToViewHeightForAutoLayout]):
(-[WKWebView _setShouldExpandContentToViewHeightForAutoLayout:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

This property exists on WKView; expose it on WKWebView.

  • TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm:

(-[AutoLayoutWKWebView load:withWidth:expectingContentSize:]):
(-[AutoLayoutWKWebView load:withWidth:expectingContentSize:resettingWidth:]):
(-[AutoLayoutWKWebView layoutAtMinimumWidth:andExpectContentSizeChange:resettingWidth:]):
(TEST):
Add a test for _shouldExpandContentToViewHeightForAutoLayout.

6:28 PM Changeset in webkit [202119] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit2

Revert part of r196034
https://bugs.webkit.org/show_bug.cgi?id=158805
rdar://problem/26788138

Reviewed by Dan Bernstein.

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::~NetworkLoad):
If the WebResourceLoader was destroyed and received a canAuthenticateAgainstProtectionSpace
but did not send a continueCanAuthenticateAgainstProtectionSpace answer because there's no
core loader, then the NetworkLoad will be destroyed. When this happens, we still need to call
the callback for the challenge.

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace):
If there's no core loader, we can't send IPC.

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

+[WebHTMLRepresentation supportedMIMETypes] leaks
https://bugs.webkit.org/show_bug.cgi?id=158683

Reviewed by Darin Adler.

The problem occurred when chaining newArrayByConcatenatingArrays calls.

Also refactored the code to avoid returning NSMutableArrays disguised as NSArrays,
and removed unsafe_unretained modifiers that were added in http://trac.webkit.org/r149453
for no apparent reason.

  • WebView/WebHTMLRepresentation.mm:

(newArrayWithStrings):
(+[WebHTMLRepresentation supportedMIMETypes]):
(+[WebHTMLRepresentation supportedMediaMIMETypes]):
(+[WebHTMLRepresentation supportedNonImageMIMETypes]):
(+[WebHTMLRepresentation supportedImageMIMETypes]):
(+[WebHTMLRepresentation unsupportedTextMIMETypes]):
(newArrayByConcatenatingArrays): Deleted.

6:14 PM Changeset in webkit [202117] by timothy_horton@apple.com
  • 7 edits
    2 adds in trunk

<attachment> elements jump around a lot around when subtitle text changes slightly
https://bugs.webkit.org/show_bug.cgi?id=158818
<rdar://problem/24450270>

Reviewed by Simon Fraser.

Test: fast/attachment/attachment-subtitle-resize.html

  • rendering/RenderAttachment.cpp:

(WebCore::RenderAttachment::layout):

  • rendering/RenderAttachment.h:
  • rendering/RenderThemeMac.mm:

(WebCore::AttachmentLayout::AttachmentLayout):
(WebCore::RenderThemeMac::paintAttachment):
In order to avoid changes to the centered subtitle text causing the whole
attachment to bounce around a lot, make it so that attachment width can only
increase, never decrease, and round the subtitle's width up to the nearest
increment of 10px when determining its affect on the whole element's width.
Also, center the attachment in its element, instead of left-aligning it,
so that the extra width we may have is evenly distributed between the two sides.

  • fast/attachment/attachment-subtitle-resize-expected.txt: Added.
  • fast/attachment/attachment-subtitle-resize.html: Added.
4:44 PM Changeset in webkit [202116] by Simon Fraser
  • 10 edits
    2 adds in trunk

[iOS WK2] Make it possible to test the Next/Previous buttons in the keyboard accessory bar
https://bugs.webkit.org/show_bug.cgi?id=158714

Reviewed by Enrica Casucci.

Add UIScriptController.keyboardAccessoryBar{Next,Previous} and hook it up to the WKContentView
method that gets called from UIKit.

Add a test that exercises it.

Source/WebKit2:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView keyboardAssistantBarNext]):
(-[WKWebView keyboardAssistantBarPrevious]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

  • WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl:
  • WebKitTestRunner/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::keyboardAccessoryBarNext):
(WTR::UIScriptController::keyboardAccessoryBarPrevious):

  • WebKitTestRunner/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::keyboardAccessoryBarNext):
(WTR::UIScriptController::keyboardAccessoryBarPrevious):

LayoutTests:

  • TestExpectations:
  • fast/forms/ios/accessory-bar-navigation-expected.txt: Added.
  • fast/forms/ios/accessory-bar-navigation.html: Added.
  • fast/forms/ios/resources/zooming-test-utils.js: Added.

(testZoomAfterTap):
(tableFromJSON):

  • platform/ios-simulator-wk2/TestExpectations:
4:34 PM Changeset in webkit [202115] by dino@apple.com
  • 2 edits in trunk/LayoutTests

[mac] LayoutTest transforms/undecomposable.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=158816

Unflakify this test by putting the script in a place that
will execute it before the load event (by which time the animation
may have started).

  • transforms/undecomposable.html:
4:07 PM Changeset in webkit [202114] by Simon Fraser
  • 2 edits
    11 adds in trunk/LayoutTests

[iOS WK2] Add tests for zooming to text fields on focus
https://bugs.webkit.org/show_bug.cgi?id=158786

Reviewed by Enrica Casucci.

Add tests that focus form controls, and test the resulting scroll position and zoom level.

  • TestExpectations:
  • fast/forms/ios/focus-input-via-button-expected.txt: Added.
  • fast/forms/ios/focus-input-via-button-no-scaling-expected.txt: Added.
  • fast/forms/ios/focus-input-via-button-no-scaling.html: Added.
  • fast/forms/ios/focus-input-via-button.html: Added.
  • fast/forms/ios/resources/zooming-test-utils.js: Added.

(testZoomAfterTap):
(tableFromJSON):

  • fast/forms/ios/zoom-after-input-tap-expected.txt: Added.
  • fast/forms/ios/zoom-after-input-tap-wide-input-expected.txt: Added.
  • fast/forms/ios/zoom-after-input-tap-wide-input.html: Added.
  • fast/forms/ios/zoom-after-input-tap.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
3:37 PM Changeset in webkit [202113] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, fix typo in test and move tests to the correct files.

  • tests/stress/multi-get-by-offset-proto-or-unset.js:
  • tests/stress/multi-get-by-offset-proto-self-or-unset.js:
3:14 PM Changeset in webkit [202112] by dino@apple.com
  • 4 edits in trunk/Source

RTL <select> forms are misplaced
https://bugs.webkit.org/show_bug.cgi?id=158810
<rdar://problem/24847541>

Reviewed by Eric Carlson.

AppKit made a change in Sierra that causes popup menus
to snap to a different point when the system language is RTL.
We need to be more explicit about what directionality
we want, and override the location of the popup based
on the text direction.

I also made a small tweak to the fudge offsets we use
in order to make button text and menu text to be
more consistent.

Unfortunately since this is just about the location
of the popup menu, it's unable to be tested in our
current infrastructure.

Source/WebKit/mac:

  • WebCoreSupport/PopupMenuMac.mm:

(PopupMenuMac::show):

Source/WebKit2:

  • UIProcess/mac/WebPopupMenuProxyMac.mm:

(WebKit::WebPopupMenuProxyMac::showPopupMenu):

3:07 PM Changeset in webkit [202111] by commit-queue@webkit.org
  • 8 edits in trunk

Improve HashMap and HashSet support for Ref
https://bugs.webkit.org/show_bug.cgi?id=158789

Patch by Sam Weinig <sam@webkit.org> on 2016-06-15
Reviewed by Chris Dumez.

Source/WTF:

Tests: Add more cases to WTF_HashMap.Ref_Key, WTF_HashMap.Ref_Value and WTF_HashSet.Ref

  • wtf/HashMap.h:
  • wtf/HashSet.h:

Add a MappedTakeType typedef and rework the take functions to use it and HashTraits::take(...).

  • wtf/HashTraits.h:

(WTF::GenericHashTraits::assignToEmpty):
Move to GenericHashTraits rather than GenericHashTraitsBase, since it is not different
between integral and non-integral HashTraits.

(WTF::GenericHashTraits::take):
Add a trait function for take that defaults as a forward. This allows us to override take
just like we do with get/peek.

(WTF::HashTraits<Ref<P>>::emptyValue):
Remove unnecessary explicit construction.

(WTF::HashTraits<Ref<P>>::peek):
Fix assertion that could happen if you did a HashMap.get() on an empty Ref value.

(WTF::HashTraits<Ref<P>>::take):
Make the TakeType of a Ref<P> be Optional<Ref<P>>, to avoid having empty
Refs returned from HashMap and HashSet. Implement an explicit take() function to
construct one.

(WTF::HashTraits<Ref<P>>::customDeleteBucket): Deleted.
Remove unnecessary customDeleteBucket implementation. Ref does not assign nullptr to
it's m_ptr in destruction, so there is no dead store to avoid here.

  • wtf/Ref.h:

(WTF::Ref::ptrAllowingHashTableEmptyValue):
Add HashTrait helper to allow getting the value of m_ptr even when it is null. This
allows us to avoid a branch in HashTraits<Ref<P>>::peek().

Tools:

  • TestWebKitAPI/Tests/WTF/HashMap.cpp:
  • TestWebKitAPI/Tests/WTF/HashSet.cpp:

Add more cases to WTF_HashMap.Ref_Key, WTF_HashMap.Ref_Value and WTF_HashSet.Ref

2:56 PM Changeset in webkit [202110] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Reset bindings test results after r202105

Unreviewed test gardening.

  • bindings/scripts/test/JS/JSTestObj.cpp:
2:27 PM Changeset in webkit [202109] by adam.bergkvist@ericsson.com
  • 2 edits in trunk/Source/WebCore

WebRTC: (Refactor) Align the structure of RTCPeerConnection.idl with the header file
https://bugs.webkit.org/show_bug.cgi?id=158779

Reviewed by Eric Carlson.

Restructure RTCPeerConnection.idl to make it easer to read and extend in the future.

No change in behavior.

  • Modules/mediastream/RTCPeerConnection.idl:
2:27 PM Changeset in webkit [202108] by adam.bergkvist@ericsson.com
  • 2 edits
    2 adds in trunk/LayoutTests

WebRTC: Add media setup test using the legacy callback APIs
https://bugs.webkit.org/show_bug.cgi?id=158736

Reviewed by Eric Carlson.

Add a test that sets up media using the legacy callback-based createOffer/Answer() and
setLocal/RemoteDescription() methods [1].

[1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#legacy-interface-extensions

  • fast/mediastream/RTCPeerConnection-media-setup-callbacks-single-dialog-expected.txt: Added.
  • fast/mediastream/RTCPeerConnection-media-setup-callbacks-single-dialog.html: Added.
  • platform/mac/TestExpectations:

The mac port is not building with WEB_RTC yet.

2:25 PM Changeset in webkit [202107] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Too much log data generated during layout-tests on iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=158751

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort.developer_dir): memoized the property so that it is not called
repeatedly.

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

Uncaught Exception: TypeError: undefined is not an object (evaluating 'imageElement.classList')
https://bugs.webkit.org/show_bug.cgi?id=158808
<rdar://problem/26821034>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-06-15
Reviewed by Brian Burg.

  • UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:

(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
If the record is out of the layout bounds of the overview graph, the overview graph
may not have created an image element yet, so bail. Later, when the image element
is created, it would get the appropriate style if the record is selected.

1:59 PM Changeset in webkit [202105] by Chris Dumez
  • 99 edits in trunk/Source

Drop some unnecessary header includes
https://bugs.webkit.org/show_bug.cgi?id=158788

Reviewed by Alexey Proskuryakov.

Drop some unnecessary header includes in headers to speed up build time.

Source/WebCore:

  • Modules/encryptedmedia/MediaKeySession.cpp:
  • Modules/gamepad/GamepadManager.cpp:
  • Modules/indexeddb/IDBDatabase.cpp:
  • Modules/indexeddb/IDBOpenDBRequest.cpp:
  • Modules/indexeddb/IDBRequest.cpp:
  • Modules/indexeddb/IDBTransaction.cpp:
  • Modules/mediasource/MediaSource.cpp:
  • Modules/mediasource/SourceBuffer.cpp:
  • Modules/mediasource/SourceBufferList.cpp:
  • Modules/mediastream/MediaStream.cpp:
  • Modules/mediastream/MediaStreamTrack.cpp:
  • Modules/speech/SpeechSynthesis.cpp:
  • Modules/webaudio/AudioScheduledSourceNode.cpp:
  • Modules/webaudio/ScriptProcessorNode.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • dom/CharacterData.cpp:
  • dom/ContainerNode.cpp:
  • dom/DOMNamedFlowCollection.cpp:
  • dom/DeviceMotionController.cpp:
  • dom/DeviceOrientationController.cpp:
  • dom/Document.cpp:
  • dom/Document.h:
  • dom/DocumentEventQueue.cpp:
  • dom/DocumentOrderedMap.h:
  • dom/Element.cpp:
  • dom/Event.cpp:
  • dom/EventDispatcher.cpp:
  • dom/EventTarget.cpp:
  • dom/EventTarget.h:
  • dom/KeyboardEvent.cpp:
  • dom/MessageEvent.cpp:
  • dom/MessagePort.cpp:
  • dom/ScriptElement.cpp:
  • dom/ScriptExecutionContext.cpp:
  • dom/ScriptExecutionContext.h:
  • dom/SecurityContext.h:
  • dom/SimulatedClick.cpp:
  • dom/TextEvent.cpp:
  • dom/WebKitNamedFlow.cpp:
  • editing/FrameSelection.cpp:
  • fileapi/FileReader.cpp:
  • html/HTMLLinkElement.cpp:
  • html/HTMLPlugInImageElement.cpp:
  • html/HTMLStyleElement.cpp:
  • html/HTMLSummaryElement.cpp:
  • html/HTMLTrackElement.cpp:
  • html/HTMLVideoElement.cpp:
  • html/InputType.cpp:
  • html/MediaController.cpp:
  • html/TextFieldInputType.cpp:
  • html/canvas/WebGLRenderingContextBase.cpp:
  • html/parser/HTMLScriptRunner.cpp:
  • html/shadow/MediaControlElementTypes.cpp:
  • html/shadow/MediaControls.cpp:
  • html/shadow/MediaControlsApple.cpp:
  • html/shadow/SliderThumbElement.cpp:
  • html/shadow/mac/ImageControlsButtonElementMac.cpp:
  • inspector/InspectorIndexedDBAgent.cpp:
  • loader/DocumentLoader.cpp:
  • loader/ImageLoader.cpp:
  • loader/PolicyChecker.cpp:
  • mathml/MathMLSelectElement.cpp:
  • page/DOMWindow.h:
  • page/EventSource.cpp:
  • page/FrameView.cpp:
  • page/Performance.cpp:
  • page/csp/ContentSecurityPolicy.cpp:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
  • platform/network/HTTPHeaderMap.h:
  • platform/network/ResourceHandle.cpp:
  • rendering/RenderEmbeddedObject.cpp:
  • rendering/RenderSnapshottedPlugIn.cpp:
  • svg/SVGSVGElement.cpp:
  • svg/SVGUseElement.cpp:
  • svg/animation/SVGSMILElement.cpp:
  • workers/WorkerGlobalScope.h:
  • xml/XMLHttpRequest.cpp:
  • xml/XMLHttpRequestProgressEventThrottle.cpp:
  • xml/XMLHttpRequestUpload.cpp:

Source/WebKit/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

Source/WebKit/win:

  • Plugins/PluginView.cpp:

Source/WebKit2:

  • WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
  • WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
  • WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
  • WebProcess/Plugins/PluginView.cpp:
  • WebProcess/WebPage/WebPage.cpp:
1:52 PM Changeset in webkit [202104] by Antti Koivisto
  • 7 edits in trunk

GoogleMaps transit schedule explorer comes up blank initially
https://bugs.webkit.org/show_bug.cgi?id=158803
rdar://problem/25818080

Source/WebCore:

Reviewed by Andreas Kling.

In case we had something like

.foo bar { ... }

and later a new stylesheet was added dynamically that contained

.foo baz { ... }

we would fail to add the new rules to the descendant invalidation rule sets for ".foo". This could
cause some style invalidations to be missed.

  • css/DocumentRuleSets.cpp:

(WebCore::DocumentRuleSets::collectFeatures):

Reset the ancestorClassRules and ancestorAttributeRulesForHTML rule set caches when new style sheets
are added (==collectFeatures is called).

LayoutTests:

Reviewed by Andreas Kling

Expand the tests to cover this case.

  • fast/css/style-invalidation-attribute-change-descendants-expected.txt:
  • fast/css/style-invalidation-attribute-change-descendants.html:
  • fast/css/style-invalidation-class-change-descendants-expected.txt:
  • fast/css/style-invalidation-class-change-descendants.html:
1:48 PM Changeset in webkit [202103] by jfernandez@igalia.com
  • 3 edits
    2 adds in trunk

[css-sizing] Item borders are missing with 'min-width:-webkit-fill-available' and zero available width
https://bugs.webkit.org/show_bug.cgi?id=158258

Source/WebCore:

Reviewed by Darin Adler.

The "fill-available" size is defined as the containing block's size less
the box's border and padding size. However, when used for min-width we
should ensure we don't get negative values as result of logical width
computation.

http://www.w3.org/TR/css-sizing-3/#fill-available-sizing

This patch ensure fill-available value computed value will be always
greater than box's boder and padding width.

Test: fast/css-intrinsic-dimensions/fill-available-with-zero-width.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):

LayoutTests:

Tests to verify that fill-available size works as expected when contaner's width is zero.

Reviewed by Darin Adler.

  • fast/css-intrinsic-dimensions/fill-available-with-zero-width-expected.html: Added.
  • fast/css-intrinsic-dimensions/fill-available-with-zero-width.html: Added.
12:41 PM Changeset in webkit [202102] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Fix 2d canvas transform after r192900
https://bugs.webkit.org/show_bug.cgi?id=158725
Source/WebCore:

rdar://problem/26774230

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-15
Reviewed by Dean Jackson.

Test: fast/canvas/canvas-transform-inverse.html

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::transform):
r192900 was intended to have no change in behavior, but I made a typo.
We need to apply the inverse of the original transform to the path to be correct.
This affects transforms applied to the canvas during the creation of a path.

LayoutTests:

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-15
Reviewed by Dean Jackson.

  • fast/canvas/canvas-transform-inverse-expected.html: Added.
  • fast/canvas/canvas-transform-inverse.html: Added.
12:40 PM Changeset in webkit [202101] by keith_miller@apple.com
  • 3 edits
    3 adds in trunk/Source/JavaScriptCore

DFGByteCodeParser should be able to infer the value of unset properties in MultiGetByOffset
https://bugs.webkit.org/show_bug.cgi?id=158802

Reviewed by Filip Pizlo.

This patch adds support for unset properties in MultiGetByOffset. Since MultiGetByOffset
already supports constant values this patch just adds a constant case where the fetched
value is undefined. Fortunately (or unfortunately) we don't support object allocation
sinking for constant cases of MultiGetByOffset, which means we don't need to adjust any
in that phase.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::planLoad):
(JSC::DFG::ByteCodeParser::handleGetById):

  • dfg/DFGMultiGetByOffsetData.h:
  • tests/stress/multi-get-by-offset-proto-or-unset.js: Added.

(foo):

  • tests/stress/multi-get-by-offset-proto-self-or-unset.js: Added.

(foo):

  • tests/stress/multi-get-by-offset-self-or-unset.js: Added.

(foo):

12:32 PM Changeset in webkit [202100] by eric.carlson@apple.com
  • 8 edits
    4 adds in trunk

[iOS] Make HTMLMediaElement.muted mutable
https://bugs.webkit.org/show_bug.cgi?id=158787
<rdar://problem/24452567>

Reviewed by Dean Jackson.

Source/WebCore:

Tests: media/audio-playback-restriction-removed-muted.html

media/audio-playback-restriction-removed-track-enabled.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::audioTrackEnabledChanged): Remove most behavior restrictions if

the track state was changed as a result of a user gesture.

(WebCore::HTMLMediaElement::setMuted): Ditto.
(WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Add mask

parameter so caller can choose which restrictions are removed.

  • html/HTMLMediaElement.h:
  • html/MediaElementSession.cpp:

(WebCore::restrictionName): Drive-by fix: remove duplicate label.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Set muted on AVPlayer if setMuted

was called before the player was created.

(WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): Drive-by fix: return early if there

is no AVPlayer, not if we won't have metadata yet.

(WebCore::MediaPlayerPrivateAVFoundationObjC::setMuted): New.

LayoutTests:

  • media/audio-playback-restriction-removed-muted-expected.txt: Added.
  • media/audio-playback-restriction-removed-muted.html: Added.
  • media/audio-playback-restriction-removed-track-enabled-expected.txt: Added.
  • media/audio-playback-restriction-removed-track-enabled.html: Added.
12:30 PM Changeset in webkit [202099] by Chris Dumez
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed GCC build fix after r202098.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::thresholdForJIT):

12:20 PM Changeset in webkit [202098] by ggaren@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

compilation policy should adapt to past behavior
https://bugs.webkit.org/show_bug.cgi?id=158759

Reviewed by Saam Barati.

This looks like a ~9% speedup on JSBench.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::~CodeBlock): Record when a CodeBlock dies without ever
making it to DFG.

(JSC::CodeBlock::thresholdForJIT): CodeBlocks that make it to DFG should
compile sooner; CodeBlocks that don't should compile later. The goal is
to use past behavior, in addition to execution counts, to determine
whether compilation is profitable.

(JSC::CodeBlock::jitAfterWarmUp):
(JSC::CodeBlock::jitSoon): Apply the thresholdForJIT rule.

  • bytecode/CodeBlock.h: Moved some code into the .cpp file so I could

change stuff without recompiling.
(JSC::CodeBlock::jitAfterWarmUp): Deleted.
(JSC::CodeBlock::jitSoon): Deleted.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::didOptimize):
(JSC::UnlinkedCodeBlock::setDidOptimize): Added a piece of data to track
whether we made it to DFG.

  • jit/JITOperations.cpp: Record when we make it to DFG.
12:17 PM Changeset in webkit [202097] by Simon Fraser
  • 2 edits in trunk/LayoutTests

fast/events/ios tests are marked as flakey, but really just fail in OpenSource and WK1
https://bugs.webkit.org/show_bug.cgi?id=158804

Test gardening.

fast/events/ios is skipped globally. Ideally it would be re-enabled in /ios-simulator-wk2/TestExpectations, but relies on unreleased
software, so leave disabled for now.

  • platform/ios-simulator/TestExpectations:
12:04 PM Changeset in webkit [202096] by Konstantin Tokarev
  • 4 edits in trunk/Source

Source/JavaScriptCore:
Only Mac port needs ObjC API for JSC.
https://bugs.webkit.org/show_bug.cgi?id=158780

Reviewed by Philippe Normand.

  • API/JSBase.h: Removed !defined(BUILDING_GTK)

Source/WTF:
Only Mac port needs ObjC API for JSC
https://bugs.webkit.org/show_bug.cgi?id=158780

Reviewed by Philippe Normand.

  • wtf/FeatureDefines.h:
11:40 AM WebKit2 edited by clopez@igalia.com
(diff)
10:08 AM Changeset in webkit [202095] by pvollan@apple.com
  • 3 edits in trunk/Tools

[Win][CMake] Changes in WebKit options are not reflected in incremental builds.
https://bugs.webkit.org/show_bug.cgi?id=158727

Reviewed by Alex Christensen.

Delete CMake cache file if WebKit options have been modified.

  • Scripts/build-webkit:
  • Scripts/webkitdirs.pm:

(shouldRemoveCMakeCache):

9:45 AM Changeset in webkit [202094] by Yusuke Suzuki
  • 2 edits in trunk/Source/WTF

Unreviewed, follow up patch for r202092
https://bugs.webkit.org/show_bug.cgi?id=158661

During checking Windows port on EWS, accidentally introduce the regression.

  • wtf/Platform.h:
9:39 AM Changeset in webkit [202093] by keith_miller@apple.com
  • 6 edits
    1 add in trunk/Source/JavaScriptCore

DFGByteCodeParser should be able to infer a property is unset from the Baseline inline cache.
https://bugs.webkit.org/show_bug.cgi?id=158774

Reviewed by Filip Pizlo.

This patch allows the DFGByteCodeParser to speculatively convert a property access into a
constant if that access was always a miss in the Baseline inline cache. This patch does
not add support for MultiGetByOffset and unset properties. That functionality will come
a future patch.

  • bytecode/ComplexGetStatus.cpp:

(JSC::ComplexGetStatus::computeFor):

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/GetByIdVariant.h:

(JSC::GetByIdVariant::isPropertyUnset):

  • bytecode/PutByIdVariant.h:

(JSC::PutByIdVariant::isPropertyUnset):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::load):
(JSC::DFG::ByteCodeParser::handleGetById):

  • tests/stress/undefined-access-then-self-change.js: Added.

(foo):

9:30 AM Changeset in webkit [202092] by Yusuke Suzuki
  • 6 edits in trunk/Source

[JSC] Move calling convention flags to WTF
https://bugs.webkit.org/show_bug.cgi?id=158661

Reviewed by Keith Miller.

Source/JavaScriptCore:

Due to some calling convention flags and JIT_OPERATION flags, MathCommon.h includes MacroAssemblerCodeRef and JITOperations.h.
But MacroAssembler and JIT part should not be necessary for the MathCommon component.
As with other calling convention flags like JSC_HOST_CALL, these flags should be in WTF.

  • assembler/MacroAssemblerCodeRef.h:
  • jit/JITOperations.h:

Add wtf/Platform.h inclusion driven by the Windows port build failure.

  • runtime/MathCommon.h:

Source/WTF:

  • wtf/Platform.h:
8:22 AM Changeset in webkit [202091] by commit-queue@webkit.org
  • 69 edits in trunk

Enabling Shadow DOM for all platforms
https://bugs.webkit.org/show_bug.cgi?id=158738

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-06-15
Reviewed by Ryosuke Niwa.

.:

Removed Shadow DOM from options (enabled by default)

  • Source/cmake/OptionsEfl.cmake:
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

Removed Shadow DOM from options (enabled by default)

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests (no new behavior to be tested).

Removed Shadow DOM from options (enabled by default)
(comprises removal of corresponding preprocessor directives)

  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources.make:
  • bindings/generic/RuntimeEnabledFeatures.h:
  • bindings/js/JSDocumentFragmentCustom.cpp:
  • bindings/js/JSNodeCustom.cpp:
  • css/CSSGrammar.y.in:
  • css/CSSParser.cpp:
  • css/CSSParserValues.cpp:
  • css/CSSParserValues.h:
  • css/CSSSelector.cpp:
  • css/CSSSelector.h:
  • css/ElementRuleCollector.cpp:
  • css/ElementRuleCollector.h:
  • css/RuleSet.cpp:
  • css/RuleSet.h:
  • css/SelectorChecker.cpp:
  • css/SelectorChecker.h:
  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • css/StyleResolver.cpp:
  • cssjit/SelectorCompiler.cpp:
  • dom/ComposedTreeAncestorIterator.h:
  • dom/ComposedTreeIterator.cpp:
  • dom/ComposedTreeIterator.h:
  • dom/ContainerNode.cpp:
  • dom/Document.cpp:
  • dom/Document.h:
  • dom/Element.cpp:
  • dom/Element.h:
  • dom/Element.idl:
  • dom/Event.idl:
  • dom/EventPath.cpp:
  • dom/Node.cpp:
  • dom/Node.h:
  • dom/NonDocumentTypeChildNode.idl:
  • dom/ShadowRoot.cpp:
  • dom/ShadowRoot.h:
  • dom/ShadowRoot.idl:
  • dom/SlotAssignment.cpp:
  • dom/SlotAssignment.h:
  • html/HTMLSlotElement.cpp:
  • html/HTMLSlotElement.h:
  • html/HTMLSlotElement.idl:
  • html/HTMLTagNames.in:
  • page/FocusController.cpp:
  • style/StyleSharingResolver.cpp:
  • style/StyleTreeResolver.cpp:

Source/WebKit/mac:

Removed Shadow DOM from options (enabled by default)

  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferences.mm:
  • WebView/WebView.mm:

Source/WebKit/win:

Removed Shadow DOM from options (enabled by default)
(comprises removal of corresponding preprocessor directives)

  • WebView.cpp:

Source/WebKit2:

Removed Shadow DOM from options (enabled by default)
(comprises removal of corresponding preprocessor directives)

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:
  • WebProcess/WebPage/WebPage.cpp:

Tools:

Removed Shadow DOM from options (enabled by default)

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
8:13 AM Changeset in webkit [202090] by akling@apple.com
  • 4 edits in trunk/Source/WebCore

[Cocoa] Add two notify listeners for poking the garbage collector.
<https://webkit.org/b/158783>

Reviewed by Antti Koivisto.

Add two new notify listeners:

  • com.apple.WebKit.fullGC

Trigger a full garbage collection in the main WebCore VM immediately.

  • com.apple.WebKit.deleteAllCode

Throw away all of JSC's linked and unlinked code, and do a full GC.

These will make it easier to diagnose memory growth issues by having a lever that
eliminates many of the large object graphs without going after behavior-changing things
like the memory cache.

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::platformInitialize):

  • platform/MemoryPressureHandler.h:
  • platform/cocoa/MemoryPressureHandlerCocoa.mm:

(WebCore::MemoryPressureHandler::platformInitialize):

7:12 AM Changeset in webkit [202089] by Antti Koivisto
  • 18 edits in trunk

Vary:Cookie validation doesn't work in private browsing
https://bugs.webkit.org/show_bug.cgi?id=158616
Source/WebCore:

<rdar://problem/26755067>

Reviewed by Andreas Kling.

There wasn't a way to get cookie based on SessionID from WebCore.

  • platform/CookiesStrategy.h:

Add a cookie retrival function that takes SessionID instead of NetworkStorageSession.

  • platform/network/CacheValidation.cpp:

(WebCore::headerValueForVary):

Use it.

(WebCore::verifyVaryingRequestHeaders):

Source/WebKit/mac:

<rdar://problem/26755067>

Reviewed by Andreas Kling.

  • WebCoreSupport/WebFrameNetworkingContext.h:

(WebFrameNetworkingContext::create):

  • WebCoreSupport/WebFrameNetworkingContext.mm:

(privateSession):
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):

Expose the private browsing session.

(WebFrameNetworkingContext::destroyPrivateBrowsingSession):

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::cookieRequestHeaderFieldValue):

Implement SessionID version of the function.

(WebPlatformStrategies::getRawCookies):

Source/WebKit2:

<rdar://problem/26755067>

Reviewed by Andreas Kling.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):

Implement SessionID version of the function.

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:

LayoutTests:

Reviewed by Darin Adler.

  • http/tests/cache/disk-cache/disk-cache-vary-cookie-expected.txt:
  • http/tests/cache/disk-cache/disk-cache-vary-cookie.html:

Exapand the existing test to cover memory cache and private browsing.

2:55 AM Changeset in webkit [202088] by pvollan@apple.com
  • 4 edits in trunk

[Win] The test accessibility/selected-text-range-aria-elements.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=158732

Reviewed by Brent Fulgham.

Source/WebCore:

Implement support for getting selected text range.

  • accessibility/win/AccessibilityObjectWrapperWin.cpp:

(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue):

Tools:

Implement selectedTextRange() method.

  • DumpRenderTree/win/AccessibilityUIElementWin.cpp:

(AccessibilityUIElement::selectedTextRange):

2:36 AM Changeset in webkit [202087] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] MiniBrowser is not DPI aware.
https://bugs.webkit.org/show_bug.cgi?id=158733

Reviewed by Brent Fulgham.

Call Win32 api function to let Windows know that we will scale the contents ourselves.

  • MiniBrowser/win/WinMain.cpp:

(wWinMain):

2:26 AM Changeset in webkit [202086] by pvollan@apple.com
  • 2 edits in trunk/Tools

Unreviewed: add new email address to contributors.json.

  • Scripts/webkitpy/common/config/contributors.json:
Note: See TracTimeline for information about the timeline view.