WebKit-https.git
3 years agoMake -webkit-transition-* and -webkit-animation-* properties be pure aliases of the...
simon.fraser@apple.com [Mon, 12 Sep 2016 15:50:17 +0000 (15:50 +0000)]
Make -webkit-transition-* and -webkit-animation-* properties be pure aliases of the unprefixed ones
https://bugs.webkit.org/show_bug.cgi?id=160478

Reviewed by Dean Jackson.

Source/WebCore:

Remove the custom -webkit prefixed transition and animation properties, and just make
them aliases of the unprefixed ones, as we do for transforms.

-webkit-animation-trigger remains as the only prefixed-only animation property.

This is mostly code deletion.

Test: fast/css/longhand-overrides-shorthand-prefixing.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperty.h:
(WebCore::prefixingVariantForPropertyId): Deleted.
* css/CSSPropertyNames.in:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationDelay):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationDuration):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
(WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
(WebCore::MutableStyleProperties::removeShorthandProperty):
(WebCore::StyleProperties::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::animationShorthandForParsing):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForKeyframe):
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::addPropertyWithPrefixingVariant): Deleted.
* css/parser/CSSParser.h:
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::makeOpaque):
(WebCore::MediaControlPanelElement::makeTransparent):

LayoutTests:

Updated results, and a new test to ensure that longhand properties override
shorthand ones, with various combinations of prefixing.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/longhand-overrides-shorthand-prefixing-expected.txt: Added.
* fast/css/longhand-overrides-shorthand-prefixing.html: Added.
* fast/css/prefixed-unprefixed-variant-style-declaration-expected.txt:
* fast/css/prefixed-unprefixed-variant-style-declaration.html:
* transitions/svg-transitions-expected.txt:
* transitions/transitions-parsing-expected.txt:
* transitions/transitions-parsing.html:

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

3 years agoUnreviewed build fix after r205090.
pvollan@apple.com [Mon, 12 Sep 2016 12:31:56 +0000 (12:31 +0000)]
Unreviewed build fix after r205090.

* platform/cf/MediaAccessibilitySoftLink.cpp:

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

3 years ago[css-align] Initial values are parsed as invalid for some Alignment properties
jfernandez@igalia.com [Mon, 12 Sep 2016 11:46:57 +0000 (11:46 +0000)]
[css-align] Initial values are parsed as invalid for some Alignment properties
https://bugs.webkit.org/show_bug.cgi?id=161303

Reviewed by Darin Adler.

Source/WebCore:

Due to the implementation of the new CSS Box Alignment specification,
some properties have now new values allowed, which are not valid
according to the Flexible Box Layout specification.

In r205102 we have get back the keywordID parsing, originally implemented for
the Flexbible Box Layout specification. Even though the new valued would be
parsed as invalid when they are set, the 'initial' values will be assigned
in any case.

This patch verifies that the 'initial' values depend on whether the Grid
Layout is enabled or not and verifying such values are parsed as valid.

Additionally, it gets back as well they keywordID parsing for the Content
Alignment properties (align-content and justify-content). This required to
touch a bit the StyleBuilderConverter logic, since we will have to deal with
either the complex CSSContentDistributionValue complex or the  simpler
CSSPrimitiveValue.

Test: fast/css/ensure-flexbox-compatibility-with-initial-values.html

* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertContentAlignmentData): Handling a primitive value if Grid Layout is not enabled.
* css/parser/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Simpler parsing of alignment properties if Grid Layout is not enabled.
(WebCore::isKeywordPropertyID): Alignment properties are defined as keyword if Grid Layout is no enabled.
(WebCore::CSSParser::parseValue): Assert Grid Layout is enabled when using the complex parsing.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::isCSSGridLayoutEnabled): Checking out the Grid Layout runtime flags.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialDefaultAlignment): Initial value will depend on whether Grid Layout is enabled or not.
(WebCore::RenderStyle::initialContentAlignment): Initial value will depend on whether Grid Layout is enabled or not.

LayoutTests:

Test to verify the "initial" values of the CSS Box Alignment properties
are parsed as valid independently of whether Grid Layout is enabled or not.

* fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: Added.
* fast/css/ensure-flexbox-compatibility-with-initial-values.html: Added.
* fast/css/resources/alignment-parsing-utils.js:
(checkSupportedValues):

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

3 years agool.start may return incorrect value for reversed lists when not explicitly set
cdumez@apple.com [Mon, 12 Sep 2016 09:28:52 +0000 (09:28 +0000)]
ol.start may return incorrect value for reversed lists when not explicitly set
https://bugs.webkit.org/show_bug.cgi?id=161713

Reviewed by Ryosuke Niwa.

Fix style nit after r205689.

* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::itemCount):
(WebCore::HTMLOListElement::itemCountAfterLayout):
* html/HTMLOListElement.h:

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

3 years agoStart using Document::pageCacheState() instead of Document::inPageCache()
cdumez@apple.com [Mon, 12 Sep 2016 09:26:19 +0000 (09:26 +0000)]
Start using Document::pageCacheState() instead of Document::inPageCache()
https://bugs.webkit.org/show_bug.cgi?id=161851

Reviewed by Ryosuke Niwa.

Start using Document::pageCacheState() instead of Document::inPageCache()
as the latter one is confusing (given that it is true when firing the
pagehide event, when the document is about to enter page cache).

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::closeURL):
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::dispatchUnloadEvents):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* page/Page.cpp:
(WebCore::incrementFrame): Deleted.
* page/Page.h:

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

3 years agoFastBitVector should have efficient and easy-to-use vector-vector operations
fpizlo@apple.com [Mon, 12 Sep 2016 04:03:36 +0000 (04:03 +0000)]
FastBitVector should have efficient and easy-to-use vector-vector operations
https://bugs.webkit.org/show_bug.cgi?id=161847

Reviewed by Saam Barati.

Source/JavaScriptCore:

Adapt existing users of FastBitVector to the new API.

* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::BytecodeLivenessAnalysis::computeKills):
(JSC::BytecodeLivenessAnalysis::dumpResults):
* bytecode/BytecodeLivenessAnalysisInlines.h:
(JSC::operandThatIsNotAlwaysLiveIsLive):
(JSC::BytecodeLivenessPropagation<DerivedAnalysis>::stepOverInstruction):
(JSC::BytecodeLivenessPropagation<DerivedAnalysis>::runLivenessFixpoint):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::validate):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::flushForTerminal):
* dfg/DFGForAllKills.h:
(JSC::DFG::forAllKilledOperands):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::forAllLocalsLiveInBytecode):
* dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::LiveCatchVariablePreservationPhase::willCatchException):
(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlock):
* dfg/DFGNaturalLoops.cpp:
(JSC::DFG::NaturalLoops::NaturalLoops):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::cleanMustHandleValuesIfNecessary):

Source/WTF:

FastBitVector is a bitvector representation that supports manual dynamic resizing and is
optimized for speed, not space. (BitVector supports automatic dynamic resizing and is
optimized for space, while Bitmap is sized statically and is optimized for both speed and
space.) This change greatly increases the power of FastBitVector. We will use these new
powers for changing the JSC GC to use FastBitVectors to track sets of MarkedBlocks (bug
161581) instead of using a combination of Vectors and doubly-linked lists.

This change splits FastBitVector into two parts:

- A thing that manages the storage of a bitvector: a uint32_t array and a size_t numBits.
  We call this the word view.
- A thing that takes some kind of abstract array of uint32_t's and does bitvector
  operations to it. We call this the FastBitVectorImpl.

FastBitVectorImpl and word views are immutable. The FastBitVector class is a subclass of
FastBitVectorImpl specialized on a word view that owns its words and has additional
support for mutable operations.

Doing this allows us to efficiently support things like this without any unnecessary
memory allocation or copying:

FastBitVector a, b, c; // Assume that there is code to initialize these.
a &= b | ~c;

Previously, this kind of operation would not be efficient, because "~c" would have to
create a whole new FastBitVector. But now, it just returns a FastBitVectorImpl whose
underlying word view bitnots (~) its words on the fly. Using template magic, this can get
pretty complex. For example "b | ~c" returns a FastBitVectorImpl that wraps a word view
whose implementation of WordView::word(size_t index) is something like:

uint32_t word(size_t index) { return b.m_words.word(index) | ~c.m_words.word(index); }

FastBitVectorImpl supports all of the fast bulk bitvector operations, like
forEachSetBit(), bitCount(), etc. So, when you say "a &= b | ~c", the actual
implementation is going to run these bit operations on word granularity directly over the
storage inside a, b, c.

The use of operator overloading is worth explaining a bit. Previously, FastBitVector
avoided operator overloading. For example, the &= operation was called filter(). I think
that this was a pretty good approach at the time. I tried using non-operator methods in
this FastBitVector rewrite, but I found it very odd to say things like:

a.filter(b.bitOr(c.bitNot()));

I think that it's harder to see what is going on here, then using operators, because infix
notation is always better.

* WTF.xcodeproj/project.pbxproj:
* wtf/BitVector.h:
(WTF::BitVector::findBitInWord): Deleted.
* wtf/CMakeLists.txt:
* wtf/Dominators.h:
(WTF::Dominators::NaiveDominators::NaiveDominators):
(WTF::Dominators::NaiveDominators::dominates):
(WTF::Dominators::NaiveDominators::pruneDominators):
* wtf/FastBitVector.cpp: Removed.
* wtf/FastBitVector.h:
(WTF::fastBitVectorArrayLength):
(WTF::FastBitVectorWordView::FastBitVectorWordView):
(WTF::FastBitVectorWordView::numBits):
(WTF::FastBitVectorWordView::word):
(WTF::FastBitVectorWordOwner::FastBitVectorWordOwner):
(WTF::FastBitVectorWordOwner::~FastBitVectorWordOwner):
(WTF::FastBitVectorWordOwner::view):
(WTF::FastBitVectorWordOwner::operator=):
(WTF::FastBitVectorWordOwner::setAll):
(WTF::FastBitVectorWordOwner::clearAll):
(WTF::FastBitVectorWordOwner::set):
(WTF::FastBitVectorWordOwner::numBits):
(WTF::FastBitVectorWordOwner::arrayLength):
(WTF::FastBitVectorWordOwner::resize):
(WTF::FastBitVectorWordOwner::word):
(WTF::FastBitVectorWordOwner::words):
(WTF::FastBitVectorAndWords::FastBitVectorAndWords):
(WTF::FastBitVectorAndWords::view):
(WTF::FastBitVectorAndWords::numBits):
(WTF::FastBitVectorAndWords::word):
(WTF::FastBitVectorOrWords::FastBitVectorOrWords):
(WTF::FastBitVectorOrWords::view):
(WTF::FastBitVectorOrWords::numBits):
(WTF::FastBitVectorOrWords::word):
(WTF::FastBitVectorNotWords::FastBitVectorNotWords):
(WTF::FastBitVectorNotWords::view):
(WTF::FastBitVectorNotWords::numBits):
(WTF::FastBitVectorNotWords::word):
(WTF::FastBitVectorImpl::FastBitVectorImpl):
(WTF::FastBitVectorImpl::numBits):
(WTF::FastBitVectorImpl::size):
(WTF::FastBitVectorImpl::arrayLength):
(WTF::FastBitVectorImpl::operator==):
(WTF::FastBitVectorImpl::operator!=):
(WTF::FastBitVectorImpl::at):
(WTF::FastBitVectorImpl::operator[]):
(WTF::FastBitVectorImpl::bitCount):
(WTF::FastBitVectorImpl::operator&):
(WTF::FastBitVectorImpl::operator|):
(WTF::FastBitVectorImpl::operator~):
(WTF::FastBitVectorImpl::forEachSetBit):
(WTF::FastBitVectorImpl::forEachClearBit):
(WTF::FastBitVectorImpl::forEachBit):
(WTF::FastBitVectorImpl::findBit):
(WTF::FastBitVectorImpl::findSetBit):
(WTF::FastBitVectorImpl::findClearBit):
(WTF::FastBitVectorImpl::dump):
(WTF::FastBitVectorImpl::atImpl):
(WTF::FastBitVector::FastBitVector):
(WTF::FastBitVector::operator=):
(WTF::FastBitVector::resize):
(WTF::FastBitVector::setAll):
(WTF::FastBitVector::clearAll):
(WTF::FastBitVector::setAndCheck):
(WTF::FastBitVector::operator|=):
(WTF::FastBitVector::operator&=):
(WTF::FastBitVector::at):
(WTF::FastBitVector::operator[]):
(WTF::FastBitVector::BitReference::BitReference):
(WTF::FastBitVector::BitReference::operator bool):
(WTF::FastBitVector::BitReference::operator=):
(WTF::FastBitVector::~FastBitVector): Deleted.
(WTF::FastBitVector::numBits): Deleted.
(WTF::FastBitVector::set): Deleted.
(WTF::FastBitVector::equals): Deleted.
(WTF::FastBitVector::merge): Deleted.
(WTF::FastBitVector::filter): Deleted.
(WTF::FastBitVector::exclude): Deleted.
(WTF::FastBitVector::clear): Deleted.
(WTF::FastBitVector::get): Deleted.
(WTF::FastBitVector::bitCount): Deleted.
(WTF::FastBitVector::forEachSetBit): Deleted.
(WTF::FastBitVector::arrayLength): Deleted.
* wtf/StdLibExtras.h:
(WTF::findBitInWord):

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

3 years agoWeb Inspector: Combine similar SVG files for Styles sidebar
commit-queue@webkit.org [Mon, 12 Sep 2016 03:29:04 +0000 (03:29 +0000)]
Web Inspector: Combine similar SVG files for Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=161071

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-09-11
Reviewed by Joseph Pecoraro.

* UserInterface/Images/StyleRule.svg: Added.
* UserInterface/Images/StyleRulePseudoElement.svg: Added.
Replaced <defs> with <symbol> give CSS some access to the referenced DOM inside <symbol>.
Since <symbol> uses Shadow DOM, applying CSS variables to the :target element and using
them inside <symbol> allows for variable styling of the content.  Using a more basic
`#foo .bar` selector would not be valid since Shadow DOM separates the stylesheet selectors.

* UserInterface/Images/gtk/StyleRule.svg: Added.
* UserInterface/Images/gtk/StyleRulePseudoElement.svg: Added.

* UserInterface/Images/StyleRuleAuthor.svg: Removed.
* UserInterface/Images/StyleRuleInherited.svg: Removed.
* UserInterface/Images/StyleRuleInspector.svg: Removed.
* UserInterface/Images/StyleRuleUser.svg: Removed.
* UserInterface/Images/StyleRuleUserAgent.svg: Removed.
* UserInterface/Images/gtk/StyleRuleAuthor.svg: Removed.
* UserInterface/Images/gtk/StyleRuleInherited.svg: Removed.
* UserInterface/Images/gtk/StyleRuleInspector.svg: Removed.
* UserInterface/Images/gtk/StyleRuleUser.svg: Removed.
* UserInterface/Images/gtk/StyleRuleUserAgent.svg: Removed.
Merged into StyleRule.svg by using IDs in the URL.

* UserInterface/Images/StyleRuleAuthorPseudo.svg: Removed.
* UserInterface/Images/StyleRuleInspectorPseudo.svg: Removed.
* UserInterface/Images/StyleRuleUserAgentPseudo.svg: Removed.
* UserInterface/Images/StyleRuleUserPseudo.svg: Removed.
Merged into StyleRulePseudoElement.svg by using IDs in the URL.

* UserInterface/Views/StyleRuleIcons.css:
(.author-style-rule-icon .icon):
(.author-style-rule-icon.pseudo-element-selector .icon):
(.user-style-rule-icon .icon):
(.user-style-rule-icon.pseudo-element-selector .icon):
(.user-agent-style-rule-icon .icon):
(.user-agent-style-rule-icon.pseudo-element-selector .icon):
(.inspector-style-rule-icon .icon):
(.inspector-style-rule-icon.pseudo-element-selector .icon):
(.inherited-style-rule-icon .icon):

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

3 years agoREGRESSION (r205754): Web Inspector: Cannot click on links to stylesheets in Rules...
commit-queue@webkit.org [Mon, 12 Sep 2016 00:03:02 +0000 (00:03 +0000)]
REGRESSION (r205754): Web Inspector: Cannot click on links to stylesheets in Rules sidebar
https://bugs.webkit.org/show_bug.cgi?id=161838

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-09-11
Reviewed by Brian Burg.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header > textarea):
(.style-declaration-section > .header > .origin):
Added z-index to the non-selector elements of the header.  Also limited the size of the
selector textarea to just the size of the displayed selector text.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
Fixed invalid enum value for propertyVisibilityMode.

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

3 years agoHTMLTrackElement.kind's invalid value default should be the metadata state
cdumez@apple.com [Sun, 11 Sep 2016 22:30:05 +0000 (22:30 +0000)]
HTMLTrackElement.kind's invalid value default should be the metadata state
https://bugs.webkit.org/show_bug.cgi?id=161840

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline existing tests now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/kind-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/kind-expected.txt:

Source/WebCore:

HTMLTrackElement.kind's invalid value default should be the metadata state,
not the subtitles state:
- https://html.spec.whatwg.org/#attr-track-kind

Chrome agrees with the specification.

No new tests, rebaselined existing tests.

* html/track/TextTrack.cpp:
(WebCore::TextTrack::setKindKeywordIgnoringASCIICase):

LayoutTests:

* media/track/track-kind-expected.txt:
* media/track/track-kind.html:
Update existing test to reflect behavior change.

* media/track/w3c/interfaces/TextTrack/kind.html:
Re-sync test from W3C as it was outdated.

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

3 years ago[CSS Parser] Add the main parser implementation
hyatt@apple.com [Sun, 11 Sep 2016 18:11:42 +0000 (18:11 +0000)]
[CSS Parser] Add the main parser implementation
https://bugs.webkit.org/show_bug.cgi?id=161813

Reviewed by Dean Jackson.

