WebKit-https.git
2 years ago[WebRTC] Limit libwebrtc logging in Debug build
commit-queue@webkit.org [Tue, 28 Feb 2017 21:13:46 +0000 (21:13 +0000)]
[WebRTC] Limit libwebrtc logging in Debug build
https://bugs.webkit.org/show_bug.cgi?id=168974

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

Source/WebCore:

Covered by manual testing..

* platform/Logging.h:
* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
(WebCore::LibWebRTCProvider::callOnWebRTCSignalingThread):

Source/WebKit2:

* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::NetworkRTCProvider):
* Platform/Logging.h:

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

2 years ago[WebRTC] NetworkRTCProvider should stop the network thread from the main thread
commit-queue@webkit.org [Tue, 28 Feb 2017 21:02:25 +0000 (21:02 +0000)]
[WebRTC] NetworkRTCProvider should stop the network thread from the main thread
https://bugs.webkit.org/show_bug.cgi?id=168972

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

* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::close): Ensuring to stop the network thread from the main thread when provider is
getting closed.

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

2 years agoUse of arguments in arrow function is slow
gskachkov@gmail.com [Tue, 28 Feb 2017 20:57:35 +0000 (20:57 +0000)]
Use of arguments in arrow function is slow
https://bugs.webkit.org/show_bug.cgi?id=168829

Reviewed by Saam Barati.

JSTests:

* microbenchmarks/arrowfunciton-direct-arguments.js: Added.
(fn):
* microbenchmarks/arrowfunciton-reference-arguments.js: Added.
(fn):

Source/JavaScriptCore:

Current patch improves performance access to arguments within arrow functuion
by preventing create arguments variable within arrow function, also allow to cache
arguments variable. Before arguments variable always have Dynamic resolve type, after
patch it can be ClosureVar, that increase performance of access to arguments variable
in 9 times inside of the arrow function.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* runtime/JSScope.cpp:
(JSC::abstractAccess):

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

2 years agowebkitpy: Regular expression for parsing simctl device information is wrong for iPad Pro
jbedard@apple.com [Tue, 28 Feb 2017 20:51:48 +0000 (20:51 +0000)]
webkitpy: Regular expression for parsing simctl device information is wrong for iPad Pro
https://bugs.webkit.org/show_bug.cgi?id=168394

Reviewed by Daniel Bates.

* Scripts/webkitpy/xcode/simulator.py:
(Simulator): Allow for parenthesis in device name.
* Scripts/webkitpy/xcode/simulator_unittest.py: Add iPad Pro to test.

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

2 years ago[macOS] Migrate off of CTFontCreateForCSS
mmaxfield@apple.com [Tue, 28 Feb 2017 20:40:14 +0000 (20:40 +0000)]
[macOS] Migrate off of CTFontCreateForCSS
https://bugs.webkit.org/show_bug.cgi?id=168678

Reviewed by David Hyatt.

Source/WebCore:

This patch implements the Font Matching Algorithm detailed in
https://drafts.csswg.org/css-fonts-4/#font-matching-algorithm
Previously, this was implemented inside Core Text (via
CTFontCreateForCSS()), but that implementation does not understand
variation fonts. Therefore it should move to WebKit (along with
the general fact that CSS algorithms should be implemented in a
CSS engine, not the platform's text engine).

This implementation is not completely divorced from the platform,
however - Core Text exposes font weights on a [-1, 1] range, but
CSS operates on a [1, 999] range. In order to provide the mapping
to CSS weights, Core Text infrastructure is necessary. Therefore,
this new implementation of the matching algorithm is only used
on certain operating systems.

The new implementation of the algorithm is not bug-compatible with
the existing implementation; this patch does represent a behavior
change. However, I have reviewed the differences manually and
believe this algorithm to be a progression over the previous one
(except for one case with Helvetica Neue - see
LayoutTests/ChangeLog for more information about that).

This patch also represents a 27% performance progression on our
standard page load test (just measuring the performance of the font
matching algorithm, and nothing else). (Because font matching is
only a small part of the entire test, the overall progression is
much smaller.)

Tests: FontCacheTest.FontLookupFromFamilyName
       FontCacheTest.FontLookupFromPostScriptName

* platform/graphics/FontCache.h:
(WebCore::FontCache::createFontPlatformDataForTesting): Allow for
unit testing.
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::isSystemFont): Inlined.
(WebCore::FontDatabase::singleton): Cache results of Core Text
lookups.
(WebCore::FontDatabase::Range::Range): Because of variation fonts,
fonts' weights, widths, and slopes need to be represented as a range
instead of an individual value.
(WebCore::FontDatabase::Range::isValid):
(WebCore::FontDatabase::Range::expand):
(WebCore::FontDatabase::Range::includes):
(WebCore::FontDatabase::InstalledFont::InstalledFont): Represents a
Font Descriptor as well as some lookup information about it.
(WebCore::FontDatabase::InstalledFontCollection::InstalledFontCollection):
A collection of installed fonts.
(WebCore::FontDatabase::InstalledFontCollection::insertInstalledFont):
Cache minima and maxima.
(WebCore::FontDatabase::InstalledFontCollection::isEmpty):
(WebCore::FontDatabase::InstalledFontCollection::size):
(WebCore::FontDatabase::lookupFamilyName): Get all the fonts in
the family.
(WebCore::FontDatabase::lookupPostScriptName): Get the font with
the given PostScript name.
(WebCore::FontDatabase::clear):
(WebCore::FontDatabase::FontDatabase): Cache.
(WebCore::iterateActiveFontsWithReturn): The Font Matching Algorithm
works by starting with every font in the family, and the eliminating
items from the set iteratively. Instead of actually removing items
from a vector or linked list, we instead want to treat the collection
as immutable and keep a parallel side-table of which items have been
eliminated (in order to reduce copies and allocations). This makes
sense because most families only have a handful of fonts in them.
This function consults with the side-table to iterate only over the
fonts which have not been eliminated.
(WebCore::iterateActiveFonts): Ditto.
(WebCore::findClosestStretch):
(WebCore::filterStretch): Eliminate fonts based on their stretch
value.
(WebCore::findClosestStyle):
(WebCore::filterStyle): Eliminate fonts based on their style value.
(WebCore::findClosestWeight):
(WebCore::filterWeight): Eliminate fonts based on their weight value.
(WebCore::computeTargetWeight):
(WebCore::findClosestFont): If we have a set of fonts in a family,
select the font in the set which best matches the criteria.
(WebCore::platformFontLookupWithFamily): While findClosestFont()
function satisfies the spec's notion of the font matching algorithm,
WebKit actually claims to be able to look up fonts by their PostScript
name. Therefore, this function has a higher-level of logic to rectify
the confusion that results when the PostScript name doesn't agree with
the other CSS properties (like if you say "Helvetica-Bold" but also say
font-weight: 100).
* platform/spi/cocoa/CoreTextSPI.h: Add signature for system CSS
font weight support.

Tools:

Exhaustively test the font matching algorithm on Sierra.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/FontCache.cpp: Added.
(TestWebKitAPI::FontCacheTest::SetUp):
(TestWebKitAPI::createPlatformFont):
(TestWebKitAPI::compareFonts):
(TestWebKitAPI::TEST_F):

LayoutTests:

Updating test results.

Note that there is a slight regression here with Helvetica Neue. In
particular, this family includes a Bold font with a weight of 700,
and a Condensed Black font with a weight of 900. Because we don't
currently have any notion of font-stretch, our model can only
distinguish between these fonts due to their differing weights, not
their widths. This means that requests for weights 800 or 900 will
match the Condensed Black font in accordance with the font matching
algorithm. This gives visually surprising results because weights
100-700 match regular-width fonts.

However, this regression is intentional and temporary - my next task
is to properly implement font-stretch, which will educate our model
on the difference between these two fonts. This will fix the regression
and allow the tests below to be reset to their original expected
results.

* platform/mac-elcapitan/fast/text/font-weights-expected.png: Copied from LayoutTests/platform/mac/fast/text/font-weights-expected.png.
* platform/mac-elcapitan/fast/text/font-weights-expected.txt: Copied from LayoutTests/platform/mac/fast/text/font-weights-expected.txt.
* platform/mac-elcapitan/fast/text/font-weights-zh-expected.png: Copied from LayoutTests/platform/mac/fast/text/font-weights-zh-expected.png.
* platform/mac-elcapitan/fast/text/font-weights-zh-expected.txt: Copied from LayoutTests/platform/mac/fast/text/font-weights-zh-expected.txt.
* platform/mac/fast/text/font-weights-expected.png:
* platform/mac/fast/text/font-weights-expected.txt:
* platform/mac/fast/text/font-weights-zh-expected.png:
* platform/mac/fast/text/font-weights-zh-expected.txt:

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

2 years agoWindows build doesn't start build if the git branch is not master
commit-queue@webkit.org [Tue, 28 Feb 2017 20:36:43 +0000 (20:36 +0000)]
Windows build doesn't start build if the git branch is not master
https://bugs.webkit.org/show_bug.cgi?id=168843

Patch by Basuke Suzuki <Basuke.Suzuki@am.sony.com> on 2017-02-28
Reviewed by Myles C. Maxfield.

Use correct value for product base dir.

* Scripts/build-webkit:

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

2 years agoMedia: notify clients when autoplayed media ends without being paused
mrajca@apple.com [Tue, 28 Feb 2017 19:42:20 +0000 (19:42 +0000)]
Media: notify clients when autoplayed media ends without being paused
https://bugs.webkit.org/show_bug.cgi?id=168852

Reviewed by Alex Christensen.

Source/WebCore:

Added API tests.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setReadyState):
 Set state accordingly if we autoplayed or if playback was prevented.
(WebCore::HTMLMediaElement::play):
 Update state if playback was prevented.
(WebCore::HTMLMediaElement::playInternal):
 Update state if playback began without user interaction.
(WebCore::HTMLMediaElement::pauseInternal):
 Update state.
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
 If playback ends and it began without user interaction, send a DidPlayMediaWithoutInterference event.
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): Ditto.
* html/HTMLMediaElement.h:
* page/AutoplayEvent.h:

Source/WebKit2:

* UIProcess/API/C/WKPageUIClient.h:

Tools:

* TestWebKitAPI/Tests/WebKit2/js-play-with-controls.html:
* TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:
(TEST): Added.

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

2 years agoMark imported/w3c/web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm as flaky...
ryanhaddad@apple.com [Tue, 28 Feb 2017 19:30:06 +0000 (19:30 +0000)]
Mark imported/w3c/web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm as flaky on El Capitan.
https://bugs.webkit.org/show_bug.cgi?id=168380

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

2 years ago[WebRTC] LibWebRTC frame dropper is not working consistently
commit-queue@webkit.org [Tue, 28 Feb 2017 19:13:14 +0000 (19:13 +0000)]
[WebRTC] LibWebRTC frame dropper is not working consistently
https://bugs.webkit.org/show_bug.cgi?id=168973

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

* Source/webrtc/modules/video_coding/video_sender.cc: Disable temporarily the frame dropper as it is sometimes
dropping too many frames.

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

2 years agoAdd ability to configure JSC options from a file
msaboff@apple.com [Tue, 28 Feb 2017 18:50:00 +0000 (18:50 +0000)]
Add ability to configure JSC options from a file
https://bugs.webkit.org/show_bug.cgi?id=168914

Reviewed by Filip Pizlo.

Added the ability to set options and DataLog file location via a configuration file.
Source/JavaScriptCore:

The configuration file is specified with the --configFile option to JSC or the
JSC_configFile environment variable.

The file format allows for options conditionally dependent on various attributes.
Currently those attributes are the process name, parent process name and build
type (Release or Debug).  In this patch, the parent process type is not set.
That will be set up in WebKit code with a follow up patch.

Here is an example config file:

    logFile = "/tmp/jscLog.%pid.txt"

    jscOptions {
        dumpOptions = 2
    }

    build == "Debug" {
        jscOptions {
            useConcurrentJIT = false
            dumpDisassembly = true
        }
    }

    build == "Release" && processName == "jsc" {
        jscOptions {
            asyncDisassembly = true
        }
    }

Eliminated the prior options file code.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* jsc.cpp:
(jscmain):
* runtime/ConfigFile.cpp: Added.
(JSC::ConfigFileScanner::ConfigFileScanner):
(JSC::ConfigFileScanner::start):
(JSC::ConfigFileScanner::lineNumber):
(JSC::ConfigFileScanner::currentBuffer):
(JSC::ConfigFileScanner::atFileEnd):
(JSC::ConfigFileScanner::tryConsume):
(JSC::ConfigFileScanner::tryConsumeString):
(JSC::ConfigFileScanner::tryConsumeUpto):
(JSC::ConfigFileScanner::fillBufferIfNeeded):
(JSC::ConfigFileScanner::fillBuffer):
(JSC::ConfigFile::ConfigFile):
(JSC::ConfigFile::setProcessName):
(JSC::ConfigFile::setParentProcessName):
(JSC::ConfigFile::parse):
* runtime/ConfigFile.h: Added.
* runtime/Options.cpp:
(JSC::Options::initialize):
(JSC::Options::setOptions):
* runtime/Options.h:

Source/WTF:

The pathname can include the printf style "%pid", which will be replaced with the
current process id.

* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
(WTF::setDataFile):
* wtf/DataLog.h:

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

2 years agowebkitpy: jsc-ews should run when Makefiles and build scripts are changed
jbedard@apple.com [Tue, 28 Feb 2017 16:43:27 +0000 (16:43 +0000)]
webkitpy: jsc-ews should run when Makefiles and build scripts are changed
https://bugs.webkit.org/show_bug.cgi?id=168950

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/tool/steps/checkpatchrelevance.py:
(CheckPatchRelevance): Add makefiles and build scripts to jsc_paths.

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

2 years agoUpdate flexbox to Blink's tip of tree
hyatt@apple.com [Tue, 28 Feb 2017 16:23:15 +0000 (16:23 +0000)]
Update flexbox to Blink's tip of tree
https://bugs.webkit.org/show_bug.cgi?id=168657

Reviewed by Zalan Bujtas.

Source/WebCore:

