WebKit-https.git
2 years agoUnreviewed, followup patch after r209059.
jiewen_tan@apple.com [Tue, 29 Nov 2016 05:49:36 +0000 (05:49 +0000)]
Unreviewed, followup patch after r209059.

* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
* crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
* crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

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

2 years ago[Mac][WK2] Enable HTML interactive form validation
cdumez@apple.com [Tue, 29 Nov 2016 05:37:12 +0000 (05:37 +0000)]
[Mac][WK2] Enable HTML interactive form validation
https://bugs.webkit.org/show_bug.cgi?id=165123
<rdar://problem/28944652>

Reviewed by Simon Fraser.

Enable HTML interactive form validation now that we have a native UI
for it.

* Shared/WebPreferencesDefinitions.h:

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

2 years agoASSERTION FAILED: m_scriptExecutionContext->isContextThread() seen with LayoutTest...
jiewen_tan@apple.com [Tue, 29 Nov 2016 04:49:54 +0000 (04:49 +0000)]
ASSERTION FAILED: m_scriptExecutionContext->isContextThread() seen with LayoutTest crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html
https://bugs.webkit.org/show_bug.cgi?id=165124
<rdar://problem/29413805>

Reviewed by Daniel Bates.

We should only dereference callbacks after being back to the Document/Worker threads as
it might destroy promises in the work queue which will then trigger the assertion.

Covered by existing tests.

* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
* crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
* crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

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

2 years agoStreamline and speed up tokenizer and segmented string classes
darin@apple.com [Tue, 29 Nov 2016 04:29:55 +0000 (04:29 +0000)]
Streamline and speed up tokenizer and segmented string classes
https://bugs.webkit.org/show_bug.cgi?id=165003

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue): Use viewWithUnderlyingString when calling
StringBuilder::appendQuotedJSONString, since it now takes a StringView and there is
no benefit in creating a String for that function if one doesn't already exist.

Source/WebCore:

Profiling Speedometer on my iMac showed the tokenizer as one of the
hottest functions. This patch streamlines the segmented string class,
removing various unused features, and also improves some other functions
seen on the Speedometer profile. On my iMac I measured a speedup of
about 3%. Changes include:

- Removed m_pushedChar1, m_pushedChar2, and m_empty data members from the
  SegmentedString class and all the code that used to handle them.

- Simplified the SegmentedString advance functions so they are small
  enough to get inlined in the HTML tokenizer.

- Updated callers to call the simpler SegmentedString advance functions
  that don't handle newlines in as many cases as possible.

- Cut down on allocations of SegmentedString and made code move the
  segmented string and the strings that are moved into it rather than
  copying them whenever possible.

- Simplified segmented string functions, removing some branches, mostly
  from the non-fast paths.

- Removed small unused functions and small functions used in only one
  or two places, made more functions private and renamed for clarity.

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::documentWrite): Moved a little more of the common code in here
from the two functions belwo. Removed obsolete comment saying this was not
following the DOM specification because it is. Removed unneeded special
cases for 1 argument and no arguments. Take a reference instead of a pointer.
(WebCore::JSHTMLDocument::write): Updated for above.
(WebCore::JSHTMLDocument::writeln): Ditto.

* css/parser/CSSTokenizer.cpp: Added now-needed include.
* css/parser/CSSTokenizer.h: Removed unneeded include.

* css/parser/CSSTokenizerInputStream.h: Added definition of kEndOfFileMarker
here; this is now separate from the use in the HTMLParser. In the long run,
unclear to me whether it is really needed in either.

* dom/Document.cpp:
(WebCore::Document::prepareToWrite): Added. Helper function used by the three
different variants of write. Using this may prevent us from having to construct
a SegmentedString just to append one string after future refactoring.
(WebCore::Document::write): Updated to take an rvalue reference and move the
value through.
(WebCore::Document::writeln): Use a single write call instead of two.

* dom/Document.h: Changed write to take an rvalue reference to SegmentedString
rather than a const reference.

* dom/DocumentParser.h: Changed insert to take an rvalue reference to
SegmentedString. In the future, should probably overload to take a single
string since that is the normal case.

* dom/RawDataDocumentParser.h: Updated for change to DocumentParser.

* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::append): Refactored a bit, just enough
so that we don't need an assignment operator for SegmentedString that can
copy a String.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::insert): Updated to take an rvalue reference,
and move the value through.
* html/parser/HTMLDocumentParser.h: Updated for the above.

* html/parser/HTMLEntityParser.cpp:
(WebCore::HTMLEntityParser::consumeNamedEntity): Updated for name changes.
Changed the twao calls to advance here to call advancePastNonNewline; no
change in behavior, but asserts what the code was assuming before, that the
character was not a newline.

* html/parser/HTMLInputStream.h:
(WebCore::HTMLInputStream::appendToEnd): Updated to take an rvalue reference,
and move the value through.
(WebCore::HTMLInputStream::insertAtCurrentInsertionPoint): Ditto.
(WebCore::HTMLInputStream::markEndOfFile): Removed the code to construct a
SegmentedString, overkill since we can just append an individual string.
(WebCore::HTMLInputStream::splitInto): Rewrote the move idiom here to actually
use move, which will reduce reference count churn and other unneeded work.

* html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Removed unneeded
construction of a SegmentedString, just to append a string.

* html/parser/HTMLSourceTracker.cpp:
(WebCore::HTMLSourceTracker::HTMLSourceTracker): Moved to the class definition.
(WebCore::HTMLSourceTracker::source): Updated for function name change.
* html/parser/HTMLSourceTracker.h: Updated for above.

* html/parser/HTMLTokenizer.cpp: Added now-needed include.
(WebCore::HTMLTokenizer::emitAndResumeInDataState): Use advancePastNonNewline,
since this function is never called in response to a newline character.
(WebCore::HTMLTokenizer::commitToPartialEndTag): Ditto.
(WebCore::HTMLTokenizer::commitToCompleteEndTag): Ditto.
(WebCore::HTMLTokenizer::processToken): Use ADVANCE_PAST_NON_NEWLINE_TO macro
instead of ADVANCE_TO in cases where the character we are advancing past is
known not to be a newline, so we can use the more efficient advance function
that doesn't check for the newline character.

* html/parser/InputStreamPreprocessor.h: Moved kEndOfFileMarker to
SegmentedString.h; not sure that's a good place for it either. In the long run,
unclear to me whether this is really needed.
(WebCore::InputStreamPreprocessor::peek): Added UNLIKELY for the empty check.
Added LIKELY for the not-special character check.
(WebCore::InputStreamPreprocessor::advance): Updated for the new name of the
advanceAndUpdateLineNumber function.
(WebCore::InputStreamPreprocessor::advancePastNonNewline): Added. More
efficient than advance for cases where the last characer is known not to be
a newline character.
(WebCore::InputStreamPreprocessor::skipNextNewLine): Deleted. Was unused.
(WebCore::InputStreamPreprocessor::reset): Deleted. Was unused except in the
constructor; added initial values for the data members to replace.
(WebCore::InputStreamPreprocessor::processNextInputCharacter): Removed long
FIXME comment that didn't really need to be here. Reorganized a bit.
(WebCore::InputStreamPreprocessor::isAtEndOfFile): Renamed and made static.

* html/track/BufferedLineReader.cpp:
(WebCore::BufferedLineReader::nextLine): Updated to not use the poorly named
scanCharacter function to advance past a newline. Also renamed from getLine
and changed to return Optional<String> instead of using a boolean to indicate
failure and an out argument.

* html/track/BufferedLineReader.h:
(WebCore::BufferedLineReader::BufferedLineReader): Use the default, putting
initial values on each data member below.
(WebCore::BufferedLineReader::append): Updated to take an rvalue reference,
and move the value through.
(WebCore::BufferedLineReader::scanCharacter): Deleted. Was poorly named,
and easy to replace with two lines of code at its two call sites.
(WebCore::BufferedLineReader::reset): Rewrote to correctly clear all the
data members of the class, not just the segmented string.

* html/track/InbandGenericTextTrack.cpp:
(WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Updated to take
an rvalue reference and move the value through.
* html/track/InbandGenericTextTrack.h: Updated for the above.

* html/track/InbandTextTrack.h: Updated since parseWebVTTFileHeader now
takes an rvalue reference.

* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseFileHeader): Updated to take an rvalue reference
and move the value through.
(WebCore::WebVTTParser::parseBytes): Updated to pass ownership of the string
in to the line reader append function.
(WebCore::WebVTTParser::parseCueData): Use auto and WTFMove for WebVTTCueData.
(WebCore::WebVTTParser::flush): More of the same.
(WebCore::WebVTTParser::parse): Changed to use nextLine instead of getLine.
* html/track/WebVTTParser.h: Updated for the above.

* html/track/WebVTTTokenizer.cpp:
(WebCore::advanceAndEmitToken): Use advanceAndUpdateLineNumber by its new
name, just advance. No change in behavior.
(WebCore::WebVTTTokenizer::WebVTTTokenizer): Pass a String, not a
SegmentedString, to add the end of file marker.

* platform/graphics/InbandTextTrackPrivateClient.h: Updated since
parseWebVTTFileHeader takes an rvalue reference.

* platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::Substring::appendTo): Moved here from the header.
The only caller is SegmentedString::toString, inside this file.
(WebCore::SegmentedString::SegmentedString): Deleted the copy constructor.
No longer needed.
(WebCore::SegmentedString::operator=): Defined a move assignment operator
rather than an ordinary assignment operator, since that's what the call
sites really need.
(WebCore::SegmentedString::length): Simplified since we no longer need to
support pushed characters.
(WebCore::SegmentedString::setExcludeLineNumbers): Simplified, since we
can just iterate m_otherSubstrings without an extra check. Also changed to
write directly to the data member of Substring instead of using a function.
(WebCore::SegmentedString::updateAdvanceFunctionPointersForEmptyString):
Added. Used when we run out of characters.
(WebCore::SegmentedString::clear): Removed code to clear now-deleted members.
Updated for changes to other member names.
(WebCore::SegmentedString::appendSubstring): Renamed from just append to
avoid ambiguity with the public append function. Changed to take an rvalue
reference, and move in, and added code to set m_currentCharacter properly,
so the caller doesn't have to deal with that.
(WebCore::SegmentedString::close): Updated to use m_isClosed by its new name.
Also removed unneeded comment about assertion that fires when trying to close
an already closed string.
(WebCore::SegmentedString::append): Added overloads for rvalue references of
both entire SegmentedString objects and of String. Streamlined to just call
appendSubstring and append to the deque.
(WebCore::SegmentedString::pushBack): Tightened up since we don't allow empty
strings and changed to take just a string, not an entire segmented string.
(WebCore::SegmentedString::advanceSubstring): Moved logic into the
advancePastSingleCharacterSubstringWithoutUpdatingLineNumber function.
(WebCore::SegmentedString::toString): Simplified now that we don't need to
support pushed characters.
(WebCore::SegmentedString::advancePastNonNewlines): Deleted.
(WebCore::SegmentedString::advance8): Deleted.
(WebCore::SegmentedString::advanceWithoutUpdatingLineNumber16): Renamed from
advance16. Simplified now that there are no pushed characters. Also changed to
access data members of m_currentSubstring directly instead of calling a function.
(WebCore::SegmentedString::advanceAndUpdateLineNumber8): Deleted.
(WebCore::SegmentedString::advanceAndUpdateLineNumber16): Ditto.
(WebCore::SegmentedString::advancePastSingleCharacterSubstringWithoutUpdatingLineNumber):
Renamed from advanceSlowCase. Removed uneeded logic to handle pushed characters.
Moved code in here from advanceSubstring.
(WebCore::SegmentedString::advancePastSingleCharacterSubstring): Renamed from
advanceAndUpdateLineNumberSlowCase. Simplified by calling the function above.
(WebCore::SegmentedString::advanceEmpty): Broke assertion up into two.
(WebCore::SegmentedString::updateSlowCaseFunctionPointers): Updated for name changes.
(WebCore::SegmentedString::advancePastSlowCase): Changed name and meaning of
boolean argument. Rewrote to use the String class less; it's now used only when
we fail to match after the first character rather than being used for the actual
comparison with the literal.

* platform/text/SegmentedString.h: Moved all non-trivial function bodies out of
the class definition to make things easier to read. Moved the SegmentedSubstring
class inside the SegmentedString class, making it a private struct named Substring.
Removed the m_ prefix from data members of the struct, removed many functions from
the struct and made its union be anonymous instead of naming it m_data. Removed
unneeded StringBuilder.h include.
(WebCore::SegmentedString::isEmpty): Changed to use the length of the substring
instead of a separate boolean. We never create an empty substring, nor leave one
in place as the current substring unless the entire segmented string is empty.
(WebCore::SegmentedString::advancePast): Updated to use the new member function
template instead of a non-template member function. The new member function is
entirely rewritten and does the matching directly rather than allocating a string
just to do prefix matching.
(WebCore::SegmentedString::advancePastLettersIgnoringASCIICase): Renamed to make
it clear that the literal must be all non-letters or lowercase letters as with
the other "letters ignoring ASCII case" functions. The three call sites all fit
the bill. Implement by calling the new function template.
(WebCore::SegmentedString::currentCharacter): Renamed from currentChar.
(WebCore::SegmentedString::Substring::Substring): Use an rvalue reference and
move the string in.
(WebCore::SegmentedString::Substring::currentCharacter): Simplified since this
is never used on an empty substring.
(WebCore::SegmentedString::Substring::incrementAndGetCurrentCharacter): Ditto.
(WebCore::SegmentedString::SegmentedString): Overload to take an rvalue reference.
Simplified since there are now fewer data members.
(WebCore::SegmentedString::advanceWithoutUpdatingLineNumber): Renamed from
advance, since this is only safe to use if there is some reason it is OK to skip
updating the line number.
(WebCore::SegmentedString::advance): Renamed from advanceAndUpdateLineNumber,
since doing that is the normal desired behavior and not worth mentioning in the
public function name.
(WebCore::SegmentedString::advancePastNewline): Renamed from
advancePastNewlineAndUpdateLineNumber.
(WebCore::SegmentedString::numberOfCharactersConsumed): Greatly simplified since
pushed characters are no longer supported.
(WebCore::SegmentedString::characterMismatch): Added. Used by advancePast.

* xml/parser/CharacterReferenceParserInlines.h:
(WebCore::unconsumeCharacters): Use toString rather than toStringPreserveCapacity
because the SegmentedString is going to take ownership of the string.
(WebCore::consumeCharacterReference): Updated to use the pushBack that takes just
a String, not a SegmentedString. Also use advancePastNonNewline.

* xml/parser/MarkupTokenizerInlines.h: Added ADVANCE_PAST_NON_NEWLINE_TO.

* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::insert): Updated since this takes an rvalue reference.
(WebCore::XMLDocumentParser::append): Removed unnecessary code to create a
SegmentedString.
* xml/parser/XMLDocumentParser.h: Updated for above. Also fixed indentation
and initialized most data members.
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser): Moved most data member
initialization into the class definition.
(WebCore::XMLDocumentParser::resumeParsing): Removed code that copied a
segmented string, but converted the whole thing into a string before using it.
Now we convert to a string right away.

Source/WTF:

* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::bufferCharacters<LChar>): Moved this here from
the header since it is only used inside the class. Also renamed from
getBufferCharacters.
(WTF::StringBuilder::bufferCharacters<UChar>): Ditto.
(WTF::StringBuilder::appendUninitializedUpconvert): Added. Helper
for the upconvert case in the 16-bit overload of StrinBuilder::append.
(WTF::StringBuilder::append): Changed to use appendUninitializedUpconvert.
(WTF::quotedJSONStringLength): Added. Used in new appendQuotedJSONString
implementation below that now correctly determines the size of what will
be appended by walking thorugh the string twice.
(WTF::appendQuotedJSONStringInternal): Moved the code that writes the
quote marks in here. Also made a few coding style tweaks.
(WTF::StringBuilder::appendQuotedJSONString): Rewrote to use a much
simpler algorithm that grows the string the same way the append function
does. The old code would use reserveCapacity in a way that was costly when
doing a lot of appends on the same string, and also allocated far too much
memory for normal use cases where characters did not need to be turned
into escape sequences.

* wtf/text/StringBuilder.h:
(WTF::StringBuilder::append): Tweaked style a bit, fixed a bug where the
m_is8Bit field wasn't set correctly in one case, optimized the function that
adds substrings for the case where this is the first append and the substring
happens to cover the entire string. Also clarified the assertions and removed
an unneeded check from that substring overload.
(WTF::equal): Reimplemented, using equalCommon.

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

2 years agoGenerated sandbox profile is not being put in the correct Resources directory
bfulgham@apple.com [Tue, 29 Nov 2016 02:29:41 +0000 (02:29 +0000)]
Generated sandbox profile is not being put in the correct Resources directory
https://bugs.webkit.org/show_bug.cgi?id=165126

Reviewed by Tim Horton.

* WebKit2.xcodeproj/project.pbxproj: Copy the generated file to the 'PlugInSandboxProfiles'
sub-directory.

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

2 years agoRoll r208589 back in. The rollout will be on the Safari-603.1.13.1 tag. rdar://proble...
matthew_hanson@apple.com [Tue, 29 Nov 2016 02:20:20 +0000 (02:20 +0000)]
Roll r208589 back in. The rollout will be on the Safari-603.1.13.1 tag. rdar://problem/29277451

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

2 years agoRoll out r208589. rdar://problem/29277451
matthew_hanson@apple.com [Tue, 29 Nov 2016 02:16:37 +0000 (02:16 +0000)]
Roll out r208589. rdar://problem/29277451

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

2 years ago[iOS] Use UIKit SPI to force popover presentation style on iPhone for html validation...
cdumez@apple.com [Tue, 29 Nov 2016 01:08:46 +0000 (01:08 +0000)]
[iOS] Use UIKit SPI to force popover presentation style on iPhone for html validation popovers
https://bugs.webkit.org/show_bug.cgi?id=165107

Reviewed by Simon Fraser.

Use UIKit SPI to force popover presentation style on iPhone for html validation
popovers as this results in simpler code and achieves the same behavior.

* platform/ValidationBubble.h:
* platform/ios/ValidationBubbleIOS.mm:
(WebCore::ValidationBubble::setAnchorRect):
(-[WebValidationBubbleDelegate adaptivePresentationStyleForPresentationController:traitCollection:]): Deleted.
* platform/spi/ios/UIKitSPI.h:

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

2 years ago[Mac] Clicking on an HTML validation bubble should dismiss it
cdumez@apple.com [Tue, 29 Nov 2016 01:08:29 +0000 (01:08 +0000)]
[Mac] Clicking on an HTML validation bubble should dismiss it
https://bugs.webkit.org/show_bug.cgi?id=165117
<rdar://problem/29409837>

Reviewed by Simon Fraser.

Clicking on an HTML validation bubble should dismiss it. It previously
did nothing.

No new tests, this is not easily testable as EventSender.keyDown() sends
the event to the view, not to a particular screen location.

* platform/mac/ValidationBubbleMac.mm:
(-[WebValidationPopover mouseDown:]):
(WebCore::ValidationBubble::ValidationBubble):

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

2 years agoMake CanvasRenderingContext2D use WebIDL unions / Variants for createPattern and...
weinig@apple.com [Tue, 29 Nov 2016 01:03:48 +0000 (01:03 +0000)]
Make CanvasRenderingContext2D use WebIDL unions / Variants for createPattern and drawImage
https://bugs.webkit.org/show_bug.cgi?id=165086

Reviewed by Darin Adler.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::size):
Add overloads of size for each type of CanvasSource.
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::createPattern):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/CanvasRenderingContext2D.idl:
Use variants to reduce code duplication and match spec language in drawImage and createPattern.

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