This patch adds the main CSSParserImpl that handles stylesheet and rule parsing. All parsing starts with this
class (it will eventually be invoked from the CSSParser). This patch also adds @supports parsing.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::StyleKeyframe):
* css/CSSKeyframeRule.h:
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
(WebCore::StyleRuleBase::copy):
(WebCore::StyleRuleBase::createCSSOMWrapper):
(WebCore::StyleRuleCharset::StyleRuleCharset):
(WebCore::StyleRuleCharset::~StyleRuleCharset):
(WebCore::StyleRuleNamespace::StyleRuleNamespace):
(WebCore::StyleRuleNamespace::~StyleRuleNamespace):
* css/StyleRule.h:
(WebCore::StyleRuleBase::isNamespaceRule):
(isType):
(WebCore::StyleRuleBase::isKeyframesRule): Deleted.
* css/StyleSheetContents.cpp:
(WebCore::traverseSubresourcesInRules):
* css/parser/CSSParserImpl.cpp: Added.
(WebCore::CSSParserImpl::CSSParserImpl):
(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::parseVariableValue):
(WebCore::filterProperties):
(WebCore::createStyleProperties):
(WebCore::CSSParserImpl::parseInlineStyleDeclaration):
(WebCore::CSSParserImpl::parseDeclarationList):
(WebCore::CSSParserImpl::parseRule):
(WebCore::CSSParserImpl::parseStyleSheet):
(WebCore::CSSParserImpl::parsePageSelector):
(WebCore::CSSParserImpl::parseCustomPropertySet):
(WebCore::CSSParserImpl::parseKeyframeKeyList):
(WebCore::CSSParserImpl::supportsDeclaration):
(WebCore::CSSParserImpl::parseDeclarationListForInspector):
(WebCore::CSSParserImpl::parseStyleSheetForInspector):
(WebCore::computeNewAllowedRules):
(WebCore::CSSParserImpl::consumeRuleList):
(WebCore::CSSParserImpl::consumeAtRule):
(WebCore::CSSParserImpl::consumeQualifiedRule):
(WebCore::consumeStringOrURI):
(WebCore::CSSParserImpl::consumeCharsetRule):
(WebCore::CSSParserImpl::consumeImportRule):
(WebCore::CSSParserImpl::consumeNamespaceRule):
(WebCore::CSSParserImpl::consumeMediaRule):
(WebCore::CSSParserImpl::consumeSupportsRule):
(WebCore::CSSParserImpl::consumeViewportRule):
(WebCore::CSSParserImpl::consumeFontFaceRule):
(WebCore::CSSParserImpl::consumeKeyframesRule):
(WebCore::CSSParserImpl::consumePageRule):
(WebCore::CSSParserImpl::consumeKeyframeStyleRule):
(WebCore::observeSelectors):
(WebCore::CSSParserImpl::consumeStyleRule):
(WebCore::CSSParserImpl::consumeDeclarationList):
(WebCore::CSSParserImpl::consumeDeclaration):
(WebCore::CSSParserImpl::consumeVariableValue):
(WebCore::CSSParserImpl::consumeDeclarationValue):
(WebCore::CSSParserImpl::consumeKeyframeKeyList):
* css/parser/CSSParserImpl.h: Added.
* css/parser/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePagePseudoSelector):
* css/parser/CSSParserValues.h:
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseValue):
* css/parser/CSSSupportsParser.cpp: Added.
(WebCore::CSSSupportsParser::supportsCondition):
(WebCore::CSSSupportsParser::consumeCondition):
(WebCore::CSSSupportsParser::consumeNegation):
(WebCore::CSSSupportsParser::consumeConditionInParenthesis):
* css/parser/CSSSupportsParser.h: Added.
(WebCore::CSSSupportsParser::CSSSupportsParser):

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

3 years ago[EFL] Skip to test some w3c/web-platform-tests
gyuyoung.kim@webkit.org [Sun, 11 Sep 2016 14:10:54 +0000 (14:10 +0000)]
[EFL] Skip to test some w3c/web-platform-tests

Unreviewed EFL gardening.

Some tests of w3c/web-platform-tests have been flaky since r205777.

* platform/efl/TestExpectations

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

3 years agoCandidates that don't end in spaces shouldn't have spaces arbitrarily appended to...
timothy_horton@apple.com [Sun, 11 Sep 2016 07:24:17 +0000 (07:24 +0000)]
Candidates that don't end in spaces shouldn't have spaces arbitrarily appended to them
https://bugs.webkit.org/show_bug.cgi?id=161846
<rdar://problem/28245097>

Reviewed by Beth Dakin.

Tests: editing/mac/spelling/accept-candidate-without-adding-space.html,
       editing/mac/spelling/accept-candidate-allows-autocorrect-on-next-word.html

* editing/Editor.cpp:
(WebCore::Editor::handleAcceptedCandidate):
Stop appending a space just because the candidate doesn't end in a space.
There are languages where that doesn't make sense, and the platform
guarantees that candidates will always have spaces if they need them.

Also, adjust the way we compute the AcceptedCandidate document marker range.
There were two problems with the existing code: it expanded outward from
the post-insertion cursor in *both* directions, instead of just backwards,
and it used the length of the replaced text, not the length of the newly
inserted text (more of the confusion mentioned in r205765).

* editing/mac/spelling/accept-candidate-replacing-multiple-words-expected.txt:
* editing/mac/spelling/accept-candidate-replacing-multiple-words.html:
* editing/mac/spelling/accept-candidate-without-crossing-editing-boundary-expected.txt:
* editing/mac/spelling/accept-candidate-without-crossing-editing-boundary.html:
Update existing tests to put spaces at the end of accepted candidates to make them
more similar to what the OS will return to us.

* editing/mac/spelling/accept-candidate-without-adding-space-expected.txt: Added.
* editing/mac/spelling/accept-candidate-without-adding-space.html: Added.
Add a test where the accepted candidate does *not* have a space at the end,
testing that we don't add one where the candidate didn't contain one.

* editing/mac/spelling/accept-candidate-allows-autocorrect-on-next-word-expected.txt: Added.
* editing/mac/spelling/accept-candidate-allows-autocorrect-on-next-word.html: Added.
Add a test ensuring that the document marker added by accepting a candidate
doesn't overlap the next word and prevent autocorrect from working on it.

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

3 years agoparseHTMLInteger() should take a StringView in parameter
cdumez@apple.com [Sat, 10 Sep 2016 18:08:32 +0000 (18:08 +0000)]
parseHTMLInteger() should take a StringView in parameter
https://bugs.webkit.org/show_bug.cgi?id=161669

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* runtime/DateConversion.cpp:
(JSC::formatDateTime):
Explicitly construct a String from the const WCHAR* on Windows because
it is ambiguous otherwise now that there is a StringBuilder::append()
overload taking an AtomicString in.

Source/WebCore:

parseHTMLInteger() should take a StringView in parameter instead of a
const String&.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseFontFaceSrcLocal):
* css/parser/CSSParserValues.h:
(WebCore::CSSParserString::toStringView):
Add toStringView() to avoid unnecessarily constructing a String for
calling StringBuilder::append().

* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLInteger):
(WebCore::parseHTMLNonNegativeInteger):
(WebCore::parseHTTPRefreshInternal):
* html/parser/HTMLParserIdioms.h:
(WebCore::limitToOnlyHTMLNonNegativeNumbersGreaterThanZero):
(WebCore::limitToOnlyHTMLNonNegative):
Take a StringView in parameter instead of a const String&.

* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::isColumnDeclaredAsBlob):
Avoid unnecessarily constructing a String to call equalLettersIgnoringASCIICase()
by leveraging the StringView constructor taking a 'const char*' in parameter.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderBlock.h:
Add constructTextRun() overload taking an AtomicString. It was otherwise ambiguous
because both a String or a StringView could be constructed from an AtomicString.

* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsDefaultFontCSS):
(WebCore::buildDisplayStringForTrackBase):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):
Explicitly construct a String from NSString / CFStringRef types as such calls are
now ambiguous.

Source/WTF:

* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append):
Add StringBuilder::append() overload taking an AtomicString in parameter.
It used to call StringBuilder::append(const String&) implicitly when
passing an AtomicString. However, it is now ambiguous because there
is an overload taking a StringView, and it is now possible to construct
a StringView from an AtomicString.

* wtf/text/StringView.h:
(WTF::StringView::StringView):
- Add StringView constructor taking an AtomicString in parameter for
  convenience. This avoids having to call AtomicString::string()
  explicitly at call sites.
- Add StringView constructor taking a 'const char*' in parameter for
  performance. There are several call sites that were passing a const
  char* and implicitly constructing an unnecessary String to construct
  a StringView. This became more obvious because the constructor taking
  an AtomicString in parameter made such calls ambiguous.

Tools:

Explicitly construct a String from the CFStringRef in order to call
StringBuilder::append(). This is needed now that there is an append()
overload taking an AtomicString in parameter.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dumpDOMAsWebArchive):

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

3 years agoIt is possible for Document::m_frame pointer to become stale
cdumez@apple.com [Sat, 10 Sep 2016 16:06:05 +0000 (16:06 +0000)]
It is possible for Document::m_frame pointer to become stale
https://bugs.webkit.org/show_bug.cgi?id=161812
<rdar://problem/27745023>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Document::m_frame is supposed to get cleared by Document::prepareForDestruction().
The Frame destructor calls Frame::setView(nullptr) which is supposed to call the
prepareForDestruction() on the Frame's associated document. However,
Frame::setView(nullptr) was calling prepareForDestruction() only if
Document::inPageCache() returned true. This is because, we allow Documents to
stay alive in the PageCache even though they don't have a frame.

The issue is that Document::m_inPageCache flag was set to true right before
firing the pagehide event, so technically before really entering PageCache.
Therefore, we can run into problems if a Frame gets destroyed by a pagehide
EventHandler because ~Frame() will not call Document::prepareForDestruction()
due to Document::m_inPageCache being true. After the frame is destroyed,
Document::m_frame becomes stale and any action on the document will likely
lead to crashes (such as the one in the layout test and the radar which
happens when trying to unregister event listeners from the document).

The solution adopted in this patch is to replace the m_inPageCache boolean
with a m_pageCacheState enumeration that has 3 states:
- NotInPageCache
- AboutToEnterPageCache
- InPageCache

Frame::setView() / Frame::setDocument() were then updated to call
Document::prepareForDestruction() on the associated document whenever
the document's pageCacheState is not InPageCache. This means that we
will now call Document::prepareForDestruction() when the document is
being detached from its frame while firing the pagehide event.

Note that I tried to keep this patch minimal. Therefore, I kept
the Document::inPageCache() getter for now. I plan to switch all its
calls sites to the new Document::pageCacheState() getter in a follow-up
patch so that we can finally drop the confusing Document::inPageCache().

Test: fast/history/pagehide-remove-iframe-crash.html

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::createRenderTree):
(WebCore::Document::destroyRenderTree):
(WebCore::Document::setFocusedElement):
(WebCore::Document::setPageCacheState):
(WebCore::Document::topDocument):
* dom/Document.h:
(WebCore::Document::pageCacheState):
(WebCore::Document::inPageCache):
* history/CachedFrame.cpp:
(WebCore::CachedFrame::destroy):
* history/PageCache.cpp:
(WebCore::setPageCacheState):
(WebCore::PageCache::addIfCacheable):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::open):
* loader/HistoryController.cpp:
(WebCore::HistoryController::invalidateCurrentItemCachedPage):
* page/Frame.cpp:
(WebCore::Frame::setView):

LayoutTests:

Add layout test that crashes on both Mac and iOS due to using a stale
Document::m_frame pointer.

* fast/history/pagehide-remove-iframe-crash-expected.txt: Added.
* fast/history/pagehide-remove-iframe-crash.html: Added.

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

3 years ago[EFL] Mark new media source tests to failure
gyuyoung.kim@webkit.org [Sat, 10 Sep 2016 15:06:20 +0000 (15:06 +0000)]
[EFL] Mark new media source tests to failure

Unreviewed EFL gardening.

* platform/efl/TestExpectations: New added media source tests are failing.

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

3 years agoApple.com keynote does not display media controls
wenson_hsieh@apple.com [Sat, 10 Sep 2016 08:19:10 +0000 (08:19 +0000)]
Apple.com keynote does not display media controls
https://bugs.webkit.org/show_bug.cgi?id=161833
<rdar://problem/28230123>

Reviewed by Tim Horton.

Source/WebCore:

Tweaks the main content check so that we can distinguish between main content for the purposes of determining
autoplay policy vs. main content for the purposes of showing media controls. Namely, we make the latter less
restrictive than the former in terms of the maximum aspect ratio a video can have to be considered the right
size for main content.

New unit test in TestWebKitAPI.

* html/HTMLMediaElement.cpp:
(WebCore::mediaElementSessionInfoForSession):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::canShowControlsManager):
(WebCore::MediaElementSession::isLargeEnoughForMainContent):
(WebCore::MediaElementSession::wantsToObserveViewportVisibilityForMediaControls):
(WebCore::isMainContentForPurposesOfAutoplay):
(WebCore::isElementLargeEnoughForMainContent):
(WebCore::MediaElementSession::updateIsMainContent):
(WebCore::isMainContent): Deleted.
* html/MediaElementSession.h:

Tools:

New unit test verifying that wide videos (~2 aspect ratio) still get media controls.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/wide-autoplaying-video-with-audio.html: Added.

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

3 years agoWKThumbnailView should expose a mode where it can be reparented without resnapshotting
timothy_horton@apple.com [Sat, 10 Sep 2016 02:20:11 +0000 (02:20 +0000)]
WKThumbnailView should expose a mode where it can be reparented without resnapshotting
https://bugs.webkit.org/show_bug.cgi?id=161828
<rdar://problem/28229756>

Reviewed by Alex Christensen.

* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _viewWasUnparented]):
Add such a mode. Bail from snapshot teardown when unparented if it is on.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/WKThumbnailView.mm: Added.
(-[SnapshotSizeObserver observeValueForKeyPath:ofObject:change:context:]):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::TEST):
Add a test ensuring that this behaves correctly.

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

3 years agoURLParser: Keep track of cannot-be-a-base-url according to spec
achristensen@apple.com [Sat, 10 Sep 2016 02:06:39 +0000 (02:06 +0000)]
URLParser: Keep track of cannot-be-a-base-url according to spec
https://bugs.webkit.org/show_bug.cgi?id=161830

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

* platform/URL.cpp:
(WebCore::URL::invalidate):
* platform/URL.h:
Add a boolean required by the spec.
This will not add to sizeof(URL) because we already have some bit fields.
* platform/URLParser.cpp:
(WebCore::URLParser::parse):
(WebCore::URLParser::allValuesEqual):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoFix API tests after r205774.
achristensen@apple.com [Sat, 10 Sep 2016 01:08:23 +0000 (01:08 +0000)]
Fix API tests after r205774.
https://bugs.webkit.org/show_bug.cgi?id=161820

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):
I had committed the wrong expected path in one case. The functionality is correct.

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

3 years ago[ANGLE] instantiation of variable 'gl::GLTypeToGLenum<float>::value' required here...
dino@apple.com [Sat, 10 Sep 2016 00:59:00 +0000 (00:59 +0000)]
[ANGLE] instantiation of variable 'gl::GLTypeToGLenum<float>::value' required here, but no definition is available
https://bugs.webkit.org/show_bug.cgi?id=161829
<rdar://problem/28051244>

Reviewed by Alex Christensen.

Newer versions of clang require explicit definition of some template types
if they are in another translation unit.

* src/libANGLE/Program.cpp: Add definitions for GLTypeToGLenum.

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

3 years agoUnreviewed, rolling r205759 back in with a fix.
msaboff@apple.com [Sat, 10 Sep 2016 00:49:12 +0000 (00:49 +0000)]
Unreviewed, rolling r205759 back in with a fix.

An expectation file, JSTests/ChakraCore/test/Lib/tostring.baseline-jsc,
should be named "toString.baseline-jsc".  For systems with case-insensitive
filesystems, the wrong name isn't an issue.  That rename is part of this
fix.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests):

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