Added new tests in css3/flexbox.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* rendering/FlexibleBoxAlgorithm.cpp: Added.
(WebCore::FlexItem::FlexItem):
(WebCore::FlexLayoutAlgorithm::FlexLayoutAlgorithm):
(WebCore::FlexLayoutAlgorithm::computeNextFlexLine):
* rendering/FlexibleBoxAlgorithm.h: Added.
(WebCore::FlexItem::hypotheticalMainAxisMarginBoxSize):
(WebCore::FlexItem::flexBaseMarginBoxSize):
(WebCore::FlexItem::flexedMarginBoxSize):
(WebCore::FlexLayoutAlgorithm::isMultiline):
* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::computeTrackBasedSize):
(WebCore::GridTrackSizingAlgorithm::increaseSizesToAccommodateSpanningItems):
(WebCore::GridTrackSizingAlgorithm::assumedRowsSizeForOrthogonalChild):
(WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild):
(WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded):
* rendering/GridTrackSizingAlgorithm.h:
* rendering/OrderIterator.cpp:
(WebCore::OrderIterator::next):
(WebCore::OrderIterator::reset):
(WebCore::OrderIteratorPopulator::~OrderIteratorPopulator):
(WebCore::OrderIteratorPopulator::collectChild):
(WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Deleted.
(WebCore::OrderIteratorPopulator::removeDuplicatedOrderValues): Deleted.
* rendering/OrderIterator.h:
(WebCore::OrderIteratorPopulator::OrderIteratorPopulator):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateBlockChildDirtyBitsBeforeLayout):
(WebCore::RenderBlock::layoutPositionedObject):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
(WebCore::RenderBlock::computeChildPreferredLogicalWidths):
(WebCore::RenderBlock::hasDefiniteLogicalHeight):
(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::hasPercentHeightDescendants):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::columnFlexItemHasStretchAlignment):
(WebCore::RenderBox::isStretchingColumnFlexItem):
(WebCore::RenderBox::hasStretchedLogicalWidth):
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::cacheIntrinsicContentLogicalHeightForFlexItem):
(WebCore::RenderBox::updateLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightWithoutLayout):
(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
(WebCore::RenderBox::shouldTreatChildAsReplacedInTableCells):
(WebCore::tableCellShouldHaveZeroInitialSize):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::percentageLogicalHeightIsResolvable):
(WebCore::RenderBox::hasUnsplittableScrollingOverflow):
(WebCore::flexItemHasStretchAlignment): Deleted.
(WebCore::isStretchingColumnFlexItem): Deleted.
(WebCore::logicalWidthIsResolvable): Deleted.
(WebCore::RenderBox::hasDefiniteLogicalWidth): Deleted.
(WebCore::percentageLogicalHeightIsResolvable): Deleted.
(WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock): Deleted.
(WebCore::RenderBox::hasDefiniteLogicalHeight): Deleted.
* rendering/RenderBox.h:
(WebCore::RenderBox::isGridItem):
(WebCore::RenderBox::isFlexItem):
(WebCore::RenderBox::selfAlignmentNormalBehavior):
* rendering/RenderBoxModelObject.cpp:
(WebCore::isOutOfFlowPositionedWithImplicitHeight):
(WebCore::RenderBoxModelObject::containingBlockForAutoHeightDetection):
(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
* rendering/RenderBoxModelObject.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::removeChildInternal):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::LineContext::LineContext):
(WebCore::RenderFlexibleBox::RenderFlexibleBox):
(WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
(WebCore::contentAlignmentNormalBehavior):
(WebCore::RenderFlexibleBox::styleDidChange):
(WebCore::RenderFlexibleBox::layoutBlock):
(WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
(WebCore::RenderFlexibleBox::clientLogicalBottomAfterRepositioning):
(WebCore::RenderFlexibleBox::hasOrthogonalFlow):
(WebCore::RenderFlexibleBox::flexBasisForChild):
(WebCore::RenderFlexibleBox::crossAxisExtentForChild):
(WebCore::RenderFlexibleBox::cachedChildIntrinsicContentLogicalHeight):
(WebCore::RenderFlexibleBox::setCachedChildIntrinsicContentLogicalHeight):
(WebCore::RenderFlexibleBox::clearCachedChildIntrinsicContentLogicalHeight):
(WebCore::RenderFlexibleBox::childIntrinsicLogicalHeight):
(WebCore::RenderFlexibleBox::childIntrinsicLogicalWidth):
(WebCore::RenderFlexibleBox::crossAxisIntrinsicExtentForChild):
(WebCore::RenderFlexibleBox::mainAxisExtentForChild):
(WebCore::RenderFlexibleBox::mainAxisContentExtentForChildIncludingScrollbar):
(WebCore::RenderFlexibleBox::crossAxisExtent):
(WebCore::RenderFlexibleBox::mainAxisExtent):
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::transformedWritingMode):
(WebCore::RenderFlexibleBox::flowAwareMarginStartForChild):
(WebCore::RenderFlexibleBox::flowAwareMarginEndForChild):
(WebCore::RenderFlexibleBox::flowAwareMarginBeforeForChild):
(WebCore::RenderFlexibleBox::crossAxisMarginExtentForChild):
(WebCore::RenderFlexibleBox::flowAwareLocationForChild):
(WebCore::RenderFlexibleBox::useChildAspectRatio):
(WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing):
(WebCore::RenderFlexibleBox::setFlowAwareLocationForChild):
(WebCore::RenderFlexibleBox::mainAxisLengthIsDefinite):
(WebCore::RenderFlexibleBox::crossAxisLengthIsDefinite):
(WebCore::RenderFlexibleBox::cacheChildMainSize):
(WebCore::RenderFlexibleBox::clearCachedMainSizeForChild):
(WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild):
(WebCore::RenderFlexibleBox::layoutFlexItems):
(WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
(WebCore::RenderFlexibleBox::updateAutoMarginsInMainAxis):
(WebCore::RenderFlexibleBox::hasAutoMarginsInCrossAxis):
(WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild):
(WebCore::RenderFlexibleBox::updateAutoMarginsInCrossAxis):
(WebCore::RenderFlexibleBox::marginBoxAscentForChild):
(WebCore::RenderFlexibleBox::computeChildMarginValue):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
(WebCore::RenderFlexibleBox::crossSizeForPercentageResolution):
(WebCore::RenderFlexibleBox::mainSizeForPercentageResolution):
(WebCore::RenderFlexibleBox::childLogicalHeightForPercentageResolution):
(WebCore::RenderFlexibleBox::adjustChildSizeForAspectRatioCrossAxisMinAndMax):
(WebCore::RenderFlexibleBox::constructFlexItem):
(WebCore::RenderFlexibleBox::freezeViolations):
(WebCore::RenderFlexibleBox::freezeInflexibleItems):
(WebCore::RenderFlexibleBox::resolveFlexibleLengths):
(WebCore::alignmentOffset):
(WebCore::RenderFlexibleBox::setOverrideMainAxisContentSizeForChild):
(WebCore::RenderFlexibleBox::staticMainAxisPositionForPositionedChild):
(WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedChild):
(WebCore::RenderFlexibleBox::staticInlinePositionForPositionedChild):
(WebCore::RenderFlexibleBox::staticBlockPositionForPositionedChild):
(WebCore::RenderFlexibleBox::setStaticPositionForPositionedLayout):
(WebCore::RenderFlexibleBox::prepareChildForPositionedLayout):
(WebCore::RenderFlexibleBox::alignmentForChild):
(WebCore::RenderFlexibleBox::resetAutoMarginsAndLogicalTopInCrossAxis):
(WebCore::RenderFlexibleBox::needToStretchChildLogicalHeight):
(WebCore::RenderFlexibleBox::childHasIntrinsicMainAxisSize):
(WebCore::RenderFlexibleBox::crossAxisOverflowForChild):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse):
(WebCore::initialAlignContentOffset):
(WebCore::alignContentSpaceBetweenChildren):
(WebCore::RenderFlexibleBox::alignFlexLines):
(WebCore::RenderFlexibleBox::adjustAlignmentForChild):
(WebCore::RenderFlexibleBox::alignChildren):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
(WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
(WebCore::RenderFlexibleBox::flipForWrapReverse):
(WebCore::RenderFlexibleBox::Violation::Violation): Deleted.
(WebCore::RenderFlexibleBox::setCrossAxisExtent): Deleted.
(WebCore::RenderFlexibleBox::flowAwareMarginAfterForChild): Deleted.
(WebCore::RenderFlexibleBox::mainAxisBorderAndPaddingExtentForChild): Deleted.
(WebCore::RenderFlexibleBox::mainAxisScrollbarExtentForChild): Deleted.
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): Deleted.
(WebCore::RenderFlexibleBox::computeNextFlexLine): Deleted.
(WebCore::RenderFlexibleBox::setLogicalOverrideSize): Deleted.
(WebCore::RenderFlexibleBox::numberOfInFlowPositionedChildren): Deleted.
(WebCore::RenderFlexibleBox::needToStretchChild): Deleted.
(WebCore::contentAlignmentNormalBehaviorFlexibleBox): Deleted.
* rendering/RenderFlexibleBox.h:
(WebCore::RenderFlexibleBox::orderIterator):
(WebCore::RenderFlexibleBox::isFlexibleBoxImpl):
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.cpp:
(WebCore::selfAlignmentChangedToStretchInRowAxis):
(WebCore::selfAlignmentChangedFromStretchInRowAxis):
(WebCore::selfAlignmentChangedFromStretchInColumnAxis):
(WebCore::RenderGrid::styleDidChange):
(WebCore::RenderGrid::computeTrackBasedLogicalHeight):
(WebCore::RenderGrid::computeTrackSizesForDefiniteSize):
(WebCore::RenderGrid::gridGapForDirection):
(WebCore::RenderGrid::guttersSize):
(WebCore::RenderGrid::computeTrackSizesForIndefiniteSize):
(WebCore::RenderGrid::computeAutoRepeatTracksCount):
(WebCore::RenderGrid::trackSizesForComputedStyle):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::populateGridPositionsForDirection):
(WebCore::RenderGrid::alignSelfForChild):
(WebCore::RenderGrid::justifySelfForChild):
(WebCore::RenderGrid::columnAxisPositionForChild):
(WebCore::RenderGrid::rowAxisPositionForChild):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
* rendering/RenderGrid.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::layout):
* rendering/RenderTableSection.cpp:
(WebCore::shouldFlexCellChild):
(WebCore::RenderTableSection::relayoutCellIfFlexed):
(WebCore::RenderTableSection::layoutRows):
* rendering/RenderTableSection.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/style/RenderStyle.cpp:
(WebCore::resolvedSelfAlignment):
(WebCore::RenderStyle::resolvedAlignSelf):
(WebCore::RenderStyle::resolvedJustifySelf):
* rendering/style/RenderStyle.h:
* style/RenderTreeUpdater.cpp:
(WebCore::textRendererIsNeeded):

LayoutTests:

* css3/flexbox/align-absolute-child-expected.txt:
* css3/flexbox/align-absolute-child.html:
* css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line-expected.txt: Added.
* css3/flexbox/alignContent-applies-with-flexWrap-wrap-with-single-line.html: Added.
* css3/flexbox/anonymous-block-merge-crash.html:
* css3/flexbox/assert-generated-new-flexbox-expected.txt: Added.
* css3/flexbox/assert-generated-new-flexbox.html: Added.
* css3/flexbox/auto-height-dynamic-expected.txt:
* css3/flexbox/auto-height-dynamic.html:
* css3/flexbox/auto-height-with-flex-expected.html: Added.
* css3/flexbox/auto-height-with-flex.html: Added.
* css3/flexbox/auto-margins-expected.html: Removed.
* css3/flexbox/auto-margins.html: Removed.
* css3/flexbox/border-and-padding-abspos-expected.txt: Added.
* css3/flexbox/border-and-padding-abspos.html: Added.
* css3/flexbox/box-orient-button-expected.txt: Added.
* css3/flexbox/box-orient-button.html: Added.
* css3/flexbox/box-sizing-expected.txt:
* css3/flexbox/box-sizing-min-max-sizes-expected.txt:
* css3/flexbox/box-sizing-min-max-sizes.html:
* css3/flexbox/box-sizing.html:
* css3/flexbox/bug527039-expected.txt: Added.
* css3/flexbox/bug527039.html: Added.
* css3/flexbox/bug580586-expected.txt: Added.
* css3/flexbox/bug580586.html: Added.
* css3/flexbox/bug604346-expected.html: Added.
* css3/flexbox/bug604346.html: Added.
* css3/flexbox/bug605682-expected.txt: Added.
* css3/flexbox/bug605682.html: Added.
* css3/flexbox/bug633212-expected.txt: Added.
* css3/flexbox/bug633212.html: Added.
* css3/flexbox/bug646288-expected.txt: Added.
* css3/flexbox/bug646288.html: Added.
* css3/flexbox/bug669714-expected.txt: Added.
* css3/flexbox/bug669714.html: Added.
* css3/flexbox/canvas-dynamic-change-expected.txt: Added.
* css3/flexbox/canvas-dynamic-change.html: Added.
* css3/flexbox/change-flexitem-into-abspos-expected.txt: Added.
* css3/flexbox/change-flexitem-into-abspos.html: Added.
* css3/flexbox/child-overflow-expected.html:
* css3/flexbox/child-overflow.html:
* css3/flexbox/column-flex-child-with-overflow-scroll-expected.txt: Added.
* css3/flexbox/column-flex-child-with-overflow-scroll.html: Added.
* css3/flexbox/columns-auto-size.html:
* css3/flexbox/columns-center-with-margins-and-wrap-expected.html: Added.
* css3/flexbox/columns-center-with-margins-and-wrap.html: Added.
* css3/flexbox/columns-center-with-margins-expected.html: Added.
* css3/flexbox/columns-center-with-margins.html: Added.
* css3/flexbox/columns-height-set-via-top-bottom-expected.txt:
* css3/flexbox/columns-height-set-via-top-bottom.html:
* css3/flexbox/content-height-with-scrollbars.html:
* css3/flexbox/cross-axis-scrollbar-expected.html:
* css3/flexbox/cross-axis-scrollbar.html:
* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/flexbox/csswg/flex-margin-no-collapse.html:
* css3/flexbox/definite-cross-sizes-expected.txt: Added.
* css3/flexbox/definite-cross-sizes.html: Added.
* css3/flexbox/definite-main-size-expected.txt: Added.
* css3/flexbox/definite-main-size.html: Added.
* css3/flexbox/display-flexbox-set-get-expected.txt:
* css3/flexbox/display-flexbox-set-get.html:
* css3/flexbox/flex-algorithm-expected.txt:
* css3/flexbox/flex-algorithm-min-max-expected.txt:
* css3/flexbox/flex-algorithm-min-max.html:
* css3/flexbox/flex-algorithm-with-margins-expected.txt:
* css3/flexbox/flex-algorithm-with-margins.html:
* css3/flexbox/flex-algorithm.html:
* css3/flexbox/flex-align-baseline-expected.txt:
* css3/flexbox/flex-align-baseline.html:
* css3/flexbox/flex-align-column-expected.txt:
* css3/flexbox/flex-align-column.html:
* css3/flexbox/flex-align-end-expected.txt:
* css3/flexbox/flex-align-end.html:
* css3/flexbox/flex-align-max-expected.txt:
* css3/flexbox/flex-align-max.html:
* css3/flexbox/flex-align-percent-height-expected.txt:
* css3/flexbox/flex-align-percent-height.html:
* css3/flexbox/flex-align-stretch-expected.txt:
* css3/flexbox/flex-align-stretch.html:
* css3/flexbox/flex-align-vertical-writing-mode.html:
* css3/flexbox/flex-align.html:
* css3/flexbox/flex-column-relayout-assert-expected.txt: Added.
* css3/flexbox/flex-column-relayout-assert.html: Added.
* css3/flexbox/flex-factor-less-than-one-expected.txt: Added.
* css3/flexbox/flex-factor-less-than-one.html: Added.
* css3/flexbox/flex-flow-2-expected.txt:
* css3/flexbox/flex-flow-2.html:
* css3/flexbox/flex-flow-auto-margins-expected.txt:
* css3/flexbox/flex-flow-auto-margins-no-available-space-assert-expected.txt: Added.
* css3/flexbox/flex-flow-auto-margins-no-available-space-assert.html: Added.
* css3/flexbox/flex-flow-auto-margins-no-available-space-expected.txt:
* css3/flexbox/flex-flow-auto-margins-no-available-space.html:
* css3/flexbox/flex-flow-auto-margins.html:
* css3/flexbox/flex-flow-border-expected.txt:
* css3/flexbox/flex-flow-border.html:
* css3/flexbox/flex-flow-expected.txt:
* css3/flexbox/flex-flow-initial-expected.txt:
* css3/flexbox/flex-flow-initial.html:
* css3/flexbox/flex-flow-margins-auto-size-expected.txt:
* css3/flexbox/flex-flow-margins-auto-size.html:
* css3/flexbox/flex-flow-margins-expected.txt:
* css3/flexbox/flex-flow-margins.html:
* css3/flexbox/flex-flow-orientations-expected.txt:
* css3/flexbox/flex-flow-orientations.html:
* css3/flexbox/flex-flow-overflow-expected.txt:
* css3/flexbox/flex-flow-overflow.html:
* css3/flexbox/flex-flow-padding-expected.txt:
* css3/flexbox/flex-flow-padding.html:
* css3/flexbox/flex-flow.html:
* css3/flexbox/flex-item-child-overflow-expected.txt:
* css3/flexbox/flex-item-child-overflow.html:
* css3/flexbox/flex-item-contains-strict-expected.txt: Added.
* css3/flexbox/flex-item-contains-strict.html: Added.
* css3/flexbox/flex-item-firstLine-valid-expected.txt:
* css3/flexbox/flex-item-firstLine-valid.html:
* css3/flexbox/flex-justify-content-expected.txt:
* css3/flexbox/flex-justify-content.html:
* css3/flexbox/flex-longhand-parsing-expected.txt:
* css3/flexbox/flex-longhand-parsing.html:
* css3/flexbox/flex-no-flex-expected.txt:
* css3/flexbox/flex-no-flex.html:
* css3/flexbox/flex-one-sets-flex-basis-to-zero-px-expected.txt: Added.
* css3/flexbox/flex-one-sets-flex-basis-to-zero-px.html: Added.
* css3/flexbox/flex-order-expected.html: Added.
* css3/flexbox/flex-order-expected.png: Removed.
* css3/flexbox/flex-order-expected.txt: Removed.
* css3/flexbox/flex-order.html:
* css3/flexbox/flex-property-parsing-expected.txt:
* css3/flexbox/flex-property-parsing.html:
* css3/flexbox/flex-shorthand-flex-basis-middle-expected.txt: Added.
* css3/flexbox/flex-shorthand-flex-basis-middle.html: Added.
* css3/flexbox/flexbox-baseline.html:
* css3/flexbox/flexbox-height-with-overflow-auto-expected.txt: Added.
* css3/flexbox/flexbox-height-with-overflow-auto.html: Added.
* css3/flexbox/flexbox-ignore-container-firstLetter-expected.txt:
* css3/flexbox/flexbox-ignore-container-firstLetter.html:
* css3/flexbox/flexbox-ignore-firstLetter-expected.txt:
* css3/flexbox/flexbox-ignore-firstLetter.html:
* css3/flexbox/flexbox-ignore-firstLine-expected.txt:
* css3/flexbox/flexbox-ignore-firstLine.html:
* css3/flexbox/flexbox-lines-must-be-stretched-by-default-expected.txt:
* css3/flexbox/flexbox-lines-must-be-stretched-by-default.html:
* css3/flexbox/flexbox-overflow-auto-expected.html:
* css3/flexbox/flexbox-overflow-auto.html:
* css3/flexbox/flexbox-with-multi-column-property-expected.html: Added.
* css3/flexbox/flexbox-with-multi-column-property.html: Added.
* css3/flexbox/flexbox-wordwrap-expected.txt: Added.
* css3/flexbox/flexbox-wordwrap.html: Added.
* css3/flexbox/flexitem-expected.txt:
* css3/flexbox/flexitem-no-margin-collapsing-expected.txt:
* css3/flexbox/flexitem-no-margin-collapsing.html:
* css3/flexbox/flexitem-percent-height-change-expected.txt:
* css3/flexbox/flexitem-percent-height-change.html:
* css3/flexbox/flexitem-stretch-image-expected.txt:
* css3/flexbox/flexitem-stretch-image.html:
* css3/flexbox/flexitem-stretch-range.html:
* css3/flexbox/flexitem.html:
* css3/flexbox/floated-flexbox-expected.txt:
* css3/flexbox/floated-flexbox.html:
* css3/flexbox/floated-flexitem.html:
* css3/flexbox/inline-flex-crash.html:
* css3/flexbox/inline-flex-crash2.html:
* css3/flexbox/inline-flex-expected.txt:
* css3/flexbox/inline-flex.html:
* css3/flexbox/inline-flexbox-ignore-firstLine-expected.txt:
* css3/flexbox/inline-flexbox-ignore-firstLine.html:
* css3/flexbox/inline-flexbox-wrap-vertically-width-calculation-expected.txt: Added.
* css3/flexbox/inline-flexbox-wrap-vertically-width-calculation.html: Added.
* css3/flexbox/insert-text-crash.html:
* css3/flexbox/intrinsic-min-width-applies-with-fixed-width-expected.txt:
* css3/flexbox/intrinsic-min-width-applies-with-fixed-width.html:
* css3/flexbox/intrinsic-width-orthogonal-writing-mode-expected.txt: Added.
* css3/flexbox/intrinsic-width-orthogonal-writing-mode.html: Added.
* css3/flexbox/large-flex-shrink-assert-expected.txt: Added.
* css3/flexbox/large-flex-shrink-assert.html: Added.
* css3/flexbox/line-wrapping.html:
* css3/flexbox/mainAxisExtent-crash-expected.txt: Added.
* css3/flexbox/mainAxisExtent-crash.html: Added.
* css3/flexbox/max-width-violation-expected.txt: Added.
* css3/flexbox/max-width-violation.html: Added.
* css3/flexbox/min-size-auto-expected.txt:
* css3/flexbox/min-size-auto.html:
* css3/flexbox/minimum-size-image-expected.txt: Added.
* css3/flexbox/minimum-size-image.html: Added.
* css3/flexbox/multiline-align-content-expected.txt:
* css3/flexbox/multiline-align-content-horizontal-column-expected.txt:
* css3/flexbox/multiline-align-content-horizontal-column.html:
* css3/flexbox/multiline-align-content.html:
* css3/flexbox/multiline-align-self-expected.txt:
* css3/flexbox/multiline-align-self.html:
* css3/flexbox/multiline-column-auto-expected.txt:
* css3/flexbox/multiline-column-auto.html:
* css3/flexbox/multiline-column-overflow-expected.html: Added.
* css3/flexbox/multiline-column-overflow.html: Added.
* css3/flexbox/multiline-expected.txt:
* css3/flexbox/multiline-justify-content-expected.txt:
* css3/flexbox/multiline-justify-content.html:
* css3/flexbox/multiline-min-max-expected.txt: Added.
* css3/flexbox/multiline-min-max.html: Added.
* css3/flexbox/multiline-min-preferred-width-expected.txt:
* css3/flexbox/multiline-min-preferred-width.html:
* css3/flexbox/multiline-reverse-wrap-baseline.html:
* css3/flexbox/multiline-reverse-wrap-overflow-expected.txt:
* css3/flexbox/multiline-reverse-wrap-overflow.html:
* css3/flexbox/multiline-shrink-to-fit-expected.html:
* css3/flexbox/multiline-shrink-to-fit.html:
* css3/flexbox/multiline.html:
* css3/flexbox/negative-flex-rounding-assert.html:
* css3/flexbox/negative-margins-assert.html:
* css3/flexbox/negative-overflow-expected.txt:
* css3/flexbox/negative-overflow.html:
* css3/flexbox/nested-flexbox-min-size-auto-expected.txt: Added.
* css3/flexbox/nested-flexbox-min-size-auto.html: Added.
* css3/flexbox/nested-orthogonal-flexbox-relayout-expected.html: Added.
* css3/flexbox/nested-orthogonal-flexbox-relayout.html: Added.
* css3/flexbox/nested-stretch-expected.txt:
* css3/flexbox/nested-stretch.html:
* css3/flexbox/order-painting.html:
* css3/flexbox/orthogonal-flex-directions-expected.txt:
* css3/flexbox/orthogonal-flex-directions.html:
* css3/flexbox/orthogonal-writing-modes-and-intrinsic-sizing-expected.txt: Added.
* css3/flexbox/orthogonal-writing-modes-and-intrinsic-sizing.html: Added.
* css3/flexbox/overflow-and-padding-expected.txt: Added.
* css3/flexbox/overflow-and-padding.html: Added.
* css3/flexbox/overflow-auto-dynamic-changes-abspos-expected.html: Added.
* css3/flexbox/overflow-auto-dynamic-changes-abspos.html: Added.
* css3/flexbox/overflow-auto-dynamic-changes-expected.html: Added.
* css3/flexbox/overflow-auto-dynamic-changes.html: Added.
* css3/flexbox/overflow-auto-resizes-correctly-expected.txt: Added.
* css3/flexbox/overflow-auto-resizes-correctly.html: Added.
* css3/flexbox/overflow-keep-scrollpos-expected.txt:
* css3/flexbox/overflow-keep-scrollpos.html:
* css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item-expected.txt: Added.
* css3/flexbox/percent-height-children-of-alignSelf-stretch-flex-item.html: Added.
* css3/flexbox/percent-margins-expected.txt:
* css3/flexbox/percent-margins.html:
* css3/flexbox/percentage-height-in-abspos-expected.html: Added.
* css3/flexbox/percentage-height-in-abspos.html: Added.
* css3/flexbox/percentage-height-replaced-element-expected.txt: Added.
* css3/flexbox/percentage-height-replaced-element.html: Added.
* css3/flexbox/percentage-heights-expected.txt:
* css3/flexbox/percentage-heights.html:
* css3/flexbox/percentage-max-width-cross-axis-expected.txt: Added.
* css3/flexbox/percentage-max-width-cross-axis.html: Added.
* css3/flexbox/percentage-sizes-expected.txt:
* css3/flexbox/percentage-sizes-quirks-expected.txt:
* css3/flexbox/percentage-sizes-quirks.html:
* css3/flexbox/percentage-sizes.html:
* css3/flexbox/percentage-width-in-abspos-expected.html: Added.
* css3/flexbox/percentage-width-in-abspos.html: Added.
* css3/flexbox/perpendicular-writing-modes-inside-flex-item-expected.txt:
* css3/flexbox/perpendicular-writing-modes-inside-flex-item.html:
* css3/flexbox/position-absolute-child-expected.txt:
* css3/flexbox/position-absolute-child.html:
* css3/flexbox/position-absolute-children-expected.txt:
* css3/flexbox/position-absolute-children.html:
* css3/flexbox/preferred-widths-expected.txt:
* css3/flexbox/preferred-widths-orthogonal.html:
* css3/flexbox/preferred-widths.html:
* css3/flexbox/relayout-align-items-expected.txt:
* css3/flexbox/relayout-align-items.html:
* css3/flexbox/relayout-image-load-expected.txt:
* css3/flexbox/relayout-image-load.html:
* css3/flexbox/relpos-with-percentage-top-expected.txt: Added.
* css3/flexbox/relpos-with-percentage-top.html: Added.
* css3/flexbox/relpos-with-scrollable-with-abspos-crash-expected.txt: Added.
* css3/flexbox/relpos-with-scrollable-with-abspos-crash.html: Added.
* css3/flexbox/resize-min-content-flexbox-expected.txt: Added.
* css3/flexbox/resize-min-content-flexbox.html: Added.
* css3/flexbox/resources/box-orient-button.js: Added.
(setFlexDirection):
(gebi):
(test):
* css3/flexbox/scrollbars-auto-expected.html: Added.
* css3/flexbox/scrollbars-auto.html: Added.
* css3/flexbox/scrollbars-expected.html: Added.
* css3/flexbox/scrollbars.html: Added.
* css3/flexbox/shrinking-column-flexbox-expected.txt: Added.
* css3/flexbox/shrinking-column-flexbox.html: Added.
* css3/flexbox/stretch-after-sibling-size-change-expected.txt:
* css3/flexbox/stretch-after-sibling-size-change.html:
* css3/flexbox/stretch-input-in-column-expected.html:
* css3/flexbox/stretch-simplified-layout-expected.txt:
* css3/flexbox/stretch-simplified-layout.html:
* css3/flexbox/stretch-table-child-expected.txt: Added.
* css3/flexbox/stretch-table-child.html: Added.
* css3/flexbox/stretched-child-shrink-on-relayout-expected.txt: Added.
* css3/flexbox/stretched-child-shrink-on-relayout.html: Added.
* css3/flexbox/stretching-orthogonal-flows-expected.html: Added.
* css3/flexbox/stretching-orthogonal-flows.html: Added.
* css3/flexbox/style-change-expected.txt:
* css3/flexbox/style-change.html:
* css3/flexbox/text-overflow-on-flexbox-expected.html: Added.
* css3/flexbox/text-overflow-on-flexbox.html: Added.
* css3/flexbox/true-centering-expected.txt:
* css3/flexbox/true-centering.html:
* css3/flexbox/undefined-min-width-expected.txt: Added.
* css3/flexbox/undefined-min-width.html: Added.
* css3/flexbox/vertical-align-do-not-effect-flex-items-expected.html: Added.
* css3/flexbox/vertical-align-do-not-effect-flex-items.html: Added.
* css3/flexbox/vertical-flexbox-percentage-ignored-expected.html: Added.
* css3/flexbox/vertical-flexbox-percentage-ignored.html: Added.
* css3/flexbox/whitespace-in-flexitem-expected.html: Added.
* css3/flexbox/whitespace-in-flexitem.html: Added.
* css3/flexbox/width-change-and-relayout-children-expected.txt:
* css3/flexbox/width-change-and-relayout-children.html:
* css3/flexbox/wrapping-column-dynamic-changes-expected.txt: Added.
* css3/flexbox/wrapping-column-dynamic-changes.html: Added.
* css3/flexbox/writing-modes-expected.txt:
* css3/flexbox/writing-modes.html:
* css3/flexbox/z-index.html:
* resources/check-layout-th.js: Added.
(checkSubtreeExpectedValues):
(checkAttribute):
(assert_tolerance):
(checkExpectedValues):
(window.checkLayout):

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