2 years agoBlacklist Netflix for TouchBar support
bdakin@apple.com [Tue, 29 Nov 2016 00:14:53 +0000 (00:14 +0000)]
Blacklist Netflix for TouchBar support
https://bugs.webkit.org/show_bug.cgi?id=165104
-and corresponding-
rdar://problem/29404778

Reviewed by Tim Horton.

This patch moves the algorithm to
bestMediaElementForShowingPlaybackControlsManager() so that Now Playing can also
use it.
* html/HTMLMediaElement.cpp:
(WebCore::needsPlaybackControlsManagerQuirk):
(WebCore::HTMLMediaElement::bestMediaElementForShowingPlaybackControlsManager):
(WebCore::HTMLMediaElement::updatePlaybackControlsManager):

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

2 years agoFix exception scope verification failures in runtime/Intl* files.
mark.lam@apple.com [Mon, 28 Nov 2016 23:56:06 +0000 (23:56 +0000)]
Fix exception scope verification failures in runtime/Intl* files.
https://bugs.webkit.org/show_bug.cgi?id=165014

Reviewed by Saam Barati.

* runtime/IntlCollatorConstructor.cpp:
(JSC::constructIntlCollator):
(JSC::IntlCollatorConstructorFuncSupportedLocalesOf):
* runtime/IntlCollatorPrototype.cpp:
(JSC::IntlCollatorPrototypeFuncResolvedOptions):
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::constructIntlDateTimeFormat):
(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatFuncFormatDateTime):
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::constructIntlNumberFormat):
(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):
* runtime/IntlNumberFormatPrototype.cpp:
(JSC::IntlNumberFormatFuncFormatNumber):
(JSC::IntlNumberFormatPrototypeGetterFormat):
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):
* runtime/IntlObject.cpp:
(JSC::lookupSupportedLocales):
* runtime/IntlObjectInlines.h:
(JSC::constructIntlInstanceWithWorkaroundForLegacyIntlConstructor):

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

2 years agoFix exception scope verification failures in IteratorOperations.h.
mark.lam@apple.com [Mon, 28 Nov 2016 23:53:33 +0000 (23:53 +0000)]
Fix exception scope verification failures in IteratorOperations.h.
https://bugs.webkit.org/show_bug.cgi?id=165015

Reviewed by Saam Barati.

* runtime/IteratorOperations.h:
(JSC::forEachInIterable):

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

2 years agoFix exception scope verification failures in JSArray* files.
mark.lam@apple.com [Mon, 28 Nov 2016 23:50:16 +0000 (23:50 +0000)]
Fix exception scope verification failures in JSArray* files.
https://bugs.webkit.org/show_bug.cgi?id=165016

Reviewed by Saam Barati.

* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
(JSC::JSArray::put):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCountWithAnyIndexingType):
* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::put):
(JSC::JSArrayBuffer::defineOwnProperty):
* runtime/JSArrayInlines.h:
(JSC::getLength):
(JSC::toLength):

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

2 years agoFix exception scope verification failures in JSDataView.cpp.
mark.lam@apple.com [Mon, 28 Nov 2016 23:40:53 +0000 (23:40 +0000)]
Fix exception scope verification failures in JSDataView.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165020

Reviewed by Saam Barati.

* runtime/JSDataView.cpp:
(JSC::JSDataView::put):

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

2 years agoFix exception scope verification failures in JSFunction.cpp.
mark.lam@apple.com [Mon, 28 Nov 2016 23:38:17 +0000 (23:38 +0000)]
Fix exception scope verification failures in JSFunction.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165021

Reviewed by Saam Barati.

* runtime/JSFunction.cpp:
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):

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

2 years agoFix exception scope verification failures in runtime/JSGenericTypedArrayView* files.
mark.lam@apple.com [Mon, 28 Nov 2016 23:30:59 +0000 (23:30 +0000)]
Fix exception scope verification failures in runtime/JSGenericTypedArrayView* files.
https://bugs.webkit.org/show_bug.cgi?id=165022

Reviewed by Saam Barati.

* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewFromIterator):
(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayView):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::set):
(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::speciesConstruct):
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncJoin):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

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

2 years agoFix exception scope verification failures in runtime/Operations.cpp/h.
mark.lam@apple.com [Mon, 28 Nov 2016 23:23:40 +0000 (23:23 +0000)]
Fix exception scope verification failures in runtime/Operations.cpp/h.
https://bugs.webkit.org/show_bug.cgi?id=165046

Reviewed by Saam Barati.

Also switched to using returning { } instead of JSValue().

* runtime/Operations.cpp:
(JSC::jsAddSlowCase):
(JSC::jsIsObjectTypeOrNull):
* runtime/Operations.h:
(JSC::jsStringFromRegisterArray):
(JSC::jsStringFromArguments):
(JSC::jsLess):
(JSC::jsLessEq):

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

2 years agoFix exception scope verification failures in JSScope.cpp.
mark.lam@apple.com [Mon, 28 Nov 2016 23:14:43 +0000 (23:14 +0000)]
Fix exception scope verification failures in JSScope.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165047

Reviewed by Saam Barati.

* runtime/JSScope.cpp:
(JSC::JSScope::resolve):

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

2 years agoFix exception scope verification failures in JSTypedArrayViewPrototype.cpp.
mark.lam@apple.com [Mon, 28 Nov 2016 23:07:33 +0000 (23:07 +0000)]
Fix exception scope verification failures in JSTypedArrayViewPrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165049

Reviewed by Saam Barati.

* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::typedArrayViewPrivateFuncSort):
(JSC::typedArrayViewProtoFuncSet):
(JSC::typedArrayViewProtoFuncCopyWithin):
(JSC::typedArrayViewProtoFuncIncludes):
(JSC::typedArrayViewProtoFuncLastIndexOf):
(JSC::typedArrayViewProtoFuncIndexOf):
(JSC::typedArrayViewProtoFuncJoin):
(JSC::typedArrayViewProtoGetterFuncBuffer):
(JSC::typedArrayViewProtoGetterFuncLength):
(JSC::typedArrayViewProtoGetterFuncByteLength):
(JSC::typedArrayViewProtoGetterFuncByteOffset):
(JSC::typedArrayViewProtoFuncReverse):
(JSC::typedArrayViewPrivateFuncSubarrayCreate):
(JSC::typedArrayViewProtoFuncSlice):

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

2 years agoFix exception scope verification failures in runtime/Map* files.
mark.lam@apple.com [Mon, 28 Nov 2016 23:00:38 +0000 (23:00 +0000)]
Fix exception scope verification failures in runtime/Map* files.
https://bugs.webkit.org/show_bug.cgi?id=165050

Reviewed by Saam Barati.

* runtime/MapConstructor.cpp:
(JSC::constructMap):
* runtime/MapIteratorPrototype.cpp:
(JSC::MapIteratorPrototypeFuncNext):
* runtime/MapPrototype.cpp:
(JSC::privateFuncMapIteratorNext):

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

2 years agoFix exception scope verification failures in more miscellaneous files.
mark.lam@apple.com [Mon, 28 Nov 2016 22:56:08 +0000 (22:56 +0000)]
Fix exception scope verification failures in more miscellaneous files.
https://bugs.webkit.org/show_bug.cgi?id=165102

Reviewed by Saam Barati.

Source/JavaScriptCore:

* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance):

Source/WebCore:

No new tests because these are fixes to failures detected by existing tests when
exception check verification is enabled.

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::toJS):
* bindings/js/JSCommandLineAPIHostCustom.cpp:
(WebCore::getJSListenerFunctions):
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::buildJSONForRSAComponents):
(WebCore::addUsagesToJSON):
* bindings/js/JSDOMBinding.h:
(WebCore::toJS):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::put):

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

2 years agoUnreviewed, rolling out r209008.
ryanhaddad@apple.com [Mon, 28 Nov 2016 22:41:23 +0000 (22:41 +0000)]
Unreviewed, rolling out r209008.

This change appears to have caused two fast/mediastrem
LayoutTests to fail.

Reverted changeset:

"[MediaStream] Don't request user permission for a device if
it has already been granted in the current browsing context"
https://bugs.webkit.org/show_bug.cgi?id=164760
http://trac.webkit.org/changeset/209008

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

2 years agoFix exception scope verification failures in runtime/Weak* files.
mark.lam@apple.com [Mon, 28 Nov 2016 22:39:10 +0000 (22:39 +0000)]
Fix exception scope verification failures in runtime/Weak* files.
https://bugs.webkit.org/show_bug.cgi?id=165096

Reviewed by Geoffrey Garen.

* runtime/WeakMapConstructor.cpp:
(JSC::constructWeakMap):
* runtime/WeakMapPrototype.cpp:
(JSC::protoFuncWeakMapSet):
* runtime/WeakSetConstructor.cpp:
(JSC::constructWeakSet):
* runtime/WeakSetPrototype.cpp:
(JSC::protoFuncWeakSetAdd):

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

2 years agoFix exception scope verification failures in runtime/String* files.
mark.lam@apple.com [Mon, 28 Nov 2016 22:35:39 +0000 (22:35 +0000)]
Fix exception scope verification failures in runtime/String* files.
https://bugs.webkit.org/show_bug.cgi?id=165067

Reviewed by Saam Barati.

* runtime/StringConstructor.cpp:
(JSC::stringFromCodePoint):
(JSC::constructWithStringConstructor):
* runtime/StringObject.cpp:
(JSC::StringObject::put):
(JSC::StringObject::putByIndex):
(JSC::StringObject::defineOwnProperty):
* runtime/StringPrototype.cpp:
(JSC::jsSpliceSubstrings):
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::replaceUsingRegExpSearch):
(JSC::replaceUsingStringSearch):
(JSC::repeatCharacter):
(JSC::replace):
(JSC::stringProtoFuncReplaceUsingStringSearch):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCodePointAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::splitStringByOneCharacterImpl):
(JSC::stringProtoFuncSplitFast):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::toLocaleCase):
(JSC::trimString):
(JSC::stringProtoFuncIncludes):
(JSC::builtinStringIncludesInternal):
(JSC::stringProtoFuncIterator):
(JSC::normalize):
(JSC::stringProtoFuncNormalize):

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

2 years ago[CSS Parser] Fix bugs in the @supports parser
hyatt@apple.com [Mon, 28 Nov 2016 22:30:11 +0000 (22:30 +0000)]
[CSS Parser] Fix bugs in the @supports parser
https://bugs.webkit.org/show_bug.cgi?id=165115

Reviewed by Zalan Bujtas.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Clean up the display property to match the old parser to ensure
that @supports conditions on display are the same.

* css/parser/CSSSupportsParser.cpp:
(WebCore::CSSSupportsParser::consumeCondition):
(WebCore::CSSSupportsParser::consumeNegation):
(WebCore::CSSSupportsParser::consumeConditionInParenthesis):
* css/parser/CSSSupportsParser.h:
What follows are all bugs in Blink that need to be fixed to pass our
tests.

Fix the supports parser to allow the whitespace after not/or/and to
be optional. Allow the whitespace following parenthetical conditions
to be optional.

With whitespace being optional, this means that "not(" will parse
as a FunctionToken type, as will "or(" and "and(". Handle this situation
by checking for FunctionToken along with IdentToken and parameterizing
consumeConditionInParenthesis to do the right thing when it starts with
a FunctionToken instead of an IdentToken.

Fix the general enclosure FunctionToken for forward compatibility to require that
the function still be enclosed within parentheses.

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

2 years agoFix exception scope verification failures in ObjectConstructor.cpp and ObjectPrototyp...
mark.lam@apple.com [Mon, 28 Nov 2016 22:29:39 +0000 (22:29 +0000)]
Fix exception scope verification failures in ObjectConstructor.cpp and ObjectPrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165051

Reviewed by Saam Barati.

Source/JavaScriptCore:

Also,
1. Replaced returning JSValue() with returning { }.
2. Replaced uses of exec->propertyNames() with vm.propertyNames.

* runtime/ObjectConstructor.cpp:
(JSC::constructObject):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyDescriptors):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorGetOwnPropertySymbols):
(JSC::objectConstructorKeys):
(JSC::ownEnumerablePropertyKeys):
(JSC::toPropertyDescriptor):
(JSC::defineProperties):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
(JSC::setIntegrityLevel):
(JSC::objectConstructorSeal):
(JSC::objectConstructorPreventExtensions):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
(JSC::ownPropertyKeys):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):

Source/WebCore:

No new tests because this is covered by the existing test
http/tests/security/cross-frame-access-object-prototype.html with the help of a
new ASSERT in ObjectPrototype.cpp.

Fixed jsDOMWindowGetOwnPropertySlotRestrictedAccess() to return false when it
throws an exception.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):

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

2 years agoObvious change in saturation/color when swiping to a previously visited page
timothy_horton@apple.com [Mon, 28 Nov 2016 22:24:08 +0000 (22:24 +0000)]
Obvious change in saturation/color when swiping to a previously visited page
https://bugs.webkit.org/show_bug.cgi?id=165112
<rdar://problem/29257229>

Reviewed by Simon Fraser.

* platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::createFromImage):
IOSurface::createFromImage should take into account the colorspace of the
originating image, instead of just hardcoding sRGB.

Otherwise, on a non-sRGB display, the display-space snapshot that we take
for back-forward swipe is converted to sRGB, then the colorspace information
is lost (without a way to maintain it inside the IOSurface), and displayed
as layer contents interpreted as display space (instead of sRGB).

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

2 years agoFix exception scope verification failures in miscellaneous files.
mark.lam@apple.com [Mon, 28 Nov 2016 22:21:29 +0000 (22:21 +0000)]
Fix exception scope verification failures in miscellaneous files.
https://bugs.webkit.org/show_bug.cgi?id=165055

Reviewed by Saam Barati.

* runtime/MathObject.cpp:
(JSC::mathProtoFuncIMul):
* runtime/ModuleLoaderPrototype.cpp:
(JSC::moduleLoaderPrototypeParseModule):
(JSC::moduleLoaderPrototypeRequestedModules):
* runtime/NativeErrorConstructor.cpp:
(JSC::Interpreter::constructWithNativeErrorConstructor):
* runtime/NumberConstructor.cpp:
(JSC::constructWithNumberConstructor):
* runtime/SetConstructor.cpp:
(JSC::constructSet):
* runtime/SetIteratorPrototype.cpp:
(JSC::SetIteratorPrototypeFuncNext):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::putEntry):
(JSC::SparseArrayEntry::put):
* runtime/TemplateRegistry.cpp:
(JSC::TemplateRegistry::getTemplateObject):

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

2 years agoUnreviewed, fix crashes on Yosemite after r209009
cdumez@apple.com [Mon, 28 Nov 2016 22:16:20 +0000 (22:16 +0000)]
Unreviewed, fix crashes on Yosemite after r209009

NSTextField's maximumNumberOfLines was introduced in ElCapitan so
disable it at compile-time on previous OSes for now.

* platform/mac/ValidationBubbleMac.mm:
(WebCore::ValidationBubble::ValidationBubble):

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

2 years agoFix exception scope verification failures in ReflectObject.cpp.
mark.lam@apple.com [Mon, 28 Nov 2016 22:13:57 +0000 (22:13 +0000)]
Fix exception scope verification failures in ReflectObject.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165066

Reviewed by Saam Barati.

* runtime/ReflectObject.cpp:
(JSC::reflectObjectConstruct):
(JSC::reflectObjectDefineProperty):
(JSC::reflectObjectEnumerate):
(JSC::reflectObjectGet):
(JSC::reflectObjectGetOwnPropertyDescriptor):
(JSC::reflectObjectGetPrototypeOf):
(JSC::reflectObjectOwnKeys):
(JSC::reflectObjectSet):

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

2 years agoUnreviewed, rolling out r208607.
krollin@apple.com [Mon, 28 Nov 2016 21:57:56 +0000 (21:57 +0000)]
Unreviewed, rolling out r208607.

The actual changes aren't inline with what was requested.

Reverted changeset:

"Reduce number of platformMemoryUsage calls"
https://bugs.webkit.org/show_bug.cgi?id=164375
http://trac.webkit.org/changeset/208607

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

2 years agoBlacklist Netflix for TouchBar support
bdakin@apple.com [Mon, 28 Nov 2016 21:42:56 +0000 (21:42 +0000)]
Blacklist Netflix for TouchBar support
https://bugs.webkit.org/show_bug.cgi?id=165104
-and corresponding-
rdar://problem/29404778

Reviewed by Darin Adler.

* html/HTMLMediaElement.cpp:
(WebCore::needsPlaybackControlsManagerQuirk):
(WebCore::HTMLMediaElement::updatePlaybackControlsManager):

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

2 years agoTeach webkitpy how to read CSSProperties.json r209001
dbates@webkit.org [Mon, 28 Nov 2016 21:37:07 +0000 (21:37 +0000)]
Teach webkitpy how to read CSSProperties.json r209001
https://bugs.webkit.org/show_bug.cgi?id=165108

Reviewed by Simon Fraser.

Fix webkitpy logic so that it can read CSS property names from CSSProperties.json following r209001.

Following r209001 CSSPropertyNames.in no longer exists as it was replaced with CSSProperties.json.
We need to modify the webkitpy machinery that processed CSSPropertyNames.in to process CSSProperties.json.

* Scripts/webkitpy/w3c/test_converter.py:
(_W3CTestConverter.__init__): Make self._css_property_file and self._css_property_value_file local
variables as it is unnecessary for them to be instance variables. Call read_webkit_prefixed_css_property_list()
to read the property names from file CSSProperties.json. Call legacy_read_webkit_prefixed_css_property_list() to
read CSS keyword values from CSSValueKeywords.in.
(_W3CTestConverter.read_webkit_prefixed_css_property_list): Added.
(_W3CTestConverter):
(_W3CTestConverter.legacy_read_webkit_prefixed_css_property_list): Renamed from read_webkit_prefixed_css_property_list.
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_harnesslinks_conversion): Substitute CSSProperties.json for CSSPropertyNames.in.

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

2 years agoFix exception scope verification failures in ArrayConstructor.cpp and ArrayPrototype...
mark.lam@apple.com [Mon, 28 Nov 2016 21:26:10 +0000 (21:26 +0000)]
Fix exception scope verification failures in ArrayConstructor.cpp and ArrayPrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164972

Reviewed by Geoffrey Garen.

* runtime/ArrayConstructor.cpp:
(JSC::constructArrayWithSizeQuirk):
* runtime/ArrayPrototype.cpp:
(JSC::getProperty):
(JSC::putLength):
(JSC::speciesWatchpointsValid):
(JSC::speciesConstructArray):
(JSC::shift):
(JSC::unshift):
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::slowJoin):
(JSC::fastJoin):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
(JSC::concatAppendOne):
(JSC::arrayProtoPrivateFuncConcatMemcpy):
(JSC::ArrayPrototype::attemptToInitializeSpeciesWatchpoint):

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

2 years agoSupport for HTML Media Capture API
commit-queue@webkit.org [Mon, 28 Nov 2016 20:46:44 +0000 (20:46 +0000)]
Support for HTML Media Capture API
https://bugs.webkit.org/show_bug.cgi?id=43239

Patch by Andrew Gold <agold@apple.com> on 2016-11-28
Reviewed by Tim Horton.

In order to enable media capture on iOS, we must first use the AVFoundation API to
check/request capture permission from the user for Safari. Then, Safari must request
permission on behalf of the webpage to use the capture devices. Additionally, Safari
must present UI when the capture is taking place, so WebKit needs to notify the client
of a capture session beginning and ending. To do this, we added four methods to
WKUIDelegatePrivate to request permission from the user, check for permissions, notify
that a capture session has begun, and notify that a capture session has ended. Additionally,
we added a private method to WKWebView that allows the client to stop a capture session.