3 years ago[Media Source] Import updated w3c/web-platform-tests and rebaseline
jer.noble@apple.com [Sat, 10 Sep 2016 00:47:53 +0000 (00:47 +0000)]
[Media Source] Import updated w3c/web-platform-tests and rebaseline
https://bugs.webkit.org/show_bug.cgi?id=161723

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* web-platform-tests/media-source/OWNERS: Added.
* web-platform-tests/media-source/SourceBuffer-abort-expected.txt: Added.
* web-platform-tests/media-source/SourceBuffer-abort-readyState-expected.txt: Added.
* web-platform-tests/media-source/SourceBuffer-abort-readyState.html: Renamed from LayoutTests/http/tests/media/media-source/SourceBuffer-abort-readyState.html.
* web-platform-tests/media-source/SourceBuffer-abort-removed-expected.txt: Added.
* web-platform-tests/media-source/SourceBuffer-abort-removed.html: Renamed from LayoutTests/http/tests/media/media-source/SourceBuffer-abort-removed.html.
* web-platform-tests/media-source/SourceBuffer-abort-updating-expected.txt: Added.
* web-platform-tests/media-source/SourceBuffer-abort-updating.html: Renamed from LayoutTests/http/tests/media/media-source/SourceBuffer-abort-updating.html.
* web-platform-tests/media-source/SourceBuffer-abort.html: Renamed from LayoutTests/http/tests/media/media-source/SourceBuffer-abort.html.
* web-platform-tests/media-source/URL-createObjectURL-expected.txt: Added.
* web-platform-tests/media-source/URL-createObjectURL-null-expected.txt: Added.
* web-platform-tests/media-source/URL-createObjectURL-null.html: Added.
* web-platform-tests/media-source/URL-createObjectURL-revoke-expected.txt: Added.
* web-platform-tests/media-source/URL-createObjectURL-revoke.html: Added.
* web-platform-tests/media-source/URL-createObjectURL.html: Added.
* web-platform-tests/media-source/import_tests.sh: Added.
* web-platform-tests/media-source/interfaces-expected.txt: Added.
* web-platform-tests/media-source/interfaces.html: Added.
* web-platform-tests/media-source/manifest.txt: Added.
* web-platform-tests/media-source/mediasource-activesourcebuffers-expected.txt: Added.
* web-platform-tests/media-source/mediasource-activesourcebuffers.html: Added.
* web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer-expected.txt.
* web-platform-tests/media-source/mediasource-addsourcebuffer-mode-expected.txt: Added.
* web-platform-tests/media-source/mediasource-addsourcebuffer-mode.html: Added.
* web-platform-tests/media-source/mediasource-addsourcebuffer.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-addsourcebuffer.html.
* web-platform-tests/media-source/mediasource-append-buffer-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-append-buffer-expected.txt.
* web-platform-tests/media-source/mediasource-append-buffer.html: Added.
* web-platform-tests/media-source/mediasource-appendbuffer-quota-exceeded-expected.txt: Added.
* web-platform-tests/media-source/mediasource-appendbuffer-quota-exceeded.html: Added.
* web-platform-tests/media-source/mediasource-appendwindow-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-appendwindow-expected.txt.
* web-platform-tests/media-source/mediasource-appendwindow.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-appendwindow.html.
* web-platform-tests/media-source/mediasource-avtracks-expected.txt: Added.
* web-platform-tests/media-source/mediasource-avtracks.html: Added.
* web-platform-tests/media-source/mediasource-buffered-expected.txt: Added.
* web-platform-tests/media-source/mediasource-buffered.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-buffered.html.
* web-platform-tests/media-source/mediasource-closed-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-closed-expected.txt.
* web-platform-tests/media-source/mediasource-closed.html: Added.
* web-platform-tests/media-source/mediasource-config-change-mp4-a-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-a-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-a-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-audio-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-audio-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-framesize-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-framesize-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-framesize.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-framesize.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-av-video-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-av-video-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-framerate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-framerate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-framerate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-framesize-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-mp4-v-framesize.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-mp4-v-framesize.html.
* web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-a-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-a-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-av-audio-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-av-audio-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-audio-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-av-framesize-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-framesize-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-av-framesize.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-framesize.html.
* web-platform-tests/media-source/mediasource-config-change-webm-av-video-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-av-video-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-av-video-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-v-bitrate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-bitrate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-v-bitrate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-bitrate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-v-framerate-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-framerate-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-v-framerate.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-framerate.html.
* web-platform-tests/media-source/mediasource-config-change-webm-v-framesize-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-framesize-expected.txt.
* web-platform-tests/media-source/mediasource-config-change-webm-v-framesize.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-change-webm-v-framesize.html.
* web-platform-tests/media-source/mediasource-config-changes.js: Renamed from LayoutTests/http/tests/media/media-source/mediasource-config-changes.js.
(resolutionFromFilename):
(appendBuffer):
(mediaSourceConfigChangeTest):
* web-platform-tests/media-source/mediasource-detach-expected.txt: Added.
* web-platform-tests/media-source/mediasource-detach.html: Added.
* web-platform-tests/media-source/mediasource-duration-boundaryconditions-expected.txt: Added.
* web-platform-tests/media-source/mediasource-duration-boundaryconditions.html: Added.
* web-platform-tests/media-source/mediasource-duration-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-duration-expected.txt.
* web-platform-tests/media-source/mediasource-duration.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-duration.html.
* web-platform-tests/media-source/mediasource-endofstream-expected.txt: Added.
* web-platform-tests/media-source/mediasource-endofstream-invaliderror-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-endofstream-invaliderror-expected.txt.
* web-platform-tests/media-source/mediasource-endofstream-invaliderror.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-endofstream-invaliderror.html.
* web-platform-tests/media-source/mediasource-endofstream.html: Added.
* web-platform-tests/media-source/mediasource-errors-expected.txt: Added.
* web-platform-tests/media-source/mediasource-errors.html: Added.
* web-platform-tests/media-source/mediasource-getvideoplaybackquality-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-getvideoplaybackquality-expected.txt.
* web-platform-tests/media-source/mediasource-getvideoplaybackquality.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-getvideoplaybackquality.html.
* web-platform-tests/media-source/mediasource-is-type-supported-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-is-type-supported-expected.txt.
* web-platform-tests/media-source/mediasource-is-type-supported.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-is-type-supported.html.
* web-platform-tests/media-source/mediasource-liveseekable-expected.txt: Added.
* web-platform-tests/media-source/mediasource-liveseekable.html: Added.
* web-platform-tests/media-source/mediasource-multiple-attach-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-multiple-attach-expected.txt.
* web-platform-tests/media-source/mediasource-multiple-attach.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-multiple-attach.html.
* web-platform-tests/media-source/mediasource-play-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-play-expected.txt.
* web-platform-tests/media-source/mediasource-play-then-seek-back-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back-expected.txt.
* web-platform-tests/media-source/mediasource-play-then-seek-back.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-play-then-seek-back.html.
* web-platform-tests/media-source/mediasource-play.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-play.html.
* web-platform-tests/media-source/mediasource-preload-expected.txt: Added.
* web-platform-tests/media-source/mediasource-preload.html: Added.
* web-platform-tests/media-source/mediasource-redundant-seek-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-redundant-seek-expected.txt.
* web-platform-tests/media-source/mediasource-redundant-seek.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-redundant-seek.html.
* web-platform-tests/media-source/mediasource-remove-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-remove-expected.txt.
* web-platform-tests/media-source/mediasource-remove.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-remove.html.
* web-platform-tests/media-source/mediasource-removesourcebuffer-expected.txt: Added.
* web-platform-tests/media-source/mediasource-removesourcebuffer.html: Added.
* web-platform-tests/media-source/mediasource-seek-beyond-duration-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-seek-beyond-duration-expected.txt.
* web-platform-tests/media-source/mediasource-seek-beyond-duration.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-seek-beyond-duration.html.
* web-platform-tests/media-source/mediasource-seek-during-pending-seek-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-seek-during-pending-seek-expected.txt.
* web-platform-tests/media-source/mediasource-seek-during-pending-seek.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-seek-during-pending-seek.html.
* web-platform-tests/media-source/mediasource-seekable-expected.txt: Added.
* web-platform-tests/media-source/mediasource-seekable.html: Added.
* web-platform-tests/media-source/mediasource-sequencemode-append-buffer-expected.txt: Added.
* web-platform-tests/media-source/mediasource-sequencemode-append-buffer.html: Added.
* web-platform-tests/media-source/mediasource-sourcebuffer-mode-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-sourcebuffer-mode-expected.txt.
* web-platform-tests/media-source/mediasource-sourcebuffer-mode.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-sourcebuffer-mode.html.
* web-platform-tests/media-source/mediasource-sourcebuffer-trackdefaults-expected.txt: Added.
* web-platform-tests/media-source/mediasource-sourcebuffer-trackdefaults.html: Added.
* web-platform-tests/media-source/mediasource-sourcebufferlist-expected.txt: Renamed from LayoutTests/http/tests/media/media-source/mediasource-sourcebufferlist-expected.txt.
* web-platform-tests/media-source/mediasource-sourcebufferlist.html: Renamed from LayoutTests/http/tests/media/media-source/mediasource-sourcebufferlist.html.
* web-platform-tests/media-source/mediasource-timestamp-offset-expected.txt: Added.
* web-platform-tests/media-source/mediasource-timestamp-offset.html: Added.
* web-platform-tests/media-source/mediasource-trackdefault-expected.txt: Added.
* web-platform-tests/media-source/mediasource-trackdefault.html: Added.
* web-platform-tests/media-source/mediasource-trackdefaultlist-expected.txt: Added.
* web-platform-tests/media-source/mediasource-trackdefaultlist.html: Added.
* web-platform-tests/media-source/mediasource-util.js: Renamed from LayoutTests/http/tests/media/media-source/mediasource-util.js.
(EventExpectationsManager):
(EventExpectationsManager.prototype.expectEvent):
(EventExpectationsManager.prototype.waitForExpectedEvents):
(EventExpectationsManager.prototype.expectingEvents):
(EventExpectationsManager.prototype.handleWaitCallback_):
(EventExpectationsManager.prototype.getExpectations_):
(loadData_):
(onSourceOpen):
(openMediaSource_):
(MediaSourceUtil.loadTextData):
(MediaSourceUtil.loadBinaryData):
(MediaSourceUtil.fetchManifestAndData):
(MediaSourceUtil.extractSegmentData):
(MediaSourceUtil.getMediaDataForPlaybackTime):
(getFirstSupportedType):
(getSegmentInfo):
(MediaSourceUtil.getSubType):
(MediaSourceUtil.append):
(onEvent):
(onAppendDone):
(MediaSourceUtil.appendUntilEventFires):
(addExtraTestMethods.test.expectEvent):
(addExtraTestMethods.test.waitForExpectedEvents):
(addExtraTestMethods.test.waitForCurrentTimeChange):
(addExtraTestMethods.test.done):
(addExtraTestMethods):
(window.string_appeared_here):
* web-platform-tests/media-source/mp4/test-a-128k-44100Hz-1ch-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-a-128k-44100Hz-1ch-manifest.json.
* web-platform-tests/media-source/mp4/test-a-128k-44100Hz-1ch.mp4: Added.
* web-platform-tests/media-source/mp4/test-a-192k-44100Hz-1ch-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-a-192k-44100Hz-1ch-manifest.json.
* web-platform-tests/media-source/mp4/test-a-192k-44100Hz-1ch.mp4: Added.
* web-platform-tests/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-v-128k-320x240-24fps-8kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-320x240-24fps-8kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-v-128k-320x240-24fps-8kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-320x240-24fps-8kfr.mp4.
* web-platform-tests/media-source/mp4/test-v-128k-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-v-128k-320x240-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-320x240-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-v-128k-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-v-128k-640x480-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-128k-640x480-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test-v-256k-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-256k-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/mp4/test-v-256k-320x240-30fps-10kfr.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test-v-256k-320x240-30fps-10kfr.mp4.
* web-platform-tests/media-source/mp4/test.mp4: Renamed from LayoutTests/http/tests/media/media-source/mp4/test.mp4.
* web-platform-tests/media-source/webm/test-a-128k-44100Hz-1ch-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-a-128k-44100Hz-1ch-manifest.json.
* web-platform-tests/media-source/webm/test-a-128k-44100Hz-1ch.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-a-128k-44100Hz-1ch.webm.
* web-platform-tests/media-source/webm/test-a-192k-44100Hz-1ch-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-a-192k-44100Hz-1ch-manifest.json.
* web-platform-tests/media-source/webm/test-a-192k-44100Hz-1ch.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-a-192k-44100Hz-1ch.webm.
* web-platform-tests/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-384k-44100Hz-1ch-640x480-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-448k-44100Hz-1ch-640x480-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-av-640k-44100Hz-1ch-640x480-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-v-128k-320x240-24fps-8kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-320x240-24fps-8kfr-manifest.json.
* web-platform-tests/media-source/webm/test-v-128k-320x240-24fps-8kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-320x240-24fps-8kfr.webm.
* web-platform-tests/media-source/webm/test-v-128k-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-v-128k-320x240-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-320x240-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-v-128k-640x480-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-640x480-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-v-128k-640x480-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-128k-640x480-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-v-256k-320x240-30fps-10kfr-manifest.json: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-256k-320x240-30fps-10kfr-manifest.json.
* web-platform-tests/media-source/webm/test-v-256k-320x240-30fps-10kfr.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-v-256k-320x240-30fps-10kfr.webm.
* web-platform-tests/media-source/webm/test-vp8-vorbis-webvtt.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test-vp8-vorbis-webvtt.webm.
* web-platform-tests/media-source/webm/test.webm: Renamed from LayoutTests/http/tests/media/media-source/webm/test.webm.

LayoutTests:

* http/tests/media/media-source/mediasource-append-buffer.html: Removed.
* http/tests/media/media-source/mediasource-buffered-expected.txt: Removed.
* http/tests/media/media-source/mediasource-closed.html: Removed.
* http/tests/media/media-source/mediasource-config-changes.js:
(resolutionFromFilename): Deleted.
(appendBuffer): Deleted.
(mediaSourceConfigChangeTest): Deleted.
* http/tests/media/media-source/mediasource-util.js:
(EventExpectationsManager): Deleted.
(EventExpectationsManager.prototype.expectEvent): Deleted.
(EventExpectationsManager.prototype.waitForExpectedEvents): Deleted.
(EventExpectationsManager.prototype.expectingEvents): Deleted.
(EventExpectationsManager.prototype.handleWaitCallback_): Deleted.
(EventExpectationsManager.prototype.getExpectations_): Deleted.
(loadData_): Deleted.
(onSourceOpen): Deleted.
(openMediaSource_): Deleted.
(MediaSourceUtil.loadTextData): Deleted.
(MediaSourceUtil.loadBinaryData): Deleted.
(MediaSourceUtil.fetchManifestAndData): Deleted.
(MediaSourceUtil.extractSegmentData): Deleted.
(MediaSourceUtil.getMediaDataForPlaybackTime): Deleted.
(getFirstSupportedType): Deleted.
(getSegmentInfo): Deleted.
(MediaSourceUtil.getSubType): Deleted.
(addExtraTestMethods.test.failOnEvent): Deleted.
(addExtraTestMethods.test.endOnEvent): Deleted.
(addExtraTestMethods.test.expectEvent): Deleted.
(addExtraTestMethods.test.waitForExpectedEvents): Deleted.
(addExtraTestMethods.test.waitForCurrentTimeChange): Deleted.
(addExtraTestMethods.test.done): Deleted.
(addExtraTestMethods): Deleted.
(window.string_appeared_here): Deleted.
* http/tests/media/media-source/mp4/test-a-128k-44100Hz-1ch.mp4: Removed.
* http/tests/media/media-source/mp4/test-a-192k-44100Hz-1ch.mp4: Removed.
* http/tests/media/media-source/webm/segment-info.js: Removed.
* platform/ios-simulator/TestExpectations:
* platform/mac/TestExpectations:
* platform/mac/imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-readyState-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-removed-expected.txt: Added.
* platform/mac/imported/w3c/web-platform-tests/media-source/SourceBuffer-abort-updating-expected.txt: Added.

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

3 years agoUnreviewed. Added myself to the list of committers.
johan_jensen@apple.com [Sat, 10 Sep 2016 00:34:04 +0000 (00:34 +0000)]
Unreviewed. Added myself to the list of committers.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoUnreviewed, rolling out r205771.
commit-queue@webkit.org [Sat, 10 Sep 2016 00:06:06 +0000 (00:06 +0000)]
Unreviewed, rolling out r205771.
https://bugs.webkit.org/show_bug.cgi?id=161823

Broke Windows build (Requested by litherum on #webkit).

Reverted changeset:

"Remove unused member of GlyphBuffer"
https://bugs.webkit.org/show_bug.cgi?id=161814
http://trac.webkit.org/changeset/205771

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

3 years agoURLParser should convert ASCII hosts to lowercase
achristensen@apple.com [Fri, 9 Sep 2016 23:39:11 +0000 (23:39 +0000)]
URLParser should convert ASCII hosts to lowercase
https://bugs.webkit.org/show_bug.cgi?id=161820

Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::domainToASCII):
The fast path for domains that are already ASCII and do not need punycode encoding
should convert the domain to lowercase.
This matches behavior in URL::parse if isCanonicalHostnameLowercaseForScheme is true,
and RFC 5890.

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoUnreviewed, rolling out r205759.
ryanhaddad@apple.com [Fri, 9 Sep 2016 22:44:13 +0000 (22:44 +0000)]
Unreviewed, rolling out r205759.

This change broke all JSC tests

Reverted changeset:

"Add ChakraCore tests to run-javascriptcore-tests"
https://bugs.webkit.org/show_bug.cgi?id=161808
http://trac.webkit.org/changeset/205759

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

3 years agoRevert r205770 because Ricky is already a committer.
ryanhaddad@apple.com [Fri, 9 Sep 2016 22:14:46 +0000 (22:14 +0000)]
Revert r205770 because Ricky is already a committer.

Unreviewed.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoRemove unused member of GlyphBuffer
mmaxfield@apple.com [Fri, 9 Sep 2016 21:54:31 +0000 (21:54 +0000)]
Remove unused member of GlyphBuffer
https://bugs.webkit.org/show_bug.cgi?id=161814

Reviewed by Simon Fraser.

This m_offsets member never actually affected anything. It just made
FontCascade::drawGlyphBuffer() slower.

No new tests because there is no behavior change.

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::drawGlyphBuffer):
* platform/graphics/GlyphBuffer.h:
(WebCore::GlyphBuffer::clear):
(WebCore::GlyphBuffer::advanceAt):
(WebCore::GlyphBuffer::add):
(WebCore::GlyphBuffer::shrink):
(WebCore::GlyphBuffer::swap):
(WebCore::GlyphBuffer::offsetAt): Deleted.
* platform/graphics/win/UniscribeController.cpp:
(WebCore::UniscribeController::shapeAndPlaceItem):

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

3 years agoUnreviewed. Added myself to the list of committers.
rmondello@apple.com [Fri, 9 Sep 2016 21:44:55 +0000 (21:44 +0000)]
Unreviewed. Added myself to the list of committers.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoWASM should support if-then-else
keith_miller@apple.com [Fri, 9 Sep 2016 21:30:51 +0000 (21:30 +0000)]
WASM should support if-then-else
https://bugs.webkit.org/show_bug.cgi?id=161778

Reviewed by Michael Saboff.

This patch makes some major changes to the way that the WASM
function parser works. First, the control stack has been moved
from the parser's context to the parser itself. This simplifies
the way that the parser works and allows us to make the decoder
iterative rather than recursive. Since the control stack has been
moved to the parser, any context operation that refers to some
block now receives that block by reference.

For any if block, regardless of whether or not it is an
if-then-else or not, we will allocate both the entire control flow
diamond. This is not a major issue in the if-then case since B3
will immediately cleanup these blocks. In order to support if-then
and if-then-else we needed to be able to distinguish what the type
of the top block on the control stack is. This will be necessary
when validating the else opcode in the future. In the B3 IR
generator we decide to the type of the block strictly by the
shape.

Currently, if blocks don't handle passed and returned stack values
correctly. I plan to fix this when I add support for the block
signatures. See: https://github.com/WebAssembly/design/pull/765