2 years agoRemove EFL leftover from WebPageProxy.messages.in
ossy@webkit.org [Tue, 28 Feb 2017 09:01:09 +0000 (09:01 +0000)]
Remove EFL leftover from WebPageProxy.messages.in
https://bugs.webkit.org/show_bug.cgi?id=168828

Reviewed by Gyuyoung Kim.

* UIProcess/WebPageProxy.messages.in:

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

2 years agoMain resource requests need cachePartition
achristensen@apple.com [Tue, 28 Feb 2017 08:30:44 +0000 (08:30 +0000)]
Main resource requests need cachePartition
https://bugs.webkit.org/show_bug.cgi?id=168806
Source/WebCore:

<rdar://30639764>

Reviewed by Brady Eidson.

Test: http/tests/security/credentials-main-resource.html

r211751 caused an unintended regression on pages whose main resource is protected
by basic authentication.  We were not setting the cache partition for main resource
requests, and we use the cache partition now for credentials, so the credentials for
the main resource were not being put into a partition in the CredentialStorage that
would not be used for subresources of the page, whose requests had the correct partition
for the domain of the page.  This caused users to have to enter their credentials twice,
once for the main resource and once for any subresources.  This is fixed by using the
domain from the main resource request as the cache partition.  Elsewhere the Document is
used to get the cache partition, but there is no Document yet when requesting the main resource.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
Set the cache partition for the main resource loads based on the SecurityOrigin of the
initial request if we are loading the main resource for a new top document.  If the main resource
request is redirected, then we will still use the partition of the initial request because that is
what the user requested and that is where the user entered the credentials.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setDomainForCachePartition):
* loader/cache/CachedResourceRequest.h:

Source/WebKit2:

Reviewed by Brady Eidson.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):

LayoutTests:

Reviewed by Brady Eidson.

* http/tests/security/credentials-main-resource-expected.txt: Added.
* http/tests/security/credentials-main-resource.html: Added.
* http/tests/security/resources/credentials-main-resource.php: Added.

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

2 years agoREGRESSION: LayoutTest http/tests/security/credentials-iframes.html is failing on...
achristensen@apple.com [Tue, 28 Feb 2017 08:28:33 +0000 (08:28 +0000)]
REGRESSION: LayoutTest http/tests/security/credentials-iframes.html is failing on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=167967

Reviewed by Brady Eidson.

Source/WebCore:

XHR credentials have a persistence of CredentialPersistenceNone because we keep
them in the WebCore::CredentialStorage.  We were storing them to CFNetwork's NSURLCredentialStorage
on iOS and then they were being given as the proposedCredential in
NetworkDataTaskCocoa::tryPasswordBasedAuthentication even though we set CredentialPersistenceNone.

This fixes http/tests/security/credentials-iframes.html

* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::set):
* platform/network/CredentialStorage.h:
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::saveToPersistentStorage): Deleted.
* platform/network/mac/CredentialStorageMac.mm:
(WebCore::CredentialStorage::saveToPersistentStorage): Deleted.

LayoutTests:

* platform/ios-simulator/TestExpectations:

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

2 years agoFix WinCairo build.
achristensen@apple.com [Tue, 28 Feb 2017 07:39:59 +0000 (07:39 +0000)]
Fix WinCairo build.

* PlatformWinCairo.cmake:

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

2 years agoBegin enabling WebRTC on 64-bit
achristensen@apple.com [Tue, 28 Feb 2017 07:11:13 +0000 (07:11 +0000)]
Begin enabling WebRTC on 64-bit
https://bugs.webkit.org/show_bug.cgi?id=168915

Reviewed by Eric Carlson.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* Scripts/build-webkit:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years agoFix tests after r213119 and r213120.
rniwa@webkit.org [Tue, 28 Feb 2017 05:01:45 +0000 (05:01 +0000)]
Fix tests after r213119 and r213120.

* browser-tests/time-series-chart-tests.js:
(return.ChartTest.importChartScripts.context.then):
(string_appeared_here.then): Deleted.

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

2 years agoAdd css-status page on webkit.org
simon.fraser@apple.com [Tue, 28 Feb 2017 05:00:28 +0000 (05:00 +0000)]
Add css-status page on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=168921

Reviewed by Sam Weinig.

Add a page that shows the status of CSS properties and values, scraped from Source/WebCore/css/CSSProperties.json.

This is modeled after the feature status page. Properties can be filtered by status
and the spec they belong to.

* wp-content/themes/webkit/css-status.php: Added.

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

2 years agoRemoved the unused code that was supposed to be removed in the previous commit.
rniwa@webkit.org [Tue, 28 Feb 2017 04:52:17 +0000 (04:52 +0000)]
Removed the unused code that was supposed to be removed in the previous commit.

* browser-tests/time-series-chart-tests.js:

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

2 years agoSplit tests for InteractiveTimeSeriesChart into a separate test file.
rniwa@webkit.org [Tue, 28 Feb 2017 04:48:36 +0000 (04:48 +0000)]
Split tests for InteractiveTimeSeriesChart into a separate test file.
https://bugs.webkit.org/show_bug.cgi?id=168960

Reviewed by Joseph Pecoraro.

Extracted the test cases for InteractiveTimeSeriesChart charts from time-series-chart-tests.js
into interactive-time-series-chart-tests.js now that the former file has gotten really big over time.

Also extracted a bunch of helper functions time-series-chart-tests.js as ChartTest in index.html.
Any test which instantiates a time series chart can use this helper class.

* browser-tests/index.html:
(ChartTest.importChartScripts): Ditto.
(ChartTest.posixTime): Moved from time-series-chart-tests.js.
(ChartTest.sampleCluster): Ditto.
(ChartTest.createChartWithSampleCluster): Ditto.
(ChartTest.createInteractiveChartWithSampleCluster): Ditto.
(ChartTest.respondWithSampleCluster):
* browser-tests/interactive-time-series-chart-tests.js: Extracted from time-series-chart-tests.js.
* browser-tests/time-series-chart-tests.js:
(posixTime): Moved.
(dayInMilliseconds): Moved.
(sampleCluster): Moved.
(createChartWithSampleCluster): Moved.
(createInteractiveChartWithSampleCluster): Moved.
(respondWithSampleCluster): Moved.
* unit-tests/analysis-task-tests.js: Fixed a typo. s/adopter/adapter/.

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

2 years agoRemove _WKWebsiteDataRecord.h
ap@apple.com [Tue, 28 Feb 2017 04:47:44 +0000 (04:47 +0000)]
Remove _WKWebsiteDataRecord.h
https://bugs.webkit.org/show_bug.cgi?id=168954

Reviewed by Dan Bernstein.

This doesn't seem to have ever been used, so better to remove it than to add an
implementation.

* UIProcess/API/Cocoa/_WKWebsiteDataRecord.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

2 years agoCalling build() on a baseline point results in an exception
rniwa@webkit.org [Tue, 28 Feb 2017 04:07:05 +0000 (04:07 +0000)]
Calling build() on a baseline point results in an exception
https://bugs.webkit.org/show_bug.cgi?id=168959

Reviewed by Joseph Pecoraro.

Some baseline points may lack the build information. e.g. A custom data point made by an user.
Only instantiate Build object in a point object returned by MeasurementAdaptor when the builder id
is available so that we don't hit an assertion inside Build's constructor.

* public/v3/models/measurement-adaptor.js:
(MeasurementAdaptor.prototype.applyTo..build): Only instantiate Build when builderId is set.
* unit-tests/measurement-adaptor-tests.js: Added a test case.

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

2 years agoArrow key shouldn't move the indicator beyond the visible points
rniwa@webkit.org [Tue, 28 Feb 2017 03:30:33 +0000 (03:30 +0000)]
Arrow key shouldn't move the indicator beyond the visible points
https://bugs.webkit.org/show_bug.cgi?id=168956

Reviewed by Joseph Pecoraro.