* UIProcess/API/APIUIClient.h:
(API::UIClient::didBeginCaptureSession): Notifies the client of a capture session beginning.
(API::UIClient::didEndCaptureSession): Notifies the client of a capture session ending.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added new delegate methods to request permission,
check for permission, notify of a capture session beginning, and notify of a capture session
ending.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _stopMediaCapture]): Cancels a media capture session.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): Added the new delegate methods.
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
First checks if the user has authorized the client application access capture devices,
then uses the WKUIDelegate to request permission for a site from the user.
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin): Checks the client
for permission to access capture devices.
(WebKit::UIDelegate::UIClient::didBeginCaptureSession): Notifies the client of a capture
session beginning.
(WebKit::UIDelegate::UIClient::didEndCaptureSession): Notifies the client of a capture
session ending.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::isPlayingMediaDidChange): Calls UIDelegate method to notify the
client of a capture session beginning/ending.

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

2 years agoLimit HTML Form validation popovers to 4 lines
cdumez@apple.com [Mon, 28 Nov 2016 20:45:27 +0000 (20:45 +0000)]
Limit HTML Form validation popovers to 4 lines
https://bugs.webkit.org/show_bug.cgi?id=165098
<rdar://problem/29403286>

Reviewed by Darin Adler.

Limit HTML Form validation popovers to 4 lines as per recent feedback.

* platform/ios/ValidationBubbleIOS.mm:
(WebCore::ValidationBubble::ValidationBubble):
* platform/mac/ValidationBubbleMac.mm:
(WebCore::ValidationBubble::ValidationBubble):

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

2 years ago[MediaStream] Don't request user permission for a device if it has already been grant...
eric.carlson@apple.com [Mon, 28 Nov 2016 20:45:12 +0000 (20:45 +0000)]
[MediaStream] Don't request user permission for a device if it has already been granted in the current browsing context
https://bugs.webkit.org/show_bug.cgi?id=164760
Source/WebKit2:

<rdar://problem/29261266>

Reviewed by Youenn Fablet.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::FrameAuthorizationState::FrameAuthorizationState):
(WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice):
(WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice):
(WebKit::FrameAuthorizationState::reset):
(WebKit::FrameAuthorizationState::securityOriginsAreEqual):
(WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests):
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
(WebKit::FrameAuthorizationState::~FrameAuthorizationState):
(WebKit::FrameAuthorizationState::frameID):
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::frameID):
(WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin):
(WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
(WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps):

Tools:

<rdar://problem/29261266>

Reviewed by Youenn Fablet.

Allow scripts to determine the number of times the user has been prompted for capture device access.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin):
(WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin):
(WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin):
(WTR::InjectedBundle::setUserMediaPermissionForOrigin): Deleted.
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setUserMediaPersistentPermissionForOrigin):
(WTR::TestRunner::userMediaPermissionRequestCountForOrigin):
(WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin):
(WTR::TestRunner::setUserMediaPermissionForOrigin): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::OriginSettings::incrementRequestCount):
(WTR::OriginSettings::resetRequestCount):
(WTR::OriginSettings::requestCount):
(WTR::TestController::saltForOrigin):
(WTR::TestController::setUserMediaPersistentPermissionForOrigin):
(WTR::TestController::handleCheckOfUserMediaPermissionForOrigin):
(WTR::TestController::settingsForOrigin):
(WTR::TestController::userMediaPermissionRequestCountForOrigin):
(WTR::TestController::resetUserMediaPermissionRequestCountForOrigin):
(WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible):
(WTR::TestController::setUserMediaPermissionForOrigin): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Reviewed by Youenn Fablet.

* fast/mediastream/MediaDevices-getUserMedia-expected.txt:
* fast/mediastream/MediaDevices-getUserMedia.html:

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

2 years agoFix exception scope verification failures in LLIntSlowPaths.cpp.
mark.lam@apple.com [Mon, 28 Nov 2016 20:44:25 +0000 (20:44 +0000)]
Fix exception scope verification failures in LLIntSlowPaths.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164969

Reviewed by Geoffrey Garen.

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::getByVal):
(JSC::LLInt::setUpCall):
(JSC::LLInt::varargsSetup):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

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

2 years ago[CSS Parser] Filters and Reflections Fixes
hyatt@apple.com [Mon, 28 Nov 2016 20:28:15 +0000 (20:28 +0000)]
[CSS Parser] Filters and Reflections Fixes
https://bugs.webkit.org/show_bug.cgi?id=165103

Reviewed by Zalan Bujtas.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeReflect):
Support the "none" keyword for box-reflect.

* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::isValidPrimitiveFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
Don't rely on range checking, since invert isn't grouped with the other
function values. Actually check every keyword.

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

2 years agoImageData does not match specification
bfulgham@apple.com [Mon, 28 Nov 2016 20:27:39 +0000 (20:27 +0000)]
ImageData does not match specification
https://bugs.webkit.org/show_bug.cgi?id=164663

Reviewed by Simon Fraser.

The W3C specification https://www.w3.org/TR/2dcontext/ clearly states that
the width and height attributes of the ImageData type should be unsigned.
Our current implementation has signed integer values.

In practice, we have enforced the unsigned requirement by throwing a TypeError
if you attempt to construct an ImageData with negative width or height.

This change simply updates the IDL and impelemntation to match the spec.

Test coverage is already provided by fast/canvas/canvas-imageData.html

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readTerminal): Serialize as uint32_t values.
* html/ImageData.idl: Revise width and height to be unsigned long.

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

2 years ago[CSS Parser] flex-basis should be pixel units not percentages.
hyatt@apple.com [Mon, 28 Nov 2016 19:55:19 +0000 (19:55 +0000)]
[CSS Parser] flex-basis should be pixel units not percentages.
https://bugs.webkit.org/show_bug.cgi?id=165100

Reviewed by Zalan Bujtas.

* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::consumeFlex):

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

2 years agoReplace CSSPropertyNames.in with a JSON file
dbates@webkit.org [Mon, 28 Nov 2016 19:11:38 +0000 (19:11 +0000)]
Replace CSSPropertyNames.in with a JSON file
https://bugs.webkit.org/show_bug.cgi?id=164691

Reviewed by Simon Fraser.

Convert CSSPropertyNames.in to a structured JSON file. This is the first step towards
exposing a CSS feature status dashboard and generating more of the boilerplate code
for a CSS property.

A side effect of this change is that makeprop.pl no longer detects duplicate CSS property
definitions. We will look to bring such duplication detection back in a subsequent
commit.

* CMakeLists.txt: Substitute CSSProperties.json for CSSPropertyNames.in and update the
invocation of makeprop.pl as we no longer need to pass the bindings/scripts/preprocessor.pm
Perl module. Makeprop.pl supports conditional CSS properties and values without the need
to preprocess CSSProperties.json using the C preprocessor.
* DerivedSources.make: Ditto. Pass WTF_PLATFORM_IOS to makeprop.pl when building for iOS
as we no longer make use of bindings/scripts/preprocessor.pm.
* css/CSSProperties.json: Added.
* css/CSSPropertyNames.in: Removed.
* css/StyleResolver.cpp: Remove variable lastHighPriorityProperty as we now generate it.
* css/makeprop.pl: Extracted the input file name, now CSSProperties.json, into a global variable
and referenced this variable throughout this script instead of hardcoding the input file name at
each call site. Updated code to handle CSS longhand names being encoded in a JSON array as opposed
to a string of '|'-separated values. I added a FIXME comment to do the same for the codegen property
"custom". Fixed Perl uninitialized variable warnings when die()-ing with error "Unknown CSS property
used in all shorthand ..." or "Unknown CSS property used in longhands ...".
(isPropertyEnabled): Added. Determine whether code should be generated for a property.
(addProperty): Added.
(sortByDescendingPriorityAndName): Added.
(getScopeForFunction): Lowercase option names so that we can use a consistent case throughout
the JSON file.
(getNameForMethods): Ditto.
(generateColorValueSetter):
(generateAnimationPropertyInitialValueSetter): Ditto.
(generateAnimationPropertyInheritValueSetter): Ditto.
(generateFillLayerPropertyInitialValueSetter): Ditto.
(generateFillLayerPropertyInheritValueSetter): Ditto.
(generateSetValueStatement): Ditto.
(generateInitialValueSetter): Ditto.
(generateInheritValueSetter): Ditto.
(generateValueSetter): Ditto.

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

2 years ago[CSS Parser] Support -webkit-animation-trigger
hyatt@apple.com [Mon, 28 Nov 2016 18:28:50 +0000 (18:28 +0000)]
[CSS Parser] Support -webkit-animation-trigger
https://bugs.webkit.org/show_bug.cgi?id=165095

Reviewed by Zalan Bujtas.

* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeWebkitAnimationTrigger):
(WebCore::consumeAnimationValue):
(WebCore::CSSPropertyParser::parseSingleValue):

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

2 years agoAdd some performance tests for various aspects of media loading and playback.
jer.noble@apple.com [Mon, 28 Nov 2016 17:22:30 +0000 (17:22 +0000)]
Add some performance tests for various aspects of media loading and playback.
https://bugs.webkit.org/show_bug.cgi?id=164977

Reviewed by Darin Adler.

PerformanceTests:

Add new tests for a few aspects of media playback; namely: how quickly  media elements fire
the "canplaythrough" event when all data is immediately available, how quickly HLS playback
switches resolutions, and at what playback rate MSE-backed video can play without dropping
frames. Skip these tests by default, as they're not runnable on all ports, and they require
a webserver (run-webkit-httpd) to complete on macOS.

* Media/HLSCanPlayThrough.html: Added.
* Media/HLSGearChange.html: Added.
* Media/MSECanPlayThrough.html: Added.
* Media/MSEPlaybackRate.html: Added.
* Media/StandardCanPlayThrough.html: Added.
* Media/hls/1080p/iframe_index.m3u8: Added.
* Media/hls/1080p/prog_index.m3u8: Added.
* Media/hls/1080p/test.ts: Added.
* Media/hls/480p/iframe_index.m3u8: Added.
* Media/hls/480p/prog_index.m3u8: Added.
* Media/hls/480p/test.ts: Added.
* Media/hls/720p/iframe_index.m3u8: Added.
* Media/hls/720p/prog_index.m3u8: Added.
* Media/hls/720p/test.ts: Added.
* Media/hls/720p/test.ts.back: Added.
* Media/hls/index.m3u8: Added.
* Media/media-source-loader.js: Added.
(MediaSourceLoader):
(MediaSourceLoader.prototype.loadManifest):
(MediaSourceLoader.prototype.loadManifestSucceeded):
(MediaSourceLoader.prototype.loadManifestFailed):
(MediaSourceLoader.prototype.loadMediaData):
(MediaSourceLoader.prototype.loadMediaDataSucceeded):
(MediaSourceLoader.prototype.loadMediaDataFailed):
(MediaSourceLoader.prototype.get type):
(MediaSourceLoader.prototype.get duration):
(MediaSourceLoader.prototype.get initSegment):
(MediaSourceLoader.prototype.get mediaSegmentsLength):
(MediaSourceLoader.prototype.mediaSegments):
(MediaSourceLoader.prototype.get everyMediaSegment):
* Media/test-fragmented-video.json: Added.
* Media/test-fragmented-video.mp4: Added.
* Media/test.mp4: Added.
* Skipped:

Tools:

Allow callers to pass in extra alias/directory pairs to run-webkit-httpd.

* Scripts/run-webkit-httpd:
(parse_args):
(main):

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

2 years agoRemove FIRST_LINE_INHERITED fake pseudo style
antti@apple.com [Mon, 28 Nov 2016 15:58:35 +0000 (15:58 +0000)]
Remove FIRST_LINE_INHERITED fake pseudo style
https://bugs.webkit.org/show_bug.cgi?id=165071

Reviewed by Andreas Kling.

Source/WebCore:

These are create during layout an then cached to the RenderStyle. Cache computed first line style to
RenderObject rare data instead, avoiding style mutation an other confusing messiness.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::RenderElement):
(WebCore::RenderElement::computeFirstLineStyle):
(WebCore::RenderElement::firstLineStyle):

    Cache the first line style.

(WebCore::RenderElement::invalidateCachedFirstLineStyle):
(WebCore::RenderElement::styleWillChange):

    Invalidate subtree if we have cached first line style.

(WebCore::RenderElement::getUncachedPseudoStyle):
(WebCore::RenderElement::uncachedFirstLineStyle): Deleted.
(WebCore::RenderElement::cachedFirstLineStyle): Deleted.
* rendering/RenderElement.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::rareDataMap):
(WebCore::RenderObject::rareData):
(WebCore::RenderObject::ensureRareData):
* rendering/RenderObject.h:

    Stop copying rare data objects.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):

    Use the normal mechanism for invalidating layout for first-line instead of a hack in pseudoStyleCacheIsInvalid.

* rendering/style/RenderStyleConstants.h:
* style/RenderTreeUpdater.cpp:
(WebCore::pseudoStyleCacheIsInvalid):

    Simplify.

LayoutTests:

Expand the test case a bit.

* fast/css/pseudo-cache-stale-expected.html:
* fast/css/pseudo-cache-stale.html:

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

2 years ago[GTK] Dramatic increase on memory usage since 2.14.x
magomez@igalia.com [Mon, 28 Nov 2016 15:00:41 +0000 (15:00 +0000)]
[GTK] Dramatic increase on memory usage since 2.14.x
https://bugs.webkit.org/show_bug.cgi?id=164049

Reviewed by Žan Doberšek.

Use OpenGL version 3.2 Core for rendering when available.
Update some operations that have changed when using 3.2 Core:
- Use glGetStringi to get the extensions list.
- Do not use GL_POINT_SPRITE.
- Always use a VAO when rendering.
- Use a GLSL 1.50 compatible shader.

No new tests needed.

* platform/graphics/GLContext.cpp:
(WebCore::GLContext::version):
Add a method to get OpenGL version we are using.
* platform/graphics/GLContext.h:
Ditto.
* platform/graphics/GraphicsContext3D.h:
Add an attribute to store the VAO used for rendering.
* platform/graphics/OpenGLShims.cpp:
(WebCore::initializeOpenGLShims):
Add glGetStringi to the list of functions.
* platform/graphics/OpenGLShims.h:
Ditto.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
Set appropriate output to the shader compiler and initalize the VAO if needed.
(WebCore::GraphicsContext3D::~GraphicsContext3D):
Delete the VAO if needed.
(WebCore::GraphicsContext3D::getExtensions):
Use glGetExtensionsi for OpenGL versions >= 3.2.
* platform/graphics/glx/GLContextGLX.cpp:
(WebCore::hasGLXARBCreateContextExtension):
Check whether the GLX_ARB_create_context extension is available.
(WebCore::GLContextGLX::createWindowContext):
Use glXCreateContextAttribsARB() if possible to request an OpenGL 3.2 context.
(WebCore::GLContextGLX::createPbufferContext):
Ditto.
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
Enable glGetStringi for GTK.
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
Do not use default getExtensions() method for GTK.
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
Ditto.

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

2 years ago[Win] WebCrypto tests are failing.
pvollan@apple.com [Mon, 28 Nov 2016 13:53:30 +0000 (13:53 +0000)]
[Win] WebCrypto tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=165090

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years ago[css-grid] Move attributes from RenderGrid to the new Grid class
svillar@igalia.com [Mon, 28 Nov 2016 11:28:41 +0000 (11:28 +0000)]
[css-grid] Move attributes from RenderGrid to the new Grid class
https://bugs.webkit.org/show_bug.cgi?id=165065

Reviewed by Darin Adler.

A new class called Grid was added in 208973. This is the first of a couple of patches moving
private attributes from RenderGrid to Grid.

Apart from that this is adding a couple of new helper functions that will decouple the
existence of in-flow items from the actual data structures storing that information.

Last but not least, the Grid::insert() method does not only insert the item in the m_grid
data structure, but also stores the GridArea associated to that item, so there is no need to
do it in two different calls.

No new tests required as this is a refactoring.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::Grid::insert): Added a new parameter.
(WebCore::RenderGrid::Grid::setSmallestTracksStart):
(WebCore::RenderGrid::Grid::smallestTrackStart):
(WebCore::RenderGrid::Grid::gridItemArea):
(WebCore::RenderGrid::Grid::setGridItemArea):
(WebCore::RenderGrid::Grid::clear): Clear the newly added attributes.
(WebCore::RenderGrid::repeatTracksSizingIfNeeded):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::rawGridTrackSize):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::clearGrid):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::cachedGridSpan):
(WebCore::RenderGrid::cachedGridArea): Deleted.
* rendering/RenderGrid.h:

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

2 years agoRebaseline inspector/dom/getAccessibilityPropertiesForNode.html for macOS.
ryanhaddad@apple.com [Mon, 28 Nov 2016 04:30:44 +0000 (04:30 +0000)]
Rebaseline inspector/dom/getAccessibilityPropertiesForNode.html for macOS.
https://bugs.webkit.org/show_bug.cgi?id=165087

Unreviewed test gardening.

* inspector/dom/getAccessibilityPropertiesForNode-expected.txt:

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

2 years agoRemove unused DOMRequestState
commit-queue@webkit.org [Mon, 28 Nov 2016 00:10:45 +0000 (00:10 +0000)]
Remove unused DOMRequestState
https://bugs.webkit.org/show_bug.cgi?id=165085

Patch by Sam Weinig <sam@webkit.org> on 2016-11-27
Reviewed by Simon Fraser.

Remove DOMRequestState. It was unused.

* Modules/fetch/FetchBody.cpp:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMRequestState.h: Removed.

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

2 years agoRemoved a WTFLogAlways I left in with a recent commit.
dino@apple.com [Sun, 27 Nov 2016 21:57:29 +0000 (21:57 +0000)]
Removed a WTFLogAlways I left in with a recent commit.

* UIProcess/Cocoa/WebViewImpl.mm:
(-[WKAccessibilitySettingsObserver _settingsDidChange:]):

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

2 years agoFix various --minimal build issues
ossy@webkit.org [Sun, 27 Nov 2016 18:16:51 +0000 (18:16 +0000)]
Fix various --minimal build issues
https://bugs.webkit.org/show_bug.cgi?id=165060

Reviewed by Darin Adler.

* css/parser/CSSPropertyParser.cpp:
* dom/Document.cpp:
* loader/EmptyClients.cpp:

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

2 years agoFix unused-private-field build warning in WebKit2/Platform/SharedMemory.h
ossy@webkit.org [Sun, 27 Nov 2016 18:14:39 +0000 (18:14 +0000)]
Fix unused-private-field build warning in WebKit2/Platform/SharedMemory.h
https://bugs.webkit.org/show_bug.cgi?id=165069

Reviewed by Darin Adler.

* Platform/SharedMemory.h:

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

2 years agoAnother fix for CMake.
simon.fraser@apple.com [Sun, 27 Nov 2016 08:06:08 +0000 (08:06 +0000)]
Another fix for CMake.

* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:

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

2 years agoBetter fix for the Mac CMake build.
simon.fraser@apple.com [Sun, 27 Nov 2016 07:43:51 +0000 (07:43 +0000)]
Better fix for the Mac CMake build.

* DumpRenderTree/PlatformMac.cmake:

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

2 years agoAttempt to fix Mac CMake build.
simon.fraser@apple.com [Sun, 27 Nov 2016 07:33:47 +0000 (07:33 +0000)]
Attempt to fix Mac CMake build.

* DumpRenderTree/PlatformMac.cmake:

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

2 years agoFix the iOS build.
simon.fraser@apple.com [Sun, 27 Nov 2016 07:27:25 +0000 (07:27 +0000)]
Fix the iOS build.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::eventThrottlingDelay):

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