* testWASM.cpp:
(runWASMTests):
* wasm/WASMB3IRGenerator.cpp:
(dumpProcedure):
(JSC::WASM::parseAndCompile):
* wasm/WASMB3IRGenerator.h:
* wasm/WASMFunctionParser.h:
(JSC::WASM::FunctionParser<Context>::parseBlock):
(JSC::WASM::FunctionParser<Context>::parseExpression):
(JSC::WASM::FunctionParser<Context>::parseUnreachableExpression):
* wasm/WASMOps.h:

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

3 years agoSource/WebCore:
achristensen@apple.com [Fri, 9 Sep 2016 21:29:47 +0000 (21:29 +0000)]
Source/WebCore:
Text replacement candidates don't always overwrite the entire original string
https://bugs.webkit.org/show_bug.cgi?id=161779
<rdar://problem/28033492>

Patch by Tim Horton <timothy_horton@apple.com> on 2016-09-09
Reviewed by Simon Fraser.

New test: editing/mac/spelling/accept-candidate-replacing-multiple-words.html.

* editing/Editor.cpp:
(WebCore::Editor::contextRangeForCandidateRequest):
Factor contextRangeForCandidateRequest out of the WebKits, into Editor.
This just expands to paragraph boundaries from the cursor.

(WebCore::Editor::selectTextCheckingResult):
Add selectTextCheckingResult, which, given a TextCheckingResult,
selects the range represented by the result's location and length, which
indicate the portion of the context string that the result refers to.
In the case of accepting a candidate, we want to select that range
so that our insertion will overwrite it.

(WebCore::Editor::handleAcceptedCandidate):
Make use of selectTextCheckingResult instead of just assuming that we want
to replace the word to the left of the insertion point.

(WebCore::Editor::stringForCandidateRequest): Deleted.
* editing/Editor.h:

* testing/Internals.cpp:
(WebCore::Internals::handleAcceptedCandidate):
* testing/Internals.h:
* testing/Internals.idl:
Internals' handleAcceptedCandidate assumed (wrongly) that the length
of a TextCheckerResult was the length of the candidate, when really it is
the length of the text that the candidate would replace. Adjust this,
and expose the replacement range to JavaScript, so we can test this.

Tools:
URLParser: Fix and optimize parsing file URLs ending with a host but no slash
https://bugs.webkit.org/show_bug.cgi?id=161815

Reviewed by Geoffrey Garen.

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agojsc.cpp should call initializeMainThread() to make sure that GC thread assertions...
fpizlo@apple.com [Fri, 9 Sep 2016 21:20:02 +0000 (21:20 +0000)]
jsc.cpp should call initializeMainThread() to make sure that GC thread assertions work
https://bugs.webkit.org/show_bug.cgi?id=161801

Reviewed by Keith Miller.

The GC has debug assertions that certain things don't happen on GC threads. Those assertions
are no-ops unless initializeGCThreads() is called, and I think the most canonical way to do
that is to call initializeMainThread().

* jsc.cpp:
(jscmain):

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

3 years agoExpose Apple Pencil data to Touch events
dino@apple.com [Fri, 9 Sep 2016 20:57:50 +0000 (20:57 +0000)]
Expose Apple Pencil data to Touch events
https://bugs.webkit.org/show_bug.cgi?id=161783
<rdar://problem/28218898>

Reviewed by Beth Dakin.

Source/WebKit2:

* Platform/spi/ios/UIKitSPI.h: Expose the new SPI. Since this is only used
on public builds, guard it against everything that is <= iOS 10.0.
* Shared/WebEvent.h: New properties.
(WebKit::WebPlatformTouchPoint::setAltitudeAngle):
(WebKit::WebPlatformTouchPoint::altitudeAngle):
(WebKit::WebPlatformTouchPoint::setAzimuthAngle):
(WebKit::WebPlatformTouchPoint::azimuthAngle):
(WebKit::WebPlatformTouchPoint::setTouchType):
(WebKit::WebPlatformTouchPoint::touchType):
(WebKit::WebPlatformTouchPoint::force): Deleted.
* Shared/WebEventConversion.cpp:
(WebKit::webPlatformTouchTypeToPlatform):
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint): More
parameters sent to parent constructor.
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::convertTouchType):
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
* Shared/ios/WebPlatformTouchPointIOS.cpp:
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):

Tools:

The values that IOHID expects are different from their
documentation, and from what UITouch interprets. Tweak
incoming data so it will produce the output we expect.

* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator stylusDownAtPoint:azimuthAngle:altitudeAngle:pressure:]):
(-[HIDEventGenerator stylusMoveToPoint:azimuthAngle:altitudeAngle:pressure:]):

LayoutTests:

Four new tests that check data coming out of an Apple Pencil.

* fast/events/touch/ios/pencil-data-change-does-not-give-touchmove-expected.txt: Added.
* fast/events/touch/ios/pencil-data-change-does-not-give-touchmove.html: Added.
* fast/events/touch/ios/pencil-data-change-gives-touchforcechange-expected.txt: Added.
* fast/events/touch/ios/pencil-data-change-gives-touchforcechange.html: Added.
* fast/events/touch/ios/pencil-move-provides-stylus-data-expected.txt: Added.
* fast/events/touch/ios/pencil-move-provides-stylus-data.html: Added.
* fast/events/touch/ios/pencil-touch-registered-as-pencil-expected.txt: Added.
* fast/events/touch/ios/pencil-touch-registered-as-pencil.html: Added.

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

3 years agoText replacement candidates don't always overwrite the entire original string
timothy_horton@apple.com [Fri, 9 Sep 2016 20:46:23 +0000 (20:46 +0000)]
Text replacement candidates don't always overwrite the entire original string
https://bugs.webkit.org/show_bug.cgi?id=161779
<rdar://problem/28033492>

Reviewed by Simon Fraser.

Source/WebCore:

New test: editing/mac/spelling/accept-candidate-replacing-multiple-words.html.

* editing/Editor.cpp:
(WebCore::Editor::contextRangeForCandidateRequest):
Factor contextRangeForCandidateRequest out of the WebKits, into Editor.
This just expands to paragraph boundaries from the cursor.

(WebCore::Editor::selectTextCheckingResult):
Add selectTextCheckingResult, which, given a TextCheckingResult,
selects the range represented by the result's location and length, which
indicate the portion of the context string that the result refers to.
In the case of accepting a candidate, we want to select that range
so that our insertion will overwrite it.

(WebCore::Editor::handleAcceptedCandidate):
Make use of selectTextCheckingResult instead of just assuming that we want
to replace the word to the left of the insertion point.

(WebCore::Editor::stringForCandidateRequest): Deleted.
* editing/Editor.h:

* testing/Internals.cpp:
(WebCore::Internals::handleAcceptedCandidate):
* testing/Internals.h:
* testing/Internals.idl:
Internals' handleAcceptedCandidate assumed (wrongly) that the length
of a TextCheckerResult was the length of the candidate, when really it is
the length of the text that the candidate would replace. Adjust this,
and expose the replacement range to JavaScript, so we can test this.

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::requestCandidatesForSelection):
Make use of the shared implementation of contextRangeForCandidateRequest.

Source/WebKit2:

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformEditorState):
Make use of the shared implementation of contextRangeForCandidateRequest.

LayoutTests:

* editing/mac/spelling/accept-candidate-without-crossing-editing-boundary.html:
* editing/mac/spelling/accept-misspelled-candidate.html:
Adjust tests to send the correct replacement range.

* editing/mac/spelling/accept-candidate-replacing-multiple-words.html:
Add a test that ensures that we will replace the entire string for a
candidate that replaces multiple words.

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

3 years agoUnreviewed. Added myself to the list of committers.
jfbastien@apple.com [Fri, 9 Sep 2016 20:27:34 +0000 (20:27 +0000)]
Unreviewed. Added myself to the list of committers.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoRebaseline js/dom/global-constructors-attributes.html for mac-wk1 after r205755.
ryanhaddad@apple.com [Fri, 9 Sep 2016 19:57:48 +0000 (19:57 +0000)]
Rebaseline js/dom/global-constructors-attributes.html for mac-wk1  after r205755.

Unreviewed test gardening.

* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:

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

3 years agoAdd ChakraCore tests to run-javascriptcore-tests
msaboff@apple.com [Fri, 9 Sep 2016 19:15:45 +0000 (19:15 +0000)]
Add ChakraCore tests to run-javascriptcore-tests
https://bugs.webkit.org/show_bug.cgi?id=161808

Reviewed by Saam Barati.

Added ChakraCore tests to the default list of tests to run.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests):

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

3 years agoMarking tiled-drawing/scrolling/fixed/four-bars-zoomed.html as flaky on mac-wk2 debug.
ryanhaddad@apple.com [Fri, 9 Sep 2016 19:02:24 +0000 (19:02 +0000)]
Marking tiled-drawing/scrolling/fixed/four-bars-zoomed.html as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=161547

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoDisable three flakey Chakra Tests
msaboff@apple.com [Fri, 9 Sep 2016 18:49:26 +0000 (18:49 +0000)]
Disable three flakey Chakra Tests
https://bugs.webkit.org/show_bug.cgi?id=161807

Reviewed by Saam Barati.

* ChakraCore.yaml: Disabled the flakey tests
ChakraCore/test/Array/protoLookup_native.js
ChakraCore/test/LetConst/delete.js
ChakraCore/test/fieldopts/fieldhoist_sideeffect.js

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

3 years agoSoft-link GameController.framework.
beidson@apple.com [Fri, 9 Sep 2016 18:44:14 +0000 (18:44 +0000)]
Soft-link GameController.framework.
<rdar://problem/28219953> and https://bugs.webkit.org/show_bug.cgi?id=161802

Reviewed by Brian Burg.

No new tests (No change in behavior).

* Configurations/WebCore.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
(WebCore::GameControllerGamepadProvider::startMonitoringGamepads):

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

3 years agoRename Key to CryptoKey
jiewen_tan@apple.com [Fri, 9 Sep 2016 18:38:47 +0000 (18:38 +0000)]
Rename Key to CryptoKey
https://bugs.webkit.org/show_bug.cgi?id=161665
<rdar://problem/28083391>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

* WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

A link to the spec: https://www.w3.org/TR/WebCryptoAPI/#cryptokey-interface

* crypto/CryptoKey.idl:
Remove some unnecessary IDL attributes and reorder KeyType enum to match the spec.
* crypto/CryptoKeyType.h:

LayoutTests:

* crypto/subtle/aes-cbc-unwrap-rsa-expected.txt:
* crypto/subtle/aes-cbc-unwrap-rsa.html:
* crypto/subtle/aes-kw-key-manipulation-expected.txt:
* crypto/subtle/aes-kw-key-manipulation.html:
* crypto/subtle/aes-kw-wrap-unwrap-aes-expected.txt:
* crypto/subtle/aes-kw-wrap-unwrap-aes.html:
* crypto/subtle/rsa-oaep-wrap-unwrap-aes-expected.txt:
* crypto/subtle/rsa-oaep-wrap-unwrap-aes.html:
* crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes-expected.txt:
* crypto/subtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html:
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-expected.txt:
* crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:

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

3 years agoWeb Inspector: Command-Z doesn't work when editing CSS selectors in Styles sidebar
commit-queue@webkit.org [Fri, 9 Sep 2016 18:25:14 +0000 (18:25 +0000)]
Web Inspector: Command-Z doesn't work when editing CSS selectors in Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=159734

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-09-09
Reviewed by Brian Burg.

Replace the current usage of -webkit-user-select with a textarea sized exactly the same as
the selector text which holds the current value of the selector.

* UserInterface/Test.html: Add WrappedPromise.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedMatchedStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedInlineStyles):
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
(WebInspector.DOMNodeStyles.prototype.refresh):
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector.ruleSelectorChanged):
(WebInspector.DOMNodeStyles.prototype.changeRuleSelector):
Ensure that the promise returned by changeRuleSelector is only resolved once the initiated
refresh has completed, ensuring that all matched selectors are parsed and available.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section > .header):
(.style-declaration-section.locked > .header::before):
(.style-declaration-section.rule-disabled > .header > .icon):
(.style-declaration-section > .header > textarea):
(.style-declaration-section > .header > textarea:focus):
(.style-declaration-section > .header > textarea:focus + .selector):
(.style-declaration-section > .header > .selector):
(.style-declaration-section > .header > .selector:empty):
(.style-declaration-section > .header > .selector .matched):
(.style-declaration-section:not(.invalid-selector).rule-disabled > .header > .icon): Deleted.
(.style-declaration-section > .header > .selector:empty::before): Deleted.
(.style-declaration-section > .header > .selector:focus): Deleted.
(.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector): Deleted.
(.style-declaration-section > .header > .selector > .matched): Deleted.
(.style-declaration-section.invalid-selector > .header > .icon): Deleted.
(.style-declaration-section.invalid-selector > .header > .selector): Deleted.
Added styling to make textarea invisible when not focused.
Also removed the .invalid-selector styles as the section now refreshed on all changes.

* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelector):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh.appendSelectorTextKnownToMatch):
(WebInspector.CSSStyleDeclarationSection.prototype.refresh):
(WebInspector.CSSStyleDeclarationSection.prototype.focusRuleSelector):
(WebInspector.CSSStyleDeclarationSection.prototype.get selectorEditable):
(WebInspector.CSSStyleDeclarationSection.prototype.get _currentSelectorText):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste.parseTextForRule):
(WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
(WebInspector.CSSStyleDeclarationSection.prototype.get selectorLocked): Deleted.
Added a hidden textarea for modifying the selector of the represented style.

* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorPreviousRule):
Now use new getters on CSSSTyleDeclarationSection for determining if a selector is editable.

* UserInterface/Views/Variables.css:
(:root):
Added --style-declaration-section-header-padding CSS variable.

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

3 years agoMake hasOwnProperty ALWAYS_INLINE
sbarati@apple.com [Fri, 9 Sep 2016 18:04:19 +0000 (18:04 +0000)]
Make hasOwnProperty ALWAYS_INLINE
https://bugs.webkit.org/show_bug.cgi?id=161775

Reviewed by Ryosuke Niwa.

Speedometer spends around 2.5% of its time in hasOwnProperty.
Let's reduce the overhead of calling that function by marking
it as inline. Also, it's likely that the function will call into
JSObject::getOwnPropertySlot. I added a check to see if that's
the function we're calling, if it is, we do a direct call instead
of an indirect call.

* runtime/JSObject.cpp:
(JSC::JSObject::hasOwnProperty): Deleted.
* runtime/JSObjectInlines.h:
(JSC::JSObject::hasOwnProperty):

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

3 years agoURLParser: Handle \ in path according to spec
achristensen@apple.com [Fri, 9 Sep 2016 17:56:10 +0000 (17:56 +0000)]
URLParser: Handle \ in path according to spec
https://bugs.webkit.org/show_bug.cgi?id=161805

Reviewed by Andy Estes.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoPerf test Animation/css-accelerated-animation.html failing
simon.fraser@apple.com [Fri, 9 Sep 2016 17:46:54 +0000 (17:46 +0000)]
Perf test Animation/css-accelerated-animation.html failing
https://bugs.webkit.org/show_bug.cgi?id=161795

Skip Animation/css-accelerated-animation.html since this only works as a MobileSafari
perf test.

* Skipped:

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

3 years agoTextTrackLoader should use FetchOptions::mode according its crossOrigin attribute
commit-queue@webkit.org [Fri, 9 Sep 2016 17:24:58 +0000 (17:24 +0000)]
TextTrackLoader should use FetchOptions::mode according its crossOrigin attribute
https://bugs.webkit.org/show_bug.cgi?id=161792

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-09
Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/removeCue-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt:

Source/WebCore:

Covered by existing and updated tests.

Updating text track loader to use fetch mode according crossOrigin value.

Removed the check done in the case the crossOrigin value is not set.
Previously cross-origin loads were forbidden, now this is authorized.
This change allows aligning with the spec.
Also, this check could be bypassed in the case of a same-origin URL redirecting to a cross-origin one.

* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::notifyFinished): Checking resource error in lieu of doing CORS checks on its own.
(WebCore::TextTrackLoader::load): Using CachedResourceRequest::setAsPotentiallyCrossOrigin
* loader/TextTrackLoader.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::loadFrom): Setting loading and status values as would be done when load is finished.
(WebCore::CachedResource::setBodyDataFrom): Default implementation is to copy the shared buffer.
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): Enabling resource update when mode or origin is different for TextTrack resources.

LayoutTests:

* http/tests/security/text-track-crossorigin-expected.txt:
* http/tests/security/text-track-crossorigin.html: Updating test to be more robust against timeout.
Updated test to succeed doing no-cors loading of cross-origin resources.

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

3 years agoURLParser should parse URLs with non-special schemes
achristensen@apple.com [Fri, 9 Sep 2016 17:06:24 +0000 (17:06 +0000)]
URLParser should parse URLs with non-special schemes
https://bugs.webkit.org/show_bug.cgi?id=161786

Reviewed by Andy Estes.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):
There's no reason for a SchemeEndCheckForSlashes state now that we can copy iterators.
It's not in the spec and not needed.
Also, move things around a little so parsing special or non-special schemes
followed by one or two slashes works correctly.

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoMarking imported/w3c/web-platform-tests/IndexedDB/keyorder.htm as flaky on mac-wk2...
ryanhaddad@apple.com [Fri, 9 Sep 2016 16:57:50 +0000 (16:57 +0000)]
Marking imported/w3c/web-platform-tests/IndexedDB/keyorder.htm as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=161742

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMarking inspector/debugger/breakpoint-columns.html as flaky on mac-wk2.
ryanhaddad@apple.com [Fri, 9 Sep 2016 16:51:23 +0000 (16:51 +0000)]
Marking inspector/debugger/breakpoint-columns.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=161774

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoHashMapImpl needs to m_buffer.clear() in its constructor
fpizlo@apple.com [Fri, 9 Sep 2016 16:50:10 +0000 (16:50 +0000)]
HashMapImpl needs to m_buffer.clear() in its constructor
https://bugs.webkit.org/show_bug.cgi?id=161796

Reviewed by Keith Miller.

This is the second time that I'm fixing a bug because AuxiliaryBarrier does not initialize
itself. That seemed like a good idea because maybe sometimes the user knows better how to
initialize it. But, it's not worth it if it's a constant source of bugs.