The bug was caused by moveLockedIndicatorWithNotification using the full sampled time series view
instead of the one constrained by the domain. Since the time series chart expands the visible domain
to include at least one point before the start time and one point after the end tiem to draw lines
extending beyond the visible region (otherwise it looks as though the graph ends there), we need to
use a view constrained by the start time and the end time before looking for a next/previous point.

* browser-tests/time-series-chart-tests.js: Added test cases for moveLockedIndicatorWithNotification.
* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype.moveLockedIndicatorWithNotification): Fixed the bug. Also
enqueue itself to render instead of relying on a parent component to do it.

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

2 years ago[Modern Media Controls] Use compact mode by default on macOS
graouts@webkit.org [Tue, 28 Feb 2017 03:24:37 +0000 (03:24 +0000)]
[Modern Media Controls] Use compact mode by default on macOS
https://bugs.webkit.org/show_bug.cgi?id=168958
<rdar://problem/30748638>

Reviewed by Jon Lee.

Source/WebCore:

We now use the compact layout mode by default on macOS.

* Modules/modern-media-controls/controls/layout-item.js: Remove the ReducedPadding trait.
* Modules/modern-media-controls/controls/macos-compact-inline-media-controls.css:
(.media-controls.mac.inline.compact .time-label,): Vertically align the time label with
the scrubber in compact mode.
(.media-controls.mac.inline.compact .scrubber.slider): Correctly position the scrubber in
compact mode so that it's vertically aligned.
* Modules/modern-media-controls/controls/macos-inline-media-controls.js:
(MacOSInlineMediaControls.prototype.layoutTraitsDidChange): Remove handling of tight and
reduced padding traits since these do not apply to macOS anymore. We also notify the
scrubber of a layout trait change so that it may adjust its height.
* Modules/modern-media-controls/controls/scrubber.js:
(Scrubber):
(Scrubber.prototype.layoutTraitsDidChange): Adjust the height of the scrubber to match
compact layout traits.
* Modules/modern-media-controls/controls/time-control.js:
(TimeControl.prototype.get isSufficientlyWide): Adjust the minimum scrubber width for
TimeControl visibility to match compact layout traits.
* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.get layoutTraits): Use the compact layout trait by default
on macOS and make the tight padding specific to iOS.

LayoutTests:

Rebaseline tests to account for compact mode being the default mode for macOS
and remove tests that would check dynamically applying compact mode at some
threshold and the reduced padding mode.

* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-compact.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-reduced-padding-expected.txt: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-reduced-padding.html: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-tight-padding-expected.txt: Removed.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-tight-padding.html: Removed.
* media/modern-media-controls/media-controller/media-controller-compact.html:
* media/modern-media-controls/media-controller/media-controller-fullscreen-change-expected.txt:
* media/modern-media-controls/media-controller/media-controller-fullscreen-change.html:
* media/modern-media-controls/media-controller/media-controller-reduced-padding-expected.txt: Removed.
* media/modern-media-controls/media-controller/media-controller-reduced-padding.html: Removed.
* media/modern-media-controls/media-controller/media-controller-toggle-compact-mode-expected.txt: Removed.
* media/modern-media-controls/media-controller/media-controller-toggle-compact-mode.html: Removed.
* platform/mac/TestExpectations:

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

2 years agoWindows regression: webkitpy.tool.steps.steps_unittest.StepsTest.test_runtests_jsc...
commit-queue@webkit.org [Tue, 28 Feb 2017 02:24:56 +0000 (02:24 +0000)]
Windows regression: webkitpy.tool.steps.steps_unittest.StepsTest.test_runtests_jsc[_debug]
https://bugs.webkit.org/show_bug.cgi?id=168628

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-02-27
Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests._run_javascriptcore_tests): Pass options to the Base instance.
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(StepsTest._step_options): Add a new 'root' option that's passed through to the Base instance.
(test_runtests_jsc): Not running webkit-build-directory anymore, and changed json output directory.
(test_runtests_jsc_debug): Ditto

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

2 years ago[Modern Media Controls] Adhere to tight padding on iOS
graouts@webkit.org [Tue, 28 Feb 2017 02:18:17 +0000 (02:18 +0000)]
[Modern Media Controls] Adhere to tight padding on iOS
https://bugs.webkit.org/show_bug.cgi?id=168949
<rdar://problem/30746164>

Reviewed by Jon Lee.

Source/WebCore:

We used to only support custom margins on macOS, to support this on iOS as
well, we promote the notification when the layoutTraits property is set to
MediaControls and expose a new protected method layoutTraitsDidChange() for
subclasses to implement. IOSInlineMediaControls now implements that method
and will use tighter margins for the TightPadding layout trait.

Test: media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-tight-padding.html

* Modules/modern-media-controls/controls/ios-inline-media-controls.js:
(IOSInlineMediaControls.prototype.layoutTraitsDidChange):
(IOSInlineMediaControls):
* Modules/modern-media-controls/controls/macos-inline-media-controls.js:
(MacOSInlineMediaControls.prototype.get layoutTraits): Deleted.
(MacOSInlineMediaControls.prototype.set layoutTraits): Deleted.
(MacOSInlineMediaControls.prototype._matchLayoutTraits): Deleted.
* Modules/modern-media-controls/controls/media-controls.js:
(MediaControls.prototype.get layoutTraits):
(MediaControls.prototype.set layoutTraits):
(MediaControls.prototype.layoutTraitsDidChange):

LayoutTests:

Adding a new test for the TightPadding layout trait on iOS.

* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-tight-padding-expected.txt: Added.
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-tight-padding.html: Added.

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

2 years agoWKPageIsPlayingVideoInEnhancedFullscreen availability mismatch
ap@apple.com [Tue, 28 Feb 2017 02:08:25 +0000 (02:08 +0000)]
WKPageIsPlayingVideoInEnhancedFullscreen availability mismatch
https://bugs.webkit.org/show_bug.cgi?id=168952

Reviewed by Dan Bernstein.

* UIProcess/API/C/mac/WKPagePrivateMac.h: TARGET_OS_MAC is not the right thing to
check, as it's true on both macOS and iOS.

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

2 years agoExport WKPluginInformationBundleShortVersionKey
ap@apple.com [Tue, 28 Feb 2017 02:06:17 +0000 (02:06 +0000)]
Export WKPluginInformationBundleShortVersionKey
https://bugs.webkit.org/show_bug.cgi?id=168951

Reviewed by Dan Bernstein.

* Shared/API/c/WKPluginInformation.h: It was accidentally not exported when added.

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

2 years agoMark compositing/video/video-poster.html as flaky on macOS release.
ryanhaddad@apple.com [Tue, 28 Feb 2017 01:36:27 +0000 (01:36 +0000)]
Mark compositing/video/video-poster.html as flaky on macOS release.
https://bugs.webkit.org/show_bug.cgi?id=168953

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years ago[WebRTC] Support modern RTCStatsReport
commit-queue@webkit.org [Tue, 28 Feb 2017 01:34:35 +0000 (01:34 +0000)]
[WebRTC] Support modern RTCStatsReport
https://bugs.webkit.org/show_bug.cgi?id=166916
<rdar://problem/30293780>

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

Updating binding generator and IDL parser to handle maplike.
Covered by binding tests.

Added support for maplike binding from JS wrapper to DOM class.
The principle is to have the JSXX wrapper having a @backingMap slot containing a Map.
All maplike methods are forwarded to the corresponding Map methods.
The XX object is responsible to add key/value pairs using a helper routine.
The creation of the Map is done at creation of the JSXX wrapper.

DOM class is interacting with the map through DOMMapLike.
Extracted DOMGuarded from DOM promise implementation.
This allows reusing this code for DOMMapLike.

Covered by binding tests and manual tests.

* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/RTCStatsReport.h:
(WebCore::RTCStatsReport::InboundRTPStreamStats::InboundRTPStreamStats):
(WebCore::RTCStatsReport::OutboundRTPStreamStats::OutboundRTPStreamStats):
(WebCore::RTCStatsReport::create):
(WebCore::RTCStatsReport::synchronizeBackingMap):
(WebCore::RTCStatsReport::backingMap):
(WebCore::RTCStatsReport::addStats):
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::fromStdString):
(WebCore::fillRTCStats):
(WebCore::fillRTCRTPStreamStats):
(WebCore::fillInboundRTPStreamStats):
(WebCore::fillOutboundRTPStreamStats):
(WebCore::LibWebRTCMediaEndpoint::StatsCollector::OnStatsDelivered):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMBindingInternals.js: Added.
(mapLikeForEach):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMGuardedObject.cpp: Added.
(WebCore::DOMGuardedObject::DOMGuardedObject):
(WebCore::DOMGuardedObject::~DOMGuardedObject):
(WebCore::DOMGuardedObject::clear):
(WebCore::DOMGuardedObject::contextDestroyed):
* bindings/js/JSDOMGuardedObject.h: Added.
(WebCore::DOMGuardedObject::isSuspended):
(WebCore::DOMGuardedObject::visitAggregate):
(WebCore::DOMGuardedObject::guardedObject):
(WebCore::DOMGuardedObject::globalObject):
(WebCore::DOMGuardedObject::isEmpty):
(WebCore::DOMGuarded::DOMGuarded):
(WebCore::DOMGuarded::guarded):
* bindings/js/JSDOMMapLike.cpp: Added.
(WebCore::getBackingMap):
(WebCore::initializeBackingMap):
(WebCore::createBackingMap):
(WebCore::forwardAttributeGetterToBackingMap):
(WebCore::forwardFunctionCallToBackingMap):
(WebCore::forwardForEachCallToBackingMap):
* bindings/js/JSDOMMapLike.h: Added.
(WebCore::DOMMapLike::set):
(WebCore::synchronizeBackingMap):
(WebCore::forwardSizeToMapLike):
(WebCore::forwardEntriesToMapLike):
(WebCore::forwardKeysToMapLike):
(WebCore::forwardValuesToMapLike):
(WebCore::forwardClearToMapLike):
(WebCore::forwardForEachToMapLike):
(WebCore::forwardHasToMapLike):
(WebCore::forwardAddToMapLike):
(WebCore::forwardDeleteToMapLike):
* bindings/js/JSDOMPromise.cpp:
(WebCore::DeferredPromise::promise):
(WebCore::DeferredPromise::reject):
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredPromise::resolve):
(WebCore::DeferredPromise::resolveWithNewlyCreated):
(WebCore::DeferredPromise::reject):
(WebCore::DeferredPromise::resolveWithCallback):
(WebCore::DeferredPromise::rejectWithCallback):
(WebCore::DeferredPromise::DeferredPromise):
(WebCore::DeferredPromise::deferred):
* bindings/js/WebCoreBuiltinNames.h:
* bindings/scripts/CodeGeneratorJS.pm:
(PrototypeFunctionCount):
(GeneratePropertiesHashTable):
(InterfaceNeedsIterator):
(GenerateImplementation):
(GenerateParametersCheck):
* bindings/scripts/IDLParser.pm:
(assert):
(parseAttributeOrOperationOrIterator):
(parseSerializer):
(parseAttributeOrOperationRest):
(parseAttribute):
(parseAttributeRest):
(parseOperationOrIterator):
(parseOptionalIterableInterface):
(parseMapLikeRest):
(parseMapLikeProperties):
(parseOperationRest):
(applyMemberList):
* bindings/scripts/test/JS/JSMapLike.cpp: Added.
* bindings/scripts/test/JS/JSMapLike.h: Added.
* bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: Added.
* bindings/scripts/test/JS/JSReadOnlyMapLike.h: Added.
* bindings/scripts/test/TestMapLike.idl: Added.
* bindings/scripts/test/TestReadOnlyMapLike.idl: Added.

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

2 years agoIntroduce a VM Traps mechanism and refactor Watchdog to use it.
mark.lam@apple.com [Tue, 28 Feb 2017 01:20:54 +0000 (01:20 +0000)]
Introduce a VM Traps mechanism and refactor Watchdog to use it.
https://bugs.webkit.org/show_bug.cgi?id=168842

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Currently, the traps mechanism is only used for the JSC watchdog, and for
asynchronous termination requests (which is currently only used for worker
threads termination).

This first cut of the traps mechanism still relies on polling from DFG and FTL
code.  This is done to keep the patch as small as possible.  The work to do
a non-polling version of the traps mechanism for DFG and FTL code is deferred to
another patch.

In this patch, worker threads still need to set the VM::m_needAsynchronousTerminationSupport
flag to enable the traps polling in the DFG and FTL code.  When we have the
non-polling version of the DFG and FTL traps mechanism, we can remove the use of
the VM::m_needAsynchronousTerminationSupport flag.

Note: this patch also separates asynchronous termination support from the JSC
watchdog.  This separation allows us to significantly simplify the locking
requirements in the watchdog code, and make it easier to reason about its
correctness.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitLoopHint):
(JSC::BytecodeGenerator::emitCheckTraps):
(JSC::BytecodeGenerator::emitWatchdog): Deleted.
* bytecompiler/BytecodeGenerator.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(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/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCheckTraps):
* dfg/DFGSpeculativeJIT.h:
* 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::compileCheckTraps):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckWatchdogTimer): Deleted.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::executeProgram):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::execute):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_check_traps):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::emit_op_watchdog): Deleted.
(JSC::JIT::emitSlow_op_watchdog): Deleted.
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/VM.cpp:
(JSC::VM::~VM):
(JSC::VM::ensureWatchdog):
(JSC::VM::handleTraps):
* runtime/VM.h:
(JSC::VM::ownerThread):
(JSC::VM::needTrapHandling):
(JSC::VM::needTrapHandlingAddress):
(JSC::VM::notifyNeedTermination):
(JSC::VM::notifyNeedWatchdogCheck):
(JSC::VM::needAsynchronousTerminationSupport):
(JSC::VM::setNeedAsynchronousTerminationSupport):
* runtime/VMInlines.h:
(JSC::VM::shouldTriggerTermination): Deleted.
* runtime/VMTraps.cpp: Added.
(JSC::VMTraps::fireTrap):
(JSC::VMTraps::takeTrap):
* runtime/VMTraps.h: Added.
(JSC::VMTraps::needTrapHandling):
(JSC::VMTraps::needTrapHandlingAddress):
(JSC::VMTraps::hasTrapForEvent):
(JSC::VMTraps::setTrapForEvent):
(JSC::VMTraps::clearTrapForEvent):
* runtime/Watchdog.cpp:
(JSC::Watchdog::Watchdog):
(JSC::Watchdog::setTimeLimit):
(JSC::Watchdog::shouldTerminate):
(JSC::Watchdog::enteredVM):
(JSC::Watchdog::exitedVM):
(JSC::Watchdog::startTimer):
(JSC::Watchdog::stopTimer):
(JSC::Watchdog::willDestroyVM):
(JSC::Watchdog::terminateSoon): Deleted.
(JSC::Watchdog::shouldTerminateSlow): Deleted.
* runtime/Watchdog.h:
(JSC::Watchdog::shouldTerminate): Deleted.
(JSC::Watchdog::timerDidFireAddress): Deleted.

Source/WebCore:

No new tests needed because this is a re-implementation of existing functionality.

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::WorkerScriptController):
(WebCore::WorkerScriptController::scheduleExecutionTermination):

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

2 years ago[Modern Media Controls] Use a solid background for <audio> controls on macOS
ryanhaddad@apple.com [Tue, 28 Feb 2017 01:20:16 +0000 (01:20 +0000)]
[Modern Media Controls] Use a solid background for <audio> controls on macOS
https://bugs.webkit.org/show_bug.cgi?id=168941
<rdar://problem/30744316>

Unreviewed test gardening.

Skipping a macOS-specific test on iOS.

Patch by Antoine Quint <graouts@apple.com> on 2017-02-27

* platform/ios-simulator/TestExpectations:

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

2 years ago[Cocoa] Rename FileMac.mm to FileCocoa.mm
aestes@apple.com [Tue, 28 Feb 2017 01:13:58 +0000 (01:13 +0000)]
[Cocoa] Rename FileMac.mm to FileCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=168947

Reviewed by Zalan Bujtas.

* PlatformMac.cmake:
* WebCore.xcodeproj/project.pbxproj:
* fileapi/FileCocoa.mm: Renamed from Source/WebCore/fileapi/FileMac.mm.

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

2 years ago[WebRTC] Add support for libwebrtc TCP incoming connections
commit-queue@webkit.org [Tue, 28 Feb 2017 01:10:39 +0000 (01:10 +0000)]
[WebRTC] Add support for libwebrtc TCP incoming connections
https://bugs.webkit.org/show_bug.cgi?id=168748

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

Source/WebKit2:

Covered by added layout tests.

When a libwebrtc server socket is signalling a new connnection through SignalNewConnection, we do:
- Wrap the incoming socket into a LibWebRTCSocketClient
- Store it into a pending socket map with an identifier
- Send a message to the web process of a new connection with the server socket identifier and new connection socket identifier.
The Web process then creates a WebRTCSocket wrapper around it by sendinig a WrapNewTCPConnection message.
It then propagates the SignalNewConnection to libwebrtc code path.

* NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
(WebKit::LibWebRTCSocketClient::LibWebRTCSocketClient):
(WebKit::LibWebRTCSocketClient::signalReadPacket):
(WebKit::LibWebRTCSocketClient::signalSentPacket):
(WebKit::LibWebRTCSocketClient::signalNewConnection):
(WebKit::LibWebRTCSocketClient::signalAddressReady):
(WebKit::LibWebRTCSocketClient::signalConnect):
(WebKit::LibWebRTCSocketClient::signalClose):
* NetworkProcess/webrtc/LibWebRTCSocketClient.h:
* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::wrapNewTCPConnection):
(WebKit::NetworkRTCProvider::newConnection):
* NetworkProcess/webrtc/NetworkRTCProvider.h:
* NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
* WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
(WebKit::LibWebRTCSocket::signalNewConnection):
* WebProcess/Network/webrtc/LibWebRTCSocket.h:
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
(WebKit::LibWebRTCSocketFactory::createNewConnectionSocket):
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.h:
* WebProcess/Network/webrtc/WebRTCSocket.cpp:
(WebKit::WebRTCSocket::signalNewConnection):
* WebProcess/Network/webrtc/WebRTCSocket.h:
* WebProcess/Network/webrtc/WebRTCSocket.messages.in:

LayoutTests:

* webrtc/datachannel/basic-expected.txt: Added.
* webrtc/datachannel/basic.html:
* webrtc/routines.js:
(createConnections):
(iceCallback1):
(iceCallback2):

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

2 years agoMark fast/dom/timer-throttling-hidden-page.html as flaky.
ryanhaddad@apple.com [Tue, 28 Feb 2017 01:03:10 +0000 (01:03 +0000)]
Mark fast/dom/timer-throttling-hidden-page.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168927

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoMark media/modern-media-controls/rewind-button/rewind-button.html as flaky.
ryanhaddad@apple.com [Tue, 28 Feb 2017 00:59:46 +0000 (00:59 +0000)]
Mark media/modern-media-controls/rewind-button/rewind-button.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167352

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

2 years ago[Mac] Don't use undefined sandbox rule on macOS 10.11 or earlier
bfulgham@apple.com [Tue, 28 Feb 2017 00:37:57 +0000 (00:37 +0000)]
[Mac] Don't use undefined sandbox rule on macOS 10.11 or earlier
https://bugs.webkit.org/show_bug.cgi?id=168942
<rdar://problem/30743376>

Reviewed by Ryosuke Niwa.

* WebProcess/com.apple.WebProcess.sb.in:

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

2 years ago[iOS] Enable file replacement
aestes@apple.com [Tue, 28 Feb 2017 00:13:24 +0000 (00:13 +0000)]
[iOS] Enable file replacement
https://bugs.webkit.org/show_bug.cgi?id=168907
<rdar://problem/22258242>

Reviewed by David Kilzer.

Source/WebCore:

Covered by existing tests.

* fileapi/FileMac.mm:
(WebCore::File::shouldReplaceFile): Stop using Carbon and AppKit API for determining if a
file path is a file package. Use NSURL and CoreServices instead, which exist on Mac and iOS.

Source/WTF:

* wtf/FeatureDefines.h: Set ENABLE_FILE_REPLACEMENT to 1 on all Cocoa platforms.

LayoutTests:

* platform/ios-simulator/TestExpectations: Un-skipped file replacement tests on iOS.

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

2 years ago[Modern Media Controls] Use a solid background for <audio> controls on macOS
commit-queue@webkit.org [Tue, 28 Feb 2017 00:01:28 +0000 (00:01 +0000)]
[Modern Media Controls] Use a solid background for <audio> controls on macOS
https://bugs.webkit.org/show_bug.cgi?id=168941
<rdar://problem/30744316>

Patch by Antoine Quint <graouts@apple.com> on 2017-02-27
Reviewed by Dean Jackson.

Source/WebCore:

Use a solid background for <audio> elements on macOS, the same way we do on iOS.

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

* Modules/modern-media-controls/controls/macos-media-controls.css:
(:host(audio) .media-controls.mac.inline > .controls-bar):
(:host(audio) .media-controls.mac.inline > .controls-bar > .background-tint):

LayoutTests:

Add a new test that checks that we use a solid background fill for <audio> on macOS.

* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-audio-background.html: Added.

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

2 years ago[Modern Media Controls] StatusLabel should use similar properties to TimeLabel
commit-queue@webkit.org [Mon, 27 Feb 2017 23:33:45 +0000 (23:33 +0000)]
[Modern Media Controls] StatusLabel should use similar properties to TimeLabel
https://bugs.webkit.org/show_bug.cgi?id=168938
<rdar://problem/30743185>

Patch by Antoine Quint <graouts@apple.com> on 2017-02-27
Reviewed by Dean Jackson.

Source/WebCore:

Ensure we use the same styling properties for StatusLabel and TimeLabel.

Tests: media/modern-media-controls/status-label/status-label-ios.html
       media/modern-media-controls/status-label/status-label-macos.html

* Modules/modern-media-controls/controls/ios-inline-media-controls.css:
(.media-controls.ios.inline .time-label,):
(.media-controls.ios.inline .time-label): Deleted.
* Modules/modern-media-controls/controls/macos-media-controls.css:
(.media-controls.mac > .controls-bar .time-label,):
(.media-controls.mac > .controls-bar .time-label): Deleted.
* Modules/modern-media-controls/controls/status-label.css:
(.status-label):

LayoutTests:

We add new tests to ensure we test all the various styles that can be applied
to a StatusLabel.

* media/modern-media-controls/status-label/status-label-expected.txt:
* media/modern-media-controls/status-label/status-label-ios-expected.txt: Added.
* media/modern-media-controls/status-label/status-label-ios.html: Added.
* media/modern-media-controls/status-label/status-label-macos-expected.txt: Added.
* media/modern-media-controls/status-label/status-label-macos.html: Added.
* media/modern-media-controls/status-label/status-label.html:

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

2 years agoAdd machine-readable results for bindings tests
commit-queue@webkit.org [Mon, 27 Feb 2017 23:07:25 +0000 (23:07 +0000)]
Add machine-readable results for bindings tests
https://bugs.webkit.org/show_bug.cgi?id=168626

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-02-27
Reviewed by Alexey Proskuryakov.

* Scripts/run-bindings-tests:
(main): Add optional --json-output command-line parameter.
* Scripts/webkitpy/bindings/main.py:
(BindingsTests.__init__): Add variables to store machine-readable results.
(BindingsTests.detect_changes): Store results in machine-readable form if applicable.
(BindingsTests.main): Write data to JSON file if applicable.

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

2 years agoEnable SUPPORTS_TEXT_BASED_API in WebKitLegacy for iOS
aakash_jain@apple.com [Mon, 27 Feb 2017 22:54:26 +0000 (22:54 +0000)]
Enable SUPPORTS_TEXT_BASED_API in WebKitLegacy for iOS
https://bugs.webkit.org/show_bug.cgi?id=168919

Reviewed by Tim Horton.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj: Run scripts which are run for installhdrs phase for installapi phase as well.

Source/WebKit/mac:

* Configurations/WebKitLegacy.xcconfig: Enable SUPPORTS_TEXT_BASED_API.
* migrate-headers.sh: Run the migrate-headers script for installapi phase.

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

2 years agoRename ICU cursor iterator to caret iterator
mmaxfield@apple.com [Mon, 27 Feb 2017 22:44:19 +0000 (22:44 +0000)]
Rename ICU cursor iterator to caret iterator
https://bugs.webkit.org/show_bug.cgi?id=168206

Reviewed by Simon Fraser.

Source/WebCore:

Mechanical find/replace.

No new tests because there is no behavior change.

* platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::offsetForPosition):
* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffset):
(WebCore::RenderText::nextOffset):

Source/WTF:

* wtf/text/TextBreakIterator.cpp:
(WTF::mapModeToBackingIterator):
* wtf/text/TextBreakIterator.h:
* wtf/text/cf/TextBreakIteratorCF.h:
(WTF::TextBreakIteratorCF::TextBreakIteratorCF):
* wtf/text/icu/TextBreakIteratorICU.h:
(WTF::caretRules):
(WTF::TextBreakIteratorICU::TextBreakIteratorICU):
(WTF::cursorRules): Deleted.
* wtf/text/mac/TextBreakIteratorInternalICUMac.mm:
(WTF::mapModeToBackingIterator):

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

2 years agoUnprefix -webkit-line-break
mmaxfield@apple.com [Mon, 27 Feb 2017 22:41:08 +0000 (22:41 +0000)]
Unprefix -webkit-line-break
https://bugs.webkit.org/show_bug.cgi?id=168213

Reviewed by Darin Adler.

Source/WebCore:

We support the property as specced.

Test: fast/text/line-break-unprefixed.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperties.json:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
* editing/Editor.cpp:
(WebCore::Editor::applyEditingStyleToElement):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::collectStyleForPresentationAttribute):

LayoutTests:

Updating expected results.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/text/line-break-unprefixed.html: Added.
* fast/text/line-break-unprefixed-expected.html: Added.
* svg/css/getComputedStyle-basic-expected.txt:

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

2 years agoUse RAII for ICU breaking iterators
mmaxfield@apple.com [Mon, 27 Feb 2017 22:39:31 +0000 (22:39 +0000)]
Use RAII for ICU breaking iterators
https://bugs.webkit.org/show_bug.cgi?id=168203

Reviewed by Simon Fraser.

Source/WebCore:

No new tests because there is no behavior change.

* platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::offsetForPosition):
* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffset):
(WebCore::RenderText::nextOffset):

Source/WTF:

* wtf/text/TextBreakIterator.h:
(WTF::CachedTextBreakIterator::CachedTextBreakIterator):
(WTF::CachedTextBreakIterator::~CachedTextBreakIterator):
(WTF::CachedTextBreakIterator::preceding):
(WTF::CachedTextBreakIterator::following):
(WTF::CachedTextBreakIterator::isBoundary):

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

2 years agoMark imported/w3c/web-platform-tests/IndexedDB/idbdatabase-deleteObjectStore-exceptio...
ryanhaddad@apple.com [Mon, 27 Feb 2017 22:36:48 +0000 (22:36 +0000)]
Mark imported/w3c/web-platform-tests/IndexedDB/idbdatabase-deleteObjectStore-exception-order.htm as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168936

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoUnreviewed, roll out r213065.
wenson_hsieh@apple.com [Mon, 27 Feb 2017 21:32:53 +0000 (21:32 +0000)]
Unreviewed, roll out r213065.

Source/WebKit2:

* UIProcess/ios/WKContentViewInteraction.h:

Tools:

We need these temporary fixes to keep the perf bots running.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
* TestWebKitAPI/ios/DataInteractionSimulator.h:
* TestWebKitAPI/ios/DataInteractionSimulator.mm:
(-[DataInteractionSimulator _advanceProgress]):

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

2 years agoMark inspector/controller/runtime-controller-import.html as flaky.
ryanhaddad@apple.com [Mon, 27 Feb 2017 21:26:40 +0000 (21:26 +0000)]
Mark inspector/controller/runtime-controller-import.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168926

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoMark imported/w3c/web-platform-tests/media-source/SourceBuffer-abort.html as flaky.
ryanhaddad@apple.com [Mon, 27 Feb 2017 21:22:03 +0000 (21:22 +0000)]
Mark imported/w3c/web-platform-tests/media-source/SourceBuffer-abort.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168094

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

2 years agoUnreviewed, rolling out r213019.
commit-queue@webkit.org [Mon, 27 Feb 2017 21:08:38 +0000 (21:08 +0000)]
Unreviewed, rolling out r213019.
https://bugs.webkit.org/show_bug.cgi?id=168925

"It broke 32-bit jsc tests in debug builds" (Requested by
saamyjoon on #webkit).

Reverted changeset:

"op_get_by_id_with_this should use inline caching"
https://bugs.webkit.org/show_bug.cgi?id=162124
http://trac.webkit.org/changeset/213019

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

2 years ago[WinCairo][MiniBrowser] Add ca-bundle to display secure pages
commit-queue@webkit.org [Mon, 27 Feb 2017 20:51:43 +0000 (20:51 +0000)]
[WinCairo][MiniBrowser] Add ca-bundle to display secure pages
https://bugs.webkit.org/show_bug.cgi?id=168486

Patch by Basuke Suzuki <Basuke.Suzuki@am.sony.com> on 2017-02-27
Reviewed by Alex Christensen.

change the order of path location search to make it possible to
configure with environment variable because bundled ca-bundle is
always available now.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath):

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

2 years agoRemove some deprecated WKPage plug-in information functions
ap@apple.com [Mon, 27 Feb 2017 20:46:49 +0000 (20:46 +0000)]
Remove some deprecated WKPage plug-in information functions
https://bugs.webkit.org/show_bug.cgi?id=168897

Reviewed by Tim Horton.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetProcessIdentifier):
(WKPageGetPluginInformationBundleIdentifierKey): Deleted.
(WKPageGetPluginInformationBundleVersionKey): Deleted.
(WKPageGetPluginInformationDisplayNameKey): Deleted.
(WKPageGetPluginInformationFrameURLKey): Deleted.
(WKPageGetPluginInformationMIMETypeKey): Deleted.
(WKPageGetPluginInformationPageURLKey): Deleted.
(WKPageGetPluginInformationPluginspageAttributeURLKey): Deleted.
(WKPageGetPluginInformationPluginURLKey): Deleted.
* UIProcess/API/C/WKPage.h:

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

2 years agoLayoutTest fast/events/currentTarget-gc-crash.html is a flaky failure
cdumez@apple.com [Mon, 27 Feb 2017 20:01:09 +0000 (20:01 +0000)]
LayoutTest fast/events/currentTarget-gc-crash.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=168917

Reviewed by Alex Christensen.

Make sure we never call finishJSTest() more than once.

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

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

2 years ago[Modern Media Controls] Status text does not appear on iOS
commit-queue@webkit.org [Mon, 27 Feb 2017 19:55:09 +0000 (19:55 +0000)]
[Modern Media Controls] Status text does not appear on iOS
https://bugs.webkit.org/show_bug.cgi?id=168918
<rdar://problem/30737644>

Patch by Antoine Quint <graouts@apple.com> on 2017-02-27
Reviewed by Dean Jackson.

Source/WebCore:

We refactor the layout code out of MacOSInlineMediaControls and into a new
InlineLayoutSupport class which IOSInlineMediaControls uses as well. Now
both the macOS and iOS inline media controls run the same layout logic to
control whether the status label or scrubber should be displayed, and which
controls should be dropped due to space constraints.

Test: media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-status-label.html

* Modules/modern-media-controls/controls/inline-layout-support.js: Added.
(InlineLayoutSupport):
(InlineLayoutSupport.prototype.childrenAfterPerformingLayout):
* Modules/modern-media-controls/controls/ios-inline-media-controls.js:
(IOSInlineMediaControls.prototype.layout):
(IOSInlineMediaControls):
* Modules/modern-media-controls/controls/macos-inline-media-controls.js:
(MacOSInlineMediaControls.prototype.layout):
* Modules/modern-media-controls/js-files:

LayoutTests:

Add a new test checking that we correctly display the status label on iOS.

* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-status-label-expected.txt: Added.
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-status-label.html: Added.

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

2 years agoStop exporting C++ member variables from class extensions in WKDOMInternals.h
ap@apple.com [Mon, 27 Feb 2017 19:16:33 +0000 (19:16 +0000)]
Stop exporting C++ member variables from class extensions in WKDOMInternals.h
https://bugs.webkit.org/show_bug.cgi?id=168886

Reviewed by Tim Horton.

* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: These are @package variables.

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

2 years agoAdd specification and status metadata to CSSProperties.json, and validate it
simon.fraser@apple.com [Mon, 27 Feb 2017 19:02:26 +0000 (19:02 +0000)]
Add specification and status metadata to CSSProperties.json, and validate it
https://bugs.webkit.org/show_bug.cgi?id=168901

Reviewed by Darin Adler.

Source/WebCore:

Annotate CSS properties with data about the WebKit development status, and
where they are specified. A property has a canonical specification reference,
but individual values may have a reference to a more recent spec.

Add a list of specifications to the JSON that properties reference by key.

Enhance check-webkit-style to validate the status and spec data.

* css/CSSProperties.json:

Tools:

Enhance check-webkit-style to validate the status and spec data in CSSProperties.json.

Current validation is basic type validation and some cross-referencing, but could be
enhanced.

* Scripts/webkitpy/style/checkers/jsonchecker.py:
(JSONCSSPropertiesChecker.check):
(JSONCSSPropertiesChecker.check_category):
(JSONCSSPropertiesChecker):
(JSONCSSPropertiesChecker.check_categories):
(JSONCSSPropertiesChecker.validate_url):
(JSONCSSPropertiesChecker.validate_status_type):
(JSONCSSPropertiesChecker.validate_comment):
(JSONCSSPropertiesChecker.validate_status):
(JSONCSSPropertiesChecker.validate_property_category):
(JSONCSSPropertiesChecker.validate_property_specification):
(JSONCSSPropertiesChecker.check_property):

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

2 years ago[CredentialManagement] Add IDL definitions for Credential, SiteBoundCredential, and...
jiewen_tan@apple.com [Mon, 27 Feb 2017 19:01:13 +0000 (19:01 +0000)]
[CredentialManagement] Add IDL definitions for Credential, SiteBoundCredential, and PasswordCredential
https://bugs.webkit.org/show_bug.cgi?id=168616
<rdar://problem/30167149>

Reviewed by Daniel Bates.

Source/WebCore:

This patch adds IDL definitions for:
1. Credential(https://w3c.github.io/webappsec-credential-management/#interfaces-credential-types-credential),
2. SiteBoundCredential(https://w3c.github.io/webappsec-credential-management/#interfaces-credential-types-siteboundcredential), and
3. PasswordCredential(https://w3c.github.io/webappsec-credential-management/#interfaces-credential-types-passwordcredential).

Test: credentials/idlharness.html

* CMakeLists.txt:
* DerivedSources.make:
* Modules/credentials/BasicCredential.cpp: Added.
(WebCore::BasicCredential::BasicCredential):
(WebCore::BasicCredential::~BasicCredential):
(WebCore::BasicCredential::type):
* Modules/credentials/BasicCredential.h: Added.
(WebCore::BasicCredential::id):
* Modules/credentials/BasicCredential.idl: Added.
* Modules/credentials/CredentialData.h: Added.
* Modules/credentials/CredentialData.idl: Added.
* Modules/credentials/PasswordCredential.cpp: Added.
(WebCore::PasswordCredential::PasswordCredential):
(WebCore::PasswordCredential::PasswordCredential):
Dummy constructors for now.
* Modules/credentials/PasswordCredential.h: Added.
(WebCore::PasswordCredential::create):
(WebCore::PasswordCredential::create):
(WebCore::PasswordCredential::setIdName):
(WebCore::PasswordCredential::idName):
(WebCore::PasswordCredential::setPasswordName):
(WebCore::PasswordCredential::passwordName):
(WebCore::PasswordCredential::setAdditionalData):
(WebCore::PasswordCredential::additionalData):
* Modules/credentials/PasswordCredential.idl: Added.
* Modules/credentials/SiteBoundCredential.cpp: Added.
(WebCore::SiteBoundCredential::SiteBoundCredential):
(WebCore::SiteBoundCredential::~SiteBoundCredential):
* Modules/credentials/SiteBoundCredential.h: Added.
(WebCore::SiteBoundCredential::name):
(WebCore::SiteBoundCredential::iconURL):
(WebCore::SiteBoundCredential::setOrigin):
(WebCore::SiteBoundCredential::origin):
* Modules/credentials/SiteBoundCredential.idl: Added.
* Modules/credentials/SiteBoundCredentialData.h: Added.
* Modules/credentials/SiteBoundCredentialData.idl: Added.
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

* credentials/idlharness-expected.txt: Added.
* credentials/idlharness.html: Added.
* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* resources/WebIDLParser.js: Added.
* resources/idlharness.js: Renamed from LayoutTests/imported/w3c/resources/idlharness.js.
Removed LayoutTests/imported/w3c/resources/idlharness.js since it is not needed any more.
Added resources/idlharness.js for idl harness.

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

2 years ago[WebRTC] Fix remote audio rendering
jer.noble@apple.com [Mon, 27 Feb 2017 18:22:49 +0000 (18:22 +0000)]
[WebRTC] Fix remote audio rendering
https://bugs.webkit.org/show_bug.cgi?id=168898

Reviewed by Eric Carlson.

Source/WebCore:

Test: webrtc/audio-peer-connection-webaudio.html

Fix MediaStreamAudioSourceNode by not bailing out early if the input sample rate doesn't match
the AudioContext's sample rate; there's code in setFormat() to do the sample rate conversion
correctly.

* Modules/webaudio/MediaStreamAudioSourceNode.cpp:
(WebCore::MediaStreamAudioSourceNode::setFormat):

Fix AudioSampleBufferList by making the AudioConverter input proc a free function, and passing
its refCon a struct containing only the information it needs to perform its task. Because the
conversion may result in a different number of output samples than input ones, just ask to
generate the entire capacity of the scratch buffer, and signal that the input buffer was fully
converted with a special return value.

* platform/audio/mac/AudioSampleBufferList.cpp:
(WebCore::audioConverterFromABLCallback):
(WebCore::AudioSampleBufferList::copyFrom):
(WebCore::AudioSampleBufferList::convertInput): Deleted.
(WebCore::AudioSampleBufferList::audioConverterCallback): Deleted.
* platform/audio/mac/AudioSampleBufferList.h:

Fix AudioSampleDataSource by updating both the sampleCount and the sampleTime after doing
a sample rate conversion to take into account that both the number of samples may have changed,
as well as the timeScale of the sampleTime. This may result in small off-by-one rounding errors
due to the sample rate conversion of sampleTime, so remember what the next expected sampleTime
should be, and correct sampleTime if it is indeed off-by-one. If the pull operation has gotten
ahead of the push operation, delay the next pull by the empty amount by rolling back the
m_outputSampleOffset. Introduce the same offset behavior during pull operations.

* platform/audio/mac/AudioSampleDataSource.h:
* platform/audio/mac/AudioSampleDataSource.mm:
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
(WebCore::AudioSampleDataSource::pullAvalaibleSamplesAsChunks):

Fix MediaPlayerPrivateMediaStreamAVFObjC by obeying the m_muted property.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted):

Fix LibWebRTCAudioModule by sleeping for the correct amount after emitting frames. Previously,
LibWebRTCAudioModule would sleep for a fixed amount of time, which meant it would get slowly out
of sync when emitting frames took a non-zero amount of time. Now, the amount of time before the
next cycle starts is correctly calculated, and then LibWebRTCAudioModule sleeps for a dynamic amount
of time in order to wake up correctly at the beginning of the next cycle.

* platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
(WebCore::LibWebRTCAudioModule::StartPlayoutOnAudioThread):

Fix AudioTrackPrivateMediaStreamCocoa by just using the output unit's preferred format
description (with the current system sample rate), rather than whatever is the current
input description.

* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
(WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit):
(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:

Fix RealtimeIncomingAudioSource by actually creating an AudioSourceProvider when asked.

* platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:
(WebCore::RealtimeIncomingAudioSource::OnData):
(WebCore::RealtimeIncomingAudioSource::audioSourceProvider):
* platform/mediastream/mac/RealtimeIncomingAudioSource.h:

Fix RealtimeOutgoingAudioSource by using the outgoing format description rather than the
incoming one to determine the sample rate, channel count, sample byte size, etc., to use
when delivering data upstream to libWebRTC.

* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):
(WebCore::RealtimeOutgoingAudioSource::pullAudioData):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:

Fix WebAudioSourceProviderAVFObjC by using a AudioSampleDataSource to do format and sample
rate conversion rather than trying to duplicate all that code and use a CARingBuffer and
AudioConverter directly.

* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
(WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::provideInput):
(WebCore::WebAudioSourceProviderAVFObjC::prepare):
(WebCore::WebAudioSourceProviderAVFObjC::unprepare):
(WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):

Fix the MockLibWebRTCAudioTrack by passing along the AddSink() sink to its AudioSourceInterface,
allowing the RealtimeOutgoingAudioSource to push data into the libWebRTC network stack. Also,
make sure m_enabled is initialized to a good value.

* testing/MockLibWebRTCPeerConnection.h:

LayoutTests:

* webrtc/audio-peer-connection-webaudio-expected.txt: Added.
* webrtc/audio-peer-connection-webaudio.html: Added.

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

2 years agoUnreviewed. Fix two GTK+ unit tests failing after r213062.
carlosgc@webkit.org [Mon, 27 Feb 2017 17:36:26 +0000 (17:36 +0000)]
Unreviewed. Fix two GTK+ unit tests failing after r213062.

We were building wrong Content-Disposition headers that libsoup doesn't parse correctly.

* TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:
(addContentDispositionHTTPHeaderToResponse):
* TestWebKitAPI/Tests/WebKit2Gtk/TestResources.cpp:
(serverCallback):

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

2 years agoOptimize checkWebRTCAvailability
achristensen@apple.com [Mon, 27 Feb 2017 17:21:55 +0000 (17:21 +0000)]
Optimize checkWebRTCAvailability
https://bugs.webkit.org/show_bug.cgi?id=168913

Reviewed by Darin Adler.

We can optimize startup time by using RTLD_LAZY instead of RTLD_NOW because we don't need to load all the symbols.
We just need to check whether libwebrtc.dylib can be found and is a valid dylib for the current architecture.
Also, initialize a static bool so it only needs to be checked once.  Right now it's only used when initializing settings,
but if we use it for other things in the future there will be no need to reopen the dylib.

* UIProcess/WebPreferences.cpp:
(WebKit::checkWebRTCAvailability):

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

2 years agocompositing/transitions/transform-on-large-layer.html : ImageDiff produced stderr...
commit-queue@webkit.org [Mon, 27 Feb 2017 17:20:29 +0000 (17:20 +0000)]
compositing/transitions/transform-on-large-layer.html : ImageDiff produced stderr output
https://bugs.webkit.org/show_bug.cgi?id=168217

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-02-27
Reviewed by Simon Fraser.

ImageDiff reports an error for image size mismatch of expected and
actual images. But, Nwtr ignores the errors for ref tests at the moment
(Bug 168033). They should have same window size before fixing the
bug.

* compositing/transitions/transform-on-large-layer-expected.html:
Do not resize the window to match the actual.
* fast/css/sticky/sticky-left-percentage-expected.html: Resize the
window to match the actual.

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

2 years agoAudioSampleDataSource should not exclusively lock its read and write threads.
jer.noble@apple.com [Mon, 27 Feb 2017 17:04:53 +0000 (17:04 +0000)]
AudioSampleDataSource should not exclusively lock its read and write threads.
https://bugs.webkit.org/show_bug.cgi?id=168646

Reviewed by Eric Carlson.

Locking the write thread causes the read thread to drop audio samples and generates audible
glitches, and the realtime audio thread backing the read thread should never block. There's
no real reason to lock these threads against one another here; they both rely on the
CARingBuffer to safely and simultaneously read and write data.

* platform/audio/mac/AudioSampleDataSource.cpp:
(WebCore::AudioSampleDataSource::setPaused):
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pushSamples):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
(WebCore::AudioSampleDataSource::pullAvalaibleSamplesAsChunks):
(WebCore::AudioSampleDataSource::pullSamples):
* platform/audio/mac/AudioSampleDataSource.h:

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

2 years agoAudioTrackPrivateMediaStreamCocoa should not exclusively lock its read and write...
jer.noble@apple.com [Mon, 27 Feb 2017 16:59:53 +0000 (16:59 +0000)]
AudioTrackPrivateMediaStreamCocoa should not exclusively lock its read and write threads.
https://bugs.webkit.org/show_bug.cgi?id=168643

Reviewed by Eric Carlson.

Locking the write thread causes the read thread to drop audio samples and generates audible
glitches, and the realtime audio thread backing the read thread should never block. There's
no real reason to lock these threads against one another here; they both rely on the
AudioSampleDataSource and it's CARingBuffer to safely and simultaneously read and write
data.

The one piece which locks previously protected against unsafe access was during creation of
the audio unit.  Without a lock, the audio unit could begin playback after the unit was
created and assigned to m_remoteIOUnit but before the ring buffer was created. To protect
against this possibility, create the unit, set the input and output descriptions, but only
assign the new audio unit to m_remoteIOUnit after the ring buffer has been created and
initialized.

* platform/audio/mac/CAAudioStreamDescription.h:
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
(WebCore::AudioTrackPrivateMediaStreamCocoa::~AudioTrackPrivateMediaStreamCocoa):
(WebCore::AudioTrackPrivateMediaStreamCocoa::playInternal):
(WebCore::AudioTrackPrivateMediaStreamCocoa::play):
(WebCore::AudioTrackPrivateMediaStreamCocoa::pause):
(WebCore::AudioTrackPrivateMediaStreamCocoa::setVolume):
(WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit):
(WebCore::AudioTrackPrivateMediaStreamCocoa::setupAudioUnit): Renamed to createAudioUnit()
(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:

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

2 years agoAdd public method to MediaTime for doing timeScale conversion.
jer.noble@apple.com [Mon, 27 Feb 2017 16:53:05 +0000 (16:53 +0000)]
Add public method to MediaTime for doing timeScale conversion.
https://bugs.webkit.org/show_bug.cgi?id=168860

Reviewed by Eric Carlson.

Source/WTF:

The newly public method, modeled on CMTimeConvertScale, allows callers to specify what rounding technique
will be used when converting to a new time scale.

* wtf/MediaTime.cpp:
(WTF::MediaTime::toTimeScale):
(WTF::MediaTime::setTimeScale):
* wtf/MediaTime.h:

Tools:

* TestWebKitAPI/Tests/WTF/MediaTime.cpp:
(TestWebKitAPI::TEST):

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

2 years agoWebAssembly: miscellaneous spec fixes part deux
jfbastien@apple.com [Mon, 27 Feb 2017 16:52:46 +0000 (16:52 +0000)]
WebAssembly: miscellaneous spec fixes part deux
https://bugs.webkit.org/show_bug.cgi?id=168861

Reviewed by Keith Miller.

JSTests:

* wasm.yaml: more passing tests
* wasm/Builder.js: use a Map instead of an Object for the function
index space, because Number entries such as 0 were colliding with
string entries such as "0". This in turn requires some hashing of
objects which are inserted, because Map uses Object's insertion
order when comparing.
(export.default.Builder):
(export.default.Builder.prototype._functionIndexSpaceKeyHash):
(export.default.Builder.prototype._registerFunctionToIndexSpace):
(export.default.Builder.prototype._getFunctionFromIndexSpace):
* wasm/js-api/test_Instance.js: add a FIXME test
* wasm/spec-tests/memory.wast.js:
(assert_unlinkable):
* wasm/spec-tests/names.wast.js:

Source/JavaScriptCore:

* wasm/WasmFunctionParser.h: add some FIXME

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

2 years ago[WebRTC] RealtimOutgoingVideoSource should not need to do image conversion
commit-queue@webkit.org [Mon, 27 Feb 2017 16:29:10 +0000 (16:29 +0000)]
[WebRTC] RealtimOutgoingVideoSource should not need to do image conversion
https://bugs.webkit.org/show_bug.cgi?id=168802

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-27
Reviewed by Jon Lee.

Source/ThirdParty/libwebrtc:

Exporting new symbols.
Including headers in the project file.

* Source/webrtc/common_video/include/corevideo_frame_buffer.h:
* Source/webrtc/common_video/include/i420_buffer_pool.h:
* Source/webrtc/common_video/include/video_frame_buffer.h:
* libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Covered by manual testing as mock sources do not hit the same code path.

* platform/mediastream/mac/AVVideoCaptureSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::currentFrameCGImage):
* platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:
(WebCore::RealtimeOutgoingVideoSource::sendFrame):
(WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable):
* platform/mediastream/mac/RealtimeOutgoingVideoSource.h:

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

2 years agoUnreviewed, revert all temporary build fixes for data interaction
wenson_hsieh@apple.com [Mon, 27 Feb 2017 16:02:36 +0000 (16:02 +0000)]
Unreviewed, revert all temporary build fixes for data interaction

Rolls out r212990, r212988 and r212984.

Source/WebKit2:

* UIProcess/ios/WKContentViewInteraction.h:

Tools:

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
* TestWebKitAPI/ios/DataInteractionSimulator.h:
* TestWebKitAPI/ios/DataInteractionSimulator.mm:
(-[DataInteractionSimulator _advanceProgress]):

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

2 years agoAdd a test verifying cache deduplication is not sensitive to SHA1 collision attack
antti@apple.com [Mon, 27 Feb 2017 15:27:07 +0000 (15:27 +0000)]
Add a test verifying cache deduplication is not sensitive to SHA1 collision attack
https://bugs.webkit.org/show_bug.cgi?id=168774

Reviewed by Alex Christensen.

We use SHA1 for deduplicating disk cache resources. Since a real world SHA1 collision was demonstrated
recently (http://shattered.io/) we can add a test that shows it can't be used for cache poisoning.

There are two protections in the cache code that both individually stop this type of attack:

- When deduplicating the data is verified to be equal by a bytewise comparison.
- SHA1 computations include random salt unique to cache instance.

Commenting out both protections is needed to make this test fail.

* http/tests/cache/disk-cache/resources/make-sha1-collision.php: Added.

This script turns the nocolliding pdfs into colliding ones on the fly, in memory. This way we don't need
to land the colliding versions and risk blowing up the infrastructure.

* http/tests/cache/disk-cache/resources/shattered-nocollision-1.pdf: Added.
* http/tests/cache/disk-cache/resources/shattered-nocollision-2.pdf: Added.

> shasum shattered-nocollision-*
5439274cf677fe3b7c51264f88a5ecee97319ee9  shattered-nocollision-1.pdf
7fdd163dc21064b7f26e1199fc560ee6e0307498  shattered-nocollision-2.pdf

* http/tests/cache/disk-cache/shattered-deduplication-expected.html: Added.
* http/tests/cache/disk-cache/shattered-deduplication.html: Added.

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

2 years ago[Win] Http preload tests are failing.
pvollan@apple.com [Mon, 27 Feb 2017 15:20:55 +0000 (15:20 +0000)]
[Win] Http preload tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=168910

Reviewed by Alex Christensen.

The feature is not enabled.

* WebView.cpp:
(WebView::notifyPreferencesChanged):

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

2 years ago[GTK] Downloads attributes tests are failing
carlosgc@webkit.org [Mon, 27 Feb 2017 14:48:43 +0000 (14:48 +0000)]
[GTK] Downloads attributes tests are failing
https://bugs.webkit.org/show_bug.cgi?id=168871

Reviewed by Michael Catanzaro.

Source/WebCore:

Use libsoup to get the suggested filename from the Content-Disposition header instead of buggy
filenameFromHTTPContentDisposition().

Fixes: fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-doublequote.html
       fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-unicode.html

* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::platformSuggestedFilename):

LayoutTests:

Remove passing tests and add new baseline for
fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes.html because libsoup handles slashes
differently but download succeeds.

* platform/gtk/TestExpectations:
* platform/gtk/fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-slashes-expected.txt: Added.

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

2 years ago[GTK] Rendering artifacts when resizing the window in X11 with AC mode enabled
carlosgc@webkit.org [Mon, 27 Feb 2017 14:42:08 +0000 (14:42 +0000)]
[GTK] Rendering artifacts when resizing the window in X11 with AC mode enabled
https://bugs.webkit.org/show_bug.cgi?id=168728

Reviewed by Žan Doberšek.

This happens because the pixmap we create from the redirected window is uninitialized until the threaded
compositor renders into it. We should always initialize the pixmap right after it's created.

* WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
(WebKit::defaultVisual): Helper static method to get the default GdkVisual.
(WebKit::AcceleratedSurfaceX11::AcceleratedSurfaceX11): Use createPixmap().
(WebKit::AcceleratedSurfaceX11::createPixmap): Create and initialize the pixmap.
(WebKit::AcceleratedSurfaceX11::resize): Use createPixmap().
* WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:

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

2 years ago[GTK] Flickering when leaving accelerated compositing mode
carlosgc@webkit.org [Mon, 27 Feb 2017 14:38:47 +0000 (14:38 +0000)]
[GTK] Flickering when leaving accelerated compositing mode
https://bugs.webkit.org/show_bug.cgi?id=168911

Reviewed by Žan Doberšek.

It doesn't always happen, and it's too fast, more noticeable in websites with a dark background, because we are
drawing a single white frame. This happens when we leave AC mode during the layer flush that schedules an update
on the compositor, which at that point only clears the area and renders nothing. However,
CoordinatedGraphicsScene::paintToCurrentGLContext() always renders a white background when no web view color has
been set. And that's the white frame we get. We could prevent that last update from happening by checking if we
still have a graphics root layer after syncDisplayState() in the layer flush, the same way we check the layer
tree host is still valid.

* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):

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