2 years ago[WTF] Import std::optional reference implementation as WTF::Optional
utatane.tea@gmail.com [Sun, 27 Nov 2016 06:08:16 +0000 (06:08 +0000)]
[WTF] Import std::optional reference implementation as WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=164199

Reviewed by Saam Barati and Sam Weinig.

Source/JavaScriptCore:

Previous WTF::Optional::operator= is not compatible to std::optional::operator=.
std::optional::emplace has the same semantics to the previous one.
So we change the code to use it.

* Scripts/builtins/builtins_templates.py:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.Promise-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-Builtin.prototype-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Combined.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-BuiltinConstructor-Separate.js-result:
* Scripts/tests/builtins/expected/JavaScriptCore-InternalClashingNames-Combined.js-result:
* Scripts/tests/builtins/expected/WebCore-AnotherGuardedInternalBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-ArbitraryConditionalGuard-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-GuardedBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-UnguardedBuiltin-Separate.js-result:
* Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result:
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::commuteCompareToZeroIntoTest):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::commuteCompareToZeroIntoTest):
* b3/B3CheckSpecial.cpp:
(JSC::B3::CheckSpecial::forEachArg):
(JSC::B3::CheckSpecial::shouldTryAliasingDef):
* b3/B3CheckSpecial.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::scaleForShl):
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::tryAppendLea):
* b3/B3Opcode.cpp:
(JSC::B3::invertedCompare):
* b3/B3Opcode.h:
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::forEachArg):
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::forEachArgImpl):
* b3/B3StackmapSpecial.h:
* b3/B3Value.cpp:
(JSC::B3::Value::invertedCompare):
* b3/air/AirArg.h:
(JSC::B3::Air::Arg::isValidScale):
(JSC::B3::Air::Arg::isValidAddrForm):
(JSC::B3::Air::Arg::isValidIndexForm):
(JSC::B3::Air::Arg::isValidForm):
* b3/air/AirCustom.h:
(JSC::B3::Air::PatchCustom::shouldTryAliasingDef):
* b3/air/AirFixObviousSpills.cpp:
* b3/air/AirInst.h:
* b3/air/AirInstInlines.h:
(JSC::B3::Air::Inst::shouldTryAliasingDef):
* b3/air/AirIteratedRegisterCoalescing.cpp:
* b3/air/AirSpecial.cpp:
(JSC::B3::Air::Special::shouldTryAliasingDef):
* b3/air/AirSpecial.h:
* bytecode/BytecodeGeneratorification.cpp:
(JSC::BytecodeGeneratorification::storageForGeneratorLocal):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::findPC):
(JSC::CodeBlock::bytecodeOffsetFromCallSiteIndex):
* bytecode/CodeBlock.h:
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::link):
* bytecode/UnlinkedFunctionExecutable.h:
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitPutConstantProperty):
(JSC::ObjectPatternNode::bindValue):
* debugger/Debugger.cpp:
(JSC::Debugger::resolveBreakpoint):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::currentPosition):
* debugger/DebuggerParseData.cpp:
(JSC::DebuggerPausePositions::breakpointLocationForLineColumn):
* debugger/DebuggerParseData.h:
* debugger/ScriptProfilingScope.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeDoubleUnaryOpEffects):
* dfg/DFGJITCode.cpp:
(JSC::DFG::JITCode::findPC):
* dfg/DFGJITCode.h:
* dfg/DFGOperations.cpp:
(JSC::DFG::operationPutByValInternal):
* dfg/DFGSlowPathGenerator.h:
(JSC::DFG::SlowPathGenerator::generate):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::runSlowPathGenerators):
(JSC::DFG::SpeculativeJIT::emitUntypedBitOp):
(JSC::DFG::SpeculativeJIT::emitUntypedRightShiftBitOp):
(JSC::DFG::SpeculativeJIT::compileMathIC):
(JSC::DFG::SpeculativeJIT::compileArithDiv):
(JSC::DFG::SpeculativeJIT::compileCallDOMGetter):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::findPC):
* ftl/FTLJITCode.h:
* heap/Heap.cpp:
(JSC::Heap::collectAsync):
(JSC::Heap::collectSync):
(JSC::Heap::collectInThread):
(JSC::Heap::requestCollection):
(JSC::Heap::willStartCollection):
(JSC::Heap::didFinishCollection):
(JSC::Heap::shouldDoFullCollection):
* heap/Heap.h:
(JSC::Heap::collectionScope):
* heap/HeapSnapshot.cpp:
(JSC::HeapSnapshot::nodeForCell):
(JSC::HeapSnapshot::nodeForObjectIdentifier):
* heap/HeapSnapshot.h:
* inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::dispatch):
(Inspector::BackendDispatcher::sendPendingErrors):
(Inspector::BackendDispatcher::reportProtocolError):
* inspector/InspectorBackendDispatcher.h:
* inspector/agents/InspectorHeapAgent.cpp:
(Inspector::InspectorHeapAgent::nodeForHeapObjectIdentifier):
(Inspector::InspectorHeapAgent::getPreview):
(Inspector::InspectorHeapAgent::getRemoteObject):
* inspector/agents/InspectorHeapAgent.h:
* inspector/remote/RemoteConnectionToTarget.h:
* inspector/remote/RemoteConnectionToTarget.mm:
(Inspector::RemoteConnectionToTarget::targetIdentifier):
(Inspector::RemoteConnectionToTarget::setup):
* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::updateClientCapabilities):
* inspector/scripts/codegen/generate_cpp_protocol_types_header.py:
(_generate_declarations_for_enum_conversion_methods):
(_generate_declarations_for_enum_conversion_methods.return_type_with_export_macro):
* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py:
(CppProtocolTypesImplementationGenerator._generate_enum_conversion_methods_for_domain.generate_conversion_method_body):
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/enum-values.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
* jit/JITCode.h:
(JSC::JITCode::findPC):
* jit/JITDivGenerator.cpp:
(JSC::JITDivGenerator::generateFastPath):
* jit/JITOperations.cpp:
* jit/PCToCodeOriginMap.cpp:
(JSC::PCToCodeOriginMap::findPC):
* jit/PCToCodeOriginMap.h:
* jsc.cpp:
(WTF::RuntimeArray::getOwnPropertySlot):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* parser/ModuleAnalyzer.cpp:
(JSC::ModuleAnalyzer::exportVariable):
* runtime/ConcurrentJSLock.h:
(JSC::ConcurrentJSLocker::ConcurrentJSLocker):
* runtime/DefinePropertyAttributes.h:
(JSC::DefinePropertyAttributes::writable):
(JSC::DefinePropertyAttributes::configurable):
(JSC::DefinePropertyAttributes::enumerable):
* runtime/GenericArgumentsInlines.h:
(JSC::GenericArguments<Type>::getOwnPropertySlot):
(JSC::GenericArguments<Type>::put):
(JSC::GenericArguments<Type>::deleteProperty):
(JSC::GenericArguments<Type>::defineOwnProperty):
* runtime/HasOwnPropertyCache.h:
(JSC::HasOwnPropertyCache::get):
* runtime/HashMapImpl.h:
(JSC::concurrentJSMapHash):
* runtime/Identifier.h:
(JSC::parseIndex):
* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::toNumberFromPrimitive):
(JSC::JSValue::putToPrimitive):
* runtime/JSCJSValue.h:
* runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView::toAdaptorNativeFromValueWithoutCoercion):
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayView):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlot):
(JSC::JSGenericTypedArrayView<Adaptor>::put):
* runtime/JSModuleRecord.cpp:
* runtime/JSModuleRecord.h:
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectAccessor):
(JSC::JSObject::deleteProperty):
(JSC::JSObject::putDirectMayBeIndex):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getOwnPropertySlot):
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::putOwnDataPropertyMayBeIndex):
* runtime/JSObjectInlines.h:
(JSC::JSObject::putInline):
* runtime/JSString.cpp:
(JSC::JSString::getStringPropertyDescriptor):
* runtime/JSString.h:
(JSC::JSString::getStringPropertySlot):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::parse):
* runtime/MathCommon.h:
(JSC::safeReciprocalForDivByConst):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncHasOwnProperty):
* runtime/PropertyDescriptor.h:
(JSC::toPropertyDescriptor):
* runtime/PropertyName.h:
(JSC::parseIndex):
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::processUnverifiedStackTraces):
* runtime/StringObject.cpp:
(JSC::StringObject::put):
(JSC::isStringOwnProperty):
(JSC::StringObject::deleteProperty):
* runtime/ToNativeFromValue.h:
(JSC::toNativeFromValueWithoutCoercion):
* runtime/TypedArrayAdaptors.h:
(JSC::IntegralTypedArrayAdaptor::toNativeFromInt32WithoutCoercion):
(JSC::IntegralTypedArrayAdaptor::toNativeFromUint32WithoutCoercion):
(JSC::IntegralTypedArrayAdaptor::toNativeFromDoubleWithoutCoercion):
(JSC::FloatTypedArrayAdaptor::toNativeFromInt32WithoutCoercion):
(JSC::FloatTypedArrayAdaptor::toNativeFromDoubleWithoutCoercion):
(JSC::Uint8ClampedAdaptor::toNativeFromInt32WithoutCoercion):
(JSC::Uint8ClampedAdaptor::toNativeFromDoubleWithoutCoercion):

Source/WebCore:

Rename valueOr to value_or. This is specified in C++17 proposal.

Use Optional::emplace. C++17 Optional::operator=(Optional&&) requires
either copy assignment operator or move assignment operator. But
DFG::JSValueOperand etc. only defines move constructors and drop
implicit copy assignment operators.

It was OK in the previous WTF::Optional since it always uses move
constructors. But it is not valid in C++17 Optional. We use Optional::emplace
instead. This function has the same semantics to the previous WTF::Optional's
operator=.