So, I'm fixing it for good by making AuxiliaryBarrier::AuxiliaryBarrier() initialize its
m_value.

* runtime/AuxiliaryBarrier.h:
(JSC::AuxiliaryBarrier::AuxiliaryBarrier):
* runtime/DirectArguments.cpp:
(JSC::DirectArguments::DirectArguments):

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

3 years agoMarking fast/text/emoji-num-glyphs.html as a flaky timeout.
ryanhaddad@apple.com [Fri, 9 Sep 2016 16:29:02 +0000 (16:29 +0000)]
Marking fast/text/emoji-num-glyphs.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=161799

Unreviewed test gardening.

* TestExpectations:

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

3 years agoRegression(r186020): Null dereference in getStartDate()
cdumez@apple.com [Fri, 9 Sep 2016 16:17:19 +0000 (16:17 +0000)]
Regression(r186020): Null dereference in getStartDate()
https://bugs.webkit.org/show_bug.cgi?id=161733

Reviewed by Eric Carlson.

Source/WebCore:

Update HTMLMediaElement::getStartDate() to return NaN if m_player is null,
instead of crashing.

Test: fast/media/getStartDate-NaN.html

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::toJS):
Add a FIXME comment as this code is using jsDateOrNull() but should
probably be using jsDate() as per:
- http://w3c.github.io/IndexedDB/#request-convert-a-key-to-a-value

* bindings/js/JSDOMBinding.cpp:
(WebCore::jsDate):
(WebCore::jsDateOrNull):
* bindings/js/JSDOMBinding.h:
- Rename jsDateOrNaN() to jsDate() as this is the default behavior. Also,
  return new Date(NaN) instead of NaN if the implementation returns NaN.
  The IDL says we should return a Date, not a number.
- Update jsDateOrNull() to only return jsNull() if the native value is
  NaN, instead of doing so for every value that is not finite. Our
  convention is to use NaN as special value to represent null in JS.

* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue):
When converting a native value (double) into a Date, rely on the fact
that the type is nullable when deciding if we should call jsDate() or
jsDateOrNull() to convert. This way, we no longe need a WebKit specific
[TreatReturnedDateAs=Null|NaN] IDL extended attribute.

* bindings/scripts/IDLAttributes.txt:
* html/HTMLInputElement.idl:
Mark valueAsDate attribute as nullable, as per the specification:
- https://html.spec.whatwg.org/#htmlinputelement

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getStartDate):
Return NaN if m_player is null instead of crashing. The reason I decided
to return NaN is because the specification [1] says to return a new Date
object representing the current timeline offset. The spec of timeline
offset [2] says that the initial timeline offset value is NaN.
[1] https://html.spec.whatwg.org/#dom-media-getstartdate
[2] https://html.spec.whatwg.org/#timeline-offset

* bindings/scripts/IDLAttributes.txt:
* html/HTMLMediaElement.idl:
Drop [TreatReturnedDateAs] attribute as it is no longer supported.

LayoutTests:

Add layout test coverage.

* fast/media/getStartDate-NaN-expected.txt: Added.
* fast/media/getStartDate-NaN.html: Added.

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

3 years agoSync web-platform-tests up to revision 6d9c836
commit-queue@webkit.org [Fri, 9 Sep 2016 15:42:13 +0000 (15:42 +0000)]
Sync web-platform-tests up to revision 6d9c836
https://bugs.webkit.org/show_bug.cgi?id=161738

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

LayoutTests/imported/w3c:

* resources/ImportExpectations:
* resources/TestRepositories:
* resources/resource-files.json:
* resources/web-platform-tests-modules.json:
* web-platform-tests/2dcontext/transformations/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/template/additions-to-the-in-table-insertion-mode/w3c-import.log.
* web-platform-tests/IndexedDB/idbindex-multientry-big-expected.txt:
* web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/w3c-import.log: Added.
* web-platform-tests/WebIDL/ecmascript-binding/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/w3c-import.log.
* web-platform-tests/WebIDL/readme.txt: Added.
* web-platform-tests/WebIDL/testable_assertions.txt: Added.
* web-platform-tests/WebIDL/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/template/appending-to-a-template/w3c-import.log.
* web-platform-tests/XMLHttpRequest/responsexml-document-properties-expected.txt:
* web-platform-tests/XMLHttpRequest/send-entity-body-document-expected.txt:
* web-platform-tests/XMLHttpRequest/send-non-same-origin.sub-expected.txt:
* web-platform-tests/XMLHttpRequest/send-non-same-origin.sub.htm:
* web-platform-tests/XMLHttpRequest/w3c-import.log:
* web-platform-tests/common/canvas-tests.js:
(addCrossOriginYellowImage):
* web-platform-tests/common/get-host-info.sub.js:
(get_host_info):
* web-platform-tests/config.json: Added.
* web-platform-tests/dom/historical-expected.txt:
* web-platform-tests/dom/historical.html:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/interfaces.html:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
* web-platform-tests/dom/nodes/DOMImplementation-hasFeature-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-hasFeature.html:
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/w3c-import.log:
* web-platform-tests/dom/nodes/Document-createElementNS-expected.txt:
* web-platform-tests/dom/nodes/Document-createElementNS.html:
* web-platform-tests/dom/nodes/Document-createElementNS.js:
* web-platform-tests/domparsing/w3c-import.log:
* web-platform-tests/fetch/api/basic/mode-same-origin.html:
* web-platform-tests/fetch/api/basic/mode-same-origin.js:
* web-platform-tests/fetch/api/basic/referrer.html:
* web-platform-tests/fetch/api/basic/referrer.js:
(runTest):
* web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt:
* web-platform-tests/fetch/api/basic/request-headers.js:
(requestHeaders):
* web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-blob-worker.html:
* web-platform-tests/fetch/api/basic/scheme-blob.html:
* web-platform-tests/fetch/api/basic/scheme-blob.js:
(invalidRequestMethods.forEach):
* web-platform-tests/fetch/api/basic/w3c-import.log:
* web-platform-tests/fetch/api/cors/cors-basic.html:
* web-platform-tests/fetch/api/cors/cors-basic.js:
* web-platform-tests/fetch/api/cors/cors-cookies.html:
* web-platform-tests/fetch/api/cors/cors-cookies.js:
* web-platform-tests/fetch/api/cors/cors-no-preflight.html:
* web-platform-tests/fetch/api/cors/cors-no-preflight.js:
* web-platform-tests/fetch/api/cors/cors-origin.html:
* web-platform-tests/fetch/api/cors/cors-origin.js:
* web-platform-tests/fetch/api/cors/cors-preflight-redirect.html:
* web-platform-tests/fetch/api/cors/cors-preflight-redirect.js:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer.html:
* web-platform-tests/fetch/api/cors/cors-preflight-referrer.js:
* web-platform-tests/fetch/api/cors/cors-preflight-status.html:
* web-platform-tests/fetch/api/cors/cors-preflight-status.js:
* web-platform-tests/fetch/api/cors/cors-preflight.html:
* web-platform-tests/fetch/api/cors/cors-preflight.js:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials.html:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials.js:
* web-platform-tests/fetch/api/cors/cors-redirect-preflight.html:
* web-platform-tests/fetch/api/cors/cors-redirect-preflight.js:
* web-platform-tests/fetch/api/cors/cors-redirect.html:
* web-platform-tests/fetch/api/cors/cors-redirect.js:
* web-platform-tests/fetch/api/cors/w3c-import.log:
* web-platform-tests/fetch/api/headers/headers-combine-expected.txt:
* web-platform-tests/fetch/api/headers/headers-combine.html:
* web-platform-tests/fetch/api/redirect/redirect-mode.html:
* web-platform-tests/fetch/api/redirect/redirect-mode.js:
* web-platform-tests/fetch/api/redirect/redirect-origin.html:
* web-platform-tests/fetch/api/redirect/redirect-origin.js:
* web-platform-tests/fetch/api/redirect/w3c-import.log:
* web-platform-tests/fetch/api/request/request-cache-expected.txt:
* web-platform-tests/fetch/api/request/request-cache.html:
* web-platform-tests/fetch/api/request/request-disturbed.html:
* web-platform-tests/fetch/api/resources/get-host-info.sub.js: Removed.
* web-platform-tests/fetch/api/resources/w3c-import.log:
* web-platform-tests/fetch/api/response/response-init-001.html:
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/w3c-import.log:
* web-platform-tests/html/browsers/history/the-history-interface/w3c-import.log:
* web-platform-tests/html/browsers/history/the-location-interface/w3c-import.log:
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window-expected.txt: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html: Added.
* web-platform-tests/html/browsers/origin/cross-origin-objects/frame.html:
* web-platform-tests/html/browsers/origin/cross-origin-objects/w3c-import.log:
* web-platform-tests/html/browsers/origin/cross-origin-objects/win-documentdomain.sub.html:
* web-platform-tests/html/browsers/the-window-object/security-window/window-security.sub.html:
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.sub-expected.txt:
* web-platform-tests/html/browsers/windows/w3c-import.log:
* web-platform-tests/html/dom/dynamic-markup-insertion/opening-the-input-stream/010-expected.txt:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-EN-ref-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-N-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-bdi-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-bdi-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-script-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-script-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-style-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-style-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-textarea-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-contained-textarea-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-EN-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-N-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-L-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-N-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-input-script-R-expected.html:
* web-platform-tests/html/dom/elements/global-attributes/dir_auto-isolate-expected.html:
* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces.html:
* web-platform-tests/html/semantics/document-metadata/the-link-element/document-without-browsing-context-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/refresh.sub.html: Removed.
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/w3c-import.log: Added.
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/template/additions-to-the-in-table-insertion-mode/w3c-import.log.
* web-platform-tests/html/semantics/embedded-content/the-area-element/area-shape-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-area-element/area-shape.html:
* web-platform-tests/html/semantics/embedded-content/the-audio-element/audio_constructor-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-audio-element/audio_constructor.html:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.canvas.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.image-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.drawImage.image.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.fillStyle.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.strokeStyle.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.canvas.timing.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.create-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.create.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.create.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.create.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.cross-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.cross.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.fillStyle.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.pattern.image.strokeStyle.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.sub-expected.txt.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.sub.html.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-img-element/environment-changes/viewport-change-expected.txt:
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-li-element/w3c-import.log:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-expected.txt:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-rev-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-start-reftest-002-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-002-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-type-reftest-003-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/w3c-import.log:
* web-platform-tests/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-expected.html:
* web-platform-tests/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-ref-expected.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-pre-element/grouping-pre-reftest-001-ref.html: Removed.
* web-platform-tests/html/semantics/grouping-content/the-pre-element/w3c-import.log:
* web-platform-tests/html/semantics/links/linktypes/alternate-css-expected.html:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tFoot.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-foster-parenting/template-is-a-foster-parent-element.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-foster-parenting/template-is-not-a-foster-parent-element.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-foster-parenting/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/generating-of-implied-end-tags.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-body-token.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-frameset-token.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-head-token.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/ignore-html-token.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-body.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/start-tag-html.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/template-end-tag-without-start-one.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-body-insertion-mode/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/end-tag-frameset.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-frameset-insertion-mode/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-head-insertion-mode/generating-of-implied-end-tags.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-head-insertion-mode/template-end-tag-without-start-one.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-head-insertion-mode/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-table-insertion-mode/end-tag-table.html:
* web-platform-tests/html/syntax/parsing/template/additions-to-the-in-table-insertion-mode/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/appending-to-a-template/template-child-nodes.html:
* web-platform-tests/html/syntax/parsing/template/appending-to-a-template/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-body-context.html:
* web-platform-tests/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-context.html:
* web-platform-tests/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/clearing-stack-back-to-a-table-row-context.html:
* web-platform-tests/html/syntax/parsing/template/clearing-the-stack-back-to-a-given-context/w3c-import.log:
* web-platform-tests/html/syntax/parsing/template/creating-an-element-for-the-token/template-owner-document.html:
* web-platform-tests/html/syntax/parsing/template/creating-an-element-for-the-token/w3c-import.log:
* web-platform-tests/lint.whitelist:
* web-platform-tests/resource-timing/SyntheticResponse.py:
(main):
* web-platform-tests/resource-timing/resource-timing-expected.txt:
* web-platform-tests/resource-timing/resource-timing.html:
* web-platform-tests/resource-timing/resource-timing.js:
(logResourceEntry): Deleted.
(window.onload): Deleted.
* web-platform-tests/resource-timing/resources/resource_timing_test0.xml:
* web-platform-tests/resource-timing/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/w3c-import.log.
* web-platform-tests/resource-timing/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/cross-origin-objects/w3c-import.log.
* web-platform-tests/url/interfaces-expected.txt:

LayoutTests:

* platform/wk2/TestExpectations:
* platform/wk2/imported/w3c/web-platform-tests/html/semantics/document-metadata/styling/LinkStyle-expected.txt:

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

3 years agoGardening: fixing a few JSC test failures.
mark.lam@apple.com [Fri, 9 Sep 2016 12:54:12 +0000 (12:54 +0000)]
Gardening: fixing a few JSC test failures.
https://bugs.webkit.org/show_bug.cgi?id=161760

Not reviewed.

Without this fix, the following tests will crash on a null dereference of isGCThread.
    stress/slow-path-generator-updating-current-node-dfg.js.misc-ftl-no-cjit
    stress/unshift-array-storage.js.misc-ftl-no-cjit

* wtf/MainThread.cpp:
(WTF::mayBeGCThread):

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

3 years agoASSERTION FAILED: promise.inherits(JSPromise::info())
commit-queue@webkit.org [Fri, 9 Sep 2016 09:47:55 +0000 (09:47 +0000)]
ASSERTION FAILED: promise.inherits(JSPromise::info())
https://bugs.webkit.org/show_bug.cgi?id=161632
<rdar://problem/28184743>

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-09
Reviewed by Mark Lam.

Source/JavaScriptCore:

* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::create): Returning null if promise object is not created.

Source/WebCore:

Test: fetch/fetch-worker-crash.html

* bindings/js/JSDOMPromise.h:
(WebCore::callPromiseFunction): Returning early if created promise is null.
Passing directly a DeferredWrapper to the generated code.
* bindings/scripts/CodeGeneratorJS.pm: Updated to take a DeferredWrapper.
(GenerateImplementation):
(GenerateReturnParameters):
* bindings/scripts/test/JS/JSTestObj.cpp: Rebasing expectations.
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionPromise):
(WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithExceptionPromise):

LayoutTests:

* TestExpectations: Reenabling skipped tests.
* fetch/fetch-worker-crash-expected.txt: Added.
* fetch/fetch-worker-crash.html: Added.
* fetch/fetch-worker-crash.js: Added.

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

3 years ago[Cocoa] Improve performance of glyph advance metrics gathering
mmaxfield@apple.com [Fri, 9 Sep 2016 08:33:44 +0000 (08:33 +0000)]
[Cocoa] Improve performance of glyph advance metrics gathering
https://bugs.webkit.org/show_bug.cgi?id=161119

Reviewed by Simon Fraser.

Most of the glyphs in a GlyphPage are never read from. Therefore, we can get a performance boost
by not populating as many items in the GlyphPage. Because of the performance characteristics of
CTFontGetGlyphsForCharacters(), a better size for a GlyphPage is 16 items. This, coupled with
using CTFontGetUnsummedAdvancesForGlyphsAndStyle(), causes between a 0.01%-0.5% speedup on PLT.

No new tests because there is no behavior change.

* platform/graphics/Font.cpp:
(WebCore::Font::initCharWidths):
(WebCore::Font::platformGlyphInit):
(WebCore::createAndFillGlyphPage):
* platform/graphics/Font.h:
(WebCore::Font::widthForGlyph):
* platform/graphics/GlyphMetricsMap.h:
* platform/graphics/GlyphPage.h:
* platform/graphics/cocoa/FontCocoa.mm:
* platform/spi/cocoa/CoreTextSPI.h:
(WebCore::Font::platformWidthForGlyph):
(WebCore::canUseFastGlyphAdvanceGetter): Deleted.

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

3 years agov3: WebContent crash due to RELEASE_ASSERT in WebCore: WebCore::StyleResolver::styleF...
antti@apple.com [Fri, 9 Sep 2016 07:42:56 +0000 (07:42 +0000)]
v3: WebContent crash due to RELEASE_ASSERT in WebCore: WebCore::StyleResolver::styleForElement
https://bugs.webkit.org/show_bug.cgi?id=161689

Reviewed by Andreas Kling.

These crashes happen because synchronously triggered resource loads generate callbacks that may end up
deleting the resource loader.

Stop triggering resource loads from StyleResolver. Instead trigger them when applying style to render tree.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::~StyleResolver):

    Replace the RELEASE_ASSERT against deletion during resource loads by a general isDeleted assert.

(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::loadPendingResources): Deleted.
* css/StyleResolver.h:
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::resolveKeyframeStyles):

    Ensure resource load for all animation frames.

* page/animation/KeyframeAnimation.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
(WebCore::RenderElement::initializeStyle):

    Load resources when renderer initializes a style.

(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::getUncachedPseudoStyle):

    Load resources for pseudo styles.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::RenderImage):
(WebCore::RenderImage::styleWillChange):

    Shuffle image resource initialization out from constructor so initializeStyle gets called before.

* rendering/RenderImage.h:
* rendering/style/StyleCachedImage.cpp:
(WebCore::StyleCachedImage::StyleCachedImage):

    Track pending status with a bit instead of implicitly by the existence of CachedResource.
    This is useful for asserts.

(WebCore::StyleCachedImage::load):
(WebCore::StyleCachedImage::isPending):
(WebCore::StyleCachedImage::addClient):
(WebCore::StyleCachedImage::removeClient):
(WebCore::StyleCachedImage::image):
* rendering/style/StyleCachedImage.h:

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

3 years agoUnreviewed. Fix GTK+ build after r205689.
carlosgc@webkit.org [Fri, 9 Sep 2016 06:26:14 +0000 (06:26 +0000)]
Unreviewed. Fix GTK+ build after r205689.

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLOListElement.cpp:
(webkit_dom_html_o_list_element_set_start):

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