2 years ago[Modern Media Controls] Dragging controls in fullscreen on macOS prevents scrubbing...
graouts@webkit.org [Mon, 27 Feb 2017 14:21:50 +0000 (14:21 +0000)]
[Modern Media Controls] Dragging controls in fullscreen on macOS prevents scrubbing or interacting with controls
https://bugs.webkit.org/show_bug.cgi?id=168820
<rdar://problem/30690281>

Reviewed by Jon Lee.

Source/WebCore:

We broke this in https://bugs.webkit.org/show_bug.cgi?id=168755. We restore the check that the
event target when initiating a drag is the controls bar itself and not some of its content.

Since this wasn't caught by our existing tests, we add a test that attemps to initiate a drag
starting over one of the controls and notice that no dragging occurs.

We also fix an issue where we wouldn't update the layout of the left container as its icon
buttons would load, which would cause the layout width of the left container to be incorrect
and the related tests to time out.

Test: media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button.html

* Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
(MacOSFullscreenMediaControls.prototype.layout):
(MacOSFullscreenMediaControls.prototype._handleMousedown):

LayoutTests:

Making the existing test more robust and adding a new test that checks what happens
when we initiate a drag over some controls.

* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button-expected.txt: Added.
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag-is-prevented-over-button.html: Added.
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html:

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

2 years ago[libwebrtc] Enable WebRTC in some Production Builds
achristensen@apple.com [Mon, 27 Feb 2017 14:09:50 +0000 (14:09 +0000)]
[libwebrtc] Enable WebRTC in some Production Builds
https://bugs.webkit.org/show_bug.cgi?id=168858

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years ago[TextureMapper] Clean up BitmapTextureGL construction
zandobersek@gmail.com [Mon, 27 Feb 2017 11:29:57 +0000 (11:29 +0000)]
[TextureMapper] Clean up BitmapTextureGL construction
https://bugs.webkit.org/show_bug.cgi?id=168909

Reviewed by Carlos Garcia Campos.

Have the BitmapTextureGL constructor accept an rvalue reference pointer
to the GraphicsContext3D object. A static create() method is also added
to help with constructing these objects. Construction sites are updated
appropriately.

The BitmapTextureGL constructor is further cleaned up by moving default
member initializations together with the member declarations.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
* platform/graphics/texmap/BitmapTextureGL.cpp:
(WebCore::BitmapTextureGL::BitmapTextureGL):
* platform/graphics/texmap/BitmapTextureGL.h:
* platform/graphics/texmap/BitmapTexturePool.cpp:
(WebCore::BitmapTexturePool::createTexture):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::createTexture):

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

2 years ago[TextureMapper] Remove InterpolationQuality, TextDrawingModeFlags member variables
zandobersek@gmail.com [Mon, 27 Feb 2017 10:06:28 +0000 (10:06 +0000)]
[TextureMapper] Remove InterpolationQuality, TextDrawingModeFlags member variables
https://bugs.webkit.org/show_bug.cgi?id=168906

Reviewed by Carlos Garcia Campos.

Remove the InterpolationQuality and TextDrawingModeFlags member variables from the
TextureMapper class. These weren't modified anywhere in the code.

BitmapTexture::updateContents() still sets the image interpolation quality and
drawing mode on the ImageBuffer's GraphicsContext, but now uses the default
InterpolationDefault and TextModeFill values.

* platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::updateContents):
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::TextureMapper): Deleted.
(WebCore::TextureMapper::~TextureMapper): Deleted.
* platform/graphics/texmap/TextureMapper.h:
(WebCore::TextureMapper::setImageInterpolationQuality): Deleted.
(WebCore::TextureMapper::setTextDrawingMode): Deleted.
(WebCore::TextureMapper::imageInterpolationQuality): Deleted.
(WebCore::TextureMapper::textDrawingMode): Deleted.

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

2 years agoAdd a way to test file input without relying on drag and drop
aestes@apple.com [Mon, 27 Feb 2017 09:49:29 +0000 (09:49 +0000)]
Add a way to test file input without relying on drag and drop
https://bugs.webkit.org/show_bug.cgi?id=168848
<rdar://problem/22258242>

Reviewed by Tim Horton.

Tools:

Existing layout tests relied on drag and drop support in EventSender to configure a file
input element for testing. This had several problems:

1. WebKitTestRunner has no support for beginDragWithFiles(), and DumpRenderTree doesn't
   support it on iOS.
2. We have no test coverage for selecting files via the runOpenPanel UI delegate, leading to
   bugs like webkit.org/b/159686.

Even if we fixed (1), we'd still have a test coverage gap due to (2), so this patch
introduces a way for a test to specify the list of files that should be selected by the
runOpenPanel UI delegate: TestRunner.setOpenPanelFiles(). It also creates versions of a
number of existing file input tests using TestRunner.setOpenPanelFiles() instead of
EventSender.beginDragWithFiles().

* DumpRenderTree/ios/DumpRenderTreeBrowserView.mm:
(-[DumpRenderTreeBrowserView webView:runOpenPanelForFileButtonWithResultListener:configuration:]):
Overrode to call the corresponding method on UIDelegate.
* DumpRenderTree/TestRunner.cpp:
(setOpenPanelFilesCallback): Added to call TestRunner::setOpenPanelFiles().
(TestRunner::staticFunctions): Registered setOpenPanelFiles.
(TestRunner::setOpenPanelFiles): Added. Converts the JavaScript array of file paths to a
std::vector of std::strings.
* DumpRenderTree/TestRunner.h:
(TestRunner::openPanelFiles):
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):
Added. Converts the array of file paths to an NSArray of NSURLs, resolving the file paths
relative to the current test URL. Returns either the first item or all items depending on
the value of allowMultipleFiles.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Defined setOpenPanelFiles.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setOpenPanelFiles): Added. Converts the JavaScript array of file paths to
a WKArray of WKURLs, resolving the file paths relative to the current test URL, and sends
the WKArray to the UI process with the "SetOpenPanelFileURLs" message.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::runOpenPanel): Calls the WKOpenPanelResultListener with either the first item or all
items, depending on the value of WKOpenPanelParametersGetAllowsMultipleFiles().
(WTR::TestController::resetStateToConsistentValues): Clear m_openPanelFileURLs.
* WebKitTestRunner/TestController.h:
(WTR::TestController::openPanelFileURLs):
(WTR::TestController::setOpenPanelFileURLs):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Added code to handle the
"SetOpenPanelFileURLs" message.

LayoutTests:

Added versions of existing file input tests that use TestRunner.setOpenPanelFiles() instead
of EventSender.beginDragWithFiles().

* fast/dom/FileList-iterator-using-open-panel-expected.txt: Added.
* fast/dom/FileList-iterator-using-open-panel.html: Added.
* fast/files/apply-blob-url-to-img-using-open-panel-expected.txt: Added.
* fast/files/apply-blob-url-to-img-using-open-panel.html: Added.
* fast/files/apply-blob-url-to-xhr-using-open-panel-expected.txt: Added.
* fast/files/apply-blob-url-to-xhr-using-open-panel.html: Added.
* fast/files/file-list-test-using-open-panel-expected.txt: Added.
* fast/files/file-list-test-using-open-panel.html: Added.
* fast/files/file-reader-abort-using-open-panel-expected.txt: Added.
* fast/files/file-reader-abort-using-open-panel.html: Added.
* fast/files/file-reader-directory-crash-using-open-panel-expected.txt: Added.
* fast/files/file-reader-directory-crash-using-open-panel.html: Added.
* fast/files/filereader-zip-bundle-using-open-panel-expected.txt: Added.
* fast/files/filereader-zip-bundle-using-open-panel.html: Added.
* fast/forms/file/file-input-reset-using-open-panel-expected.html: Added.
* fast/forms/file/file-input-reset-using-open-panel.html: Added.
* fast/forms/file/file-reset-in-change-using-open-panel-expected.html: Added.
* fast/forms/file/file-reset-in-change-using-open-panel.html: Added.
* fast/forms/file/get-file-upload-using-open-panel-expected.txt: Added.
* fast/forms/file/get-file-upload-using-open-panel.html: Added.
* fast/forms/file/input-file-value-using-open-panel-expected.txt: Added.
* fast/forms/file/input-file-value-using-open-panel.html: Added.
* fast/forms/file/input-file-write-files-using-open-panel-expected.txt: Added.
* fast/forms/file/input-file-write-files-using-open-panel.html: Added.
* fast/history/page-cache-createObjectURL-using-open-panel-expected.txt: Added.
* fast/history/page-cache-createObjectURL-using-open-panel.html: Added.
* http/tests/local/blob/resources/hybrid-blob-util.js:
(this.setupForTests):
(this.runTestsWithDrag):
(this.runTestsWithOpenPanel):
(this.runTests):
* http/tests/local/blob/script-tests/send-hybrid-blob-using-open-panel.js: Added.
(runHybridBlobTest):
(runTests.F):
(runTests.D):
(runTests):
* http/tests/local/blob/send-hybrid-blob-using-open-panel-expected.txt: Added.
* http/tests/local/blob/send-hybrid-blob-using-open-panel.html: Added.
* http/tests/local/fileapi/file-last-modified-after-delete-using-open-panel-expected.txt: Added.
* http/tests/local/fileapi/file-last-modified-after-delete-using-open-panel.html: Added.
* http/tests/local/fileapi/file-last-modified-using-open-panel-expected.txt: Added.
* http/tests/local/fileapi/file-last-modified-using-open-panel.html: Added.
* http/tests/local/fileapi/resources/setup-file-input-element-for-drag.js:
(setFileInputChangeCallback):
* http/tests/local/fileapi/script-tests/file-last-modified-after-delete-using-open-panel.js: Added.
(onFileChange):
(runTest):
* http/tests/local/fileapi/script-tests/file-last-modified-using-open-panel.js: Added.
(onFileChange):
(runTest):
* http/tests/local/fileapi/upload-zip-bundle-as-blob-using-open-panel-expected.txt: Added.
* http/tests/local/fileapi/upload-zip-bundle-as-blob-using-open-panel.html: Added.
* http/tests/local/formdata/send-form-data-constructed-from-form-using-open-panel-expected.txt: Added.
* http/tests/local/formdata/send-form-data-constructed-from-form-using-open-panel.html: Added.
* http/tests/local/formdata/send-form-data-with-empty-file-filename-using-open-panel-expected.txt: Added.
* http/tests/local/formdata/send-form-data-with-empty-file-filename-using-open-panel.html: Added.
* media/video-src-blob-using-open-panel-expected.txt: Added.
* media/video-src-blob-using-open-panel.html: Added.
* platform/ios-simulator/TestExpectations:

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

2 years agoA Locked indicator should be visually distinct from an unlocked indicator
rniwa@webkit.org [Mon, 27 Feb 2017 09:45:10 +0000 (09:45 +0000)]
A Locked indicator should be visually distinct from an unlocked indicator
https://bugs.webkit.org/show_bug.cgi?id=168868
<rdar://problem/29666054>

Reviewed by Antti Koivisto.

Added the support for specifying options.lockedIndicator in addition to options.indicator to style
an locked indicator differently from an unlocked one.

* browser-tests/time-series-chart-tests.js: Added new test cases for indicators.
(createChartWithSampleCluster): Renamed and swapped the order of arguments to better match
TimeSeriesChart's constructor. Now the second argument is an array of source as is in the constructor.
(createInteractiveChartWithSampleCluster): Added.

* public/v3/components/chart-styles.js:
(ChartStyles.overviewChartOptions): Changed the color of a selection to blue.
(ChartStyles.mainChartOptions): Ditto. Also use a different style for a locked indicator.

* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype._layout): Removed the unused variable.
(InteractiveTimeSeriesChart.prototype._renderChartContent): Use options.lockedIndicator when rendering
a locked indicator. Also stroke the circle in addition to filling it so that we can use a blue circle
with a white hole for a locked indicator to make it even more visually distinctive from an unlocked one.

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

2 years agoLinks cannot be activated when running Mobile Safari with external SDK build of WebKi...
aestes@apple.com [Mon, 27 Feb 2017 08:07:57 +0000 (08:07 +0000)]
Links cannot be activated when running Mobile Safari with external SDK build of WebKit for iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=141906

Reviewed by Tim Horton.

Source/WebKit2:

Even if Touch Events are disabled, we still need to register a
UIWebTouchEventsGestureRecognizer to record the layer tree transaction ID when a touch
begins. Click events are only generated for touches that occur after the current frame's
load has committed, and we use the transaction ID from when the touch began to implement
this check.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleTouchEventSynchronously):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h: Declared _layerTreeTransactionIdAtLastTouchStart.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]): Register a UIWebTouchEventsGestureRecognizer even if
Touch Events are disabled.
(-[WKContentView cleanupInteraction]): Reset _layerTreeTransactionIdAtLastTouchStart to 0.
(-[WKContentView _webTouchEventsRecognized:]): Update _layerTreeTransactionIdAtLastTouchStart
when a touch begins, even if Touch Events are disabled.
(-[WKContentView _singleTapCommited:]): Passed _layerTreeTransactionIdAtLastTouchStart to
WebPageProxy::commitPotentialTap().
(-[WKContentView _attemptClickAtLocation:]): Ditto for WebPageProxy::handleTap().
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::commitPotentialTap):
(WebKit::WebPageProxy::handleTap):

LayoutTests:

Unskipped tests that now pass. Rewrote a test to use UIHelper so that it works on both
DumpRenderTree and WebKitTestRunner.

* fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html:
Rewrote to use UIHelper.activateAt().
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

2 years ago[CoordinatedGraphics] Remove CoordinatedGraphicsScene::paintToGraphicsContext()
zandobersek@gmail.com [Mon, 27 Feb 2017 07:59:12 +0000 (07:59 +0000)]
[CoordinatedGraphics] Remove CoordinatedGraphicsScene::paintToGraphicsContext()
https://bugs.webkit.org/show_bug.cgi?id=168903

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Remove the GraphicsContext pointer member from the TextureMapper class
since the getter and setter methods are not used anywhere.

* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::TextureMapper):
* platform/graphics/texmap/TextureMapper.h:
(WebCore::TextureMapper::setGraphicsContext): Deleted.
(WebCore::TextureMapper::graphicsContext): Deleted.

Source/WebKit2:

Remove the CoordinatedGraphicsScene::paintToGraphicsContext() method as it
is not used anywhere. Also enables removing the GraphicsContext pointer
member from the TextureMapper class.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToGraphicsContext): Deleted.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:

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

2 years ago[GTK] Hangs when showing Google search results
carlosgc@webkit.org [Mon, 27 Feb 2017 07:50:31 +0000 (07:50 +0000)]
[GTK] Hangs when showing Google search results
https://bugs.webkit.org/show_bug.cgi?id=168699

Reviewed by Žan Doberšek.

Connection::sendOutgoingMessage() can poll forever if sendmsg fails with EAGAIN or EWOULDBLOCK. For example if
socket read buffers are full, poll will be blocked until we read the pending data, but we can't read because
the thread is blocked in the poll. In case of EAGAIN/EWOULDBLOCK we should poll using the run loop, to allow
reads to happen in thread while we wait for the socket to be writable again. In the GTK+ port we use
GSocketMonitor to poll socket file descriptor without blocking, using the run loop. This patch renames the
socket monitor as readSocketMonitor and adds another one for polling output. When sendmsg fails with
EAGAIN/EWOULDBLOCK, the pending message is saved and the write monitor starts polling. Once the socket is
writable again we send the pending message. Helper class MessageInfo and a new one UnixMessage have been moved
to its own header file to be able to use std::unique_ptr member to save the pending message.