No behavior change.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::parseAmount):
(WebCore::createContactFields):
(WebCore::toLineItemType):
(WebCore::createLineItem):
(WebCore::createLineItems):
(WebCore::createMerchantCapabilities):
(WebCore::createSupportedNetworks):
(WebCore::toShippingType):
(WebCore::createShippingMethod):
(WebCore::createShippingMethods):
(WebCore::createPaymentRequest):
(WebCore::toPaymentAuthorizationStatus):
* Modules/applepay/PaymentContact.h:
* Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::completeShippingMethodSelection):
(WebCore::PaymentCoordinator::completeShippingContactSelection):
(WebCore::PaymentCoordinator::completePaymentMethodSelection):
* Modules/applepay/PaymentCoordinator.h:
* Modules/applepay/PaymentCoordinatorClient.h:
* Modules/applepay/PaymentMerchantSession.h:
* Modules/applepay/PaymentRequest.h:
* Modules/applepay/cocoa/PaymentContactCocoa.mm:
(WebCore::PaymentContact::fromJS):
* Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
(WebCore::PaymentMerchantSession::fromJS):
* Modules/encryptedmedia/MediaKeyStatusMap.cpp:
(WebCore::MediaKeyStatusMap::Iterator::next):
* Modules/encryptedmedia/MediaKeyStatusMap.h:
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract):
* Modules/fetch/FetchBody.h:
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::FetchBodyOwner):
(WebCore::FetchBodyOwner::loadBlob):
(WebCore::FetchBodyOwner::finishBlobLoading):
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchHeaders.cpp:
(WebCore::FetchHeaders::Iterator::next):
* Modules/fetch/FetchHeaders.h:
* Modules/fetch/FetchRequest.cpp:
(WebCore::setReferrerPolicy):
(WebCore::setMode):
(WebCore::setCredentials):
(WebCore::setCache):
(WebCore::setRedirect):
(WebCore::setMethod):
(WebCore::setReferrer):
(WebCore::buildOptions):
(WebCore::FetchRequest::clone):
* Modules/fetch/FetchRequest.h:
(WebCore::FetchRequest::FetchRequest):
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::FetchResponse):
(WebCore::FetchResponse::cloneForJS):
(WebCore::FetchResponse::fetch):
(WebCore::FetchResponse::BodyLoader::didSucceed):
(WebCore::FetchResponse::BodyLoader::didFail):
(WebCore::FetchResponse::BodyLoader::didReceiveResponse):
(WebCore::FetchResponse::BodyLoader::stop):
* Modules/fetch/FetchResponse.h:
* Modules/geolocation/Coordinates.cpp:
(WebCore::Coordinates::altitude):
(WebCore::Coordinates::altitudeAccuracy):
(WebCore::Coordinates::heading):
(WebCore::Coordinates::speed):
* Modules/geolocation/Coordinates.h:
* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::stringToDirection):
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBDatabaseIdentifier.h:
(WebCore::IDBDatabaseIdentifier::hash):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
* Modules/indexeddb/IDBFactory.h:
* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::getAll):
(WebCore::IDBIndex::getAllKeys):
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBKeyPath.h:
(WebCore::isolatedCopy):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::keyPath):
(WebCore::IDBObjectStore::getAll):
(WebCore::IDBObjectStore::getAllKeys):
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
(WebCore::IDBTransaction::requestGetAllIndexRecords):
* Modules/indexeddb/IDBTransaction.h:
* Modules/indexeddb/IDBVersionChangeEvent.cpp:
(WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
* Modules/indexeddb/IDBVersionChangeEvent.h:
* Modules/indexeddb/server/IDBSerialization.cpp:
(WebCore::serializeIDBKeyPath):
(WebCore::deserializeIDBKeyPath):
* Modules/indexeddb/server/IDBSerialization.h:
* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::getAllRecords):
* Modules/indexeddb/server/MemoryIndex.h:
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::getAllRecords):
* Modules/indexeddb/server/MemoryObjectStore.h:
* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::objectStoreCleared):
(WebCore::IDBServer::MemoryObjectStoreCursor::keyDeleted):
(WebCore::IDBServer::MemoryObjectStoreCursor::setFirstInRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::setForwardIteratorFromRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
(WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
* Modules/indexeddb/server/MemoryObjectStoreCursor.h:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):
* Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
(WebCore::IDBDatabaseInfo::createNewObjectStore):
* Modules/indexeddb/shared/IDBDatabaseInfo.h:
* Modules/indexeddb/shared/IDBGetAllRecordsData.h:
* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::IDBObjectStoreInfo):
* Modules/indexeddb/shared/IDBObjectStoreInfo.h:
(WebCore::IDBObjectStoreInfo::keyPath):
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::displayNameForTrack):
* Modules/mediacontrols/MediaControlsHost.h:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::endOfStream):
(WebCore::MediaSource::streamEndedWithError):
* Modules/mediasource/MediaSource.h:
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::createOfferSucceeded):
(WebCore::PeerConnectionBackend::createOfferFailed):
(WebCore::PeerConnectionBackend::createAnswerSucceeded):
(WebCore::PeerConnectionBackend::createAnswerFailed):
(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
(WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
(WebCore::PeerConnectionBackend::addIceCandidateFailed):
(WebCore::PeerConnectionBackend::stop):
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::insertDTMF):
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCIceCandidate.cpp:
(WebCore::RTCIceCandidate::create):
(WebCore::RTCIceCandidate::RTCIceCandidate):
* Modules/mediastream/RTCIceCandidate.h:
(WebCore::RTCIceCandidate::sdpMLineIndex):
* Modules/mediastream/SDPProcessor.cpp:
(WebCore::iceCandidateFromJSON):
* Modules/proximity/DeviceProximityEvent.h:
* Modules/streams/ReadableStreamSource.h:
(WebCore::ReadableStreamSource::startFinished):
(WebCore::ReadableStreamSource::pullFinished):
(WebCore::ReadableStreamSource::clean):
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::start):
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webdatabase/SQLResultSet.h:
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::close):
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didReceiveSocketStreamData):
* Modules/websockets/WebSocketChannel.h:
* bindings/generic/IDLTypes.h:
(WebCore::IDLType::nullValue):
* bindings/js/CachedModuleScript.h:
(WebCore::CachedModuleScript::error):
* bindings/js/Dictionary.h:
(WebCore::Dictionary::get):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::toJS):
* bindings/js/IDBBindingUtilities.h:
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
* bindings/js/JSCryptoKeySerializationJWK.h:
* bindings/js/JSDOMConvert.h:
(WebCore::Detail::VariadicConverterBase::convert):
(WebCore::Detail::VariadicConverterBase<IDLInterface<T>>::convert):
(WebCore::convertVariadicArguments):
* bindings/js/JSDOMIterator.h:
(WebCore::IteratorTraits>::next):
* bindings/js/JSDOMPromise.h:
(WebCore::DOMPromise::DOMPromise):
(WebCore::DOMPromise::operator=):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
* bindings/js/JSDictionary.h:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSFileCustom.cpp:
(WebCore::constructJSFile):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::callHTMLAllCollection):
(WebCore::JSHTMLAllCollection::item):
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::toDataURL):
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::construct):
* bindings/js/JSMediaDevicesCustom.cpp:
(WebCore::createStringConstraint):
(WebCore::createBooleanConstraint):
(WebCore::createDoubleConstraint):
(WebCore::createIntConstraint):
* bindings/js/JSWebKitSubtleCryptoCustom.cpp:
(WebCore::importKey):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::setupModuleScriptHandlers):
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::executeScript):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateEnumerationImplementationContent):
(GenerateEnumerationHeaderContent):
(GenerateDefaultValue):
(GenerateImplementation):
(GenerateParametersCheck):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertyDescriptor):
(WebCore::JSFloat64Array::put):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::parseEnumeration<TestObj::EnumType>):
(WebCore::parseEnumeration<TestObj::Optional>):
(WebCore::parseEnumeration<AlternateEnumName>):
(WebCore::parseEnumeration<TestObj::EnumA>):
(WebCore::parseEnumeration<TestObj::EnumB>):
(WebCore::parseEnumeration<TestObj::EnumC>):
(WebCore::parseEnumeration<TestObj::Kind>):
(WebCore::parseEnumeration<TestObj::Size>):
(WebCore::parseEnumeration<TestObj::Confidence>):
(WebCore::convertDictionary<TestObj::Dictionary>):
(WebCore::JSTestObj::getOwnPropertySlot):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgCaller):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgCaller):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArgCaller):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgsCaller):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongCaller):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongCaller):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceCaller):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanCaller):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalRecordCaller):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2Caller):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2Caller):
(WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentCaller):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
(WebCore::parseEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>):
* bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
* bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
(WebCore::parseEnumeration<TestStandaloneEnumeration>):
* bindings/scripts/test/JS/JSTestStandaloneEnumeration.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionSetShadowCaller):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampCaller):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::put):
* crypto/CryptoAlgorithmRegistry.cpp:
(WebCore::CryptoAlgorithmRegistry::identifier):
* crypto/CryptoAlgorithmRegistry.h:
* crypto/CryptoKeySerialization.h:
* crypto/JsonWebKey.h:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
(WebCore::CryptoAlgorithmAES_CBC::importKey):
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
(WebCore::CryptoAlgorithmAES_KW::importKey):
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
* crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
(WebCore::calculateSignature):
* crypto/keys/CryptoKeyAES.h:
* crypto/keys/CryptoKeyHMAC.h:
* crypto/keys/CryptoKeyRSA.cpp:
(WebCore::CryptoKeyRSA::importJwk):
* crypto/keys/CryptoKeyRSA.h:
* crypto/keys/CryptoKeySerializationRaw.cpp:
(WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
* crypto/keys/CryptoKeySerializationRaw.h:
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
(WebCore::commonCryptoHMACAlgorithm):
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::cryptoDigestAlgorithm):
* crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
* crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::calculateStyleMask):
(WebCore::CSSFontFace::calculateWeightMask):
* css/CSSFontFace.h:
* css/CSSFontFaceSet.cpp:
(WebCore::computeFontTraitsMask):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::doubleValue):
(WebCore::CSSPrimitiveValue::doubleValueInternal):
* css/CSSPrimitiveValue.h:
* css/CSSPropertyNames.in:
* css/CSSSegmentedFontFace.cpp:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::create):
(WebCore::CSSStyleSheet::CSSStyleSheet):
(WebCore::CSSStyleSheet::addRule):
* css/CSSStyleSheet.h:
* css/FontFace.cpp:
(WebCore::FontFace::fontStateChanged):
* css/FontFace.h:
* css/FontFaceSet.cpp:
(WebCore::FontFaceSet::completedLoading):
* css/FontFaceSet.h:
* css/MediaQueryEvaluator.cpp:
(WebCore::doubleValue):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertGridPosition):
(WebCore::StyleBuilderConverter::convertWordSpacing):
(WebCore::StyleBuilderConverter::convertPerspective):
(WebCore::StyleBuilderConverter::convertMarqueeIncrement):
(WebCore::StyleBuilderConverter::convertFilterOperations):
(WebCore::StyleBuilderConverter::convertLineHeight):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueLineHeight):
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::requestStyleSheet):
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseCubicBezierTimingFunctionValue):
(WebCore::CSSParser::parseSpringTimingFunctionValue):
(WebCore::CSSParser::parseColorFunctionParameters):
(WebCore::CSSParser::parseColorFromValue):
* css/parser/CSSParser.h:
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelationIfResolvingStyle):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):
* dom/CustomElementReactionQueue.cpp:
* dom/Document.cpp:
(WebCore::Document::lastModified):
* dom/Element.cpp:
(WebCore::Element::scrollBy):
(WebCore::Element::getIntegralAttribute):
(WebCore::Element::getUnsignedIntegralAttribute):
(WebCore::Element::resolveCustomStyle):
* dom/Element.h:
* dom/ElementIteratorAssertions.h:
(WebCore::ElementIteratorAssertions::dropEventDispatchAssertion):
(WebCore::ElementIteratorAssertions::clear):
* dom/ExceptionOr.h:
* dom/InlineStyleSheetOwner.cpp:
(WebCore::makeInlineStyleSheetCacheKey):
* dom/KeyboardEvent.h:
* dom/LoadableClassicScript.cpp:
(WebCore::LoadableClassicScript::error):
* dom/LoadableClassicScript.h:
* dom/LoadableModuleScript.cpp:
(WebCore::LoadableModuleScript::error):
* dom/LoadableModuleScript.h:
* dom/LoadableScript.h:
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::create):
(WebCore::MessageEvent::initMessageEvent):
* dom/MessageEvent.h:
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::observe):
* dom/MutationObserver.h:
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::resolveCustomStyle):
* dom/PseudoElement.h:
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::setToBeforeChild):
(WebCore::RangeBoundaryPoint::setToAfterChild):
(WebCore::RangeBoundaryPoint::setToEndOfNode):
(WebCore::RangeBoundaryPoint::invalidateOffset):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::determineScriptType):
(WebCore::ScriptElement::prepareScript):
(WebCore::ScriptElement::executeScriptAndDispatchEvent):
* dom/ScriptElement.h:
* dom/TextDecoder.cpp:
(WebCore::TextDecoder::decode):
* dom/TextDecoder.h:
* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator):
* dom/UserGestureIndicator.h:
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/CompositeEditCommand.h:
* fileapi/File.h:
* history/CachedFrame.h:
(WebCore::CachedFrame::hasInsecureContent):
* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::toggle):
* html/DOMTokenList.h:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::toDataURL):
* html/HTMLCanvasElement.h:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseBorderWidthAttribute):
(WebCore::HTMLElement::parseAttribute):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::createForJSConstructor):
(WebCore::HTMLImageElement::width):
(WebCore::HTMLImageElement::height):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::findClosestTickMarkValue):
(WebCore::HTMLInputElement::maxLengthAttributeChanged):
(WebCore::HTMLInputElement::minLengthAttributeChanged):
* html/HTMLInputElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::initializeStyleSheet):
(WebCore::HTMLLinkElement::iconType):
* html/HTMLLinkElement.h:
* html/HTMLOListElement.h:
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
* html/HTMLOptionsCollection.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::setLength):
* html/HTMLSelectElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::maxLengthAttributeChanged):
(WebCore::HTMLTextAreaElement::minLengthAttributeChanged):
* html/ImageInputType.cpp:
(WebCore::ImageInputType::height):
(WebCore::ImageInputType::width):
* html/InputType.cpp:
(WebCore::InputType::findClosestTickMarkValue):
* html/InputType.h:
* html/LinkIconCollector.cpp:
* html/LinkRelAttribute.h:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::findClosestTickMarkValue):
* html/RangeInputType.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::restore):
(WebCore::CanvasRenderingContext2D::setStrokeColor):
(WebCore::CanvasRenderingContext2D::setFillColor):
(WebCore::CanvasRenderingContext2D::isPointInPathInternal):
(WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
(WebCore::CanvasRenderingContext2D::setShadow):
(WebCore::CanvasRenderingContext2D::fillText):
(WebCore::CanvasRenderingContext2D::strokeText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::arrayBufferViewElementSize):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::validateArrayBufferType):
(WebCore::WebGLRenderingContextBase::validateTexFuncData):
(WebCore::WebGLRenderingContextBase::texImage2D):
* html/canvas/WebGLRenderingContextBase.h:
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::indexOfFirstUnopenFormattingElement):
(WebCore::HTMLConstructionSite::reconstructTheActiveFormattingElements):
* html/parser/HTMLConstructionSite.h:
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLIntegerInternal):
(WebCore::parseHTMLInteger):
(WebCore::parseHTMLNonNegativeInteger):
(WebCore::parseValidHTMLNonNegativeIntegerInternal):
(WebCore::parseValidHTMLNonNegativeInteger):
(WebCore::parseValidHTMLFloatingPointNumberInternal):
(WebCore::parseValidHTMLFloatingPointNumber):
(WebCore::parseHTTPRefreshInternal):
* html/parser/HTMLParserIdioms.h:
(WebCore::limitToOnlyHTMLNonNegative):
* html/parser/HTMLSrcsetParser.cpp:
(WebCore::parseDescriptors):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):
(WebCore::SliderThumbElement::resolveCustomStyle):
(WebCore::SliderContainerElement::resolveCustomStyle):
* html/shadow/SliderThumbElement.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::resolveCustomStyle):
(WebCore::TextControlInnerTextElement::resolveCustomStyle):
(WebCore::TextControlPlaceholderElement::resolveCustomStyle):
* html/shadow/TextControlInnerElements.h:
* html/track/TrackEvent.h:
* inspector/InspectorIndexedDBAgent.cpp:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didFinishXHRLoading):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::addRule):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::setInstruments):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startIconLoading):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
(WebCore::DocumentThreadableLoader::clearResource):
(WebCore::DocumentThreadableLoader::preflightSuccess):
(WebCore::DocumentThreadableLoader::preflightFailure):
* loader/DocumentThreadableLoader.h:
* loader/EmptyClients.cpp:
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::open):
(WebCore::FrameLoader::dispatchDidCommitLoad):
(WebCore::FrameLoader::clearTestingOverrides):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::resourceTypeFromAsAttribute):
(WebCore::LinkLoader::loadLink):
* loader/LinkLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::SubresourceLoader):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::notifyDone):
* loader/SubresourceLoader.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::setLoadPriority):
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::CachedResourceRequest):
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::priority):
* mathml/MathMLElement.h:
(WebCore::MathMLElement::specifiedDisplayStyle):
(WebCore::MathMLElement::specifiedMathVariant):
* mathml/MathMLFractionElement.cpp:
(WebCore::MathMLFractionElement::cachedFractionAlignment):
(WebCore::MathMLFractionElement::parseAttribute):
* mathml/MathMLFractionElement.h:
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::specifiedDisplayStyle):
(WebCore::MathMLMathElement::parseAttribute):
* mathml/MathMLMathElement.h:
* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::parseAttribute):
* mathml/MathMLMencloseElement.h:
* mathml/MathMLOperatorDictionary.cpp:
(WebCore::MathMLOperatorDictionary::search):
* mathml/MathMLOperatorDictionary.h:
* mathml/MathMLOperatorElement.cpp:
(WebCore::MathMLOperatorElement::computeOperatorFlag):
(WebCore::MathMLOperatorElement::childrenChanged):
(WebCore::attributeNameToPropertyFlag):
(WebCore::MathMLOperatorElement::parseAttribute):
* mathml/MathMLOperatorElement.h:
* mathml/MathMLPaddedElement.cpp:
(WebCore::MathMLPaddedElement::parseAttribute):
* mathml/MathMLPaddedElement.h:
* mathml/MathMLPresentationElement.cpp:
(WebCore::MathMLPresentationElement::cachedBooleanAttribute):
(WebCore::MathMLPresentationElement::cachedMathMLLength):
(WebCore::MathMLPresentationElement::specifiedDisplayStyle):
(WebCore::MathMLPresentationElement::specifiedMathVariant):
(WebCore::MathMLPresentationElement::parseAttribute):
* mathml/MathMLPresentationElement.h:
(WebCore::MathMLPresentationElement::toOptionalBool):
* mathml/MathMLScriptsElement.cpp:
(WebCore::MathMLScriptsElement::parseAttribute):
* mathml/MathMLScriptsElement.h:
* mathml/MathMLSpaceElement.cpp:
(WebCore::MathMLSpaceElement::parseAttribute):
* mathml/MathMLSpaceElement.h:
* mathml/MathMLTokenElement.cpp:
(WebCore::MathMLTokenElement::convertToSingleCodePoint):
* mathml/MathMLTokenElement.h:
* mathml/MathMLUnderOverElement.cpp:
(WebCore::MathMLUnderOverElement::parseAttribute):
* mathml/MathMLUnderOverElement.h:
* page/ChromeClient.h:
* page/DOMTimer.cpp:
(WebCore::DOMTimer::alignedFireTime):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::scrollBy):
* page/DOMWindow.h:
* page/EventSource.cpp:
(WebCore::EventSource::parseEventStream):
(WebCore::EventSource::parseEventStreamLine):
* page/EventSource.h:
* page/FrameView.cpp:
(WebCore::FrameView::recalculateScrollbarOverlayStyle):
(WebCore::FrameView::setLayoutViewportOverrideRect):
(WebCore::FrameView::setViewExposedRect):
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::takeAnyMediaCanStartListener):
* page/Page.h:
(WebCore::Page::eventThrottlingBehaviorOverride):
(WebCore::Page::setEventThrottlingBehaviorOverride):
* page/ScrollToOptions.h:
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::create):
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::port):
* page/SecurityOriginData.cpp:
(WebCore::SecurityOriginData::debugString):
(WebCore::SecurityOriginData::databaseIdentifier):
(WebCore::SecurityOriginData::fromDatabaseIdentifier):
* page/SecurityOriginData.h:
(WebCore::SecurityOriginData::SecurityOriginData):
(WebCore::SecurityOriginData::isEmpty):
(WebCore::SecurityOriginDataHash::hash):
* page/SecurityOriginHash.h:
(WebCore::SecurityOriginHash::hash):
* page/WindowFeatures.cpp:
(WebCore::parseDialogFeatures):
(WebCore::boolFeature):
(WebCore::floatFeature):
* page/WindowFeatures.h:
* page/csp/ContentSecurityPolicySource.cpp:
(WebCore::ContentSecurityPolicySource::ContentSecurityPolicySource):
(WebCore::ContentSecurityPolicySource::portMatches):
* page/csp/ContentSecurityPolicySource.h:
* page/csp/ContentSecurityPolicySourceList.cpp:
(WebCore::ContentSecurityPolicySourceList::parse):
(WebCore::ContentSecurityPolicySourceList::parseSource):
(WebCore::ContentSecurityPolicySourceList::parsePort):
* page/csp/ContentSecurityPolicySourceList.h:
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
* page/scrolling/AsyncScrollingCoordinator.h:
(WebCore::AsyncScrollingCoordinator::ScheduledScrollUpdate::ScheduledScrollUpdate):
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::setScrollPositionWithoutContentEdgeConstraints):
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPositionWithoutContentEdgeConstraints):
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::scrollingTreeNodeDidScroll):
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
* platform/DragImage.cpp:
* platform/LinkIcon.h:
* platform/MemoryPressureHandler.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::handleDeferredScrollUpdateAfterContentSizeChange):
* platform/ScrollView.h:
* platform/Theme.h:
(WebCore::Theme::controlFont):
* platform/Timer.h:
(WebCore::TimerBase::alignedFireTime):
* platform/URL.cpp:
(WebCore::URL::port):
(WebCore::defaultPortForProtocol):
(WebCore::portAllowed):
* platform/URL.h:
* platform/URLParser.cpp:
(WebCore::URLParser::defaultPortForProtocol):
(WebCore::findLongestZeroSequence):
(WebCore::URLParser::parseIPv4Piece):
(WebCore::URLParser::parseIPv4Host):
(WebCore::URLParser::parseIPv4PieceInsideIPv6):
(WebCore::URLParser::parseIPv4AddressInsideIPv6):
(WebCore::URLParser::parseIPv6Host):
(WebCore::URLParser::domainToASCII):
(WebCore::URLParser::formURLDecode):
* platform/URLParser.h:
* platform/graphics/BitmapImage.h:
* platform/graphics/Color.h:
(WebCore::colorWithOverrideAlpha):
* platform/graphics/DisplayRefreshMonitorClient.h:
* platform/graphics/Font.h:
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::drawText):
(WebCore::FontCascade::drawEmphasisMarks):
(WebCore::FontCascade::adjustSelectionRectForText):
(WebCore::FontCascade::getEmphasisMarkGlyphData):
(WebCore::FontCascade::emphasisMarkAscent):
(WebCore::FontCascade::emphasisMarkDescent):
(WebCore::FontCascade::emphasisMarkHeight):
* platform/graphics/FontCascade.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawText):
(WebCore::GraphicsContext::drawEmphasisMarks):
(WebCore::GraphicsContext::drawBidiText):
* platform/graphics/GraphicsContext.h:
(WebCore::InterpolationQualityMaintainer::InterpolationQualityMaintainer):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setPosition):
(WebCore::GraphicsLayer::setApproximatePosition):
* platform/graphics/Image.h:
(WebCore::Image::hotSpot):
* platform/graphics/ImageBuffer.h:
* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::clearMetadata):
(WebCore::ImageFrameCache::metadata):
(WebCore::ImageFrameCache::frameMetadataAtIndex):
(WebCore::ImageFrameCache::hotSpot):
* platform/graphics/ImageFrameCache.h:
* platform/graphics/ImageSource.h:
(WebCore::ImageSource::hotSpot):
* platform/graphics/PathUtilities.cpp:
(WebCore::rectFromPolygon):
(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::calculateLayerBoundingRect):
* platform/graphics/TiledBacking.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::flush):
(WebCore::SourceBufferPrivateAVFObjC::naturalSize):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setLayoutViewportRect):
* platform/graphics/ca/TileController.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::encodeImage):
(WebCore::dataURL):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoder::hotSpot):
* platform/graphics/cg/ImageDecoderCG.h:
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::openTypeFeature):
(WebCore::advanceForColorBitmapFont):
* platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawGlyphs::localBounds):
(WebCore::DisplayList::DrawLine::localBounds):
(WebCore::DisplayList::DrawLinesForText::localBounds):
(WebCore::DisplayList::DrawLineForDocumentMarker::localBounds):
(WebCore::DisplayList::DrawFocusRingPath::localBounds):
(WebCore::DisplayList::DrawFocusRingRects::localBounds):
(WebCore::DisplayList::StrokeRect::localBounds):
(WebCore::DisplayList::StrokePath::localBounds):
(WebCore::DisplayList::StrokeEllipse::localBounds):
* platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawingItem::localBounds):
* platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::updateItemExtent):
(WebCore::DisplayList::Recorder::ContextState::rotate):
(WebCore::DisplayList::Recorder::ContextState::concatCTM):
* platform/graphics/efl/ImageBufferEfl.cpp:
(WebCore::encodeImageJPEG):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/filters/Filter.h:
(WebCore::Filter::mapAbsolutePointToLocalPoint):
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::selectionRect):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::capitalized):
(WebCore::shouldSynthesize):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
(WebCore::TextureMapperLayer::replicaTransform):
(WebCore::TextureMapperLayer::mapScrollOffset):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
(WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
* platform/graphics/transforms/AffineTransform.cpp:
(WebCore::AffineTransform::inverse):
* platform/graphics/transforms/AffineTransform.h:
* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::mappedPoint):
(WebCore::TransformState::mappedSecondaryQuad):
(WebCore::TransformState::mapQuad):
(WebCore::TransformState::flattenWithTransform):
* platform/graphics/transforms/TransformState.h:
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::TransformationMatrix::inverse):
* platform/graphics/transforms/TransformationMatrix.h:
* platform/graphics/win/ImageBufferDirect2D.cpp:
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/win/ImageDecoderDirect2D.cpp:
(WebCore::ImageDecoder::hotSpot):
* platform/graphics/win/ImageDecoderDirect2D.h:
* platform/graphics/x11/PlatformDisplayX11.cpp:
(WebCore::PlatformDisplayX11::supportsXDamage):
* platform/graphics/x11/PlatformDisplayX11.h:
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::hotSpot):
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::hotSpot):
(WebCore::ICOImageDecoder::hotSpotAtIndex):
* platform/image-decoders/ico/ICOImageDecoder.h:
* platform/image-encoders/JPEGImageEncoder.cpp:
(WebCore::compressRGBABigEndianToJPEG):
* platform/image-encoders/JPEGImageEncoder.h:
* platform/ios/LegacyTileCache.h:
* platform/ios/LegacyTileCache.mm:
(WebCore::LegacyTileCache::setOverrideVisibleRect):
* platform/ios/LegacyTileLayer.mm:
(-[LegacyTileHostLayer renderInContext:]):
* platform/linux/MemoryPressureHandlerLinux.cpp:
* platform/mac/ThemeMac.h:
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::controlFont):
* platform/mediastream/MediaConstraints.cpp:
(WebCore::MediaTrackConstraintSetMap::set):
* platform/mediastream/MediaConstraints.h:
(WebCore::MediaTrackConstraintSetMap::width):
(WebCore::MediaTrackConstraintSetMap::height):
(WebCore::MediaTrackConstraintSetMap::sampleRate):
(WebCore::MediaTrackConstraintSetMap::sampleSize):
(WebCore::MediaTrackConstraintSetMap::aspectRatio):
(WebCore::MediaTrackConstraintSetMap::frameRate):
(WebCore::MediaTrackConstraintSetMap::volume):
(WebCore::MediaTrackConstraintSetMap::echoCancellation):
(WebCore::MediaTrackConstraintSetMap::facingMode):
(WebCore::MediaTrackConstraintSetMap::deviceId):
(WebCore::MediaTrackConstraintSetMap::groupId):
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::supportsSizeAndFrameRate):
(WebCore::RealtimeMediaSource::applySizeAndFrameRate):
(WebCore::RealtimeMediaSource::applyConstraints):
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::applySizeAndFrameRate):
(WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions):
(WebCore::AVVideoCaptureSource::supportsSizeAndFrameRate):
* platform/mediastream/openwebrtc/MediaEndpointOwr.h:
* platform/network/CacheValidation.cpp:
(WebCore::computeCurrentAge):
(WebCore::computeFreshnessLifetimeForHTTPFamily):
* platform/network/CacheValidation.h:
* platform/network/DataURLDecoder.h:
* platform/network/HTTPHeaderMap.h:
(WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::updateKeyValue):
* platform/network/HTTPParsers.cpp:
(WebCore::parseHTTPDate):
* platform/network/HTTPParsers.h:
* platform/network/ResourceHandle.cpp:
(WebCore::ResourceHandle::didReceiveResponse):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::cacheControlMaxAge):
(WebCore::parseDateValueInHeader):
(WebCore::ResourceResponseBase::date):
(WebCore::ResourceResponseBase::age):
(WebCore::ResourceResponseBase::expires):
(WebCore::ResourceResponseBase::lastModified):
* platform/network/ResourceResponseBase.h:
(WebCore::ResourceResponseBase::certificateInfo):
* platform/network/SocketStreamHandle.h:
* platform/network/SocketStreamHandleClient.h:
* platform/network/cf/SocketStreamHandleImpl.h:
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::SocketStreamHandleImpl::readStreamCallback):
(WebCore::SocketStreamHandleImpl::platformSend):
* platform/network/curl/SocketStreamHandleImpl.h:
* platform/network/curl/SocketStreamHandleImplCurl.cpp:
(WebCore::SocketStreamHandleImpl::platformSend):
* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesInPartitionForURL):
* platform/network/soup/SocketStreamHandleImpl.h:
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::readBytes):
(WebCore::SocketStreamHandleImpl::platformSend):
* rendering/BreakLines.h:
(WebCore::nextBreakablePositionNonLoosely):
(WebCore::nextBreakablePositionLoosely):
(WebCore::isBreakable):
* rendering/HitTestingTransformState.cpp:
(WebCore::HitTestingTransformState::flattenWithTransform):
* rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::interpolationQualityFromStyle):
(WebCore::ImageQualityController::chooseInterpolationQuality):
* rendering/ImageQualityController.h:
* rendering/InlineIterator.h:
(WebCore::InlineIterator::moveTo):
(WebCore::InlineIterator::nextBreakablePosition):
(WebCore::InlineIterator::setNextBreakablePosition):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::substringToRender):
(WebCore::InlineTextBox::hyphenatedStringForTextRun):
(WebCore::InlineTextBox::constructTextRun):
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::substringToRender):
(WebCore::InlineTextBox::hyphenatedStringForTextRun):
(WebCore::InlineTextBox::constructTextRun):
* rendering/OrderIterator.cpp:
(WebCore::OrderIterator::reset):
* rendering/OrderIterator.h:
* rendering/PaintInfo.h:
(WebCore::PaintInfo::applyTransform):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlockRareData::RenderBlockRareData):
(WebCore::RenderBlock::baselinePosition):
(WebCore::RenderBlock::firstLineBaseline):
(WebCore::RenderBlock::inlineBlockBaseline):
(WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::firstLineBaseline):
(WebCore::RenderBlockFlow::inlineBlockBaseline):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax):
(WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
(WebCore::RenderBox::overrideContainingBlockContentLogicalWidth):
(WebCore::RenderBox::overrideContainingBlockContentLogicalHeight):
(WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth):
(WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight):
(WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeContentLogicalHeight):
(WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
* rendering/RenderBox.h:
(WebCore::RenderBox::firstLineBaseline):
(WebCore::RenderBox::inlineBlockBaseline):
* rendering/RenderCombineText.cpp:
(WebCore::RenderCombineText::computeTextOrigin):
* rendering/RenderCombineText.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::baselinePosition):
(WebCore::RenderFlexibleBox::firstLineBaseline):
(WebCore::RenderFlexibleBox::inlineBlockBaseline):
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
(WebCore::RenderFlexibleBox::marginBoxAscentForChild):
(WebCore::RenderFlexibleBox::computeMainSizeFromAspectRatioUsing):
(WebCore::RenderFlexibleBox::adjustChildSizeForAspectRatioCrossAxisMinAndMax):
(WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderGrid.cpp:
(WebCore::GridTrack::setGrowthLimit):
(WebCore::GridTrack::setGrowthLimitCap):
(WebCore::GridTrack::growthLimitCap):
(WebCore::RenderGrid::GridSizingData::freeSpace):
(WebCore::RenderGrid::GridSizingData::availableSpace):
(WebCore::RenderGrid::GridSizingData::setAvailableSpace):
(WebCore::RenderGrid::GridSizingData::setFreeSpace):
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeIntrinsicLogicalHeight):
(WebCore::RenderGrid::computeIntrinsicLogicalContentHeightUsing):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::overrideContainingBlockContentSizeForChild):
(WebCore::setOverrideContainingBlockContentSizeForChild):
(WebCore::RenderGrid::logicalHeightForChild):
(WebCore::RenderGrid::minSizeForChild):
(WebCore::RenderGrid::minContentForChild):
(WebCore::RenderGrid::maxContentForChild):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
(WebCore::sortByGridTrackGrowthPotential):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::computeAutoRepeatTracksCount):
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
(WebCore::RenderGrid::layoutGridItems):
* rendering/RenderGrid.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::hitTestLayer):
* rendering/RenderLayerBacking.cpp:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItem):
(WebCore::RenderListBox::listIndexIsVisible):
(WebCore::RenderListBox::computeFirstIndexesVisibleInPaddingTopBottomAreas):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
(WebCore::RenderTable::baselinePosition):
(WebCore::RenderTable::inlineBlockBaseline):
(WebCore::RenderTable::firstLineBaseline):
* rendering/RenderTable.h:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::cellBaselinePosition):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::firstLineBaseline):
* rendering/RenderTableSection.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::stringView):
* rendering/RenderText.h:
* rendering/RenderTextControl.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::setSelection):
(WebCore::RenderView::splitSelectionBetweenSubtrees):
(WebCore::RenderView::getSelection):
(WebCore::RenderView::clearSelection):
* rendering/RenderView.h:
* rendering/SelectionSubtreeRoot.h:
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::lastFragment):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
* rendering/line/BreakingContext.h:
(WebCore::WordTrailingSpace::width):
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
(WebCore::BreakingContext::InlineIteratorHistory::nextBreakablePosition):
(WebCore::BreakingContext::InlineIteratorHistory::moveTo):
(WebCore::tryHyphenating):
(WebCore::BreakingContext::computeAdditionalBetweenWordsWidth):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
* rendering/mathml/MathMLStyle.cpp:
(WebCore::MathMLStyle::resolveMathMLStyle):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::baselinePosition):
(WebCore::RenderMathMLTable::firstLineBaseline):
* rendering/mathml/RenderMathMLBlock.h:
(WebCore::RenderMathMLBlock::ascentForChild):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::firstLineBaseline):
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::firstLineBaseline):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLPadded.cpp:
(WebCore::RenderMathMLPadded::firstLineBaseline):
* rendering/mathml/RenderMathMLPadded.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::firstLineBaseline):
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::validateAndGetReferenceChildren):
(WebCore::RenderMathMLScripts::firstLineBaseline):
* rendering/mathml/RenderMathMLScripts.h:
* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::firstLineBaseline):
* rendering/mathml/RenderMathMLSpace.h:
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::updateMathVariantGlyph):
(WebCore::RenderMathMLToken::firstLineBaseline):
* rendering/mathml/RenderMathMLToken.h:
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::nodeAtFloatPoint):
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::nodeAtFloatPoint):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::hitTestClipContent):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::nodeAtPoint):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::setupNonScalingStrokeContext):
(WebCore::RenderSVGShape::nodeAtFloatPoint):
(WebCore::RenderSVGShape::calculateStrokeBoundingBox):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::nodeAtFloatPoint):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::intersectRepaintRectWithShadows):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::clipToImageBuffer):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::Parent::Parent):
* style/RenderTreeUpdater.h:
* style/StyleScope.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseAttribute):
(WebCore::SVGElement::resolveCustomStyle):
* svg/SVGElement.h:
* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
(WebCore::SVGToOTFFontConverter::processGlyphElement):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
(WebCore::convertSVGToOTFFont):
* svg/SVGToOTFFontConversion.h:
* testing/Internals.cpp:
(WebCore::Internals::setEventThrottlingBehaviorOverride):
(WebCore::Internals::eventThrottlingBehaviorOverride):
* testing/Internals.h:
* workers/Worker.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::prepareToSend):
(WebCore::XMLHttpRequest::didFinishLoading):
* xml/XMLHttpRequest.h:

Source/WebKit/mac:

Use WTF::Optional::value_or.

* DOM/DOMHTMLOptionsCollection.mm:
(-[DOMHTMLOptionsCollection add:index:]):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::evaluate):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView sendEvent:isDrawRect:]):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidCommitLoad):
* WebCoreSupport/WebPaymentCoordinatorClient.h:
* WebCoreSupport/WebPaymentCoordinatorClient.mm:
(WebPaymentCoordinatorClient::completeShippingMethodSelection):
(WebPaymentCoordinatorClient::completeShippingContactSelection):
(WebPaymentCoordinatorClient::completePaymentMethodSelection):
* WebCoreSupport/WebSecurityOrigin.mm:
(-[WebSecurityOrigin port]):
* WebView/WebHTMLView.mm:
(toAction):
(toTag):

Source/WebKit/win:

Use WTF::Optional::value_or.

* Plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDidCommitLoad):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebSecurityOrigin.cpp:
(WebSecurityOrigin::port):

Source/WebKit2:

* NetworkProcess/NetworkDataTask.cpp:
(WebKit::NetworkDataTask::didReceiveResponse):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::responseHasExpired):
* NetworkProcess/cache/NetworkCacheCoders.h:
(WebKit::NetworkCache::Coder<std::optional<T>>::encode):
(WebKit::NetworkCache::Coder<std::optional<T>>::decode):
(WebKit::NetworkCache::Coder<Optional<T>>::encode): Deleted.
(WebKit::NetworkCache::Coder<Optional<T>>::decode): Deleted.
* NetworkProcess/cache/NetworkCacheData.cpp:
(WebKit::NetworkCache::readOrMakeSalt):
* NetworkProcess/cache/NetworkCacheData.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::revalidationRequest):
(WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
* NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):
(WebKit::NetworkCache::Statistics::queryWasEverRequested):
* NetworkProcess/cache/NetworkCacheStatistics.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::storeBodyAsBlob):
(WebKit::NetworkCache::Storage::encodeRecord):
(WebKit::NetworkCache::Storage::dispatchWriteOperation):
* NetworkProcess/cache/NetworkCacheStorage.h:
* Platform/IPC/ArgumentCoders.h:
(IPC::ArgumentCoder<std::optional<T>>::encode):
(IPC::ArgumentCoder<std::optional<T>>::decode):
(IPC::ArgumentCoder<WTF::Optional<T>>::encode): Deleted.
(IPC::ArgumentCoder<WTF::Optional<T>>::decode): Deleted.
* Platform/IPC/Connection.h:
(IPC::Connection::sendWithReply):
* Platform/SharedMemory.h:
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::map):
* Scripts/webkit/messages.py:
(class_template_headers):
* Shared/API/APISecurityOrigin.h:
(API::SecurityOrigin::create):
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
* Shared/API/c/WKSecurityOriginRef.cpp:
(WKSecurityOriginGetPort):
* Shared/SessionState.h:
* Shared/WebPageCreationParameters.h:
* Shared/mac/ObjCObjectGraph.mm:
(WebKit::typeFromObject):
* Shared/mac/SecItemShim.cpp:
(WebKit::sendSecItemRequest):
* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetStorageDetailsByOrigin):
* UIProcess/API/Cocoa/WKSecurityOrigin.mm:
(-[WKSecurityOrigin port]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _navigationGestureDidEnd]):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataType):
* UIProcess/API/efl/EwkView.cpp:
(EwkView::setCursor):
* UIProcess/API/mac/WKView.mm:
(toCoreScrollbarStyle):
(toAPIScrollbarStyle):
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::completeShippingMethodSelection):
(WebKit::WebPaymentCoordinatorProxy::completeShippingContactSelection):
(WebKit::WebPaymentCoordinatorProxy::completePaymentMethodSelection):
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toPKPaymentSummaryItem):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection):
(WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection):
(WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection):
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::webFrameIDForHandle):
(WebKit::WebAutomationSession::switchToBrowsingContext):
(WebKit::WebAutomationSession::evaluateJavaScriptFunction):
(WebKit::WebAutomationSession::resolveChildFrameHandle):
(WebKit::WebAutomationSession::resolveParentFrameHandle):
(WebKit::WebAutomationSession::computeElementLayout):
* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateViewExposedRect):
(WebKit::WebViewImpl::setOverlayScrollbarStyle):
(WebKit::WebViewImpl::overlayScrollbarStyle):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::setViewExposedRect):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::viewExposedRect):
* UIProcess/InspectorServer/WebSocketServerConnection.cpp:
(WebKit::WebSocketServerConnection::didReceiveSocketStreamData):
* UIProcess/InspectorServer/WebSocketServerConnection.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::fileCreationTime):
(WebKit::fileModificationTime):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::backForwardListState):
(WebKit::WebBackForwardList::restoreFromState):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setOverlayScrollbarStyle):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::overlayScrollbarStyle):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataRecord.h:
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::transformFromScene):
* UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformInitializeStore):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _scrollOffsetForEvent:]):
(-[WKContentView _interpretKeyEvent:isCharEvent:]):
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeFormDataElement):
(WebKit::decodeFormDataElement):
(WebKit::decodeV1SessionHistory):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::setViewExposedRect):
* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::completeShippingMethodSelection):
(WebKit::WebPaymentCoordinator::completeShippingContactSelection):
(WebKit::WebPaymentCoordinator::completePaymentMethodSelection):
* WebProcess/ApplePay/WebPaymentCoordinator.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetEventThrottlingBehaviorOverride):
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::convertFromPDFViewToRootView):
(WebKit::PDFPlugin::convertFromPDFViewToScreen):
(WebKit::PDFPlugin::boundsOnScreen):
(WebKit::PDFPlugin::geometryDidChange):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::geometryDidChange):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performFrameLoadURLRequest):
(WebKit::PluginView::evaluate):
* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::pluginLoadClientPolicyForHost):
* WebProcess/Plugins/WebPluginInfoProvider.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toFormData):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::preferredScrollbarOverlayStyle):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::certificateInfo):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):
(WebKit::WebPage::setScrollbarOverlayStyle):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::scrollbarOverlayStyle):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setViewExposedRect):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setViewExposedRect):

Source/WTF:

Import std::optional reference implementation offered by the C++17
original proposal paper. It has the same interface and functionality
to the C++17's one. Previous WTF::Optional lacks several functionalities.
The largest one is the correct constexpr constructors. This fact prevents
us from using Optional<literal type> in constexpr context in WebKit.

In WebKit, we do not allow global constructors. So only the constexpr
constructor is the way to use WTF::Optional in the static const
global variables. WTF::Optional is used in DOMJIT::Effect and
we would like to emit static const global variables that includes
this DOMJIT::Effect. That is the main motivation of this work.
This functionality allows the IDL code generator to emit DOMJIT
signatures as static const global variables.

We import the reference implementation one instead of LLVM libc++'s one.
This is because LLVM libc++'s one depends on many macro and type_traits
offered by libc++ implementation. And adopting it to WebKit requires
large modification compared to this reference implementation one.
Furthermore, it is difficult to compile libc++'s optional in old GCC and VC++.
It also requires some more modifications. To keep the thing simple,
we import the reference implementation one now. Once C++17 is released
and we update the compiler baseline, we can smoothly switch to the standard
library's std::optional.

We also add support for the environment that does not use exceptions to this
reference implementation.

And we also add valueOrCompute helper function. That keeps the extended
functionality that previous WTF::Optional has.

* wtf/CrossThreadQueue.h:
(WTF::CrossThreadQueue<DataType>::tryGetMessage):
* wtf/Expected.h:
(WTF::makeExpected):
* wtf/Forward.h:
* wtf/HashTraits.h:
(WTF::HashTraits<Ref<P>>::take):
* wtf/MainThread.cpp:
(WTF::initializeGCThreads):
(WTF::mayBeGCThread):
* wtf/MainThread.h:
* wtf/Optional.h:
(std::detail_::is_assignable::has_assign):
(std::detail_::has_overloaded_addressof::has_overload):
(std::detail_::static_addressof):
(std::detail_::convert):
(std::nullopt_t::nullopt_t):
(std::bad_optional_access::bad_optional_access):
(std::optional_base::optional_base):
(std::optional_base::~optional_base):
(std::constexpr_optional_base::constexpr_optional_base):
(std::optional::dataptr):
(std::optional::contained_val):
(std::optional::__NOEXCEPT_):
(std::optional::optional):
(std::optional::operator=):
(std::optional::emplace):
(std::optional::operator ->):
(std::optional::operator *):
(std::optional::value):
(std::optional::value_or):
(std::operator==):
(std::operator!=):
(std::operator<):
(std::operator>):
(std::operator<=):
(std::operator>=):
(std::__NOEXCEPT_):
(std::make_optional):
(std::hash<std::optional<T>>::operator()):
(WTF::NulloptTag::NulloptTag): Deleted.
(WTF::Optional::Optional): Deleted.
(WTF::Optional::~Optional): Deleted.
(WTF::Optional::operator=): Deleted.
(WTF::Optional::operator bool): Deleted.
(WTF::Optional::operator->): Deleted.
(WTF::Optional::operator*): Deleted.
(WTF::Optional::value): Deleted.
(WTF::Optional::valueOr): Deleted.
(WTF::Optional::valueOrCompute): Deleted.
(WTF::Optional::asPtr): Deleted.
(WTF::Optional::destroy): Deleted.
(WTF::operator==): Deleted.
(WTF::operator!=): Deleted.
(WTF::makeOptional): Deleted.
(WTF::printInternal): Deleted.
* wtf/text/StringView.cpp:
(WTF::StringView::GraphemeClusters::Iterator::Impl::Impl):
(WTF::StringView::GraphemeClusters::Iterator::Iterator):
* wtf/text/StringView.h:

Tools:

Use WTF::Optional::value_or.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::stableStateOverride):
(WTR::UIScriptController::setStableStateOverride):
* TestRunnerShared/Bindings/JSWrappable.h:
(WTR::JSValueMakeBooleanOrNull):
(WTR::JSValueToNullableBoolean):
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::stableStateOverride):
(WTR::UIScriptController::setStableStateOverride):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* TestWebKitAPI/Tests/WTF/Optional.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/HTMLParserIdioms.cpp:
(TestWebKitAPI::testParseHTMLInteger):
(TestWebKitAPI::testParseHTMLNonNegativeInteger):
* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::checkURL):
(TestWebKitAPI::checkRelativeURL):
(TestWebKitAPI::checkURLDifferences):
(TestWebKitAPI::checkRelativeURLDifferences):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::stableStateOverride):
(WTR::UIScriptController::setStableStateOverride):

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

2 years agoFix build warnings in WebCore/Modules/indexeddb/server/IDBSerialization.cp
ossy@webkit.org [Sun, 27 Nov 2016 04:40:58 +0000 (04:40 +0000)]
Fix build warnings in WebCore/Modules/indexeddb/server/IDBSerialization.cp
https://bugs.webkit.org/show_bug.cgi?id=165070

Reviewed by Brady Eidson.

* Modules/indexeddb/server/IDBSerialization.cpp:

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

2 years agoConvert IntersectionObserver over to using RuntimeEnabledFeatures so it can be proper...
commit-queue@webkit.org [Sun, 27 Nov 2016 04:21:49 +0000 (04:21 +0000)]
Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
https://bugs.webkit.org/show_bug.cgi?id=164965

Patch by Sam Weinig <sam@webkit.org> on 2016-11-26
Reviewed by Simon Fraser.

Source/JavaScriptCore:

* runtime/CommonIdentifiers.h:
Add identifiers needed for RuntimeEnabledFeatures.

Source/WebCore:

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::reset):
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setIntersectionObserverEnabled):
(WebCore::RuntimeEnabledFeatures::intersectionObserverEnabled):
Add intersection observer setting.