3 years agoScriptRunner should be driven by PendingScript rather than ScriptElement
utatane.tea@gmail.com [Fri, 9 Sep 2016 05:20:17 +0000 (05:20 +0000)]
ScriptRunner should be driven by PendingScript rather than ScriptElement
https://bugs.webkit.org/show_bug.cgi?id=161726

Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: js/dom/document-write-in-error-event.html
       js/dom/document-write-in-load-event.html

ScriptRunner is driven by ScriptElement::notifyFinished. While ScriptRunner is driven by this,
HTMLScriptRunner does not use it. Instead, HTMLScriptRunner uses PendingScriptClient. As a result,
ScriptElement::notifyFinished is used only when the script is annotated with "defer" or "async"
while all the external script will load the LoadableScript. It is confusing.
This patch removes ScriptElement::notifyFinished and use PendingScript's observability
in ScriptRunner instead.

This patch also fixes the behavior about ignore-destructive-writes counter[1]. When dispatching
the load and error events, this ignore-destructive-writes counter should not be incremeneted by
this execution. The added tests ensure this behavior.

[1]: https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block

* dom/ScriptElement.cpp: Drop LoadableScriptClient interface.
(WebCore::ScriptElement::prepareScript): Do not use addClient. ScriptRunner use PendingScript::{setClient,clearClient} instead.
(WebCore::ScriptElement::executeScriptForScriptRunner): IgnoreDestructiveWriteCountIncrementer will be done in ScriptElement::executeScript.
So no need to do it here, that's duplicated.
(WebCore::ScriptElement::~ScriptElement): Deleted. ScriptElement does not use addClient/removeClient.
(WebCore::ScriptElement::stopLoadRequest): Deleted.
(WebCore::ScriptElement::executeScriptForHTMLScriptRunner): Deleted. executeScriptForHTMLScriptRunner and executeScriptForScriptRunner are
merged into executeScriptForRunner.
(WebCore::ScriptElement::notifyFinished): Deleted.
* dom/ScriptElement.h:
(WebCore::ScriptElement::~ScriptElement):
(WebCore::ScriptElement::willExecuteInOrder): Used in ScriptRunner to determine whether the script is async or defer.
(WebCore::ScriptElement::willExecuteWhenDocumentFinishedParsing): Deleted.
* dom/ScriptRunner.cpp:
(WebCore::ScriptRunner::~ScriptRunner): HashSet's iterator will return `const PendingScript&`.
Another option is using HashSet<RefPtr<PendingScript>>. Here, we use a little bit weired const_cast.
(WebCore::ScriptRunner::queueScriptForExecution): Use PendingScript::setClient to wait loading.
(WebCore::ScriptRunner::notifyFinished): Notify the script ready here.
(WebCore::ScriptRunner::timerFired): Use executeScriptForScriptRunner.
(WebCore::ScriptRunner::notifyScriptReady): Deleted.
* dom/ScriptRunner.h:
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): Use executeScriptForScriptRunner.

LayoutTests:

* js/dom/document-write-in-error-event-expected.txt: Added.
* js/dom/document-write-in-error-event.html: Added.
* js/dom/document-write-in-load-event-expected.txt: Added.
* js/dom/document-write-in-load-event.html: Added.
* js/dom/script-tests/dummy.js: Added.

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

3 years ago[WTF] HashTable's rehash is not compatible to Ref<T> and ASan
utatane.tea@gmail.com [Fri, 9 Sep 2016 05:11:25 +0000 (05:11 +0000)]
[WTF] HashTable's rehash is not compatible to Ref<T> and ASan
https://bugs.webkit.org/show_bug.cgi?id=161763

Reviewed by Mark Lam.

Source/WebCore:

Include wtf/text/StringHash.h to avoid linking errors in EFL port.

* loader/ResourceLoadStatistics.h:

Source/WTF:

If we move an object, the location which the moved object used should not be touched anymore.
HashTable::rehash performs WTFMove for the object that resides in the old table.
However, after moving it, we accidentally touch this location by using `!isEmptyOrDeletedBucket(table[i])`
in HashTable::deallocateTable. And it causes ASan crashing if we use Ref<> for HashTable's key or value.

In this patch, we call the destructor right after moving the object. And HashTable::rehash just calls
fastFree since all the objects in the old table are already moved and destructed.
And we also change HashTable::deallocate to destruct only live objects. Calling destructors for empty objects
is meaningless. And according to the Ref<>'s comment, empty object is not designed to be destructed.

* wtf/HashTable.h:
(WTF::KeyTraits>::deallocateTable):

Tools:

Add tests that inserts many Ref<>s. It incurs HashTable::rehash, and we can ensure
that ASan crash does not occur with this patch.

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::TEST):

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

3 years agoWeb Inspector: make copy-user-interface-resources.pl easier to read
bburg@apple.com [Fri, 9 Sep 2016 05:07:45 +0000 (05:07 +0000)]
Web Inspector: make copy-user-interface-resources.pl easier to read
https://bugs.webkit.org/show_bug.cgi?id=161772

Reviewed by Joseph Pecoraro.

* Scripts/copy-user-interface-resources.pl:
Break long script invocations across multiple lines so that the
options and values are paired together.

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

3 years agoWeb Inspector: get rid of extra copies of jsmin.py and cssmin.py
bburg@apple.com [Fri, 9 Sep 2016 04:33:11 +0000 (04:33 +0000)]
Web Inspector: get rid of extra copies of jsmin.py and cssmin.py
https://bugs.webkit.org/show_bug.cgi?id=161770
<rdar://problem/28216813>

Reviewed by Joseph Pecoraro.

* Scripts/copy-user-interface-resources-dryrun.rb:
- Keep track of the original working directory.
- Stage scripts from PrivateHeaders into the temporary directory.
- Add a comment to clarify what this script is simulating.
- Use system instead of exec so we can print an error message.

* Scripts/copy-user-interface-resources.pl:
- Use jsmin.py and cssmin.py from JavaScriptCore instead of
WebInspectorUI. There are no differences between the two copies.

* Scripts/cssmin.py: Removed.
* Scripts/jsmin.py: Removed.

* WebInspectorUI.xcodeproj/project.pbxproj:
- Remove unused copies of jsmin.py and cssmin.py.

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

3 years agoHTMLObjectElement.hspace / vspace attributes should be unsigned
cdumez@apple.com [Fri, 9 Sep 2016 03:49:13 +0000 (03:49 +0000)]
HTMLObjectElement.hspace / vspace attributes should be unsigned
https://bugs.webkit.org/show_bug.cgi?id=161766

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

HTMLObjectElement.hspace / vspace attributes should be unsigned:
- https://html.spec.whatwg.org/#HTMLObjectElement-partial

Firefox agrees with the specification but those were signed in WebKit.

No new tests, rebaselined existing test.

* html/HTMLObjectElement.idl:

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

3 years agoHTMLObjectElement.codebase attribute should reflect as a URL
cdumez@apple.com [Fri, 9 Sep 2016 03:31:58 +0000 (03:31 +0000)]
HTMLObjectElement.codebase attribute should reflect as a URL
https://bugs.webkit.org/show_bug.cgi?id=161768

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline existing test now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

HTMLObjectElement.codebase attribute should reflect as a URL:
- https://html.spec.whatwg.org/#dom-applet-codebase

Chrome and Firefox agree with the specification.

No new test, rebaselined existing test.

* html/HTMLObjectElement.idl:

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

3 years agool.start may return incorrect value for reversed lists when not explicitly set
cdumez@apple.com [Fri, 9 Sep 2016 03:31:21 +0000 (03:31 +0000)]
ol.start may return incorrect value for reversed lists when not explicitly set
https://bugs.webkit.org/show_bug.cgi?id=161713

Reviewed by Zalan Bujtas.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/html/semantics/grouping-content/the-ol-element/grouping-ol-expected.txt:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/ol.start-reflection-2-expected.txt:

Source/WebCore:

ol.start may return incorrect value for reversed lists when not explicitly set.
This is because we're supposed to return the number of rendered <li> child
elements, which relies on layout. However, we did not make sure the layout is
up-to-date before counting the number of li child elements. This patch fixes
the issue.

No new tests, rebaselined existing tests.

* html/HTMLOListElement.h:

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

3 years agoRe-landing the fix for
mitz@apple.com [Fri, 9 Sep 2016 02:50:02 +0000 (02:50 +0000)]
Re-landing the fix for

[Mac] .tbd files for the shims end up installed when building with GENERATE_TEXT_BASED_STUBS=YES
https://bugs.webkit.org/show_bug.cgi?id=161722

without reintroducing https://webkit.org/b/161782

* Configurations/Shim.xcconfig: Don’t install the shims. The Copy Shims build phase in the
  WebKit target will copy them into place without bringing their .tbd files along. Keep the
  install path set, though, because it determines the dylibs’ install names.

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

3 years agoUnreviewed, rolling out r205576.
commit-queue@webkit.org [Fri, 9 Sep 2016 02:25:10 +0000 (02:25 +0000)]
Unreviewed, rolling out r205576.
https://bugs.webkit.org/show_bug.cgi?id=161782

Introduced a crash at launch and broke all our Mac perf
testing (Requested by rniwa on #webkit).

Reverted changeset:

"[Mac] .tbd files for the shims end up installed when building
with GENERATE_TEXT_BASED_STUBS=YES"
https://bugs.webkit.org/show_bug.cgi?id=161722
http://trac.webkit.org/changeset/205576

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

3 years agoAdd support for HTMLIframeElement.allowFullscreen attribute
cdumez@apple.com [Fri, 9 Sep 2016 01:53:51 +0000 (01:53 +0000)]
Add support for HTMLIframeElement.allowFullscreen attribute
https://bugs.webkit.org/show_bug.cgi?id=161757

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

Add support for HTMLIframeElement.allowFullscreen attribute:
- https://html.spec.whatwg.org/#dom-iframe-allowfullscreen

Firefox and Chrome already support it, unprefixed.

Note that the HTMLIframeElement.allowFullscreen attribute reflects the
allowfullscreen content attribute which we already support.

Test: fullscreen/full-screen-iframe-allowFullscreen.html

* html/HTMLIFrameElement.idl:

LayoutTests:

Add layout test coverage.

* fullscreen/full-screen-iframe-allowFullscreen-expected.txt: Added.
* fullscreen/full-screen-iframe-allowFullscreen.html: Added.

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

3 years agoframe.longDesc / iframe.longDesc should reflect as a URL
cdumez@apple.com [Fri, 9 Sep 2016 01:43:25 +0000 (01:43 +0000)]
frame.longDesc / iframe.longDesc should reflect as a URL
https://bugs.webkit.org/show_bug.cgi?id=161764

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:
* web-platform-tests/html/dom/reflection-obsolete-expected.txt:

Source/WebCore:

frame.longDesc / iframe.longDesc should reflect as a URL:
- https://html.spec.whatwg.org/#dom-iframe-longdesc
- https://html.spec.whatwg.org/#dom-frame-longdesc

They already do in Chrome and Firefox.

No new tests, rebaselined existing tests.

* html/HTMLFrameElement.idl:
* html/HTMLIFrameElement.idl:

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

3 years agoURLParser: Handle \ in paths of special URLs according to spec
achristensen@apple.com [Fri, 9 Sep 2016 01:32:18 +0000 (01:32 +0000)]
URLParser: Handle \ in paths of special URLs according to spec
https://bugs.webkit.org/show_bug.cgi?id=161781

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::bufferView):
(WebCore::URLParser::copyURLPartsUntil):
(WebCore::URLParser::parse):
* platform/URLParser.h:

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoHeap::isMarked() shouldn't pay the price of concurrent lazy flipping
fpizlo@apple.com [Fri, 9 Sep 2016 01:22:05 +0000 (01:22 +0000)]
Heap::isMarked() shouldn't pay the price of concurrent lazy flipping
https://bugs.webkit.org/show_bug.cgi?id=161760

Reviewed by Mark Lam.
Source/JavaScriptCore:

To fix a race condition in marking, I made Heap::isMarked() and Heap::isLive() atomic by
using flipIfNecessaryConcurrently() instead of flipIfNecessary().

This introduces three unnecessary overheads:

- isLive() is not called by marking, so that change was not necessary.

- isMarked() gets calls many times outside of marking, so it shouldn't always do the
  concurrent thing. This adds isMarkedConcurrently() for use in marking, and reverts
  isMarked().

- isMarked() and isMarkedConcurrently() don't actually have to do the lazy flip. They can
  return false if the flip is necessary.

I added a bunch of debug assertions to make sure that isLive() and isMarked() are not called
during marking.

If we needed to, we could remove most of the calls to isMarkedConcurrently(). As a kind of
optimization, CodeBlock does an initial fixpoint iteration during marking, and so all of the
code called from CodeBlock's fixpoint iterator needs to use isMarkedConcurrently(). But we
could probably arrange for CodeBlock only do fixpoint iterating during the weak reference
thing.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitWeakly):
(JSC::CodeBlock::shouldJettisonDueToOldAge):
(JSC::shouldMarkTransition):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::propagateTransitions):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::isLive):
(JSC::Heap::isMarked):
(JSC::Heap::isMarkedConcurrently):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::flipIfNecessarySlow):
(JSC::MarkedBlock::flipIfNecessaryConcurrentlySlow):
(JSC::MarkedBlock::needsFlip):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::needsFlip):
(JSC::MarkedBlock::flipIfNecessary):
(JSC::MarkedBlock::flipIfNecessaryConcurrently):
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::markAuxiliary):
(JSC::SlotVisitor::visitChildren):
* runtime/Structure.cpp:
(JSC::Structure::isCheapDuringGC):
(JSC::Structure::markIfCheap):

Source/WTF:

* wtf/MainThread.cpp:
(WTF::isMainThreadOrGCThread):
(WTF::mayBeGCThread):
* wtf/MainThread.h:

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

3 years agoMove the BitmapImage platform dependent code to a new file named NativeImage[CG|Cairo...
commit-queue@webkit.org [Fri, 9 Sep 2016 01:06:47 +0000 (01:06 +0000)]
Move the BitmapImage platform dependent code to a new file named NativeImage[CG|Cairo].cpp
https://bugs.webkit.org/show_bug.cgi?id=158684

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

Source/WebCore:

This is a refactoring patch. It moves the BitmapImage platform dependent
code from BitmapImage to NativeImage[CG|Cairo].cpp. The new APIs are
responsible of drawing a NativeImagePtr and answering some metadata queries.

No new tests -- Code refactoring, no behavior change.

* PlatformAppleWin.cmake:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWinCairo.cmake:
* WebCore.xcodeproj/project.pbxproj:
* loader/cache/MemoryCache.h:
* loader/icon/IconDatabaseBase.h:
* page/mac/TextIndicatorWindow.mm:
(-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
(createContentCrossfadeAnimation):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::destroyDecodedData):
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
(WebCore::BitmapImage::dataChanged):
(WebCore::BitmapImage::ensureFrameAtIndexIsCached):
(WebCore::BitmapImage::frameImageAtIndex):
(WebCore::BitmapImage::nativeImage):
(WebCore::BitmapImage::nativeImageForCurrentFrame):
(WebCore::BitmapImage::nativeImageOfSize):
(WebCore::BitmapImage::framesNativeImages):
(WebCore::BitmapImage::frameIsCompleteAtIndex):
(WebCore::BitmapImage::frameDurationAtIndex):
(WebCore::BitmapImage::frameHasAlphaAtIndex):
(WebCore::BitmapImage::frameOrientationAtIndex):
(WebCore::BitmapImage::singlePixelSolidColor):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::drawPattern):
(WebCore::BitmapImage::canAnimate):
(WebCore::BitmapImage::clearTimer):
(WebCore::BitmapImage::startTimer):
(WebCore::BitmapImage::stopAnimation):
(WebCore::BitmapImage::resetAnimation):
(WebCore::BitmapImage::hasSingleSecurityOrigin): Deleted.
(WebCore::BitmapImage::filenameExtension): Deleted.
(WebCore::BitmapImage::ensureFrameIsCached): Deleted.
* platform/graphics/BitmapImage.h:
(WebCore::FrameData::FrameData):
m_hasAlpha can be initialized with false because it is accessed only in
BitmapImage::frameHasAlphaAtIndex() and it is guarded by m_haveMetadata.
Both m_haveMetadata and m_hasAlpha are set in BitmapImage constructor
and in BitmapImage::cacheFrame().

(WebCore::FrameData::~FrameData):
(WebCore::FrameData::clear):
* platform/graphics/Icon.h:
* platform/graphics/Image.h:
(WebCore::Image::nativeImage):
(WebCore::Image::nativeImageOfSize):
(WebCore::Image::framesNativeImages):
(WebCore::Image::orientationForCurrentFrame): Deleted.
(WebCore::Image::getCGImageRef): Deleted.
(WebCore::Image::getFirstCGImageRefOfSize): Deleted.
(WebCore::Image::getCGImageArray): Deleted.
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::calculateMaximumSubsamplingLevel):
(WebCore::ImageSource::size):
(WebCore::ImageSource::sizeRespectingOrientation):
* platform/graphics/ImageSource.h:
* platform/graphics/MediaPlayer.h:
* platform/graphics/NativeImage.h: Added.
* platform/graphics/NativeImagePtr.h: Removed.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updatePausedImage):
* platform/graphics/cairo/BitmapImageCairo.cpp: Removed.
* platform/graphics/cairo/NativeImageCairo.cpp: Added.
(WebCore::nativeImageSize):
(WebCore::nativeImageHasAlpha):
(WebCore::nativeImageSinglePixelSolidColor):
(WebCore::subsamplingScale):
(WebCore::drawNativeImage):
(WebCore::clearNativeImageSubImages):
* platform/graphics/cg/BitmapImageCG.cpp: Removed.
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::size):
* platform/graphics/cg/ImageDecoderCG.h:
* platform/graphics/cg/NativeImageCG.cpp: Added.
(WebCore::nativeImageSize):
(WebCore::nativeImageHasAlpha):
(WebCore::nativeImageSinglePixelSolidColor):
(WebCore::subsamplingScale):
(WebCore::drawNativeImage):
(WebCore::clearNativeImageSubImages):
* platform/graphics/cg/PatternCG.cpp:
(WebCore::Pattern::createPlatformPattern):
* platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
(TextTrackRepresentationCocoa::update):
* platform/graphics/mac/ImageMac.mm:
(WebCore::BitmapImage::getTIFFRepresentation):
* platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
(WebCore::MockRealtimeVideoSourceMac::updatePlatformLayer):
(WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer):
* platform/win/DragImageCGWin.cpp:
(WebCore::createDragImageFromImage):