* Platform/IPC/Connection.cpp: Include UnixMessage.h as required by std::unique_ptr.
* Platform/IPC/Connection.h: Add write socket monitor and also keep the GSocket as a member to reuse it.
* Platform/IPC/glib/GSocketMonitor.cpp: Use Function instead of std::function.
(IPC::GSocketMonitor::start):
* Platform/IPC/glib/GSocketMonitor.h:
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::platformInitialize): Initialize the GSocket here since we rely on it to take the ownership of
the descriptor. We were leaking it if the connection was invalidated without being opened.
(IPC::Connection::platformInvalidate): Destroy the GSocket even when not connected. Also stop the write monitor.
(IPC::Connection::processMessage):
(IPC::Connection::open):
(IPC::Connection::platformCanSendOutgoingMessages): Return false if we have a pending message to ensure
Connection doesn't try to send more messages until the pending message is dispatched. We don't need to check
m_isConnected because the caller already checks that.
(IPC::Connection::sendOutgoingMessage): Split it in two. This creates and prepares a UnixMessage and then calls
sendOutputMessage() to do the rest.
(IPC::Connection::sendOutputMessage): Send the message, or save it if sendmsg fails with EAGAIN or EWOULDBLOCK
to be sent later when the socket is writable.
* Platform/IPC/unix/UnixMessage.h: Added.
(IPC::MessageInfo::MessageInfo):
(IPC::MessageInfo::setMessageBodyIsOutOfLine):
(IPC::MessageInfo::isMessageBodyIsOutOfLine):
(IPC::MessageInfo::bodySize):
(IPC::MessageInfo::attachmentCount):
(IPC::UnixMessage::UnixMessage):
(IPC::UnixMessage::~UnixMessage):
(IPC::UnixMessage::attachments):
(IPC::UnixMessage::messageInfo):
(IPC::UnixMessage::body):
(IPC::UnixMessage::bodySize):
(IPC::UnixMessage::appendAttachment):
* PlatformGTK.cmake:

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

2 years agoUnreviewed. Bump GTK+ versions numbers.
carlosgc@webkit.org [Mon, 27 Feb 2017 06:48:52 +0000 (06:48 +0000)]
Unreviewed. Bump GTK+ versions numbers.

* Source/cmake/OptionsGTK.cmake:

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

2 years agoUnreviewed, rolling out r213024.
carlosgc@webkit.org [Mon, 27 Feb 2017 06:44:08 +0000 (06:44 +0000)]
Unreviewed, rolling out r213024.

Wrong version numbers

Reverted changeset:

"[GTK] Unreviewed, bump GTK version numbers also on trunk"
http://trac.webkit.org/changeset/213024

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

2 years agoWeb Inspector: RTL: Docking Left doesn't constrain the page width
commit-queue@webkit.org [Mon, 27 Feb 2017 06:31:44 +0000 (06:31 +0000)]
Web Inspector: RTL: Docking Left doesn't constrain the page width
https://bugs.webkit.org/show_bug.cgi?id=168862

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-02-26
Reviewed by Brian Burg.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
Calculate the inspectedViewFrame to be the remaining space after WebInspector is opened
instead of using the original page size.

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

2 years ago[GTK] Unreviewed, bump GTK version numbers also on trunk
mcatanzaro@igalia.com [Mon, 27 Feb 2017 06:03:23 +0000 (06:03 +0000)]
[GTK] Unreviewed, bump GTK version numbers also on trunk

* Source/cmake/OptionsGTK.cmake:

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

2 years agoStop exporting C++ member variables from WKDOMTextIterator
ap@apple.com [Mon, 27 Feb 2017 05:20:16 +0000 (05:20 +0000)]
Stop exporting C++ member variables from WKDOMTextIterator
https://bugs.webkit.org/show_bug.cgi?id=168885

Reviewed by Dan Bernstein.

* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:

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

2 years agoAdd preprocessor guards to Mac specific files that are exposed as private headers...
ap@apple.com [Mon, 27 Feb 2017 04:31:03 +0000 (04:31 +0000)]
Add preprocessor guards to Mac specific files that are exposed as private headers on iOS
https://bugs.webkit.org/show_bug.cgi?id=168878

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKInspector.h:
* WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.h:

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

2 years agoRemove spurious C++ include from _WKTestingDelegate.h
ap@apple.com [Mon, 27 Feb 2017 00:54:03 +0000 (00:54 +0000)]
Remove spurious C++ include from _WKTestingDelegate.h
https://bugs.webkit.org/show_bug.cgi?id=168877

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/_WKTestingDelegate.h:

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

2 years agoStop compiling our own cursorMovementIterator()
mmaxfield@apple.com [Mon, 27 Feb 2017 00:36:02 +0000 (00:36 +0000)]
Stop compiling our own cursorMovementIterator()
https://bugs.webkit.org/show_bug.cgi?id=168211

Reviewed by David Hyatt.

Source/WebCore:

Covered by existing tests.

Hook up the caret iterator.

* platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::offsetForPosition):
* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffset):
(WebCore::RenderText::nextOffset):
* rendering/RenderText.h:

Source/WTF:

This patch creates a unified Text Breaking API, which can be backed by either ICU
or CoreFoundation (for ports which can use it). Rather than using inheritance and
virtual functions to implement this, because there are only two subclasses, the
simpler option of just using a Variant is used instead. There is also a cache which
allows you to reuse iterators without reconstructing them. This cache is better
than the previous method of having a single static iterator because the cache
lets you use two iterators simultaneously.

In the future, I will hook up all iterators to use this shared class. However, for
this patch, I've only hooked up the caret position iterator (backed by CoreFoundation
on Cocoa ports and UBRK_CHARACTER on other ports).

* WTF.xcodeproj/project.pbxproj:
* wtf/spi/cf/CFStringSPI.h: Added.
* wtf/text/TextBreakIterator.cpp:
(WTF::initializeIteratorWithRules): Deleted.
(WTF::cursorMovementIterator): Deleted.
* wtf/text/TextBreakIterator.h:
(WTF::TextBreakIterator::preceding):
(WTF::TextBreakIterator::following):
(WTF::TextBreakIterator::isBoundary):
(WTF::TextBreakIterator::setText):
(WTF::TextBreakIterator::mode):
(WTF::TextBreakIterator::locale):
(WTF::TextBreakIteratorCache::singleton):
(WTF::TextBreakIteratorCache::take):
(WTF::TextBreakIteratorCache::put):
(WTF::TextBreakIteratorCache::TextBreakIteratorCache):
* wtf/text/cf/TextBreakIteratorCF.h: Added.
(WTF::TextBreakIteratorCF::TextBreakIteratorCF):
(WTF::TextBreakIteratorCF::setText):
(WTF::TextBreakIteratorCF::preceding):
(WTF::TextBreakIteratorCF::following):
(WTF::TextBreakIteratorCF::isBoundary):
* wtf/text/icu/TextBreakIteratorICU.h: Added.
(WTF::TextBreakIteratorICU::set8BitText):
(WTF::TextBreakIteratorICU::TextBreakIteratorICU):
(WTF::TextBreakIteratorICU::operator=):
(WTF::TextBreakIteratorICU::~TextBreakIteratorICU):
(WTF::TextBreakIteratorICU::setText):
(WTF::TextBreakIteratorICU::preceding):
(WTF::TextBreakIteratorICU::following):
(WTF::TextBreakIteratorICU::isBoundary):
* wtf/text/icu/UTextProviderLatin1.h:
* wtf/text/mac/TextBreakIteratorInternalICUMac.mm:
(WTF::mapModeToBackingIterator):
(WTF::TextBreakIterator::TextBreakIterator):

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

2 years agoop_get_by_id_with_this should use inline caching
commit-queue@webkit.org [Mon, 27 Feb 2017 00:32:10 +0000 (00:32 +0000)]
op_get_by_id_with_this should use inline caching
https://bugs.webkit.org/show_bug.cgi?id=162124

Patch by Caio Lima <ticaiolima@gmail.com> on 2017-02-26
Reviewed by Saam Barati.

JSTests:

* microbenchmarks/super-getter.js: Added.
(A.prototype.get f):
(A):
(B.prototype.get f):
(B):
* stress/super-force-ic-fail.js: Added.
(let.assert):
(let.aObj.get foo):
(let.obj.jaz):
(let.bObj.get foo):
(let.obj2.foo):
* stress/super-get-by-id.js: Added.
(assert):
(Base):
(Base.prototype.get name):
(Base.prototype.set name):
(Subclass.prototype.get name):
(Subclass):
(getterName):
(getterValue):
(PolymorphicSubclass.prototype.get value):
(PolymorphicSubclass):
(i.let.BaseCode):
(i.get value):
(MegamorphicSubclass.prototype.get value):
(MegamorphicSubclass):
(let.subObj.get value):
(i.catch):
(subObj.get value):
(BaseException):
(BaseException.prototype.get name):
(SubclassException.prototype.get name):
(SubclassException):
(prototype.foo):
(prototype.get name):
(SubclassExceptionComplex.prototype.get name):
(SubclassExceptionComplex):
* stress/super-getter-reset-ic.js: Added.
(let.assert):
(let.B.f):

Source/JavaScriptCore:

This patch is enabling inline cache for op_get_by_id_with_this in all
tiers. It means that operations using ```super.member``` are going to
be able to be optimized by PIC. To enable it, we introduced a new
member of StructureStubInfo.patch named thisGPR, created a new class
to manage the IC named JITGetByIdWithThisGenerator and changed
PolymorphicAccess.regenerate that uses StructureStubInfo.patch.thisGPR
to decide the correct this value on inline caches.
With inline cached enabled, ```super.member``` are ~4.5x faster,
according microbenchmarks.

* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateImpl):
* bytecode/PolymorphicAccess.cpp:
(JSC::PolymorphicAccess::regenerate):
* bytecode/PolymorphicAccess.h:
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::reset):
* bytecode/StructureStubInfo.h:
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addGetByIdWithThis):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileIn):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetByIdWithThis):
(JSC::FTL::DFG::LowerDFGToB3::compileIn):
(JSC::FTL::DFG::LowerDFGToB3::getByIdWithThis):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/ICStats.h:
* jit/JIT.cpp:
(JSC::JIT::JIT):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::link):
* jit/JIT.h:
* jit/JITInlineCacheGenerator.cpp:
(JSC::JITByIdGenerator::JITByIdGenerator):
(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):
(JSC::JITGetByIdWithThisGenerator::generateFastPath):
* jit/JITInlineCacheGenerator.h:
(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
* jit/Repatch.cpp:
(JSC::appropriateOptimizingGetByIdFunction):
(JSC::appropriateGenericGetByIdFunction):
(JSC::tryCacheGetByID):
* jit/Repatch.h:
* jsc.cpp:
(WTF::CustomGetter::getOwnPropertySlot):
(WTF::CustomGetter::customGetterAcessor):

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

2 years agoDon't import RetainPtr in WebNotification.h
ap@apple.com [Mon, 27 Feb 2017 00:17:34 +0000 (00:17 +0000)]
Don't import RetainPtr in WebNotification.h
https://bugs.webkit.org/show_bug.cgi?id=168876

Reviewed by Dan Bernstein.

This is an Objective-C SPI header.

* WebView/WebNotification.h:
* WebView/WebNotification.mm:
(-[WebNotification initWithCoreNotification:notificationID:]):
(-[WebNotification dealloc]):

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

2 years agoSimplify EXPORTED_SYMBOLS_FILE variables in WebKitLegacy.xcconfig
aakash_jain@apple.com [Mon, 27 Feb 2017 00:16:50 +0000 (00:16 +0000)]
Simplify EXPORTED_SYMBOLS_FILE variables in WebKitLegacy.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=168819

Reviewed by Dan Bernstein.

* Configurations/WebKitLegacy.xcconfig:

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

2 years agoRemove unimplemented WKResourceLoadStatisticsManagerSetReducedTimestampResolution
ap@apple.com [Mon, 27 Feb 2017 00:13:26 +0000 (00:13 +0000)]
Remove unimplemented WKResourceLoadStatisticsManagerSetReducedTimestampResolution
https://bugs.webkit.org/show_bug.cgi?id=168880

Reviewed by Dan Bernstein.

* UIProcess/API/C/WKResourceLoadStatisticsManager.h:

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

2 years agoRemove leftover WebKit2 C API function declarations
ap@apple.com [Mon, 27 Feb 2017 00:13:10 +0000 (00:13 +0000)]
Remove leftover WebKit2 C API function declarations
https://bugs.webkit.org/show_bug.cgi?id=168879

Reviewed by Tim Horton.

* UIProcess/API/C/WKPreferencesRefPrivate.h:

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

2 years agoRemove some old WKSecurityOrigin binary compatibility stubs
ap@apple.com [Mon, 27 Feb 2017 00:12:51 +0000 (00:12 +0000)]
Remove some old WKSecurityOrigin binary compatibility stubs
https://bugs.webkit.org/show_bug.cgi?id=168881

Reviewed by Dan Bernstein.

* Shared/API/c/WKSecurityOriginRef.cpp:
(WKSecurityOriginGetHost): Deleted.
(WKSecurityOriginGetProtocol): Deleted.

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

2 years agoUnreviewed, rolling out r212942.
commit-queue@webkit.org [Sun, 26 Feb 2017 23:40:54 +0000 (23:40 +0000)]
Unreviewed, rolling out r212942.
https://bugs.webkit.org/show_bug.cgi?id=168882

Made EWS very flaky (Requested by ap on #webkit).

Reverted changeset:

"[Modern Media Controls] Dragging controls in fullscreen on
macOS prevents scrubbing or interacting with controls"
https://bugs.webkit.org/show_bug.cgi?id=168820
http://trac.webkit.org/changeset/212942

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

2 years agoREGRESSION (r211312): Double-clicking a word selects it along with the space that...
wenson_hsieh@apple.com [Sun, 26 Feb 2017 23:06:54 +0000 (23:06 +0000)]
REGRESSION (r211312): Double-clicking a word selects it along with the space that follows it
https://bugs.webkit.org/show_bug.cgi?id=168821
<rdar://problem/30690431>

Reviewed by Tim Horton.

Source/WebKit2:

Actually encode and decode smartInsertDeleteEnabled when sending WebPageCreationParameters over XPC.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):

Tools:

Adds the ability for TestWKWebView to send a sequence of clicks to its window, and uses this capability to
verify that double clicking to select a word in a WKWebView on Mac selects just the word, and not a trailing
space along with it.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/double-click-does-not-select-trailing-space.html: Added.
* TestWebKitAPI/Tests/mac/WKWebViewSelectionTests.mm: Copied from Tools/TestWebKitAPI/cocoa/TestWKWebView.h.
(TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:clickCount:]):
(-[TestWKWebViewHostWindow _mouseUpAtPoint:clickCount:]):
(-[TestWKWebView mouseDownAtPoint:simulatePressure:]):
(-[TestWKWebView mouseUpAtPoint:]):
(-[TestWKWebView sendClicksAtPoint:numberOfClicks:]):
(-[TestWKWebViewHostWindow _mouseDownAtPoint:simulatePressure:]): Deleted.
(-[TestWKWebViewHostWindow _mouseUpAtPoint:]): Deleted.

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

2 years agoMake check-webkit-style do some basic validation for CSSProperties.json
simon.fraser@apple.com [Sun, 26 Feb 2017 18:36:30 +0000 (18:36 +0000)]
Make check-webkit-style do some basic validation for CSSProperties.json
https://bugs.webkit.org/show_bug.cgi?id=168874

Reviewed by Zalan Bujtas.

Do checking of the keys and the value types.

Print exceptions if they occur; previously, coding errors caused silent failure.

* Scripts/webkitpy/style/checker.py:
(CheckerDispatcher._create_checker):
* Scripts/webkitpy/style/checkers/jsonchecker.py:
(JSONFeaturesChecker.check):
(JSONCSSPropertiesChecker):
(JSONCSSPropertiesChecker.check):
(JSONCSSPropertiesChecker.validate_comment):
(JSONCSSPropertiesChecker.validate_type):
(JSONCSSPropertiesChecker.validate_boolean):
(JSONCSSPropertiesChecker.validate_string):
(JSONCSSPropertiesChecker.validate_array):
(JSONCSSPropertiesChecker.validate_codegen_properties):
(JSONCSSPropertiesChecker.check_property):
(JSONCSSPropertiesChecker.check_codegen_properties):

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

2 years agoHitTestResult's linkSuggestedFilename should sanitize download attribute
cdumez@apple.com [Sun, 26 Feb 2017 18:31:13 +0000 (18:31 +0000)]
HitTestResult's linkSuggestedFilename should sanitize download attribute
https://bugs.webkit.org/show_bug.cgi?id=168856
<rdar://problem/30683109>

Reviewed by Antti Koivisto.

Source/WebCore:

HitTestResult's linkSuggestedFilename should sanitize download attribute.
This is used by the context menu's "Download Linked File" & "Download Linked
File As..." actions.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::linkSuggestedFilename):
* rendering/HitTestResult.h:

Source/WebKit2:

HitTestResult's linkSuggestedFilename should sanitize download attribute.
This is used by the context menu's "Download Linked File" & "Download Linked
File As..." actions.

* Shared/WebHitTestResultData.cpp:
(WebKit::WebHitTestResultData::WebHitTestResultData):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::linkSuggestedFilename):

Tools:

Add test coverage.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/link-with-download-attribute-with-slashes.html: Added.
* TestWebKitAPI/Tests/WebKit2/mac/ContextMenuDownload.mm:
(TestWebKitAPI::decideDestinationWithSuggestedFilenameContainingSlashes):
(TestWebKitAPI::TEST):

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