* page/IntersectionObserver.idl:
* page/IntersectionObserverEntry.idl:
Convert to use EnabledAtRuntime extended attribute.

* page/Settings.in:
Remove the old intersection observer setting.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(-[WebPreferences intersectionObserverEnabled]):
(-[WebPreferences setIntersectionObserverEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
Add a preference, defaulting to off, for enabling IntersectionObserver.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetIntersectionObserverEnabled):
(WKPreferencesGetIntersectionObserverEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Add a preference, defaulting to off, for enabling IntersectionObserver.

Tools:

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
Add new files.

* DumpRenderTree/TestOptions.h: Added.
* DumpRenderTree/TestOptions.mm: Added.
(parseBooleanTestHeaderValue):
(TestOptions::TestOptions):
Port TestOption parsing from WKTR to DRT.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
(resetWebViewToConsistentStateBeforeTesting):
(runTest):
* WebKitTestRunner/TestController.cpp:
Pass TestOptions down to resetWebPreferencesToConsistentValues to allow setting
preferences conditionally.

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
Add a new test option header, enableIntersectionObserver, to enable IntersectionObserver.

LayoutTests:

* intersection-observer/intersection-observer-entry-interface.html:
* intersection-observer/intersection-observer-interface.html:
* resources/testharnessreport.js:
Switch from enabling IntersectionObserver via internals.settings to using
comment header switches.

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

2 years agoMigrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
simon.fraser@apple.com [Sun, 27 Nov 2016 02:27:55 +0000 (02:27 +0000)]
Migrate some layout timer-related code from std::chrono to Seconds and MonotonicTime
https://bugs.webkit.org/show_bug.cgi?id=164992

Reviewed by Darin Adler.
Source/WebCore:

std::chrono::milliseconds -> Seconds.

Rename Document::elapsedTime() to timeSinceDocumentCreation() which is more explicit.

Replace INSTRUMENT_LAYOUT_SCHEDULING with LOG(Layout...).

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::implicitClose):
(WebCore::Document::isLayoutTimerActive):
(WebCore::Document::minimumLayoutDelay):
(WebCore::Document::timeSinceDocumentCreation):
(WebCore::Document::elapsedTime): Deleted.
* dom/Document.h:
* page/ChromeClient.h:
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::layoutTimerFired):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
(WebCore::FrameView::unscheduleRelayout):
* page/Settings.cpp:
(WebCore::Settings::setLayoutInterval):
* page/Settings.h:
(WebCore::Settings::layoutInterval):
* style/StyleScope.cpp:
(WebCore::Style::Scope::removePendingSheet):
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::runInMode):

Source/WebKit2:

No more ugly conversion from seconds to milliseconds.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::eventThrottlingDelay):

Source/WTF:

Add Seconds::zero() as a nicer way to express Seconds(0).

* wtf/Seconds.h:
(WTF::Seconds::zero):

Tools:

Use Seconds::zero().

* TestWebKitAPI/Tests/WTF/Condition.cpp:

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

2 years agoComposited negative z-index elements are hidden behind the body sometimes
simon.fraser@apple.com [Sun, 27 Nov 2016 02:06:59 +0000 (02:06 +0000)]
Composited negative z-index elements are hidden behind the body sometimes
https://bugs.webkit.org/show_bug.cgi?id=165080
rdar://problem/22260229

Reviewed by Zalan Bujtas.

Source/WebCore:

If the <body> falls into the "directly composited background color" code path
(say, because it's composited because of composited negative z-index children,
and has content of its own), then we failed to take root background propagation
into account, and put the opaque root background color on the body's layer.

Fix by sharing some code from RenderBox related to whether the body's renderer
paints its background.

Tests cover the buggy case, and the case where the <html> has its own background color.

Tests: compositing/backgrounds/negative-z-index-behind-body-non-propagated.html
       compositing/backgrounds/negative-z-index-behind-body.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintsOwnBackground):
(WebCore::RenderBox::paintBackground):
(WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
(WebCore::skipBodyBackground): Deleted.
* rendering/RenderBox.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):

LayoutTests:

* compositing/backgrounds/negative-z-index-behind-body-expected.html: Added.
* compositing/backgrounds/negative-z-index-behind-body-non-propagated-expected.html: Added.
* compositing/backgrounds/negative-z-index-behind-body-non-propagated.html: Added.
* compositing/backgrounds/negative-z-index-behind-body.html: Added.

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

2 years agoConvert testharnessreport.js to LF linebreaks, from CRLF, which broke patches.
simon.fraser@apple.com [Sat, 26 Nov 2016 23:35:11 +0000 (23:35 +0000)]
Convert testharnessreport.js to LF linebreaks, from CRLF, which broke patches.

* resources/testharnessreport.js:
(convertResult):
(self.testRunner.add_completion_callback.):
(self.testRunner.add_completion_callback):

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

2 years agoAdd literals for various time units
simon.fraser@apple.com [Sat, 26 Nov 2016 23:21:39 +0000 (23:21 +0000)]
Add literals for various time units
https://bugs.webkit.org/show_bug.cgi?id=165074

Reviewed by Filip Pizlo.

Source/WTF:

Add _min, _s, _ms, _us and _ns literals for easy creation of Seconds from long double
and unsigned long long types (those allowed for custom literals).

Add minutes-related functions (there are one or two use cases in WebCore).

* wtf/Seconds.h:
(WTF::Seconds::minutes):
(WTF::Seconds::fromMinutes):
(WTF::Seconds::fromMilliseconds):
(WTF::Seconds::fromMicroseconds):
(WTF::Seconds::fromNanoseconds):
(WTF::operator _min):
(WTF::operator _s):
(WTF::operator _ms):
(WTF::operator _us):
(WTF::operator _ns):

Tools:

Add tests for new time literals. Add new tests for units.

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

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

2 years agoFix compile warnings after r208415
ossy@webkit.org [Sat, 26 Nov 2016 00:17:19 +0000 (00:17 +0000)]
Fix compile warnings after r208415
https://bugs.webkit.org/show_bug.cgi?id=165061

Reviewed by Andy Estes.

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

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

2 years ago[GTK] Follow-up fixes to r208974
mcatanzaro@igalia.com [Fri, 25 Nov 2016 18:38:15 +0000 (18:38 +0000)]
[GTK] Follow-up fixes to r208974
https://bugs.webkit.org/show_bug.cgi?id=164771

Unreviewed, implement Carlos's review feedback.

* UIProcess/API/gtk/WebKitNotification.cpp:
(webkit_notification_get_tag):
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::withdrawAnyPreviousNotificationMatchingTag):
(WebKitNotificationProvider::show):
* UIProcess/API/gtk/WebKitNotificationProvider.h:

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

2 years ago[CSS Font Loading] FontFace.load() promises don't always fire
mmaxfield@apple.com [Fri, 25 Nov 2016 17:35:06 +0000 (17:35 +0000)]
[CSS Font Loading] FontFace.load() promises don't always fire
https://bugs.webkit.org/show_bug.cgi?id=165037

Reviewed by Simon Fraser.

Source/WebCore:

We currently handle web fonts in two phases. The first phase is building up
StyleRuleFontFace objects which reflect the style on the page. The second is creating
CSSFontFace objects from those StyleRuleFontFace objects. When script modifies the
style on the page, we can often update the CSSFontFace objects, but there are some
modifications which we don't know how to model. For these operations, we destroy the
CSSFontFace objects and rebuild them from the newly modified StyleRuleFontFace objects.

Normally, this is fine. However, with the CSS font loading API, the CSSFontFaces back
Javascript objects which will persist across the rebuilding step mentioned above. This
means that the FontFace objects need to adopt the new CSSFontFace objects and forget
the old CSSFontFace objects.

This gets a little tricky because the operation which caused the rebuild may actually
be a modification to the specific @font-face block which backs a Javascript FontFace
object. Because the CSSOM can be used to change the src: attribute of the FontFace
object, I decided in r201971 to clear the FontFace's promise in case an old load would
cause the promise to resolve. However, this would never happen because the old
CSSFontFace is unparented during the FontFace::adopt()ion of the new CSSFontFace.
Therefore, old loads may still complete, but the signal would never make it to the
FontFace and therefore would not cause the promise to resolve. In addition, clearing
the promise during a rebuild is problematic because that rebuild may be caused by
operations which have nothing to do with the specific FontFace object in question (so
the FontFace object should be observably uneffected.)

Because of the above reasons, this patch simply stops clearing the promise during the
rebuild phase.

Tests: fast/text/fontface-rebuild-during-loading.html
       fast/text/fontface-rebuild-during-loading-2.html

* css/FontFace.cpp:
(WebCore::FontFace::adopt):

LayoutTests:

* fast/text/fontfaceset-rebuild-during-loading-2-expected.txt: Added.
* fast/text/fontfaceset-rebuild-during-loading-2.html: Added.

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

2 years agoMemoryPressureHandler should only trigger synchronous GC on iOS
akling@apple.com [Fri, 25 Nov 2016 14:59:07 +0000 (14:59 +0000)]
MemoryPressureHandler should only trigger synchronous GC on iOS
<https://webkit.org/b/165043>
<rdar://problem/29312684>

Reviewed by Sam Weinig.

On iOS we know that there is really only one web process in play at a time,
so it's okay to do a synchronous GC immediately in response to high memory pressure.

On other platforms, we may have tens or hundreds of web processes, and if they
all start doing full GCs at the same time, it can easily bring a system to its knees
if it's already under pressure.

Fix this by using garbageCollectSoon() on non-iOS platforms.

* page/MemoryRelease.cpp:
(WebCore::releaseCriticalMemory):

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

2 years ago[GTK] Notifications API does not expose or respect the "tag" attribute
mcatanzaro@igalia.com [Thu, 24 Nov 2016 20:10:25 +0000 (20:10 +0000)]
[GTK] Notifications API does not expose or respect the "tag" attribute
https://bugs.webkit.org/show_bug.cgi?id=164771

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

Expose a tag property on WebKitNotification. Ensure that any previous notification with the
same tag is closed when showing a new notification with that tag.

* UIProcess/API/gtk/WebKitNotification.cpp:
(webkit_notification_class_init):
(webkitNotificationCreate):
(webkit_notification_get_tag):
* UIProcess/API/gtk/WebKitNotification.h:
* UIProcess/API/gtk/WebKitNotificationProvider.cpp:
(WebKitNotificationProvider::withdrawAnyPreviousNotificationMatchingTag):
(WebKitNotificationProvider::show):
* UIProcess/API/gtk/WebKitNotificationProvider.h:
* UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:

Tools:

Verify that showing a notification with the same tag as another notification closes the
previous notification before the new notification is shown.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewNotification):

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

2 years ago[css-grid] Convert grid representation into a class
svillar@igalia.com [Thu, 24 Nov 2016 15:08:11 +0000 (15:08 +0000)]
[css-grid] Convert grid representation into a class
https://bugs.webkit.org/show_bug.cgi?id=165042

Reviewed by Manuel Rego Casasnovas.

So far grids are represented as Vectors of Vectors. There are a couple of issues associated
to that decision. First or all, the source code in RenderGrid assumes the existence of that
data structure, meaning that we cannot eventually change it without changing a lot of
code. Apart from the coupling there is another issue, RenderGrid is full of methods to
access and manipulate that data structure.

Instead, it'd be much better to have a Grid class encapsulating both the data structures and
the methods required to access/manipulate it. Note that follow-up patches will move even
more data and procedures into this new class from the RenderGrid code.

No new tests required as this is a refactoring.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::Grid::ensureGridSize): Moved from RenderGrid.
(WebCore::RenderGrid::Grid::insert): Ditto.
(WebCore::RenderGrid::Grid::clear): Ditto.
(WebCore::RenderGrid::GridIterator::GridIterator):
(WebCore::RenderGrid::gridColumnCount): Use Grid's methods.
(WebCore::RenderGrid::gridRowCount): Ditto.
(WebCore::RenderGrid::placeItemsOnGrid): Use Grid's methods to insert children.
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto.
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Ditto.
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Ditto.
(WebCore::RenderGrid::numTracks): Use Grid's methods.
(WebCore::RenderGrid::ensureGridSize): Deleted. Moved to Grid class.
(WebCore::RenderGrid::insertItemIntoGrid): Deleted. Moved to Grid class.
* rendering/RenderGrid.h:

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

2 years agoUnreviewed. Fix GTK+ test /webkit2/WebKitWebContext/get-plugins after r208429.
carlosgc@webkit.org [Thu, 24 Nov 2016 13:35:34 +0000 (13:35 +0000)]
Unreviewed. Fix GTK+ test /webkit2/WebKitWebContext/get-plugins after r208429.

Test plugin library was renamed as libTestNetscapePlugIn.so in r208429.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextGetPlugins): Update the library name.

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

2 years agoRemove unused bool return from Element::willRecalcStyle
antti@apple.com [Thu, 24 Nov 2016 12:54:00 +0000 (12:54 +0000)]
Remove unused bool return from Element::willRecalcStyle
https://bugs.webkit.org/show_bug.cgi?id=165059

Reviewed by Andreas Kling.

It is always true.

* dom/Element.cpp:
(WebCore::Element::willRecalcStyle):
* dom/Element.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::willRecalcStyle):
* html/HTMLFrameSetElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willRecalcStyle):
* html/HTMLPlugInImageElement.h:
* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveComposedTree):
* svg/SVGElement.cpp:
(WebCore::SVGElement::willRecalcStyle):
* svg/SVGElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::willRecalcStyle):
* svg/SVGUseElement.h:

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

2 years agoRemove ENABLE_ASSEMBLER_WX_EXCLUSIVE code
zandobersek@gmail.com [Wed, 23 Nov 2016 09:37:58 +0000 (09:37 +0000)]
Remove ENABLE_ASSEMBLER_WX_EXCLUSIVE code
https://bugs.webkit.org/show_bug.cgi?id=165027

Reviewed by Darin Adler.

.:

* Source/cmake/WebKitFeatures.cmake: Remove the ENABLE_ASSEMBLER_WX_EXCLUSIVE option.

Source/JavaScriptCore:

Remove the code guarded with ENABLE(ASSEMBLER_WX_EXCLUSIVE).
No port enables this and the guarded code doesn't build at all,
so it's safe to say it's abandoned.

* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::initializeAllocator):
(JSC::ExecutableAllocator::ExecutableAllocator):
(JSC::ExecutableAllocator::reprotectRegion): Deleted.

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

2 years ago[Mac] In Legacy WebKit, pressing an arrow key in editable content doesn’t hide the...
mitz@apple.com [Wed, 23 Nov 2016 04:05:21 +0000 (04:05 +0000)]
[Mac] In Legacy WebKit, pressing an arrow key in editable content doesn’t hide the mouse cursor
https://bugs.webkit.org/show_bug.cgi?id=165036
<rdar://problem/5708580>

Reviewed by Alexey Proskuryakov.

* WebView/WebHTMLView.mm:
(-[WebHTMLView performKeyEquivalent:]): Hide the cursor if WebCore handled the event,
  similarly to what we do in -keyDown: and to what WKWebView does with all key events.

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

2 years agoFix exception scope verification failures in JSC profiler files.
mark.lam@apple.com [Tue, 22 Nov 2016 20:52:05 +0000 (20:52 +0000)]
Fix exception scope verification failures in JSC profiler files.
https://bugs.webkit.org/show_bug.cgi?id=164971

Reviewed by Saam Barati.

* profiler/ProfilerBytecodeSequence.cpp:
(JSC::Profiler::BytecodeSequence::addSequenceProperties):
* profiler/ProfilerCompilation.cpp:
(JSC::Profiler::Compilation::toJS):
* profiler/ProfilerDatabase.cpp:
(JSC::Profiler::Database::toJS):
(JSC::Profiler::Database::toJSON):
* profiler/ProfilerOSRExitSite.cpp:
(JSC::Profiler::OSRExitSite::toJS):
* profiler/ProfilerOriginStack.cpp:
(JSC::Profiler::OriginStack::toJS):

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

2 years agoCrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::Extens...
antti@apple.com [Tue, 22 Nov 2016 20:13:38 +0000 (20:13 +0000)]
CrashTracer: [USER] com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::ExtensionStyleSheets::pageUserSheet + 14
https://bugs.webkit.org/show_bug.cgi?id=165030

Reviewed by Darin Adler.

Source/WebCore:

We failed to reset the style scope when an element was moved to a different document. This could lead to having dangling
document pointers in style scope and style resolver.

Test: fast/shadow-dom/shadow-host-move-to-different-document.html

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::didMoveToNewDocument):

    Reset style scope.

* dom/ShadowRoot.h:
* style/StyleScope.cpp:
(WebCore::Style::Scope::resolver):

    Some more assertions.

* style/StyleScope.h:
(WebCore::Style::Scope::document):

LayoutTests:

* fast/shadow-dom/shadow-host-move-to-different-document-expected.html: Added.
* fast/shadow-dom/shadow-host-move-to-different-document.html: Added.

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

2 years agoFix exception scope verification failures in JSONObject.cpp.
mark.lam@apple.com [Tue, 22 Nov 2016 19:16:55 +0000 (19:16 +0000)]
Fix exception scope verification failures in JSONObject.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165025

Reviewed by Saam Barati.

* runtime/JSONObject.cpp:
(JSC::gap):
(JSC::Stringifier::Stringifier):
(JSC::Stringifier::stringify):
(JSC::Stringifier::toJSON):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::walk):
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
(JSC::JSONStringify):

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

2 years agoOne more tiny bit of follow-up.
darin@apple.com [Tue, 22 Nov 2016 18:43:53 +0000 (18:43 +0000)]
One more tiny bit of follow-up.

* wtf/text/TextBreakIterator.cpp:
(WTF::numCharactersInGraphemeClusters): Removed unneeded always-true check.

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

2 years agoQuick follow-up to previous patch.
darin@apple.com [Tue, 22 Nov 2016 18:35:03 +0000 (18:35 +0000)]
Quick follow-up to previous patch.

* wtf/text/TextBreakIterator.cpp:
(WTF::numCharactersInGraphemeClusters): Removed incorrect assertion.

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

2 years agoMake normal case fast in the input element limitString function
darin@apple.com [Tue, 22 Nov 2016 17:16:02 +0000 (17:16 +0000)]
Make normal case fast in the input element limitString function
https://bugs.webkit.org/show_bug.cgi?id=165023

Reviewed by Dan Bernstein.

Source/WebCore:

When running Speedometer, the limitLength function was showing up as hot.
Fixed a couple obvious problems with that function's performance.

* html/TextFieldInputType.cpp:
(WebCore::isASCIILineBreak): Deleted. The isHTMLLineBreak function does
the same thing, but faster.
(WebCore::limitLength): Added a FIXME comment explaining that the function
isn't really a good idea. Don't call through to numCharactersInGraphemeClusters
at all for 8-bit strings since we don't allow CR or LF characters in the string
anyway, so there are no grapheme clusters more than a single code unit. Removed
optimization when the length is the string's length that String::left already does.
(WebCore::TextFieldInputType::sanitizeValue): Use isHTMLLineBreak instead of
isASCIILineBreak.
(WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): Ditto.

* platform/LocalizedStrings.cpp: Use auto a lot more rather than writing out
RetainPtr.
(WebCore::truncatedStringForLookupMenuItem): Removed unneeded special case for
empty strings. Removed unneeded string with the ellipsis character in it, since
the makeString function already knows how to append a character to a string.

* rendering/RenderText.cpp:
(WebCore::mapLineBreakToIteratorMode): Updated for change to LineBreakIteratorMode.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::nextBreakablePosition): Ditto.

Source/WTF:

* wtf/text/LineBreakIteratorPoolICU.h: Removed many unneeded includes.
Simplified the class a bit, removing some extra definitions.
(WTF::LineBreakIteratorPool::sharedPool): Use NeverDestroyed instead of new.
(WTF::LineBreakIteratorPool::makeLocaleWithBreakKeyword): Reimplemented in
a simpler way without using StringBuilder. Also updated for change to
LineBreakIteratorMode.
(WTF::LineBreakIteratorPool::put): Use uncheckedAppend since the code is
careful to only use the inline capacity in the vector.

* wtf/text/TextBreakIterator.cpp: Moved some includes in here from the header.
(WTF::mapLineIteratorModeToRules): Updated for change to LineBreakIteratorMode.
(WTF::openLineBreakIterator): Ditto.
(WTF::numGraphemeClusters): Added a fast path for all 8-bit strings; don't
use ICU for that case, even if there is a CR character in it.
(WTF::numCharactersInGraphemeClusters): Added a fast path for strings that are
short enough to entirely fit without even looking at the characters; that's a
case we likely hit all the time. Also added a fast path for all 8-bit strings.

* wtf/text/TextBreakIterator.h: Changed LineBreakIteratorMode to be an enum
class and not repeat UAX14 in the names of the modes. Initialize data members
in the class definition rather than the constructors.

Tools:

* TestWebKitAPI/CMakeLists.txt: Added TextBreakIterator.cpp.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
* TestWebKitAPI/Tests/WTF/TextBreakIterator.cpp: Added.
Contains some tests for the numGraphemeClusters and
numCharactersInGraphemeClusters functions that I used to make sure
that the new fast paths I added work correctly.

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

2 years ago[css-grid] Isolate size of internal representation from actual grid size
svillar@igalia.com [Tue, 22 Nov 2016 14:34:55 +0000 (14:34 +0000)]
[css-grid] Isolate size of internal representation from actual grid size
https://bugs.webkit.org/show_bug.cgi?id=165006

Reviewed by Manuel Rego Casasnovas.

RenderGrid has an internal representation of a grid used to place grid items, compute grid
positions, run the track sizing algorithm etc. That data structure normally has exactly the
same size as the actual grid specified using the grid-template-xxx properties (or any other
shorthand). But in some cases, like for example when the grid is empty, the internal data
structure does not really match the actual grid. In the particular case of empty grids no
memory allocations are done to create a grid representation as it is not needed.

From now on both gridColumnCount() and gridRowCount() will always return the size of the
data structure representing the grid whereas the newly added numTracks() will always return
the actual size of the grid.

This is the first required step of the process of isolating the data used by the grid track
sizing algorithm from the actual internal state of the LayoutGrid object.

No new tests as this is just a code refactoring.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::gridColumnCount): Always return the number of columns of the internal
data structure to represent the grid.
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths): Use the actual size of the grid to
create the GridSizingData structure.
(WebCore::RenderGrid::placeItemsOnGrid): Use the actual size of the grid to create the
GridSizingData structure.
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::numTracks): New method which returns the actual size of the grid.
* rendering/RenderGrid.h:

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

2 years ago[GTK] Fix introspection warning
svillar@igalia.com [Tue, 22 Nov 2016 11:14:44 +0000 (11:14 +0000)]
[GTK] Fix introspection warning
https://bugs.webkit.org/show_bug.cgi?id=165026

Reviewed by Michael Catanzaro.

This fixes an introspection annotation for a new API added in r208532.

* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkit_web_page_class_init):

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

2 years agoUnreviewed, add myself as a WebKit committer.
tpopela@redhat.com [Tue, 22 Nov 2016 11:09:11 +0000 (11:09 +0000)]
Unreviewed, add myself as a WebKit committer.

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

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

2 years ago[SOUP] Simplify custom protocols handler implementation
carlosgc@webkit.org [Tue, 22 Nov 2016 07:49:55 +0000 (07:49 +0000)]
[SOUP] Simplify custom protocols handler implementation
https://bugs.webkit.org/show_bug.cgi?id=164922

Reviewed by Michael Catanzaro.

We are using too many classes for this and also the C API that is not needed, because both GTK+ and EFL have
their own APIs and this is not used by WTR at all.

* PlatformEfl.cmake: Remove files from compilation.
* PlatformGTK.cmake: Ditto.
* Shared/API/c/WKBase.h:
* Shared/API/c/soup/WKBaseSoup.h: Removed.
* UIProcess/API/APICustomProtocolManagerClient.h: Added.
(API::CustomProtocolManagerClient::~CustomProtocolManagerClient):
(API::CustomProtocolManagerClient::startLoading):
(API::CustomProtocolManagerClient::stopLoading):
(API::CustomProtocolManagerClient::invalidate):
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/soup/WKAPICastSoup.h: Removed.
* UIProcess/API/C/soup/WKContextSoup.h: Removed.
* UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Removed.
* UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Removed.
* UIProcess/API/C/soup/WKSoupRequestManager.h: Removed.
* UIProcess/API/efl/ewk_context.cpp: Remove unneeded include.
* UIProcess/API/efl/ewk_url_scheme_request.cpp: Use CustomProtocolManagerProxy instead of WKSoupCustomProtocolRequestManagerRef.
(EwkUrlSchemeRequest::EwkUrlSchemeRequest):
(EwkUrlSchemeRequest::finish):
(EwkUrlSchemeRequest::invalidate):
* UIProcess/API/efl/ewk_url_scheme_request_private.h:
(EwkUrlSchemeRequest::create):
(EwkUrlSchemeRequest::manager):
* UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp: Added.
(attachCustomProtocolManagerClientToContext):
* UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Removed.
* UIProcess/API/gtk/WebKitRequestManagerClient.h: Removed.
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Use CustomProtocolManagerProxy instead of WebSoupCustomProtocolRequestManager.
(webkitURISchemeRequestCreate):
(webkitURISchemeRequestCancel):
(webkitURISchemeRequestGetManager):
(webkitURISchemeRequestInvalidate):
(webkitURISchemeRequestReadCallback):
(webkit_uri_scheme_request_finish_error):
* UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
(webkitWebContextDispose):
(webkit_web_context_register_uri_scheme):
(webkitWebContextStartLoadingCustomProtocol):
(webkitWebContextInvalidateCustomProtocolRequests):
* UIProcess/API/gtk/WebKitWebContextPrivate.h:
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(WebKit::CustomProtocolManagerProxy::processDidClose):
* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
(WebKit::CustomProtocolManagerProxy::processDidClose): Invalidate the client.
(WebKit::CustomProtocolManagerProxy::startLoading): Notify the client.
(WebKit::CustomProtocolManagerProxy::stopLoading): Ditto.
(WebKit::CustomProtocolManagerProxy::didReceiveResponse): Notify the network process.
(WebKit::CustomProtocolManagerProxy::didLoadData): Ditto.
(WebKit::CustomProtocolManagerProxy::didFailWithError): Ditto.
(WebKit::CustomProtocolManagerProxy::didFinishLoading): Ditto.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Removed.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Removed.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Removed.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Removed.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose): Notify the CustomProtocolManagerProxy.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool): Initialize the CustomProtocolManagerClient and remove the all supplement.
(WebKit::WebProcessPool::setCustomProtocolManagerClient):
(WebKit::WebProcessPool::registerSchemeForCustomProtocol): In case of soup cache the given protocol.
(WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): In case of soup delete the given protocol from the cache.
* UIProcess/WebProcessPool.h:
* UIProcess/efl/RequestManagerClientEfl.cpp: Do not use the C API, but API::CustomProtocolManagerClient.
(WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
(WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
* UIProcess/efl/RequestManagerClientEfl.h:
* UIProcess/efl/WebProcessPoolEfl.cpp:
* UIProcess/gtk/WebProcessPoolGtk.cpp:
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess): Use m_urlSchemesRegisteredForCustomProtocols to
build the list of custom protocols to send to the network process.

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

2 years agoHasher::addCharacters() should be able to handle zero length strings.
mark.lam@apple.com [Tue, 22 Nov 2016 06:30:33 +0000 (06:30 +0000)]
Hasher::addCharacters() should be able to handle zero length strings.
https://bugs.webkit.org/show_bug.cgi?id=165024

Reviewed by Yusuke Suzuki.

Source/WTF:

Currently, it will fail to handle zero length strings if it has a pending
character.  The fix is simply to return early if length is 0.

* wtf/Hasher.h:
(WTF::StringHasher::addCharacters):

Tools:

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

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

2 years agoRemoved an extra space character at the end of line.
mark.lam@apple.com [Tue, 22 Nov 2016 03:35:25 +0000 (03:35 +0000)]
Removed an extra space character at the end of line.

Not reviewed.

* runtime/JSCell.cpp:
(JSC::JSCell::toNumber):

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

2 years agoFix exception scope verification failures in FunctionConstructor.cpp.
mark.lam@apple.com [Tue, 22 Nov 2016 02:05:27 +0000 (02:05 +0000)]
Fix exception scope verification failures in FunctionConstructor.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165011

Reviewed by Saam Barati.

* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
(JSC::constructFunctionSkippingEvalEnabledCheck):

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

2 years agoFix exception scope verification failures in GetterSetter.cpp.
mark.lam@apple.com [Tue, 22 Nov 2016 02:04:52 +0000 (02:04 +0000)]
Fix exception scope verification failures in GetterSetter.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165013

Reviewed by Saam Barati.

* runtime/GetterSetter.cpp:
(JSC::callGetter):
(JSC::callSetter):

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

2 years agoDisable #line markers in bison output on Windows
annulen@yandex.ru [Tue, 22 Nov 2016 01:57:30 +0000 (01:57 +0000)]
Disable #line markers in bison output on Windows
https://bugs.webkit.org/show_bug.cgi?id=164973

Reviewed by Darin Adler.

New bison versions since 3.0 have bug that causes unescaped paths
to be printed in #line directives. On Windows CMake passes absolute
paths to bison that have backslashes in them, leading to compiler
errors or warnings because of unrecognized escape sequences.

No new tests needed.

* css/makegrammar.pl:

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

2 years agoCrash in com.apple.JavaScriptCore: WTF::ThreadSpecific<WTF::WTFThreadData, + 142
utatane.tea@gmail.com [Mon, 21 Nov 2016 23:54:43 +0000 (23:54 +0000)]
Crash in com.apple.JavaScriptCore: WTF::ThreadSpecific<WTF::WTFThreadData, + 142
https://bugs.webkit.org/show_bug.cgi?id=164898

Reviewed by Darin Adler.

JSTests:

* stress/tagged-template-registry-key-collect.js: Added.
(shouldBe):
(tag):
(i.eval):
* stress/tagged-template-registry-key.js: Added.
(shouldBe):
(tag):
(a):
(b):

Source/JavaScriptCore:

The callsite object (JSArray) of tagged template literal is managed by WeakGCMap since
same tagged template literal need to return an identical object.
The problem is that we used TemplateRegistryKey as the key of the WeakGCMap. WeakGCMap
can prune its entries in the collector thread. At that time, this TemplateRegistryKey
is deallocated. Since it includes String (and then, StringImpl), we accidentally call
ref(), deref() and StringImpl::destroy() in the different thread from the main thread
while this TemplateRegistryKey is allocated in the main thread.

Instead, we use TemplateRegistryKey* as the key of WeakGCMap. Then, to keep its liveness
while the entry of the WeakGCMap is alive, the callsite object has the reference to
the JSTemplateRegistryKey. And it holds Ref<TemplateRegistryKey>.

And now we need to lookup WeakGCMap with TemplateRegistryKey*. To do so, we create
interning system for TemplateRegistryKey. It is similar to AtomicStringTable and
SymbolRegistry. TemplateRegistryKey is allocated from this table. This table atomize the
TemplateRegistryKey. So we can use the pointer comparison between TemplateRegistryKey.
It allows us to lookup the entry from WeakGCMap by TemplateRegistryKey*.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/BuiltinNames.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::addTemplateRegistryKeyConstant):
(JSC::BytecodeGenerator::emitGetTemplateObject):
* bytecompiler/BytecodeGenerator.h:
* runtime/JSGlobalObject.cpp:
(JSC::getTemplateObject):
* runtime/JSTemplateRegistryKey.cpp:
(JSC::JSTemplateRegistryKey::JSTemplateRegistryKey):
(JSC::JSTemplateRegistryKey::create):
* runtime/JSTemplateRegistryKey.h:
* runtime/TemplateRegistry.cpp:
(JSC::TemplateRegistry::getTemplateObject):
* runtime/TemplateRegistry.h:
* runtime/TemplateRegistryKey.cpp: Copied from Source/JavaScriptCore/runtime/TemplateRegistry.h.
(JSC::TemplateRegistryKey::~TemplateRegistryKey):
* runtime/TemplateRegistryKey.h:
(JSC::TemplateRegistryKey::calculateHash):
(JSC::TemplateRegistryKey::create):
(JSC::TemplateRegistryKey::TemplateRegistryKey):
* runtime/TemplateRegistryKeyTable.cpp: Added.
(JSC::TemplateRegistryKeyTranslator::hash):
(JSC::TemplateRegistryKeyTranslator::equal):
(JSC::TemplateRegistryKeyTranslator::translate):
(JSC::TemplateRegistryKeyTable::~TemplateRegistryKeyTable):
(JSC::TemplateRegistryKeyTable::createKey):
(JSC::TemplateRegistryKeyTable::unregister):
* runtime/TemplateRegistryKeyTable.h: Copied from Source/JavaScriptCore/runtime/JSTemplateRegistryKey.h.
(JSC::TemplateRegistryKeyTable::KeyHash::hash):
(JSC::TemplateRegistryKeyTable::KeyHash::equal):
* runtime/VM.h:
(JSC::VM::templateRegistryKeyTable):

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

2 years agoFix exception scope verification failures in runtime/Error* files.
mark.lam@apple.com [Mon, 21 Nov 2016 23:24:18 +0000 (23:24 +0000)]
Fix exception scope verification failures in runtime/Error* files.
https://bugs.webkit.org/show_bug.cgi?id=164998

Reviewed by Darin Adler.

* runtime/ErrorConstructor.cpp:
(JSC::Interpreter::constructWithErrorConstructor):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::create):
* runtime/ErrorInstance.h:
* runtime/ErrorPrototype.cpp:
(JSC::errorProtoFuncToString):

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

2 years ago[CMake] build fails after update to cmake 3.7
clopez@igalia.com [Mon, 21 Nov 2016 20:32:42 +0000 (20:32 +0000)]
[CMake] build fails after update to cmake 3.7
https://bugs.webkit.org/show_bug.cgi?id=165008

Reviewed by Dan Bernstein.

When we remove the CMake cache, we should remove both the
CMakeCache.txt file and the CMakeFiles directory.
See: https://gitlab.kitware.com/cmake/cmake/issues/14820

* Scripts/webkitdirs.pm:
(cmakeFilesPath):
(removeCMakeCache):

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

2 years agoFix exception scope verification failures in *Executable.cpp files.
mark.lam@apple.com [Mon, 21 Nov 2016 17:19:30 +0000 (17:19 +0000)]
Fix exception scope verification failures in *Executable.cpp files.
https://bugs.webkit.org/show_bug.cgi?id=164996

Reviewed by Darin Adler.

* runtime/DirectEvalExecutable.cpp:
(JSC::DirectEvalExecutable::create):
* runtime/IndirectEvalExecutable.cpp:
(JSC::IndirectEvalExecutable::create):
* runtime/ProgramExecutable.cpp:
(JSC::ProgramExecutable::initializeGlobalProperties):
* runtime/ScriptExecutable.cpp:
(JSC::ScriptExecutable::prepareForExecutionImpl):

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

2 years agoFix Sierra CMake build after r208452
achristensen@apple.com [Mon, 21 Nov 2016 16:58:00 +0000 (16:58 +0000)]
Fix Sierra CMake build after r208452
https://bugs.webkit.org/show_bug.cgi?id=164437

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView updateMediaTouchBar]):
I haven't enabled VIDEO_PRESENTATION_MODE in the CMake build yet.
It's needed for playbackSessionInterface to exist.

Source/WebKit2:

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateMediaTouchBar):
I haven't enabled VIDEO_PRESENTATION_MODE in the CMake build yet.
It's needed for WebPlaybackSessionInterfaceMac to exist.

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

2 years ago[cmake][OpenWebRTC] Move SDPProcessorScriptResource rules to common WebCore
commit-queue@webkit.org [Mon, 21 Nov 2016 16:25:49 +0000 (16:25 +0000)]
[cmake][OpenWebRTC] Move SDPProcessorScriptResource rules to common WebCore
https://bugs.webkit.org/show_bug.cgi?id=164937

Patch by Olivier Blin <olivier.blin@softathome.com> on 2016-11-21
Reviewed by Youenn Fablet.

SDPProcessorScriptResource has been moved in common mediastream directory (bug 163940).

Since it is not specific to the GTK port, the matching cmake rules should be
moved out from PlatformGTK.cmake to the main WebCore CMakeLists.txt.

This is needed to build OpenWebRTC support in other ports, WPE in my case,
probably Mac, EFL and Qt as well.

This also fixes the path in SDP scripts dependencies, the old openwebrtc subdir
was still being used.

No new tests, build fix only

* CMakeLists.txt:
* PlatformGTK.cmake:

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

2 years agoUnreviewed. Update OptionsGTK.cmake and NEWS for 2.15.2 release.
carlosgc@webkit.org [Mon, 21 Nov 2016 11:18:10 +0000 (11:18 +0000)]
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.2 release.

.:

* Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

* gtk/NEWS: Add release notes for 2.15.2.

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

2 years agoAdd URL::hostAndPort()
carlosgc@webkit.org [Mon, 21 Nov 2016 10:04:01 +0000 (10:04 +0000)]
Add URL::hostAndPort()
https://bugs.webkit.org/show_bug.cgi?id=164907

Reviewed by Alex Christensen.

As a convenient way of getting the host and port (if any) as a string.

* html/URLUtils.h:
(WebCore::URLUtils<T>::host): Use URL::hostAndPort().
* page/Location.cpp:
(WebCore::Location::host): Ditto.
* platform/URL.cpp:
(WebCore::URL::hostAndPort): Return host:port or just host if there isn't a port.
* platform/URL.h:
* platform/network/CredentialStorage.cpp:
(WebCore::originStringFromURL): Use URL::hostAndPort().
* workers/WorkerLocation.cpp:
(WebCore::WorkerLocation::host): Ditto.

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

2 years ago[WebRTC][OpenWebRTC] parse turns urls
philn@webkit.org [Mon, 21 Nov 2016 09:41:29 +0000 (09:41 +0000)]
[WebRTC][OpenWebRTC] parse turns urls
https://bugs.webkit.org/show_bug.cgi?id=164587

Reviewed by Alejandro G. Castro.

* platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
(WebCore::MediaEndpointOwr::ensureTransportAgentAndTransceivers):
Hook turns servers between the RTCConfiguration and the underlying
OpenWebRTC layer.

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

2 years ago[Gstreamer] Add volume and mute support to the WebRTC mediaplayer
philn@webkit.org [Mon, 21 Nov 2016 09:39:26 +0000 (09:39 +0000)]
[Gstreamer] Add volume and mute support to the WebRTC mediaplayer
https://bugs.webkit.org/show_bug.cgi?id=153828

Reviewed by Darin Adler.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
(WebCore::MediaPlayerPrivateGStreamerOwr::setVolume): New implementation setting the OWR source volume property.
(WebCore::MediaPlayerPrivateGStreamerOwr::setMuted): New implementation setting the OWR source mute property.
(WebCore::MediaPlayerPrivateGStreamerOwr::maybeHandleChangeMutedState): Also set audio OWR source mute state depending on the track enabled state.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged): chain to maybeHandleChangeMuteState.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:

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