Source/WebKit/mac:

* DOM/DOM.mm:
(-[DOMNode getPreviewSnapshotImage:andRects:]):
* Misc/WebCache.mm:
(+[WebCache imageForURL:]):
Replace BitmapImage::getCGImageRef() with BitmapImage::nativeImage().

Source/WebKit2:

* UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
(WKIconDatabaseTryGetCGImageForURL):
(WKIconDatabaseTryCopyCGImageArrayForURL):
It was the only place in the code which uses BitmapImage::getCGImageArray().
Call BitmapImage::framesNativeImages() instead and form the returned
Vector<NativeImagePtr> build the CFArrayRef.

* UIProcess/WebIconDatabase.h:
Include "NativeImage.h" instead of "NativeImagePtr.h".

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _presentationSnapshotForPreviewItemController:]):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::isAlmostSolidColor):
Call BitmapImage::getCGImageRef() instead of calling BitmapImage::nativeImage().

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

3 years agoUpdate the content-animation.plan file to run css-accelerated-animation.html
simon.fraser@apple.com [Fri, 9 Sep 2016 00:55:43 +0000 (00:55 +0000)]
Update the content-animation.plan file to run css-accelerated-animation.html
and pull SVN revision r205680.

* Scripts/webkitpy/benchmark_runner/data/plans/content-animation.plan:

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

3 years agoAdd a content-animation test with accelerated CSS animations
simon.fraser@apple.com [Fri, 9 Sep 2016 00:51:06 +0000 (00:51 +0000)]
Add a content-animation test with accelerated CSS animations
https://bugs.webkit.org/show_bug.cgi?id=161776

Reviewed by Dean Jackson.

PerformanceTests:

Add a test that measures the frame rate of accelerated CSS animations.

This is like css-animation.html (which animates 'left' and 'top') but animates
transforms instead. In order to get animation in X and Y we make two nested elements
and set transformX() on one, and transformY() on the other.

* Animation/css-accelerated-animation.html: Added.

Tools:

* Scripts/webkitpy/benchmark_runner/data/patches/ContentAnimation.patch:

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

3 years agoURLParser: Parsing empty URLs with a base URL should return the base URL
achristensen@apple.com [Fri, 9 Sep 2016 00:46:17 +0000 (00:46 +0000)]
URLParser: Parsing empty URLs with a base URL should return the base URL
https://bugs.webkit.org/show_bug.cgi?id=161777

Reviewed by Tim Horton.

Source/WebCore:

Covered by an API test and progress towards passing all web platform tests when using URLParser.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoURLParser failures should preserve the original input string
achristensen@apple.com [Fri, 9 Sep 2016 00:43:50 +0000 (00:43 +0000)]
URLParser failures should preserve the original input string
https://bugs.webkit.org/show_bug.cgi?id=161769

Reviewed by Tim Horton.

Source/WebCore:

No new tests, but covered by updates to API tests.
This also represents many newly passing web platform tests when using URLParser.

* platform/URLParser.cpp:
(WebCore::URLParser::failure):
(WebCore::URLParser::parse):
* platform/URLParser.h:

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::shouldFail):

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

3 years agoURLParser should parse URLs with a user but no password
achristensen@apple.com [Fri, 9 Sep 2016 00:05:36 +0000 (00:05 +0000)]
URLParser should parse URLs with a user but no password
https://bugs.webkit.org/show_bug.cgi?id=161773

Reviewed by Brady Eidson.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parseAuthority):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoWeb Inspector: TimelineDataGridNode should refresh when graph column is resized
mattbaker@apple.com [Thu, 8 Sep 2016 23:21:27 +0000 (23:21 +0000)]
Web Inspector: TimelineDataGridNode should refresh when graph column is resized
https://bugs.webkit.org/show_bug.cgi?id=161765
<rdar://problem/28215674>

Reviewed by Brian Burg.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.resizerDragging):
Call `DataGridNode.didResizeColumn` for all visible nodes in the columns
to the left and right of the column resizer.

* UserInterface/Views/DataGridNode.js:
(WebInspector.DataGridNode.prototype.didResizeColumn):
Add protected base class method for subclasses to override.

* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.didResizeColumn):
Refresh the node's graph when the "graph" column is resized.
Renamed `left/rightCellIndex` -> `left/rightColumnIndex`.

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

3 years agoWe should inline operationConvertJSValueToBoolean into JIT code
sbarati@apple.com [Thu, 8 Sep 2016 23:19:38 +0000 (23:19 +0000)]
We should inline operationConvertJSValueToBoolean into JIT code
https://bugs.webkit.org/show_bug.cgi?id=161729

Reviewed by Filip Pizlo.

JSTests:

* stress/value-to-boolean.js: Added.
(assert):
(test1):
(test2):
(test3):

Source/JavaScriptCore:

This patch introduces an AssemblyHelpers emitter function
that replaces operationConvertJSValueToBoolean. This operation
was showing up when I was doing performance analysis for the
speedometer benchmark. I saw that it was spending about 1% of
its time in this function. Hopefully this patch can help us speedup
up speedometer by a little bit.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitConvertValueToBoolean):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitAllocateDestructibleObject): Deleted.
* jit/JIT.cpp:
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emitSlow_op_jfalse): Deleted.
(JSC::JIT::emitSlow_op_jtrue): Deleted.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emitSlow_op_jfalse): Deleted.
(JSC::JIT::emitSlow_op_jtrue): Deleted.
* jit/JITOperations.cpp:
* jit/JITOperations.h:

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

3 years agoWeb Inspector: Add a button to navigation bar to toggle Control Flow Profiler
nvasilyev@apple.com [Thu, 8 Sep 2016 23:13:57 +0000 (23:13 +0000)]
Web Inspector: Add a button to navigation bar to toggle Control Flow Profiler
https://bugs.webkit.org/show_bug.cgi?id=160973
<rdar://problem/27912606>

Reviewed by Brian Burg.

* Localizations/en.lproj/localizedStrings.js:
Add "Fade unexecuted code" and "Do not fade unexecuted code".

* UserInterface/Base/Main.js:
(WebInspector.loaded):
Add a setting to remember whether Code Coverage Profiler is on or off between Web Inspector reloads.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.shown):
(WebInspector.SourceCodeTextEditor.prototype.canShowTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.canShowCoverageHints):
(WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.toggleUnexecutedCodeHighlights):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._proceedPopulateWithContent):
(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
(WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
(WebInspector.SourceCodeTextEditor.prototype._enableScrollEventsForTypeTokenAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._enableScrollEventsForControlFlowAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._disableScrollEventsForControlFlowAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._createTypeTokenScrollEventHandler):
(WebInspector.SourceCodeTextEditor.prototype._createControlFlowScrollEventHandler):
(WebInspector.SourceCodeTextEditor.prototype.canBeFormatted): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.dialogWasDismissed): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.showPopoverForTypes): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._addBreakpointWithEditorLineInfo): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._removeBreakpointWithEditorLineInfo): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._dismissEditingController): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.editingControllerDidStartEditing): Deleted.
(WebInspector.SourceCodeTextEditor.prototype.editingControllerDidFinishEditing): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._getAssociatedScript): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._createTypeTokenAnnotator): Deleted.
Make Code Coverage profiler independent from Type Profiler.

* UserInterface/Views/TextContentView.js:
(WebInspector.TextContentView):
(WebInspector.TextContentView.prototype.get navigationItems):
(WebInspector.TextContentView.prototype.get textEditor): Deleted.
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.get hasModified):
(WebInspector.TextEditor.prototype.canShowCoverageHints):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView):
(WebInspector.TextResourceContentView.prototype.get navigationItems):
(WebInspector.TextResourceContentView.prototype._contentDidPopulate):
(WebInspector.TextResourceContentView.prototype._toggleTypeAnnotations):
(WebInspector.TextResourceContentView.prototype._toggleUnexecutedCodeHighlights):
(WebInspector.TextResourceContentView.prototype._enableControlFlowProfilerSettingChanged):
(WebInspector.TextResourceContentView.prototype._contentWillPopulate): Deleted.
* UserInterface/Views/ScriptContentView.js:
(WebInspector.ScriptContentView):
(WebInspector.ScriptContentView.prototype.get navigationItems):
(WebInspector.ScriptContentView.prototype._contentDidPopulate):
(WebInspector.ScriptContentView.prototype._toggleTypeAnnotations):
(WebInspector.ScriptContentView.prototype._toggleUnexecutedCodeHighlights):
(WebInspector.ScriptContentView.prototype._enableControlFlowProfilerSettingChanged):
(WebInspector.ScriptContentView.prototype._contentWillPopulate): Deleted.
Add the [C] icon right next to the [T] (Type Profiler) icon.

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

3 years agoRemove pass expectation for fast/text/emoji-num-glyphs.html after r205657.
ryanhaddad@apple.com [Thu, 8 Sep 2016 23:07:44 +0000 (23:07 +0000)]
Remove pass expectation for fast/text/emoji-num-glyphs.html after r205657.

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years ago[CMake] Build failure with GCC 6 (fatal error: stdlib.h: No such file or directory)
clopez@igalia.com [Thu, 8 Sep 2016 22:54:51 +0000 (22:54 +0000)]
[CMake] Build failure with GCC 6 (fatal error: stdlib.h: No such file or directory)
https://bugs.webkit.org/show_bug.cgi?id=161697

Reviewed by Michael Catanzaro.

Get the list of system includes from GCC and add it to the CMake
list of implicit includes. This way, CMake will filter any of this
directories from the list of includes when calling the compiler.

This avoids an issue with GCC 6 that causes build failures when
including the default include path as a system include (-isystem).

* Source/cmake/OptionsCommon.cmake:

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

3 years agoFix URLs after r205669.
achristensen@apple.com [Thu, 8 Sep 2016 22:33:36 +0000 (22:33 +0000)]
Fix URLs after r205669.
https://bugs.webkit.org/show_bug.cgi?id=161731

* platform/URLParser.cpp:
(WebCore::URLParser::enabled):
I accidentally committed enabling the URLParser by default.  Not ready yet.

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

3 years agoAlign proto getter / setter behavior with other browsers
cdumez@apple.com [Thu, 8 Sep 2016 22:30:26 +0000 (22:30 +0000)]
Align proto getter / setter behavior with other browsers
https://bugs.webkit.org/show_bug.cgi?id=161455

Reviewed by Saam Barati.

Source/JavaScriptCore:

Drop allowsAccessFrom from the methodTable and delegate cross-origin
checking to the DOM bindings for [[SetPrototypeOf]] / [[GetPrototypeOf]].
This is more consistent with other operations (e.g. [[GetOwnProperty]]).

* jsc.cpp:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):
(JSC::globalFuncBuiltinLog): Deleted.
* runtime/JSGlobalObjectFunctions.h:
* runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeWithCycleCheck):
Remove check added in r197648. This check was added to match
the latest EcmaScript spec:
- https://tc39.github.io/ecma262/#sec-ordinarysetprototypeof (step 8)
This check allowed for [[Prototype]] chain cycles if the prototype
chain includes objects that do not use the ordinary object definitions
for [[GetPrototypeOf]] and [[SetPrototypeOf]].
The issue is that the rest of our code base does not properly handle
such cycles and we can end up in infinite loops. This became obvious
because this patch updates Window / Location so that they no longer
use the default [[GetPrototypeOf]] / [[SetPrototypeOf]]. If I do not
remove this check, I get an infinite loop in
Structure::anyObjectInChainMayInterceptIndexedAccesses(), which is
called from JSObject::setPrototypeDirect(), when running the following
layout test:
- html/browsers/history/the-location-interface/allow_prototype_cycle_through_location.sub.html
I filed https://bugs.webkit.org/show_bug.cgi?id=161534 to track this
issue.

* runtime/JSObject.h:
(JSC::JSObject::getArrayLength): Deleted.
* runtime/JSProxy.cpp:
(JSC::JSProxy::setPrototype):
(JSC::JSProxy::getPrototype):
* runtime/JSProxy.h:
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorSetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor): Deleted.
(JSC::objectConstructorGetOwnPropertyDescriptors): Deleted.
* runtime/ObjectConstructor.h:
* runtime/ReflectObject.cpp:
(JSC::reflectObjectGetPrototypeOf):
(JSC::reflectObjectSetPrototypeOf):

Source/WebCore:

Align cross-origin __proto__ getter / setter behavior with other
browsers and the specification:

[[SetPrototypeOf]] should throw a TypeError:
- https://html.spec.whatwg.org/#windowproxy-setprototypeof
- https://html.spec.whatwg.org/#location-setprototypeof
- https://tc39.github.io/ecma262/#sec-object.setprototypeof (step 5)

[[GetPrototypeOf]] should return null cross-origin:
- https://html.spec.whatwg.org/#windowproxy-getprototypeof
- https://html.spec.whatwg.org/#location-getprototypeof

Test: js/dom/setPrototypeOf-location-window.html

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::JSDOMWindowBase): Deleted.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::setPrototype):
(WebCore::JSDOMWindow::getPrototype):
(WebCore::JSDOMWindow::preventExtensions):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::setPrototype):
(WebCore::JSLocation::getPrototype):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::supportsRichSourceInfo): Deleted.
* bindings/js/JSWorkerGlobalScopeBase.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/IDLAttributes.txt:
* page/DOMWindow.idl:
* page/Location.idl:

LayoutTests:

Add layout test coverage and update a few existing test to reflect
behavior change.

* fast/dom/Window/script-tests/window-custom-prototype.js: Removed.
* fast/dom/Window/window-custom-prototype-crash-expected.txt:
* fast/dom/Window/window-custom-prototype-expected.txt: Removed.
* fast/dom/Window/window-custom-prototype.html: Removed.
* http/tests/security/cross-frame-access-object-getPrototypeOf-expected.txt:
* http/tests/security/cross-frame-access-object-getPrototypeOf.html:
* http/tests/security/cross-frame-access-object-setPrototypeOf-expected.txt:
* http/tests/security/cross-frame-access-object-setPrototypeOf.html:
* http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-htmlelelment-with-iframe-proto.html:
* http/tests/security/xss-DENIED-method-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-method-with-iframe-proto.html:
* http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-non-shadowable-propterty-with-iframe-proto.html:
* http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto-expected.txt:
* http/tests/security/xss-DENIED-regular-propterty-with-iframe-proto.html:
* js/dom/setPrototypeOf-location-window-expected.txt: Added.
* js/dom/setPrototypeOf-location-window.html: Added.

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

3 years agoURLParser should parse ports after IPv4 and IPv6 hosts
achristensen@apple.com [Thu, 8 Sep 2016 22:28:48 +0000 (22:28 +0000)]
URLParser should parse ports after IPv4 and IPv6 hosts
https://bugs.webkit.org/show_bug.cgi?id=161731

Reviewed by Brady Eidson.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parsePort):
(WebCore::URLParser::parseHost):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoURLParser should correctly handle \ in path
achristensen@apple.com [Thu, 8 Sep 2016 22:16:49 +0000 (22:16 +0000)]
URLParser should correctly handle \ in path
https://bugs.webkit.org/show_bug.cgi?id=161762

Reviewed by Brady Eidson.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::isSpecialScheme):
(WebCore::bufferView):
(WebCore::URLParser::parse):
Treat \ as / in the path of special URLs as described in the spec and tested in web platform tests.
Also a slight performance improvement using StringViews instead of copied Strings.

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoURLParser should handle URLs with empty authority
achristensen@apple.com [Thu, 8 Sep 2016 22:15:07 +0000 (22:15 +0000)]
URLParser should handle URLs with empty authority
https://bugs.webkit.org/show_bug.cgi?id=161711

Reviewed by Brady Eidson.

Source/WebCore:

Covered by new API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):
(WebCore::URLParser::parseAuthority):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoRemove CopiedSpace and use MarkedSpace instead
fpizlo@apple.com [Thu, 8 Sep 2016 22:12:05 +0000 (22:12 +0000)]
Remove CopiedSpace and use MarkedSpace instead
https://bugs.webkit.org/show_bug.cgi?id=159658

Reviewed by Keith Miller.

This removes the final client of CopiedSpace, the overrides array of DirectArguments. That
is a simple change.

Then this stubs out some remaining internal debugging code that referenced CopiedSpace in
JSDollarVM and HeapVerifier. I filed FIXMEs to restore that debugging functionality.

The rest of this patch is deleting CopiedSpace.

* API/JSObjectRef.cpp:
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGOperations.cpp:
* heap/ConservativeRoots.cpp:
(JSC::ConservativeRoots::genericAddPointer):
* heap/CopiedAllocator.h: Removed.
* heap/CopiedBlock.cpp: Removed.
* heap/CopiedBlock.h: Removed.
* heap/CopiedBlockInlines.h: Removed.
* heap/CopiedSpace.cpp: Removed.
* heap/CopiedSpace.h: Removed.
* heap/CopiedSpaceInlines.h: Removed.
* heap/CopyBarrier.h: Removed.
* heap/CopyToken.h: Removed.
* heap/CopyVisitor.cpp: Removed.
* heap/CopyVisitor.h: Removed.
* heap/CopyVisitorInlines.h: Removed.
* heap/CopyWorkList.h: Removed.
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::isPagedOut):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::size):
(JSC::Heap::capacity):
(JSC::Heap::collectImpl):
(JSC::Heap::stopAllocation):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::copyBackingStores): Deleted.
(JSC::Heap::threadBytesCopied): Deleted.
* heap/Heap.h:
(JSC::Heap::objectSpace):
(JSC::Heap::allocatorForAuxiliaryData):
(JSC::Heap::storageSpace): Deleted.
(JSC::Heap::storageAllocator): Deleted.
* heap/HeapCellInlines.h:
* heap/HeapInlines.h:
(JSC::Heap::tryAllocateStorage): Deleted.
(JSC::Heap::tryReallocateStorage): Deleted.
* heap/HeapVerifier.cpp:
(JSC::HeapVerifier::verifyButterflyIsInStorageSpace):
(JSC::HeapVerifier::reportObject):
(JSC::getButterflyDetails): Deleted.
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::copyLater): Deleted.
* heap/SlotVisitor.h:
* jit/AssemblyHelpers.h:
* jit/JITOpcodes.cpp:
* jsc.cpp:
* runtime/ArrayConstructor.cpp:
* runtime/ArrayPrototype.cpp:
* runtime/Butterfly.h:
* runtime/ButterflyInlines.h:
(JSC::Butterfly::createUninitializedDuringCollection): Deleted.
* runtime/ClassInfo.h:
* runtime/DirectArguments.cpp:
(JSC::DirectArguments::visitChildren):
(JSC::DirectArguments::overrideThings):
(JSC::DirectArguments::copyBackingStore): Deleted.
* runtime/DirectArguments.h:
* runtime/JSArray.cpp:
* runtime/JSCell.cpp:
(JSC::JSCell::copyBackingStore): Deleted.
* runtime/JSCell.h:
* runtime/JSLexicalEnvironment.h:
* runtime/JSObject.cpp:
* runtime/JSTypedArrays.cpp:
* runtime/LiteralParser.cpp:
* runtime/ObjectConstructor.cpp:
* runtime/RegExpObject.cpp:
* runtime/StringPrototype.cpp:
* runtime/WeakMapData.cpp:
* tools/JSDollarVMPrototype.cpp:
(JSC::JSDollarVMPrototype::isInStorageSpace):

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

3 years agoHTMLImageElement.hspace / vspace attributes should be unsigned
cdumez@apple.com [Thu, 8 Sep 2016 22:02:39 +0000 (22:02 +0000)]
HTMLImageElement.hspace / vspace attributes should be unsigned
https://bugs.webkit.org/show_bug.cgi?id=161754

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

HTMLImageElement.hspace / vspace attributes should be unsigned:
- https://html.spec.whatwg.org/#HTMLImageElement-partial

Firefox agrees with the specification, however, those were signed in
webKit.

No new tests, rebaselined existing test.

* html/HTMLImageElement.idl:

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

3 years agoREGRESSION (r205569?): 32-bit JSC test timeout: stress/rest-parameter-many-arguments...
mark.lam@apple.com [Thu, 8 Sep 2016 22:00:52 +0000 (22:00 +0000)]
REGRESSION (r205569?): 32-bit JSC test timeout: stress/rest-parameter-many-arguments.js.dfg-maximal-flush-validate-no-cjit
https://bugs.webkit.org/show_bug.cgi?id=161756

Reviewed by Saam Barati.

It looks like the 32-bit JSC bot is just too slow at running this test with the
dfg-maximal-flush-validate-no-cjit configuration.  We'll try excluding that
configuration.

* stress/rest-parameter-many-arguments.js:

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

3 years agoUpdate parseHTMLNonNegativeInteger() to return an unsigned value
cdumez@apple.com [Thu, 8 Sep 2016 21:31:54 +0000 (21:31 +0000)]
Update parseHTMLNonNegativeInteger() to return an unsigned value
https://bugs.webkit.org/show_bug.cgi?id=161759

Reviewed by Alex Christensen.

Update parseHTMLNonNegativeInteger() to return an unsigned value instead
of a signed one as the value can never be negative.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseBorderWidthAttribute):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::width):
(WebCore::HTMLImageElement::height):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::maxLengthAttributeChanged):
(WebCore::HTMLInputElement::minLengthAttributeChanged):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::maxLengthAttributeChanged):
(WebCore::HTMLTextAreaElement::minLengthAttributeChanged):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLNonNegativeInteger):
(WebCore::parseHTTPRefreshInternal):
* html/parser/HTMLParserIdioms.h:

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

3 years agoDelete older WebAssembly tests
commit-queue@webkit.org [Thu, 8 Sep 2016 21:30:17 +0000 (21:30 +0000)]
Delete older WebAssembly tests
https://bugs.webkit.org/show_bug.cgi?id=161758

Patch by JF Bastien <jfbastien@apple.com> on 2016-09-08
Reviewed by Filip Pizlo.

They're not running, rely on the older polyfill prototype, and the older code was deleted in: https://trac.webkit.org/changeset/204180

* stress/wasm-arithmetic-float32.js: Removed.
* stress/wasm-arithmetic-float64.js: Removed.
* stress/wasm-arithmetic-int32.js: Removed.
* stress/wasm-calls.js: Removed.
* stress/wasm-comma.js: Removed.
* stress/wasm-control-flow.js: Removed.
* stress/wasm-globals.js: Removed.
* stress/wasm-linear-memory.js: Removed.
* stress/wasm-locals.js: Removed.
* stress/wasm-relational.js: Removed.
* stress/wasm-type-conversion.js: Removed.
* stress/wasm/arithmetic-float32.wasm: Removed.
* stress/wasm/arithmetic-float64.wasm: Removed.
* stress/wasm/arithmetic-int32.wasm: Removed.
* stress/wasm/calls.wasm: Removed.
* stress/wasm/comma.wasm: Removed.
* stress/wasm/control-flow.wasm: Removed.
* stress/wasm/globals.wasm: Removed.
* stress/wasm/linear-memory.wasm: Removed.
* stress/wasm/locals.wasm: Removed.
* stress/wasm/relational.wasm: Removed.
* stress/wasm/type-conversion.wasm: Removed.

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

3 years agoGet rid of the color profile from ImageFrame and ImageDecoder
commit-queue@webkit.org [Thu, 8 Sep 2016 21:16:38 +0000 (21:16 +0000)]
Get rid of the color profile from ImageFrame and ImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=159699

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

The color profile is set but it is never used.

* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageFrame::setColorProfile): Deleted.
* platform/image-decoders/ImageDecoder.h:
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageReader::decode):
(WebCore::JPEGImageDecoder::outputScanlines):
(WebCore::readColorProfile): Deleted.
* platform/image-decoders/jpeg/JPEGImageDecoder.h:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::headerAvailable):
(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::readColorProfile): Deleted.

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

3 years ago[CSS Parser] Add support for new CSS selector parsing
hyatt@apple.com [Thu, 8 Sep 2016 21:09:04 +0000 (21:09 +0000)]
[CSS Parser] Add support for new CSS selector parsing
https://bugs.webkit.org/show_bug.cgi?id=161749

Reviewed by Dean Jackson.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::isValidSelector):
* css/CSSDefaultStyleSheets.cpp:
(WebCore::parseUASheet):
* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::matchingFaces):
* css/CSSGrammar.y.in:
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/DOMCSSNamespace.cpp:
(WebCore::DOMCSSNamespace::supports):
* css/FontFace.cpp:
(WebCore::FontFace::parseString):
(WebCore::FontFace::setVariant):
* css/MediaList.cpp:
(WebCore::MediaQuerySet::internalParse):
(WebCore::MediaQuerySet::parse):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
* css/SelectorFilter.cpp:
(WebCore::SelectorFilter::collectIdentifierHashes):
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* css/SelectorPseudoTypeMap.h:
* css/SourceSizeList.cpp:
(WebCore::parseSizesAttribute):
* css/StyleProperties.cpp:
(WebCore::MutableStyleProperties::MutableStyleProperties):
* css/StyleProperties.h:
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::setCSSStyleSheet):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::StyleSheetContents):
(WebCore::StyleSheetContents::parserAddNamespace):
(WebCore::StyleSheetContents::namespaceURIFromPrefix):
(WebCore::StyleSheetContents::determineNamespace): Deleted.
* css/StyleSheetContents.h:
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
* css/parser/CSSParser.cpp:
(WebCore::strictCSSParserContext):
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::shouldAcceptUnitLessValues):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseColumnWidth):
(WebCore::CSSParser::parseColumnCount):
(WebCore::CSSParser::parseFontWeight):
(WebCore::CSSParser::parseColorParameters):
(WebCore::CSSParser::parseHSLParameters):
(WebCore::CSSParser::parseShadow):
(WebCore::CSSParser::parseBorderImageSlice):
(WebCore::CSSParser::parseBorderImageQuad):
(WebCore::CSSParser::parseDeprecatedLinearGradient):
(WebCore::CSSParser::parseLinearGradient):
(WebCore::CSSParser::parseTransformValue):
(WebCore::CSSParser::parseBuiltinFilterArguments):
(WebCore::CSSParser::determineNameInNamespace):
* css/parser/CSSParser.h:
(WebCore::CSSParser::inStrictMode):
(WebCore::CSSParser::inQuirksMode):
* css/parser/CSSParserMode.h:
(WebCore::isQuirksModeBehavior):
(WebCore::isUASheetBehavior):
(WebCore::isUnitLessLengthParsingEnabledForMode):
(WebCore::isCSSViewportParsingEnabledForMode):
(WebCore::strictToCSSParserMode):
(WebCore::isStrictParserMode):
* css/parser/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementSelectorFromStringView):
(WebCore::CSSParserSelector::parsePseudoClassSelectorFromStringView):
(WebCore::CSSParserSelector::setSelectorList):
(WebCore::CSSParserSelector::appendTagHistory):
(WebCore::CSSParserSelector::releaseTagHistory):
(WebCore::CSSParserSelector::isHostPseudoSelector):
* css/parser/CSSParserValues.h:
(WebCore::CSSParserSelector::match):
(WebCore::CSSParserSelector::pseudoElementType):
(WebCore::CSSParserSelector::selectorList):
(WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
* css/parser/CSSPropertyParser.h:
(WebCore::CSSPropertyParser::inQuirksMode):
* css/parser/CSSSelectorParser.cpp: Added.
(WebCore::CSSSelectorParser::parseSelector):
(WebCore::CSSSelectorParser::CSSSelectorParser):
(WebCore::CSSSelectorParser::consumeComplexSelectorList):
(WebCore::CSSSelectorParser::consumeCompoundSelectorList):
(WebCore::CSSSelectorParser::consumeComplexSelector):
(WebCore::CSSSelectorParser::consumeCompoundSelector):
(WebCore::CSSSelectorParser::consumeSimpleSelector):
(WebCore::CSSSelectorParser::consumeName):
(WebCore::CSSSelectorParser::consumeId):
(WebCore::CSSSelectorParser::consumeClass):
(WebCore::CSSSelectorParser::consumeAttribute):
(WebCore::CSSSelectorParser::consumePseudo):
(WebCore::CSSSelectorParser::consumeCombinator):
(WebCore::CSSSelectorParser::consumeAttributeMatch):
(WebCore::CSSSelectorParser::consumeAttributeFlags):
(WebCore::CSSSelectorParser::consumeANPlusB):
(WebCore::CSSSelectorParser::defaultNamespace):
(WebCore::CSSSelectorParser::determineNamespace):
(WebCore::CSSSelectorParser::prependTypeSelectorIfNeeded):
(WebCore::CSSSelectorParser::addSimpleSelectorToCompound):
(WebCore::CSSSelectorParser::splitCompoundAtImplicitShadowCrossingCombinator):
* css/parser/CSSSelectorParser.h: Added.
(WebCore::CSSSelectorParser::DisallowPseudoElementsScope::DisallowPseudoElementsScope):
(WebCore::CSSSelectorParser::DisallowPseudoElementsScope::~DisallowPseudoElementsScope):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
* dom/StyledElement.cpp:
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):

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

3 years agoDon't run transitions to or from undefined Lengths
simon.fraser@apple.com [Thu, 8 Sep 2016 20:54:24 +0000 (20:54 +0000)]
Don't run transitions to or from undefined Lengths
https://bugs.webkit.org/show_bug.cgi?id=161750
rdar://problem/28170460

Reviewed by Zalan Bujtas.

Source/WebCore:

For properties like max-height whose default value is 'none', we would erroneously
attempt to run transitions/animations, and then assert when one of the endpoints
was undefined.

So don't attempt to blend such Length values, just as do when they are auto.

Fixes some transitions on apple.com and developer.apple.com.

Test: transitions/transition-to-from-undefined.html

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimation::blendProperties):
* platform/Length.cpp:
(WebCore::blend):

LayoutTests:

* transitions/transition-to-from-undefined-expected.txt: Added.
* transitions/transition-to-from-undefined.html: Added.

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

3 years agoHeap version should be 32-bit
fpizlo@apple.com [Thu, 8 Sep 2016 20:35:55 +0000 (20:35 +0000)]
Heap version should be 32-bit
https://bugs.webkit.org/show_bug.cgi?id=161751

Reviewed by Mark Lam.

32-bit devices are probably getting hurt by the 64-bit version number. The reason why I made
it 64-bit initially is so that I wouldn't have to worry about wrap-around. But wrap-around is
easy to handle.

* heap/CellContainer.h:
* heap/CellContainerInlines.h:
(JSC::CellContainer::flipIfNecessary):
* heap/ConservativeRoots.cpp:
(JSC::ConservativeRoots::genericAddPointer):
(JSC::ConservativeRoots::genericAddSpan):
* heap/ConservativeRoots.h:
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::testAndSetMarked):
* heap/HeapUtil.h:
(JSC::HeapUtil::findGCObjectPointersForMarking):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::MarkedBlock):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::flipIfNecessary):
(JSC::MarkedBlock::flipIfNecessaryConcurrently):
(JSC::MarkedBlock::Handle::flipIfNecessary):
(JSC::MarkedBlock::Handle::flipIfNecessaryConcurrently):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::flip):
* heap/MarkedSpace.h:
(JSC::MarkedSpace::version):
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::SlotVisitor):
* heap/SlotVisitor.h:

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

3 years agoSupport new emoji group candidates
mmaxfield@apple.com [Thu, 8 Sep 2016 20:09:20 +0000 (20:09 +0000)]
Support new emoji group candidates
https://bugs.webkit.org/show_bug.cgi?id=161664
<rdar://problem/24802695>
<rdar://problem/27666433>

Reviewed by Simon Fraser.

Source/WebCore:

Support more emoji group candidates. This includes joining groups into a single glyph, as
well as atomic deletions of the entire group when the backspace key is pressed.

Tests: editing/deleting/delete-emoji.html:
       fast/text/emoji-num-glyphs.html:

* platform/text/CharacterProperties.h:
(WebCore::isEmojiGroupCandidate):

Source/WTF:

Update breaking rules.

* wtf/text/TextBreakIterator.cpp:
(WTF::cursorMovementIterator):

LayoutTests:

Add tests.

* platform/ios-simulator/editing/deleting/delete-emoji-expected.txt:
* platform/mac-yosemite/editing/deleting/delete-emoji-expected.txt:
* platform/mac/editing/deleting/delete-emoji-expected.txt:
* editing/deleting/delete-emoji.html:
* fast/text/emoji-num-glyphs-expected.txt:
* fast/text/emoji-num-glyphs.html:

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

3 years agoAdd support for a ternary sub32 emitter for ARM64 and 32-bit ARM.
mark.lam@apple.com [Thu, 8 Sep 2016 20:05:28 +0000 (20:05 +0000)]
Add support for a ternary sub32 emitter for ARM64 and 32-bit ARM.
https://bugs.webkit.org/show_bug.cgi?id=161724

Reviewed by Filip Pizlo.

ARM architectures support ternary sub instructions.  We should make use of them
in emitAllocateWithNonNullAllocator().

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::sub32):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::sub32):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::sub32):
* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::sub32):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::sub32):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::testTernarySubInstructionSelection):
(JSC::B3::run):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator):

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

3 years agoHTMLImageElement.width / height attributes should be unsigned
cdumez@apple.com [Thu, 8 Sep 2016 19:46:10 +0000 (19:46 +0000)]
HTMLImageElement.width / height attributes should be unsigned
https://bugs.webkit.org/show_bug.cgi?id=161730

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

HTMLImageElement.width / height attributes should be unsigned as per
the HTML specification:
- https://html.spec.whatwg.org/#htmlimageelement

However, they are signed in WebKit. Firefox agrees with the
specification.

No new tests, rebaselined existing test.

* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::construct):
(WebCore::createImageConstructor): Deleted.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::createForJSConstructor):
(WebCore::HTMLImageElement::width):
(WebCore::HTMLImageElement::height):
(WebCore::HTMLImageElement::setHeight):
(WebCore::HTMLImageElement::setWidth):
* html/HTMLImageElement.h:
* html/HTMLImageElement.idl:
* html/ImageDocument.cpp:
(WebCore::ImageDocument::restoreImageSize):

LayoutTests:

Update existing test to reflect behavior change.

* js/dom/custom-constructors-expected.txt:
* js/dom/script-tests/custom-constructors.js:

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

3 years agoMove JSMap/JSSet over to Auxiliary MarkedSpace
fpizlo@apple.com [Thu, 8 Sep 2016 18:59:02 +0000 (18:59 +0000)]
Move JSMap/JSSet over to Auxiliary MarkedSpace
https://bugs.webkit.org/show_bug.cgi?id=161744

Reviewed by Saam Barati.
Source/JavaScriptCore:

This moves the buffer out of CopiedSpace and into Auxiliary MarkedSpace.

Also removes MapData.h/MapDataInlines.h since they are not used anywhere, but they still
speak of CopiedSpace.

This is a purely mechanical change.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/CopyToken.h:
* runtime/HashMapImpl.cpp:
(JSC::HashMapImpl<HashMapBucket>::visitChildren):
(JSC::HashMapImpl<HashMapBucket>::copyBackingStore): Deleted.
* runtime/HashMapImpl.h:
(JSC::HashMapBuffer::create):
* runtime/JSMapIterator.cpp:
* runtime/JSMapIterator.h:
* runtime/JSSetIterator.cpp:
* runtime/JSSetIterator.h:
* runtime/MapBase.cpp:
* runtime/MapData.h: Removed.
* runtime/MapDataInlines.h: Removed.
* runtime/MapPrototype.cpp:
* runtime/SetConstructor.cpp:
* runtime/SetPrototype.cpp:
* runtime/VM.cpp:

Source/WebCore:

No new tests because no change in behavior.

* bindings/js/SerializedScriptValue.cpp:

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