| 2016-10-19 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Annotate more DOM and HTML IDLs with CEReactions |
| https://bugs.webkit.org/show_bug.cgi?id=163653 |
| |
| Reviewed by Darin Adler. |
| |
| Added CEReactions to more IDL files. |
| |
| Test: fast/custom-elements/reactions-for-webkit-extensions.html |
| |
| * bindings/js/JSDOMStringMapCustom.cpp: |
| (WebCore::JSDOMStringMap::deleteProperty): Instantiate CustomElementReactionStack, which is equivalent to |
| adding CEReactions in IDL. |
| (WebCore::JSDOMStringMap::putDelegate): Ditto. |
| * dom/Document.idl: |
| * dom/Element.idl: |
| * html/HTMLElement.idl: |
| * page/DOMSelection.idl: |
| |
| 2016-10-19 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r207557. |
| |
| This change caused animations/font-variations tests to time |
| out on pre-Sierra Macs. |
| |
| Reverted changeset: |
| |
| "[macOS] [iOS] Disable variation fonts on macOS El Capitan and |
| iOS 9" |
| https://bugs.webkit.org/show_bug.cgi?id=163374 |
| http://trac.webkit.org/changeset/207557 |
| |
| 2016-10-19 Dave Hyatt <hyatt@apple.com> |
| |
| [CSS Parser] Support -webkit-border-fit |
| https://bugs.webkit.org/show_bug.cgi?id=163687 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Add support for -webkit-border-fit to isValidKeywordPropertyAndValue. |
| |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): |
| |
| 2016-10-19 Dave Hyatt <hyatt@apple.com> |
| |
| [CSS Parser] class and id parsing need to be case-insensitive in HTML quirks mode |
| https://bugs.webkit.org/show_bug.cgi?id=163685 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Class and ID parsing should be case-insensitive in quirks mode. Apply the same hack |
| that the old parser did and lowercase the class and ids in place. |
| |
| * css/parser/CSSSelectorParser.cpp: |
| (WebCore::CSSSelectorParser::consumeId): |
| (WebCore::CSSSelectorParser::consumeClass): |
| |
| 2016-10-19 Nan Wang <n_wang@apple.com> |
| |
| AX: crash: com.apple.WebCore: WebCore::AccessibilityObject::findMatchingObjects + 600 |
| https://bugs.webkit.org/show_bug.cgi?id=163682 |
| |
| Reviewed by Chris Fleizach. |
| |
| There's a null pointer crash when we ask for startObject->parentObjectUnignored() in |
| AccessibilityObject::findMatchingObject. Added a null check for the startObject to fix that. |
| |
| Test: accessibility/mac/search-predicate-crash.html |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::findMatchingObjects): |
| |
| 2016-10-19 David Kilzer <ddkilzer@apple.com> |
| |
| Bug 163670: Refine assertions in WebCore::ImageData constructors |
| <https://webkit.org/b/163670> |
| <rdar://problem/27497338> |
| |
| Reviewed by Brent Fulgham. |
| |
| No new tests because there is no change in nominal behavior. |
| |
| * html/ImageData.cpp: |
| (WebCore::ImageData::ImageData(const IntSize&)): Change to use |
| ASSERT() since the worst-case scenario here is a nullptr deref. |
| Switch to IntSize::area() to compute the area. |
| (WebCore::ImageData::ImageData(const IntSize&, Ref<Uint8ClampedArray>&&)): |
| Add ASSERT() identical to the previous constructor, and change |
| ASSERT_WITH_SECURITY_IMPLICATION() to only fire when m_data is |
| not nullptr and the length check fails. Switch to |
| IntSize::area() to compute the area. |
| |
| 2016-10-19 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9 |
| https://bugs.webkit.org/show_bug.cgi?id=163374 |
| |
| Reviewed by Darin Adler. |
| |
| Because of platform lack of support for variations in in-memory fonts, |
| this feature should be disabled on the affected OSes. |
| |
| No tests because there is no behavior change (on the relevant platforms). |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2016-10-19 Dave Hyatt <hyatt@apple.com> |
| |
| [CSS Parser] Fix background-position parsing |
| https://bugs.webkit.org/show_bug.cgi?id=163681 |
| |
| Reviewed by Dean Jackson. |
| |
| The new parser has a more efficient parsed representation of background positions. When |
| background-position is "center" or when no length unit is specified for a dimension, |
| then rather than creating a pair, the new parser makes a singleton primitive value. |
| |
| Patch the StyleBuilder code to handle this case, resolving center to (left,50%) or |
| (top,50%) as appropriate and also handling top/left without any associated length. |
| |
| * css/CSSToStyleMap.cpp: |
| (WebCore::CSSToStyleMap::mapFillXPosition): |
| (WebCore::CSSToStyleMap::mapFillYPosition): |
| |
| 2016-10-19 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Media Controller: click-to-start support |
| https://bugs.webkit.org/show_bug.cgi?id=163659 |
| <rdar://problem/28845656> |
| |
| Reviewed by Dean Jackson. |
| |
| We introduce the MediaControllerSupport class which will allow a number of media controller |
| features to be implemented by subclasses each devoted to implementing a specific subset of |
| media controller features. With this bug, we add the correct behavior for click-to-start, |
| only showing the start button under the right circumstances. |
| |
| A MediaController object indicates which media control to attach click event listeners to |
| through the `control` property, and a list of media events it should register on the media |
| element through the `mediaEvents` property. Then, as the user interacts with the specified |
| control and the media, the Button delegation method `buttonWasClicked()` and the `syncControl()` |
| methods are called to allow for the media state to be correctly set and represented in the |
| media controls. Custom event handling for the specified events can also be achieved by |
| subclassing the `handleEvent()` method. |
| |
| Tests: media/modern-media-controls/start-support/start-support-audio.html |
| media/modern-media-controls/start-support/start-support-autoplay.html |
| media/modern-media-controls/start-support/start-support-click-to-start.html |
| media/modern-media-controls/start-support/start-support-error.html |
| media/modern-media-controls/start-support/start-support-fullscreen.html |
| media/modern-media-controls/start-support/start-support-manual-play.html |
| media/modern-media-controls/start-support/start-support-no-source.html |
| |
| * Modules/modern-media-controls/media/media-controller-support.js: Added. |
| (MediaControllerSupport): |
| (MediaControllerSupport.prototype.get control): |
| (MediaControllerSupport.prototype.get mediaEvents): |
| (MediaControllerSupport.prototype.buttonWasClicked): |
| (MediaControllerSupport.prototype.handleEvent): |
| (MediaControllerSupport.prototype.syncControl): |
| * Modules/modern-media-controls/media/media-controller.js: |
| (MediaController): |
| (MediaController.prototype.buttonWasClicked): Deleted. |
| * Modules/modern-media-controls/media/start-support.js: Added. |
| (StartSupport.prototype.get control): |
| (StartSupport.prototype.get mediaEvents): |
| (StartSupport.prototype.buttonWasClicked): |
| (StartSupport.prototype.handleEvent): |
| (StartSupport.prototype.syncControl): |
| (StartSupport.prototype._shouldShowStartButton): |
| (StartSupport): |
| |
| 2016-10-19 Aaron Chu <aaron_chu@apple.com> |
| |
| Web Inspector: AXI: expose computed tree node and heading level |
| https://bugs.webkit.org/show_bug.cgi?id=130825 |
| <rdar://problem/16442349> |
| |
| Reviewed by Joseph Pecoraro. |
| |
| Exposing two new accessibility properties: Heading Level and Hierarchical Level. |
| |
| Updated Test: LayoutTest/inspector/dom/getAccessibilityPropertiesForNode.html |
| |
| * inspector/InspectorDOMAgent.cpp: |
| (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): |
| |
| 2016-10-19 Adam Bergkvist <adam.bergkvist@ericsson.com> |
| |
| WebRTC: Implement MediaEndpointPeerConnection::stop() |
| https://bugs.webkit.org/show_bug.cgi?id=163660 |
| |
| Reviewed by Philippe Normand. |
| |
| Make MediaEndpointPeerConnection::stop() stop its MediaEndpoint. |
| |
| Testing: This fix deals with cleanup and tearing down resources down in the platform layer |
| and is not covered by automated tests. It is however observable in the manual test added |
| in [1] where the remote videos should stop when the connections are closed. |
| |
| [1] http://webkit.org/b/163327 |
| |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| (WebCore::MediaEndpointPeerConnection::stop): |
| |
| 2016-10-19 Dave Hyatt <hyatt@apple.com> |
| |
| [CSS Parser] Fix -webkit-mask-box-image parsing |
| https://bugs.webkit.org/show_bug.cgi?id=163676 |
| |
| Reviewed by Dean Jackson. |
| |
| -webkit-mask-box-image is not a shorthand in our current code, so treat it the same as the legacy |
| -webkit-border-image. |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| (WebCore::CSSPropertyParser::parseShorthand): |
| |
| 2016-10-19 Carlos Alberto Lopez Perez <clopez@igalia.com> |
| |
| [GTK][EFL] Build fix after r207543. |
| https://bugs.webkit.org/show_bug.cgi?id=163671 |
| |
| Unreviewed. |
| |
| Fix typo on the filename of the included header: |
| Mac filesystem is case insensitive, but Linux filesystems are case sensitive. |
| |
| * css/parser/CSSPropertyParser.cpp: |
| |
| 2016-10-19 Zalan Bujtas <zalan@apple.com> |
| |
| Use anonymous table row for new child at RenderTableRow::addChild() if available. |
| https://bugs.webkit.org/show_bug.cgi?id=163651 |
| <rdar://problem/28705022> |
| |
| Reviewed by David Hyatt. |
| |
| We should try to prevent the continuation siblings from getting separated and inserted into |
| wrapper renderers. It makes finding these continuation siblings difficult. |
| This patch adds a checks for anonymous table rows so that we could find a closer common ancestor of |
| beforeChild/new child. |
| |
| Test: fast/table/crash-when-table-has-continuation-and-content-inserted.html |
| |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::showRenderObject): Add continuation information. |
| * rendering/RenderTableRow.cpp: |
| (WebCore::RenderTableRow::addChild): |
| |
| 2016-10-19 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Cleanup WebCore/workers |
| https://bugs.webkit.org/show_bug.cgi?id=163635 |
| |
| Reviewed by Chris Dumez. |
| |
| * workers/*: |
| Cleanup like pragma once, nullptr, remove stale includes, declarations. |
| |
| 2016-10-19 Chris Dumez <cdumez@apple.com> |
| |
| MouseEvent's coordinates should be 0 for simulated clicks |
| https://bugs.webkit.org/show_bug.cgi?id=163648 |
| |
| Reviewed by Darin Adler. |
| |
| MouseEvent's coordinates should be 0 / 0 for simulated clicks triggered |
| by JavaScript (i.e. via element.click()). This behavior matches Chrome |
| and Firefox. |
| |
| WebKit was computing actual coordinates for the element which was |
| expensive, especially because computing screenX / screenY required |
| a synchronous IPC with the UI process. |
| |
| Test: fast/events/element-click-no-coords.html |
| |
| * dom/Element.cpp: |
| (WebCore::Element::dispatchSimulatedClick): |
| * dom/SimulatedClick.cpp: |
| (WebCore::simulateMouseEvent): |
| (WebCore::simulateClick): |
| * dom/SimulatedClick.h: |
| * html/HTMLElement.cpp: |
| (WebCore::HTMLElement::click): |
| |
| 2016-10-19 Dave Hyatt <hyatt@apple.com> |
| |
| [CSS Parser] Fix transform parsing |
| https://bugs.webkit.org/show_bug.cgi?id=163671 |
| |
| Reviewed by Dean Jackson. |
| |
| The new parser turned function names into CSSValueIDs and made CSSFunctionValue store them. This |
| meant it could be used to handle transform values, with the function name representing the |
| transform operation efficiently as a CSSValueID. |
| |
| The old parser, however, creates WebKitCSSTransformValues. This value does not exist in the new |
| parser. Rather than forcing the old and new parser over to CSSFunctionValues, I opted to |
| just make the new parser build WebkitCSSTransformValues too. |
| |
| The main reason I did this is that WebkitCSSTransformValue is actually exposed to the Web via |
| IDL. To be safe, I am not eliminating it (even though Blink has). |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeTranslate3d): |
| (WebCore::consumeNumbers): |
| (WebCore::consumePerspective): |
| (WebCore::transformOperationForCSSValueID): |
| (WebCore::consumeTransformValue): |
| |
| 2016-10-19 Darin Adler <darin@apple.com> |
| |
| Move XPath from ExceptionCode to Exception |
| https://bugs.webkit.org/show_bug.cgi?id=163656 |
| |
| Reviewed by Chris Dumez. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::createExpression): Use ExceptionOr. |
| (WebCore::Document::createNSResolver): Return Ref. |
| (WebCore::Document::evaluate): Use ExceptionOr. |
| * dom/Document.h: Updated for above changes. |
| * dom/Document.idl: Use non-legacy exceptions for the functions above. |
| |
| * inspector/InspectorNodeFinder.cpp: |
| (WebCore::InspectorNodeFinder::searchUsingXPath): Call XPath functions |
| with new interface. |
| |
| * xml/DOMParser.cpp: |
| (WebCore::DOMParser::DOMParser): Marked inline. |
| (WebCore::DOMParser::create): Moved here from header. |
| (WebCore::DOMParser::parseFromString): Use ExceptionOr. |
| * xml/DOMParser.h: Updated for above changes. |
| * xml/DOMParser.idl: Use non-legacy exception. |
| |
| * xml/XPathEvaluator.cpp: |
| (WebCore::XPathEvaluator::createExpression): Use ExceptionOr. |
| (WebCore::XPathEvaluator::evaluate): Ditto. |
| * xml/XPathEvaluator.h: Updated for above changes. |
| * xml/XPathEvaluator.idl: Use non-legacy exceptions. |
| |
| * xml/XPathExpression.cpp: |
| (WebCore::XPathExpression::createExpression): Use ExceptionOr. |
| (WebCore::XPathExpression::evaluate): Ditto. |
| * xml/XPathExpression.h: Updated for above changes. |
| * xml/XPathExpression.idl: Use non-legacy exceptions. |
| |
| * xml/XPathGrammar.y: Added include of XPathStep.h. |
| |
| * xml/XPathParser.cpp: |
| (WebCore::XPath::Parser::Parser): Initialize three scalar data members |
| in the class definition rather than here. |
| (WebCore::XPath::Parser::parseStatement): Use ExceptionOr. |
| * xml/XPathParser.h: Updated for above changes. |
| |
| * xml/XPathResult.cpp: |
| (WebCore::XPathResult::XPathResult): Use a reference rather than a |
| pointer for the document. Alao initialize two scalar data members |
| in the class definition rather than here. |
| (WebCore::XPathResult::convertTo): Use ExceptionOr. |
| (WebCore::XPathResult::numberValue): Ditto. |
| (WebCore::XPathResult::stringValue): Ditto. |
| (WebCore::XPathResult::booleanValue): Ditto. |
| (WebCore::XPathResult::singleNodeValue): Ditto. |
| (WebCore::XPathResult::snapshotLength): Ditto. |
| (WebCore::XPathResult::iterateNext): Ditto. |
| (WebCore::XPathResult::snapshotItem): Ditto. |
| * xml/XPathResult.h: Updated for the changes above. |
| * xml/XPathResult.idl: Use non-legacy exceptions. |
| |
| 2016-10-19 Nan Wang <n_wang@apple.com> |
| |
| AX: [Mac] Meter element should use AXValueDescription to descrbe the status of the value |
| https://bugs.webkit.org/show_bug.cgi?id=163610 |
| |
| Reviewed by Chris Fleizach. |
| |
| Exposed the goodness of the meter value in AXValueDescription. |
| |
| Test: accessibility/mac/meter-gauge-value-description.html |
| |
| * English.lproj/Localizable.strings: |
| * accessibility/AccessibilityProgressIndicator.cpp: |
| (WebCore::AccessibilityProgressIndicator::gaugeRegionValueDescription): |
| * accessibility/AccessibilityProgressIndicator.h: |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper valueDescriptionForMeter]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| * platform/LocalizedStrings.cpp: |
| (WebCore::AXMeterGaugeRegionOptimumText): |
| (WebCore::AXMeterGaugeRegionSuboptimalText): |
| (WebCore::AXMeterGaugeRegionLessGoodText): |
| * platform/LocalizedStrings.h: |
| |
| 2016-10-19 Dave Hyatt <hyatt@apple.com> |
| |
| [CSS Parser] Fix named color parsing |
| https://bugs.webkit.org/show_bug.cgi?id=163662 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Named color parsing in the old parser for extended colors relied on constructing a Color with the |
| name and doing a lookup that way. |
| |
| The new parser allows the back end to hold a primitive identifier value for extended colors. |
| |
| StyleColor contains a helper function for looking up the correct color. |
| |
| This patch switches both the old and the new parsers over to the new StyleColor function. |
| |
| Also remove some asserts from the CSSSelectorList, since the new parser allows it to be empty and |
| detects parsing failure that way. |
| |
| * css/CSSSelectorList.cpp: |
| (WebCore::CSSSelectorList::CSSSelectorList): |
| (WebCore::CSSSelectorList::operator=): |
| * css/StyleColor.cpp: |
| (WebCore::StyleColor::isColorKeyword): |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::colorFromPrimitiveValue): |
| (WebCore::colorForCSSValue): Deleted. |
| |
| 2016-10-19 Youenn Fablet <youenn@apple.com> |
| |
| Remove SecurityOrigin::taintsCanvas |
| https://bugs.webkit.org/show_bug.cgi?id=163594 |
| |
| Reviewed by Darin Adler. |
| |
| No change of behavior. |
| |
| * html/canvas/CanvasRenderingContext.cpp: |
| (WebCore::CanvasRenderingContext::wouldTaintOrigin): |
| * page/SecurityOrigin.cpp: |
| (WebCore::SecurityOrigin::canReceiveDragData): |
| (WebCore::SecurityOrigin::taintsCanvas): Deleted. |
| * page/SecurityOrigin.h: |
| |
| 2016-10-18 Dave Hyatt <hyatt@apple.com> |
| |
| [CSS Parser] Fix compound selector parsing. |
| https://bugs.webkit.org/show_bug.cgi?id=163649 |
| |
| Reviewed by Darin Adler. |
| |
| The new CSS parser is failing to handle compound selectors. The code has an assumption that the |
| first value in the RelationType enum is SubSelector. This patch changes the enum to have the same |
| name used in Blink, RelationType, and to make the ordering be exactly the same. |
| |
| * css/CSSSelector.h: |
| (WebCore::CSSSelector::relation): |
| (WebCore::CSSSelector::setRelation): |
| * css/SelectorChecker.cpp: |
| (WebCore::SelectorChecker::matchRecursively): |
| (WebCore::canMatchHoverOrActiveInQuirksMode): |
| (WebCore::SelectorChecker::determineLinkMatchType): |
| * css/SelectorFilter.cpp: |
| (WebCore::SelectorFilter::collectIdentifierHashes): |
| * css/parser/CSSParserValues.cpp: |
| (WebCore::CSSParserSelector::insertTagHistory): |
| (WebCore::CSSParserSelector::appendTagHistory): |
| * css/parser/CSSParserValues.h: |
| (WebCore::CSSParserSelector::setRelation): |
| * css/parser/CSSSelectorParser.cpp: |
| (WebCore::CSSSelectorParser::consumeComplexSelector): |
| (WebCore::CSSSelectorParser::consumeCombinator): |
| * css/parser/CSSSelectorParser.h: |
| * cssjit/SelectorCompiler.cpp: |
| (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation): |
| (WebCore::SelectorCompiler::constructFragmentsInternal): |
| |
| 2016-10-19 Javier Fernandez <jfernandez@igalia.com> |
| |
| Web Inspector: Debugger buttons positioned incorrectly, align-content default value is unexpected |
| https://bugs.webkit.org/show_bug.cgi?id=163572 |
| |
| Reviewed by Sergio Villar Senin. |
| |
| We only allow the new CSS Box Alignment syntax when the Grid Layout |
| feature is enabled. Due to flexbox backward compatibility we have |
| implemented a different code path for the style initial/default values |
| assignment. However, we have incorrectly resolved both align-content |
| and justify-content to 'flex-start' when grid layout is disabled. |
| |
| This patch changes the approach, so we set 'normal' (the value specified |
| by the new syntax) for both properties, but using the values defined in |
| the old syntax (Flexbox specification) at computed style resolution. |
| |
| Since 'stretch' is the default value for the align-content property, this |
| issue implies that any flexbox line with an undefined height will be |
| laid out incorrectly, if not explicitly set via CSS, because flex items |
| can't use the available height, even though they use 'stretch' for their |
| 'align-self' properties. |
| |
| Test: css3/flexbox/flexbox-lines-must-be-stretched-by-default.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::initialContentAlignment): |
| |
| 2016-10-19 Carlos Alberto Lopez Perez <clopez@igalia.com> |
| |
| [GTK] REGRESSION(r207396) Build broken with Clang. |
| https://bugs.webkit.org/show_bug.cgi?id=163599 |
| |
| Suggested and reviewed by Darin Adler. |
| |
| * css/CSSPrimitiveValue.cpp: |
| (WebCore::CSSPrimitiveValue::getStringValue): |
| |
| 2016-10-19 Darin Adler <darin@apple.com> |
| |
| Try to fix build. |
| |
| * page/PerformanceUserTiming.cpp: Add back class name; needed by some compiler versions. |
| |
| 2016-10-19 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix the build after r207522. |
| |
| * page/PerformanceUserTiming.cpp: Include PerformanceTiming.h. |
| |
| 2016-10-19 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix the build after r207519. |
| |
| The build error is: |
| IDL ATTRIBUTE CHECKER ERROR: Unknown IDL attribute [PassContext] is found at TestRunner.idl. |
| |
| Because PassContext was removed from IDLAttributes.txt in rr207519, but it's implemented by |
| CodeGeneratorTestRunner.pm and used by TestRunner.idl. |
| |
| * bindings/scripts/IDLAttributes.txt: Bring back PassContext. |
| |
| 2016-10-19 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix the build with GCC 4.9 after r207463. |
| |
| Add constructors to MediaConstraintsData. |
| |
| * Modules/mediastream/MediaConstraintsImpl.h: |
| (WebCore::MediaConstraintsData::MediaConstraintsData): |
| |
| 2016-10-19 Jer Noble <jer.noble@apple.com> |
| |
| [Mac][MSE] Movies with a 'mehd' box have a zero-duration |
| https://bugs.webkit.org/show_bug.cgi?id=163641 |
| |
| Reviewed by Darin Adler. |
| |
| Test: media/media-source/media-source-init-segment-duration.html |
| |
| The canonical (ISO/IEC 14496-12:2012) way to signal the duration of a fragmented media file is to add a |
| 'mehd' box to the 'mvex' container box specifying the duration of the fragment. Support this through the |
| AVAsset -overallDurationHint property. |
| |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset): |
| * platform/spi/mac/AVFoundationSPI.h: |
| |
| 2016-10-18 Darin Adler <darin@apple.com> |
| |
| Move many miscellaneous classes from ExceptionCode to Exception |
| https://bugs.webkit.org/show_bug.cgi?id=163645 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| * bindings/js/JSCryptoCustom.cpp: |
| (WebCore::JSCrypto::getRandomValues): Use propagateException. |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::handlePostMessage): Ditto. |
| (WebCore::JSDOMWindow::setTimeout): Use toJSNumber. |
| (WebCore::JSDOMWindow::setInterval): Ditto. |
| * bindings/js/JSStorageCustom.cpp: |
| (WebCore::JSStorage::nameGetter): Use propagateException. |
| (WebCore::JSStorage::deleteProperty): Ditto. |
| (WebCore::JSStorage::getOwnPropertyNames): Ditto. |
| (WebCore::JSStorage::putDelegate): Ditto. |
| |
| * loader/appcache/DOMApplicationCache.cpp: |
| (WebCore::DOMApplicationCache::update): Use ExceptionOr. |
| (WebCore::DOMApplicationCache::swapCache): Ditto. |
| * loader/appcache/DOMApplicationCache.h: Update for above changes. |
| * loader/appcache/DOMApplicationCache.idl: Use non-legacy exceptions. |
| |
| * page/Crypto.cpp: |
| (WebCore::Crypto::getRandomValues): Use ExceptionOr. |
| (WebCore::Crypto::webkitSubtle): Ditto. |
| * page/Crypto.h: Updated for above changes. |
| * page/Crypto.idl: Use non-legacy exceptions. |
| |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::DOMWindow): Initialize many data members in |
| the class definition instead of here. |
| (WebCore::DOMWindow::page): Use nullptr. |
| (WebCore::DOMWindow::screen): Ditto. |
| (WebCore::DOMWindow::crypto): Ditto. |
| (WebCore::DOMWindow::locationbar): Ditto. |
| (WebCore::DOMWindow::menubar): Ditto. |
| (WebCore::DOMWindow::personalbar): Ditto. |
| (WebCore::DOMWindow::scrollbars): Ditto. |
| (WebCore::DOMWindow::statusbar): Ditto. |
| (WebCore::DOMWindow::toolbar): Ditto. |
| (WebCore::DOMWindow::applicationCache): Ditto. |
| (WebCore::DOMWindow::sessionStorage): Use ExceptionOr. |
| (WebCore::DOMWindow::localStorage): Ditto. |
| (WebCore::DOMWindow::postMessage): Ditto. |
| (WebCore::DOMWindow::frameElement): Use nullptr. |
| (WebCore::DOMWindow::self): Ditto. |
| (WebCore::DOMWindow::opener): Ditto. |
| (WebCore::DOMWindow::parent): Ditto. |
| (WebCore::DOMWindow::top): Ditto. |
| (WebCore::DOMWindow::getComputedStyle): Use Ref. |
| (WebCore::DOMWindow::setTimeout): Use ExceptionOr. |
| (WebCore::DOMWindow::setInterval): Ditto. |
| (WebCore::didAddStorageEventListener): Use a reference instead of a |
| pointer, and ignore return value instead of using IGNORE_EXCEPTION. |
| (WebCore::DOMWindow::addEventListener): Pass reference to function above. |
| (WebCore::DOMWindow::dispatchEvent): Use enum class version of PageStatus. |
| * page/DOMWindow.h: Updated for changes above. Also changed indentatation. |
| * page/DOMWindow.idl: Use non-legacy exceptions. |
| |
| * page/EventSource.cpp: |
| (WebCore::EventSource::create): Use ExceptionOr. |
| * page/EventSource.h: Updated for change above. |
| * page/EventSource.idl: Use non-legacy exception. |
| |
| * page/Location.cpp: |
| (WebCore::Location::setProtocol): Use ExceptionOr. |
| * page/Location.h: Updated for change above. |
| * page/Location.idl: Use non-legacy exception. |
| |
| * page/Performance.cpp: |
| (WebCore::Performance::Performance): Remove unnecessary initialization of |
| smart pointer to null, and moved initialization of m_resourceTimingBufferSize |
| to the header. |
| (WebCore::Performance::navigation): Made non-const and return a reference. |
| (WebCore::Performance::timing): Ditto. |
| (WebCore::Performance::addResourceTiming): Change LoadTiming argument to use |
| a const& instead of passing in a copy. |
| (WebCore::Performance::webkitMark): Use ExceptionOr and make_unique. |
| (WebCore::Performance::webkitClearMarks): Ditto. |
| (WebCore::Performance::webkitMeasure): Ditto. |
| (WebCore::Performance::webkitClearMeasures): Ditto. |
| (WebCore::Performance::reduceTimeResolution): Use std::floor. |
| * page/Performance.h: Updated for above changes. Removed unneeded includes. |
| Made more things private. Removed unneeded reference counting of UserTiming. |
| * page/Performance.idl: Use non-legacy exceptions. |
| |
| * page/PerformanceUserTiming.cpp: |
| (WebCore::restrictedMarkFunction): Removed unneeded class name. |
| (WebCore::UserTiming::UserTiming): Take a reference instead of a pointer. |
| (WebCore::UserTiming::mark): Use ExceptionOr. |
| (WebCore::UserTiming::findExistingMarkStartTime): Ditto. |
| (WebCore::UserTiming::measure): Ditto. |
| (WebCore::getEntrySequenceByName): Simplified code using HashMap::get. |
| * page/PerformanceUserTiming.h: Updated for above changes. Removed reference |
| counting since this is a single-owner object. |
| |
| * page/UserMessageHandler.cpp: |
| (WebCore::UserMessageHandler::postMessage): Use ExceptionOr. |
| * page/UserMessageHandler.h: Updated for above change. |
| * page/UserMessageHandler.idl: Use non-legacy exception. |
| |
| * storage/Storage.cpp: |
| (WebCore::Storage::length): Use ExceptionOr. |
| (WebCore::Storage::key): Ditto. |
| (WebCore::Storage::getItem): Ditto. |
| (WebCore::Storage::setItem): Ditto. |
| (WebCore::Storage::removeItem): Ditto. |
| (WebCore::Storage::clear): Ditto. |
| (WebCore::Storage::contains): Ditto. |
| * storage/Storage.h: Updated for above change. |
| * storage/Storage.idl: Use non-legacy exceptions. |
| |
| * storage/StorageEventDispatcher.cpp: |
| (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames): |
| Updated for ExceptionOr. |
| (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames): Ditto. |
| |
| 2016-10-18 Darin Adler <darin@apple.com> |
| |
| Move internal testing classes from ExceptionCode to Exception |
| https://bugs.webkit.org/show_bug.cgi?id=163553 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| * bindings/js/JSDOMBinding.h: Added toJSArray. Also exported a function that |
| is now needed in the testing library. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (NativeToJSValue): Added code to handle the jsArray case with an exception. |
| |
| * css/parser/CSSPropertyParser.cpp: Fix #if to make code compile when |
| CSS_SCROLL_SNAP is not enabled. |
| |
| * dom/Element.cpp: |
| (WebCore::Element::createShadowRoot): Changed return type to a raw pointer. |
| There is no reason it needs to be a RefPtr. |
| * dom/Element.h: Updated for above change. |
| |
| * svg/SVGPathStringBuilder.h: Exported class and made more public so it can |
| be used in test code. |
| |
| * svg/SVGPathUtilities.cpp: |
| (WebCore::pathIteratorForBuildingString): Deleted. Needed only for test code, |
| so moved into there. |
| (WebCore::buildStringFromPath): Deleted. Ditto. |
| * svg/SVGPathUtilities.h: Removed buildStringFromPath. |
| |
| * testing/InternalSettings.cpp: Simplified the guard macro and used the all |
| capitals style that our style guide prescribes for non-function-like macros. |
| (WebCore::InternalSettings::create): Moved here, no longer inline Use m_page. |
| (WebCore::InternalSettings::resetToConsistentState): Updated since settings |
| returns a reference. |
| (WebCore::InternalSettings::settings): Changed to return a reference and |
| assert that m_page is not null; functions all check m_page for null first. |
| (WebCore::InternalSettings::setTouchEventEmulationEnabled): Updated to use |
| ExceptionOr, do an m_page check, and use settings that returns a reference. |
| (WebCore::InternalSettings::setStandardFontFamily): Ditto. |
| (WebCore::InternalSettings::setSerifFontFamily): Ditto. |
| (WebCore::InternalSettings::setSansSerifFontFamily): Ditto. |
| (WebCore::InternalSettings::setFixedFontFamily): Ditto. |
| (WebCore::InternalSettings::setCursiveFontFamily): Ditto. |
| (WebCore::InternalSettings::setFantasyFontFamily): Ditto. |
| (WebCore::InternalSettings::setPictographFontFamily): Ditto. |
| (WebCore::InternalSettings::setTextAutosizingEnabled): Ditto. |
| (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): Ditto. |
| (WebCore::InternalSettings::setMediaTypeOverride): Ditto. |
| (WebCore::InternalSettings::setCanStartMedia): Ditto. |
| (WebCore::InternalSettings::setAllowsAirPlayForMediaPlayback): Ditto. |
| (WebCore::InternalSettings::setEditingBehavior): Ditto. |
| (WebCore::InternalSettings::setShouldDisplayTrackKind): Ditto. |
| (WebCore::InternalSettings::shouldDisplayTrackKind): Ditto. |
| (WebCore::InternalSettings::setStorageBlockingPolicy): Ditto. |
| (WebCore::InternalSettings::setPreferMIMETypeForImages): Ditto. |
| (WebCore::InternalSettings::setImagesEnabled): Ditto. |
| (WebCore::InternalSettings::setPDFImageCachingPolicy): Ditto. |
| (WebCore::InternalSettings::setMinimumTimerInterval): Ditto. |
| (WebCore::InternalSettings::setDefaultVideoPosterURL): Ditto. |
| (WebCore::InternalSettings::setForcePendingWebGLPolicy): Ditto. |
| (WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls): Ditto. |
| (WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior): Ditto. |
| (WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled): Ditto. |
| (WebCore::InternalSettings::setFontFallbackPrefersPictographs): Ditto. |
| (WebCore::InternalSettings::setWebFontsAlwaysFallBack): Ditto. |
| (WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Ditto. |
| (WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Ditto. |
| (WebCore::InternalSettings::setBackgroundShouldExtendBeyondPage): Ditto. |
| (WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy): Ditto. |
| (WebCore::InternalSettings::setScrollingTreeIncludesFrames): Ditto. |
| (WebCore::InternalSettings::setAllowsInlineMediaPlayback): Ditto. |
| (WebCore::InternalSettings::setAllowsInlineMediaPlaybackAfterFullscreen): Ditto. |
| (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute): Ditto. |
| (WebCore::InternalSettings::setIndexedDBWorkersEnabled): Ditto. |
| (WebCore::InternalSettings::userInterfaceDirectionPolicy): Ditto. |
| (WebCore::InternalSettings::setUserInterfaceDirectionPolicy): Ditto. |
| (WebCore::InternalSettings::systemLayoutDirection): Ditto. |
| (WebCore::InternalSettings::setSystemLayoutDirection): Ditto. |
| (WebCore::InternalSettings::variationFontsEnabled): Ditto. |
| (WebCore::InternalSettings::setVariationFontsEnabled): Ditto. |
| (WebCore::InternalSettings::forcedPrefersReducedMotionValue): Ditto. |
| (WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Ditto. |
| * testing/InternalSettings.h: Updated for above changes. Also moved Backup to make |
| it private instead of public. |
| * testing/InternalSettings.idl: Use non-legacy execption. Also removed unneeded |
| exception for setIndexedDBWorkersEnabled. |
| |
| * testing/Internals.cpp: Marked InspectorStubFrontend final and made everything private. |
| (WebCore::Internals::setCanShowModalDialogOverride): Use ExceptionOr. |
| (WebCore::Internals::lastSpatialNavigationCandidateCount): Ditto. |
| (WebCore::Internals::animationsAreSuspended): Ditto. |
| (WebCore::Internals::suspendAnimations): Ditto. |
| (WebCore::Internals::resumeAnimations): Ditto. |
| (WebCore::Internals::pauseAnimationAtTimeOnElement): Ditto. |
| (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto. |
| (WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto. |
| (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto. |
| (WebCore::Internals::elementRenderTreeAsText): Ditto. |
| (WebCore::Internals::ensureShadowRoot): Ditto. |
| (WebCore::Internals::createShadowRoot): Ditto. |
| (WebCore::Internals::shadowRootType): Ditto. |
| (WebCore::Internals::isTimerThrottled): Ditto. |
| (WebCore::Internals::formControlStateOfPreviousHistoryItem): Ditto. |
| (WebCore::Internals::setFormControlStateOfPreviousHistoryItem): Ditto. |
| (WebCore::Internals::absoluteCaretBounds): Ditto. |
| (WebCore::Internals::inspectorHighlightRects): Ditto. |
| (WebCore::Internals::inspectorHighlightObject): Ditto. |
| (WebCore::Internals::markerCountForNode): Ditto. |
| (WebCore::Internals::markerAt): Ditto. |
| (WebCore::Internals::markerRangeForNode): Ditto. |
| (WebCore::Internals::markerDescriptionForNode): Ditto. |
| (WebCore::Internals::dumpMarkerRects): Ditto. |
| (WebCore::Internals::setMarkedTextMatchesAreHighlighted): Ditto. |
| (WebCore::Internals::setScrollViewPosition): Ditto. |
| (WebCore::Internals::setViewBaseBackgroundColor): Ditto. |
| (WebCore::Internals::setPagination): Ditto. |
| (WebCore::Internals::setPaginationLineGridEnabled): Ditto. |
| (WebCore::Internals::configurationForViewport): Ditto. |
| (WebCore::Internals::wasLastChangeUserEdit): Ditto. |
| (WebCore::Internals::scrollElementToRect): Ditto. |
| (WebCore::Internals::autofillFieldName): Ditto. |
| (WebCore::Internals::paintControlTints): Ditto. |
| (WebCore::Internals::rangeForDictionaryLookupAtLocation): Ditto. |
| (WebCore::Internals::setDelegatesScrolling): Ditto. |
| (WebCore::Internals::lastSpellCheckRequestSequence): Ditto. |
| (WebCore::Internals::lastSpellCheckProcessedSequence): Ditto. |
| (WebCore::Internals::wheelEventHandlerCount): Ditto. |
| (WebCore::Internals::touchEventHandlerCount): Ditto. |
| (WebCore::Internals::nodesFromRect): Ditto. |
| (WebCore::Internals::setBatteryStatus): Ditto. |
| (WebCore::Internals::setDeviceProximity): Ditto. |
| (WebCore::Internals::hasSpellingMarker): Ditto. |
| (WebCore::Internals::hasAutocorrectedMarker): Ditto. |
| (WebCore::Internals::handleAcceptedCandidate): Ditto. |
| (WebCore::Internals::isOverwriteModeEnabled): Ditto. |
| (WebCore::Internals::toggleOverwriteModeEnabled): Ditto. |
| (WebCore::Internals::countMatchesForText): Ditto. |
| (WebCore::Internals::countFindMatches): Ditto. |
| (WebCore::Internals::setInspectorIsUnderTest): Ditto. |
| (WebCore::Internals::hasGrammarMarker): Ditto. |
| (WebCore::Internals::numberOfScrollableAreas): Ditto. |
| (WebCore::Internals::isPageBoxVisible): Ditto. |
| (WebCore::Internals::layerTreeAsText): Ditto. |
| (WebCore::Internals::repaintRectsAsText): Ditto. |
| (WebCore::Internals::scrollingStateTreeAsText): Ditto. |
| (WebCore::Internals::mainThreadScrollingReasons): Ditto. |
| (WebCore::Internals::nonFastScrollableRects): Ditto. |
| (WebCore::Internals::setElementUsesDisplayListDrawing): Ditto. |
| (WebCore::Internals::setElementTracksDisplayListReplay): Ditto. |
| (WebCore::Internals::displayListForElement): Ditto. |
| (WebCore::Internals::replayDisplayListForElement): Ditto. |
| (WebCore::Internals::garbageCollectDocumentResources): Ditto. |
| (WebCore::Internals::insertAuthorCSS): Ditto. |
| (WebCore::Internals::insertUserCSS): Ditto. |
| (WebCore::Internals::pageProperty): Ditto. |
| (WebCore::Internals::pageSizeAndMarginsInPixels): Ditto. |
| (WebCore::Internals::setPageScaleFactor): Ditto. |
| (WebCore::Internals::setPageZoomFactor): Ditto. |
| (WebCore::Internals::setTextZoomFactor): Ditto. |
| (WebCore::Internals::setUseFixedLayout): Ditto. |
| (WebCore::Internals::setFixedLayoutSize): Ditto. |
| (WebCore::Internals::setViewExposedRect): Ditto. |
| (WebCore::Internals::setHeaderHeight): Ditto. |
| (WebCore::Internals::setFooterHeight): Ditto. |
| (WebCore::Internals::setTopContentInset): Ditto. |
| (WebCore::Internals::setApplicationCacheOriginQuota): Ditto. |
| (WebCore::Internals::startTrackingRepaints): Ditto. |
| (WebCore::Internals::stopTrackingRepaints): Ditto. |
| (WebCore::Internals::startTrackingLayerFlushes): Ditto. |
| (WebCore::Internals::layerFlushCount): Ditto. |
| (WebCore::Internals::startTrackingStyleRecalcs): Ditto. |
| (WebCore::Internals::styleRecalcCount): Ditto. |
| (WebCore::Internals::startTrackingCompositingUpdates): Ditto. |
| (WebCore::Internals::compositingUpdateCount): Ditto. |
| (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Ditto. |
| (WebCore::Internals::getCurrentCursorInfo): Ditto. |
| (WebCore::Internals::mediaElementHasCharacteristic): Ditto. |
| (WebCore::Internals::captionsStyleSheetOverride): Ditto. |
| (WebCore::Internals::setCaptionsStyleSheetOverride): Ditto. |
| (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto. |
| (WebCore::Internals::setCaptionDisplayMode): Ditto. |
| (WebCore::Internals::selectionBounds): Ditto. |
| (WebCore::Internals::isVibrating): Ditto. |
| (WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Ditto. |
| (WebCore::Internals::beginMediaSessionInterruption): Ditto. |
| (WebCore::Internals::setMediaSessionRestrictions): Ditto. |
| (WebCore::Internals::postRemoteControlCommand): Ditto. |
| (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto. |
| (WebCore::Internals::installMockPageOverlay): Ditto. |
| (WebCore::Internals::pageOverlayLayerTreeAsText): Ditto. |
| (WebCore::Internals::scrollSnapOffsets): Ditto. |
| (WebCore::Internals::pathStringWithShrinkWrappedRects): Moved the code that builds |
| the path string in here for now since it's only used for this testing. |
| (WebCore::Internals::resourceLoadStatisticsForOrigin): Take a const String&. |
| |
| * testing/Internals.h: Updated for above changes. |
| * testing/Internals.idl: Use non-legacy exceptions. |
| |
| 2016-10-18 Chris Dumez <cdumez@apple.com> |
| |
| [Web IDL] Drop webkit-specific extended attributes that are no longer useful |
| https://bugs.webkit.org/show_bug.cgi?id=163643 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Drop webkit-specific IDL extended attributes that are no longer useful: |
| - [CustomReturn]: I believe this used to be for ObjC bindings. It has |
| no impact in JS bindings. |
| - [Deletable]: It only had an impact on static attributes and was only |
| used on HTMLAllCollection.all, which is not static. I updated the |
| bindings generator to so that static attributes are now configurable |
| by default (unless marked as [Unforgeable], as per Web IDL [1]. This |
| causes Notification.permission (This only static attribute we have) |
| to become deletable. This behavior is consistent with the specification |
| and with Chrome. I added test coverage for this. |
| - [ImplementationNamespace]: Implemented but unused. |
| - [PassContext]: Not implemented and unused. |
| - [TypedArray=*]: Not implemented and unused. |
| |
| [1] https://heycam.github.io/webidl/#es-attributes |
| |
| Test: fast/notifications/notification-permisssion-deletable.html |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GetNamespaceForInterface): |
| (GenerateImplementation): |
| * bindings/scripts/IDLAttributes.txt: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| * dom/Node.idl: |
| * html/HTMLDocument.idl: |
| |
| 2016-10-18 Sam Weinig <sam@webkit.org> |
| |
| Replace std::experimental::variant with WTF::Variant (or similar) |
| https://bugs.webkit.org/show_bug.cgi?id=163626 |
| |
| Reviewed by Chris Dumez. |
| |
| Rename std::experimental::variant, Variant. Move helpers get/holds_alternative/etc. |
| into the WTF namespace. |
| |
| * Modules/fetch/FetchBody.h: |
| (WebCore::FetchBody::isBlob): |
| (WebCore::FetchBody::isFormData): |
| (WebCore::FetchBody::isArrayBuffer): |
| (WebCore::FetchBody::isArrayBufferView): |
| (WebCore::FetchBody::isURLSearchParams): |
| (WebCore::FetchBody::isText): |
| (WebCore::FetchBody::blobBody): |
| (WebCore::FetchBody::formDataBody): |
| (WebCore::FetchBody::arrayBufferBody): |
| (WebCore::FetchBody::arrayBufferViewBody): |
| (WebCore::FetchBody::textBody): |
| (WebCore::FetchBody::urlSearchParamsBody): |
| * bindings/generic/IDLTypes.h: |
| * dom/ExceptionOr.h: |
| (WebCore::ExceptionOr<ReturnType>::hasException): |
| (WebCore::ExceptionOr<ReturnType>::releaseException): |
| (WebCore::ExceptionOr<ReturnType>::releaseReturnValue): |
| * dom/MessageEvent.cpp: |
| (WebCore::MessageEvent::source): |
| * dom/MessageEvent.h: |
| * dom/Node.cpp: |
| (WebCore::nodeSetPreTransformedFromNodeOrStringVector): |
| (WebCore::Node::convertNodesOrStringsIntoNode): |
| * dom/Node.h: |
| * html/HTMLOptionsCollection.h: |
| * html/HTMLSelectElement.cpp: |
| (WebCore::HTMLSelectElement::add): |
| * html/HTMLSelectElement.h: |
| * html/track/TrackEvent.cpp: |
| (WebCore::TrackEvent::TrackEvent): |
| * html/track/TrackEvent.h: |
| |
| 2016-10-18 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, rebaseline bindings tests after Sam's r207505. |
| |
| * bindings/scripts/test/JS/JSTestCallback.cpp: |
| (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam): |
| * bindings/scripts/test/JS/JSTestCallbackFunction.cpp: |
| (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionSerializedValueCaller): |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: |
| (WebCore::jsTestSerializedScriptValueInterfaceValueGetter): |
| (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValueGetter): |
| (WebCore::jsTestSerializedScriptValueInterfaceCachedValueGetter): |
| (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter): |
| (WebCore::setJSTestSerializedScriptValueInterfaceValueFunction): |
| (WebCore::setJSTestSerializedScriptValueInterfaceCachedValueFunction): |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| (WebCore::jsTestTypedefsImmutableSerializedScriptValueGetter): |
| (WebCore::setJSTestTypedefsImmutableSerializedScriptValueFunction): |
| |
| 2016-10-18 Chris Dumez <cdumez@apple.com> |
| |
| [Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] |
| https://bugs.webkit.org/show_bug.cgi?id=163630 |
| |
| Reviewed by Darin Adler. |
| |
| Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] in our |
| IDL now that all our events use proper constructors instead. |
| |
| * bindings/scripts/CodeGenerator.pm: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): |
| (GenerateConstructorDefinition): |
| (GenerateConstructorHelperMethods): |
| (IsConstructable): |
| * bindings/scripts/IDLAttributes.txt: |
| * dom/Event.h: |
| (WebCore::Event::create): |
| * dom/Event.idl: |
| * dom/UIEvent.h: |
| (WebCore::UIEvent::create): |
| * dom/UIEvent.idl: |
| |
| 2016-10-18 Chris Dumez <cdumez@apple.com> |
| |
| Changing details.open should cause a toggle event to be fired asynchronously |
| https://bugs.webkit.org/show_bug.cgi?id=163568 |
| |
| Reviewed by Darin Adler. |
| |
| Changing details.open should cause a toggle event to be fired asynchronously: |
| - https://html.spec.whatwg.org/#details-notification-task-steps |
| |
| Firefox and Chrome implement this, we don't. |
| |
| Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html |
| |
| * dom/EventNames.h: |
| * dom/GlobalEventHandlers.idl: |
| * html/HTMLAttributeNames.in: |
| * html/HTMLDetailsElement.cpp: |
| (WebCore::detailToggleEventSender): |
| (WebCore::HTMLDetailsElement::~HTMLDetailsElement): |
| (WebCore::HTMLDetailsElement::dispatchPendingEvent): |
| (WebCore::HTMLDetailsElement::parseAttribute): |
| * html/HTMLDetailsElement.h: |
| * html/HTMLElement.cpp: |
| (WebCore::HTMLElement::createEventHandlerNameMap): |
| |
| 2016-10-18 Dave Hyatt <hyatt@apple.com> |
| |
| [CSS Parser] Enable basic parser testing. |
| https://bugs.webkit.org/show_bug.cgi?id=163639 |
| |
| Reviewed by Dean Jackson. |
| |
| * css/SelectorChecker.cpp: |
| (WebCore::SelectorChecker::matchRecursively): |
| Remove the ASSERT_NOT_REACHED on the new shadow selectors. We need to implement this |
| eventually, but it's better to not assert on that for now. |
| |
| * css/parser/CSSParserValues.cpp: |
| (WebCore::CSSParserSelector::isHostPseudoSelector): |
| Make sure to check that we're a pseudoclass selector first, since otherwise we'll assert. |
| |
| * css/parser/CSSParserValues.h: |
| (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching): |
| Make sure to check that we're a pseudoelement selector first, since otherwise we'll assert. |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::CSSPropertyParser::addExpandedPropertyForValue): |
| copyRef is needed here, since a singleton value is being propagated to all the expanded shorthand properties. |
| |
| (WebCore::parseSingleShadow): |
| (WebCore::CSSPropertyParser::consumeFont): |
| Remove the font properties that aren't part of our shorthand. We will need to revisit this eventually as it seems |
| some of the font properties should be reset as part of this shorthand but aren't. |
| ' |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::consumeInteger): |
| Just return a number for now instead of the parser_integer type. |
| |
| * css/parser/CSSSelectorParser.cpp: |
| (WebCore::CSSSelectorParser::consumePseudo): |
| Clean this up so that it doesn't assert by making sure to add qualifying checks for the appropriate match type. |
| |
| 2016-10-18 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Update the comment for HTML Imports as there is now a proposal to use ES6 Modules for this. |
| Also replace the contact by me since I'm most familiar with this feature. |
| |
| * features.json: |
| |
| 2016-10-18 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Update the status of shadow DOM API to "Done" with a comment saying we're still fixing bugs. |
| |
| Also update my contact information since I'm no longer on Twitter. |
| |
| * features.json: |
| |
| 2016-10-18 Chris Dumez <cdumez@apple.com> |
| |
| Provide better form validation messages |
| https://bugs.webkit.org/show_bug.cgi?id=163584 |
| |
| Reviewed by Darin Adler. |
| |
| Provide better form validation messages that match more closely the ones |
| from Chrome and Firefox. |
| |
| No new tests, updated existing tests. |
| |
| * English.lproj/Localizable.strings: |
| * platform/LocalizedStrings.cpp: |
| (WebCore::validationMessageValueMissingText): |
| (WebCore::validationMessageValueMissingForCheckboxText): |
| (WebCore::validationMessageValueMissingForFileText): |
| (WebCore::validationMessageValueMissingForMultipleFileText): |
| (WebCore::validationMessageValueMissingForRadioText): |
| (WebCore::validationMessageValueMissingForSelectText): |
| (WebCore::validationMessageTypeMismatchText): |
| (WebCore::validationMessageTypeMismatchForEmailText): |
| (WebCore::validationMessageTypeMismatchForMultipleEmailText): |
| (WebCore::validationMessageTypeMismatchForURLText): |
| (WebCore::validationMessagePatternMismatchText): |
| (WebCore::validationMessageTooShortText): |
| (WebCore::validationMessageTooLongText): |
| (WebCore::validationMessageRangeUnderflowText): |
| (WebCore::validationMessageRangeOverflowText): |
| (WebCore::validationMessageStepMismatchText): |
| (WebCore::validationMessageBadInputForNumberText): |
| |
| 2016-10-18 Dave Hyatt <hyatt@apple.com> |
| |
| Fix GTK build. |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| |
| 2016-10-18 Sam Weinig <sam@webkit.org> |
| |
| Simplify SerializedScriptValue, MessagePortArray and ArrayBufferArray to ease generation |
| https://bugs.webkit.org/show_bug.cgi?id=163625 |
| |
| Reviewed by Chris Dumez. |
| |
| - Replace uses of MessagePortArray (a.k.a. Vector<RefPtr<MessagePort>, 1>) with Vector<RefPtr<MessagePort>>. |
| - Replace uses of ArrayBufferArray (a.k.a. Vector<RefPtr<ArrayBuffer>, 1>) with Vector<RefPtr<ArrayBuffer>>. |
| - Add convenience functions to SerializedScriptValue to allow calling with fewer parameters. |
| - Move MessagePorts and ArrayBuffers more where possible. |
| |
| * Modules/indexeddb/IDBObjectStore.cpp: |
| (WebCore::IDBObjectStore::putOrAdd): |
| * Modules/indexeddb/server/UniqueIDBDatabase.cpp: |
| (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): |
| * bindings/js/IDBBindingUtilities.cpp: |
| (WebCore::deserializeIDBValueToJSValue): |
| * bindings/js/JSCustomEventCustom.cpp: |
| (WebCore::JSCustomEvent::detail): |
| * bindings/js/JSHistoryCustom.cpp: |
| (WebCore::JSHistory::state): |
| (WebCore::JSHistory::pushState): |
| (WebCore::JSHistory::replaceState): |
| * bindings/js/JSPopStateEventCustom.cpp: |
| (WebCore::JSPopStateEvent::state): |
| * dom/CustomEvent.cpp: |
| (WebCore::CustomEvent::trySerializeDetail): |
| * dom/ErrorEvent.cpp: |
| (WebCore::ErrorEvent::sanitizedErrorValue): |
| (WebCore::ErrorEvent::trySerializeError): |
| * dom/PopStateEvent.cpp: |
| (WebCore::PopStateEvent::trySerializeState): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::postMessage): |
| * page/DOMWindow.h: |
| * workers/DedicatedWorkerGlobalScope.cpp: |
| (WebCore::DedicatedWorkerGlobalScope::postMessage): |
| * workers/DedicatedWorkerGlobalScope.h: |
| * workers/Worker.cpp: |
| (WebCore::Worker::postMessage): |
| * workers/Worker.h: |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::handlePostMessage): |
| * bindings/js/JSDictionary.cpp: |
| (WebCore::JSDictionary::convertValue): |
| * bindings/js/JSDictionary.h: |
| Updated for new SerializedScriptValue interface/vector naming. |
| |
| * bindings/js/JSMessageEventCustom.cpp: |
| (WebCore::handleInitMessageEvent): |
| Update handleInitMessageEvent to check for exceptions and use convert for the MessagePort sequence. |
| |
| * bindings/js/JSMessagePortCustom.cpp: |
| (WebCore::extractTransferables): |
| (WebCore::fillMessagePortArray): Deleted. |
| * bindings/js/JSMessagePortCustom.h: |
| (WebCore::handlePostMessage): |
| Rename fillMessagePortArray to extractTransferables to better express what it does. |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::serialize): |
| (WebCore::CloneSerializer::CloneSerializer): |
| (WebCore::CloneSerializer::fillTransferMap): |
| (WebCore::CloneSerializer::dumpIfTerminal): |
| (WebCore::CloneDeserializer::deserialize): |
| (WebCore::CloneDeserializer::CloneDeserializer): |
| (WebCore::CloneDeserializer::readTerminal): |
| (WebCore::SerializedScriptValue::transferArrayBuffers): |
| (WebCore::SerializedScriptValue::create): |
| (WebCore::SerializedScriptValue::deserialize): |
| * bindings/js/SerializedScriptValue.h: |
| Simplify interface to allow more callers to avoid passing default arguments. Use ExecState& more. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GetNativeVectorType): |
| Remove special case for MessagePort. |
| (JSValueToNative): |
| (NativeToJSValue): |
| Updated for new SerializedScriptValue interface. |
| |
| * dom/MessageEvent.cpp: |
| (WebCore::MessageEvent::MessageEvent): |
| (WebCore::MessageEvent::create): |
| (WebCore::MessageEvent::initMessageEvent): |
| (WebCore::MessageEvent::trySerializeData): |
| * dom/MessageEvent.h: |
| Store the MessagePort sequence as a Vector<RefPtr<MessagePort>> rather than in a unique_ptr. |
| |
| * dom/MessageEvent.idl: |
| Update last type in init functions to be sequence<MessagePort> rather than Array. They are still |
| custom, as we don't quite generate these correctly yet. |
| |
| * dom/MessagePort.cpp: |
| (WebCore::MessagePort::postMessage): |
| (WebCore::MessagePort::dispatchMessages): |
| (WebCore::MessagePort::disentanglePorts): |
| (WebCore::MessagePort::entanglePorts): |
| * dom/MessagePort.h: |
| Update interface to take MessagePort vectors by rvalue reference. |
| |
| 2016-10-18 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Drop JSDictionary::convertValue() overload taking a TouchList |
| https://bugs.webkit.org/show_bug.cgi?id=163620 |
| |
| Reviewed by Sam Weinig. |
| |
| Drop JSDictionary::convertValue() overload taking a TouchList now that |
| TouchEvent is using a proper constructor with a TouchEventInit |
| dictionary on iOS. |
| |
| * bindings/js/JSDictionary.cpp: |
| |
| 2016-10-18 Dean Jackson <dino@apple.com> |
| |
| Remove CSS_SHAPES feature definition. This should always be on. |
| https://bugs.webkit.org/show_bug.cgi?id=163628 |
| <rdar://problem/28834613> |
| |
| Reviewed by Tim Horton. |
| |
| CSS Shapes is in Candidate Recommendation. It's a core part |
| of CSS. It should always be enabled. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::shapePropertyValue): |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSPropertyNames.in: |
| * css/CSSValueKeywords.in: |
| * css/StyleBuilderConverter.h: |
| (WebCore::StyleBuilderConverter::convertShapeValue): |
| * css/parser/CSSParser.cpp: |
| (WebCore::isSimpleLengthPropertyID): |
| (WebCore::CSSParser::parseValue): |
| (WebCore::CSSParser::parseShapeProperty): |
| * css/parser/CSSParser.h: |
| * inspector/InspectorOverlay.cpp: |
| (WebCore::buildObjectForShapeOutside): |
| (WebCore::buildObjectForElementData): |
| * page/animation/CSSPropertyAnimation.cpp: |
| (WebCore::blendFunc): |
| (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): |
| * rendering/FloatingObjects.cpp: |
| (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded): |
| (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded): |
| (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded): |
| * rendering/RenderBlock.cpp: |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::positionNewFloats): |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::~RenderBox): |
| (WebCore::RenderBox::styleDidChange): |
| (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): |
| (WebCore::isCandidateForOpaquenessTest): |
| (WebCore::RenderBox::imageChanged): |
| * rendering/RenderBox.h: |
| (WebCore::RenderBox::markShapeOutsideDependentsForLayout): |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::~RenderElement): |
| (WebCore::RenderElement::updateShapeImage): |
| (WebCore::RenderElement::initializeStyle): |
| (WebCore::RenderElement::setStyle): |
| * rendering/RenderElement.h: |
| (WebCore::RenderElement::hasShapeOutside): |
| * rendering/SimpleLineLayout.cpp: |
| (WebCore::SimpleLineLayout::canUseForWithReason): |
| * rendering/line/LineWidth.cpp: |
| (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): |
| (WebCore::LineWidth::wrapNextToShapeOutside): |
| (WebCore::LineWidth::fitBelowFloats): |
| * rendering/line/LineWidth.h: |
| * rendering/shapes/ShapeOutsideInfo.cpp: |
| * rendering/shapes/ShapeOutsideInfo.h: |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::changeRequiresLayout): |
| (WebCore::RenderStyle::changeRequiresRepaint): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::initialShapeImageThreshold): |
| * rendering/style/ShapeValue.cpp: |
| * rendering/style/ShapeValue.h: |
| * rendering/style/StyleRareNonInheritedData.cpp: |
| (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): |
| (WebCore::StyleRareNonInheritedData::operator==): |
| * rendering/style/StyleRareNonInheritedData.h: |
| * style/StylePendingResources.cpp: |
| (WebCore::Style::loadPendingResources): |
| |
| 2016-10-18 Chris Dumez <cdumez@apple.com> |
| |
| convertDictionary<>() no longer needs to return an Optional<> type |
| https://bugs.webkit.org/show_bug.cgi?id=163624 |
| |
| Reviewed by Sam Weinig. |
| |
| convertDictionary<>() no longer needs to return an Optional<> type now |
| that our dictionary structures are all default constructible after |
| <https://trac.webkit.org/changeset/206974>. |
| |
| * bindings/js/JSDOMConvert.h: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDictionaryHeaderContent): |
| (GenerateDictionaryImplementationContent): |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| (WebCore::convertDictionary<TestEventConstructor::Init>): |
| * bindings/scripts/test/JS/JSTestEventConstructor.h: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>): |
| (WebCore::convertDictionary<AlternateDictionaryName>): |
| (WebCore::convertDictionary<TestObj::ParentDictionary>): |
| (WebCore::convertDictionary<TestObj::ChildDictionary>): |
| * bindings/scripts/test/JS/JSTestObj.h: |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: |
| (WebCore::convertDictionary<DictionaryImplName>): |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: |
| |
| 2016-10-18 Chris Dumez <cdumez@apple.com> |
| |
| Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add() |
| https://bugs.webkit.org/show_bug.cgi?id=163608 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add(): |
| - https://html.spec.whatwg.org/#htmlselectelement |
| - https://html.spec.whatwg.org/#htmloptionscollection |
| |
| No new tests, rebaseline existing test. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDefaultValue): |
| (GenerateParametersCheck): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller): |
| * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: |
| (WebCore::constructJSTestOverloadedConstructorsWithSequence1): |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| (WebCore::jsTestTypedefsPrototypeFunctionFuncCaller): |
| * html/HTMLOptGroupElement.idl: |
| * html/HTMLOptionsCollection.cpp: |
| (WebCore::HTMLOptionsCollection::add): |
| * html/HTMLOptionsCollection.h: |
| * html/HTMLOptionsCollection.idl: |
| * html/HTMLSelectElement.cpp: |
| (WebCore::HTMLSelectElement::add): |
| (WebCore::HTMLSelectElement::setOption): |
| (WebCore::HTMLSelectElement::setLength): |
| * html/HTMLSelectElement.h: |
| * html/HTMLSelectElement.idl: |
| |
| 2016-10-18 Aaron Chu <aaron_chu@apple.com> |
| |
| Web Inspector: AXI: focused/focusable state should be based on Accessibility Object instead of Element |
| https://bugs.webkit.org/show_bug.cgi?id=163088 |
| <rdar://problem/16421985> |
| |
| Reviewed by Darin Adler. |
| |
| Changed code in InspectDOMAgent so that it determines the focusability of a Node based |
| on the AccessibilityNodeObject and not the Element class. |
| |
| Covered by existing tests: |
| LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html |
| |
| * inspector/InspectorDOMAgent.cpp: |
| (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties): |
| |
| 2016-10-18 Anders Carlsson <andersca@apple.com> |
| |
| Get rid of more WebHistoryItem cruft |
| https://bugs.webkit.org/show_bug.cgi?id=163623 |
| |
| Reviewed by Tim Horton. |
| |
| * history/HistoryItem.cpp: |
| (WebCore::HistoryItem::HistoryItem): |
| * history/HistoryItem.h: |
| (WebCore::HistoryItem::setViewportArguments): |
| (WebCore::HistoryItem::bookmarkID): Deleted. |
| (WebCore::HistoryItem::setBookmarkID): Deleted. |
| (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Deleted. |
| (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Deleted. |
| |
| 2016-10-18 Dave Hyatt <hyatt@apple.com> |
| |
| Fix Windows build. |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| |
| 2016-10-18 Antoine Quint <graouts@apple.com> |
| |
| Modern media controls don't update their rendering correctly |
| https://bugs.webkit.org/show_bug.cgi?id=163603 |
| <rdar://problem/28826022> |
| |
| Reviewed by Dean Jackson. |
| |
| There are rendering issues when we use an absolutely-positioned element |
| as the top-most element in a media element's shadow root (webkit.org/b/163592). |
| Since we only need for that element to be positioned, we can use "position: relative" |
| instead, which removes the rendering issues. |
| |
| * Modules/modern-media-controls/controls/media-controls.css: |
| (.media-controls): |
| (.media-controls,): Deleted. |
| |
| 2016-10-18 Dean Jackson <dino@apple.com> |
| |
| Add preliminary support for extended colors to WebCore::Color |
| https://bugs.webkit.org/show_bug.cgi?id=162878 |
| <rdar://problem/28596413> |
| |
| Follow-up review comments from Darin Adler. |
| |
| * html/canvas/CanvasGradient.cpp: |
| (WebCore::CanvasGradient::addColorStop): Use nullptr. |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::Color): Explicitly zero before assigning the pointer. |
| * platform/graphics/Color.h: Add some comments about the failings of operator== and hash. |
| (WebCore::Color::Color): Add some static_asserts to the constructors. Move the empty and deleted values |
| to static constants. |
| (WebCore::Color::isHashTableDeletedValue): |
| (WebCore::Color::hash): Replacement for asUint64, which was only being used for a hash. |
| (WebCore::Color::asUint64): Deleted. |
| * platform/graphics/ColorHash.h: Use new hash functions. Use "using" instead of typedef. |
| (WTF::ColorHash::hash): |
| |
| 2016-10-18 Ryosuke Niwa <rniwa@webkit.org> |
| |
| REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com |
| https://bugs.webkit.org/show_bug.cgi?id=163581 |
| <rdar://problem/27739558> |
| |
| Reviewed by Simon Fraser. |
| |
| The bug was caused by Chrome::elementDidBlur not getting called, which resulted in |
| StopAssistingNode not getting sent to the UI process. |
| |
| Test: fast/forms/ios/hide-keyboard-on-node-removal.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::setFocusedElement): Restore the behavior prior to r201471 by calling |
| Chrome::elementDidBlur explicitly. |
| * html/HTMLTextFormControlElement.cpp: |
| (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): Added a comment about ordering. |
| |
| 2016-10-17 Anders Carlsson <andersca@apple.com> |
| |
| Move some history specific HistoryItem code to WebHistoryItem |
| https://bugs.webkit.org/show_bug.cgi?id=163567 |
| |
| Reviewed by Tim Horton. |
| |
| * history/HistoryItem.cpp: |
| (WebCore::HistoryItem::addRedirectURL): Deleted. |
| (WebCore::HistoryItem::redirectURLs): Deleted. |
| (WebCore::HistoryItem::setRedirectURLs): Deleted. |
| * history/HistoryItem.h: |
| |
| 2016-10-18 Dave Hyatt <hyatt@apple.com> |
| |
| [CSS Parser] Get all the properties turned on |
| https://bugs.webkit.org/show_bug.cgi?id=163605 |
| |
| Reviewed by Dean Jackson. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/CSSFunctionValue.h: |
| * css/CSSPendingSubstitutionValue.cpp: Added. |
| (WebCore::CSSPendingSubstitutionValue::customCSSText): |
| * css/CSSPendingSubstitutionValue.h: Added. |
| (WebCore::CSSPendingSubstitutionValue::create): |
| (WebCore::CSSPendingSubstitutionValue::shorthandValue): |
| (WebCore::CSSPendingSubstitutionValue::shorthandPropertyId): |
| (WebCore::CSSPendingSubstitutionValue::equals): |
| (WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue): |
| * css/CSSValue.cpp: |
| (WebCore::CSSValue::cssText): |
| (WebCore::CSSValue::destroy): |
| * css/CSSValue.h: |
| (WebCore::CSSValue::isPendingSubstitutionValue): |
| * css/CSSValueKeywords.in: |
| * css/StylePropertyShorthand.cpp: |
| (WebCore::transitionShorthandForParsing): |
| * css/StylePropertyShorthand.h: |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::completeURL): |
| * css/parser/CSSParserImpl.cpp: |
| (WebCore::CSSParserImpl::parseValue): |
| (WebCore::CSSParserImpl::consumeDeclaration): |
| (WebCore::CSSParserImpl::consumeDeclarationValue): |
| * css/parser/CSSParserMode.h: |
| (WebCore::CSSParserContext::completeURL): |
| * css/parser/CSSParserToken.cpp: |
| (WebCore::CSSParserToken::parseAsCSSPropertyID): |
| (WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID): Deleted. |
| * css/parser/CSSParserToken.h: |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::cssPropertyID): |
| (WebCore::CSSPropertyParser::addProperty): |
| (WebCore::CSSPropertyParser::addExpandedPropertyForValue): |
| (WebCore::CSSPropertyParser::parseValue): |
| (WebCore::CSSPropertyParser::parseSingleValue): |
| (WebCore::CSSPropertyParser::parseValueStart): |
| (WebCore::CSSPropertyParser::consumeCSSWideKeyword): |
| (WebCore::consumeTransformOrigin): |
| (WebCore::consumeWillChange): |
| (WebCore::consumeFontFeatureTag): |
| (WebCore::consumeFontFeatureSettings): |
| (WebCore::consumePage): |
| (WebCore::consumeQuotes): |
| (WebCore::FontVariantLigaturesParser::consumeLigature): |
| (WebCore::FontVariantLigaturesParser::finalizeValue): |
| (WebCore::consumeFontVariantLigatures): |
| (WebCore::consumeFontVariantCaps): |
| (WebCore::FontVariantNumericParser::consumeNumeric): |
| (WebCore::FontVariantNumericParser::finalizeValue): |
| (WebCore::consumeFontVariantNumeric): |
| (WebCore::consumeFontVariantCSS21): |
| (WebCore::consumeFontVariantList): |
| (WebCore::consumeFontWeight): |
| (WebCore::consumeFamilyName): |
| (WebCore::consumeGenericFamily): |
| (WebCore::consumeFontFamily): |
| (WebCore::consumeSpacing): |
| (WebCore::consumeTabSize): |
| (WebCore::consumeTextSizeAdjust): |
| (WebCore::consumeFontSize): |
| (WebCore::consumeLineHeight): |
| (WebCore::createPrimitiveValuePair): |
| (WebCore::consumeCounter): |
| (WebCore::consumePageSize): |
| (WebCore::consumeSize): |
| (WebCore::consumeTextIndent): |
| (WebCore::validWidthOrHeightKeyword): |
| (WebCore::consumeMaxWidthOrHeight): |
| (WebCore::consumeWidthOrHeight): |
| (WebCore::consumeMarginOrOffset): |
| (WebCore::consumeClipComponent): |
| (WebCore::consumeClip): |
| (WebCore::consumeTouchAction): |
| (WebCore::consumeLineClamp): |
| (WebCore::consumeLocale): |
| (WebCore::consumeColumnWidth): |
| (WebCore::consumeColumnCount): |
| (WebCore::consumeColumnGap): |
| (WebCore::consumeColumnSpan): |
| (WebCore::consumeZoom): |
| (WebCore::consumeAnimationIterationCount): |
| (WebCore::consumeAnimationName): |
| (WebCore::consumeTransitionProperty): |
| (WebCore::consumeCubicBezier): |
| (WebCore::consumeAnimationTimingFunction): |
| (WebCore::consumeAnimationValue): |
| (WebCore::isValidAnimationPropertyList): |
| (WebCore::consumeAnimationPropertyList): |
| (WebCore::CSSPropertyParser::consumeAnimationShorthand): |
| (WebCore::consumeZIndex): |
| (WebCore::parseSingleShadow): |
| (WebCore::consumeShadow): |
| (WebCore::consumeFilterFunction): |
| (WebCore::consumeFilter): |
| (WebCore::consumeTextDecorationLine): |
| (WebCore::consumeTextEmphasisStyle): |
| (WebCore::consumeOutlineColor): |
| (WebCore::consumeLineWidth): |
| (WebCore::consumeBorderWidth): |
| (WebCore::consumeTextStrokeWidth): |
| (WebCore::consumeColumnRuleWidth): |
| (WebCore::consumeTranslate3d): |
| (WebCore::consumeNumbers): |
| (WebCore::consumePerspective): |
| (WebCore::consumeTransformValue): |
| (WebCore::consumeTransform): |
| (WebCore::consumePositionLonghand): |
| (WebCore::consumePositionX): |
| (WebCore::consumePositionY): |
| (WebCore::consumePaintStroke): |
| (WebCore::consumePaintOrder): |
| (WebCore::consumeNoneOrURI): |
| (WebCore::consumeFlexBasis): |
| (WebCore::consumeStrokeDasharray): |
| (WebCore::consumeBaselineShift): |
| (WebCore::consumeRxOrRy): |
| (WebCore::consumeCursor): |
| (WebCore::consumeAttr): |
| (WebCore::consumeCounterContent): |
| (WebCore::consumeContent): |
| (WebCore::consumePositionList): |
| (WebCore::consumeScrollSnapCoordinate): |
| (WebCore::consumeScrollSnapPoints): |
| (WebCore::consumeBorderRadiusCorner): |
| (WebCore::consumeVerticalAlign): |
| (WebCore::consumeShapeRadius): |
| (WebCore::consumeBasicShapeCircle): |
| (WebCore::consumeBasicShapeEllipse): |
| (WebCore::consumeBasicShapePolygon): |
| (WebCore::complete4Sides): |
| (WebCore::consumeRadii): |
| (WebCore::consumeBasicShapeInset): |
| (WebCore::consumeBasicShape): |
| (WebCore::consumeWebkitClipPath): |
| (WebCore::consumeShapeOutside): |
| (WebCore::consumeContentDistributionOverflowPosition): |
| (WebCore::consumeBorderImageRepeatKeyword): |
| (WebCore::consumeBorderImageRepeat): |
| (WebCore::consumeBorderImageSlice): |
| (WebCore::consumeBorderImageOutset): |
| (WebCore::consumeBorderImageWidth): |
| (WebCore::consumeBorderImageComponents): |
| (WebCore::consumeWebkitBorderImage): |
| (WebCore::consumeReflect): |
| (WebCore::consumeImageOrientation): |
| (WebCore::consumeBackgroundBlendMode): |
| (WebCore::consumeBackgroundAttachment): |
| (WebCore::consumeBackgroundBox): |
| (WebCore::consumeBackgroundComposite): |
| (WebCore::consumePrefixedBackgroundBox): |
| (WebCore::consumeBackgroundSize): |
| (WebCore::consumeGridAutoFlow): |
| (WebCore::consumeBackgroundComponent): |
| (WebCore::addBackgroundValue): |
| (WebCore::consumeCommaSeparatedBackgroundComponent): |
| (WebCore::consumeSelfPositionKeyword): |
| (WebCore::consumeSelfPositionOverflowPosition): |
| (WebCore::consumeAlignItems): |
| (WebCore::consumeJustifyItems): |
| (WebCore::consumeFitContent): |
| (WebCore::consumeCustomIdentForGridLine): |
| (WebCore::consumeGridLine): |
| (WebCore::isGridTrackFixedSized): |
| (WebCore::consumeGridBreadth): |
| (WebCore::consumeGridTrackSize): |
| (WebCore::consumeGridLineNames): |
| (WebCore::consumeGridTrackRepeatFunction): |
| (WebCore::consumeGridTrackList): |
| (WebCore::consumeGridTemplatesRowsOrColumns): |
| (WebCore::consumeGridTemplateAreas): |
| (WebCore::consumeFontFaceUnicodeRange): |
| (WebCore::consumeFontFaceSrcURI): |
| (WebCore::consumeFontFaceSrcLocal): |
| (WebCore::consumeFontFaceSrc): |
| (WebCore::CSSPropertyParser::parseFontFaceDescriptor): |
| (WebCore::CSSPropertyParser::consumeSystemFont): |
| (WebCore::CSSPropertyParser::consumeFont): |
| (WebCore::CSSPropertyParser::consumeFontVariantShorthand): |
| (WebCore::CSSPropertyParser::consumeBorderSpacing): |
| (WebCore::consumeSingleViewportDescriptor): |
| (WebCore::CSSPropertyParser::parseViewportDescriptor): |
| (WebCore::consumeColumnWidthOrCount): |
| (WebCore::CSSPropertyParser::consumeColumns): |
| (WebCore::CSSPropertyParser::consumeShorthandGreedily): |
| (WebCore::CSSPropertyParser::consumeFlex): |
| (WebCore::CSSPropertyParser::consumeBorder): |
| (WebCore::CSSPropertyParser::consume4Values): |
| (WebCore::CSSPropertyParser::consumeBorderImage): |
| (WebCore::CSSPropertyParser::consumeLegacyBreakProperty): |
| (WebCore::consumeBackgroundPosition): |
| (WebCore::consumeRepeatStyleComponent): |
| (WebCore::consumeRepeatStyle): |
| (WebCore::CSSPropertyParser::consumeBackgroundShorthand): |
| (WebCore::CSSPropertyParser::consumeGridItemPositionShorthand): |
| (WebCore::CSSPropertyParser::consumeGridAreaShorthand): |
| (WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns): |
| (WebCore::CSSPropertyParser::consumeGridTemplateShorthand): |
| (WebCore::CSSPropertyParser::consumeGridShorthand): |
| (WebCore::CSSPropertyParser::parseShorthand): |
| (WebCore::unresolvedCSSPropertyID): Deleted. |
| * css/parser/CSSPropertyParser.h: |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::consumeIdent): |
| (WebCore::CSSPropertyParserHelpers::consumeCustomIdent): |
| (WebCore::CSSPropertyParserHelpers::consumeString): |
| (WebCore::CSSPropertyParserHelpers::consumeImageSet): |
| * css/parser/CSSPropertyParserHelpers.h: |
| |
| 2016-10-18 Brent Fulgham <bfulgham@apple.com> |
| |
| Correct Document::removeAllEventListeners |
| https://bugs.webkit.org/show_bug.cgi?id=163558 |
| <rdar://problem/28716840> |
| |
| Reviewed by Chris Dumez. |
| |
| Tested by fast/dom/node-move-to-new-document-crash-main.html. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::removeAllEventListeners): Clear out the wheel and |
| touch event targets when clearing all data. |
| |
| 2016-10-18 Dean Jackson <dino@apple.com> |
| |
| Remove dependency cycle with UIKit |
| https://bugs.webkit.org/show_bug.cgi?id=163577 |
| <rdar://problem/28786160> |
| |
| Reviewed by Tim Horton. |
| |
| Soft link against UIKit. Followup patch because |
| I screwed up and forgot to edit the simulator |
| configuration. |
| |
| * Configurations/WebCoreTestSupport.xcconfig: |
| |
| 2016-10-18 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| SVGCSSParser: m_implicitShorthand value is not reset after adding the shorthand property |
| https://bugs.webkit.org/show_bug.cgi?id=116470 |
| |
| Reviewed by Simon Fraser. |
| |
| When we encounter a shorthand css property, we set m_implicitShorthand |
| to true to tell addProperty() later that the individual properties are |
| all set through a short hand one. We need to make sure that setting |
| m_implicitShorthand to true will not be leaked after finishing parsing |
| the short hand property. |
| |
| Test: fast/css/implicit-property-restore.html |
| |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::parseValue): |
| (WebCore::CSSParser::parseFillShorthand): |
| (WebCore::CSSParser::parseShorthand): |
| (WebCore::CSSParser::parse4Values): |
| (WebCore::CSSParser::parseBorderRadius): |
| (WTF::ImplicitScope::ImplicitScope): Deleted. |
| (WTF::ImplicitScope::~ImplicitScope): Deleted. |
| Get rid of ImplicitScope and replace its calls by TemporaryChange<bool>. |
| |
| * css/parser/SVGCSSParser.cpp: |
| (WebCore::CSSParser::parseSVGValue): |
| Restore m_implicitShorthand value after setting it temporarily to true. |
| |
| 2016-10-18 Chris Dumez <cdumez@apple.com> |
| |
| Update TrackEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163580 |
| |
| Reviewed by Sam Weinig. |
| |
| Update TrackEvent to stop using legacy [ConstructorTemplate=Event] |
| and use a regular constructor as in the specification: |
| - https://html.spec.whatwg.org/#the-trackevent-interface |
| |
| No new tests, updated existing tests. |
| |
| * html/track/TrackEvent.cpp: |
| (WebCore::TrackEvent::TrackEvent): |
| * html/track/TrackEvent.h: |
| * html/track/TrackEvent.idl: |
| |
| 2016-10-18 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r207409. |
| https://bugs.webkit.org/show_bug.cgi?id=163602 |
| |
| Introduced many test failures and timeouts, causing release |
| bot to exit early (Requested by mcatanzaro on #webkit). |
| |
| Reverted changeset: |
| |
| "[GTK] Several tests crashing on debug bot in (anonymous |
| namespace)::MediaPlayerPrivateGStreamerBase::repaint" |
| https://bugs.webkit.org/show_bug.cgi?id=163511 |
| http://trac.webkit.org/changeset/207409 |
| |
| 2016-10-18 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Resolve constraints and enumerate devices in the UI process |
| https://bugs.webkit.org/show_bug.cgi?id=162147 |
| <rdar://problem/28803569> |
| |
| Reviewed by Darin Adler. |
| |
| Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device |
| access happens in the UI process. |
| |
| No new tests, updated results of existing tests. |
| |
| * CMakeLists.txt: Add MediaDevicesEnumerationRequest.cpp, delete UserMediaPermissionCheck.cpp. |
| |
| * Modules/mediastream/MediaConstraintsImpl.cpp: |
| (WebCore::MediaConstraintsImpl::create): Only create from MediaConstraintsData. |
| (WebCore::MediaConstraintsImpl::initialize): Deleted. |
| * Modules/mediastream/MediaConstraintsImpl.h: |
| |
| * Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Added. |
| (WebCore::MediaDevicesEnumerationRequest::create): |
| (WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest): |
| (WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest): |
| (WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin): |
| (WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin): |
| (WebCore::MediaDevicesEnumerationRequest::contextDestroyed): |
| (WebCore::MediaDevicesEnumerationRequest::start): |
| (WebCore::MediaDevicesEnumerationRequest::cancel): |
| (WebCore::MediaDevicesEnumerationRequest::setDeviceInfo): |
| (WebCore::MediaDevicesEnumerationRequest::finish): |
| * Modules/mediastream/MediaDevicesEnumerationRequest.h: Added. |
| |
| * Modules/mediastream/MediaDevicesRequest.cpp: |
| (WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the enumeration request. |
| (WebCore::MediaDevicesRequest::contextDestroyed): Ditto. |
| (WebCore::MediaDevicesRequest::start): Create and use a MediaDevicesEnumerationRequest. |
| (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Deleted. |
| * Modules/mediastream/MediaDevicesRequest.h: |
| |
| * Modules/mediastream/UserMediaClient.h: |
| * Modules/mediastream/UserMediaController.h: |
| (WebCore::UserMediaController::enumerateMediaDevices): New. |
| (WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): New. |
| (WebCore::UserMediaController::checkUserMediaPermission): Deleted. |
| (WebCore::UserMediaController::cancelUserMediaPermissionCheck): Deleted. |
| |
| * Modules/mediastream/UserMediaPermissionCheck.h: Deleted. |
| * Modules/mediastream/UserMediaPermissionCheck.cpp: Deleted. |
| |
| * Modules/mediastream/UserMediaRequest.cpp: |
| (WebCore::UserMediaRequest::UserMediaRequest): |
| (WebCore::UserMediaRequest::start): |
| (WebCore::UserMediaRequest::allow): |
| (WebCore::UserMediaRequest::deny): |
| (WebCore::UserMediaRequest::constraintsValidated): Deleted. |
| (WebCore::UserMediaRequest::userMediaAccessGranted): Deleted. |
| (WebCore::UserMediaRequest::userMediaAccessDenied): Deleted. |
| (WebCore::UserMediaRequest::constraintsInvalid): Deleted. |
| (WebCore::UserMediaRequest::didCreateStream): Deleted. |
| (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Deleted. |
| (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Deleted. |
| * Modules/mediastream/UserMediaRequest.h: |
| |
| * WebCore.xcodeproj/project.pbxproj: Add MediaDevicesEnumerationRequest.*. |
| |
| * platform/mediastream/CaptureDevice.h: |
| (WebCore::CaptureDevice::CaptureDevice): |
| (WebCore::CaptureDevice::setPersistentId): Add setter for argument decoder. |
| (WebCore::CaptureDevice::setLabel): Ditto. |
| (WebCore::CaptureDevice::setGroupId): Ditto. |
| (WebCore::CaptureDevice::setKind): Ditto. |
| |
| * platform/mediastream/CaptureDeviceManager.h: Remove unnecessary include. |
| |
| * platform/mediastream/MediaConstraints.h: |
| (WebCore::MediaConstraint::encode): New. |
| (WebCore::MediaConstraint::decode): Ditto. |
| (WebCore::NumericConstraint::encode): Ditto. |
| (WebCore::NumericConstraint::decode): Ditto. |
| |
| * platform/mediastream/MediaStreamCreationClient.h: Deleted. |
| |
| * platform/mediastream/RealtimeMediaSourceCenter.h: Use completion handlers instead of client interface. |
| |
| * platform/mediastream/mac/AVCaptureDeviceManager.mm: |
| (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Drive-by fix: don't initialize |
| group id, we don't support it. |
| |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp: |
| (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints): Update for interface change. |
| (WebCore::RealtimeMediaSourceCenterMac::createMediaStream): Ditto. |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h: |
| |
| * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: |
| (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints): Ditto. |
| (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Ditto. |
| (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): Ditto. |
| * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: |
| |
| * platform/mock/MockRealtimeMediaSourceCenter.cpp: |
| (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Ditto. |
| (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Ditto. |
| * platform/mock/MockRealtimeMediaSourceCenter.h: |
| |
| 2016-10-18 Zan Dobersek <zdobersek@igalia.com> |
| |
| [WebIDL] Support BufferSource |
| https://bugs.webkit.org/show_bug.cgi?id=163541 |
| |
| Reviewed by Youenn Fablet. |
| |
| Add support for the BufferSource typedef in WebIDL. The implementation |
| adds the necessary handling for this type in the generator scripts and |
| the specialization of the Converter<> template for the IDLBufferSource |
| struct that enables exposing ArrayBuffer or ArrayBufferView objects by |
| having WebCore::BufferSource objects pointing to their data. |
| |
| The SourceBuffer interface in the MSE module has the appendBuffer() |
| operation modified to accept a BufferSource parameter, instead of |
| overloading it for ArrayBuffer and ArrayBufferView parameters. |
| |
| The bindings generator tests cover BufferSource as both an operation |
| parameter and as a dictionary member. |
| |
| * Modules/mediasource/SourceBuffer.cpp: |
| (WebCore::SourceBuffer::appendBuffer): |
| (WebCore::SourceBuffer::appendBufferInternal): |
| * Modules/mediasource/SourceBuffer.h: |
| * Modules/mediasource/SourceBuffer.idl: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/generic/IDLTypes.h: |
| * bindings/js/BufferSource.h: Added. |
| * bindings/js/JSDOMConvert.h: |
| (WebCore::Converter<IDLBufferSource>::convert): |
| * bindings/scripts/CodeGenerator.pm: |
| (SkipIncludeHeader): |
| (IsWrapperType): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (AddClassForwardIfNeeded): |
| (GetBaseIDLType): |
| (IsHandledByDOMConvert): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| (WebCore::jsTestObjPrototypeFunctionBufferSourceParameter): |
| (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterCaller): |
| * bindings/scripts/test/TestObj.idl: |
| |
| 2016-10-18 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-grid] Different width of grid container between initial load and refresh |
| https://bugs.webkit.org/show_bug.cgi?id=163535 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Grid's layout logic manages two different override sizes; one it's |
| designed to implement the grid item's stretching behavior, identified |
| with the concept of 'overrideContentLogicalSize'; there is another |
| override size, known as overrideContainingBlockContentLogicalSize, |
| used to implement the Grid Area abstraction, which will behave as |
| the actual containing block of any grid item. |
| |
| During grid's layout logic these override sizes are set according |
| to the CSS style rules. This affects how the grid container and its |
| children are going to be sized during layout. Grid Tracks sizing |
| algorithm depends on these override sizes. |
| |
| In order to ensure that the tracks sizing algorithm produces the |
| same results when it's run consecutively several times, we need to |
| clear these override sizes and perform a layout of the affected grid |
| items. Otherwise, the affected items will return sizing values which |
| depend on the override values set in the previous layout, which in |
| some cases, like orthogonal flows, may change through different runs |
| of the sizing algorithm. |
| |
| Test: fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html |
| |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::layoutBlock): |
| |
| 2016-10-18 Youenn Fablet <youenn@apple.com> |
| |
| CachedResourceLoader should not need to remove fragment identifier |
| https://bugs.webkit.org/show_bug.cgi?id=163015 |
| |
| Reviewed by Darin Adler. |
| |
| No expected change for non-window port. |
| For window port, CachedResourceLoader will strip the fragment identifier of the URL passed to subresourceForURL |
| before querying the memory cache. |
| |
| Removing the fragment identifier from the request stored in CachedResourceRequest. |
| The fragment identifier is stored in a separate field. |
| |
| This allows CachedResourceLoader to not care about fragment identifier. |
| CachedResource can then get access to it. |
| |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::CachedResource): |
| (WebCore::CachedResource::finishRequestInitialization): Deleted. |
| * loader/cache/CachedResource.h: |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::cachedResource): |
| Updated the method taking a const String& to strip the fragment identifier if needed. |
| Updated the method taking a const URL& to assert if the fragment identifier is present. |
| (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): |
| (WebCore::CachedResourceLoader::requestResource): |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::CachedResourceRequest): |
| (WebCore::CachedResourceRequest::splitFragmentIdentifierFromRequestURL): |
| * loader/cache/CachedResourceRequest.h: |
| (WebCore::CachedResourceRequest::releaseFragmentIdentifier): |
| (WebCore::CachedResourceRequest::clearFragmentIdentifier): |
| * loader/cache/MemoryCache.cpp: |
| (WebCore::MemoryCache::shouldRemoveFragmentIdentifier): |
| (WebCore::MemoryCache::removeFragmentIdentifierIfNeeded): |
| (WebCore::MemoryCache::revalidationSucceeded): |
| (WebCore::MemoryCache::resourceForRequest): |
| * loader/cache/MemoryCache.h: |
| |
| 2016-10-18 Antti Koivisto <antti@apple.com> |
| |
| Rename setNeedsStyleRecalc to invalidateStyle |
| https://bugs.webkit.org/show_bug.cgi?id=163542 |
| |
| Reviewed by Darin Adler. |
| |
| Also rename StyleChangeType enum and some related functions for clarity. For example |
| |
| element.setNeedsStyleRecalc(SyntheticStyleChange); |
| |
| becomes |
| |
| element.invalidateStyleAndLayerComposition(); |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/StyleInvalidationAnalysis.cpp: |
| (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded): |
| * dom/Document.cpp: |
| (WebCore::Document::recalcStyle): |
| (WebCore::Document::updateViewportUnitsOnResize): |
| (WebCore::Document::setCSSTarget): |
| (WebCore::unwrapFullScreenRenderer): |
| (WebCore::Document::setAnimatingFullScreen): |
| * dom/Element.cpp: |
| (WebCore::Element::setActive): |
| (WebCore::Element::setFocus): |
| (WebCore::Element::setHovered): |
| (WebCore::Element::attributeChanged): |
| (WebCore::Element::invalidateStyle): |
| (WebCore::Element::invalidateStyleAndLayerComposition): |
| (WebCore::Element::invalidateStyleForSubtree): |
| (WebCore::Element::invalidateStyleAndRenderersForSubtree): |
| |
| Move public invalidation functions to Element tightening typing. |
| Use separate functions instead of enum values. |
| This way the call sites look nicer and only useful combinations are exposed. |
| |
| (WebCore::Element::addShadowRoot): |
| (WebCore::checkForEmptyStyleChange): |
| (WebCore::checkForSiblingStyleChanges): |
| (WebCore::Element::needsStyleInvalidation): |
| (WebCore::Element::setContainsFullScreenElement): |
| * dom/Element.h: |
| (WebCore::Element::setHasFocusWithin): |
| * dom/Node.cpp: |
| (WebCore::computeEditabilityFromComputedStyle): |
| (WebCore::Node::adjustStyleValidity): |
| |
| Update validity and mode separately. There was a potential bug here where |
| SyntheticStyleChange could overwrite FullStyleChange (no known repro). |
| |
| (WebCore::Node::updateAncestorsForStyleRecalc): |
| (WebCore::Node::invalidateStyle): |
| (WebCore::Node::insertedInto): |
| (WebCore::Node::setNeedsStyleRecalc): Deleted. |
| * dom/Node.h: |
| (WebCore::Node::needsStyleRecalc): |
| (WebCore::Node::styleValidity): |
| (WebCore::Node::styleResolutionShouldRecompositeLayer): |
| (WebCore::Node::setHasValidStyle): |
| (WebCore::Node::styleChangeType): Deleted. |
| (WebCore::Node::clearNeedsStyleRecalc): Deleted. |
| (WebCore::Node::setStyleChange): Deleted. |
| * dom/RadioButtonGroups.cpp: |
| (WebCore::RadioButtonGroup::remove): |
| (WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons): |
| * dom/ShadowRoot.cpp: |
| (WebCore::ShadowRoot::setResetStyleInheritance): |
| * dom/SlotAssignment.cpp: |
| (WebCore::SlotAssignment::addSlotElementByName): |
| (WebCore::SlotAssignment::removeSlotElementByName): |
| (WebCore::SlotAssignment::didChangeSlot): |
| * dom/StyledElement.cpp: |
| (WebCore::StyledElement::attributeChanged): |
| (WebCore::StyledElement::styleAttributeChanged): |
| (WebCore::StyledElement::invalidateStyleAttribute): |
| * dom/Text.cpp: |
| (WebCore::Text::updateRendererAfterContentChange): |
| * dom/VisitedLinkState.cpp: |
| (WebCore::VisitedLinkState::invalidateStyleForAllLinks): |
| (WebCore::VisitedLinkState::invalidateStyleForLink): |
| * editing/FrameSelection.cpp: |
| (WebCore::FrameSelection::focusedOrActiveStateChanged): |
| * html/BaseDateAndTimeInputType.cpp: |
| (WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged): |
| * html/FileInputType.cpp: |
| (WebCore::FileInputType::setValue): |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::parseAttribute): |
| * html/HTMLBodyElement.cpp: |
| (WebCore::HTMLBodyElement::parseAttribute): |
| * html/HTMLCanvasElement.cpp: |
| (WebCore::HTMLCanvasElement::getContext): |
| (WebCore::HTMLCanvasElement::createImageBuffer): |
| * html/HTMLElement.cpp: |
| (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged): |
| (WebCore::HTMLElement::calculateAndAdjustDirectionality): |
| * html/HTMLFieldSetElement.cpp: |
| (WebCore::HTMLFieldSetElement::addInvalidDescendant): |
| (WebCore::HTMLFieldSetElement::removeInvalidDescendant): |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::disabledStateChanged): |
| (WebCore::HTMLFormControlElement::readOnlyAttributeChanged): |
| (WebCore::HTMLFormControlElement::requiredAttributeChanged): |
| (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck): |
| (WebCore::HTMLFormControlElement::updateValidity): |
| * html/HTMLFormElement.cpp: |
| (WebCore::HTMLFormElement::registerFormElement): |
| (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl): |
| (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded): |
| (WebCore::HTMLFormElement::resetDefaultButton): |
| * html/HTMLFrameElementBase.cpp: |
| (WebCore::HTMLFrameElementBase::finishedInsertingSubtree): |
| * html/HTMLFrameOwnerElement.cpp: |
| (WebCore::HTMLFrameOwnerElement::scheduleinvalidateStyleAndLayerComposition): |
| (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Deleted. |
| * html/HTMLFrameOwnerElement.h: |
| * html/HTMLFrameSetElement.cpp: |
| (WebCore::HTMLFrameSetElement::parseAttribute): |
| (WebCore::HTMLFrameSetElement::willRecalcStyle): |
| * html/HTMLInputElement.cpp: |
| (WebCore::HTMLInputElement::runPostTypeUpdateTasks): |
| (WebCore::HTMLInputElement::parseAttribute): |
| (WebCore::HTMLInputElement::setChecked): |
| (WebCore::HTMLInputElement::setIndeterminate): |
| (WebCore::HTMLInputElement::setAutoFilled): |
| (WebCore::HTMLInputElement::maxLengthAttributeChanged): |
| (WebCore::HTMLInputElement::minLengthAttributeChanged): |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::parseAttribute): |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged): |
| (WebCore::HTMLMediaElement::setVideoFullscreenLayer): |
| * html/HTMLObjectElement.cpp: |
| (WebCore::HTMLObjectElement::parseAttribute): |
| (WebCore::HTMLObjectElement::childrenChanged): |
| (WebCore::HTMLObjectElement::renderFallbackContent): |
| * html/HTMLOptGroupElement.cpp: |
| (WebCore::HTMLOptGroupElement::parseAttribute): |
| * html/HTMLOptionElement.cpp: |
| (WebCore::HTMLOptionElement::parseAttribute): |
| (WebCore::HTMLOptionElement::setSelectedState): |
| * html/HTMLPlugInElement.cpp: |
| (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot): |
| * html/HTMLPlugInImageElement.cpp: |
| (WebCore::HTMLPlugInImageElement::setDisplayState): |
| (WebCore::HTMLPlugInImageElement::willRecalcStyle): |
| (WebCore::HTMLPlugInImageElement::finishParsingChildren): |
| (WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension): |
| (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): |
| (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn): |
| * html/HTMLProgressElement.cpp: |
| (WebCore::HTMLProgressElement::didElementStateChange): |
| * html/HTMLSelectElement.cpp: |
| (WebCore::HTMLSelectElement::parseAttribute): |
| (WebCore::HTMLSelectElement::setRecalcListItems): |
| (WebCore::HTMLSelectElement::parseMultipleAttribute): |
| (WebCore::HTMLSelectElement::reset): |
| * html/HTMLTableElement.cpp: |
| (WebCore::isTableCellAncestor): |
| (WebCore::setTableCellsChanged): |
| (WebCore::HTMLTableElement::parseAttribute): |
| * html/HTMLTextAreaElement.cpp: |
| (WebCore::HTMLTextAreaElement::setValueCommon): |
| * html/HTMLTextFormControlElement.cpp: |
| (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility): |
| * html/InputType.cpp: |
| (WebCore::InputType::setValue): |
| * html/NumberInputType.cpp: |
| (WebCore::NumberInputType::minOrMaxAttributeChanged): |
| * html/TextFieldInputType.cpp: |
| (WebCore::TextFieldInputType::subtreeHasChanged): |
| * mathml/MathMLElement.cpp: |
| (WebCore::MathMLElement::parseAttribute): |
| * mathml/MathMLSelectElement.cpp: |
| (WebCore::MathMLSelectElement::updateSelectedChild): |
| * page/animation/AnimationBase.cpp: |
| (WebCore::AnimationBase::setNeedsStyleRecalc): |
| * page/animation/AnimationController.cpp: |
| (WebCore::AnimationControllerPrivate::clear): |
| (WebCore::AnimationControllerPrivate::updateAnimations): |
| (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): |
| (WebCore::AnimationControllerPrivate::pauseAnimationAtTime): |
| (WebCore::AnimationControllerPrivate::pauseTransitionAtTime): |
| (WebCore::AnimationController::cancelAnimations): |
| * rendering/RenderImage.cpp: |
| (WebCore::RenderImage::imageChanged): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::calculateClipRects): |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::attachRootLayer): |
| (WebCore::RenderLayerCompositor::detachRootLayer): |
| (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::updateDragState): |
| * rendering/svg/SVGResourcesCache.cpp: |
| (WebCore::SVGResourcesCache::clientStyleChanged): |
| * style/AttributeChangeInvalidation.cpp: |
| (WebCore::Style::AttributeChangeInvalidation::invalidateStyle): |
| * style/ClassChangeInvalidation.cpp: |
| (WebCore::Style::ClassChangeInvalidation::invalidateStyle): |
| * style/IdChangeInvalidation.cpp: |
| (WebCore::Style::IdChangeInvalidation::invalidateStyle): |
| * style/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::updateElementRenderer): |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::updateActiveStyleSheets): |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::resetStyleForNonRenderedDescendants): |
| (WebCore::Style::TreeResolver::resolveElement): |
| (WebCore::Style::TreeResolver::createAnimatedElementUpdate): |
| (WebCore::Style::TreeResolver::popParent): |
| (WebCore::Style::clearNeedsStyleResolution): |
| (WebCore::Style::TreeResolver::resolveComposedTree): |
| * style/StyleUpdate.h: |
| * style/StyleValidity.h: Added. |
| |
| StyleChangeType enum splits into Style::Validity and Style::InvalidationMode. |
| Move to a file of its own. |
| |
| * svg/SVGAElement.cpp: |
| (WebCore::SVGAElement::svgAttributeChanged): |
| * svg/SVGAnimateElementBase.cpp: |
| (WebCore::applyCSSPropertyToTarget): |
| (WebCore::removeCSSPropertyFromTarget): |
| * svg/SVGElement.cpp: |
| (WebCore::SVGElement::willRecalcStyle): |
| * svg/SVGElement.h: |
| (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle): |
| * svg/SVGTests.cpp: |
| (WebCore::SVGTests::handleAttributeChange): |
| * svg/SVGUseElement.cpp: |
| (WebCore::SVGUseElement::invalidateShadowTree): |
| * testing/Internals.cpp: |
| (WebCore::styleValidityToToString): |
| (WebCore::Internals::styleChangeType): |
| (WebCore::styleChangeTypeToString): Deleted. |
| |
| 2016-10-17 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-grid] Constrain by min|max-height on auto repeat computation |
| https://bugs.webkit.org/show_bug.cgi?id=163540 |
| |
| Reviewed by Darin Adler. |
| |
| The max-height (if definite) is used to compute the number of auto repeat rows whenever the |
| height is indefinite. We were using the min-height only in case both values were indefinite. |
| |
| Although not explicitly mentioned by grid specs, it's reasonable to assume that |
| the min-height trumps the used value of height/max-height like it always does, per CSS |
| 2.2. Note that the number of rows still needs to fit within that size even if using |
| min-height, because we're just using min-height to compute the used value of the height |
| property. If both height and max-height are indefinite we keep doing the same, i.e., compute |
| the minimum number of rows that fulfill min-height (if definite). |
| |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::computeAutoRepeatTracksCount): |
| |
| 2016-10-17 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [DOMJIT] Use NativeCallFrameTracer for operations used for DOMJIT slow calls |
| https://bugs.webkit.org/show_bug.cgi?id=163586 |
| |
| Reviewed by Saam Barati. |
| |
| * domjit/JSNodeDOMJIT.cpp: |
| (WebCore::toWrapperSlow): |
| |
| 2016-10-18 Ryuan Choi <ryuan.choi@navercorp.com> |
| |
| [EFL] Build break since r207442 |
| https://bugs.webkit.org/show_bug.cgi?id=163587 |
| |
| Unreviewed. |
| |
| Since r207442, setRGB is moved to private. |
| |
| * rendering/RenderThemeEfl.cpp: |
| (WebCore::fillColorsFromEdjeClass): |
| |
| 2016-10-17 Dean Jackson <dino@apple.com> |
| |
| Remove dependency cycle with UIKit |
| https://bugs.webkit.org/show_bug.cgi?id=163577 |
| <rdar://problem/28786160> |
| |
| Reviewed by Tim Horton. |
| |
| Soft link against UIKit. |
| |
| * Configurations/WebCoreTestSupport.xcconfig: |
| * testing/Internals.mm: |
| |
| 2016-10-17 Dean Jackson <dino@apple.com> |
| |
| Allow creation of ExtendedColors and make Color immutable |
| https://bugs.webkit.org/show_bug.cgi?id=163557 |
| <rdar://problem/28805360> |
| |
| Reviewed by Darin Adler and Dave Hyatt. |
| |
| 1. Support the creation of ExtendedColor objects via the |
| Color class. |
| |
| 2. Fix the remaining few places where a Color object is |
| modified after creation, instead creating a new Color. |
| Move all the mutation methods into the private section, |
| making Color now immutable. |
| |
| Changes to Color are covered by existing tests. Changes |
| to ExtendedColor are covered by the ExtendedColor API test. |
| |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::fastParseColor): Return a new named Color. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::resetActiveLinkColor): Set to be the named "red" color. |
| |
| * html/HTMLElement.cpp: |
| (WebCore::HTMLElement::addHTMLColorToStyle): Use the string-based constructor |
| where possible. |
| |
| * page/CaptionUserPreferencesMediaAF.cpp: |
| (WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS): No need to |
| use the string "black" here - we have a constant value. |
| |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: Don't use setRGB. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::findNamedColor): Move this up in the file. |
| (WebCore::Color::Color): Copy in the code from setNamedColor. Also |
| add a constructor for ExtendedColor. |
| (WebCore::Color::serialized): Call ExtendedColor's serializer if necessary. |
| (WebCore::Color::cssText): Ditto. |
| (WebCore::Color::setNamedColor): Deleted. |
| (WebCore::Color::tagAsExtended): Deleted. |
| |
| * platform/graphics/Color.h: Add a new constructor. |
| (WebCore::Color::setRGB): Move to private. |
| |
| * platform/graphics/ExtendedColor.cpp: |
| (WebCore::ExtendedColor::cssText): Implement serializer. |
| * platform/graphics/ExtendedColor.h: |
| |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::colorIncludingFallback): Construct a new Color rather than changing an existing object. |
| |
| 2016-10-17 Simon Fraser <simon.fraser@apple.com> |
| |
| Implement DOMRect/DOMRectReadOnly |
| https://bugs.webkit.org/show_bug.cgi?id=163464 |
| |
| Reviewed by Darin Adler. |
| |
| Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in |
| https://dev.w3.org/fxtf/geometry/ |
| |
| DOMRects allow negative height/width and require double storage, so we can't just |
| use FloatRect for storage. They also require handling of NaN and Infinity. |
| |
| To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use |
| custom min/max functions that return NaN if either argument is NaN, so add |
| nanPropagatingMin/nanPropagatingMax helpers to MathExtras.h. |
| |
| Test: fast/dom/domrect.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/DOMRect.h: Added. |
| (WebCore::DOMRect::create): |
| (WebCore::DOMRect::fromRect): |
| (WebCore::DOMRect::setX): |
| (WebCore::DOMRect::setY): |
| (WebCore::DOMRect::setWidth): |
| (WebCore::DOMRect::setHeight): |
| (WebCore::DOMRect::DOMRect): |
| * dom/DOMRect.idl: Added. |
| * dom/DOMRectInit.h: Added. |
| * dom/DOMRectInit.idl: Added. |
| * dom/DOMRectReadOnly.h: Added. |
| (WebCore::DOMRectReadOnly::create): |
| (WebCore::DOMRectReadOnly::fromRect): |
| (WebCore::DOMRectReadOnly::x): |
| (WebCore::DOMRectReadOnly::y): |
| (WebCore::DOMRectReadOnly::width): |
| (WebCore::DOMRectReadOnly::height): |
| (WebCore::DOMRectReadOnly::top): |
| (WebCore::DOMRectReadOnly::right): |
| (WebCore::DOMRectReadOnly::bottom): |
| (WebCore::DOMRectReadOnly::left): |
| (WebCore::DOMRectReadOnly::DOMRectReadOnly): |
| * dom/DOMRectReadOnly.idl: Added. |
| |
| 2016-10-17 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Basic MediaController |
| https://bugs.webkit.org/show_bug.cgi?id=163539 |
| <rdar://problem/28797542> |
| |
| Reviewed by Darin Adler. |
| |
| We add a new main.js file which acts as the entry point by implementing the createControls() |
| function that HTMLMediaElement::ensureMediaControlsInjectedScript() once the shadow root has |
| been created. That functions creates an instance of the new MediaController class, which is |
| the controller object that will handle communication between the media controls and the media |
| element. At first, this MediaController class is very limited and assumes macOS inline |
| layout traits and forces a start button to be shown over the media, which can be played |
| to start the media and show the full controls. More functionality will be added by future patches. |
| |
| Tests: media/modern-media-controls/media-controller/media-controller-click-to-start.html |
| media/modern-media-controls/media-controller/media-controller-constructor.html |
| media/modern-media-controls/media-controller/media-controller-resize.html |
| |
| * Modules/modern-media-controls/main.js: Added. |
| (createControls): |
| * Modules/modern-media-controls/media/media-controller.js: Added. |
| (MediaController): |
| (MediaController.prototype.set pageScaleFactor): |
| (MediaController.prototype.set usesLTRUserInterfaceLayoutDirection): |
| (MediaController.prototype.handleEvent): |
| (MediaController.prototype.buttonWasClicked): |
| (MediaController.prototype._updateControlsSize): |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::mediaControlsStyleSheet): |
| (WebCore::RenderThemeMac::mediaControlsScript): |
| |
| 2016-10-17 Anders Carlsson <andersca@apple.com> |
| |
| Remove an unused HistoryItem function |
| https://bugs.webkit.org/show_bug.cgi?id=163565 |
| |
| Reviewed by Tim Horton. |
| |
| * history/HistoryItem.cpp: |
| (WebCore::HistoryItem::isAncestorOf): Deleted. |
| * history/HistoryItem.h: |
| |
| 2016-10-17 Nan Wang <n_wang@apple.com> |
| |
| AX: [Mac] mapping for output elements |
| https://bugs.webkit.org/show_bug.cgi?id=163471 |
| |
| Reviewed by Chris Fleizach. |
| |
| Mapped the output element to status role and exposed its text content |
| as AXTitle. |
| |
| Test: accessibility/mac/output-element.html |
| |
| * English.lproj/Localizable.strings: |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::visibleText): |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::isOutput): |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::determineAccessibilityRole): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper roleDescription]): |
| * platform/LocalizedStrings.cpp: |
| (WebCore::AXOutputText): |
| * platform/LocalizedStrings.h: |
| * platform/efl/LocalizedStringsEfl.cpp: |
| (WebCore::AXOutputText): |
| * platform/gtk/LocalizedStringsGtk.cpp: |
| (WebCore::AXOutputText): |
| |
| 2016-10-17 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [DOMJIT] Use DOMJIT::Patchpoint in IC |
| https://bugs.webkit.org/show_bug.cgi?id=163223 |
| |
| Reviewed by Saam Barati. |
| |
| Make DOMJITPatchpointParams non-const. |
| |
| * domjit/DOMJITHelpers.h: |
| (WebCore::DOMJITHelpers::toWrapper): |
| * domjit/JSNodeDOMJIT.cpp: |
| (WebCore::createCallDOMForOffsetAccess): |
| (WebCore::checkNode): |
| (WebCore::NodeNodeTypeDOMJIT::callDOM): |
| |
| 2016-10-17 Chris Dumez <cdumez@apple.com> |
| |
| Move form.reportValidity() behind InteractiveFormValidation setting |
| https://bugs.webkit.org/show_bug.cgi?id=163550 |
| |
| Reviewed by Darin Adler. |
| |
| Move form.reportValidity() behind InteractiveFormValidation setting for consistency |
| given that the two features are strongly related. |
| |
| Also enable the setting by default so we can get feedback on the implementation. |
| |
| Demos: |
| - Interactive form validation: http://jsfiddle.net/tj_vantoll/HdSqt/ |
| - Report validity: https://googlechrome.github.io/samples/report-validity/ |
| |
| * bindings/generic/RuntimeEnabledFeatures.h: |
| (WebCore::RuntimeEnabledFeatures::setInteractiveFormValidationEnabled): |
| (WebCore::RuntimeEnabledFeatures::interactiveFormValidationEnabled): |
| * html/HTMLButtonElement.idl: |
| * html/HTMLFieldSetElement.idl: |
| * html/HTMLFormElement.idl: |
| * html/HTMLInputElement.idl: |
| * html/HTMLKeygenElement.idl: |
| * html/HTMLObjectElement.idl: |
| * html/HTMLOutputElement.idl: |
| * html/HTMLSelectElement.idl: |
| * html/HTMLTextAreaElement.idl: |
| |
| 2016-10-17 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Add a MediaControlsHost API to retrieve images as base64 |
| https://bugs.webkit.org/show_bug.cgi?id=163502 |
| <rdar://problem/28792017> |
| |
| Reviewed by Darin Adler. |
| |
| Add a new `base64StringForIconAndPlatform()` method to MediaControlsHost such that we |
| may load images from the modern-media-controls directory in the WebCore.framework bundle. |
| We use this new method in the iconService singleton when a `mediaControlsHost` is set, |
| which will be set in a later patch. |
| |
| * Modules/mediacontrols/MediaControlsHost.cpp: |
| (WebCore::MediaControlsHost::base64StringForIconAndPlatform): |
| * Modules/mediacontrols/MediaControlsHost.h: |
| * Modules/mediacontrols/MediaControlsHost.idl: |
| * Modules/modern-media-controls/controls/icon-service.js: |
| (const.iconService.new.IconService.prototype.urlForIconNameAndLayoutTraits): |
| (const.iconService.new.IconService): |
| * rendering/RenderTheme.h: |
| (WebCore::RenderTheme::mediaControlsBase64StringForIconAndPlatform): |
| (WebCore::RenderTheme::mediaControlsScript): Deleted. |
| * rendering/RenderThemeMac.h: |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::mediaControlsBase64StringForIconAndPlatform): |
| |
| 2016-10-17 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Add a MediaControlsHost API to retrieve the shadow root CSS |
| https://bugs.webkit.org/show_bug.cgi?id=163501 |
| <rdar://problem/28792014> |
| |
| Reviewed by Darin Adler. |
| |
| Add a new `shadowRootCSSText` property to MediaControlsHost so that we may obtain the |
| concatenated CSS sources for the media controls shadow root via JS. Actually using this |
| API will be done in a later patch. We also no longer inject those styles as a user-agent |
| stylesheet when the runtime flag is on since it will no longer be necessary. |
| |
| * Modules/mediacontrols/MediaControlsHost.cpp: |
| (WebCore::MediaControlsHost::shadowRootCSSText): |
| * Modules/mediacontrols/MediaControlsHost.h: |
| * Modules/mediacontrols/MediaControlsHost.idl: |
| * css/CSSDefaultStyleSheets.cpp: |
| (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement): |
| |
| 2016-10-17 Simon Fraser <simon.fraser@apple.com> |
| |
| Implement DOMPoint/DOMPointReadOnly |
| https://bugs.webkit.org/show_bug.cgi?id=133916 |
| |
| Reviewed by Darin Adler. |
| |
| Patch mostly by Dirk Schultz <krit@webkit.org>. |
| |
| Implement DOMPoint/DOMPointReadOnly following https://drafts.fxtf.org/geometry/ |
| (although we may need to match https://www.w3.org/TR/geometry-1/ to be compatible |
| with Chrome). |
| |
| Test: geometry/DOMPoint-001.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/DOMPoint.h: Added. |
| * dom/DOMPoint.idl: Added. |
| * dom/DOMPointInit.h: Added. |
| * dom/DOMPointInit.idl: Added. |
| * dom/DOMPointReadOnly.h: Added. |
| (WebCore::DOMPointReadOnly::create): |
| (WebCore::DOMPointReadOnly::fromPoint): |
| (WebCore::DOMPointReadOnly::x): |
| (WebCore::DOMPointReadOnly::y): |
| (WebCore::DOMPointReadOnly::z): |
| (WebCore::DOMPointReadOnly::w): |
| (WebCore::DOMPointReadOnly::DOMPointReadOnly): |
| * dom/DOMPointReadOnly.idl: Added. |
| |
| 2016-10-17 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Use modern-media-controls module sources for media controls stylesheet and script injection |
| https://bugs.webkit.org/show_bug.cgi?id=163500 |
| <rdar://problem/28792010> |
| |
| Reviewed by Darin Adler. |
| |
| Add files from the Modules/modern-media-controls directory to the Xcode project and add a copy phase |
| to copy those files with their directory stucture as a subdirectory of the WebCore.framework Resources |
| directory. |
| |
| Additionally, use the modern-media-controls Module CSS and JS files when concatenating the media controls |
| scripts and styles in RenderTheme when the runtime flag is on. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::mediaControlsStyleSheet): |
| (WebCore::RenderThemeMac::mediaControlsScript): |
| |
| 2016-10-17 Simon Fraser <simon.fraser@apple.com> |
| |
| Fix typo in error message. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateSerializerFunction): |
| |
| 2016-10-17 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| preprocessor.pm: cl.exe outputs processing filenames if Windows Perl is used |
| https://bugs.webkit.org/show_bug.cgi?id=163435 |
| |
| Reviewed by Alex Christensen. |
| |
| cl.exe outputs processing filenames to stderr. Suppress this |
| annoying messages by using open3 instead of open2. |
| |
| * bindings/scripts/preprocessor.pm: |
| (applyPreprocessor): Use open3 in case of Windows Perl. |
| |
| 2016-10-17 Mark Lam <mark.lam@apple.com> |
| |
| Use the reject() helper function for conditionally throwing TypeErrors. |
| https://bugs.webkit.org/show_bug.cgi?id=163491 |
| |
| Reviewed by Filip Pizlo. |
| |
| No new tests because this patch does not introduce new behavior. |
| |
| * bindings/js/JSCryptoAlgorithmDictionary.cpp: |
| (WebCore::createRsaKeyGenParams): |
| * bindings/js/JSIDBDatabaseCustom.cpp: |
| (WebCore::JSIDBDatabase::createObjectStore): |
| * bridge/c/c_instance.cpp: |
| (JSC::Bindings::CInstance::invokeMethod): |
| |
| 2016-10-17 Miguel Gomez <magomez@igalia.com> |
| |
| [GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivateGStreamerBase::repaint |
| https://bugs.webkit.org/show_bug.cgi?id=163511 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Perform the video repaint in the main thread when accelerated compositing is disabled. |
| |
| Covered by existent tests. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): |
| (WebCore::MediaPlayerPrivateGStreamerBase::repaint): |
| (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: |
| |
| 2016-10-17 Konstantin Tokarev <annulen@yandex.ru> |
| |
| Eleminate code duplication between ResourceRequest encoding/decoding implementations |
| https://bugs.webkit.org/show_bug.cgi?id=163507 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| ResourceRequestBase::encodeWithoutPlatformData() and Soup implementation of |
| ArgumentCoder<ResourceRequest>::encodePlatformData() share most of the code, |
| ditto for decoding implementations. |
| |
| No new tests needed. |
| |
| * platform/network/ResourceRequestBase.h: |
| (WebCore::ResourceRequestBase::encodeBase): |
| (WebCore::ResourceRequestBase::decodeBase): |
| (WebCore::ResourceRequestBase::encodeWithoutPlatformData): |
| (WebCore::ResourceRequestBase::decodeWithoutPlatformData): |
| * platform/network/soup/ResourceRequest.h: |
| (WebCore::ResourceRequest::encodeWithPlatformData): |
| (WebCore::ResourceRequest::decodeWithPlatformData): |
| |
| 2016-10-17 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| Move user agent quirks to cross-platform location |
| https://bugs.webkit.org/show_bug.cgi?id=163508 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Tested by Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp. |
| |
| * PlatformGTK.cmake: |
| * platform/UserAgent.h: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.h. |
| * platform/UserAgentQuirks.cpp: Added. Moved from UserAgentGtk.cpp. |
| (WebCore::urlRequiresChromeBrowser): Sneakily tighten up Google domain detection, it should |
| only apply to sites if the base domain matches google.*, not any base domain that starts |
| with google. |
| (WebCore::urlRequiresMacintoshPlatform): |
| (WebCore::UserAgentQuirks::quirksForURL): |
| (WebCore::UserAgentQuirks::stringForQuirk): |
| * platform/UserAgentQuirks.h: Moved from UserAgentGtk.cpp. prepare-ChangeLog thinks it was |
| renamed from Source/WebCore/platform/efl/UserAgentEfl.h, but prepare-ChangeLog is dumb. |
| (WebCore::UserAgentQuirks::UserAgentQuirks): |
| (WebCore::UserAgentQuirks::add): |
| (WebCore::UserAgentQuirks::contains): |
| (WebCore::UserAgentQuirks::isEmpty): |
| * platform/efl/UserAgentEfl.cpp: |
| (WebCore::standardUserAgentForURL): |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::buildUserAgentString): |
| (WebCore::standardUserAgentForURL): |
| (): Deleted. |
| (WebCore::UserAgentQuirks::UserAgentQuirks): Deleted. |
| (WebCore::UserAgentQuirks::add): Deleted. |
| (WebCore::UserAgentQuirks::contains): Deleted. |
| (WebCore::UserAgentQuirks::isEmpty): Deleted. |
| (WebCore::urlRequiresChromeBrowser): Deleted. |
| (WebCore::urlRequiresMacintoshPlatform): Deleted. |
| |
| 2016-10-17 Alberto Garcia <berto@igalia.com> |
| |
| [GTK] gobject-introspection on package build with webkit2gtk fails without active X session |
| https://bugs.webkit.org/show_bug.cgi?id=163105 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Don't call XCompositeQueryExtension() or XDamageQueryExtension() |
| if m_display is NULL. |
| |
| * platform/graphics/x11/PlatformDisplayX11.cpp: |
| (WebCore::PlatformDisplayX11::supportsXComposite): |
| (WebCore::PlatformDisplayX11::supportsXDamage): |
| |
| 2016-10-16 Nan Wang <n_wang@apple.com> |
| |
| AX: [Mac] roleDescription for AXTextField input types |
| https://bugs.webkit.org/show_bug.cgi?id=163419 |
| <rdar://problem/28766192> |
| |
| Reviewed by Darin Adler. |
| |
| Provided more detailed role description for input types that |
| exposed as standard text fields on the mac. |
| |
| Changes are covered in modified test expectation. |
| |
| * English.lproj/Localizable.strings: |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper roleDescription]): |
| * platform/LocalizedStrings.cpp: |
| (WebCore::AXEmailFieldText): |
| (WebCore::AXTelephoneFieldText): |
| (WebCore::AXURLFieldText): |
| (WebCore::AXDateFieldText): |
| (WebCore::AXTimeFieldText): |
| * platform/LocalizedStrings.h: |
| * platform/efl/LocalizedStringsEfl.cpp: |
| (WebCore::AXEmailFieldText): |
| (WebCore::AXTelephoneFieldText): |
| (WebCore::AXURLFieldText): |
| (WebCore::AXDateFieldText): |
| (WebCore::AXTimeFieldText): |
| * platform/gtk/LocalizedStringsGtk.cpp: |
| (WebCore::AXEmailFieldText): |
| (WebCore::AXTelephoneFieldText): |
| (WebCore::AXURLFieldText): |
| (WebCore::AXDateFieldText): |
| (WebCore::AXTimeFieldText): |
| |
| 2016-10-16 Chris Dumez <cdumez@apple.com> |
| |
| Update WebKit localizable strings |
| https://bugs.webkit.org/show_bug.cgi?id=163513 |
| |
| Reviewed by Dan Bernstein. |
| |
| Update WebKit localizable strings as it was missing the "too short" one needed |
| by form validation. This was causing a "Localized string not found" message to |
| be shown when testing the following sample on WebKit ToT: |
| - https://googlechrome.github.io/samples/report-validity/ |
| |
| * English.lproj/Localizable.strings: |
| |
| 2016-10-16 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r206750): Crash when pressing Caps Lock if “Use the Caps Lock key to switch to and from U.S.” is selected in Input Sources preferences |
| https://bugs.webkit.org/show_bug.cgi?id=163506 |
| <rdar://problem/28792483> |
| |
| Reviewed by Darin Adler. |
| |
| As per the NSEvent documentation [1], calling [NSEvent characters] is only |
| valid on key up / key down events and will raise an NSInternalInconsistencyException |
| if accessed on any other kind of event object. The crash happens when keyForKeyEvent() |
| is called with the third kind of key event (NSFlagsChanged) which is used for |
| detecting modifier keys. We normally detect the modifier key and return early before |
| calling [NSEvent characters]. However, in some rare cases, we fail to detect the |
| modifier key and we fall through. |
| |
| To address the issue, we now return "Unidentified" for NSFlagsChanged events, if we |
| fail to detect the modifier key and before calling [NSEvent characters]. |
| |
| [1] https://developer.apple.com/reference/appkit/nsevent/1534183-characters |
| |
| No new test, not easily testable. |
| |
| * platform/mac/PlatformEventFactoryMac.mm: |
| (WebCore::keyForKeyEvent): |
| |
| 2016-10-16 Darin Adler <darin@apple.com> |
| |
| Move CSS classes from ExceptionCode to Exception |
| https://bugs.webkit.org/show_bug.cgi?id=163494 |
| |
| Reviewed by Sam Weinig. |
| |
| Removed the "get" prefix from the names of many CSSPrimitiveValue |
| functions to match WebKit coding style and to disambiguate them |
| from the public CSS DOM functions that raise exceptions. |
| |
| * bindings/js/JSCSSStyleDeclarationCustom.cpp: |
| (WebCore::propertyNamePrefix): Use enum class. |
| (WebCore::parseJavaScriptCSSPropertyName): Tweak style a bit. |
| (WebCore::stylePropertyGetter): Refactor to simplify structure. |
| (WebCore::stylePropertyGetterPixelOrPosPrefix): Ditto. Also use floatValue. |
| (WebCore::JSCSSStyleDeclaration::putDelegate): Use findIgnoringASCIICase, |
| and use propagateException to handle ExcpetionOr. |
| (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Tweak style a bit. |
| (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Use a lambda to |
| initialize a global here. |
| |
| * bindings/js/JSDOMBinding.h: Added toJSString to support bindings for |
| functions returning ExceptionOr<String>. |
| |
| * bindings/scripts/gobject-generate-headers.pl: Deleted. |
| |
| * css/BasicShapeFunctions.cpp: |
| (WebCore::convertToLengthSize): Use pairValue. |
| (WebCore::convertToCenterCoordinate): Use valueID and pairValue. |
| (WebCore::cssValueToBasicShapeRadius): Ditto. |
| * css/CSSBasicShapes.cpp: |
| (WebCore::serializePositionOffset): Ditto. |
| (WebCore::buildSerializablePositionOffset): Ditto. |
| (WebCore::CSSBasicShapeCircle::cssText): Ditto. |
| (WebCore::CSSBasicShapeEllipse::cssText): Ditto. |
| (WebCore::updateCornerRadiusWidthAndHeight): Ditto. |
| * css/CSSBorderImageSliceValue.h: Use quadValue. |
| * css/CSSCalculationValue.cpp: |
| (WebCore::determineCategory): Use floatValue and doubleValue. |
| |
| * css/CSSCharsetRule.h: Use ExceptionOr. Also made more things private. |
| * css/CSSCharsetRule.idl: Use non-legacy exceptions. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::CSSComputedStyleDeclaration::setCssText): Use ExceptionOr. |
| (WebCore::ComputedStyleExtractor::propertyMatches): Use valueID. |
| (WebCore::CSSComputedStyleDeclaration::setProperty): Use ExceptionOr. |
| (WebCore::CSSComputedStyleDeclaration::removeProperty): Ditto. |
| (WebCore::CSSComputedStyleDeclaration::setPropertyInternal): Ditto. |
| (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): Return |
| a Ref instead of a RefPtr. |
| * css/CSSComputedStyleDeclaration.h: Updated for above changes. |
| |
| * css/CSSCrossfadeValue.cpp: |
| (WebCore::CSSCrossfadeValue::fixedSize): Use floatValue. |
| (WebCore::CSSCrossfadeValue::image): Ditto. |
| (WebCore::CSSCrossfadeValue::blend): Use doubleValue. |
| |
| * css/CSSFontFace.cpp: |
| (WebCore::CSSFontFace::calculateStyleMask): Use valueID. |
| (WebCore::CSSFontFace::calculateWeightMask): Ditto. |
| * css/CSSFontFaceSet.cpp: |
| (WebCore::CSSFontFaceSet::familyNameFromPrimitive): Ditto. |
| (WebCore::CSSFontFaceSet::matchingFaces): Use ExceptoinOr. |
| (WebCore::CSSFontFaceSet::check): Ditto. |
| * css/CSSFontFaceSet.h: Updated for above changes. |
| |
| * css/CSSGradientValue.cpp: |
| (WebCore::compareStops): Use doubleValue. |
| (WebCore::CSSGradientValue::addStops): Use floatValue. |
| (WebCore::positionFromValue): Use floatValue and valudID. |
| (WebCore::CSSLinearGradientValue::customCSSText): Use doubleValue and valueID. |
| (WebCore::CSSLinearGradientValue::createGradient): Use floatValue and valueID. |
| (WebCore::CSSRadialGradientValue::customCSSText): Use doubleValue and valueID. |
| (WebCore::CSSRadialGradientValue::resolveRadius): Use floatValue. |
| (WebCore::CSSRadialGradientValue::createGradient): Use valueID. |
| |
| * css/CSSGroupingRule.cpp: |
| (WebCore::CSSGroupingRule::insertRule): Use ExceptionOr. |
| (WebCore::CSSGroupingRule::deleteRule): Ditto. |
| * css/CSSGroupingRule.h: Updated for above changes. |
| |
| * css/CSSImageGeneratorValue.cpp: |
| (WebCore::CSSImageGeneratorValue::subimageIsPending): Use valueID. |
| (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto. |
| |
| * css/CSSImageSetValue.cpp: |
| (WebCore::CSSImageSetValue::fillImageSet): Use floatValue. |
| |
| * css/CSSMediaRule.idl: Use non-legacy exceptions. |
| |
| * css/CSSPrimitiveValue.cpp: |
| (WebCore::CSSPrimitiveValue::computeDegrees): Use doubleValue. |
| (WebCore::CSSPrimitiveValue::setFloatValue): Use ExceptionOr. |
| (WebCore::CSSPrimitiveValue::getFloatValue): Replaced getDoubleValue with this, |
| since getDoubleValue is unused, moving the call to clampTo into this function. |
| Also changed this to use ExceptionOr. |
| (WebCore::CSSPrimitiveValue::doubleValue): Renamed from getDoubleValue. |
| (WebCore::CSSPrimitiveValue::doubleValueInternal): Use Optional instead of a bool |
| and an out argument to return the value and check for type failure. |
| (WebCore::CSSPrimitiveValue::setStringValue): Use ExceptionOr. |
| (WebCore::CSSPrimitiveValue::getStringValue): Ditto. |
| (WebCore::CSSPrimitiveValue::stringValue): Renamed from getStringValue. |
| (WebCore::CSSPrimitiveValue::getCounterValue): Use ExceptionOr. |
| (WebCore::CSSPrimitiveValue::getRectValue): Use ExceptionOr. |
| (WebCore::CSSPrimitiveValue::getQuadValue): Deleted. |
| (WebCore::CSSPrimitiveValue::getLengthRepeatValue): Deleted. |
| (WebCore::CSSPrimitiveValue::getRGBColorValue): Use ExceptionOr. |
| (WebCore::CSSPrimitiveValue::getPairValue): Deleted. |
| (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Use new names for functions. |
| * css/CSSPrimitiveValue.h: Reorganized the class, moved large inline function bodies |
| out of the class definition. Updated for the above changes. |
| * css/CSSPrimitiveValue.idl: Use non-legacy exceptions. |
| |
| * css/CSSPrimitiveValueMappings.h: Use value instead of getValue, etc. |
| |
| * css/CSSRule.cpp: |
| (WebCore::CSSRule::setCssText): Use ExceptionOr. |
| * css/CSSRule.h: Updated for above change. |
| * css/CSSRule.idl: Use non-legacy exceptions. |
| |
| * css/CSSStyleDeclaration.h: Use ExceptionOr. |
| * css/CSSStyleDeclaration.idl: Use non-legacy exceptions. |
| |
| * css/CSSStyleSheet.cpp: |
| (WebCore::CSSStyleSheet::deprecatedInsertRule): Use ExceptionOr. |
| (WebCore::CSSStyleSheet::insertRule): Ditto. |
| (WebCore::CSSStyleSheet::deleteRule): Ditto. |
| (WebCore::CSSStyleSheet::addRule): Ditto. |
| * css/CSSStyleSheet.h: Updated for the above changes. |
| * css/CSSStyleSheet.idl: Use non-legacy exceptions. |
| |
| * css/CSSSupportsRule.idl: Use non-legacy exceptions. |
| |
| * css/CSSToStyleMap.cpp: |
| (WebCore::CSSToStyleMap::mapFillAttachment): Use valueID instead of getValueID, etc. |
| (WebCore::convertToLengthSize): Ditto. |
| (WebCore::CSSToStyleMap::mapFillSize): Ditto. |
| (WebCore::CSSToStyleMap::mapFillXPosition): Ditto. |
| (WebCore::CSSToStyleMap::mapFillYPosition): Ditto. |
| (WebCore::CSSToStyleMap::mapFillMaskSourceType): Ditto. |
| (WebCore::CSSToStyleMap::mapAnimationDirection): Ditto. |
| (WebCore::CSSToStyleMap::mapAnimationFillMode): Ditto. |
| (WebCore::CSSToStyleMap::mapAnimationIterationCount): Ditto. |
| (WebCore::CSSToStyleMap::mapAnimationName): Ditto. |
| (WebCore::CSSToStyleMap::mapAnimationPlayState): Ditto. |
| (WebCore::CSSToStyleMap::mapAnimationProperty): Ditto. |
| (WebCore::CSSToStyleMap::mapAnimationTimingFunction): Ditto. |
| (WebCore::CSSToStyleMap::mapAnimationTrigger): Ditto. |
| (WebCore::CSSToStyleMap::mapNinePieceImageSlice): Ditto. |
| (WebCore::CSSToStyleMap::mapNinePieceImageQuad): Ditto. |
| (WebCore::CSSToStyleMap::mapNinePieceImageRepeat): Ditto. |
| |
| * css/CSSValue.h: Use ExceptionOr. |
| * css/CSSValue.idl: Use non-legacy exceptions. |
| |
| * css/Counter.h: Use stringValue instead of getStringValue, etc. |
| |
| * css/FontFace.cpp: |
| (WebCore::FontFace::create): Use ExceptionOr. |
| (WebCore::FontFace::setFamily): Ditto. |
| (WebCore::FontFace::setStyle): Ditto. |
| (WebCore::FontFace::setWeight): Ditto. |
| (WebCore::FontFace::setStretch): Ditto. |
| (WebCore::FontFace::setUnicodeRange): Ditto. |
| (WebCore::FontFace::setVariant): Ditto. |
| (WebCore::FontFace::setFeatureSettings): Ditto. |
| * css/FontFace.h: Updated for above changes. |
| * css/FontFace.idl: Use non-legacy exceptions. |
| |
| * css/FontFaceSet.cpp: |
| (WebCore::FontFaceSet::load): Use ExceptionOr. |
| (WebCore::FontFaceSet::check): Ditto. |
| * css/FontFaceSet.h: Updated for above changes. |
| * css/FontFaceSet.idl: Use non-legacy exceptions. |
| |
| * css/FontVariantBuilder.cpp: |
| (WebCore::extractFontVariantLigatures): Use valueID instead of getValueID, etc. |
| (WebCore::extractFontVariantNumeric): Ditto. |
| (WebCore::extractFontVariantEastAsian): Ditto. |
| |
| * css/MediaList.cpp: |
| (WebCore::MediaList::setMediaText): Use ExceptionOr. |
| (WebCore::MediaList::deleteMedium): Ditto. |
| (WebCore::MediaList::appendMedium): Ditto. |
| * css/MediaList.h: Updated for above changes. |
| * css/MediaList.idl: Use non-legacy exceptions. |
| |
| * css/MediaQueryEvaluator.cpp: |
| (WebCore::doubleValue): Use valueID instead of getValueID, etc. |
| (WebCore::colorGamutEvaluate): Ditto. |
| (WebCore::invertedColorsEvaluate): Ditto. |
| (WebCore::orientationEvaluate): Ditto. |
| (WebCore::evaluateResolution): Ditto. |
| (WebCore::computeLength): Ditto. |
| (WebCore::viewModeEvaluate): Ditto. |
| (WebCore::hoverEvaluate): Ditto. |
| (WebCore::pointerEvaluate): Ditto. |
| (WebCore::prefersReducedMotionEvaluate): Ditto. |
| |
| * css/PropertySetCSSStyleDeclaration.cpp: |
| (WebCore::PropertySetCSSStyleDeclaration::setCssText): Use ExceptionOr. |
| (WebCore::PropertySetCSSStyleDeclaration::setProperty): Ditto. |
| (WebCore::PropertySetCSSStyleDeclaration::removeProperty): Ditto. |
| (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): Ditto. |
| (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): Ditto. |
| * css/PropertySetCSSStyleDeclaration.h: Updated for above changes. |
| Also marked a couple additional functions private. |
| |
| * css/StyleBuilderConverter.h: Use doubleValue instead of getDoubleValue, etc. |
| * css/StyleBuilderCustom.h: Ditto. |
| * css/StyleProperties.cpp: |
| (WebCore::StyleProperties::getLayeredShorthandValue): Ditto. |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::MatchResult::addMatchedProperties): Ditto. |
| (WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement): Ditto. |
| (WebCore::StyleResolver::colorFromPrimitiveValue): Ditto. |
| (WebCore::StyleResolver::createFilterOperations): Ditto. |
| * css/TransformFunctions.cpp: |
| (WebCore::transformsForValue): Ditto. |
| * css/ViewportStyleResolver.cpp: |
| (WebCore::ViewportStyleResolver::getViewportArgumentValue): Ditto. |
| |
| * css/WebKitCSSMatrix.cpp: |
| (WebCore::WebKitCSSMatrix::WebKitCSSMatrix): Tweaked constructors a bit, |
| getting rid of the one that uses an ExceptionCode. |
| (WebCore::WebKitCSSMatrix::create): Moved in here, and use ExceptionOr. |
| (WebCore::WebKitCSSMatrix::setMatrixValue): Use ExceptionOr. |
| (WebCore::WebKitCSSMatrix::multiply): Tweak coding style a bit. |
| (WebCore::WebKitCSSMatrix::inverse): Use ExceptionOr. |
| (WebCore::WebKitCSSMatrix::translate): Return a Ref instead of RefPtr. |
| (WebCore::WebKitCSSMatrix::scale): Ditto. |
| (WebCore::WebKitCSSMatrix::rotate): Ditto. |
| (WebCore::WebKitCSSMatrix::rotateAxisAngle): Ditto. |
| (WebCore::WebKitCSSMatrix::skewX): Ditto. |
| (WebCore::WebKitCSSMatrix::skewY): Ditto. |
| (WebCore::WebKitCSSMatrix::toString): Tweaked formatting a bit. |
| * css/WebKitCSSMatrix.h: Updated for above changes. |
| * css/WebKitCSSMatrix.idl: Use non-legacy extensions. |
| |
| * css/makeprop.pl: |
| (handleCurrentColorValue): Use valueID instead of getValueID. |
| (generateValueSetter): Ditto. |
| |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::parse4ValuesFillPosition): Use valueID instead of getValueID, etc. |
| (WebCore::CSSParser::parse3ValuesFillPosition): Ditto. |
| (WebCore::CSSParser::parseFillPosition): Ditto. |
| (WebCore::CSSParser::parseFillRepeat): Ditto. |
| (WebCore::CSSParser::parseGridPosition): Ditto. |
| (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Ditto. |
| (WebCore::isGridTrackFixedSized): Ditto. |
| (WebCore::CSSParser::parseRadialGradient): Ditto. |
| (WebCore::CSSParser::parseBuiltinFilterArguments): Ditto. |
| |
| * css/parser/CSSParserValues.cpp: |
| (WebCore::CSSParserValue::createCSSValue): Removed the unneeded call to |
| setPrimitiveType here. The createParserOperator returns an object that |
| already has the correct primitive type. |
| |
| * css/parser/CSSPropertyParser.cpp: Updated most cases of calling the old |
| getXXXValue functions, but not sure if it's right since it is commented out |
| code that I did not compile. |
| |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::clampRGBComponent): Use intValue instead of getIntValue, etc. |
| (WebCore::CSSPropertyParserHelpers::parseHSLParameters): Ditto. |
| (WebCore::CSSPropertyParserHelpers::isHorizontalPositionKeywordOnly): Ditto. |
| (WebCore::CSSPropertyParserHelpers::isVerticalPositionKeywordOnly): Ditto. |
| (WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues): Ditto. |
| (WebCore::CSSPropertyParserHelpers::consumeRadialGradient): Ditto. |
| |
| * dom/Range.cpp: Added now-needed include of ExceptionCode.h. |
| * dom/SelectorQuery.cpp: Ditto. |
| |
| * editing/ApplyStyleCommand.cpp: |
| (WebCore::toIdentifier): Use valueID instead of getValueID, etc. |
| (WebCore::ApplyStyleCommand::computedFontSize): Ditto. |
| * editing/EditingStyle.cpp: |
| (WebCore::identifierForStyleProperty): Ditto. |
| (WebCore::HTMLElementEquivalent::valueIsPresentInStyle): Ditto. |
| (WebCore::EditingStyle::extractFontSizeDelta): Ditto. |
| (WebCore::EditingStyle::textDirection): Ditto. |
| (WebCore::EditingStyle::prepareToApplyAt): Ditto. |
| (WebCore::EditingStyle::textDirectionForSelection): Ditto. |
| (WebCore::fontWeightIsBold): Ditto. |
| (WebCore::legacyFontSizeFromCSSValue): Ditto. |
| (WebCore::isTransparentColorValue): Ditto. |
| (WebCore::hasTransparentBackgroundColor): Ditto. |
| (WebCore::backgroundColorInEffect): Ditto. |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::applyEditingStyleToElement): Removed IGNORE_EXCEPTION; that is |
| what we do by default for things returning ExceptionOr. |
| * editing/RemoveCSSPropertyCommand.cpp: |
| (WebCore::RemoveCSSPropertyCommand::doApply): Ditto. |
| (WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto. |
| * editing/ReplaceSelectionCommand.cpp: |
| (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Ditto. |
| |
| * editing/cocoa/HTMLConverter.mm: |
| (floatValueFromPrimitiveValue): Use floatValue instead of getFloatValue, etc. |
| * editing/markup.cpp: |
| (WebCore::propertyMissingOrEqualToNone): Ditto. |
| |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::InspectorStyleSheet::addRule): Updated to call ExceptionOr-returning functions. |
| (WebCore::InspectorStyleSheet::deleteRule): Ditto. |
| (WebCore::InspectorStyleSheet::setStyleText): Ditto. |
| |
| * svg/SVGLength.cpp: |
| (WebCore::SVGLength::fromCSSPrimitiveValue): Use floatValue instead of getFloatValue. |
| |
| 2016-10-16 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Styles for StartButton are missing |
| https://bugs.webkit.org/show_bug.cgi?id=163499 |
| <rdar://problem/28792009> |
| |
| Reviewed by Darin Adler. |
| |
| Add styling for StartButton so that instances are always displayed in the center of their container. |
| |
| Test: media/modern-media-controls/start-button/start-button-styles.html |
| |
| * Modules/modern-media-controls/controls/start-button.css: Added. |
| (button.start): |
| (button.start > *): |
| (button.start > div): |
| (button.start > img): |
| (button.start:active > img): |
| |
| 2016-10-16 Simon Fraser <simon.fraser@apple.com> |
| |
| Implement serializer = { attribute } |
| https://bugs.webkit.org/show_bug.cgi?id=163466 |
| |
| Follow-up fix to die if "serializer {...}" lists an attribute not present |
| on the interface. I don't think this is testable with the current bindings tests. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateSerializerFunction): |
| |
| 2016-10-16 Simon Fraser <simon.fraser@apple.com> |
| |
| Add the "Geometry Interfaces" to features.json. |
| |
| * features.json: |
| |
| 2016-10-16 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Document request not updated after willSendRequest is called for a redirect |
| https://bugs.webkit.org/show_bug.cgi?id=163436 |
| |
| Reviewed by Michael Catanzaro. |
| |
| The first willSendRequest happens before DocumentLoader::startLoadingMainResource(), that calls setRequest, but |
| the second one happens after DocumentLoader::redirectReceived() and then the request is never updated again. |
| |
| Covered by GTK+ unit tests. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::willContinueMainResourceLoadAfterRedirect): Set the new request. |
| * loader/DocumentLoader.h: |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::willSendRequestInternal): Notify the document loader when loading the main resource |
| and called for a redirection. |
| |
| 2016-10-15 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Delete the animated image catchup code |
| https://bugs.webkit.org/show_bug.cgi?id=163410 |
| |
| Reviewed by Simon Fraser. |
| |
| This patch fixes two issues in the animated image workflow: |
| |
| 1) Setting the animation timer should follow the following rules: |
| |
| -- Initial case: Which happens before drawing the first frame. We |
| should set the timer to fire after the current_frame_duration. |
| |
| -- Late case (Slow animation): This happens if the current_time is |
| past the next_frame_desired_time. In this case we should fire the |
| timer immediately. |
| |
| -- Early case (Fast animation): This happens when there is still time |
| before the next_frame_desired_time. In this case we should set the |
| timer to fire after the difference between the next_frame_desired_time |
| and the current_time. |
| |
| 2) Deleting the code for catching up the current_frame: |
| |
| This code used to run in the slow animation case. It was never used |
| on iOS. It was trying to adjust the current_frame according to the |
| current_time as if there were no delay. It turned out that this might |
| cause a bigger delay because most likely the decoder decodes the image |
| frames incrementally; i.e. to decode frame k, it has to have frame |
| (k - 1) decoded. |
| |
| Test: fast/images/ordered-animated-image-frames.html |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::draw): Remove the iOS specific code. |
| (WebCore::BitmapImage::startAnimation): Move the animation finishing code from |
| BitmapImage::internalAdvanceAnimation() to this function. Simplify the timer |
| duration code as it is described above. |
| |
| (WebCore::BitmapImage::advanceAnimation): Merge BitmapImage::internalAdvanceAnimation() |
| into this function. |
| |
| (WebCore::BitmapImage::resetAnimation): |
| |
| (WebCore::BitmapImage::internalAdvanceAnimation): Deleted. |
| * platform/graphics/BitmapImage.h: |
| |
| * platform/graphics/Image.cpp: |
| (WebCore::Image::drawTiled): |
| * platform/graphics/Image.h: |
| (WebCore::Image::startAnimation): |
| * svg/graphics/SVGImage.cpp: |
| (WebCore::SVGImage::startAnimation): |
| * svg/graphics/SVGImage.h: |
| Remove the catchup code form the Image and SVGImage classes. |
| |
| 2016-10-15 Darin Adler <darin@apple.com> |
| |
| Move Web SQL database and WebSockets off legacy exceptions |
| https://bugs.webkit.org/show_bug.cgi?id=163284 |
| |
| Reviewed by Chris Dumez. |
| |
| * Modules/webdatabase/DOMWindowWebDatabase.cpp: |
| (WebCore::DOMWindowWebDatabase::openDatabase): Use ExceptionOr. |
| * Modules/webdatabase/DOMWindowWebDatabase.h: Update for above. |
| * Modules/webdatabase/DOMWindowWebDatabase.idl: Ditto. |
| |
| * Modules/webdatabase/SQLResultSet.cpp: |
| (WebCore::SQLResultSet::SQLResultSet): Move initialization of |
| many data members into the class definition. |
| (WebCore::SQLResultSet::insertId): Use ExceptionOr. |
| (WebCore::SQLResultSet::rowsAffected): Moved into class definition. |
| (WebCore::SQLResultSet::rows): Ditto. |
| (WebCore::SQLResultSet::setInsertId): Ditto. |
| (WebCore::SQLResultSet::setRowsAffected): Ditto. |
| |
| * Modules/webdatabase/SQLResultSet.h: Updated for above. |
| |
| * Modules/webdatabase/SQLResultSet.idl: Use non-legacy exceptions. |
| Added a FIXME about the mismatch between long and int64_t. |
| |
| * Modules/webdatabase/SQLStatement.cpp: |
| (WebCore::SQLStatement::execute): Use reference instead of pointer. |
| |
| * Modules/websockets/WebSocket.cpp: |
| (WebCore::isValidProtocolString): Use StringView. |
| (WebCore::WebSocket::subprotocolSeparator): Fixed capitalization and |
| spelling error in the name of this function. |
| (WebCore::WebSocket::WebSocket): Move initialization of many data |
| members into the class definition. |
| (WebCore::WebSocket::create): Use ExceptionOr. |
| (WebCore::WebSocket::connect): Ditto. |
| (WebCore::WebSocket::send): Ditto. |
| (WebCore::WebSocket::close): Ditto. |
| (WebCore::WebSocket::binaryType): Update to use enum class. |
| (WebCore::WebSocket::setBinaryType): Use ExecptionOr and update to |
| use enum class. |
| (WebCore::WebSocket::didReceiveBinaryData): Ditto. |
| |
| * Modules/websockets/WebSocket.h: Updated for above. Changed the |
| BinaryType enum into an enum class. |
| |
| * Modules/websockets/WebSocket.idl: Use non-legacy exceptions. |
| |
| * Modules/websockets/WebSocketHandshake.cpp: |
| (WebCore::WebSocketHandshake::checkResponseHeaders): |
| Updated for name change to subprotocolSeparator. |
| |
| * dom/ExceptionOr.h: Added a constructor for scalar types that does not |
| require an rvalue reference. We can refine this more later, but for now |
| this is sufficient to obviate the need for WTFMove where it otherwise would |
| have been needed in the code above. |
| |
| * inspector/InspectorDatabaseAgent.cpp: Use reference instead of pointer. |
| |
| * page/DOMWindow.idl: Touched this file to work around bugs in the dependency |
| analysis of the current CMake build system, since otherwise it doesn't process the |
| change to the partial interface WebSocket. Edited lots of comments, removed many |
| others, and tweaked formatting. |
| |
| 2016-10-14 Sam Weinig <sam@webkit.org> |
| |
| MessageEvent's source property should be a (DOMWindow or MessagePort)? rather than a EventTarget? |
| https://bugs.webkit.org/show_bug.cgi?id=163475 |
| |
| Reviewed by Simon Fraser. |
| |
| Start fleshing out union support, starting with MessageEvent. |
| - Simplify things a bit for now by requiring interface types to use RefPtr<T> as their type when |
| used in sequences and unions. We should revisit this later, and see if we can use Ref<T> where |
| possible, but it causes complications for dictionaries, since they want a Ref<T> uninitialized. |
| |
| * bindings/generic/IDLTypes.h: |
| Switch IDLInterface to use RefPtr<T> as its implementation type. |
| |
| * bindings/js/JSDOMConvert.h: |
| (WebCore::Detail::VariadicConverterBase::convert): |
| - Remove isJSDOMWrapperType() optimization. It was not correct, due to not being able to detect window |
| and window shell, and not always an optimization, e.g. in the case of a single interface. |
| - Switch from JSC::jsDynamicCast<WrapperType*>() to WrapperType::toWrapped() which can be faster and |
| handles window and window shell correctly. |
| - Also fix an issue where we would wrongly assert that one interface had to match. |
| |
| * bindings/js/JSDOMWrapper.h: |
| (WebCore::isJSDOMWrapperType): Deleted. |
| Remove unused predicate. |
| |
| * bindings/scripts/IDLParser.pm: |
| (parseType): |
| Add missing support for nullable unions. |
| |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/TestObj.idl: |
| Add new tests for unions (both non-null and nullable) in dictionaries. |
| |
| * dom/ContainerNode.cpp: |
| (WebCore::ContainerNode::append): |
| (WebCore::ContainerNode::prepend): |
| * dom/ContainerNode.h: |
| * dom/Node.cpp: |
| (WebCore::nodeSetPreTransformedFromNodeOrStringVector): |
| (WebCore::Node::convertNodesOrStringsIntoNode): |
| (WebCore::Node::before): |
| (WebCore::Node::after): |
| (WebCore::Node::replaceWith): |
| * dom/Node.h: |
| Add using declaration for NodeOrString and change it to use RefPtr<Node>. |
| |
| * bindings/js/JSMessageEventCustom.cpp: |
| (WebCore::handleInitMessageEvent): |
| * dom/MessageEvent.cpp: |
| (WebCore::MessageEvent::MessageEvent): |
| (WebCore::MessageEvent::create): |
| (WebCore::MessageEvent::initMessageEvent): |
| (WebCore::MessageEvent::source): |
| (WebCore::isValidSource): Deleted. |
| * dom/MessageEvent.h: |
| * dom/MessageEvent.idl: |
| * page/DOMWindow.cpp: |
| (WebCore::PostMessageTimer::event): |
| Change MessageEvent's source to be a std::experimental::variant<RefPtr<DOMWindow>, RefPtr<MessagePort>>. |
| For now, we only enforce this on setting, and leave the getter a EventTarget?, but that should not be |
| observable, and will rectified in subsequent patches. |
| |
| 2016-10-15 Chris Dumez <cdumez@apple.com> |
| |
| Add support for reportValidity() on form and form control elements |
| https://bugs.webkit.org/show_bug.cgi?id=163479 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for reportValidity() on form and form control elements: |
| - https://html.spec.whatwg.org/#dom-form-reportvalidity |
| - https://html.spec.whatwg.org/#dom-cva-reportvalidity |
| |
| Firefox and Chrome already support this. |
| |
| Demo: https://googlechrome.github.io/samples/report-validity/ |
| |
| No new tests, rebaselined existing tests. |
| |
| * html/HTMLButtonElement.idl: |
| * html/HTMLFieldSetElement.idl: |
| * html/HTMLFormElement.idl: |
| * html/HTMLInputElement.idl: |
| * html/HTMLKeygenElement.idl: |
| * html/HTMLObjectElement.idl: |
| * html/HTMLOutputElement.idl: |
| * html/HTMLSelectElement.idl: |
| * html/HTMLTextAreaElement.idl: |
| Add reportValidity() operation. |
| |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::checkValidity): |
| |
| (WebCore::HTMLFormControlElement::reportValidity): |
| Add implementation for reportValidity() for form control elements. |
| First, it calls checkValidity() and returns early if there is no |
| constraint violation. if the JS canceled the 'invalid' event |
| fired by checkValidity(), then return early as well, as per the |
| specification. If the element is focusable, we scroll to it, |
| focus it and show the validation message. Otherwise, we log a |
| error message to the console. The last part of the behavior |
| matches what we already did in HTMLFormElement::validateInteractively() |
| and complies with the behavior in the specification. |
| |
| (WebCore::HTMLFormControlElement::focusAndShowValidationMessage): |
| Add utility function to scroll to the form control element, focus |
| it and show its validation message. This code was moved from |
| HTMLFormElement::validateInteractively() so that it could be reused |
| in HTMLFormControlElement::reportValidity(). |
| |
| * html/HTMLFormControlElement.h: |
| * html/HTMLFormElement.cpp: |
| (WebCore::HTMLFormElement::validateInteractively): |
| Move the early abort checks to the existing call site (prepareForSubmission) |
| so that we can reuse this method for reportValidity(). |
| |
| (WebCore::HTMLFormElement::prepareForSubmission): |
| Only call validateInteractively() if we really should validate. Those checks |
| used to be in validateInteractively() but I moved them here so we could more |
| easily reuse validateInteractively(). |
| |
| (WebCore::HTMLFormElement::checkValidity): |
| (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled): |
| Update Vector type to be a Vector of HTMLFormControlElement given that we |
| only add HTMLFormControlElement objects to it and that it results it simpler |
| code. |
| |
| (WebCore::HTMLFormElement::reportValidity): |
| Add implementation for reportValidity() for form elements. The |
| implementation calls our already existing validateInteractively() |
| method, as per the specification. |
| |
| * html/HTMLFormElement.h: |
| |
| * html/HTMLObjectElement.h: |
| reportValidity() returns true unconditionally for object elements, |
| similarly to checkValidity(). |
| |
| 2016-10-15 Simon Fraser <simon.fraser@apple.com> |
| |
| Sort the project file. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2016-10-15 Simon Fraser <simon.fraser@apple.com> |
| |
| Implement serializer = { attribute } |
| https://bugs.webkit.org/show_bug.cgi?id=163466 |
| |
| Reviewed by Darin Adler. |
| |
| Fix the code generator to generate code for serializer = { attribute }. |
| In IDLParser, extend domSerializable with flags for the 'inherit', 'getter' and |
| 'attribute' values (the first two are still unsupported). Fix parseSerializationPattern() |
| to detect these; it needs to create the domSerializable() now. Basic support |
| for isSerializableAttribute() is added (primitive types only). |
| |
| GenerateSerializerFunction is fixed to output code for the serializable attributes |
| in the order specified in "serializer = {}", as specified in WebIDL. |
| |
| Removed custom serialization for ClientRect and PerformanceTiming. |
| |
| Other minor cleanup to always get $interfaceName from $interface->name, and to fix |
| ObjectConstructor.h to be included as <runtime/ObjectConstructor.h>. |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSBindingsAllInOne.cpp: |
| * bindings/js/JSClientRectCustom.cpp: Removed. |
| * bindings/js/JSPerformanceTimingCustom.cpp: Removed. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| (GenerateSerializerFunction): |
| * bindings/scripts/IDLParser.pm: |
| (parseSerializerRest): |
| (parseSerializationPattern): |
| (parseSerializationAttributes): |
| (isSerializableAttribute): |
| (applyMemberList): |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionToJSONCaller): |
| * bindings/scripts/test/JS/JSTestSerialization.cpp: Added. |
| * bindings/scripts/test/JS/JSTestSerialization.h: Added. |
| * bindings/scripts/test/TestObj.idl: |
| * bindings/scripts/test/TestSerialization.idl: Copied from Source/WebCore/dom/ClientRect.idl. |
| * dom/ClientRect.idl: |
| * page/PerformanceTiming.idl: |
| |
| 2016-10-15 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Restore user agent quirk for Yahoo |
| https://bugs.webkit.org/show_bug.cgi?id=163481 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| finance.yahoo.com is sending a mobile version in response to our standard user agent. |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::urlRequiresMacintoshPlatform): |
| |
| 2016-10-15 Chris Dumez <cdumez@apple.com> |
| |
| Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError |
| https://bugs.webkit.org/show_bug.cgi?id=163472 |
| |
| Reviewed by Sam Weinig. |
| |
| Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError: |
| - https://html.spec.whatwg.org/#dom-media-volume |
| |
| This is because the attribute is of type double (not unrestricted double in the IDL). |
| |
| Chrome and Firefox agree with the specification. WebKit throws an IndexSizeErr instead. |
| |
| No new tests, rebaselined existing test. |
| |
| * html/HTMLMediaElement.idl: |
| |
| 2016-10-15 Zalan Bujtas <zalan@apple.com> |
| |
| CounterNode::resetRenderers is so inefficient. |
| https://bugs.webkit.org/show_bug.cgi?id=163480 |
| |
| Reviewed by Simon Fraser. |
| |
| CounterNode::resetRenderers() removes all the associated renderers from this CounterNode |
| and sets the dirty bit on them. |
| This patch does all that in a loop, instead of traversing the linked tree on each removal. |
| |
| No change in functionality. |
| |
| * rendering/CounterNode.cpp: |
| (WebCore::CounterNode::CounterNode): |
| (WebCore::CounterNode::~CounterNode): |
| (WebCore::CounterNode::nextInPreOrderAfterChildren): |
| (WebCore::CounterNode::lastDescendant): |
| (WebCore::CounterNode::addRenderer): These assertions do not seem super useful. |
| (WebCore::CounterNode::removeRenderer): |
| (WebCore::CounterNode::resetRenderers): |
| (WebCore::CounterNode::insertAfter): |
| (WebCore::CounterNode::removeChild): |
| * rendering/CounterNode.h: |
| * rendering/RenderCounter.cpp: |
| (WebCore::makeCounterNode): |
| (WebCore::RenderCounter::RenderCounter): |
| (WebCore::RenderCounter::~RenderCounter): |
| (WebCore::RenderCounter::originalText): |
| (WebCore::updateCounters): |
| (WebCore::RenderCounter::invalidate): Deleted. |
| * rendering/RenderCounter.h: |
| |
| 2016-10-15 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] macOS inline controls |
| https://bugs.webkit.org/show_bug.cgi?id=163444 |
| <rdar://problem/27989473> |
| |
| Reviewed by Dean Jackson. |
| |
| Introducing the new MacOSMediaControls and MacOSInlineMediaControls classes. MacOSMediaControls is a MediaControls subclass |
| that adds specific buttons to the macOS platform and sets the layout traits to be macOS. This class has a new subclass, |
| MacOSInlineMediaControls, which sets the layout traits to also include inline and implements custom layout to drop |
| controls as necessary as the width of the controls varies. It also shows the volume slider when the mute button is hovered. |
| |
| Tests: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html |
| media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html |
| media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html |
| media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html |
| media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html |
| media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html |
| media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html |
| media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html |
| media/modern-media-controls/macos-media-controls/macos-media-controls.html |
| |
| * Modules/modern-media-controls/controls/macos-inline-media-controls.css: Added. |
| (.media-controls.mac.inline > .controls-bar): |
| (.media-controls.mac.inline > .controls-bar > *): |
| (.media-controls.mac.inline button): |
| (.media-controls.mac.inline button:active): |
| (.media-controls.mac.inline > .controls-bar button): |
| (.media-controls.mac.inline > .controls-bar,): |
| (.media-controls.mac.inline button.play-pause): |
| (.media-controls.mac.inline button.skip-back): |
| (.media-controls.mac.inline .scrubber.slider): |
| (.media-controls.mac.inline button.mute): |
| (.media-controls.mac.inline button.airplay): |
| (.media-controls.mac.inline button.pip): |
| (.media-controls.mac.inline button.tracks): |
| (.media-controls.mac.inline button.fullscreen): |
| (.media-controls.mac.inline .time-label): |
| (.media-controls.mac.inline .volume-slider-container): |
| (.media-controls.mac.inline .volume-slider-container:before): |
| (.media-controls.mac.inline .volume.slider): |
| * Modules/modern-media-controls/controls/macos-inline-media-controls.js: Added. |
| (MacOSInlineMediaControls.prototype.layout): |
| (MacOSInlineMediaControls.prototype.handleEvent): |
| * Modules/modern-media-controls/controls/macos-media-controls.js: Added. |
| (MacOSMediaControls): |
| |
| 2016-10-14 Antti Koivisto <antti@apple.com> |
| |
| 100% CPU on homedepot.com page |
| https://bugs.webkit.org/show_bug.cgi?id=163452 |
| <rdar://problem/28730708> |
| |
| Reviewed by Simon Fraser. |
| |
| The site has a keyframe animation on body. Currently this causes the animation to invalidate the |
| style of the entire document. |
| |
| Animations use SyntheticStyleChange to invalidate elements when animation progresses and currently |
| that causes full subtree invalidation. However animation only ever affect individual elements and |
| the normal style resolution mechanism should be able to deal with things like inheritance as needed. |
| |
| Test: fast/animation/animation-style-update-size.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::recalcStyle): |
| * dom/Document.h: |
| (WebCore::Document::lastStyleUpdateSizeForTesting): |
| |
| Testing support. |
| |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::resolveElement): |
| |
| Don't force subtree style resolution for SyntheticStyleChange. |
| |
| * style/StyleUpdate.h: |
| (WebCore::Style::Update::size): |
| * testing/Internals.cpp: |
| (WebCore::Internals::lastStyleUpdateSize): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2016-10-14 Chris Dumez <cdumez@apple.com> |
| |
| Setting HTMLMediaElement.muted to the same value should not fire a volume change event |
| https://bugs.webkit.org/show_bug.cgi?id=163474 |
| |
| Reviewed by Eric Carlson. |
| |
| Setting HTMLMediaElement.muted to the same value should not fire a volume |
| change event: |
| - https://html.spec.whatwg.org/#dom-media-muted |
| |
| Chrome and Firefox agree with the specification. |
| |
| No new tests, rebaselined existing test. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::setMuted): |
| |
| 2016-10-14 Dean Jackson <dino@apple.com> |
| |
| Add Display P3 ColorSpace |
| https://bugs.webkit.org/show_bug.cgi?id=162880 |
| <rdar://problem/28598564> |
| |
| Reviewed by Sam Weinig. |
| |
| Re-landing with a version that hopefully compiles on El Capitan. |
| |
| Add a new ColorSpace for Display P3. |
| |
| This will be tested once the Color class can create |
| objects that reference other color spaces. |
| |
| * platform/graphics/ColorSpace.h: |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| (WebCore::displayP3ColorSpaceRef): |
| * platform/graphics/cg/GraphicsContextCG.h: |
| (WebCore::cachedCGColorSpace): |
| |
| 2016-10-14 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Minor cleanups |
| https://bugs.webkit.org/show_bug.cgi?id=162953 |
| |
| Reviewed by Dean Jackson. |
| |
| Code cleanup. No change in behavior. |
| |
| * platform/graphics/win/ImageDecoderDirect2D.cpp: |
| (WebCore::ImageDecoder::frameIsCompleteAtIndex): |
| (WebCore::ImageDecoder::frameBytesAtIndex): |
| |
| 2016-10-14 Alex Christensen <achristensen@webkit.org> |
| |
| Fix CMake build. |
| |
| * PlatformMac.cmake: |
| |
| 2016-10-14 Anders Carlsson <andersca@apple.com> |
| |
| Pass on networking settings to the PKPaymentRequest |
| https://bugs.webkit.org/show_bug.cgi?id=163462 |
| rdar://problem/28567629 |
| |
| Reviewed by Dan Bernstein. |
| |
| Add new SPI. |
| |
| * platform/spi/cocoa/PassKitSPI.h: |
| |
| 2016-10-14 Dean Jackson <dino@apple.com> |
| |
| CSS parsing should use Color not RGBA32 |
| https://bugs.webkit.org/show_bug.cgi?id=163423 |
| <rdar://problem/28766903> |
| |
| Reviewed by Simon Fraser. |
| |
| Re-landing this after it was rolled out in https://trac.webkit.org/r207342. |
| |
| In order to allow CSS to use the ExtendedColor variant of |
| Color, we need to stop using RGBA32. This is a fairly big |
| change that goes through all the places in the parser |
| related to colors, and moves them from RGBA32 to Color. |
| |
| No change in functionality, so covered by existing tests. |
| |
| * WebCore.xcodeproj/project.pbxproj: Add the new ColorHash.h file. |
| |
| * css/CSSPrimitiveValue.cpp: CSSPrimitiveValue now can hold a Color* |
| rather than an unsigned int for colors. |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::cleanup): |
| (WebCore::CSSPrimitiveValue::getRGBColorValue): |
| (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): |
| (WebCore::CSSPrimitiveValue::cloneForCSSOM): |
| (WebCore::CSSPrimitiveValue::equals): |
| * css/CSSPrimitiveValue.h: Move to Color* and also use some |
| nullptrs. |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add a new inline |
| constructor. |
| |
| * css/CSSValuePool.cpp: Move to Color. |
| (WebCore::CSSValuePool::CSSValuePool): |
| (WebCore::CSSValuePool::createColorValue): |
| * css/CSSValuePool.h: Change the ColorValueCache to a new type. |
| |
| * css/StyleResolver.cpp: Move to Color. |
| (WebCore::StyleResolver::colorFromPrimitiveValue): |
| * css/parser/CSSParser.cpp: |
| (WebCore::parseColorValue): |
| (WebCore::CSSParser::parseColor): |
| (WebCore::CSSParser::parseColorFromString): |
| (WebCore::CSSParser::parseSystemColor): |
| (WebCore::fastParseColorInternal): |
| (WebCore::CSSParser::fastParseColor): |
| (WebCore::CSSParser::parseColorFromValue): |
| * css/parser/CSSParser.h: |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::fastParseColorInternal): |
| (WebCore::CSSParserFastPaths::parseColor): |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::consumeColor): |
| * css/parser/SVGCSSParser.cpp: |
| (WebCore::CSSParser::parseSVGValue): |
| (WebCore::CSSParser::parseSVGPaint): |
| (WebCore::CSSParser::parseSVGColor): |
| * editing/EditingStyle.cpp: |
| (WebCore::cssValueToColor): |
| (WebCore::textColorFromStyle): |
| (WebCore::backgroundColorFromStyle): |
| (WebCore::rgbaBackgroundColorInEffect): |
| (WebCore::EditingStyle::prepareToApplyAt): |
| (WebCore::isTransparentColorValue): |
| (WebCore::cssValueToRGBA): Deleted. |
| * editing/cocoa/HTMLConverter.mm: |
| (HTMLConverterCaches::colorPropertyValueForNode): |
| * html/HTMLBodyElement.cpp: |
| (WebCore::HTMLBodyElement::parseAttribute): |
| * html/canvas/CanvasGradient.cpp: |
| (WebCore::CanvasGradient::addColorStop): |
| * html/canvas/CanvasRenderingContext2D.cpp: Ditto, but leave a FIXME to |
| remind myself to come back when colorWithOverrideAlpha has been updated. |
| (WebCore::CanvasRenderingContext2D::setStrokeStyle): |
| (WebCore::CanvasRenderingContext2D::setFillStyle): |
| (WebCore::CanvasRenderingContext2D::setShadowColor): |
| (WebCore::CanvasRenderingContext2D::setShadow): |
| * html/canvas/CanvasStyle.cpp: |
| (WebCore::isCurrentColorString): |
| (WebCore::parseColor): |
| (WebCore::currentColor): |
| (WebCore::parseColorOrCurrentColor): |
| (WebCore::CanvasStyle::createFromString): |
| (WebCore::CanvasStyle::createFromStringWithOverrideAlpha): |
| * html/canvas/CanvasStyle.h: |
| * svg/SVGColor.cpp: |
| (WebCore::SVGColor::colorFromRGBColorString): |
| |
| * platform/graphics/Color.h: Add new constructors for the special |
| empty and deleted Color values used in HashTables. |
| (WebCore::Color::Color): |
| (WebCore::Color::isHashTableDeletedValue): |
| (WebCore::Color::asUint64): New accessor to get the raw uint64_t value. |
| |
| * platform/graphics/ColorHash.h: Added. Implement the traits for a Color HashTable. |
| (WTF::ColorHash::hash): |
| (WTF::ColorHash::equal): |
| (WTF::HashTraits<WebCore::Color>::emptyValue): |
| (WTF::HashTraits<WebCore::Color>::constructDeletedValue): |
| (WTF::HashTraits<WebCore::Color>::isDeletedValue): |
| |
| 2016-10-14 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Implement basic SVG support |
| https://bugs.webkit.org/show_bug.cgi?id=163349 |
| |
| Reviewed by Brent Fulgham. |
| |
| Direct2D needs access to the target graphics context when generating bitmap |
| images so that it can properly match pixel format and other settings. |
| |
| Add implementations for a number of drawing primitives used in the SVG |
| test cases. Correct some differences between CG and Direct2D for drawing |
| different primitives. |
| |
| No new tests. Tested by existing 'svg' tests. |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::frameImageAtIndex): Take optional target graphics |
| context. Also pass the graphics context to the image decoder. |
| (WebCore::BitmapImage::nativeImage): Accept an optional target context. |
| (WebCore::BitmapImage::nativeImageForCurrentFrame): Ditto. |
| (WebCore::BitmapImage::draw): Pass target graphics context to the |
| 'frameImageAtIndex' method. |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/Image.h: |
| * platform/graphics/ImageBuffer.cpp: |
| (WebCore::ImageBuffer::create): Moved from header. Add create function that |
| takes an optional GraphicsContext argument. |
| * platform/graphics/ImageBuffer.h: |
| * platform/graphics/ImageFrameCache.cpp: Add missing include needed to build |
| under Direct2D. |
| * platform/graphics/ImageSource.cpp: |
| (WebCore::ImageSource::setDecoderTargetContext): Added. |
| (WebCore::ImageSource::setRenderTarget): Deleted. |
| * platform/graphics/ImageSource.h: |
| * platform/graphics/Pattern.h: |
| * platform/graphics/win/GraphicsContextDirect2D.cpp: |
| (WebCore::GraphicsContextPlatformPrivate::endDraw): Log error state instead of crashing |
| each time. |
| (WebCore::GraphicsContext::drawEllipse): Ellipses are defined in D2D as a center, an |
| X-radius, and a Y-radius. |
| (WebCore::GraphicsContext::applyStrokePattern): |
| (WebCore::GraphicsContext::applyFillPattern): |
| (WebCore::GraphicsContext::clearRect): Use 'Clear' function if possible. Don't clear |
| anything if the clear rect is outside the drawing area. |
| (WebCore::GraphicsContext::strokeRect): Provide implementation (needed by SVG). |
| (WebCore::GraphicsContext::platformFillEllipse): Ellipses are defined in D2D as |
| a center, an X-radius, and a Y-radius. |
| (WebCore::GraphicsContext::platformStrokeEllipse): Ditto. |
| * platform/graphics/win/ImageBufferDirect2D.cpp: |
| (WebCore::ImageBuffer::createCompatibleBuffer): Accept optional GraphicsContext argument. |
| (WebCore::ImageBuffer::ImageBuffer): Ditto. |
| * platform/graphics/win/ImageDecoderDirect2D.cpp: |
| (WebCore::ImageDecoder::setTargetContext): Renamed from 'setRenderTarget'. |
| (WebCore::ImageDecoder::createFrameImageAtIndex): Take optional GraphicsContext argument. |
| (WebCore::ImageDecoder::setRenderTarget): Deleted. |
| * platform/graphics/win/ImageDecoderDirect2D.h: |
| * platform/graphics/win/ImageDirect2D.cpp: |
| (WebCore::BitmapImage::setRenderTarget): Deleted. |
| * platform/graphics/win/NativeImageDirect2D.cpp: Add missing include. |
| * platform/graphics/win/PatternDirect2D.cpp: |
| (WebCore::Pattern::createPlatformPattern): Revise for new signature. |
| * rendering/FilterEffectRenderer.cpp: |
| (WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded): Pass GraphicsContext |
| to ImageBuffer constructor. |
| (WebCore::FilterEffectRendererHelper::beginFilterEffect): Pass target context to |
| filter when allocating backing store. |
| * rendering/FilterEffectRenderer.h: Add GraphicsContext as argument to constructor. |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::hasFilterThatIsPainting): Supply GraphicsContext argument when |
| building new FilterEffectRenderer and helper. |
| (WebCore::RenderLayer::setupFilters): Ditto. |
| * svg/graphics/SVGImage.cpp: |
| (WebCore::SVGImage::nativeImageForCurrentFrame): Revise to take optional GraphicsContext |
| argument. |
| (WebCore::SVGImage::nativeImage): Ditto. |
| * svg/graphics/SVGImage.h: |
| * svg/graphics/SVGImageForContainer.cpp: |
| (WebCore::SVGImageForContainer::nativeImageForCurrentFrame): Ditto. |
| * svg/graphics/SVGImageForContainer.h: |
| |
| 2016-10-14 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, rolling out r207319. |
| |
| Regressed Dromaeo and may have caused crashes under |
| GuardMalloc (rdar://problem/28780835) |
| |
| Reverted changeset: |
| |
| "[Web IDL] Add support for [SameObject] extended attribute" |
| https://bugs.webkit.org/show_bug.cgi?id=163414 |
| http://trac.webkit.org/changeset/207319 |
| |
| 2016-10-14 Anders Carlsson <andersca@apple.com> |
| |
| Clean up BackForwardClient |
| https://bugs.webkit.org/show_bug.cgi?id=163454 |
| |
| Reviewed by Sam Weinig. |
| |
| Remove iOS specific member functions that are only used from WebKit. |
| |
| * history/BackForwardClient.h: |
| * loader/EmptyClients.cpp: |
| |
| 2016-10-13 Anders Carlsson <andersca@apple.com> |
| |
| Move BackForwardList from WebCore to WebKitLegacy |
| https://bugs.webkit.org/show_bug.cgi?id=163418 |
| |
| Reviewed by Tim Horton. |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * history/BackForwardController.cpp: |
| (WebCore::BackForwardController::BackForwardController): |
| * history/BackForwardController.h: |
| * loader/EmptyClients.cpp: |
| (WebCore::fillWithEmptyClients): |
| * page/Page.cpp: |
| (WebCore::Page::Page): |
| |
| 2016-10-14 Manuel Rego Casasnovas <rego@igalia.com> |
| |
| [css-grid] Changing the argument on fit-content() doesn't cause the grid to be relayout |
| https://bugs.webkit.org/show_bug.cgi?id=163434 |
| |
| Reviewed by Sergio Villar Senin. |
| |
| When fit-content() was implemented a new attribute |
| m_fitContentTrackBreadth was added to GridTrackSize. |
| However we forgot to include it in the == operator implementation, |
| so we were missing the changes on that value. |
| |
| Now if you change the argument of a fit-content() track, |
| the track size is properly recomputed. |
| |
| Test: fast/css-grid-layout/grid-change-fit-content-argument.html |
| |
| * rendering/style/GridTrackSize.h: |
| (WebCore::GridTrackSize::operator==): Check m_fitContentTrackBreadth. |
| |
| 2016-10-14 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r207317. |
| https://bugs.webkit.org/show_bug.cgi?id=163448 |
| |
| This change caused an existing LayoutTest to fail on all |
| platforms (Requested by ryanhaddad on #webkit). |
| |
| Reverted changeset: |
| |
| "CSS parsing should use Color not RGBA32" |
| https://bugs.webkit.org/show_bug.cgi?id=163423 |
| http://trac.webkit.org/changeset/207317 |
| |
| 2016-10-14 Antti Koivisto <antti@apple.com> |
| |
| Share inline stylesheets between shadow trees |
| https://bugs.webkit.org/show_bug.cgi?id=163353 |
| |
| Reviewed by Ryosuke Niwa and Andreas Kling. |
| |
| If shadow trees have identical inline stylesheets the data structures can be shared. |
| In future this will also allow sharing style resolvers. |
| |
| * css/CSSStyleSheet.cpp: |
| (WebCore::CSSStyleSheet::createInline): |
| |
| Move StyleSheetContents construction to the client. |
| |
| * css/parser/CSSParserMode.h: |
| (WebCore::CSSParserContextHash::hash): |
| (WebCore::CSSParserContextHash::equal): |
| (WTF::HashTraits<WebCore::CSSParserContext>::constructDeletedValue): |
| (WTF::HashTraits<WebCore::CSSParserContext>::isDeletedValue): |
| (WTF::HashTraits<WebCore::CSSParserContext>::emptyValue): |
| |
| Make CSSParserContext hashable. |
| |
| * dom/ExtensionStyleSheets.cpp: |
| (WebCore::createExtensionsStyleSheet): |
| (WebCore::ExtensionStyleSheets::pageUserSheet): |
| (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache): |
| |
| Don't use CSSStyleSheet::createInline, these are not really inline stylesheets. |
| Code cleanups. |
| |
| * dom/InlineStyleSheetOwner.cpp: |
| (WebCore::parserContextForForElement): |
| (WebCore::makeInlineStyleSheetCacheKey): |
| (WebCore::inlineStyleSheetCache): |
| |
| Implement a simple cache for sharing stylesheets with identical text and context. |
| |
| (WebCore::InlineStyleSheetOwner::createSheet): |
| (WebCore::InlineStyleSheetOwner::clearCache): |
| * dom/InlineStyleSheetOwner.h: |
| * platform/MemoryPressureHandler.cpp: |
| (WebCore::MemoryPressureHandler::releaseNoncriticalMemory): |
| |
| 2016-10-14 Chris Dumez <cdumez@apple.com> |
| |
| [Mac] Allow throttling of background tabs that have media elements with no audible audio |
| https://bugs.webkit.org/show_bug.cgi?id=163402 |
| <rdar://problem/28056151> |
| |
| Reviewed by Gavin Barraclough. |
| |
| Allow throttling of background tabs that have media elements with no audible audio. |
| We were taking an media assertion from the PageThrottler as soon as there was a |
| media element playing on the page. This prevented throttling of background tabs |
| even if those media elements had no audible audio, which was unfortunate. |
| |
| We now have more fine-grained rules for when HTMLMediaElement should take an |
| assertion. I also added release logging to help debug such issues in the |
| future. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::setMuted): |
| (WebCore::HTMLMediaElement::updateVolume): |
| (WebCore::HTMLMediaElement::updatePlayState): |
| (WebCore::HTMLMediaElement::updateAudioAssertionState): |
| (WebCore::HTMLMediaElement::effectiveMuted): Deleted. |
| * html/HTMLMediaElement.h: |
| |
| 2016-10-14 Romain Bellessort <romain.bellessort@crf.canon.fr> |
| |
| [Readable Streams API] Cleanup patch, fix small inconsistencies |
| https://bugs.webkit.org/show_bug.cgi?id=163329 |
| |
| Reviewed by Youenn Fablet. |
| |
| Cleanup patch, fixed 3 small inconsistences between implementation and spec. |
| |
| No change in behaviour. |
| |
| * Modules/streams/ReadableStream.idl: Added optional parameter in getReader. |
| * Modules/streams/ReadableStreamDefaultController.js: |
| (error): Call readableStreamDefaultControllerError instead of readableStreamError. |
| * Modules/streams/ReadableStreamInternals.js: Added missing ASSERT in readableStreamDefaultControllerCallPullIfNeeded. |
| |
| 2016-10-14 Youenn Fablet <youenn@apple.com> |
| |
| http://trac.webkit.org/changeset/207330 broke Mac Windows build |
| https://bugs.webkit.org/show_bug.cgi?id=163442 |
| |
| Unreviewed. |
| |
| * platform/network/cf/ResourceRequestCFNet.cpp: |
| (WebCore::toPlatformRequestCachePolicy): Do not explicitly use CFURLRequestCachePolicy enumeration values. |
| |
| 2016-10-14 Zan Dobersek <zdobersek@igalia.com> |
| |
| [Cairo] GraphicsContext3D::ImageExtractor fails to extract images |
| https://bugs.webkit.org/show_bug.cgi?id=163439 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| In the Cairo implementation of GraphicsContext3D::ImageExtractor, |
| don't check for frame completeness at index 0. This information |
| is now cached only after the frame for that index is decoded and |
| marked as completed, which is done after this check. |
| |
| Becuase of this the current check forces extractImage() to return |
| early and abort WebGL texture uploads from image sources. |
| |
| This bug was most likely exposed after the refactoring in r206481. |
| https://trac.webkit.org/changeset/206481 |
| |
| * platform/graphics/cairo/GraphicsContext3DCairo.cpp: |
| (WebCore::GraphicsContext3D::ImageExtractor::extractImage): |
| |
| 2016-10-14 Youenn Fablet <youenn@apple.com> |
| |
| MediaResourceLoader should use CachedResource::ressourceError to do CORS checks |
| https://bugs.webkit.org/show_bug.cgi?id=163279 |
| |
| Reviewed by Darin Adler. |
| |
| Covered by existing tests. |
| |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResource::responseReceived): Making use of CachedResource::ressourceError to detect CORS failures. |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest): Activating loader options checks |
| before reusing the resource. |
| (WebCore::isResourceSuitableForDirectReuse): Disabling direct reuse of MediaResource since reuse of raw |
| resources does not work yet for media resources. |
| |
| 2016-10-14 Youenn Fablet <youenn@apple.com> |
| |
| Make NetworkCache aware of fetch cache mode |
| https://bugs.webkit.org/show_bug.cgi?id=163332 |
| |
| Reviewed by Antti Koivisto. |
| |
| Tests: imported/w3c/web-platform-tests/fetch/api/request/request-cache-default-conditional.html |
| imported/w3c/web-platform-tests/fetch/api/request/request-cache-default.html |
| imported/w3c/web-platform-tests/fetch/api/request/request-cache-force-cache.html |
| imported/w3c/web-platform-tests/fetch/api/request/request-cache-no-cache.html |
| imported/w3c/web-platform-tests/fetch/api/request/request-cache-no-store.html |
| imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.html |
| imported/w3c/web-platform-tests/fetch/api/request/request-cache-reload.html |
| |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::updateRequestAccordingCacheMode): Setting request cache policy according cache mode. |
| Basically, these two are about the same. |
| (WebCore::CachedResourceLoader::determineRevalidationPolicy): Making use of cache policy instead of cache mode. |
| * platform/network/ResourceRequestBase.h: Adding new cache policies, aligned with fetch cache modes. |
| * platform/network/cf/ResourceRequestCFNet.cpp: |
| (WebCore::toPlatformRequestCachePolicy): If policy is not supported by CFNetwork, fallback to ReloadIgnoringCacheData. |
| This is the best approximate we might find. |
| (WebCore::ResourceRequest::doUpdatePlatformHTTPBody): |
| (WebCore::ResourceRequest::doUpdateResourceRequest): Only updating cache policy, if cache policy is the default. |
| * platform/network/cf/ResourceRequestCFNet.h: |
| * platform/network/cocoa/ResourceRequestCocoa.mm: Doing the same modifications as for ResourceRequestCFNet. |
| (WebCore::ResourceRequest::doUpdateResourceRequest): |
| (WebCore::toPlatformRequestCachePolicy): |
| (WebCore::ResourceRequest::doUpdatePlatformRequest): |
| |
| 2016-10-13 Youenn Fablet <youenn@apple.com> |
| |
| Binding generated code for private operations should assert for casted-this checks |
| https://bugs.webkit.org/show_bug.cgi?id=163326 |
| |
| Reviewed by Darin Adler. |
| |
| Covered by existing tests. |
| |
| Private operations are not exposed to user scripts and are only called by built-in scripts or other WebKit-controlled code. |
| The call sites already ensure that the caller is of the right type so there is no need to do that work twice. |
| |
| Introducing a casted-this-error Assert mode for casted-this checks, which may be reused for other binding generated code. |
| Updated binding generator to use that mode for private operations. |
| |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::BindingCaller::callPromiseOperation): |
| (WebCore::BindingCaller::callOperation): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| (WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunction): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionPrivateMethod): |
| |
| 2016-10-13 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| WebView and WebPage URLs not updated after URL is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame |
| https://bugs.webkit.org/show_bug.cgi?id=146306 |
| |
| Reviewed by Darin Adler. |
| |
| Notify about the provisional URL change when new request set for main resource load in DocumentLoader has a |
| different URL than the previous one. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::setRequest): |
| |
| 2016-10-13 Youenn Fablet <youenn@apple.com> |
| |
| Update serializer and iterator binding generated code |
| https://bugs.webkit.org/show_bug.cgi?id=163325 |
| |
| Reviewed by Darin Adler. |
| |
| No change of behavior. |
| Covered by existing tests and rebased binding generated code. |
| |
| Making use of BindingCaller::callOperation within serializer and iterator operations. |
| Refactored serializer code to use direct attribute getters. |
| |
| * bindings/js/JSDOMIterator.h: |
| (WebCore::iteratorCreate): |
| (WebCore::iteratorForEach): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateSerializerFunction): |
| (GenerateImplementationIterableFunctions): |
| * bindings/scripts/test/JS/JSTestIterable.cpp: |
| (WebCore::jsTestIterablePrototypeFunctionSymbolIteratorCaller): |
| (WebCore::jsTestIterablePrototypeFunctionSymbolIterator): |
| (WebCore::jsTestIterablePrototypeFunctionEntriesCaller): |
| (WebCore::jsTestIterablePrototypeFunctionEntries): |
| (WebCore::jsTestIterablePrototypeFunctionKeysCaller): |
| (WebCore::jsTestIterablePrototypeFunctionKeys): |
| (WebCore::jsTestIterablePrototypeFunctionValuesCaller): |
| (WebCore::jsTestIterablePrototypeFunctionValues): |
| (WebCore::jsTestIterablePrototypeFunctionForEachCaller): |
| (WebCore::jsTestIterablePrototypeFunctionForEach): |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| (WebCore::jsTestNodePrototypeFunctionSymbolIteratorCaller): |
| (WebCore::jsTestNodePrototypeFunctionSymbolIterator): |
| (WebCore::jsTestNodePrototypeFunctionEntriesCaller): |
| (WebCore::jsTestNodePrototypeFunctionEntries): |
| (WebCore::jsTestNodePrototypeFunctionKeysCaller): |
| (WebCore::jsTestNodePrototypeFunctionKeys): |
| (WebCore::jsTestNodePrototypeFunctionValuesCaller): |
| (WebCore::jsTestNodePrototypeFunctionValues): |
| (WebCore::jsTestNodePrototypeFunctionForEachCaller): |
| (WebCore::jsTestNodePrototypeFunctionForEach): |
| (WebCore::jsTestNodePrototypeFunctionToJSON): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionToJSON): |
| |
| 2016-10-13 Alex Christensen <achristensen@webkit.org> |
| |
| Fix API test after r207318. |
| https://bugs.webkit.org/show_bug.cgi?id=162951 |
| |
| This fixes the API test WebKit2.PendingAPIRequestURL which asserted when trying to hash a null String. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::isRemoteWebArchive): |
| If the mimeType is a null String, it is not in the set webArchiveMIMETypes, so return false instead of hashing it. |
| |
| 2016-10-13 Alex Christensen <achristensen@webkit.org> |
| |
| Hosts of URLs with non-special schemes should be case-sensitive, and non-ASCII characters in such hosts should be punycode-encoded |
| https://bugs.webkit.org/show_bug.cgi?id=163413 |
| |
| Reviewed by Tim Horton. |
| |
| This retains compatibility with the canonicalization Chrome, Firefox, and Safari with uppercase characters |
| in the hosts of URLs with unrecognized schemes. Safari treats such characters as the host, while Firefox |
| and Chrome treat such characters as part of the path, starting with the "//" after the ':' |
| Behavior of non-ASCII characters is inconsistent, and since we need to have a host, we should punycode-encode |
| the host to be consistent with special schemes because percent-encoding hosts sometimes is inconsistent. |
| |
| This solution was proposed to the spec in https://github.com/whatwg/url/issues/148 |
| |
| Covered by updated API and layout tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| (WebCore::URLParser::percentDecode): |
| (WebCore::URLParser::domainToASCII): |
| (WebCore::URLParser::hasInvalidDomainCharacter): |
| (WebCore::URLParser::parseHostAndPort): |
| (WebCore::URLParser::formURLDecode): |
| (WebCore::percentDecode): Deleted. |
| (WebCore::domainToASCII): Deleted. |
| (WebCore::hasInvalidDomainCharacter): Deleted. |
| (WebCore::formURLDecode): Deleted. |
| * platform/URLParser.h: |
| |
| 2016-10-13 Chris Dumez <cdumez@apple.com> |
| |
| [Web IDL] Add support for [SameObject] extended attribute |
| https://bugs.webkit.org/show_bug.cgi?id=163414 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for [SameObject] Web IDL extended attribute: |
| - https://heycam.github.io/webidl/#SameObject |
| |
| Start using it on DOM / HTML attributes where the specification |
| mandates it. |
| |
| Test: js/dom/SameObject-support.html |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (ShouldCacheAttribute): |
| (GenerateHeader): |
| (GenerateImplementation): |
| * bindings/scripts/IDLAttributes.txt: |
| * dom/DataTransfer.idl: |
| * dom/Document.idl: |
| * dom/Element.idl: |
| * dom/MutationRecord.idl: |
| * dom/Node.idl: |
| * dom/NodeIterator.idl: |
| * dom/ParentNode.idl: |
| * dom/TreeWalker.idl: |
| * html/HTMLAnchorElement.idl: |
| * html/HTMLAreaElement.idl: |
| * html/HTMLButtonElement.idl: |
| * html/HTMLDataListElement.idl: |
| * html/HTMLDocument.idl: |
| * html/HTMLElement.idl: |
| * html/HTMLFieldSetElement.idl: |
| * html/HTMLFormElement.idl: |
| * html/HTMLIFrameElement.idl: |
| * html/HTMLInputElement.idl: |
| * html/HTMLKeygenElement.idl: |
| * html/HTMLLinkElement.idl: |
| * html/HTMLMapElement.idl: |
| * html/HTMLMediaElement.idl: |
| * html/HTMLMeterElement.idl: |
| * html/HTMLOutputElement.idl: |
| * html/HTMLProgressElement.idl: |
| * html/HTMLSelectElement.idl: |
| * html/HTMLTableElement.idl: |
| * html/HTMLTableRowElement.idl: |
| * html/HTMLTableSectionElement.idl: |
| * html/HTMLTextAreaElement.idl: |
| * page/Location.idl: |
| * page/Navigator.idl: |
| |
| 2016-10-13 Andy Estes <aestes@apple.com> |
| |
| [iOS] Support Web Archive previews generated by QuickLook |
| https://bugs.webkit.org/show_bug.cgi?id=162951 |
| <rdar://problem/28607920> |
| |
| Reviewed by Brady Eidson. |
| |
| QuickLook might generate a Web Archive preview for some resource types, but WebKit would |
| refuse to load it due to the prohibition on loading remote Web Archives. Even though the |
| original resource might be from a remote origin, the QuickLook-generated preview is a |
| trusted local resource, so allow it to be loaded. |
| |
| No test possible. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::isRemoteWebArchive): Added. Moved the remote web archive check from |
| continueAfterContentPolicy() to here, and added a check for responses containing the |
| QuickLook preview protocol. |
| (WebCore::DocumentLoader::continueAfterContentPolicy): Called isRemoteWebArchive(). |
| |
| 2016-10-13 Dean Jackson <dino@apple.com> |
| |
| CSS parsing should use Color not RGBA32 |
| https://bugs.webkit.org/show_bug.cgi?id=163423 |
| <rdar://problem/28766903> |
| |
| Reviewed by Simon Fraser. |
| |
| In order to allow CSS to use the ExtendedColor variant of |
| Color, we need to stop using RGBA32. This is a fairly big |
| change that goes through all the places in the parser |
| related to colors, and moves them from RGBA32 to Color. |
| |
| No change in functionality, so covered by existing tests. |
| |
| * WebCore.xcodeproj/project.pbxproj: Add the new ColorHash.h file. |
| |
| * css/CSSPrimitiveValue.cpp: CSSPrimitiveValue now can hold a Color* |
| rather than an unsigned int for colors. |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::cleanup): |
| (WebCore::CSSPrimitiveValue::getRGBColorValue): |
| (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): |
| (WebCore::CSSPrimitiveValue::cloneForCSSOM): |
| (WebCore::CSSPrimitiveValue::equals): |
| * css/CSSPrimitiveValue.h: Move to Color* and also use some |
| nullptrs. |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add a new inline |
| constructor. |
| |
| * css/CSSValuePool.cpp: Move to Color. |
| (WebCore::CSSValuePool::CSSValuePool): |
| (WebCore::CSSValuePool::createColorValue): |
| * css/CSSValuePool.h: Change the ColorValueCache to a new type. |
| |
| * css/StyleResolver.cpp: Move to Color. |
| (WebCore::StyleResolver::colorFromPrimitiveValue): |
| * css/parser/CSSParser.cpp: |
| (WebCore::parseColorValue): |
| (WebCore::CSSParser::parseColor): |
| (WebCore::CSSParser::parseColorFromString): |
| (WebCore::CSSParser::parseSystemColor): |
| (WebCore::fastParseColorInternal): |
| (WebCore::CSSParser::fastParseColor): |
| (WebCore::CSSParser::parseColorFromValue): |
| * css/parser/CSSParser.h: |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::fastParseColorInternal): |
| (WebCore::CSSParserFastPaths::parseColor): |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::consumeColor): |
| * css/parser/SVGCSSParser.cpp: |
| (WebCore::CSSParser::parseSVGValue): |
| (WebCore::CSSParser::parseSVGPaint): |
| (WebCore::CSSParser::parseSVGColor): |
| * editing/EditingStyle.cpp: |
| (WebCore::cssValueToColor): |
| (WebCore::textColorFromStyle): |
| (WebCore::backgroundColorFromStyle): |
| (WebCore::rgbaBackgroundColorInEffect): |
| (WebCore::EditingStyle::prepareToApplyAt): |
| (WebCore::isTransparentColorValue): |
| (WebCore::cssValueToRGBA): Deleted. |
| * editing/cocoa/HTMLConverter.mm: |
| (HTMLConverterCaches::colorPropertyValueForNode): |
| * html/HTMLBodyElement.cpp: |
| (WebCore::HTMLBodyElement::parseAttribute): |
| * html/canvas/CanvasGradient.cpp: |
| (WebCore::CanvasGradient::addColorStop): |
| * html/canvas/CanvasRenderingContext2D.cpp: Ditto, but leave a FIXME to |
| remind myself to come back when colorWithOverrideAlpha has been updated. |
| (WebCore::CanvasRenderingContext2D::setStrokeStyle): |
| (WebCore::CanvasRenderingContext2D::setFillStyle): |
| (WebCore::CanvasRenderingContext2D::setShadowColor): |
| (WebCore::CanvasRenderingContext2D::setShadow): |
| * html/canvas/CanvasStyle.cpp: |
| (WebCore::isCurrentColorString): |
| (WebCore::parseColor): |
| (WebCore::currentColor): |
| (WebCore::parseColorOrCurrentColor): |
| (WebCore::CanvasStyle::createFromString): |
| (WebCore::CanvasStyle::createFromStringWithOverrideAlpha): |
| * html/canvas/CanvasStyle.h: |
| * svg/SVGColor.cpp: |
| (WebCore::SVGColor::colorFromRGBColorString): |
| |
| * platform/graphics/Color.h: Add new constructors for the special |
| empty and deleted Color values used in HashTables. |
| (WebCore::Color::Color): |
| (WebCore::Color::isHashTableDeletedValue): |
| (WebCore::Color::asUint64): New accessor to get the raw uint64_t value. |
| |
| * platform/graphics/ColorHash.h: Added. Implement the traits for a Color HashTable. |
| (WTF::ColorHash::hash): |
| (WTF::ColorHash::equal): |
| (WTF::HashTraits<WebCore::Color>::emptyValue): |
| (WTF::HashTraits<WebCore::Color>::constructDeletedValue): |
| (WTF::HashTraits<WebCore::Color>::isDeletedValue): |
| |
| 2016-10-13 Nan Wang <n_wang@apple.com> |
| |
| AX: [Mac] better accessibility support for Summary elements |
| https://bugs.webkit.org/show_bug.cgi?id=163367 |
| <rdar://problem/28745010> |
| |
| Reviewed by Chris Fleizach. |
| |
| Exposed summary elements as AXButton and used the text node's content |
| as AXTitle. Also exposed the details parent's expanded status on the summary |
| element, so that users would see it as a collapsed/expanded button. |
| |
| Changes are covered in the modified tests. |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::parentObjectUnignored): |
| (WebCore::AccessibilityObject::scrollViewAncestor): |
| (WebCore::AccessibilityObject::headingElementForNode): |
| (WebCore::AccessibilityObject::matchedParent): |
| (WebCore::AccessibilityObject::isDescendantOfObject): |
| (WebCore::AccessibilityObject::isInsideARIALiveRegion): |
| (WebCore::AccessibilityObject::elementAccessibilityHitTest): |
| (WebCore::AccessibilityObject::isExpanded): |
| (WebCore::AccessibilityObject::isARIAHidden): |
| (WebCore::AccessibilityObject::focusableAncestor): |
| (WebCore::AccessibilityObject::editableAncestor): |
| * accessibility/AccessibilityObject.h: |
| (WebCore::AccessibilityObject::isSummary): |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper _accessibilityListAncestor]): |
| (-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]): |
| (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]): |
| (-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]): |
| (-[WebAccessibilityObjectWrapper tableCellParent]): |
| (-[WebAccessibilityObjectWrapper tableParent]): |
| (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): |
| (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]): |
| (-[WebAccessibilityObjectWrapper detailParentForSummaryObject:]): |
| (-[WebAccessibilityObjectWrapper detailParentForObject:]): |
| (matchedParent): Deleted. |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]): |
| (createAccessibilityRoleMap): |
| (-[WebAccessibilityObjectWrapper roleDescription]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| |
| 2016-10-13 Zalan Bujtas <zalan@apple.com> |
| |
| [Clean RenderTree] LayoutTests/imported/blink/fast/table/crash-bad-child-table-continuation.html fails. |
| https://bugs.webkit.org/show_bug.cgi?id=163399 |
| |
| Reviewed by David Hyatt. |
| |
| When we try to insert a renderer before a child whose direct parent is a (anonymus) RenderTable, continuation logic |
| should dismiss the RenderTable as the parent and find a more appropriate ancestor. |
| RenderTables assumes a certain descendant tree structure which might not be available in the continuation. |
| |
| Will be testable with webkit.org/b/162834 |
| |
| * rendering/RenderInline.cpp: |
| (WebCore::canUseAsParentForContinuation): |
| (WebCore::RenderInline::addChildToContinuation): |
| |
| 2016-10-13 Alex Christensen <achristensen@webkit.org> |
| |
| Disable URLParser for non-Safari iOS and Mac apps for now |
| https://bugs.webkit.org/show_bug.cgi?id=163397 |
| |
| Reviewed by Tim Horton. |
| |
| r207268 was an awful hack, and it was insufficient. |
| Disable the URLParser for other apps for now. Hopefully we can enable it everywhere soon. |
| |
| No change in behavior for testing infrastructure. |
| Old URLs were well tested before making the switch, and nothing has changed for them. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| (WebCore::URLParser::parseHostAndPort): |
| (WebCore::URLParser::setEnabled): |
| (WebCore::URLParser::enabled): |
| * platform/URLParser.h: |
| |
| 2016-10-13 Chris Dumez <cdumez@apple.com> |
| |
| Rename [ConstructorTemplate=*] to [LegacyConstructorTemplate=*] |
| https://bugs.webkit.org/show_bug.cgi?id=163390 |
| |
| Reviewed by Darin Adler. |
| |
| Rename [ConstructorTemplate=*] to [LegacyConstructorTemplate=*] as the |
| modern way of doing this is to use a constructor that takes in a |
| dictionary. I am working on getting rid of this extended attribute |
| entirely but the remaining uses require better support for union types. |
| |
| * Modules/applepay/ApplePayValidateMerchantEvent.idl: |
| * Modules/indexeddb/IDBVersionChangeEvent.idl: |
| * Modules/mediastream/RTCTrackEvent.idl: |
| * bindings/scripts/CodeGenerator.pm: |
| (IsConstructorTemplate): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateConstructorDefinition): |
| (IsConstructable): |
| * bindings/scripts/IDLAttributes.txt: |
| * dom/Event.idl: |
| * dom/ProgressEvent.idl: |
| * dom/UIEvent.idl: |
| * html/track/TrackEvent.idl: |
| |
| 2016-10-13 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r207297. |
| |
| This change broke the iOS build. |
| |
| Reverted changeset: |
| |
| "Disable URLParser for non-Safari iOS and Mac apps for now" |
| https://bugs.webkit.org/show_bug.cgi?id=163397 |
| http://trac.webkit.org/changeset/207297 |
| |
| 2016-10-13 Anders Carlsson <andersca@apple.com> |
| |
| Get rid of the HistoryItemVector typedef |
| https://bugs.webkit.org/show_bug.cgi?id=163398 |
| |
| Reviewed by Beth Dakin. |
| |
| Expand the HistoryitemVector typedef instead to make it more clear what types we are dealing with. |
| |
| * history/BackForwardList.cpp: |
| (WebCore::BackForwardList::backListWithLimit): |
| (WebCore::BackForwardList::forwardListWithLimit): |
| (WebCore::BackForwardList::entries): |
| * history/BackForwardList.h: |
| * history/HistoryItem.cpp: |
| (WebCore::HistoryItem::children): |
| * history/HistoryItem.h: |
| * loader/HistoryController.cpp: |
| (WebCore::HistoryController::currentFramesMatchItem): |
| |
| 2016-10-13 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] MediaControls base class |
| https://bugs.webkit.org/show_bug.cgi?id=163387 |
| <rdar://problem/28753955> |
| |
| Reviewed by Dean Jackson. |
| |
| Introducing the new MediaControls class which will serve as a basis for all media controls. |
| We will introduce specific MediaControls subclasses for macOS inline, macOS fullscreen and |
| iOS inline in future patches. |
| |
| Tests: media/modern-media-controls/media-controls/media-controls-constructor.html |
| media/modern-media-controls/media-controls/media-controls-placard.html |
| media/modern-media-controls/media-controls/media-controls-start-button.html |
| |
| * Modules/modern-media-controls/controls/media-controls.css: Added. |
| (.media-controls,): |
| * Modules/modern-media-controls/controls/media-controls.js: Added. |
| (MediaControls.): |
| (MediaControls.prototype.get showsStartButton): |
| (MediaControls.prototype.set showsStartButton): |
| (MediaControls.prototype.get showsPlacard): |
| (MediaControls.prototype.showPlacard): |
| (MediaControls.prototype.hidePlacard): |
| |
| 2016-10-13 Alex Christensen <achristensen@webkit.org> |
| |
| Disable URLParser for non-Safari iOS and Mac apps for now |
| https://bugs.webkit.org/show_bug.cgi?id=163397 |
| |
| Reviewed by Tim Horton. |
| |
| r207268 was an awful hack, and it was insufficient. |
| Disable the URLParser for other apps for now. Hopefully we can enable it everywhere soon. |
| |
| No change in behavior for testing infrastructure. |
| Old URLs were well tested before making the switch, and nothing has changed for them. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| (WebCore::URLParser::parseHostAndPort): |
| (WebCore::URLParser::setEnabled): |
| (WebCore::URLParser::enabled): |
| * platform/URLParser.h: |
| |
| 2016-10-13 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] TimeControl and TimeLabel |
| https://bugs.webkit.org/show_bug.cgi?id=163356 |
| <rdar://problem/28741376> |
| |
| Reviewed by Dean Jackson. |
| |
| We introduce the TimeControl and TimeLabel classes. A TimeControl object |
| provides two TimeLabels, one for the elapsed time, one for the remaining |
| time, and a Scrubber in between them. Depending on a TimeControl's width, |
| it will adjust its layout such that the scrubber takes all the available |
| space between the labels, and can indicate whether it's large enough to |
| meet the minimal required width to show the scrubber, such that a container |
| node may decide not to show the TimeControl at all. |
| |
| TimeLabel nodes simply show an integer time value in miliseconds in a |
| nicely formatted way. |
| |
| Tests: media/modern-media-controls/time-control/time-control.html |
| media/modern-media-controls/time-label/time-label.html |
| |
| * Modules/modern-media-controls/controls/time-control.js: Added. |
| (TimeControl.prototype.get width): |
| (TimeControl.prototype.set width): |
| (TimeControl.prototype.get isSufficientlyWide): |
| * Modules/modern-media-controls/controls/time-label.css: Added. |
| (.time-label): |
| * Modules/modern-media-controls/controls/time-label.js: Added. |
| (TimeLabel.prototype.get value): |
| (TimeLabel.prototype.set value): |
| (TimeLabel.prototype.commitProperty): |
| (TimeLabel.prototype._formattedTime): |
| |
| 2016-10-13 Jer Noble <jer.noble@apple.com> |
| |
| CRASH at WebCore::SourceBuffer::removeCodedFrames + 37 |
| https://bugs.webkit.org/show_bug.cgi?id=163336 |
| |
| Reviewed by Alex Christensen. |
| |
| Test: media/media-source/media-source-remove-crash.html |
| |
| A null-deref crash can occur if a SourceBuffer is removed from a MediaSource after |
| SourceBuffer.remove() is called, but before the removeTimer is fired. |
| |
| * Modules/mediasource/SourceBuffer.cpp: |
| (WebCore::SourceBuffer::removeTimerFired): |
| |
| 2016-10-13 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [SOUP] SHOULD NEVER BE REACHED ../../Source/WebCore/platform/URL.cpp(1291) : void WebCore::URL::parse(const WTF::String&) |
| https://bugs.webkit.org/show_bug.cgi?id=163392 |
| |
| Reviewed by Alex Christensen. |
| |
| Fix the URL constructor to work with URLParser. |
| |
| * platform/soup/URLSoup.cpp: |
| (WebCore::URL::URL): |
| |
| 2016-10-13 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r207286. |
| |
| Caused LayoutTest http/tests/misc/acid3.html to fail. |
| |
| Reverted changeset: |
| |
| "Share inline stylesheets between shadow trees" |
| https://bugs.webkit.org/show_bug.cgi?id=163353 |
| http://trac.webkit.org/changeset/207286 |
| |
| 2016-10-13 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-grid] Use min-size instead of min-content contribution for intrinsic maximums resolution |
| https://bugs.webkit.org/show_bug.cgi?id=163283 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| This was recently modified in the specs |
| https://hg.csswg.org/drafts/diff/575fb847e29d/css-grid/Overview.bs. Specifically this is |
| addressing the last one. It used to be "min-content contribution" but now it says "min-size |
| contribution". |
| |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::currentItemSizeForTrackSizeComputationPhase): |
| |
| 2016-10-11 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-grid] Fix intrinsic maximums resolution with fit-content and auto |
| https://bugs.webkit.org/show_bug.cgi?id=163282 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| The step 2.5 in section 12.5 https://drafts.csswg.org/css-grid/#algo-content of the specs, |
| details how to sizes tracks with intrinsic max track sizing functions. |
| |
| Not so long ago there were only two max track sizing functions min-content and max-content |
| (auto was always resolved to max-content). However there were some recent changes that force |
| us to consider 2 new values: auto (which is not internally translated to max-content |
| although it still works the same) and specially the newly added fit-content. |
| |
| Some of the new test cases are commented due to bug http://wkb.ug/163283. |
| |
| Test: fast/css-grid-layout/grid-intrinsic-maximums.html |
| |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase): |
| * rendering/style/GridTrackSize.h: |
| (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): |
| (WebCore::GridTrackSize::hasIntrinsicMinTrackBreadth): |
| (WebCore::GridTrackSize::hasIntrinsicMaxTrackBreadth): |
| (WebCore::GridTrackSize::hasAutoOrMinContentMinTrackBreadthAndIntrinsicMaxTrackBreadth): |
| |
| 2016-10-13 Miguel Gomez <magomez@igalia.com> |
| |
| [GTK] Video playback doesn't work properly with accelerated compositing disabled |
| https://bugs.webkit.org/show_bug.cgi?id=163386 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Trigger a repaint of the player when a new frame arrives and accelerated compositing is disabled. |
| |
| Covered by existent tests. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): |
| |
| 2016-10-13 Antti Koivisto <antti@apple.com> |
| |
| Share inline stylesheets between shadow trees |
| https://bugs.webkit.org/show_bug.cgi?id=163353 |
| |
| Reviewed by Ryosuke Niwa and Andreas Kling. |
| |
| If shadow trees have identical inline stylesheets the data structures can be shared. |
| In future this will also allow sharing style resolvers. |
| |
| * css/parser/CSSParserMode.h: |
| (WebCore::CSSParserContextHash::hash): |
| (WebCore::CSSParserContextHash::equal): |
| (WTF::HashTraits<WebCore::CSSParserContext>::constructDeletedValue): |
| (WTF::HashTraits<WebCore::CSSParserContext>::isDeletedValue): |
| (WTF::HashTraits<WebCore::CSSParserContext>::emptyValue): |
| |
| Make CSSParserContext hashable. |
| |
| * dom/InlineStyleSheetOwner.cpp: |
| (WebCore::makeInlineStyleSheetCacheKey): |
| (WebCore::inlineStyleSheetCache): |
| |
| Implement a simple cache for sharing stylesheets with identical text and context. |
| |
| (WebCore::InlineStyleSheetOwner::createSheet): |
| (WebCore::InlineStyleSheetOwner::clearCache): |
| * dom/InlineStyleSheetOwner.h: |
| * platform/MemoryPressureHandler.cpp: |
| (WebCore::MemoryPressureHandler::releaseNoncriticalMemory): |
| |
| 2016-10-13 Antti Koivisto <antti@apple.com> |
| |
| Revert patch landed with wrong commit message. |
| |
| 2016-10-12 Per Arne Vollan <pvollan@apple.com> |
| |
| [Win] Encode function pointers. |
| https://bugs.webkit.org/show_bug.cgi?id=163331 |
| |
| Reviewed by Brent Fulgham. |
| |
| We should encode stored function pointers. |
| |
| * platform/win/SoftLinking.h: |
| |
| 2016-10-13 Youenn Fablet <youenn@apple.com> |
| |
| Remove CachedResourceRequest::mutableResourceRequest |
| https://bugs.webkit.org/show_bug.cgi?id=163277 |
| |
| Reviewed by Sam Weinig. |
| |
| No change of behavior. |
| |
| Removing CachedResourceRequest::mutableResourceRequest requires call sites to either update the ResourceRequest |
| before creating the CachedResourceRequest or to add methods at CachedResourceRequest. |
| |
| Adding CachedResourceRequest::releaseResourceRequest for CachedResource constructor. |
| |
| Most new CachedResourceRequest methods are used by CachedResourceLoader which is passed a CachedResourceRequest. |
| This allows code in CachedResourceLoader to be easier to read. |
| |
| * css/CSSImageSetValue.cpp: |
| (WebCore::CSSImageSetValue::loadBestFitImage): |
| * css/CSSImageValue.cpp: |
| (WebCore::CSSImageValue::loadImage): |
| * dom/ScriptElement.cpp: |
| (WebCore::ScriptElement::requestScriptWithCache): |
| * loader/CrossOriginAccessControl.cpp: |
| (WebCore::createAccessControlPreflightRequest): |
| * loader/CrossOriginAccessControl.h: |
| * loader/CrossOriginPreflightChecker.cpp: |
| (WebCore::CrossOriginPreflightChecker::startPreflight): |
| (WebCore::CrossOriginPreflightChecker::doPreflight): |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::loadRequest): |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResourceLoader::requestResource): |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::CachedResource): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::requestImage): |
| (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): |
| (WebCore::CachedResourceLoader::prepareFetch): |
| (WebCore::CachedResourceLoader::updateHTTPRequestHeaders): |
| (WebCore::CachedResourceLoader::requestResource): |
| (WebCore::acceptHeaderValueFromType): Deleted. |
| (WebCore::updateRequestAccordingCacheMode): Deleted. |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin): |
| (WebCore::CachedResourceRequest::updateForAccessControl): |
| (WebCore::CachedResourceRequest::upgradeInsecureRequestIfNeeded): |
| (WebCore::CachedResourceRequest::setDomainForCachePartition): |
| (WebCore::acceptHeaderValueFromType): |
| (WebCore::CachedResourceRequest::setAcceptHeaderIfNone): |
| (WebCore::CachedResourceRequest::updateAccordingCacheMode): |
| (WebCore::CachedResourceRequest::removeFragmentIdentifierIfNeeded): |
| (WebCore::CachedResourceRequest::applyBlockedStatus): |
| * loader/cache/CachedResourceRequest.h: |
| (WebCore::CachedResourceRequest::releaseResourceRequest): |
| (WebCore::CachedResourceRequest::setCachingPolicy): |
| (WebCore::CachedResourceRequest::mutableResourceRequest): Deleted. |
| (WebCore::CachedResourceRequest::setCacheModeToNoStore): Deleted. |
| * loader/icon/IconLoader.cpp: |
| (WebCore::IconLoader::startLoading): |
| * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: |
| (WebCore::WebCoreAVCFResourceLoader::startLoading): |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: |
| (WebCore::WebCoreAVFResourceLoader::startLoading): |
| |
| 2016-10-13 Antti Koivisto <antti@apple.com> |
| |
| Support scoped style for user agent shadow trees |
| https://bugs.webkit.org/show_bug.cgi?id=163212 |
| <rdar://problem/28715318> |
| |
| Reviewed by Ryosuke Niwa and Andreas Kling. |
| |
| This patch adds support for user agent shadow trees that have scoped style. This means |
| that the shadows can be styled via <style> elements contained in the tree instead of |
| using pseudo elements on the global UA sheet. Since the style is scoped it can use |
| normal id and class selectors. |
| |
| Elements in the shadow tree can still be exposed for author styling if needed by giving |
| them pseudo ids |
| |
| The patch also uses the new mechanism for the <meter> element. |
| |
| The mechanism is not optimized yet, each shadow tree gets its own copy of style-related data |
| structures. This can be improved later. |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/ElementRuleCollector.cpp: |
| (WebCore::MatchRequest::MatchRequest): |
| (WebCore::ElementRuleCollector::addMatchedRule): |
| (WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules): |
| |
| Make treeContextOrdinal an int so we can use negative ordinals. This is used to allow author pseudo |
| elements from earlier tree context to win over the shadow tree (matching CSS scoping spec language). |
| |
| * css/ElementRuleCollector.h: |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::MatchResult::addMatchedProperties): |
| (WebCore::StyleResolver::CascadedProperties::addImportantMatches): |
| * css/StyleResolver.h: |
| * css/html.css: |
| (meter::-webkit-meter-inner-element): Deleted. |
| (meter::-webkit-meter-bar): Deleted. |
| (meter::-webkit-meter-optimum-value): Deleted. |
| (meter::-webkit-meter-suboptimum-value): Deleted. |
| (meter::-webkit-meter-even-less-good-value): Deleted. |
| |
| Remove meter pseudo elements from the UA sheet. |
| |
| * html/HTMLMeterElement.cpp: |
| (WebCore::HTMLMeterElement::childShouldCreateRenderer): |
| |
| Don't create shadow renderers when we have appearance (are using RenderMeter). |
| |
| (WebCore::setValueClass): |
| |
| Move this logic here from MeterShadowElement.cpp. |
| Set both class and pseudo id. The latter is needed to keep author styling working. |
| |
| (WebCore::HTMLMeterElement::didElementStateChange): |
| (WebCore::HTMLMeterElement::renderMeter): |
| |
| RenderMeter is now only instantiated when appearance is enabled. |
| |
| (WebCore::HTMLMeterElement::didAddUserAgentShadowRoot): |
| |
| Build the shadow tree out of <div>s instead of special shadow elements. |
| |
| * html/HTMLMeterElement.h: |
| * html/shadow/MeterShadowElement.cpp: Removed. |
| * html/shadow/MeterShadowElement.h: Removed. |
| |
| Not needed anymore. |
| |
| * html/shadow/meterElementShadow.css: Added. |
| (div#inner): |
| (div#bar): |
| (div#value): |
| (div#value.optimum): |
| (div#value.suboptimum): |
| (div#value.even-less-good): |
| |
| Stylesheet for meter element shadow tree using normal id and class selectors. |
| |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::shouldUseSharedUserAgentShadowTreeStyleResolver): |
| |
| Switch to per-scope style resolver for UA shadow trees if there is stylesheets in the tree. |
| |
| (WebCore::Style::Scope::resolver): |
| (WebCore::Style::Scope::resolverIfExists): |
| * style/StyleScope.h: |
| |
| 2016-10-12 Chris Dumez <cdumez@apple.com> |
| |
| [Web IDL] Drop support for legacy [ConstructorConditional=*] |
| https://bugs.webkit.org/show_bug.cgi?id=163368 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Drop support for legacy [ConstructorConditional=*] webkit-specific IDL |
| extended attribute. This was introduced to disable DOM4 event |
| constructors at compile time. However, nowadays, those constructors are |
| enabled everywhere. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * bindings/scripts/CodeGenerator.pm: |
| (GenerateConstructorConditionalString): Deleted. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateConstructorHelperMethods): |
| * bindings/scripts/IDLAttributes.txt: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| (WebCore::JSTestInterfaceConstructor::getConstructData): Deleted. |
| * bindings/scripts/test/TestInterface.idl: |
| * dom/UIEvent.idl: |
| |
| 2016-10-12 Chris Dumez <cdumez@apple.com> |
| |
| The bindings generator should provide a better error message when it does not find a dictionary definition |
| https://bugs.webkit.org/show_bug.cgi?id=163377 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| The bindings generator should provide a better error message when it does |
| not find a dictionary definition. |
| |
| * bindings/scripts/CodeGenerator.pm: |
| (GetDictionaryByName): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (assert): |
| (GenerateDictionaryImplementationContent): |
| (GenerateHeader): |
| (GenerateDictionaryHeader): |
| |
| 2016-10-12 Chris Dumez <cdumez@apple.com> |
| |
| Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163369 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Update WebKitMediaKeyMessageEvent / WebKitMediaKeyNeededEvent to stop |
| using legacy [ConstructorTemplate=Event] and use regular constructors |
| instead. |
| |
| This also adds support for having dictionary members that are typed |
| arrays because this was needed. |
| |
| Test: fast/events/webkit-media-key-events-constructor.html |
| |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp: |
| (WebCore::WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent): |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h: |
| (WebCore::WebKitMediaKeyMessageEvent::create): |
| (WebCore::WebKitMediaKeyMessageEvent::createForBindings): Deleted. |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl: |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp: |
| (WebCore::WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent): |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h: |
| (WebCore::WebKitMediaKeyNeededEvent::create): |
| (WebCore::WebKitMediaKeyNeededEvent::createForBindings): Deleted. |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl: |
| * bindings/js/JSDOMConvert.h: |
| (WebCore::Converter<IDLInterface<JSC::GenericTypedArrayView<Adaptor>>>::convert): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDefaultValue): |
| * dom/InputEvent.cpp: |
| (WebCore::InputEvent::InputEvent): |
| * dom/InputEvent.h: |
| * dom/InputEvent.idl: |
| |
| 2016-10-12 Chris Dumez <cdumez@apple.com> |
| |
| Update HTMLSelectElement::recalcListItems() to ignore nested optgroup elements |
| https://bugs.webkit.org/show_bug.cgi?id=163358 |
| |
| Reviewed by Kent Tamura. |
| |
| Update HTMLSelectElement::recalcListItems() to ignore nested optgroup elements. |
| As per the specification, we only want optgroup elements that are direct |
| children of the select element. This also matches the behavior of Chrome. |
| |
| Test: fast/dom/HTMLSelectElement/nested-optgroup.html |
| |
| * html/HTMLSelectElement.cpp: |
| (WebCore::HTMLSelectElement::recalcListItems): |
| |
| 2016-10-12 Zalan Bujtas <zalan@apple.com> |
| |
| RenderRubyRun should not mark child renderers dirty at the end of layout. |
| https://bugs.webkit.org/show_bug.cgi?id=163359 |
| <rdar://problem/28711840> |
| |
| Reviewed by David Hyatt. |
| |
| The current layout logic does not support marking renderers dirty for subsequent layouts. |
| Layout needs to exit with a clean tree. |
| Should relayoutChild be insufficient, we could also mark the base/text dirty for the justified content. |
| |
| Test: fast/ruby/rubyrun-has-bad-child.html |
| |
| * rendering/RenderBlockLineLayout.cpp: |
| (WebCore::RenderBlockFlow::updateRubyForJustifiedText): |
| * rendering/RenderRubyRun.cpp: |
| (WebCore::RenderRubyRun::layout): |
| (WebCore::RenderRubyRun::layoutBlock): |
| * rendering/RenderRubyRun.h: |
| |
| 2016-10-12 Simon Fraser <simon.fraser@apple.com> |
| |
| Crash when using megaplan.ru |
| https://bugs.webkit.org/show_bug.cgi?id=163276 |
| rdar://problem/28446672 |
| |
| Reviewed by Sam Weinig. |
| |
| Make sure we allocate enough space in the vector of CGPoints that we use for path building. |
| |
| Test: css3/masking/large-clip-path.html |
| |
| * platform/graphics/cg/PathCG.cpp: |
| (WebCore::Path::polygonPathFromPoints): |
| |
| 2016-10-12 Alex Christensen <achristensen@webkit.org> |
| |
| Fix out-of-bounds reading in URLParser when parsing improperly percent-encoded values |
| https://bugs.webkit.org/show_bug.cgi?id=163376 |
| |
| Reviewed by Saam Barati. |
| |
| Covered by new API tests, which used to crash under asan. |
| |
| * platform/URLParser.cpp: |
| (WebCore::percentDecode): |
| If you subtract 2 from size_t's smaller than 2, you're gonna have a bad time. |
| |
| 2016-10-12 Alex Christensen <achristensen@webkit.org> |
| |
| Mail needs nonspecial URLs to keep case in host and not have slash after host |
| https://bugs.webkit.org/show_bug.cgi?id=163373 |
| |
| Reviewed by Saam Barati. |
| |
| Mail uses urls like scheme://HoSt which were not changed when canonicalized |
| before enabling the URLParser but now are canonicalized to scheme://host/ |
| I manually verified this fixes the issue. |
| This should be reverted once Mail will accept modern canonicalized URLs. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| (WebCore::URLParser::parseHostAndPort): |
| * platform/URLParser.h: |
| If the application is mail and the scheme is nonspecial, don't make the host lower case and don't add a slash after the host. |
| |
| 2016-10-11 Dean Jackson <dino@apple.com> |
| |
| Add preliminary support for extended colors to WebCore::Color |
| https://bugs.webkit.org/show_bug.cgi?id=162878 |
| <rdar://problem/28596413> |
| |
| Reviewed by Darin Adler. |
| |
| Add an ExtendedColor class that will hold the data necessary |
| for wider-than-sRGB (and more precise) colors. In order to |
| avoid increasing the size of Color, implement a tagged |
| pointer that is either referencing an ExtendedColor, or |
| is a 64-bit number with the top 32-bits being the RGBA, and |
| the bottom 2 bits indicating an invalid RGBA or a valid RGBA, |
| plus the tag. |
| |
| Add copy constructors and operator= so that the new Color objects |
| are correctly copied. |
| |
| There isn't yet a way to create an ExtendedColor. That's coming |
| in a followup patch (and will require changes to the CSS parser). |
| |
| Covered by existing tests, and new API tests in Color. |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: Add new files. |
| |
| * platform/graphics/Color.cpp: Update everything to use m_rgbaAndFlags |
| instead of m_color + m_valid. |
| (WebCore::Color::Color): |
| (WebCore::Color::~Color): |
| (WebCore::Color::operator=): |
| (WebCore::Color::nameForRenderTreeAsText): |
| (WebCore::Color::setNamedColor): |
| (WebCore::Color::light): |
| (WebCore::Color::dark): |
| (WebCore::Color::setValid): |
| (WebCore::Color::setExtended): |
| (WebCore::Color::isExtended): |
| (WebCore::Color::asExtended): |
| * platform/graphics/Color.h: Implement the tagged union. |
| (WebCore::Color::Color): |
| (WebCore::Color::isValid): |
| (WebCore::Color::red): |
| (WebCore::Color::green): |
| (WebCore::Color::blue): |
| (WebCore::Color::alpha): |
| (WebCore::Color::rgb): |
| (WebCore::Color::setRGB): |
| (WebCore::operator==): |
| |
| * platform/graphics/ExtendedColor.cpp: New file. Holds floating point |
| red, green, blue and alpha, plus a color space. |
| (WebCore::ExtendedColor::create): |
| (WebCore::ExtendedColor::~ExtendedColor): |
| (WebCore::ExtendedColor::ref): |
| (WebCore::ExtendedColor::deref): |
| * platform/graphics/ExtendedColor.h: |
| (WebCore::ExtendedColor::red): |
| (WebCore::ExtendedColor::green): |
| (WebCore::ExtendedColor::blue): |
| (WebCore::ExtendedColor::alpha): |
| (WebCore::ExtendedColor::colorSpace): |
| (WebCore::ExtendedColor::ExtendedColor): |
| |
| * platform/graphics/cg/ColorCG.cpp: Update the constructors for |
| the platform specific color classes. |
| (WebCore::Color::Color): |
| * platform/graphics/gtk/ColorGtk.cpp: |
| (WebCore::Color::Color): |
| * platform/graphics/win/ColorDirect2D.cpp: |
| (WebCore::Color::Color): |
| |
| * rendering/RenderEmbeddedObject.cpp: Use NeverDestroyed. |
| (WebCore::replacementTextRoundedRectPressedColor): |
| (WebCore::replacementTextRoundedRectColor): |
| (WebCore::replacementTextColor): |
| (WebCore::unavailablePluginBorderColor): |
| |
| * rendering/RenderFrameSet.cpp: Ditto. |
| (WebCore::borderStartEdgeColor): |
| (WebCore::borderEndEdgeColor): |
| (WebCore::borderFillColor): |
| |
| * rendering/RenderTableCell.cpp: This grows in size slightly |
| because it can no longer pack bits. |
| |
| 2016-10-12 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Sliders: scrubber and volume |
| https://bugs.webkit.org/show_bug.cgi?id=163328 |
| <rdar://problem/28733838> |
| |
| Reviewed by Dean Jackson. |
| |
| We add a new Slider class that provides a custom slider backed by an |
| invisible <input type="range"> element and a fill underlay to provide |
| a custom color between the left edge of the slider and the slider thumb. |
| As the slider's value changes, a UI delegate receives messages to track |
| such changes. |
| |
| Tests: media/modern-media-controls/scrubber/scrubber.html |
| media/modern-media-controls/slider/slider-constructor.html |
| media/modern-media-controls/slider/slider-fill.html |
| media/modern-media-controls/slider/slider-styles.html |
| media/modern-media-controls/volume-slider/volume-slider-value.html |
| media/modern-media-controls/volume-slider/volume-slider.html |
| |
| * Modules/modern-media-controls/controls/scrubber.css: Added. |
| (.scrubber.slider > input::-webkit-slider-thumb): |
| * Modules/modern-media-controls/controls/scrubber.js: Added. |
| (Scrubber): |
| * Modules/modern-media-controls/controls/slider.css: Added. |
| (.slider): |
| (.slider > input,): |
| (.slider > .fill): |
| (.slider > input): |
| (.slider > input::-webkit-slider-thumb): |
| * Modules/modern-media-controls/controls/slider.js: Added. |
| (Slider.prototype.get value): |
| (Slider.prototype.set value): |
| (Slider.prototype.get width): |
| (Slider.prototype.set width): |
| (Slider.prototype.handleEvent): |
| (Slider.prototype.commitProperty): |
| (Slider.prototype._handleInputEvent): |
| (Slider.prototype._handleChangeEvent): |
| (Slider.prototype._updateFill): |
| * Modules/modern-media-controls/controls/volume-slider.css: Added. |
| (.volume.slider > input::-webkit-slider-thumb): |
| * Modules/modern-media-controls/controls/volume-slider.js: Added. |
| (VolumeSlider): |
| |
| 2016-10-12 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Add experimental support for the "formatForeColor" inputType |
| https://bugs.webkit.org/show_bug.cgi?id=163348 |
| <rdar://problem/28739334> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Adds support for the "formatForeColor" attribute. This patch introduces a simple hook in Editor.cpp to extract |
| data for an input event from an EditingStyle when performing an editing action. |
| |
| Test: fast/events/input-events-forecolor-data.html |
| |
| * editing/EditCommand.cpp: |
| (WebCore::inputTypeNameForEditingAction): |
| * editing/Editor.cpp: |
| (WebCore::inputEventDataForEditingStyleAndAction): |
| |
| Added a new static helper to compute the data attribute of an InputEvent when handling a style change. |
| |
| (WebCore::Editor::computeAndSetTypingStyle): |
| |
| 2016-10-12 Chris Dumez <cdumez@apple.com> |
| |
| [Web IDL] Generated bindings include the wrong header when ImplementedAs is used on a dictionary |
| https://bugs.webkit.org/show_bug.cgi?id=163352 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Generated bindings include the wrong header when ImplementedAs is used |
| on a dictionary. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDictionaryHeader): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameterCaller): |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: |
| (WebCore::convertDictionary<DictionaryImplName>): |
| (WebCore::convertDictionary<TestStandaloneDictionary>): Deleted. |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: |
| * bindings/scripts/test/TestStandaloneDictionary.idl: |
| |
| 2016-10-12 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [DOMJIT][JSC] Explore the way to embed nodeType into JSC::JSType in WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=163245 |
| |
| Reviewed by Filip Pizlo. |
| |
| Node.nodeType accessor is so frequently called. For example, jQuery's $ function uses |
| this to distinguish DOM objects from the other JS objects. So every time you call `$(dom)`, |
| nodeType accessor is called. In addition to that, jQuery's prev, next, parent etc. also uses |
| this `nodeType`. And Ember.js also uses it. And ... So this function is super critical for DOM |
| performance. |
| |
| The challenge is that there is no room for putting NodeType into C++ Node class. Node class |
| has a 32bit field to store some data. However, these bits are already exhausted. Extending |
| Node class is unacceptable since it significantly enlarges memory consumption of WebKit (Node |
| is everywhere!). Unfortunately, current Node::nodeType is implemented as a virtual function |
| even though this function is frequently called from JS world. |
| |
| Interestingly, we already store some duplicate data in JSObject, JSC::JSType. WebCore already |
| extends it with JSElementType, JSNodeType, and JSDocumentWrapperType. And these types are |
| corresponding to specific NodeTypes. For example, JSElementType should have ELEMENT_NODE type. |
| |
| This patch further extends this JSC::JSType in WebCore side safely. We embed NodeType bits into |
| JSC::JSType. This design offers significantly faster nodeType implementation. Furthermore, it |
| makes DOMJIT easy for nodeType accessor. |
| |
| Even without the IC change[1], Dromaeo dom-query shows 8 - 10% improvement, |
| 1452.96 runs/s vs 1578.56 runs/s. We can expect that this improvement will be applied to the |
| other benchmarks / real applications when the IC change is landed. |
| |
| [1]: https://bugs.webkit.org/show_bug.cgi?id=163226 |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSDOMWrapper.h: |
| * bindings/js/JSNodeCustom.h: |
| (WebCore::JSNode::nodeType): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GetJSTypeForNode): |
| (GenerateHeader): |
| * dom/Node.idl: |
| * dom/NodeConstants.h: Copied from Source/JavaScriptCore/domjit/DOMJITGetterSetter.h. |
| * domjit/JSNodeDOMJIT.cpp: |
| (WebCore::createCallDOMForOffsetAccess): |
| (WebCore::NodeFirstChildDOMJIT::callDOM): |
| (WebCore::NodeLastChildDOMJIT::callDOM): |
| (WebCore::NodeNextSiblingDOMJIT::callDOM): |
| (WebCore::NodePreviousSiblingDOMJIT::callDOM): |
| (WebCore::NodeParentNodeDOMJIT::callDOM): |
| (WebCore::NodeNodeTypeDOMJIT::checkDOM): |
| (WebCore::NodeNodeTypeDOMJIT::callDOM): |
| |
| 2016-10-12 Chris Dumez <cdumez@apple.com> |
| |
| Update more events to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163339 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Update more events to stop using legacy [ConstructorTemplate=Event] |
| and use regular constructors instead. |
| |
| No new tests, updated existing tests. |
| |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| (WebCore::convertDictionary<TestEventConstructor::Init>): |
| (WebCore::JSTestEventConstructorConstructor::construct): |
| (WebCore::JSTestEventConstructorConstructor::prototypeForStructure): |
| (WebCore::JSTestEventConstructor::JSTestEventConstructor): |
| (WebCore::JSTestEventConstructor::createPrototype): |
| (WebCore::JSTestEventConstructorPrototype::create): Deleted. |
| (WebCore::JSTestEventConstructorPrototype::createStructure): Deleted. |
| (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype): Deleted. |
| (WebCore::setJSTestEventConstructorConstructor): Deleted. |
| (WebCore::JSTestEventConstructor::getConstructor): Deleted. |
| * bindings/scripts/test/JS/JSTestEventConstructor.h: |
| (WebCore::JSTestEventConstructor::wrapped): |
| (WebCore::JSTestEventConstructor::create): Deleted. |
| (WebCore::toJS): Deleted. |
| (WebCore::toJSNewlyCreated): Deleted. |
| * bindings/scripts/test/TestEventConstructor.idl: |
| * css/CSSFontFaceLoadEvent.cpp: |
| (WebCore::CSSFontFaceLoadEvent::CSSFontFaceLoadEvent): |
| * css/CSSFontFaceLoadEvent.h: |
| * css/CSSFontFaceLoadEvent.idl: |
| * html/canvas/WebGLContextEvent.cpp: |
| (WebCore::WebGLContextEvent::WebGLContextEvent): |
| * html/canvas/WebGLContextEvent.h: |
| * html/canvas/WebGLContextEvent.idl: |
| * storage/StorageEvent.cpp: |
| (WebCore::StorageEvent::create): |
| (WebCore::StorageEvent::StorageEvent): |
| * storage/StorageEvent.h: |
| * storage/StorageEvent.idl: |
| |
| 2016-10-12 Andreas Kling <akling@apple.com> |
| |
| Make Document::existingAXObjectCache() fast with accessibility disabled. |
| <https://webkit.org/b/163347> |
| |
| Reviewed by Antti Koivisto. |
| |
| Instruments says we were spending 2.3% of Dromaeo/dom-modify.html in this function, |
| traversing ancestors. Track whether we've ever had a cache, and use that knowledge |
| to return early if possible. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::existingAXObjectCache): |
| (WebCore::Document::axObjectCache): |
| |
| 2016-10-12 Jeremy Huddleston Sequoia <jeremyhu@apple.com> |
| |
| [SOUP] trunk r207192 fails to compile due to missing std::function being unavailable (missing #include <functional>) |
| https://bugs.webkit.org/show_bug.cgi?id=163340 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * platform/network/soup/SoupNetworkSession.h: Add missing #include <functional> |
| |
| 2016-10-12 Brent Fulgham <bfulgham@apple.com> |
| |
| [WebGL] Revise vertex array attribute checks to account for lazy memory allocation. |
| https://bugs.webkit.org/show_bug.cgi?id=163149 |
| <rdar://problem/28629774> |
| |
| Reviewed by Dean Jackson. |
| |
| Tested by fast/canvas/webgl/webgl-drawarrays-crash-2.html |
| |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::validateVertexAttributes): |
| |
| 2016-10-12 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Now playing media sessions are always cleared for the active foreground tab |
| https://bugs.webkit.org/show_bug.cgi?id=163310 |
| <rdar://problem/28573301> |
| |
| Reviewed by Jer Noble. |
| |
| Currently, we clear out Now Playing info whenever we set the visibility of Now Playing controls to Never. This |
| is incorrect, as the Now Playing session needs to still be active (just not visible) in this state. Instead, we |
| should not be taking the active/foregrounded-ness of a media session for Now Playing into account in |
| MediaElementSession::canShowControlsManager so that even if a media session is in the active/foreground tab, we |
| will update the Now Playing session with the latest info. However, when setting the visibility, we now check |
| and see if the session allows Now Playing visibility, and set the Now Playing visibility to Always or Never |
| depending on the answer. |
| |
| Tweaked existing unit tests in NowPlayingControlsTests. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::canShowControlsManager): |
| (WebCore::MediaElementSession::allowsNowPlayingControlsVisibility): |
| (WebCore::MediaElementSession::pageAllowsNowPlayingControls): Deleted. |
| * html/MediaElementSession.h: |
| * platform/audio/PlatformMediaSession.h: |
| (WebCore::PlatformMediaSession::allowsNowPlayingControlsVisibility): |
| * platform/audio/mac/MediaSessionManagerMac.mm: |
| (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): |
| |
| 2016-10-12 Zalan Bujtas <zalan@apple.com> |
| |
| Refactor LineLayoutState's float box handling. |
| https://bugs.webkit.org/show_bug.cgi?id=163286 |
| |
| Reviewed by David Hyatt. |
| |
| We keep track of float boxes both per line (RootInlineBox::m_floats) and |
| per flow block (LineLayoutState::m_floats) during layout. |
| As we lay out the lines and iterate through RootInlineBox::m_floats, we |
| increment LineLayoutState::m_floatIndex. This LineLayoutState::m_floatIndex is |
| later used to find the matching float box in the per-block-flow float list. |
| This logic works fine as long as the lists and the index manipulation are tightly coded. |
| However due to the complexity of the line/float layout code, this is no longer the case. |
| |
| This patch makes float box handling more secure by changing this index based setup |
| to a list iterator. It helps to eliminate potential vector overflow issues. |
| |
| LineLayoutState::FloatList (new class) keeps track of all the floats for the block flow. |
| It groups the float box related functions/members and provides an iterator interface to ensure safer |
| syncing between this and the line based floats. |
| |
| No change in functionality. |
| |
| * rendering/RenderBlockFlow.h: |
| * rendering/RenderBlockLineLayout.cpp: |
| (WebCore::RenderBlockFlow::appendFloatingObjectToLastLine): |
| (WebCore::repaintDirtyFloats): |
| (WebCore::RenderBlockFlow::layoutRunsAndFloats): |
| (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): |
| (WebCore::RenderBlockFlow::linkToEndLineIfNeeded): |
| (WebCore::RenderBlockFlow::layoutLineBoxes): |
| (WebCore::RenderBlockFlow::checkFloatInCleanLine): |
| (WebCore::RenderBlockFlow::determineStartPosition): |
| (WebCore::RenderBlockFlow::determineEndPosition): |
| (WebCore::RenderBlockFlow::repaintDirtyFloats): Deleted. |
| (WebCore::RenderBlockFlow::checkFloatsInCleanLine): Deleted. |
| * rendering/line/LineLayoutState.h: |
| (WebCore::FloatWithRect::create): |
| (WebCore::FloatWithRect::renderer): |
| (WebCore::FloatWithRect::rect): |
| (WebCore::FloatWithRect::everHadLayout): |
| (WebCore::FloatWithRect::adjustRect): |
| (WebCore::FloatWithRect::FloatWithRect): |
| (WebCore::LineLayoutState::FloatList::append): |
| (WebCore::LineLayoutState::FloatList::setLastFloat): |
| (WebCore::LineLayoutState::FloatList::lastFloat): |
| (WebCore::LineLayoutState::FloatList::setLastCleanFloat): |
| (WebCore::LineLayoutState::FloatList::lastCleanFloat): |
| (WebCore::LineLayoutState::FloatList::floatWithRect): |
| (WebCore::LineLayoutState::FloatList::begin): |
| (WebCore::LineLayoutState::FloatList::end): |
| (WebCore::LineLayoutState::FloatList::find): |
| (WebCore::LineLayoutState::FloatList::isEmpty): |
| (WebCore::LineLayoutState::LineLayoutState): |
| (WebCore::LineLayoutState::floatList): |
| (WebCore::LineLayoutState::lastFloat): Deleted. |
| (WebCore::LineLayoutState::setLastFloat): Deleted. |
| (WebCore::LineLayoutState::floats): Deleted. |
| (WebCore::LineLayoutState::floatIndex): Deleted. |
| (WebCore::LineLayoutState::setFloatIndex): Deleted. |
| |
| 2016-10-12 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Unreviewed, fix Windows build break after r207182. |
| |
| * platform/graphics/cg/ImageDecoderCG.cpp: |
| |
| 2016-10-12 Chris Dumez <cdumez@apple.com> |
| |
| Update remaining DOM events to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163319 |
| |
| Reviewed by Darin Adler. |
| |
| Update remaining DOM events to stop using legacy [ConstructorTemplate=Event] |
| and use regular constructors instead. |
| |
| No new tests, updated existing tests. |
| |
| * dom/AutocompleteErrorEvent.h: |
| * dom/AutocompleteErrorEvent.idl: |
| * dom/BeforeLoadEvent.h: |
| * dom/BeforeLoadEvent.idl: |
| * dom/CompositionEvent.cpp: |
| (WebCore::CompositionEvent::CompositionEvent): |
| * dom/CompositionEvent.h: |
| * dom/CompositionEvent.idl: |
| * dom/ErrorEvent.cpp: |
| (WebCore::ErrorEvent::ErrorEvent): |
| * dom/ErrorEvent.h: |
| * dom/ErrorEvent.idl: |
| * dom/FocusEvent.cpp: |
| (WebCore::FocusEvent::FocusEvent): |
| * dom/FocusEvent.h: |
| * dom/FocusEvent.idl: |
| * dom/HashChangeEvent.h: |
| * dom/HashChangeEvent.idl: |
| * dom/OverflowEvent.cpp: |
| (WebCore::OverflowEvent::OverflowEvent): |
| * dom/OverflowEvent.h: |
| * dom/OverflowEvent.idl: |
| * dom/PageTransitionEvent.cpp: |
| (WebCore::PageTransitionEvent::PageTransitionEvent): |
| * dom/PageTransitionEvent.h: |
| * dom/PageTransitionEvent.idl: |
| * dom/PopStateEvent.cpp: |
| (WebCore::PopStateEvent::PopStateEvent): |
| (WebCore::PopStateEvent::create): |
| * dom/PopStateEvent.h: |
| * dom/PopStateEvent.idl: |
| * dom/SecurityPolicyViolationEvent.h: |
| * dom/SecurityPolicyViolationEvent.idl: |
| * dom/TouchEvent.cpp: |
| (WebCore::TouchEvent::TouchEvent): |
| * dom/TouchEvent.h: |
| * dom/TouchEvent.idl: |
| * dom/TransitionEvent.cpp: |
| (WebCore::TransitionEvent::TransitionEvent): |
| * dom/TransitionEvent.h: |
| * dom/TransitionEvent.idl: |
| * dom/WebKitAnimationEvent.cpp: |
| (WebCore::WebKitAnimationEvent::WebKitAnimationEvent): |
| * dom/WebKitAnimationEvent.h: |
| * dom/WebKitAnimationEvent.idl: |
| * dom/WebKitTransitionEvent.cpp: |
| (WebCore::WebKitTransitionEvent::WebKitTransitionEvent): |
| * dom/WebKitTransitionEvent.h: |
| * dom/WebKitTransitionEvent.idl: |
| |
| 2016-10-12 Chris Dumez <cdumez@apple.com> |
| |
| Stop using PassRefPtr in platform/efl |
| https://bugs.webkit.org/show_bug.cgi?id=163321 |
| |
| Reviewed by Laszlo Gombos. |
| |
| Stop using PassRefPtr in platform/efl. |
| |
| * platform/efl/BatteryProviderEfl.cpp: |
| (WebCore::batteryProperties): |
| (WebCore::BatteryProviderEfl::setBatteryStatus): |
| (WebCore::BatteryProviderEfl::dispatchEvent): |
| * platform/efl/BatteryProviderEfl.h: |
| * platform/efl/BatteryProviderEflClient.h: |
| * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp: |
| (WebCore::PlatformSpeechSynthesisProviderEfl::voiceName): |
| (WebCore::PlatformSpeechSynthesisProviderEfl::speak): |
| * platform/efl/PlatformSpeechSynthesisProviderEfl.h: |
| |
| 2016-10-12 Youenn Fablet <youenn@apple.com> |
| |
| Attribute setter binding generated code should use more references |
| https://bugs.webkit.org/show_bug.cgi?id=163275 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (JSValueToNative): |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestNondeterministic.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| |
| 2016-10-11 Youenn Fablet <youenn@apple.com> |
| |
| Refactor binding generated casted-this checks for methods |
| https://bugs.webkit.org/show_bug.cgi?id=163198 |
| |
| Reviewed by Darin Adler. |
| |
| Covered by existing tests and binding rebased tests.. |
| |
| Introducing BindingCaller::callMethod and callPromiseMethod to encapsulate casted-this checks for methods. |
| This is supported for all methods except seralizer and iterators methods. |
| |
| Introduced castForMethod similarly to castForAttribute. |
| Moved this from static methods of JSClass to static methods of BindingCaller<JSClass> |
| This allows removing the corresponding declarations from JSClass header file. |
| |
| Note the difference of handling thisValue between the two in case of CustomProxyToJSObject. |
| This should be made more consistent. |
| |
| In case of bad casted this check, CustomProxyToJSObject objects will throw a TypeError with an error message like other methods. |
| Before the patch, a TypeError without error message was thrown. |
| |
| EventTarget being different, added a specialization of BindingCaller for it. |
| This allows also removing some binding generated code dedicated to EventTarget. |
| A similar approach might also be done for CustomProxyToJSObject objects to further simplify the binding generator. |
| |
| |
| * bindings/js/JSDOMBinding.cpp: |
| (WebCore::rejectPromiseWithThisTypeError): |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::BindingCaller::callPromiseMethod): |
| (WebCore::BindingCaller::callMethod): |
| * bindings/js/JSEventTargetCustom.h: |
| (WebCore::BindingCaller<JSEventTarget>::callMethod): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): |
| (GenerateImplementation): |
| (GenerateFunctionCastedThis): Deleted. |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.h: |
| * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: |
| * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: |
| * bindings/scripts/test/JS/JSTestEventTarget.cpp: |
| * bindings/scripts/test/JS/JSTestEventTarget.h: |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestGlobalObject.h: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.h: |
| * bindings/scripts/test/JS/JSTestIterable.cpp: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: |
| * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: |
| * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestNode.h: |
| * bindings/scripts/test/JS/JSTestNondeterministic.cpp: |
| * bindings/scripts/test/JS/JSTestNondeterministic.h: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestObj.h: |
| * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: |
| * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.h: |
| |
| 2016-10-11 Youenn Fablet <youenn@apple.com> |
| |
| MediaResourceLoader::requestResource should take a ResourceRequest&& as input |
| https://bugs.webkit.org/show_bug.cgi?id=160397 |
| |
| Reviewed by Alex Christensen. |
| |
| No change in behavior. |
| |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResourceLoader::requestResource): Passing a ResourceRequest&& as input parameter. |
| * loader/MediaResourceLoader.h: |
| * platform/graphics/PlatformMediaResourceLoader.h: Ditto. |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (webKitWebSrcStart): Creating an extra copy since MediaResourceLoader::requestResource expects a Resourcerequest&&. |
| |
| 2016-10-11 Chris Dumez <cdumez@apple.com> |
| |
| Update AnimationEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163312 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Update AnimationEvent to stop using legacy [ConstructorTemplate=Event] |
| and use a regular constructor as in the specification: |
| - https://drafts.csswg.org/css-animations/#interface-animationevent |
| |
| * dom/AnimationEvent.cpp: |
| (WebCore::AnimationEvent::AnimationEvent): |
| * dom/AnimationEvent.h: |
| * dom/AnimationEvent.idl: |
| |
| 2016-10-11 Chris Dumez <cdumez@apple.com> |
| |
| Update DeviceProximityEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163311 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Update DeviceProximityEvent to stop using legacy [ConstructorTemplate=Event] |
| and use a regular constructor instead, as in the specification: |
| - https://www.w3.org/TR/2015/WD-proximity-20150903/#deviceproximityevent-interface |
| |
| * Modules/proximity/DeviceProximityEvent.cpp: |
| (WebCore::DeviceProximityEvent::DeviceProximityEvent): |
| * Modules/proximity/DeviceProximityEvent.h: |
| (WebCore::DeviceProximityEvent::create): |
| (WebCore::DeviceProximityEventInit::DeviceProximityEventInit): Deleted. |
| * Modules/proximity/DeviceProximityEvent.idl: |
| |
| 2016-10-11 Gyuyoung Kim <gyuyoung.kim@webkit.org> |
| |
| Unreviewed, EFL build fix because of r207173. |
| |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::forcedPrefersReducedMotionValue): |
| |
| 2016-10-11 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| [CG] Add the option to immediately decode an image frame and control its memory caching |
| https://bugs.webkit.org/show_bug.cgi?id=163298 |
| |
| Reviewed by Simon Fraser. |
| |
| This patch fixes two things. (1) An option is added to immediately decode an |
| image frame. This can be done by adding kCGImageSourceShouldCacheImmediately |
| to the ImageSource options dictionary. (2) BitmapImage should also control |
| when the image frame is actually deleted from memory. This can be done by |
| calling CGImageSourceCreateThumbnailAtIndex(). CG does not keep a reference |
| to the returned CGImageRef. |
| |
| * platform/graphics/ImageFrame.h: Adding the DecodingMode enum class. |
| Ideally this should be a member of ImageDecoder class. But since we |
| have three header files for ImageDecoder, this can be added here till |
| the three files combined in one header file. |
| |
| * platform/graphics/ImageFrameCache.cpp: |
| (WebCore::ImageFrameCache::setRenderTarget): Deleted. |
| * platform/graphics/ImageFrameCache.h: |
| * platform/graphics/ImageSource.cpp: |
| (WebCore::ImageSource::setRenderTarget): |
| * platform/graphics/ImageSource.h: |
| (WebCore::ImageSource::setRenderTarget): Deleted. |
| Unrelated change. The native image decoder is available from the ImageSource. |
| ImageSource::setTarget() does not need not to get it through ImageFrameCache. |
| |
| * platform/graphics/cg/ImageDecoderCG.cpp: |
| (WebCore::createImageSourceOptions): Clean this function by using CFMutableDictionary. |
| (WebCore::imageSourceOptions): Cache two default ImageSource options and create new |
| ones for the non default cases. |
| |
| (WebCore::ImageDecoder::createFrameImageAtIndex): Use the appropriate ImageSource function |
| |
| * platform/graphics/cg/ImageDecoderCG.h: |
| * platform/graphics/win/ImageDecoderDirect2D.cpp: |
| (WebCore::ImageDecoder::createFrameImageAtIndex): |
| * platform/graphics/win/ImageDecoderDirect2D.h: |
| * platform/image-decoders/ImageDecoder.cpp: |
| (WebCore::ImageDecoder::createFrameImageAtIndex): |
| * platform/image-decoders/ImageDecoder.h: |
| Change functions' signature to include a DecodingMode argument. |
| |
| 2016-10-11 Chris Dumez <cdumez@apple.com> |
| |
| select.options may return too many option elements |
| https://bugs.webkit.org/show_bug.cgi?id=163296 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| select.options may return too many option elements. We're only supposed |
| to return the option element children of the select element, and the |
| option element children of all the optgroup element children of the |
| select element, in tree order: |
| - https://html.spec.whatwg.org/#dom-select-options |
| - https://html.spec.whatwg.org/#concept-select-option-list |
| |
| Firefox and Chrome agrees with the specification. However, WebKit was |
| returning all the option elements that are descendants of the select |
| element. |
| |
| Test: imported/w3c/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmloptionscollection.html |
| |
| * html/HTMLOptionsCollection.h: |
| |
| 2016-10-11 Alex Christensen <achristensen@webkit.org> |
| |
| Fix assertion when creating first WebCore::URL from non-main thread after r207162 |
| https://bugs.webkit.org/show_bug.cgi?id=163304 |
| |
| Reviewed by Filip Pizlo. |
| |
| This fixes assertions when running UserContentWorld.NormalWorld API tests. |
| |
| * platform/text/TextEncodingRegistry.cpp: |
| (WebCore::buildBaseTextCodecMaps): |
| (WebCore::atomicCanonicalTextEncodingName): |
| The new URLParser requires a TextEncoding& in its constructor, which defaults to UTF8Encoding. |
| When creating the first TextEncoding in a process, it calls buildBaseTextCodecMaps which asserts |
| it's on the main thread because it initializes static variables. Since we are getting a lock right |
| after this call anyway, just put this function call inside the lock. |
| |
| 2016-10-11 Dean Jackson <dino@apple.com> |
| |
| color-gamut media query shouldn't ASSERT on invalid values |
| https://bugs.webkit.org/show_bug.cgi?id=163303 |
| <rdar://problem/28724566> |
| |
| Reviewed by Simon Fraser. |
| |
| Remove the ASSERT_NOT_REACHED in the evaluation, since it |
| can be hit when there is a valid CSS keyword that is not |
| expected in the query. |
| |
| Updated fast/media/mq-color-gamut.html |
| |
| * css/MediaQueryEvaluator.cpp: |
| (WebCore::colorGamutEvaluate): |
| |
| 2016-10-11 Chris Dumez <cdumez@apple.com> |
| |
| Update MediaStream events to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163289 |
| |
| Reviewed by Sam Weinig. |
| |
| Update MediaStream events to stop using legacy [ConstructorTemplate=Event] |
| and use regular constructors instead. |
| |
| * Modules/mediastream/MediaStreamEvent.cpp: |
| (WebCore::MediaStreamEvent::create): |
| (WebCore::MediaStreamEvent::MediaStreamEvent): |
| * Modules/mediastream/MediaStreamEvent.h: |
| * Modules/mediastream/MediaStreamEvent.idl: |
| * Modules/mediastream/MediaStreamTrackEvent.cpp: |
| (WebCore::MediaStreamTrackEvent::create): |
| (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent): |
| * Modules/mediastream/MediaStreamTrackEvent.h: |
| * Modules/mediastream/MediaStreamTrackEvent.idl: |
| * Modules/mediastream/OverconstrainedErrorEvent.h: |
| (WebCore::OverconstrainedErrorEvent::create): |
| (WebCore::OverconstrainedErrorEvent::OverconstrainedErrorEvent): |
| (WebCore::OverconstrainedErrorEvent::~OverconstrainedErrorEvent): Deleted. |
| * Modules/mediastream/OverconstrainedErrorEvent.idl: |
| * Modules/mediastream/RTCDTMFToneChangeEvent.cpp: |
| (WebCore::RTCDTMFToneChangeEvent::create): |
| (WebCore::RTCDTMFToneChangeEvent::RTCDTMFToneChangeEvent): |
| * Modules/mediastream/RTCDTMFToneChangeEvent.h: |
| * Modules/mediastream/RTCDTMFToneChangeEvent.idl: |
| * Modules/mediastream/RTCTrackEvent.cpp: |
| (WebCore::RTCTrackEvent::create): |
| (WebCore::RTCTrackEvent::RTCTrackEvent): |
| * Modules/mediastream/RTCTrackEvent.h: |
| * Modules/mediastream/RTCTrackEvent.idl: |
| |
| 2016-10-11 Chris Dumez <cdumez@apple.com> |
| |
| Update UIRequestEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163288 |
| |
| Reviewed by Darin Adler. |
| |
| Update UIRequestEvent to stop using legacy [ConstructorTemplate=Event] |
| and use a constructor as in the specification: |
| - https://dvcs.w3.org/hg/IndieUI/raw-file/default/src/indie-ui-events.html#UIRequestEvent |
| |
| * Modules/indieui/UIRequestEvent.cpp: |
| (WebCore::UIRequestEvent::create): |
| (WebCore::UIRequestEvent::UIRequestEvent): |
| (WebCore::UIRequestEvent::createForBindings): Deleted. |
| * Modules/indieui/UIRequestEvent.h: |
| * Modules/indieui/UIRequestEvent.idl: |
| |
| 2016-10-11 Dean Jackson <dino@apple.com> |
| |
| Implement prefers-reduced-motion media query |
| https://bugs.webkit.org/show_bug.cgi?id=163250 |
| <rdar://problem/28704129> |
| |
| Reviewed by Simon Fraser. |
| |
| Implement the prefers-reduced-motion media query, as |
| described in https://github.com/w3c/csswg-drafts/issues/442. |
| |
| Tests: fast/media/mq-prefers-reduced-motion-forced-value.html |
| fast/media/mq-prefers-reduced-motion.html |
| |
| * Configurations/WebCoreTestSupport.xcconfig: Link against AppKit and UIKit. |
| |
| * css/CSSValueKeywords.in: New keyword for "reduce". |
| |
| * css/MediaFeatureNames.h: Add prefers-reduced-motion. |
| * css/MediaQueryEvaluator.cpp: |
| (WebCore::prefersReducedMotionEvaluate): |
| * css/MediaQueryExp.cpp: |
| (WebCore::featureWithValidIdent): |
| (WebCore::isFeatureValidWithoutValue): |
| |
| * platform/Theme.h: New API to detect the system accessibility settings. |
| (WebCore::Theme::userPrefersReducedMotion): |
| * platform/ios/ThemeIOS.h: |
| * platform/ios/ThemeIOS.mm: |
| (WebCore::ThemeIOS::userPrefersReducedMotion): |
| * platform/mac/ThemeMac.h: |
| * platform/mac/ThemeMac.mm: |
| (WebCore::ThemeMac::userPrefersReducedMotion): |
| |
| * testing/Internals.cpp: Expose the same API to internals, so that |
| a test can examine the value too. |
| (WebCore::Internals::userPrefersReducedMotion): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| * testing/Internals.mm: |
| (WebCore::Internals::userPrefersReducedMotion): |
| |
| * page/Settings.h: New setting to override the system value... |
| * page/Settings.in: |
| |
| * testing/InternalSettings.cpp: ... plumbed through internals. |
| (WebCore::InternalSettings::Backup::Backup): |
| (WebCore::InternalSettings::Backup::restoreTo): |
| (WebCore::InternalSettings::forcedPrefersReducedMotionValue): |
| (WebCore::InternalSettings::setForcedPrefersReducedMotionValue): |
| * testing/InternalSettings.h: |
| * testing/InternalSettings.idl: |
| * testing/Internals.cpp: |
| (WebCore::Internals::userPrefersReducedMotion): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| * testing/Internals.mm: |
| (WebCore::Internals::userPrefersReducedMotion): |
| |
| |
| 2016-10-10 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Annotate DOM API with CEReactions |
| https://bugs.webkit.org/show_bug.cgi?id=163268 |
| |
| Reviewed by Darin Adler. |
| |
| Added CEReactions IDL attribute to APIs defined in https://dom.spec.whatwg.org. |
| |
| No new tests since existing tests cover the code change. |
| Added a dedicated code generation test: JSTestCEReactions.idl and TestCEReactionsStringifier.idl. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): Generate CustomElementReactionStack in attribute setters. In the case of PutForwards, |
| check the extended attributes of the target attribute's stringifier. |
| * bindings/scripts/test/JS/JSTestCEReactions.cpp: Added. |
| * bindings/scripts/test/JS/JSTestCEReactions.h: Added. |
| * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: Added. |
| * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h: Added. |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack): Deleted. |
| * bindings/scripts/test/TestCEReactions.idl: Added. |
| * bindings/scripts/test/TestCEReactionsStringifier.idl: Added. |
| * bindings/scripts/test/TestObj.idl: |
| * dom/Attr.idl: |
| * dom/ChildNode.idl: |
| * dom/Document.idl: |
| * dom/Element.idl: |
| * dom/NamedNodeMap.idl: |
| * dom/Node.idl: |
| * dom/ParentNode.idl: |
| * dom/Range.idl: |
| * html/DOMTokenList.idl: |
| |
| 2016-10-11 Chris Dumez <cdumez@apple.com> |
| |
| Update CloseEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163293 |
| |
| Reviewed by Darin Adler. |
| |
| Update CloseEvent to stop using legacy [ConstructorTemplate=Event] and |
| use a regular constructor as in the specification: |
| - https://html.spec.whatwg.org/multipage/comms.html#the-closeevent-interfaces |
| |
| No new tests, updated existing test. |
| |
| * Modules/websockets/CloseEvent.h: |
| (WebCore::CloseEvent::create): |
| (WebCore::CloseEvent::CloseEvent): |
| * Modules/websockets/CloseEvent.idl: |
| |
| 2016-10-11 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [DOMJIT] DOMJIT::Patchpoint should have a way to receive constant folded arguments |
| https://bugs.webkit.org/show_bug.cgi?id=163224 |
| |
| Reviewed by Filip Pizlo. |
| |
| * domjit/DOMJITHelpers.h: |
| (WebCore::DOMJITHelpers::toWrapper): |
| * domjit/JSNodeDOMJIT.cpp: |
| (WebCore::createCallDOMForOffsetAccess): |
| |
| 2016-10-11 Alex Christensen <achristensen@webkit.org> |
| |
| Enable URLParser by default |
| https://bugs.webkit.org/show_bug.cgi?id=162660 |
| <rdar://28601706> |
| |
| Reviewed by Sam Weinig. |
| |
| Covered by updates to many LayoutTests. |
| |
| * platform/URLParser.cpp: |
| Make the default value true for URLParser::enabled. |
| This is the most impactful and well-documented one-line change I've ever written. |
| |
| 2016-10-11 Daniel Bates <dabates@apple.com> |
| |
| [iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps |
| https://bugs.webkit.org/show_bug.cgi?id=163244 |
| <rdar://problem/27250015> |
| |
| Reviewed by Jer Noble. |
| |
| Adds a new setting to toggle requiring a user gesture to load a video (enabled by default). |
| Disable this setting for apps built against iOS 9 or earlier. |
| |
| Tests: media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false.html |
| media/require-user-gesture-to-load-video.html |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::HTMLMediaElement): Only require a user gesture to load a video |
| when Settings::requiresUserGestureToLoadVideo() is true. |
| * page/Settings.cpp: Enable setting requiresUserGestureToLoadVideo by default. |
| * page/Settings.in: Add setting, requiresUserGestureToLoadVideo. |
| |
| 2016-10-11 Sam Weinig <sam@webkit.org> |
| |
| Fix the iOS build. |
| |
| * bindings/js/JSDOMConvert.h: |
| |
| 2016-10-11 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Sandbox QuickLook previews |
| https://bugs.webkit.org/show_bug.cgi?id=163240 |
| <rdar://problem/25961633> |
| |
| Fix bad merge following r207151. |
| |
| * platform/network/cf/ResourceResponse.h: Define m_isQuickLook. |
| |
| 2016-10-11 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Sandbox QuickLook previews |
| https://bugs.webkit.org/show_bug.cgi?id=163240 |
| <rdar://problem/25961633> |
| |
| Reviewed by Brent Fulgham. |
| |
| Use a unique origin for- and limit the capabilities of- QuickLook previews. |
| |
| Tests: http/tests/quicklook/at-import-stylesheet-blocked.html |
| http/tests/quicklook/base-url-blocked.html |
| http/tests/quicklook/cross-origin-iframe-blocked.html |
| http/tests/quicklook/csp-header-ignored.html |
| http/tests/quicklook/document-domain-is-empty-string.html |
| http/tests/quicklook/external-stylesheet-blocked.html |
| http/tests/quicklook/hide-referer-on-navigation.html |
| http/tests/quicklook/submit-form-blocked.html |
| http/tests/quicklook/top-navigation-blocked.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::processHttpEquiv): Call ContentSecurityPolicy::didReceiveHeader(). |
| (WebCore::Document::processReferrerPolicy): Do not process referrer policy for QuickLook previews. |
| (WebCore::Document::initSecurityContext): Apply sandbox for QuickLook previews. |
| (WebCore::Document::shouldEnforceQuickLookSandbox): Added. |
| (WebCore::Document::applyQuickLookSandbox): Added. |
| * dom/Document.h: |
| * page/csp/ContentSecurityPolicy.h: Change accessibility of didReceiveHeader() from private to public. |
| (WebCore::ContentSecurityPolicy::processHTTPEquiv): Deleted. |
| * platform/network/cf/ResourceResponse.h: |
| (WebCore::ResourceResponse::isQuickLook): Added. |
| (WebCore::ResourceResponse::setIsQuickLook): Added. |
| * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: |
| (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): Modified to mark |
| resource response as a QuickLook preview, if appropriate. Also remove the name of the first argument |
| and the need to use UNUSED_PARAM(connection) as we no longer make use of the first argument |
| following r207151. |
| * platform/network/ios/QuickLook.mm: |
| (-[WebResourceLoaderQuickLookDelegate _sendDidReceiveResponseIfNecessary]): Ditto. |
| * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: |
| (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Ditto. Fix style nits, |
| including renaming the function argument "r" to "resource" to better describe its purpose. |
| |
| 2016-10-11 Alex Christensen <achristensen@webkit.org> |
| |
| Fix bindings tests after r207150. |
| |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| |
| 2016-10-11 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should percent-encode non-ASCII and non-printable characters in fragment |
| https://bugs.webkit.org/show_bug.cgi?id=163287 |
| |
| Reviewed by Brady Eidson. |
| |
| Based on discussion in https://github.com/whatwg/url/issues/150 |
| If that discussion decides to keep the spec as-is (which keeps non-ASCII characters in the fragment |
| to match IE and Edge's behavior, which Chrome has followed for special schemes) then we can revert |
| this change later after enabling the URL parser. Making this change keeps behavior matching Safari |
| and Firefox, as well as Chrome's handling of non-special schemes, such as data URLs. |
| |
| Covered by updated API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::appendToASCIIBuffer): |
| (WebCore::URLParser::copyURLPartsUntil): |
| (WebCore::URLParser::syntaxViolation): |
| (WebCore::URLParser::currentPosition): |
| (WebCore::URLParser::parse): |
| (WebCore::URLParser::fragmentSyntaxViolation): Deleted. |
| * platform/URLParser.h: |
| No more non-ASCII characters in canonicalized URLs. |
| |
| 2016-10-11 Alex Christensen <achristensen@webkit.org> |
| |
| Remove dead networking code |
| https://bugs.webkit.org/show_bug.cgi?id=163263 |
| |
| Reviewed by Daniel Bates. |
| |
| There are no more Cocoa platforms using CFURLConnection. |
| USE(CFNETWORK) is being replaced by USE(CFURLCONNECTION) and it is only used on the AppleWin port. |
| |
| No change in behavior. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * WebCorePrefix.h: |
| * loader/DocumentLoader.h: |
| * loader/EmptyClients.h: |
| * loader/FrameLoaderClient.h: |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): |
| * loader/ResourceLoader.h: |
| * loader/SubresourceLoader.h: |
| * loader/cf/ResourceLoaderCFNet.cpp: |
| * loader/cocoa/SubresourceLoaderCocoa.mm: |
| (WebCore::SubresourceLoader::willCacheResponse): Deleted. |
| * loader/mac/DocumentLoaderMac.cpp: |
| * loader/mac/ResourceLoaderMac.mm: |
| (WebCore::ResourceLoader::willCacheResponse): Deleted. |
| * page/mac/PageMac.mm: |
| (WebCore::Page::platformInitialize): |
| (WebCore::Page::addSchedulePair): |
| (WebCore::Page::removeSchedulePair): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge): |
| (WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Deleted. |
| (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Deleted. |
| * platform/mac/WebCoreSystemInterface.h: |
| * platform/network/NetworkStorageSession.h: |
| * platform/network/ProtectionSpace.h: |
| * platform/network/ProtectionSpaceBase.cpp: |
| * platform/network/ResourceHandle.cpp: |
| * platform/network/ResourceHandle.h: |
| * platform/network/ResourceHandleClient.cpp: |
| * platform/network/ResourceHandleClient.h: |
| (WebCore::ResourceHandleClient::willCacheResponse): |
| (WebCore::ResourceHandleClient::shouldCacheResponse): |
| * platform/network/ResourceHandleInternal.h: |
| (WebCore::ResourceHandleInternal::ResourceHandleInternal): |
| * platform/network/ResourceRequestBase.cpp: |
| * platform/network/cf/AuthenticationCF.cpp: |
| (WebCore::AuthenticationChallenge::AuthenticationChallenge): |
| (WebCore::createCF): |
| (WebCore::core): |
| * platform/network/cf/AuthenticationCF.h: |
| * platform/network/cf/AuthenticationChallenge.h: |
| * platform/network/cf/CookieJarCFNet.cpp: |
| * platform/network/cf/CredentialStorageCFNet.cpp: |
| (WebCore::CredentialStorage::getFromPersistentStorage): |
| (WebCore::CredentialStorage::saveToPersistentStorage): Deleted. |
| * platform/network/cf/LoaderRunLoopCF.cpp: |
| * platform/network/cf/LoaderRunLoopCF.h: |
| * platform/network/cf/NetworkStorageSessionCFNet.cpp: |
| (WebCore::NetworkStorageSession::cookieStorage): |
| * platform/network/cf/ProtectionSpaceCFNet.cpp: |
| * platform/network/cf/ProtectionSpaceCFNet.h: |
| * platform/network/cf/ResourceError.h: |
| * platform/network/cf/ResourceErrorCF.cpp: |
| * platform/network/cf/ResourceHandleCFNet.cpp: |
| (WebCore::shouldSniffConnectionProperty): |
| (WebCore::ResourceHandle::createCFURLConnection): |
| (WebCore::ResourceHandle::start): |
| (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): |
| (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication): |
| (WebCore::ResourceHandle::receivedCredential): |
| (WebCore::ResourceHandle::schedule): Deleted. |
| (WebCore::ResourceHandle::unschedule): Deleted. |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp: |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h: |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest): |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): |
| (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace): |
| * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h: |
| * platform/network/cf/ResourceRequest.h: |
| (WebCore::ResourceRequest::encodingRequiresPlatformData): |
| * platform/network/cf/ResourceRequestCFNet.cpp: |
| (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction): |
| (WebCore::ResourceRequest::doUpdatePlatformRequest): |
| (WebCore::ResourceRequest::doUpdatePlatformHTTPBody): |
| (WebCore::ResourceRequest::doUpdateResourceRequest): |
| (WebCore::ResourceRequest::setStorageSession): |
| (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction): Deleted. |
| * platform/network/cf/ResourceRequestCFNet.h: |
| * platform/network/cf/ResourceResponse.h: |
| (WebCore::ResourceResponse::ResourceResponse): |
| * platform/network/cf/ResourceResponseCFNet.cpp: |
| (WebCore::ResourceResponse::cfURLResponse): |
| (WebCore::ResourceResponse::platformCertificateInfo): |
| * platform/network/cf/SynchronousLoaderClientCFNet.cpp: |
| * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: |
| (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest): |
| (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling): |
| (WebCore::adjustMIMETypeIfNecessary): |
| (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): |
| (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse): |
| (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace): |
| * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: |
| * platform/network/cocoa/CredentialCocoa.h: |
| * platform/network/cocoa/CredentialCocoa.mm: |
| (WebCore::Credential::Credential): Deleted. |
| (WebCore::Credential::cfCredential): Deleted. |
| * platform/network/cocoa/ProtectionSpaceCocoa.h: |
| * platform/network/cocoa/ProtectionSpaceCocoa.mm: |
| (WebCore::ProtectionSpace::ProtectionSpace): Deleted. |
| (WebCore::ProtectionSpace::cfSpace): Deleted. |
| * platform/network/cocoa/ResourceRequestCocoa.mm: |
| (WebCore::ResourceRequest::nsURLRequest): |
| * platform/network/cocoa/ResourceResponseCocoa.mm: |
| (WebCore::ResourceResponse::platformCertificateInfo): |
| (WebCore::ResourceResponse::nsURLResponse): Deleted. |
| (WebCore::ResourceResponse::ResourceResponse): Deleted. |
| * platform/network/ios/QuickLook.h: |
| * platform/network/ios/QuickLook.mm: |
| (-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]): Deleted. |
| (-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]): Deleted. |
| (-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]): Deleted. |
| (-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]): Deleted. |
| (-[WebQuickLookHandleAsDelegate connection:didFailWithError:]): Deleted. |
| (-[WebQuickLookHandleAsDelegate detachHandle]): Deleted. |
| (WebCore::QuickLookHandle::create): Deleted. |
| (WebCore::QuickLookHandle::cfResponse): Deleted. |
| * platform/network/ios/ResourceHandleIOS.mm: Removed. |
| * platform/network/ios/ResourceRequestIOS.mm: Removed. |
| * platform/network/mac/AuthenticationMac.mm: |
| (-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]): Deleted. |
| (-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]): Deleted. |
| (WebCore::core): Deleted. |
| (WebCore::mac): Deleted. |
| * platform/network/mac/CookieJarMac.mm: |
| (WebCore::setCookiesFromDOM): |
| (WebCore::cookieStorage): |
| (WebCore::addCookie): |
| * platform/network/mac/CredentialStorageMac.mm: |
| * platform/network/mac/FormDataStreamMac.h: |
| * platform/network/mac/FormDataStreamMac.mm: |
| * platform/network/mac/ResourceErrorMac.mm: |
| (NSErrorFromCFError): Deleted. |
| (WebCore::ResourceError::ResourceError): Deleted. |
| (WebCore::ResourceError::nsError): Deleted. |
| (WebCore::ResourceError::operator NSError *): Deleted. |
| * platform/network/mac/ResourceHandleMac.mm: |
| (WebCore::ResourceHandle::continueWillCacheResponse): |
| (WebCore::ResourceHandle::getConnectionTimingData): Deleted. |
| * platform/network/mac/ResourceRequestMac.mm: Removed. |
| * platform/network/mac/SynchronousLoaderClient.mm: |
| (WebCore::SynchronousLoaderClient::platformBadResponseError): |
| * platform/network/mac/WebCoreResourceHandleAsDelegate.h: |
| * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| * platform/network/mac/WebCoreURLResponse.mm: |
| (WebCore::synthesizeRedirectResponseIfNecessary): |
| * platform/win/TemporaryLinkStubs.cpp: |
| * testing/js/WebCoreTestSupportPrefix.h: |
| |
| 2016-10-10 Sam Weinig <sam@webkit.org> |
| |
| Use IDLTypes in more places |
| https://bugs.webkit.org/show_bug.cgi?id=163247 |
| |
| Reviewed by Darin Adler. |
| |
| Switch JS -> Native type conversions to use convert<IDLType>(...) rather |
| than convert<NativeType>(...). This allows us to differentiate things like |
| conversion from JSValue to DOMString vs. JSValue to USVString which have different |
| rules. |
| |
| * bindings/generic/IDLTypes.h: |
| Add predicate for integer types. |
| |
| * bindings/js/IDBBindingUtilities.cpp: |
| (WebCore::idbKeyPathFromValue): |
| * bindings/js/JSApplePaySessionCustom.cpp: |
| (WebCore::JSApplePaySession::completeShippingMethodSelection): |
| (WebCore::JSApplePaySession::completeShippingContactSelection): |
| * bindings/js/JSCryptoAlgorithmDictionary.cpp: |
| (WebCore::createAesKeyGenParams): |
| (WebCore::createRsaKeyGenParams): |
| * bindings/js/JSCustomElementRegistryCustom.cpp: |
| (WebCore::JSCustomElementRegistry::define): |
| * bindings/js/JSDocumentCustom.cpp: |
| (WebCore::JSDocument::getCSSCanvasContext): |
| * bindings/js/JSMockContentFilterSettingsCustom.cpp: |
| (WebCore::JSMockContentFilterSettings::setDecisionPoint): |
| (WebCore::toDecision): |
| * bindings/js/JSNodeFilterCustom.cpp: |
| (WebCore::JSNodeFilter::acceptNode): |
| Switch to new convert<IDLType> style. |
| |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::toRefPtrNativeArray): Deleted. |
| (WebCore::toNativeArray): Deleted. |
| These can now be called as convert<IDLSequence<IDLInterface<T>>> and convert<IDLType> respectively. |
| |
| * bindings/js/JSDOMConvert.h: |
| (WebCore::Converter<IDLNullable<T>>::convert): |
| (WebCore::Converter<IDLBoolean>::convert): |
| (WebCore::Converter<IDLInterface<T>>::convert): |
| (WebCore::Converter<IDLByte>::convert): |
| (WebCore::Converter<IDLOctet>::convert): |
| (WebCore::Converter<IDLShort>::convert): |
| (WebCore::Converter<IDLUnsignedShort>::convert): |
| (WebCore::Converter<IDLLong>::convert): |
| (WebCore::Converter<IDLUnsignedLong>::convert): |
| (WebCore::Converter<IDLLongLong>::convert): |
| (WebCore::Converter<IDLUnsignedLongLong>::convert): |
| (WebCore::Converter<IDLFloat>::convert): |
| (WebCore::Converter<IDLUnrestrictedFloat>::convert): |
| (WebCore::Converter<IDLDouble>::convert): |
| (WebCore::Converter<IDLUnrestrictedDouble>::convert): |
| (WebCore::Converter<IDLDOMString>::convert): |
| (WebCore::Converter<IDLUSVString>::convert): |
| (WebCore::Detail::ArrayConverter::convert): |
| (WebCore::Converter<IDLSequence<T>>::convert): |
| (WebCore::Converter<IDLFrozenArray<T>>::convert): |
| (WebCore::Converter<IDLDictionary<T>>::convert): |
| (WebCore::Converter<IDLEnumeration<T>>::convert): |
| (WebCore::Detail::VariadicConverterBase::convert): |
| (WebCore::Detail::VariadicConverterBase<IDLInterface<T>>::convert): |
| (WebCore::convertVariadicArguments): |
| (WebCore::convertWrapperType): Deleted. |
| (WebCore::convertWrapperTypeSequence): Deleted. |
| (WebCore::Converter<bool>::convert): Deleted. |
| (WebCore::Converter<String>::convert): Deleted. |
| (WebCore::Converter<Vector<T>>::convert): Deleted. |
| (WebCore::Converter<int8_t>::convert): Deleted. |
| (WebCore::Converter<uint8_t>::convert): Deleted. |
| (WebCore::Converter<int16_t>::convert): Deleted. |
| (WebCore::Converter<uint16_t>::convert): Deleted. |
| (WebCore::Converter<int32_t>::convert): Deleted. |
| (WebCore::Converter<uint32_t>::convert): Deleted. |
| (WebCore::Converter<int64_t>::convert): Deleted. |
| (WebCore::Converter<uint64_t>::convert): Deleted. |
| Switch Converter to be specialized on IDLTypes. Add support for IDLNullable, IDLSequence, and IDLFrozenArray. |
| |
| * bindings/scripts/CodeGenerator.pm: |
| (GetFlattenedMemberTypes): Deleted. |
| (GetNumberOfNullableMemberTypes): Deleted. |
| (GetIDLUnionMemberTypes): Deleted. |
| (GetBaseIDLType): Deleted. |
| (GetIDLType): Deleted. |
| Move IDLType conversion logic to CodeGeneratorJS so it can use GetEnumerationClassName and GetDictionaryClassName. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (AddToImplIncludesForIDLType): |
| Add support for sequences, FrozenArrays and external dictionaries. |
| |
| (GenerateEnumerationsImplementationContent): |
| (GenerateEnumerationsHeaderContent): |
| Change the name of parse<enum> and convert<enum> to parseEnumeration<enum> and convertEnumeration<enum> |
| to make them more consistent with dictionary conversion specialization and not interfere with the convert |
| function specialization. |
| |
| (GenerateDictionaryImplementationContent): |
| Simplify by using convert<IDLType>. |
| |
| (GetFlattenedMemberTypes): |
| (GetNumberOfNullableMemberTypes): |
| (GetIDLUnionMemberTypes): |
| (GetBaseIDLType): |
| (GetIDLType): |
| Moved from CodeGenerator.pm |
| |
| (IsHandledByDOMConvert): |
| (JSValueToNative): |
| Start switching JSValueToNative over to using convert<IDLType>. Use IsHandledByDOMConvert as a predicate |
| for what is supported. |
| |
| * bindings/scripts/IDLParser.pm: |
| (applyTypedefs): |
| (cloneType): |
| (applyTypedefsForSignature): |
| (parseTypedef): |
| (parseOperationOrIterator): |
| (parseSpecialOperation): |
| Make typedefs work with aggregate types (unions, sequences and FrozenArrays). |
| |
| * bindings/scripts/test/JS/JSTestEventTarget.cpp: |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestObj.h: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| Update test results. |
| |
| * bindings/scripts/test/TestTypedefs.idl: |
| Add additional tests for typedefs that use unions and sequences. |
| |
| * testing/InternalSettings.idl: |
| Change the name of a parameter to avoid a name collision. |
| |
| 2016-10-11 Konstantin Tokarev <annulen@yandex.ru> |
| |
| Fixed compilation with !ENABLE(SVG_FONTS) |
| https://bugs.webkit.org/show_bug.cgi?id=163281 |
| |
| Reviewed by Csaba Osztrogonác. |
| |
| No new tests needed. |
| |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest): |
| |
| 2016-10-11 Brent Fulgham <bfulgham@apple.com> |
| |
| Unreviewed build fix after r207140. |
| |
| * PlatformAppleWin.cmake: Add missing compile file. |
| |
| 2016-10-10 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Add initial Pattern handling implementation |
| https://bugs.webkit.org/show_bug.cgi?id=163270 |
| |
| Reviewed by Simon Fraser. |
| |
| Provide an implemenation of Patterns for Direct2D. |
| |
| No new tests. Covered by fast/borders/border-image-01.html and others. |
| |
| * platform/graphics/GraphicsContext.h: |
| * platform/graphics/Pattern.h: Add D2D definitions. |
| * platform/graphics/win/GraphicsContextDirect2D.cpp: |
| (WebCore::GraphicsContext::solidStrokeBrush): Use a more generic return type. |
| (WebCore::GraphicsContext::solidFillBrush): Ditto. |
| (WebCore::GraphicsContext::patternStrokeBrush): Added. |
| (WebCore::GraphicsContext::patternFillBrush): Added. |
| (WebCore::GraphicsContext::drawPattern): Provide D2D implementation. |
| (WebCore::GraphicsContext::applyStrokePattern): Ditto. |
| (WebCore::GraphicsContext::applyFillPattern): Ditto. |
| (WebCore::GraphicsContext::drawPath): Use stroke pattern if available. |
| (WebCore::GraphicsContext::fillPath): Use fill pattern if available. |
| (WebCore::GraphicsContext::strokePath): Use stroke pattern if available. |
| (WebCore::GraphicsContext::fillRect): Use fill pattern if available. |
| * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: |
| * platform/graphics/win/PatternDirect2D.cpp: Added. |
| |
| 2016-10-11 Per Arne Vollan <pvollan@apple.com> |
| |
| [Win] Compile fix. |
| https://bugs.webkit.org/show_bug.cgi?id=163272 |
| |
| Reviewed by Brent Fulgham. |
| |
| When compiling with older SDKs, some CoreText symbols are redefined. |
| This patch checks if the relevant CoreText header file has been |
| included before defining the symbol. |
| |
| * platform/spi/win/CoreTextSPIWin.h: |
| |
| 2016-10-11 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Buttons container |
| https://bugs.webkit.org/show_bug.cgi?id=163238 |
| <rdar://problem/28701864> |
| |
| Reviewed by Dean Jackson. |
| |
| We add a new ButtonsContainer class which contains a group of Button objects |
| and positions them based on the provided padding and margin between buttons. |
| Buttons that aren't enabled or marked as dropped are not added to the tree of |
| LayoutNodes, and thus the DOM. |
| |
| Additionally, we fix a few issues we found while working on tests for ButtonsContainer |
| where LayoutNodes would schedule layout callbacks even when they would not do any work |
| during the layout callback due to not resetting the `needsLayout` flag to false and |
| removing any scheduled tasks when a layout was completed. |
| |
| Finally, we fix a few style issues that had not been caught so far and an unused |
| `size` property on IconButton. |
| |
| Tests: media/modern-media-controls/buttons-container/buttons-container-buttons-property.html |
| media/modern-media-controls/buttons-container/buttons-container-constructor.html |
| media/modern-media-controls/buttons-container/buttons-container-layout.html |
| |
| * Modules/modern-media-controls/controls/airplay-button.js: |
| (AirplayButton.prototype.set on): |
| (AirplayButton): |
| * Modules/modern-media-controls/controls/buttons-container.css: |
| (.buttons-container): |
| * Modules/modern-media-controls/controls/buttons-container.js: |
| (ButtonsContainer.prototype.get buttons): |
| (ButtonsContainer.prototype.set buttons): |
| (ButtonsContainer.prototype.layout): |
| * Modules/modern-media-controls/controls/icon-button.js: |
| * Modules/modern-media-controls/controls/layout-node.js: |
| (LayoutNode.prototype.set needsLayout): |
| (LayoutNode.prototype.markDirtyProperty): |
| (LayoutNode.prototype._markNodeManipulation): |
| (LayoutNode.prototype._updateDirtyState): |
| (performScheduledLayout): |
| (elementFromString): |
| * Modules/modern-media-controls/controls/scheduler.js: |
| (const.scheduler.new.prototype.unscheduleLayout): |
| |
| 2016-10-11 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] Support Request cache mode |
| https://bugs.webkit.org/show_bug.cgi?id=162281 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by updated test. |
| |
| Added support for only-if-cached mode at Request level. |
| |
| Added support for cache mode at CachedResourceLoader, by setting HTTP headers and ResourceRequest cache policy |
| based on https://fetch.spec.whatwg.org/#concept-request-cache-mode and https://fetch.spec.whatwg.org/#http-network-or-cache-fetch. |
| |
| Disabled default cache policy computation (done in FrameLoader) when cache mode is different from the default. |
| Activated no-store cache mode for EventSource as per https://html.spec.whatwg.org/#the-eventsource-interface. |
| |
| * Modules/fetch/FetchRequest.cpp: |
| (WebCore::setCache): Adding support for only-if-cached. |
| (WebCore::buildOptions): Throw if only-if-cached and fetch mode is not same-origin. |
| * loader/FetchOptions.h: Adding support for only-if-cached. |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::defaultRequestCachingPolicy): Introduced to ease readability. |
| (WebCore::FrameLoader::addExtraFieldsToRequest): Updating cache policy only if request has the default cache policy. |
| This allows bypassing the default behavior for fetch cache mode different from "default". |
| * loader/FrameLoader.h: |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::updateRequestAccordingCacheMode): Introduced to set headers and request cache policy according fetch cache mode. |
| (WebCore::CachedResourceLoader::requestResource): |
| (WebCore::CachedResourceLoader::loadResource): |
| (WebCore::CachedResourceLoader::determineRevalidationPolicy): Ensure bypassing the memory cache in no-store and reload cases. |
| We reload in case of cache mode=reload to refresh the meory cache entry. |
| * loader/cache/CachedResourceRequest.h: |
| (WebCore::CachedResourceRequest::setCacheModeToNoStore): |
| * page/EventSource.cpp: |
| (WebCore::EventSource::connect): Use no-store cache mode as per https://html.spec.whatwg.org/#the-eventsource-interface. |
| * platform/network/HTTPHeaderMap.cpp: |
| (WebCore::HTTPHeaderMap::addIfNotPresent): Helper routine. |
| * platform/network/HTTPHeaderMap.h: |
| * platform/network/HTTPHeaderValues.cpp: |
| * platform/network/HTTPHeaderValues.h: |
| * platform/network/ResourceRequestBase.cpp: |
| (WebCore::ResourceRequestBase::addHTTPHeaderFieldIfNotPresent): |
| (WebCore::ResourceRequestBase::addHTTPHeaderField): |
| (WebCore::ResourceRequestBase::hasHTTPHeaderField): |
| * platform/network/ResourceRequestBase.h: |
| |
| 2016-10-10 Antti Koivisto <antti@apple.com> |
| |
| Stop copying author shadow pseudo rules into shadow tree style resolver |
| https://bugs.webkit.org/show_bug.cgi?id=163232 |
| |
| Reviewed by Darin Adler. |
| |
| * css/ElementRuleCollector.cpp: |
| (WebCore::ElementRuleCollector::collectMatchingRules): |
| (WebCore::ElementRuleCollector::matchAuthorRules): |
| (WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules): |
| |
| If we are resolving a user agent shadow tree also look up pseudo element rules from the host scope author sheet. |
| This is needed to keep web exposed ::-webkit-foo pseudo elements working. |
| |
| (WebCore::ElementRuleCollector::collectMatchingShadowPseudoElementRules): |
| |
| Factor to a function. |
| |
| * css/ElementRuleCollector.h: |
| * css/RuleSet.cpp: |
| (WebCore::RuleSet::copyShadowPseudoElementRulesFrom): Deleted. |
| * css/RuleSet.h: |
| * dom/Document.cpp: |
| (WebCore::Document::userAgentShadowTreeStyleResolver): |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::updateStyleResolver): |
| |
| No need to awkwardly copy these rules anymore. |
| |
| 2016-10-11 Chris Dumez <cdumez@apple.com> |
| |
| Update IDBVersionChangeEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163266 |
| |
| Reviewed by Darin Adler. |
| |
| Update IDBVersionChangeEvent to stop using legacy [ConstructorTemplate=Event] |
| and use a regular constructor instead, as in the specification: |
| - http://w3c.github.io/IndexedDB/#request-idbversionchangeevent |
| |
| This patch also fixes a bug where the IDBVersionChangeEvent was ignoring the |
| EventInit dictionary members passed by the JavaScript (e.g. bubbles). |
| |
| No new tests, updated existing test. |
| |
| * Modules/indexeddb/IDBVersionChangeEvent.cpp: |
| (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent): |
| * Modules/indexeddb/IDBVersionChangeEvent.h: |
| * Modules/indexeddb/IDBVersionChangeEvent.idl: |
| * bindings/js/JSDOMConvert.h: |
| (WebCore::convertNullable): |
| (WebCore::convert): Deleted. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDefaultValue): |
| (GenerateDictionaryImplementationContent): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| * bindings/scripts/test/TestObj.idl: |
| |
| 2016-10-11 Chris Dumez <cdumez@apple.com> |
| |
| Update WebKitPlaybackTargetAvailabilityEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163265 |
| |
| Reviewed by Darin Adler. |
| |
| Update WebKitPlaybackTargetAvailabilityEvent to stop using legacy |
| [ConstructorTemplate=Event] and use a regular constructor instead. |
| |
| * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: |
| (WebCore::WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent): |
| * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h: |
| (WebCore::WebKitPlaybackTargetAvailabilityEvent::createForBindings): |
| (WebCore::WebKitPlaybackTargetAvailabilityEvent::~WebKitPlaybackTargetAvailabilityEvent): Deleted. |
| * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl: |
| |
| 2016-10-10 Zan Dobersek <zdobersek@igalia.com> |
| |
| Add ENABLE_ENCRYPTED_MEDIA configuration option |
| https://bugs.webkit.org/show_bug.cgi?id=163219 |
| |
| Reviewed by Darin Adler. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used |
| to enable or disable the new EME implementation at build-time. |
| * DerivedSources.make: Group the legacy option and the new option together. |
| |
| 2016-10-10 Youenn Fablet <youenn@apple.com> |
| |
| CachedResourceRequest constructor should be made more efficient |
| https://bugs.webkit.org/show_bug.cgi?id=163210 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| |
| Refactoring to use one CachedResourceRequest constructor that will move its request and charset to improve efficiency. |
| |
| * css/StyleRuleImport.cpp: |
| (WebCore::StyleRuleImport::requestStyleSheet): |
| * dom/ProcessingInstruction.cpp: |
| (WebCore::ProcessingInstruction::checkStyleSheet): |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::process): |
| * html/parser/HTMLResourcePreloader.cpp: |
| (WebCore::PreloadRequest::resourceRequest): |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::CachedResourceRequest): |
| * loader/cache/CachedResourceRequest.h: |
| |
| 2016-10-10 Adam Bergkvist <adam.bergkvist@ericsson.com> and Alejandro G. Castro <alex@igalia.com> |
| |
| WebRTC: Make MediaEndpointPeerConnection handle remotely assigned mids correctly |
| https://bugs.webkit.org/show_bug.cgi?id=163202 |
| |
| Reviewed by Eric Carlson. |
| |
| An RTCRtpTransceiver has a null mid until it's been associated with a |
| media description (with a mid) [1]. During that time, it's identified by |
| a provisional mid that might become its real mid, but the transceiver |
| can also get its mid assigned by a remote media description. In the |
| second case, the mid value is initially unknown. A transceiver's |
| RTCRtpSender must directly (synchronously in the script) provide a muted |
| remote source that is playable by, for example, a media element. This |
| source is initially registered in the MediaEndpoint (WebRTC backend) |
| with the transceiver's provisional mid. So, if the real mid is set by a |
| remote description, the registered mid must be updated to preserve the |
| association between the registered source and the transceiver. |
| |
| [1] https://w3c.github.io/webrtc-pc/archives/20160913/webrtc.html#dom-rtcrtptransceiver-mid |
| |
| Test: fast/mediastream/RTCPeerConnection-remotely-assigned-transceiver-mid.html |
| |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| Don't break after finding the first transceiver in the loop that builds the send source map. |
| Update the mid used to register the muted remote source if the a transceiver's mid gets |
| assigned by a remote media description. |
| (WebCore::createSourceMap): |
| (WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask): |
| * platform/mediastream/MediaEndpoint.cpp: |
| * platform/mediastream/MediaEndpoint.h: |
| * platform/mock/MockMediaEndpoint.cpp: |
| (WebCore::MockMediaEndpoint::MockMediaEndpoint): |
| (WebCore::MockMediaEndpoint::updateReceiveConfiguration): |
| (WebCore::MockMediaEndpoint::updateSendConfiguration): |
| (WebCore::MockMediaEndpoint::createMutedRemoteSource): |
| (WebCore::MockMediaEndpoint::replaceMutedRemoteSourceMid): |
| (WebCore::MockMediaEndpoint::emulatePlatformEvent): |
| Add "unmute-remote-sources-by-mid" action that emulates data arriving on media descriptions |
| which unmutes the remote sources. |
| (WebCore::MockMediaEndpoint::updateConfigurationMids): |
| (WebCore::MockMediaEndpoint::unmuteRemoteSourcesByMid): |
| (WebCore::MockMediaEndpoint::unmuteTimerFired): |
| * platform/mock/MockMediaEndpoint.h: |
| |
| 2016-10-10 Darin Adler <darin@apple.com> |
| |
| Move audio module off of legacy exceptions |
| https://bugs.webkit.org/show_bug.cgi?id=163269 |
| |
| Reviewed by Alex Christensen. |
| |
| * Modules/webaudio/AnalyserNode.cpp: |
| (WebCore::AnalyserNode::setFftSize): Use ExceptionOr. |
| (WebCore::AnalyserNode::setMinDecibels): Ditto. |
| (WebCore::AnalyserNode::setMaxDecibels): Ditto. |
| (WebCore::AnalyserNode::setSmoothingTimeConstant): Ditto. |
| * Modules/webaudio/AnalyserNode.h: Update for above. |
| * Modules/webaudio/AnalyserNode.idl: Ditto. |
| |
| * Modules/webaudio/AudioBasicInspectorNode.cpp: |
| (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode): |
| Initialize m_needAutomaticPull in class definition. |
| (WebCore::AudioBasicInspectorNode::connect): Use ExceptionOr. |
| (WebCore::AudioBasicInspectorNode::disconnect): Ditto. |
| * Modules/webaudio/AudioBasicInspectorNode.h: Updated for above. |
| |
| * Modules/webaudio/AudioBuffer.cpp: |
| (WebCore::AudioBuffer::createFromAudioFileData): Use reference. |
| (WebCore::AudioBuffer::AudioBuffer): Initialize m_gain in class definition. |
| (WebCore::AudioBuffer::getChannelData): Use ExceptionOr. |
| (WebCore::AudioBuffer::channelData): Rename to disambiguate with getChannelData. |
| (WebCore::AudioBuffer::zero): Use modern for loop. |
| * Modules/webaudio/AudioBuffer.h: Update for above. |
| * Modules/webaudio/AudioBuffer.idl: Ditto. |
| |
| * Modules/webaudio/AudioBufferSourceNode.cpp: |
| (WebCore::AudioBufferSourceNode::process): Use reference. |
| (WebCore::AudioBufferSourceNode::setBuffer): Use channelData. |
| (WebCore::AudioBufferSourceNode::start): Use ExceptionOr. |
| (WebCore::AudioBufferSourceNode::startPlaying): Ditto. |
| * Modules/webaudio/AudioBufferSourceNode.h: Update for above. |
| * Modules/webaudio/AudioBufferSourceNode.idl: Ditto. |
| |
| * Modules/webaudio/AudioContext.cpp: |
| (WebCore::AudioContext::createBuffer): Use ExceptionOr. |
| (WebCore::AudioContext::createMediaElementSource): Ditto. |
| (WebCore::AudioContext::createMediaStreamSource): Ditto. |
| (WebCore::AudioContext::createScriptProcessor): Ditto. |
| (WebCore::AudioContext::createDelay): Ditto. |
| (WebCore::AudioContext::createChannelSplitter): Ditto. |
| (WebCore::AudioContext::createChannelMerger): Ditto. |
| (WebCore::AudioContext::createPeriodicWave): Ditto. |
| * Modules/webaudio/AudioContext.h: Update for above. |
| * Modules/webaudio/AudioContext.idl: Ditto. |
| |
| * Modules/webaudio/AudioDestinationNode.h: Use unsigned instead |
| of unsigned long for maxChannelCount. |
| |
| * Modules/webaudio/AudioNode.cpp: |
| (WebCore::AudioNode::connect): Use ExceptionOr. |
| (WebCore::AudioNode::disconnect): Ditto. |
| (WebCore::AudioNode::channelCount): Use unsigned. |
| (WebCore::AudioNode::setChannelCount): Use ExceptionOr and unsigned. |
| (WebCore::AudioNode::setChannelCountMode): Ditto. |
| (WebCore::AudioNode::setChannelInterpretation): Ditto. |
| * Modules/webaudio/AudioNode.h: Update for above. |
| * Modules/webaudio/AudioNode.idl: Ditto. |
| |
| * Modules/webaudio/AudioScheduledSourceNode.cpp: |
| (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode): |
| Initialize data members in class definition. |
| (WebCore::AudioScheduledSourceNode::updateSchedulingInfo): Take |
| a reference instead of a pointer to the audio bus. |
| (WebCore::AudioScheduledSourceNode::start): Use ExceptionOr. |
| (WebCore::AudioScheduledSourceNode::stop): Ditto. |
| * Modules/webaudio/AudioScheduledSourceNode.h: Update for above. |
| |
| * Modules/webaudio/ConvolverNode.cpp: |
| (WebCore::ConvolverNode::ConvolverNode): Initialize m_normalize |
| in class definition. |
| (WebCore::ConvolverNode::setBuffer): Use ExceptionOr. |
| * Modules/webaudio/ConvolverNode.h: Update for above. |
| * Modules/webaudio/ConvolverNode.idl: Ditto. |
| |
| * Modules/webaudio/DefaultAudioDestinationNode.cpp: |
| (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode): |
| Initialize m_numberOfInputChannels in class definition. |
| (WebCore::DefaultAudioDestinationNode::maxChannelCount): Use unsigned. |
| (WebCore::DefaultAudioDestinationNode::setChannelCount): Use ExceptionOr. |
| * Modules/webaudio/DefaultAudioDestinationNode.h: Update for changes above. |
| |
| * Modules/webaudio/DelayNode.cpp: |
| (WebCore::DelayNode::DelayNode): Moved exception logic out of constructor. |
| (WebCore::DelayNode::create): Added. Moved exception logic in here. |
| (WebCore::DelayNode::delayTime): Moved typecast here from header. |
| * Modules/webaudio/DelayNode.h: Update for above. |
| |
| * Modules/webaudio/OfflineAudioContext.cpp: |
| (WebCore::OfflineAudioContext::OfflineAudioContext): Marked inline. |
| (WebCore::OfflineAudioContext::create): Use ExceptionOr. |
| (WebCore::OfflineAudioContext::~OfflineAudioContext): Deleted. Unneeded. |
| * Modules/webaudio/OfflineAudioContext.h: Update for above. |
| * Modules/webaudio/OfflineAudioContext.idl: Ditto. |
| |
| * Modules/webaudio/OfflineAudioDestinationNode.cpp: |
| (WebCore::OfflineAudioDestinationNode::offlineRender): Use channelData. |
| |
| * Modules/webaudio/OscillatorNode.cpp: |
| (WebCore::OscillatorNode::OscillatorNode): Updated for change to setType. |
| (WebCore::OscillatorNode::setType): Use ExceptionOr. |
| (WebCore::OscillatorNode::process): Use a reference. |
| * Modules/webaudio/OscillatorNode.h: Update for above. |
| * Modules/webaudio/OscillatorNode.idl: Ditto. |
| |
| * Modules/webaudio/ScriptProcessorNode.cpp: |
| (WebCore::ScriptProcessorNode::process): Use channelData. |
| |
| * bindings/js/JSDOMBinding.h: Added overloads of toJS to it can be used on |
| references to array buffers and array buffer views, not just pointers. |
| |
| 2016-10-10 Youenn Fablet <youenn@apple.com> |
| |
| Change HTTPHeaderValues from a struct to a namespace |
| https://bugs.webkit.org/show_bug.cgi?id=163203 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| |
| * Modules/fetch/FetchBody.cpp: |
| (WebCore::FetchBody::extract): |
| * platform/network/HTTPHeaderValues.cpp: |
| (WebCore::HTTPHeaderValues::textPlainContentType): |
| (WebCore::HTTPHeaderValues::formURLEncodedContentType): |
| (WebCore::HTTPHeaderValues::TextPlainContentType): Deleted. |
| (WebCore::HTTPHeaderValues::FormURLEncodedContentType): Deleted. |
| * platform/network/HTTPHeaderValues.h: |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::send): |
| |
| 2016-10-10 Chris Dumez <cdumez@apple.com> |
| |
| Update WheelEvent / MouseEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163254 |
| |
| Reviewed by Darin Adler. |
| |
| Update WheelEvent / MouseEvent to stop using legacy [ConstructorTemplate=Event] |
| and use a regular constructor instead, as in the specification: |
| - https://www.w3.org/TR/uievents/#interface-mouseevent |
| - https://www.w3.org/TR/uievents/#interface-wheelevent |
| |
| * CMakeLists.txt: |
| * DerivedSources.cpp: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): |
| (GenerateDictionaryHeader): |
| Fix our broken dependency tracking when it comes to dictionaries. |
| |
| * dom/MouseEvent.cpp: |
| (WebCore::MouseEvent::create): |
| (WebCore::MouseEvent::MouseEvent): |
| * dom/MouseEvent.h: |
| * dom/MouseEvent.idl: |
| * dom/MouseEventInit.h: Added. |
| * dom/MouseEventInit.idl: Added. |
| * dom/MouseRelatedEvent.cpp: |
| (WebCore::MouseRelatedEvent::MouseRelatedEvent): |
| * dom/MouseRelatedEvent.h: |
| * dom/UIEventWithKeyState.h: |
| (WebCore::UIEventWithKeyState::UIEventWithKeyState): |
| * dom/WheelEvent.cpp: |
| (WebCore::WheelEvent::WheelEvent): |
| * dom/WheelEvent.h: |
| * dom/WheelEvent.idl: |
| |
| 2016-10-10 Chris Dumez <cdumez@apple.com> |
| |
| Add support for languagechange event |
| https://bugs.webkit.org/show_bug.cgi?id=163222 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Add support for languagechange event: |
| - https://html.spec.whatwg.org/#dom-navigator-languages |
| |
| Firefox and Chrome already support this. |
| |
| Test: fast/dom/window-languagechange-event.html |
| |
| * dom/EventNames.h: |
| * html/HTMLAttributeNames.in: |
| * html/HTMLBodyElement.cpp: |
| (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): |
| * page/DOMWindow.cpp: |
| (WebCore::languagesChangedCallback): |
| (WebCore::DOMWindow::DOMWindow): |
| (WebCore::DOMWindow::~DOMWindow): |
| (WebCore::DOMWindow::languagesChanged): |
| (WebCore::DOMWindow::canShowModalDialog): Deleted. |
| (WebCore::DOMWindow::removeEventListener): Deleted. |
| * page/DOMWindow.h: |
| * page/WindowEventHandlers.idl: |
| |
| 2016-10-10 Chris Dumez <cdumez@apple.com> |
| |
| Update GamepadEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163243 |
| |
| Reviewed by Darin Adler. |
| |
| Update GamepadEvent to stop using legacy [ConstructorTemplate=Event] |
| and use a proper constructor as in the specification: |
| - https://w3c.github.io/gamepad/#gamepadevent-interface |
| |
| * Modules/gamepad/GamepadEvent.cpp: |
| (WebCore::GamepadEvent::GamepadEvent): |
| * Modules/gamepad/GamepadEvent.h: |
| (WebCore::GamepadEvent::create): |
| (WebCore::GamepadEvent::~GamepadEvent): Deleted. |
| * Modules/gamepad/GamepadEvent.idl: |
| |
| 2016-10-10 Darin Adler <darin@apple.com> |
| |
| Move Fetch from legacy to new DOM exceptions |
| https://bugs.webkit.org/show_bug.cgi?id=163195 |
| |
| Reviewed by Chris Dumez. |
| |
| * Modules/fetch/FetchHeaders.cpp: |
| (WebCore::canWriteHeader): Use ExceptionOr. |
| (WebCore::FetchHeaders::append): Ditto. |
| (WebCore::FetchHeaders::remove): Ditto. |
| (WebCore::FetchHeaders::get): Ditto. |
| (WebCore::FetchHeaders::has): Ditto. |
| (WebCore::FetchHeaders::set): Ditto. |
| (WebCore::FetchHeaders::filterAndFill): Ditto. |
| (WebCore::FetchHeaders::Iterator::next): Got rid of unneeded code to |
| clear out m_keys after the last call to next, since it will be deleted |
| as soon as the iterator is deleted. |
| |
| * Modules/fetch/FetchHeaders.h: Use pragma once. Use ExceptionOr. |
| |
| * Modules/fetch/FetchHeaders.idl: Move to non-legacy exceptions. |
| |
| * Modules/fetch/FetchRequest.cpp: |
| (WebCore::FetchRequest::setBody): Use ExceptionOr. |
| (WebCore::FetchRequest::clone): Ditto. |
| |
| * Modules/fetch/FetchRequest.h: Use pragma once. Use ExceptionOr. |
| |
| * Modules/fetch/FetchRequest.idl: Move to non-legacy exceptions. |
| |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::redirect): Use ExceptionOr. |
| (WebCore::FetchResponse::setStatus): Ditto. |
| |
| * Modules/fetch/FetchResponse.h: Use ExceptionOr. |
| |
| * Modules/fetch/FetchResponse.idl: Move to non-legacy exceptions. |
| |
| * bindings/js/JSDOMBinding.h: Added implementation of toJSNullableString. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (NativeToJSValue): Call toJSNullableString and toJSString for |
| functions that return ExceptionOr<String>. |
| |
| 2016-10-10 Nan Wang <n_wang@apple.com> |
| |
| AX: Expose invalid status for input types with that information |
| https://bugs.webkit.org/show_bug.cgi?id=163252 |
| <rdar://problem/28704409> |
| |
| Reviewed by Chris Fleizach. |
| |
| For input types with invalid input value, we should expose the invalid |
| status to the assitive technology. |
| |
| Test: accessibility/mac/invalid-status-for-input-types.html |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::invalidStatus): |
| |
| 2016-10-10 Konstantin Tokarev <annulen@yandex.ru> |
| |
| Added override specifier to PluginViewBase::isPluginViewBase() |
| https://bugs.webkit.org/show_bug.cgi?id=163218 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests needed. |
| |
| * plugins/PluginViewBase.h: |
| |
| 2016-10-10 Alex Christensen <achristensen@webkit.org> |
| |
| Don't run SecurityOrigin's port through URLParser |
| https://bugs.webkit.org/show_bug.cgi?id=163253 |
| |
| Reviewed by Brady Eidson. |
| |
| No change in behavior. |
| |
| * page/SecurityOrigin.cpp: |
| (WebCore::SecurityOrigin::maybeCreateFromDatabaseIdentifier): |
| (WebCore::SecurityOrigin::create): |
| We used to parse URLs like "file://:0/" which are valid when using URL::parse |
| but aren't valid when we start using the URLParser, which matches other browsers' failure |
| to parse URLs with a port but no host. There is no reason to write and parse the port. |
| Setting m_port directly accomplishes the same thing. |
| |
| 2016-10-10 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| <Error>: CGContextSetLineDash: invalid dash array: at least one element must be non-zero |
| https://bugs.webkit.org/show_bug.cgi?id=138555 |
| |
| Reviewed by Simon Fraser. |
| |
| Ensure the dashArray has at least one non-zero element before calling |
| GraphicsContext::setLineDash(). Call GraphicsContext::setStrokeStyle() |
| instead, if the dashArray does not have one. |
| |
| * rendering/svg/SVGRenderSupport.cpp: |
| (WebCore::SVGRenderSupport::applyStrokeStyleToContext): |
| |
| 2016-10-10 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Correct Radial Graident Bug |
| https://bugs.webkit.org/show_bug.cgi?id=163241 |
| |
| Reviewed by Darin Adler. |
| |
| Radial gradients were not working correctly under Direct2D because the |
| points and radius values used were incorrect. D2D wants a center point and |
| an offset, not a start and end point. It wants an X and Y radius (for an |
| ellipse), not a radius at the start point, and a radius at the end point. |
| |
| Covered by existing fast/gradients/css-radial-gradients.html (and others). |
| |
| * platform/graphics/Image.cpp: |
| (WebCore::Image::drawTiled): Remove 'notImplemented' code path. |
| * platform/graphics/win/GradientDirect2D.cpp: |
| (WebCore::Gradient::generateGradient): Use correct input values to |
| the Radial Gradient constructor. |
| (WebCore::Gradient::fill): Generate a gradient if we have no active |
| one to use. |
| |
| 2016-10-10 Jiewen Tan <jiewen_tan@apple.com> |
| |
| Rename CryptoAlgorithmParameters to CryptoAlgorithmParametersDeprecated |
| https://bugs.webkit.org/show_bug.cgi?id=163163 |
| <rdar://problem/28681544> |
| |
| Reviewed by Brent Fulgham. |
| |
| Replace all uses of 'CryptoAlgorithmParameters' with 'CryptoAlgorithmParametersDeprecated' in preparation for a new CryptoAlgorithmParameters type. |
| |
| No changes of behaviors. No new tests. |
| |
| * Modules/encryptedmedia/CDMSessionClearKey.cpp: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSCryptoAlgorithmDictionary.cpp: |
| * bindings/js/JSCryptoAlgorithmDictionary.h: |
| * bindings/js/JSCryptoKeySerializationJWK.cpp: |
| * bindings/js/JSCryptoKeySerializationJWK.h: |
| * bindings/js/JSWebKitSubtleCryptoCustom.cpp: |
| * crypto/CryptoAlgorithm.cpp: |
| * crypto/CryptoAlgorithm.h: |
| * crypto/CryptoAlgorithmParametersDeprecated.h: Renamed from Source/WebCore/crypto/CryptoAlgorithmParameters.h. |
| * crypto/CryptoKeySerialization.h: |
| * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: |
| * crypto/algorithms/CryptoAlgorithmAES_CBC.h: |
| * crypto/algorithms/CryptoAlgorithmAES_KW.cpp: |
| * crypto/algorithms/CryptoAlgorithmAES_KW.h: |
| * crypto/algorithms/CryptoAlgorithmHMAC.cpp: |
| * crypto/algorithms/CryptoAlgorithmHMAC.h: |
| * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp: |
| * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h: |
| * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: |
| * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: |
| * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp: |
| * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h: |
| * crypto/algorithms/CryptoAlgorithmSHA1.cpp: |
| * crypto/algorithms/CryptoAlgorithmSHA1.h: |
| * crypto/algorithms/CryptoAlgorithmSHA224.cpp: |
| * crypto/algorithms/CryptoAlgorithmSHA224.h: |
| * crypto/algorithms/CryptoAlgorithmSHA256.cpp: |
| * crypto/algorithms/CryptoAlgorithmSHA256.h: |
| * crypto/algorithms/CryptoAlgorithmSHA384.cpp: |
| * crypto/algorithms/CryptoAlgorithmSHA384.h: |
| * crypto/algorithms/CryptoAlgorithmSHA512.cpp: |
| * crypto/algorithms/CryptoAlgorithmSHA512.h: |
| * crypto/keys/CryptoKeySerializationRaw.cpp: |
| * crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp: |
| * crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp: |
| * crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp: |
| * crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp: |
| * crypto/keys/CryptoKeySerializationRaw.h: |
| * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp: |
| * crypto/mac/CryptoAlgorithmHMACMac.cpp: |
| * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: |
| * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp: |
| * crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h. |
| * crypto/parameters/CryptoAlgorithmAesKeyGenParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmAesKeyGenParams.h. |
| * crypto/parameters/CryptoAlgorithmHmacKeyParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmHmacKeyParams.h. |
| * crypto/parameters/CryptoAlgorithmHmacParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmHmacParams.h. |
| * crypto/parameters/CryptoAlgorithmRsaKeyGenParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h. |
| * crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHashDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h. |
| * crypto/parameters/CryptoAlgorithmRsaOaepParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaOaepParams.h. |
| * crypto/parameters/CryptoAlgorithmRsaSsaParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaSsaParams.h. |
| |
| 2016-10-10 Darin Adler <darin@apple.com> |
| |
| Move NotificationCenter from legacy to new DOM exceptions |
| https://bugs.webkit.org/show_bug.cgi?id=163217 |
| |
| Reviewed by Chris Dumez. |
| |
| * Modules/notifications/DOMWindowNotifications.cpp: |
| (WebCore::DOMWindowNotifications::webkitNotifications): Pass reference to |
| document instead of pointer. Also use auto and early return. |
| |
| * Modules/notifications/Notification.cpp: |
| (WebCore::Notification::Notification): Move checks that can lead to |
| throwing an exception out of the constructor into the create function. |
| (WebCore::Notification::create): Changed to use ExceptionOr. Also moved |
| checks that can lead to throwing an exception here. |
| (WebCore::Notification::show): Update since NotificationController::client |
| now returns a reference. |
| (WebCore::Notification::permission): Ditto. |
| (WebCore::Notification::requestPermission): Ditto. |
| |
| * Modules/notifications/Notification.h: Updated for above changes. |
| |
| * Modules/notifications/NotificationCenter.cpp: |
| (WebCore::NotificationCenter::create): Take a reference to the script execution |
| context instead of a pointer. |
| (WebCore::NotificationCenter::NotificationCenter): Ditto. |
| (WebCore::NotificationCenter::createNotification): Use ExceptionOr. |
| (WebCore::NotificationCenter::requestPermission): Take an rvalue reference. |
| |
| * Modules/notifications/NotificationCenter.h: Use pragma once. |
| Marked the class final. Updated for changes above. |
| |
| * Modules/notifications/NotificationCenter.idl: Use non-legacy exceptions. |
| |
| * Modules/notifications/NotificationController.cpp: |
| (WebCore::NotificationController::NotificationController): Use a reference rather |
| than a pointer for m_client, since it is never null. |
| (WebCore::NotificationController::~NotificationController): Ditto. |
| (WebCore::NotificationController::clientFrom): Updated for the change above. |
| |
| * Modules/notifications/NotificationController.h: Updated for the change above. |
| |
| * Modules/notifications/WorkerGlobalScopeNotifications.cpp: |
| (WebCore::WorkerGlobalScopeNotifications::webkitNotifications): Updated to |
| pass a reference for the script execution context. Also added FIXME about the |
| fact that the client is always null. |
| |
| 2016-10-10 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Placards |
| https://bugs.webkit.org/show_bug.cgi?id=163110 |
| <rdar://problem/28669342> |
| |
| Reviewed by Dean Jackson. |
| |
| Inline media controls need to display placards when the video is no longer playing inline, |
| such as when the video is playing fullscreen or via AirPlay. To that end, we introduce a |
| new Placard class and two subclasses for display during fullscreen or AirPlay playback. |
| Note that localization will be done in a later patch. |
| |
| Tests: media/modern-media-controls/airplay-placard/airplay-placard.html |
| media/modern-media-controls/pip-placard/pip-placard.html |
| media/modern-media-controls/placard/placard.html |
| |
| * Modules/modern-media-controls/controls/airplay-placard.js: |
| (AirplayPlacard): |
| * Modules/modern-media-controls/controls/icon-service.js: |
| * Modules/modern-media-controls/controls/pip-placard.js: |
| (PiPPlacard): |
| * Modules/modern-media-controls/controls/placard.css: |
| (.placard): |
| (.placard .container): |
| (.placard .icon): |
| (.placard .title,): |
| (.placard .title): |
| (.placard .description): |
| * Modules/modern-media-controls/controls/placard.js: |
| (Placard.): |
| * Modules/modern-media-controls/images/iOS/airplay-placard@1x.png: Added. |
| * Modules/modern-media-controls/images/iOS/airplay-placard@2x.png: Added. |
| * Modules/modern-media-controls/images/iOS/airplay-placard@3x.png: Added. |
| * Modules/modern-media-controls/images/iOS/pip-placard@1x.png: Added. |
| * Modules/modern-media-controls/images/iOS/pip-placard@2x.png: Added. |
| * Modules/modern-media-controls/images/iOS/pip-placard@3x.png: Added. |
| * Modules/modern-media-controls/images/macOS/airplay-placard@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/airplay-placard@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/pip-placard@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/pip-placard@2x.png: Added. |
| |
| 2016-10-10 Chris Dumez <cdumez@apple.com> |
| |
| Add support for Navigator.languages attribute |
| https://bugs.webkit.org/show_bug.cgi?id=163220 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for Navigator.languages attribute: |
| - https://html.spec.whatwg.org/#navigatorlanguage |
| |
| Firefox and Chrome already support this. |
| |
| Currently, we always return a single language for privacy reasons so |
| this API does not actually bring anything new besides interoperability |
| with other browsers and compliance with the HTML specification. |
| |
| No new tests, rebaselined existing tests. |
| |
| * page/NavigatorBase.cpp: |
| (WebCore::NavigatorBase::languages): |
| * page/NavigatorBase.h: |
| * page/NavigatorLanguage.idl: |
| |
| 2016-10-10 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Implement dashed and dotted border line drawing |
| https://bugs.webkit.org/show_bug.cgi?id=163235 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by existing fast/border tests. |
| |
| * platform/graphics/GraphicsContext.cpp: Use custom 'setPlatformStrokeStyle' for D2D. |
| * platform/graphics/Path.cpp: |
| (WebCore::Path::length): Don't use default implementation for Direct2D. |
| * platform/graphics/win/GraphicsContextDirect2D.cpp: |
| (WebCore::GraphicsContextPlatformPrivate::brushWithColor): Initialize pointer to nullptr. |
| (WebCore::GraphicsContext::drawRect): Use proper stroke style. |
| (WebCore::GraphicsContextPlatformPrivate::setLineCap): Added. |
| (WebCore::GraphicsContextPlatformPrivate::setLineJoin): Added. |
| (WebCore::GraphicsContextPlatformPrivate::setStrokeStyle): Added. |
| (WebCore::GraphicsContextPlatformPrivate::setMiterLimit): Added. |
| (WebCore::GraphicsContextPlatformPrivate::setDashOffset): Added. |
| (WebCore::GraphicsContextPlatformPrivate::setPatternWidth): Added. |
| (WebCore::GraphicsContextPlatformPrivate::setPatternOffset): Added. |
| (WebCore::GraphicsContextPlatformPrivate::setStrokeThickness): Added. |
| (WebCore::GraphicsContextPlatformPrivate::setDashes): Added. |
| (WebCore::GraphicsContextPlatformPrivate::recomputeStrokeStyle): Added. |
| (WebCore::GraphicsContextPlatformPrivate::strokeStyle): Added. |
| (WebCore::GraphicsContext::drawLine): Use proper stroke style. |
| (WebCore::GraphicsContext::drawEllipse): Ditto. |
| (WebCore::GraphicsContext::drawPath): Ditto. |
| (WebCore::GraphicsContext::strokePath): Ditto. |
| (WebCore::GraphicsContext::setPlatformStrokeStyle): Added. |
| (WebCore::GraphicsContext::setMiterLimit): Tell D2D context about miter limit. |
| (WebCore::GraphicsContext::setLineCap): Ditto for line cap. |
| (WebCore::GraphicsContext::setLineDash): Ditto for dashes. |
| (WebCore::GraphicsContext::setLineJoin): Ditto for join style. |
| (WebCore::GraphicsContext::setPlatformStrokeThickness): Ditto for stroke thickness. |
| (WebCore::GraphicsContext::platformStrokeEllipse): Use proper stroke style. |
| * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: |
| * platform/graphics/win/PathDirect2D.cpp: |
| (WebCore::Path::currentPoint): Zero-initialize a value. |
| (WebCore::Path::length): Added. |
| |
| 2016-10-10 Chris Dumez <cdumez@apple.com> |
| |
| Update ProgressEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163221 |
| |
| Reviewed by Darin Adler. |
| |
| Update ProgressEvent to stop using legacy [ConstructorTemplate=Event] |
| and use a regular constructor as in the specification: |
| - https://xhr.spec.whatwg.org/#firing-events-using-the-progressevent-interface |
| |
| * dom/ProgressEvent.cpp: |
| (WebCore::ProgressEvent::ProgressEvent): |
| * dom/ProgressEvent.h: |
| (WebCore::ProgressEvent::create): |
| * dom/ProgressEvent.idl: |
| |
| 2016-10-10 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Address some review feedback from r206979 and r207010 |
| https://bugs.webkit.org/show_bug.cgi?id=163236 |
| |
| Reviewed by Tim Horton. |
| |
| In TypingCommand.h, some methods on TypingCommand should be marked as final to reflect the fact that they |
| override methods in CompositeEditCommand. Also, HTMLFormControlElement::dispatchFormControlInputEvent does not |
| need to specify HTMLElement::dispatchInputEvent() when calling dispatchInputEvent(). |
| |
| No new tests, since there is no behavior change. |
| |
| * editing/TypingCommand.h: |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent): |
| |
| 2016-10-10 Chris Dumez <cdumez@apple.com> |
| |
| Update MessageEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163187 |
| |
| Reviewed by Darin Adler. |
| |
| Update MessageEvent to stop using legacy [ConstructorTemplate=Event] and |
| use a regular constructor as in the specification: |
| - https://html.spec.whatwg.org/multipage/comms.html#the-messageevent-interfaces |
| |
| No new tests, updated existing test. |
| |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::toRefPtrNativeArray): |
| * bindings/js/JSDOMConvert.h: |
| (WebCore::convertWrapperTypeSequence): |
| (WebCore::convertWrapperType): Deleted. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDefaultValue): |
| (GenerateDictionaryImplementationContent): |
| (GetNativeType): |
| * dom/MessageEvent.cpp: |
| (WebCore::MessageEvent::MessageEvent): |
| (WebCore::MessageEvent::create): |
| (WebCore::MessageEvent::trySerializeData): |
| (WebCore::MessageEvent::createForBindings): Deleted. |
| (WebCore::MessageEvent::initMessageEvent): Deleted. |
| * dom/MessageEvent.h: |
| * dom/MessageEvent.idl: |
| |
| 2016-10-10 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Buttons |
| https://bugs.webkit.org/show_bug.cgi?id=163109 |
| <rdar://problem/28668954> |
| |
| Reviewed by Dean Jackson. |
| |
| We introduce specific IconButton subclasses for the various buttons we will be using |
| in media controls on macOS (inline and fullscreen) and iOS. One class, StartButton, is |
| a subclass of Button and not IconButton because we're only interested in having it display |
| an <img> element rather than use a mask and requires additional DOM structure. |
| |
| Tests: media/modern-media-controls/airplay-button/airplay-button-on.html |
| media/modern-media-controls/airplay-button/airplay-button.html |
| media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html |
| media/modern-media-controls/forward-button/forward-button.html |
| media/modern-media-controls/fullscreen-button/fullscreen-button.html |
| media/modern-media-controls/mute-button/mute-button.html |
| media/modern-media-controls/pip-button/pip-button.html |
| media/modern-media-controls/play-pause-button/play-pause-button.html |
| media/modern-media-controls/rewind-button/rewind-button.html |
| media/modern-media-controls/skip-back-button/skip-back-button.html |
| media/modern-media-controls/start-button/start-button.html |
| media/modern-media-controls/tracks-button/tracks-button.html |
| |
| * Modules/modern-media-controls/controls/airplay-button.css: |
| (button.airplay.on): |
| * Modules/modern-media-controls/controls/airplay-button.js: |
| (AirplayButton): |
| (AirplayButton.prototype.set on): |
| * Modules/modern-media-controls/controls/aspect-ratio-button.js: |
| (AspectRatioButton): |
| (AspectRatioButton.prototype.get scalesToFill): |
| (AspectRatioButton.prototype.set scalesToFill): |
| * Modules/modern-media-controls/controls/forward-button.js: |
| (ForwardButton): |
| * Modules/modern-media-controls/controls/fullscreen-button.js: |
| (FullscreenButton): |
| * Modules/modern-media-controls/controls/icon-button.js: |
| * Modules/modern-media-controls/controls/icon-service.js: |
| * Modules/modern-media-controls/controls/mute-button.js: |
| (MuteButton): |
| (MuteButton.prototype.get muted): |
| (MuteButton.prototype.set muted): |
| * Modules/modern-media-controls/controls/pip-button.js: |
| (PiPButton): |
| * Modules/modern-media-controls/controls/play-pause-button.js: |
| (PlayPauseButton): |
| (PlayPauseButton.prototype.get playing): |
| (PlayPauseButton.prototype.set playing): |
| * Modules/modern-media-controls/controls/rewind-button.js: |
| (RewindButton): |
| * Modules/modern-media-controls/controls/skip-back-button.js: |
| (SkipBackButton): |
| * Modules/modern-media-controls/controls/start-button.js: |
| (StartButton): |
| * Modules/modern-media-controls/controls/tracks-button.js: |
| (TracksButton): |
| * Modules/modern-media-controls/images/iOS/airplay@1x.png: Added. |
| * Modules/modern-media-controls/images/iOS/airplay@2x.png: Added. |
| * Modules/modern-media-controls/images/iOS/enter-fullscreen@1x.png: Added. |
| * Modules/modern-media-controls/images/iOS/enter-fullscreen@2x.png: Added. |
| * Modules/modern-media-controls/images/iOS/enter-fullscreen@3x.png: Added. |
| * Modules/modern-media-controls/images/iOS/interval-skip-back@1x.png: Added. |
| * Modules/modern-media-controls/images/iOS/interval-skip-back@2x.png: Added. |
| * Modules/modern-media-controls/images/iOS/interval-skip-back@3x.png: Added. |
| * Modules/modern-media-controls/images/iOS/pause@1x.png: Added. |
| * Modules/modern-media-controls/images/iOS/pip-in@1x.png: Added. |
| * Modules/modern-media-controls/images/iOS/pip-in@2x.png: Added. |
| * Modules/modern-media-controls/images/iOS/pip-in@3x.png: Added. |
| * Modules/modern-media-controls/images/iOS/play@1x.png: Added. |
| * Modules/modern-media-controls/images/iOS/play@2x.png: Added. |
| * Modules/modern-media-controls/images/iOS/play@3x.png: Added. |
| * Modules/modern-media-controls/images/iOS/start@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/airplay-fullscreen@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/airplay-fullscreen@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/airplay@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/airplay@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/enter-fullscreen@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/enter-fullscreen@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/exit-fullscreen@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/exit-fullscreen@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/forward@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/forward@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/interval-skip-back@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/interval-skip-back@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/media-selection-fullscreen@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/media-selection-fullscreen@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/media-selection@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/media-selection@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/pip-in@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/pip-in@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/play-fullscreen@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/play-fullscreen@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/play@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/play@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/rewind@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/rewind@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/scale-to-fill@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/scale-to-fill@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/scale-to-fit@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/scale-to-fit@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/volume-mute@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/volume-mute@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/volume@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/volume@2x.png: Added. |
| |
| 2016-10-10 Nan Wang <n_wang@apple.com> |
| |
| AX: Update AXPlaceHolder algorithm |
| https://bugs.webkit.org/show_bug.cgi?id=163229 |
| |
| Reviewed by Chris Fleizach. |
| |
| From https://w3c.github.io/html-aam/ |
| When the placeholder and aria-placeholder attributes are both present, we |
| should expose the value of the placeholder attribute. Updated the algorithm |
| for that. |
| |
| Changes are covered in the modified test. |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::placeholderValue): |
| |
| 2016-10-10 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [DOMJIT] Implement Node accessors in DOMJIT |
| https://bugs.webkit.org/show_bug.cgi?id=163005 |
| |
| Reviewed by Filip Pizlo. |
| |
| This patch implements DOMJIT accessors in WebCore. We plan to offer 2 things in DOMJIT. |
| |
| 1. Hand written DOM inlining. |
| |
| We inject DOMJIT::Patchpoint compiler into JSC. And JSC uses this to inline DOM operation, |
| and drop type checks. Since the operation is fully inlined, potentially it has large |
| performance boost. Note that CSS Selector JIT compiler already does the similar things: |
| accessing parentNode etc. directly by using offsets. |
| |
| 2. Exposing signature information. |
| |
| We will offer function type signature by some representation and pass it to JSC. |
| JSC will use to drop type checks. Since IDL code generator already knows this, |
| we can automatically generate such a information. Since we don't perform any inlining, |
| the performance boost may be limited. But it's worth doing. |
| |
| This patch implements the first one, hand written DOM inlining facility. We add a new IDL attribute, |
| "DOMJIT". This means that "This readonly attribute have a DOMJIT patchpoint compiler". |
| We annotate several accessors at first. "firstChild", "lastChild", "nextSibling", "previousSibling", |
| and "parentNode". And we implement DOMJIT::Patchpoint for that in JSNodeDOMJIT.cpp. |
| |
| This patchpoint will be integrated into JSC's DFG and FTL. And these tiers can drop type checks and |
| inline the entire code of these accessors. JSC compiler still does not know much about DOM. And WebCore |
| does not know much about each tier of JSC. WebCore just offers the generic patchpoints and they are |
| used in both DFG and FTL tiers. The layer separation is still kept. |
| |
| While very small microbenchmark[1] shows performance benefit, still we cannot improve DOM |
| benchmarks due to the lack of following implementations. Once the following implementations |
| are implemented, we will get performance boost. |
| |
| 1. Super polymorphic sites. |
| |
| This inlining is super effective if we run some microbenchmarks. However, Dromaeo does not |
| show so much performance benefit. This is because Dromaeo's dom-traverse.html is super |
| polymorphic call site where JSC gives up optimization. For example, in the following |
| dromaeo's benchmark, we can see so various DOM nodes at the `cur.firstChild` site, like, |
| HTMLDivElement, HTMLAnchorElement, Text, Comment etc. JSC gives up optimization since we |
| encounter so many Structures. This should be optimized since they share the large part of |
| prototype-chain and they hit the exactly same CustomGetter, Node.prototype.firstChild. |
| We will handle this and when we optimize it, this DOMJIT works well on Dromaeo. |
| |
| test( "firstChild", function(){ |
| var nodes = document.body.childNodes, nl = nodes.length; |
| |
| for ( var i = 0; i < num; i++ ) { |
| for ( var j = 0; j < nl; j++ ) { |
| var cur = nodes[j]; |
| while ( cur ) |
| cur = cur.firstChild; |
| ret = cur; |
| } |
| } |
| }); |
| |
| 2. Emit code in IC. |
| |
| Currently, we only optimize DOMJIT accessors in DFG and FTL. However, we should leverage |
| this DOMJIT::Patchpoint to emit inlined code even in Inline Caching (IC). We will emit |
| CheckDOM's code for IC's guard phase, and emit CallDOM's code for IC's get phase. This |
| offers performance benefit even if we live in baseline JIT code. And this should be easy. |
| |
| [1]: With the following one, we can see 3x improvement (26ms v.s. 80ms). |
| |
| var element = document.getElementsByTagName('div')[3]; |
| var before = Date.now(); |
| for (var i = 0; i < 1e7; ++i) |
| element.firstChild; |
| console.log(Date.now() - before); |
| |
| * CMakeLists.txt: |
| * ForwardingHeaders/domjit/DOMJITGetterSetter.h: |
| * ForwardingHeaders/domjit/DOMJITPatchpoint.h: Copied from Source/JavaScriptCore/domjit/DOMJITSlowPathCalls.h. |
| * ForwardingHeaders/domjit/DOMJITPatchpointParams.h: Copied from Source/JavaScriptCore/domjit/DOMJITSlowPathCalls.h. |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSDOMGlobalObject.h: |
| * bindings/js/JSDOMWrapper.h: |
| (WebCore::JSDOMWrapper::offsetOfWrapped): |
| (WebCore::JSDOMWrapper::wrapped): Deleted. |
| * bindings/js/ScriptWrappable.h: |
| (WebCore::ScriptWrappable::offsetOfWrapper): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GetJSCAttributesForAttribute): |
| (GenerateHeader): |
| (GeneratePropertiesHashTable): |
| (GenerateImplementation): |
| (GenerateHashTableValueArray): |
| * bindings/scripts/IDLAttributes.txt: |
| * dom/ContainerNode.h: |
| (WebCore::ContainerNode::lastChildMemoryOffset): |
| (WebCore::ContainerNode::lastChild): Deleted. |
| * dom/Node.h: |
| (WebCore::Node::flagIsContainer): |
| (WebCore::Node::flagIsText): Deleted. |
| * dom/Node.idl: |
| * domjit/DOMJITHelpers.h: Added. |
| (WebCore::DOMJITHelpers::branchIfNotWorldIsNormal): |
| (WebCore::DOMJITHelpers::branchIfNotWeakIsLive): |
| (WebCore::DOMJITHelpers::tryLookUpWrapperCache): |
| (WebCore::DOMJITHelpers::toWrapper): |
| (WebCore::DOMJITHelpers::branchIfDOMWrapper): |
| (WebCore::DOMJITHelpers::branchIfNotDOMWrapper): |
| (WebCore::DOMJITHelpers::branchIfNode): |
| (WebCore::DOMJITHelpers::branchIfNotNode): |
| (WebCore::DOMJITHelpers::branchIfElement): |
| (WebCore::DOMJITHelpers::branchIfNotElement): |
| (WebCore::DOMJITHelpers::branchIfDocumentWrapper): |
| (WebCore::DOMJITHelpers::branchIfNotDocumentWrapper): |
| * domjit/JSNodeDOMJIT.cpp: Added. |
| (WebCore::toWrapperSlow): |
| (WebCore::createCallDOMForOffsetAccess): |
| (WebCore::checkNode): |
| (WebCore::NodeFirstChildDOMJIT::checkDOM): |
| (WebCore::NodeFirstChildDOMJIT::callDOM): |
| (WebCore::NodeLastChildDOMJIT::checkDOM): |
| (WebCore::NodeLastChildDOMJIT::callDOM): |
| (WebCore::NodeNextSiblingDOMJIT::checkDOM): |
| (WebCore::NodeNextSiblingDOMJIT::callDOM): |
| (WebCore::NodePreviousSiblingDOMJIT::checkDOM): |
| (WebCore::NodePreviousSiblingDOMJIT::callDOM): |
| (WebCore::NodeParentNodeDOMJIT::checkDOM): |
| (WebCore::NodeParentNodeDOMJIT::callDOM): |
| |
| 2016-10-10 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Support InputEvent.data for the new InputEvent spec |
| https://bugs.webkit.org/show_bug.cgi?id=163113 |
| <rdar://problem/28681935> |
| |
| Reviewed by Darin Adler. |
| |
| Introduces InputEvent.data, a string attribute that, if non-null, indicates the text to be inserted by an input |
| event. For text areas and text inputs, the 'insertText', 'insertFromPaste', 'insertFromDrop', and |
| 'insertReplacementText' input types should cause subsequent `input` and `beforeinput` events to have non-null |
| data. However, for contenteditable areas, only 'insertText' leads to having data in resulting InputEvents. |
| |
| To implement this, we introduce a new virtual method, CompositeEditCommand::inputEventData, which gives |
| composite editing commands the chance to vend a data string for input events they might fire (by default, this |
| is null). |
| |
| Tests: fast/events/input-events-paste-data.html |
| fast/events/input-events-typing-data.html |
| |
| * dom/InputEvent.cpp: |
| (WebCore::InputEvent::InputEvent): |
| * dom/InputEvent.h: |
| * dom/InputEvent.idl: |
| |
| Currently, our InputEventInit struct is wrong. According to the UI-Events spec at www.w3.org/TR/uievents/, the |
| init struct for an InputEvent should contain a data string (added in this patch) as well as an isComposing flag |
| (to be added in a future patch along with composition support). While adding support for the data attribute, we |
| tweak the InputEvent IDL and headers slightly to adjust for this. |
| |
| * dom/Node.cpp: |
| (WebCore::Node::dispatchInputEvent): |
| * dom/Node.h: |
| * editing/CompositeEditCommand.h: |
| (WebCore::CompositeEditCommand::inputEventData): |
| * editing/EditCommand.cpp: |
| (WebCore::EditCommand::isEditingTextAreaOrTextInput): |
| * editing/EditCommand.h: |
| * editing/Editor.cpp: |
| (WebCore::dispatchBeforeInputEvent): |
| (WebCore::dispatchInputEvent): |
| (WebCore::dispatchBeforeInputEvents): |
| (WebCore::dispatchInputEvents): |
| (WebCore::Editor::willApplyEditing): |
| (WebCore::Editor::appliedEditing): |
| (WebCore::Editor::setBaseWritingDirection): |
| (WebCore::Editor::computeAndSetTypingStyle): |
| * editing/ReplaceRangeWithTextCommand.cpp: |
| (WebCore::ReplaceRangeWithTextCommand::inputEventData): |
| * editing/ReplaceRangeWithTextCommand.h: |
| * editing/ReplaceSelectionCommand.cpp: |
| (WebCore::ReplaceSelectionCommand::inputEventData): |
| * editing/ReplaceSelectionCommand.h: |
| * editing/SpellingCorrectionCommand.cpp: |
| (WebCore::SpellingCorrectionCommand::inputEventData): |
| * editing/SpellingCorrectionCommand.h: |
| * editing/TypingCommand.cpp: |
| (WebCore::TypingCommand::TypingCommand): |
| (WebCore::TypingCommand::inputEventData): |
| (WebCore::TypingCommand::willAddTypingToOpenCommand): |
| (WebCore::TypingCommand::insertTextRunWithoutNewlines): |
| * editing/TypingCommand.h: |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent): |
| * html/HTMLInputElement.cpp: |
| (WebCore::HTMLInputElement::setEditingValue): |
| (WebCore::HTMLInputElement::setValueFromRenderer): |
| * html/HTMLSelectElement.cpp: |
| (WebCore::HTMLSelectElement::listBoxOnChange): |
| (WebCore::HTMLSelectElement::dispatchChangeEventForMenuList): |
| |
| 2016-10-10 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r206972. |
| https://bugs.webkit.org/show_bug.cgi?id=163227 |
| |
| Making EWS flaky (Requested by bfulgham_ on #webkit). |
| |
| Reverted changeset: |
| |
| "[CMake] CMake does not support the dep files for implicit |
| dependency" |
| https://bugs.webkit.org/show_bug.cgi?id=161433 |
| http://trac.webkit.org/changeset/206972 |
| |
| 2016-10-10 Darin Adler <darin@apple.com> |
| |
| Move media source from legacy to new DOM exceptions |
| https://bugs.webkit.org/show_bug.cgi?id=163201 |
| |
| Reviewed by Chris Dumez. |
| |
| * Modules/mediasource/MediaSource.cpp: Removed unneeded includes. |
| (WebCore::MediaSource::create): Use auto. |
| (WebCore::MediaSource::MediaSource): Initialize m_mediaElement in class definition. |
| (WebCore::MediaSource::setLiveSeekableRange): Use ExceptionOr. |
| (WebCore::MediaSource::clearLiveSeekableRange): Ditto. |
| (WebCore::MediaSource::setDuration): Ditto. |
| (WebCore::MediaSource::setDurationInternal): Ditto. |
| (WebCore::MediaSource::endOfStream): Ditto. |
| (WebCore::MediaSource::streamEndedWithError): Use bufferedInternal. |
| (WebCore::MediaSource::addSourceBuffer): Use ExceptionOr. |
| (WebCore::MediaSource::removeSourceBuffer): Ditto. |
| (WebCore::MediaSource::detachFromElement): Use removeSourceBuffer |
| without IGNORE_EXCEPTION since that is now the default behavior. |
| (WebCore::MediaSource::activeRanges): Use bufferedInternal. |
| (WebCore::MediaSource::createSourceBufferPrivate): Use ExceptionOr. |
| |
| * Modules/mediasource/MediaSource.h: Removed unneeded includes. |
| Made more things private and also private rather than protected. |
| |
| * Modules/mediasource/MediaSource.idl: Use non-legacy exceptions. |
| |
| * Modules/mediasource/SourceBuffer.cpp: |
| (WebCore::SourceBuffer::buffered): Use ExceptionOr. |
| (WebCore::SourceBuffer::setTimestampOffset): Ditto. |
| (WebCore::SourceBuffer::setAppendWindowStart): Ditto. |
| (WebCore::SourceBuffer::setAppendWindowEnd): Ditto. |
| (WebCore::SourceBuffer::appendBuffer): Ditto. |
| (WebCore::SourceBuffer::abort): Ditto. |
| (WebCore::SourceBuffer::remove): Ditto. |
| (WebCore::SourceBuffer::appendBufferInternal): Ditto. |
| (WebCore::SourceBuffer::setMode): Ditto. |
| |
| * Modules/mediasource/SourceBuffer.h: Removed unneeded includes. |
| Updated for above changes. Made more things private. |
| |
| * Modules/mediasource/SourceBuffer.idl: Use non-legacy exceptions. |
| |
| * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h: |
| Added now-needed include of MediaSourcePrivate.h. |
| |
| 2016-10-10 Jer Noble <jer.noble@apple.com> |
| |
| Address flaky airplay-* LayouTests |
| https://bugs.webkit.org/show_bug.cgi?id=163044 |
| |
| Reviewed by Brent Fulgham. |
| |
| Two separate problems conspired to make airplay tests a bit flaky: |
| |
| For one, when the HTMLMediaElement clears its MediaPlayer, it won't necessarily notify |
| clients that it has stopped playing to a wireless target. The WebMediaSessionManager may |
| eventually cause this value to reset, but it's asynchronous, and may fire after the next |
| test starts. Reset this state explicitly. |
| |
| For two, the state of the mock playback target picker was not being reset between test |
| invocations. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::clearMediaPlayer): |
| * testing/Internals.cpp: |
| (WebCore::Internals::resetToConsistentState): |
| |
| 2016-10-10 Brent Fulgham <bfulgham@apple.com> |
| |
| Correct typo in comment (patining -> painting). |
| |
| * platform/graphics/GraphicsContext.cpp: |
| (WebCore::GraphicsContext::centerLineAndCutOffCorners): |
| |
| 2016-10-10 Brent Fulgham <bfulgham@apple.com> |
| |
| Reduce code duplication between CG, Cairo, and Direct2D |
| https://bugs.webkit.org/show_bug.cgi?id=163157 |
| |
| Reviewed by Darin Adler. |
| |
| Move a number of routines that have been copied-and-pasted to different |
| platform files into the main GraphicsContext.cpp file. |
| |
| No new tests because there is no change in behavior. |
| |
| * platform/graphics/GraphicsContext.cpp: |
| (WebCore::GraphicsContext::dashedLineCornerWidthForStrokeWidth): Added. |
| (WebCore::GraphicsContext::dashedLinePatternWidthForStrokeWidth): Added. |
| (WebCore::GraphicsContext::dashedLinePatternOffsetForPatternAndStrokeWidth): Added. |
| (WebCore::GraphicsContext::centerLineAndCutOffCorners): Added. |
| * platform/graphics/GraphicsContext.h: |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::drawLine): Call new helper function. |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| (WebCore::GraphicsContext::drawLine): Ditto. |
| * platform/graphics/win/GraphicsContextDirect2D.cpp: |
| (WebCore::GraphicsContext::drawLine): Ditto. |
| |
| 2016-10-10 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| REGRESSION(r206731): [SOUP] Network process crash in gotHeadersCallback |
| https://bugs.webkit.org/show_bug.cgi?id=163170 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Do not assume NetworkingContext is non-null and valid before using it. |
| |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::gotHeadersCallback): |
| (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): |
| |
| 2016-10-10 Youenn Fablet <youenn@apple.com> |
| |
| Images and scripts should be said as clean based on CachedResource::isCORSSameOrigin |
| https://bugs.webkit.org/show_bug.cgi?id=162390 |
| |
| Reviewed by Darin Adler. |
| |
| No observable change of behavior. |
| |
| Renaming CachedResource::isClean to isCORSSameOrigin to match html spec terminology. |
| Making use of it to check whether images taint canvas and whether script errors should be sanitized. |
| |
| Some asserts are added to ensure that a resource fetched using one origin is not reused for another origin. |
| |
| * dom/ScriptExecutionContext.cpp: |
| (WebCore::ScriptExecutionContext::sanitizeScriptError): |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::initializeStyleSheet): |
| * html/canvas/CanvasRenderingContext.cpp: |
| (WebCore::CanvasRenderingContext::wouldTaintOrigin): |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::isOriginClean): |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::isCORSSameOrigin): |
| * loader/cache/CachedResource.h: |
| |
| 2016-10-10 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] Memory cache should not bypass redirect mode |
| https://bugs.webkit.org/show_bug.cgi?id=162959 |
| |
| Reviewed by Darin Adler. |
| |
| Test: http/tests/fetch/redirectmode-and-preload.html |
| |
| Ensure reloading of resources if the redirect modes are different between request and cached resource, and |
| cached resource has redirections. |
| |
| As a temporary workaround, we activate resource update for raw resources in |
| shouldUpdateCachedResourceWithCurrentRequest but disable it in canUpdateFromResource. |
| This allows handling reloading of resources with different redirection mode in canUpdateFromResource. |
| |
| A future patch should allow loading cached raw resources from other cached raw resources. |
| |
| * loader/cache/CachedResource.h: |
| (WebCore::CachedResource::hasRedirections): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest): |
| (WebCore::canUpdateFromResource): |
| (WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest): |
| |
| 2016-10-10 Youenn Fablet <youenn@apple.com> |
| |
| Attribute getter binding generated code should use more references |
| https://bugs.webkit.org/show_bug.cgi?id=163179 |
| |
| Reviewed by Darin Adler. |
| |
| No change of behavior. |
| |
| Using more references in attribute getter generated code since BindingCaller::attribute can do the |
| pointer-to-references checks once for all. |
| |
| Needed to update GenerateCallWith and NativeToJSValue to handle the case where references (attribute getters) or |
| pointers (methods and attribute setters) are to be used. |
| Future refactoring should allign methods/attribute setters to attribute getters. |
| |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::BindingCaller::attribute): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| (GenerateCallWith): |
| (NativeToJSValue): |
| (JSValueToNative): |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestException.cpp: |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestNondeterministic.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSattribute.cpp: |
| |
| 2016-10-10 Youenn Fablet <youenn@apple.com> |
| |
| Fix Mac Win build after https://trac.webkit.org/changeset/206966 |
| https://bugs.webkit.org/show_bug.cgi?id=163199 |
| |
| Unreviewed. |
| |
| * bindings/js/JSDOMBinding.h: Marking rejectPromiseWithGetterTypeError as WEBCORE_EXPORT. |
| |
| 2016-10-09 Antti Koivisto <antti@apple.com> |
| |
| Enable optimized stylesheet updates in shadow trees |
| https://bugs.webkit.org/show_bug.cgi?id=163180 |
| |
| Reviewed by Darin Adler. |
| |
| When we get a new stylesheet (for example when load completes) we invalidate only |
| those elements in DOM that are affected by the new sheet. This patch makes the |
| optimization also work in shadow trees. |
| |
| Test: fast/shadow-dom/scoped-style-invalidation.html |
| |
| * css/StyleInvalidationAnalysis.cpp: |
| (WebCore::StyleInvalidationAnalysis::invalidateStyle): |
| * css/StyleInvalidationAnalysis.h: |
| * dom/Document.cpp: |
| (WebCore::Document::didRemoveAllPendingStylesheet): |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::removePendingSheet): |
| (WebCore::Style::Scope::analyzeStyleSheetChange): |
| (WebCore::Style::Scope::updateActiveStyleSheets): |
| |
| 2016-10-10 Youenn Fablet <youenn@apple.com> |
| |
| Refactor binding generated casted-this checks for attribute setters |
| https://bugs.webkit.org/show_bug.cgi?id=163181 |
| |
| Reviewed by Darin Adler. |
| |
| No change of behavior. |
| Covered by existing tests and binding expectations. |
| |
| Adding support for attribute setter in BindingCaller. |
| Updating binding generator to make use of it. |
| Future refactoring should use more reference and rename castedThis to thisObject, like for getters. |
| |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::BindingCaller::setAttribute): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestNondeterministic.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| |
| 2016-10-09 Darin Adler <darin@apple.com> |
| |
| Move encrypted media from legacy to new DOM exceptions |
| https://bugs.webkit.org/show_bug.cgi?id=163194 |
| |
| Reviewed by Youenn Fablet. |
| |
| * Modules/encryptedmedia/CDM.cpp: |
| (WebCore::CDM::createSession): Take a reference instead of a pointer. |
| * Modules/encryptedmedia/CDM.h: Updated for above change. |
| |
| * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp: |
| (WebCore::WebKitMediaKeySession::create): Take a reference instead of a pointer. |
| (WebCore::WebKitMediaKeySession::MediaKeySession): Ditto. |
| (WebCore::WebKitMediaKeySession::~MediaKeySession): Removed unneeded code that |
| sets m_session to null. |
| (WebCore::WebKitMediaKeySession::keyRequestTimerFired): Use auto. |
| (WebCore::WebKitMediaKeySession::update): Use ExceptionOr. |
| (WebCore::WebKitMediaKeySession::addKeyTimerFired): Use m_keys directly instead |
| of calling the keys function. |
| (WebCore::WebKitMediaKeySession::sendError): Set m_error directly instead of |
| calling the setError function. |
| (WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory): Use auto. |
| (WebCore::WebKitMediaKeySession::hasPendingActivity): Check m_session directly |
| instead of writing !isClosed. |
| (WebCore::WebKitMediaKeySession::setError): Deleted. |
| |
| * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h: Use pragma once. Removed |
| unneeded includes. Changed create to take a reference instead of a pointer. |
| Made most members and base classes private instead of public. Also removed |
| a few now-unneeded functions. Made everything that was formerly protected |
| private instead, since the two are the same in a final class. |
| |
| * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: Removed unneeded comments. |
| Moved from MayThrowLegacyException to MayThrowException. |
| |
| * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp: |
| (WebCore::WebKitMediaKeys::create): Use ExceptionOr. |
| (WebCore::WebKitMediaKeys::MediaKeys): Made argument be an rvalue reference. |
| Also initialize m_mediaElement in the class definition. |
| (WebCore::WebKitMediaKeys::~MediaKeys): Call detachKeys instead of setKeys(nullptr). |
| (WebCore::WebKitMediaKeys::createSession): Use ExceptionOr. Also pass reference |
| insteead of pointer to create. Also removed unneeded separate checks for null |
| strings in code that already calls isEmpty. |
| (WebCore::WebKitMediaKeys::isTypeSupported): Removed unneeded checks for null strings |
| in code that already calls isEmpty. |
| (WebCore::WebKitMediaKeys::cdmMediaPlayer): Tweaked a bit. |
| (WebCore::WebKitMediaKeys::cachedKeyForKeyId): Use auto. |
| |
| * Modules/encryptedmedia/legacy/WebKitMediaKeys.h: Use pragma once. Removed unneeded includes. |
| Changed cdm() function to return a reference. Initialize m_mediaElement. |
| Use private instead of protected. |
| |
| * Modules/encryptedmedia/legacy/WebKitMediaKeys.idl: Use ConstructorMayThrowException |
| and MayThrowException instead of the legacy versions. |
| |
| 2016-10-09 Zan Dobersek <zdobersek@igalia.com> |
| |
| ENABLE_LEGACY_ENCRYPTED_MEDIA interfaces should have a hard-coded WebKit prefix |
| https://bugs.webkit.org/show_bug.cgi?id=162982 |
| |
| Reviewed by Jer Noble. |
| |
| Have the Web-exposed interfaces guarded by ENABLE_LEGACY_ENCRYPTED_MEDIA also use |
| the WebKit prefix in the implementations. This will prevent conflicts between |
| interfaces with same names in both the legacy API and the future EME API. |
| |
| Most of the interfaces in this legacy API already used the WebKit prefix when |
| exposed via JS bindings. The only exception is MediaKeyNeededEvent, which gets |
| prefixed in this patch. |
| |
| The interface implementations for this legacy API are also moved under the |
| Modules/encryptedmedia/legacy/ directory. |
| |
| No new tests -- covered by existing tests (with the relevant changes reflected |
| in the updated baselines). |
| |
| * CMakeLists.txt: |
| * DerivedSources.cpp: |
| * DerivedSources.make: |
| * Modules/encryptedmedia/CDM.cpp: |
| * Modules/encryptedmedia/CDMSessionClearKey.cpp: |
| (WebCore::CDMSessionClearKey::generateKeyRequest): |
| (WebCore::CDMSessionClearKey::update): |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp. |
| (WebCore::WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent): |
| (WebCore::WebKitMediaKeyMessageEvent::~WebKitMediaKeyMessageEvent): |
| (WebCore::WebKitMediaKeyMessageEvent::eventInterface): |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h. |
| (WebCore::WebKitMediaKeyMessageEvent::create): |
| (WebCore::WebKitMediaKeyMessageEvent::createForBindings): |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl. |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.cpp. |
| (WebCore::WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent): |
| (WebCore::WebKitMediaKeyNeededEvent::~WebKitMediaKeyNeededEvent): |
| (WebCore::WebKitMediaKeyNeededEvent::eventInterface): |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.h. |
| (WebCore::WebKitMediaKeyNeededEvent::create): |
| (WebCore::WebKitMediaKeyNeededEvent::createForBindings): |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.idl. |
| * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp. |
| (WebCore::WebKitMediaKeySession::create): |
| (WebCore::WebKitMediaKeySession::WebKitMediaKeySession): |
| (WebCore::WebKitMediaKeySession::~WebKitMediaKeySession): |
| (WebCore::WebKitMediaKeySession::setError): |
| (WebCore::WebKitMediaKeySession::close): |
| (WebCore::WebKitMediaKeySession::cachedKeyForKeyId): |
| (WebCore::WebKitMediaKeySession::sessionId): |
| (WebCore::WebKitMediaKeySession::generateKeyRequest): |
| (WebCore::WebKitMediaKeySession::keyRequestTimerFired): |
| (WebCore::WebKitMediaKeySession::update): |
| (WebCore::WebKitMediaKeySession::addKeyTimerFired): |
| (WebCore::WebKitMediaKeySession::sendMessage): |
| (WebCore::WebKitMediaKeySession::sendError): |
| (WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory): |
| (WebCore::WebKitMediaKeySession::hasPendingActivity): |
| (WebCore::WebKitMediaKeySession::stop): |
| (WebCore::WebKitMediaKeySession::activeDOMObjectName): |
| (WebCore::WebKitMediaKeySession::canSuspendForDocumentSuspension): |
| * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeySession.h. |
| * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl. |
| * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp. |
| (WebCore::WebKitMediaKeys::create): |
| (WebCore::WebKitMediaKeys::WebKitMediaKeys): |
| (WebCore::WebKitMediaKeys::~WebKitMediaKeys): |
| (WebCore::WebKitMediaKeys::createSession): |
| (WebCore::WebKitMediaKeys::isTypeSupported): |
| (WebCore::WebKitMediaKeys::setMediaElement): |
| (WebCore::WebKitMediaKeys::cdmMediaPlayer): |
| (WebCore::WebKitMediaKeys::keyAdded): |
| (WebCore::WebKitMediaKeys::cachedKeyForKeyId): |
| * Modules/encryptedmedia/legacy/WebKitMediaKeys.h: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeys.h. |
| * Modules/encryptedmedia/legacy/WebKitMediaKeys.idl: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeys.idl. |
| * bindings/js/JSDictionary.cpp: |
| (WebCore::JSDictionary::convertValue): |
| * bindings/js/JSDictionary.h: |
| * dom/EventNames.in: |
| * dom/EventTargetFactory.in: |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): |
| (WebCore::HTMLMediaElement::setMediaKeys): |
| * html/HTMLMediaElement.h: |
| (WebCore::HTMLMediaElement::keys): |
| * html/HTMLMediaElement.idl: |
| * html/WebKitMediaKeyError.h: Renamed from Source/WebCore/html/MediaKeyError.h. |
| (WebCore::WebKitMediaKeyError::create): |
| (WebCore::WebKitMediaKeyError::WebKitMediaKeyError): |
| * html/WebKitMediaKeyError.idl: Renamed from Source/WebCore/html/MediaKeyError.idl. |
| * testing/MockCDM.cpp: |
| (WebCore::MockCDMSession::generateKeyRequest): |
| (WebCore::MockCDMSession::update): |
| |
| 2016-10-09 Zan Dobersek <zdobersek@igalia.com> |
| |
| Remove stale ENABLE(ENCRYPTED_MEDIA) code in HTMLMediaElement |
| https://bugs.webkit.org/show_bug.cgi?id=163111 |
| |
| Reviewed by Alex Christensen. |
| |
| Remove three method implementations in HTMLMediaElement which had their |
| declarations and the related WebIDL entries removed in the first ENCRYPTED_MEDIA |
| purge in r206440. |
| |
| No new tests -- no changes in behavior. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::webkitGenerateKeyRequest): Deleted. |
| (WebCore::HTMLMediaElement::webkitAddKey): Deleted. |
| (WebCore::HTMLMediaElement::webkitCancelKeyRequest): Deleted. |
| |
| 2016-10-09 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Support InputEvent.inputType for the new InputEvent spec |
| https://bugs.webkit.org/show_bug.cgi?id=163025 |
| <rdar://problem/28658092> |
| |
| Reviewed by Darin Adler. |
| |
| Adds support for the inputType attribute of InputEvent. To do this, we introduce a helper to |
| map EditActions to inputType names, and also split out ambiguous EditActions (such as |
| EditActionTyping) into more specific subtypes (such as EditActionTypingDeleteBackward, |
| EditActionTypingInsertParagraph, etc.), each of which corresponds to an inputType. |
| |
| In places where we create CompositeEditCommands, we now pass in these specific EditActions |
| where appropriate, and when dispatching `beforeinput` and `input` events, we ask the |
| CompositeEditCommand for its input type name, which it derives from its editingAction. |
| |
| Tests: fast/events/before-input-prevent-biu.html |
| fast/events/before-input-prevent-cut.html |
| fast/events/before-input-prevent-paste.html |
| fast/events/before-input-prevent-typing.html |
| fast/events/before-input-prevent-undo.html |
| |
| * dom/InputEvent.h: |
| * dom/Node.cpp: |
| (WebCore::Node::dispatchInputEvent): |
| * dom/Node.h: |
| * editing/CompositeEditCommand.cpp: |
| (WebCore::CompositeEditCommand::apply): |
| (WebCore::CompositeEditCommand::inputEventTypeName): |
| |
| Allows a CompositeEditCommand to specify the inputType its corresponding `beforeinput` and `input` events |
| should have. |
| |
| * editing/CompositeEditCommand.h: |
| (WebCore::CompositeEditCommand::shouldStopCaretBlinking): Deleted. |
| * editing/EditAction.h: |
| * editing/EditCommand.cpp: |
| (WebCore::inputTypeNameForEditingAction): |
| * editing/EditCommand.h: |
| * editing/Editor.cpp: |
| (WebCore::Editor::willApplyEditing): |
| (WebCore::Editor::appliedEditing): |
| (WebCore::Editor::willUnapplyEditing): |
| (WebCore::Editor::unappliedEditing): |
| (WebCore::Editor::willReapplyEditing): |
| (WebCore::Editor::reappliedEditing): |
| (WebCore::Editor::computeAndSetTypingStyle): |
| * editing/InsertListCommand.cpp: |
| (WebCore::InsertListCommand::editingAction): |
| * editing/InsertListCommand.h: |
| (WebCore::InsertListCommand::preservesTypingStyle): Deleted. |
| (WebCore::InsertListCommand::editingAction): Deleted. |
| * editing/ReplaceRangeWithTextCommand.cpp: |
| (WebCore::ReplaceRangeWithTextCommand::ReplaceRangeWithTextCommand): |
| * editing/SpellingCorrectionCommand.cpp: |
| (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand): |
| * editing/TypingCommand.cpp: |
| (WebCore::editActionForTypingCommand): |
| (WebCore::TypingCommand::TypingCommand): |
| (WebCore::TypingCommand::inputEventTypeName): |
| |
| The editingAction() of a TypingCommand is the first editing action the TypingCommand was initialized using. |
| Since subsequent typing commands update the last open typing command, we override inputEventTypeName here to |
| use the last updated editing action rather than the default (initial) editing action. |
| |
| (WebCore::TypingCommand::willAddTypingToOpenCommand): |
| (WebCore::TypingCommand::insertTextRunWithoutNewlines): |
| (WebCore::TypingCommand::insertParagraphSeparator): |
| * editing/TypingCommand.h: |
| |
| 2016-10-09 Darin Adler <darin@apple.com> |
| |
| Move ApplePaySession from legacy to new DOM exceptions |
| https://bugs.webkit.org/show_bug.cgi?id=163191 |
| |
| Reviewed by Sam Weinig. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::ApplePaySession::create): Use ExceptionOr. |
| (WebCore::ApplePaySession::ApplePaySession): Moved initialization |
| of two of the data members to class definition. |
| (WebCore::ApplePaySession::supportsVersion): Use ExceptionOr. |
| (WebCore::ApplePaySession::canMakePayments): Ditto. |
| (WebCore::ApplePaySession::canMakePaymentsWithActiveCard): Ditto. |
| (WebCore::ApplePaySession::openPaymentSetup): Ditto. |
| (WebCore::ApplePaySession::begin): Ditto. |
| (WebCore::ApplePaySession::abort): Ditto. |
| (WebCore::ApplePaySession::completeMerchantValidation): Ditto. |
| (WebCore::ApplePaySession::completeShippingMethodSelection): Ditto. |
| (WebCore::ApplePaySession::completeShippingContactSelection): Ditto. |
| (WebCore::ApplePaySession::completePaymentMethodSelection): Ditto. |
| (WebCore::ApplePaySession::completePayment): Ditto. |
| (WebCore::ApplePaySession::validateMerchant): Use auto and get instead of |
| using a RefPtr type and * for event dispatching. |
| (WebCore::ApplePaySession::didAuthorizePayment): Ditto. |
| (WebCore::ApplePaySession::didSelectShippingMethod): Ditto. |
| (WebCore::ApplePaySession::didSelectShippingContact): Ditto. |
| (WebCore::ApplePaySession::didSelectPaymentMethod): Ditto. |
| (WebCore::ApplePaySession::didCancelPayment): Ditto. |
| (WebCore::ApplePaySession::paymentCoordinator): Moved dereferencing |
| inside the downcast. |
| |
| * Modules/applepay/ApplePaySession.h: Updated for changes above. |
| |
| * Modules/applepay/ApplePaySession.idl: Use MayThrowException. |
| |
| * bindings/js/JSApplePaySessionCustom.cpp: |
| (WebCore::JSApplePaySession::completeShippingMethodSelection): |
| Use propagateException. |
| (WebCore::JSApplePaySession::completeShippingContactSelection): Ditto. |
| (WebCore::JSApplePaySession::completePaymentMethodSelection): Ditto. |
| |
| * bindings/js/JSDOMBinding.h: Added implementation of toJSBoolean. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateConstructorDefinition): Generate the different arguments for |
| toJSNewlyCreated when ConstructorMayThrowException is specified that |
| activate the version of that function that handles exceptions. |
| |
| * bindings/scripts/IDLAttributes.txt: Added ConstructorMayThrowException. |
| |
| 2016-10-09 Darin Adler <darin@apple.com> |
| |
| Replace all uses of ExceptionCodeWithMessage with WebCore::Exception |
| https://bugs.webkit.org/show_bug.cgi?id=163178 |
| |
| Reviewed by Sam Weinig. |
| |
| * Modules/indexeddb/IDBCursor.cpp: |
| (WebCore::IDBCursor::stringToDirection): Return an Optional instead of |
| using an ExceptionCode out argument, since this function just needs to |
| indicate failure, not actually throw an exception. |
| (WebCore::IDBCursor::update): Return ExceptionOr instead of using an |
| ExceptionCodeWithMessage out argument. |
| (WebCore::IDBCursor::advance): Ditto. |
| (WebCore::IDBCursor::continueFunction): Ditto. |
| (WebCore::IDBCursor::deleteFunction): Ditto. |
| * Modules/indexeddb/IDBCursor.h: Updated for above changes. |
| |
| * Modules/indexeddb/IDBCursor.idl: Sorted extended attributes alphabetically. |
| Use MayThrowException instead of MayThrowLegacyExceptionWithMessage. |
| |
| * Modules/indexeddb/IDBDatabase.cpp: |
| (WebCore::IDBDatabase::createObjectStore): Return ExceptionOr instead of |
| using an ExceptionCodeWithMessage out argument. |
| (WebCore::IDBDatabase::transaction): Ditto. |
| (WebCore::IDBDatabase::deleteObjectStore): Ditto. |
| * Modules/indexeddb/IDBDatabase.h: Updated for above changes. |
| |
| * Modules/indexeddb/IDBDatabase.idl: Use MayThrowException instead of |
| MayThrowLegacyExceptionWithMessage. |
| |
| * Modules/indexeddb/IDBFactory.cpp: |
| (WebCore::IDBFactory::open): Return ExceptionOr instead of |
| using an ExceptionCodeWithMessage out argument. |
| (WebCore::IDBFactory::openInternal): Ditto. |
| (WebCore::IDBFactory::deleteDatabase): Ditto. |
| (WebCore::IDBFactory::cmp): Ditto. |
| * Modules/indexeddb/IDBFactory.h: Updated for above changes. |
| |
| * Modules/indexeddb/IDBFactory.idl: Use MayThrowException instead of |
| MayThrowLegacyExceptionWithMessage. |
| |
| * Modules/indexeddb/IDBIndex.cpp: |
| (WebCore::IDBIndex::openCursor): Return ExceptionOr instead of |
| using an ExceptionCodeWithMessage out argument. |
| (WebCore::IDBIndex::count): Ditto. |
| (WebCore::IDBIndex::doCount): Ditto. |
| (WebCore::IDBIndex::openKeyCursor): Ditto. |
| (WebCore::IDBIndex::get): Ditto. |
| (WebCore::IDBIndex::doGet): Ditto. |
| (WebCore::IDBIndex::getKey): Ditto. |
| (WebCore::IDBIndex::doGetKey): Ditto. |
| * Modules/indexeddb/IDBIndex.h: Updated for above changes. |
| |
| * Modules/indexeddb/IDBIndex.idl: Use MayThrowException instead of |
| MayThrowLegacyExceptionWithMessage. |
| |
| * Modules/indexeddb/IDBKeyRange.cpp: |
| (WebCore::IDBKeyRange::only): Return ExceptionOr instead of |
| using an ExceptionCode out argument. |
| (WebCore::IDBKeyRange::lowerBound): Ditto. |
| (WebCore::IDBKeyRange::upperBound): Ditto. |
| (WebCore::IDBKeyRange::bound): Ditto. |
| * Modules/indexeddb/IDBKeyRange.h: Updated for above changes. |
| * Modules/indexeddb/IDBKeyRange.idl: Use MayThrowException instead of |
| MayThrowLegacyException. |
| |
| * Modules/indexeddb/IDBObjectStore.cpp: |
| (WebCore::IDBObjectStore::openCursor): Return ExceptionOr instead of |
| using an ExceptionCodeWithMessage out argument. |
| (WebCore::IDBObjectStore::get): Ditto. |
| (WebCore::IDBObjectStore::add): Ditto. |
| (WebCore::IDBObjectStore::put): Ditto. |
| (WebCore::IDBObjectStore::putForCursorUpdate): Ditto. |
| (WebCore::IDBObjectStore::putOrAdd): Ditto. |
| (WebCore::IDBObjectStore::deleteFunction): Ditto. |
| (WebCore::IDBObjectStore::doDelete): Ditto. |
| (WebCore::IDBObjectStore::clear): Ditto. |
| (WebCore::IDBObjectStore::createIndex): Ditto. |
| (WebCore::IDBObjectStore::index): Ditto. |
| (WebCore::IDBObjectStore::deleteIndex): Ditto. |
| (WebCore::IDBObjectStore::count): Ditto. |
| (WebCore::IDBObjectStore::doCount): Ditto. |
| * Modules/indexeddb/IDBObjectStore.h: Updated for above changes. |
| |
| * Modules/indexeddb/IDBObjectStore.idl: Use MayThrowException instead of |
| MayThrowLegacyExceptionWithMessage. |
| |
| * Modules/indexeddb/IDBRequest.cpp: |
| (WebCore::IDBRequest::errorCode): Deleted. Was dead code. |
| (WebCore::IDBRequest::error): Return ExceptionOr instead of |
| using an ExceptionCodeWithMessage out argument. |
| * Modules/indexeddb/IDBRequest.h: Updated for above changes. |
| |
| * Modules/indexeddb/IDBRequest.idl: Use GetterMayThrowException instead of |
| GetterMayThrowLegacyExceptionWithMessage. |
| |
| * Modules/indexeddb/IDBTransaction.cpp: |
| (WebCore::IDBTransaction::stringToMode): Return an Optional instead of |
| using an ExceptionCode out argument, since this function just needs to |
| indicate failure, not actually throw an exception. |
| (WebCore::IDBTransaction::db): Tweaked code a bit. |
| (WebCore::IDBTransaction::error): Return a pointer instead of a RefPtr. |
| (WebCore::IDBTransaction::objectStore): Return ExceptionOr instead of |
| using an ExceptionCodeWithMessage out argument. |
| (WebCore::IDBTransaction::abortDueToFailedRequest): Call internalAbort. |
| (WebCore::IDBTransaction::abort): Return ExceptionOr instead of |
| using an ExceptionCodeWithMessage out argument. |
| (WebCore::IDBTransaction::internalAbort): Added a version that asserts |
| instead of throwing an exception for internal use. |
| (WebCore::IDBTransaction::stop): Call internalAbort. |
| * Modules/indexeddb/IDBTransaction.h: Updated for above changes. |
| |
| * Modules/indexeddb/IDBTransaction.idl: Use MayThrowException instead of |
| MayThrowLegacyExceptionWithMessage. |
| |
| * Modules/indexeddb/client/IDBConnectionProxy.cpp: |
| (WebCore::IDBClient::IDBConnectionProxy::openDatabase): Updated to return |
| a Ref instead of a RefPtr, since the function can never return null. |
| (WebCore::IDBClient::IDBConnectionProxy::deleteDatabase): Ditto. |
| * Modules/indexeddb/client/IDBConnectionProxy.h: Updated for above changes. |
| |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| (WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask): Updated |
| exception handling to use ExceptionOr instead of ExceptionCodeWithMessage. |
| (WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask): Ditto. |
| * Modules/mediastream/MediaEndpointSessionDescription.cpp: |
| (WebCore::MediaEndpointSessionDescription::create): Ditto. |
| * Modules/mediastream/MediaEndpointSessionDescription.h: Updated for above change. |
| |
| * bindings/js/JSDOMBinding.cpp: |
| (WebCore::createDOMException): Added overload for Exception. |
| (WebCore::throwDOMException): Deleted overload for ExceptionCodeWithMessage. |
| Updated code to call the new createDOMException function. |
| (WebCore::setDOMExceptionSlow): Ditto. |
| (WebCore::setDOMException): Ditto. |
| |
| * bindings/js/JSDOMBinding.h: Added overload of createDOMException that takes |
| an Exception. Deleted functions dealing with ExceptionCodeWithMessage. Fixed |
| interface of toJSNumber and toJSNullableNumber and implemented toJSNumber. |
| |
| * bindings/js/JSDOMPromise.cpp: |
| (WebCore::DeferredPromise::reject): Added overload that takes an Exception. |
| * bindings/js/JSDOMPromise.h: Updated for above change. |
| |
| * bindings/js/JSHistoryCustom.cpp: |
| (WebCore::JSHistory::pushState): Use propagateException to deal with |
| ExceptionOr instead of ExceptionCodeWithMessage. |
| (WebCore::JSHistory::replaceState): Ditto. |
| |
| * bindings/js/JSIDBDatabaseCustom.cpp: |
| (WebCore::JSIDBDatabase::createObjectStore): Use toJS and |
| to deal with ExceptionOr rather than setDOMException to deal |
| with ExceptionCodeWithMessage. |
| |
| * bindings/js/JSIDBRequestCustom.cpp: |
| (WebCore::JSIDBRequest::result): Use propagateException and |
| Exception rather than setDOMException and ExceptionCodeWithMessage. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): Removed support for GetterMayThrowLegacyExceptionWithMessage, |
| SetterMayThrowLegacyExceptionWithMessage, and MayThrowLegacyExceptionWithMessage. |
| (GenerateReturnParameters): Ditto. |
| (GenerateImplementationFunctionCall): Ditto. |
| (GenerateConstructorDefinition): Ditto. |
| |
| * bindings/scripts/IDLAttributes.txt: Removed GetterMayThrowLegacyExceptionWithMessage, |
| SetterMayThrowLegacyExceptionWithMessage, and MayThrowLegacyExceptionWithMessage. |
| |
| * bindings/scripts/test/JS/JSTestObj.cpp: Regenerated. |
| * bindings/scripts/test/TestObj.idl: Removed tests cases for now-removed attributes. |
| |
| * dom/CustomElementRegistry.idl: Use MayThrowException instead of |
| MayThrowLegacyExceptionWithMessage. |
| |
| * dom/ExceptionCode.h: Removed ExceptionCodeWithMessage. Also updated to use pragma |
| once, removed include of WTFString.h and switched to using instead of typedef. |
| |
| * history/HistoryItem.h: Return a pointer instead of a RefPtr from stateObject |
| to cut down a little on unnecessary reference count churn. |
| |
| * inspector/InspectorIndexedDBAgent.cpp: Updated all the code that uses IDB |
| classes to use the new versions rather than the old ExceptionCodeWithMessage versions. |
| |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::history): Pass a reference instead of a pointer. |
| |
| * page/History.cpp: |
| (WebCore::History::History): Take a reference instead of a pointer. |
| (WebCore::History::length): Tweaked to use a local variable. |
| (WebCore::History::state): Return a pointer instead of a PassRefPtr. |
| (WebCore::History::stateInternal): Ditto. Also use early return consistently. |
| (WebCore::History::isSameAsCurrentState): Updated for above change. |
| (WebCore::History::stateObjectAdded): Return ExceptionOr rather than taking an |
| ExceptionCodeWithMessage out argument. |
| |
| * page/History.h: Use pragma once. Removed some unneeded includes. Marked class final. |
| Updated for changes above. |
| |
| * page/History.idl: Use MayThrowException instead of MayThrowLegacyException. |
| |
| 2016-10-07 Ryosuke Niwa <rniwa@webkit.org> |
| |
| REGRESSION(r165103): labels list doesn't get invalidated when other lists are invalidated at document level |
| https://bugs.webkit.org/show_bug.cgi?id=163145 |
| |
| Reviewed by Darin Adler. |
| |
| The bug was caused by Document::invalidateNodeListAndCollectionCaches removing all node lists regardless |
| of whether they have been invalidated or not. |
| |
| Fixed the bug by removing only those node lists that got invalidated via LiveNodeList::invalidateCache. |
| |
| Test: fast/dom/NodeList/form-labels-length.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::Document): |
| (WebCore::Document::unregisterNodeListForInvalidation): Removed the conditional which allowed removal to |
| happen while m_listsInvalidatedAtDocument is empty inside invalidateNodeListAndCollectionCaches. |
| * dom/Document.h: |
| * dom/Node.cpp: |
| (WebCore::Document::invalidateNodeListAndCollectionCaches): Just remove the node lists being invalidated via |
| LiveNodeList's invalidateCache, which calls unregisterNodeListForInvalidation, instead of removing them all. |
| We make a copy of the list of node lists into a local vector because mutating HashMap while iterating over it |
| is not a safe operation. |
| |
| 2016-10-09 Chris Dumez <cdumez@apple.com> |
| |
| Update generated bindings code so that dictionary structures no longer need explicit constructors |
| https://bugs.webkit.org/show_bug.cgi?id=163188 |
| |
| Reviewed by Darin Adler. |
| |
| Update generated bindings code so that dictionary structures no longer |
| need explicit constructors. We now call the default constructor and |
| then initialize the members one by one. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDictionaryImplementationContent): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>): |
| (WebCore::convertDictionary<AlternateDictionaryName>): |
| (WebCore::convertDictionary<TestObj::ParentDictionary>): |
| (WebCore::convertDictionary<TestObj::ChildDictionary>): |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: |
| (WebCore::convertDictionary<TestStandaloneDictionary>): |
| * dom/ClipboardEvent.h: |
| * dom/CustomEvent.h: |
| * dom/EventInit.h: |
| (WebCore::EventInit::EventInit): Deleted. |
| * dom/EventModifierInit.h: |
| (WebCore::EventModifierInit::EventModifierInit): Deleted. |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::KeyboardEvent): |
| * dom/KeyboardEvent.h: |
| * dom/KeyboardEvent.idl: |
| * dom/UIEventInit.h: |
| (WebCore::UIEventInit::UIEventInit): Deleted. |
| * editing/Editor.cpp: |
| (WebCore::Editor::dispatchCPPEvent): |
| |
| 2016-10-09 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [CMake] CMake does not support the dep files for implicit dependency |
| https://bugs.webkit.org/show_bug.cgi?id=161433 |
| |
| Reviewed by Brent Fulgham. |
| |
| Created a Perl script to generate all IDL bindings for CMake. |
| This script can regenerate outdated bindings by based on the |
| supplemental dependency and dep files created by |
| '--write-dependencies' switch of generate-bindings.pl. |
| |
| add_custom_target is used to invoke the script instead of |
| add_custom_command because Ninja deletes all output files before |
| executing the command in case of add_custom_command. |
| |
| USES_TERMINAL option of add_custom_target has two effects: |
| 1) Not buffering output of the command |
| 2) Invoking the command in the special Ninja pool which inhibits parallel build |
| One needs to use CMake 3.2 or later to enable this feature. |
| |
| * CMakeLists.txt: Specified target names for |
| GENERATE_BINDINGS. Added dependency for the targets. |
| * bindings/scripts/generate-bindings-all.pl: Added. |
| |
| 2016-10-09 Chris Dumez <cdumez@apple.com> |
| |
| Update KeyboardEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163176 |
| |
| Reviewed by Darin Adler. |
| |
| Update KeyboardEvent to stop using legacy [ConstructorTemplate=Event] |
| and use a proper constructor instead, like in the specification: |
| - https://www.w3.org/TR/uievents/#interface-keyboardevent |
| |
| Also add support for passing modifierAltGraph / modifierCapsLock |
| in the inialization dictionary as we support those modifiers via |
| getModifierState(). |
| |
| No new tests, extended existing test. |
| |
| * CMakeLists.txt: |
| * DerivedSources.cpp: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/EventModifierInit.h: Added. |
| (WebCore::EventModifierInit::EventModifierInit): |
| * dom/EventModifierInit.idl: Added. |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::KeyboardEvent): |
| (WebCore::KeyboardEvent::getModifierState): |
| * dom/KeyboardEvent.h: |
| * dom/KeyboardEvent.idl: |
| * dom/MouseRelatedEvent.cpp: |
| (WebCore::MouseRelatedEvent::MouseRelatedEvent): |
| * dom/MouseRelatedEvent.h: |
| * dom/UIEvent.cpp: |
| (WebCore::UIEvent::UIEvent): |
| * dom/UIEvent.h: |
| (WebCore::UIEvent::create): Deleted. |
| * dom/UIEventInit.h: Added. |
| (WebCore::UIEventInit::UIEventInit): |
| * dom/UIEventInit.idl: Added. |
| * dom/UIEventWithKeyState.h: |
| (WebCore::UIEventWithKeyState::altGraphKey): |
| (WebCore::UIEventWithKeyState::capsLockKey): |
| (WebCore::UIEventWithKeyState::UIEventWithKeyState): |
| (WebCore::UIEventWithKeyState::ctrlKey): Deleted. |
| (WebCore::UIEventWithKeyState::shiftKey): Deleted. |
| (WebCore::UIEventWithKeyState::altKey): Deleted. |
| (WebCore::UIEventWithKeyState::metaKey): Deleted. |
| |
| 2016-10-09 Youenn Fablet <youenn@apple.com> |
| |
| Promise attribute getters should reject promises in case of casted-this errors |
| https://bugs.webkit.org/show_bug.cgi?id=163167 |
| |
| Reviewed by Darin Adler. |
| |
| Covered by updated test and binding test. |
| |
| * bindings/js/JSDOMBinding.cpp: |
| (WebCore::throwGetterTypeError): |
| (WebCore::rejectPromiseWithGetterTypeError): Added to reject promises for attribute getters |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::BindingCaller::attribute): Introducing promise rejection for type cast errors. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| * bindings/scripts/test/JS/JSTestObj.cpp: Rebased test. As can be seen, only custom promise attributes are supported. |
| (WebCore::jsTestObjTestReadOnlyPromiseAttribute): |
| (WebCore::jsTestObjTestReadOnlyPromiseAttributeGetter): |
| * bindings/scripts/test/TestObj.idl: |
| |
| 2016-10-08 Chris Dumez <cdumez@apple.com> |
| |
| [Mac] Write WebArchive to the pasteboard when copying image in WebKit |
| https://bugs.webkit.org/show_bug.cgi?id=163100 |
| |
| Reviewed by Darin Adler. |
| |
| Write WebArchive to the pasteboard when copying image in WebKit. This |
| fixes pasting such images to a content editable field in WebKit because |
| Web archives take priority over RTFD when reading from the pasteboard |
| in WebKit. |
| |
| Using RTFD when pasting the image in WebKit was causing issues because: |
| 1. The pasted image would not be displayed because our RTFD import code |
| is buggy. |
| 2. The pasted image URL was a webkit-fake-url:// |
| 3. Formatting associated to the image (e.g. inline style) would be lost |
| |
| No new tests, unskipped existing test on WebKit2. |
| |
| * editing/Editor.h: |
| * editing/mac/EditorMac.mm: |
| (WebCore::Editor::imageInWebArchiveFormat): |
| (WebCore::Editor::writeImageToPasteboard): |
| * platform/Pasteboard.h: |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::writableTypesForImage): |
| (WebCore::Pasteboard::write): |
| (WebCore::Pasteboard::Pasteboard): Deleted. |
| (WebCore::Pasteboard::createForCopyAndPaste): Deleted. |
| |
| 2016-10-08 Chris Dumez <cdumez@apple.com> |
| |
| Update CustomEvent to stop using legacy [ConstructorTemplate=Event] |
| https://bugs.webkit.org/show_bug.cgi?id=163174 |
| |
| Reviewed by Darin Adler. |
| |
| Update CustomEvent to stop using legacy [ConstructorTemplate=Event] and |
| use an actual constructor instead, like in the specification: |
| - https://dom.spec.whatwg.org/#interface-customevent |
| |
| There is a very minor behavior change when explictly passing undefined |
| as detail value in CustomEventInit. We used to initialize detail to |
| undefined but we now initialize it to null instead, which is its default |
| value. The new behavior matches the one of Chrome and Firefox. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDefaultValue): |
| (GenerateDictionaryImplementationContent): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| * bindings/scripts/test/TestObj.idl: |
| * dom/CustomEvent.cpp: |
| (WebCore::CustomEvent::CustomEvent): |
| * dom/CustomEvent.h: |
| * dom/CustomEvent.idl: |
| * dom/Document.cpp: |
| (WebCore::Document::createEvent): |
| * dom/Event.cpp: |
| (WebCore::Event::Event): |
| * dom/Event.h: |
| |
| 2016-10-08 Chris Dumez <cdumez@apple.com> |
| |
| Add support for ClipboardEvent |
| https://bugs.webkit.org/show_bug.cgi?id=163164 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for ClipboardEvent: |
| - https://www.w3.org/TR/clipboard-apis/#clipboard-event-interfaces |
| |
| Firefox and Chrome both already support this. |
| |
| This gives us 5 more points on html5test.com. |
| |
| Tests: editing/pasteboard/clipboard-event.html |
| fast/events/clipboard-event-constructor.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.cpp: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSEventCustom.cpp: |
| (WebCore::toJSNewlyCreated): Deleted. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (WillConvertUndefinedToDefaultParameterValue): |
| We use [] as implicit default value for dictionary parameters. This change |
| is so we call convertDictionary<>() even if the parameter is undefined |
| because we want to pass a struct to the implementation initialized with |
| the default member values defined in the IDL. |
| |
| * dom/ClipboardEvent.cpp: |
| (WebCore::ClipboardEvent::ClipboardEvent): |
| (WebCore::ClipboardEvent::eventInterface): |
| * dom/ClipboardEvent.h: |
| * dom/ClipboardEvent.idl: Added. |
| * dom/Event.cpp: |
| (WebCore::Event::Event): |
| * dom/Event.h: |
| * dom/Event.idl: |
| * dom/EventInit.h: Added. |
| * dom/EventInit.idl: Added. |
| * dom/EventNames.in: |
| * dom/MouseEvent.h: |
| (WebCore::MouseEvent::dataTransfer): |
| * editing/Editor.cpp: |
| (WebCore::Editor::dispatchCPPEvent): |
| |
| 2016-10-06 Darin Adler <darin@apple.com> |
| |
| Next step on moving to modern way to return DOM exceptions |
| https://bugs.webkit.org/show_bug.cgi?id=163016 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| * Modules/fetch/FetchRequest.idl: |
| Added MayThrowException to initializeWith since it throws an exception. |
| |
| * bindings/js/JSCallbackData.cpp: |
| (WebCore::JSCallbackData::invokeCallback): |
| * bindings/js/JSCustomElementInterface.cpp: |
| (WebCore::JSCustomElementInterface::invokeCallback): |
| * bindings/js/JSCustomSQLStatementErrorCallback.cpp: |
| (WebCore::JSSQLStatementErrorCallback::handleEvent): |
| * bindings/js/JSCustomXPathNSResolver.cpp: |
| (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): |
| * bindings/js/JSDOMBinding.cpp: |
| (WebCore::reportException): |
| (WebCore::reportCurrentException): |
| * bindings/js/JSErrorHandler.cpp: |
| (WebCore::JSErrorHandler::handleEvent): |
| * bindings/js/JSEventListener.cpp: |
| (WebCore::JSEventListener::handleEvent): |
| * bindings/js/JSMutationCallback.cpp: |
| (WebCore::JSMutationCallback::call): |
| * bindings/js/JSNodeFilterCustom.cpp: |
| (WebCore::JSNodeFilter::acceptNode): |
| * bindings/js/ScheduledAction.cpp: |
| (WebCore::ScheduledAction::executeFunctionInContext): |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::evaluateInWorld): |
| * bindings/js/WorkerScriptController.cpp: |
| (WebCore::WorkerScriptController::evaluate): |
| * inspector/PageScriptDebugServer.cpp: |
| (WebCore::PageScriptDebugServer::reportException): |
| Use JSC::Exception explicitly to avoid ambiguity with WebCore::Exception, |
| or in some cases use auto instead. |
| |
| * bindings/js/JSDOMBinding.cpp: |
| (WebCore::hasUnpairedSurrogate): Factored this inline function out of valueToUSVString |
| for clarity. |
| (WebCore::createDOMException): Removed unused TRY_TO_CREATE_EXCEPTION macro. |
| (WebCore::propagateExceptionSlowPath): Added. |
| (WebCore::propagateException): Added. |
| (WebCore::setDOMException): Removed overload that takes an exception code and message |
| string separately; no longer needed. |
| |
| * bindings/js/JSDOMBinding.h: Include the ExceptionOr header |
| rather than forward declaring. Added more of the ExceptionOr handling |
| functions; some just declared and not yet defined. Updated for changes |
| to ExceptionOr interface. Removed the createDOMException function that takes |
| only an exception code; not needed outside JSDOMBinding.cpp. |
| |
| * bindings/js/JSXMLHttpRequestCustom.cpp: |
| (WebCore::JSXMLHttpRequest::send): Rewrote this to use ExceptionOr instead |
| of ExceptionCode. Added some FIXMEs as well. |
| (WebCore::JSXMLHttpRequest::responseText): Ditto. |
| (WebCore::JSXMLHttpRequest::retrieveResponse): Ditto. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): Fixed if statements to follow WebKit coding style |
| rather than using extra braces. Added call to propagateException for SetterMayThrowException. |
| (GenerateSerializerFunction): Fixed if statements as above. |
| (GenerateParametersCheck): Ditto. Also added call to propagateException for functions with |
| void return type and MayThrowException. |
| (GenerateReturnParameters): Tweaked coding style a bit. |
| (addIterableProperties): Fixed if statements as above. |
| (NativeToJSValue): Added code to handle various cases of GetterMayThrowException |
| and MayThrowException. |
| (GenerateConstructorDefinition): Used encodedJSValue() instead of |
| JSValue::encode(JSValue()), a longer way to say the same thing. |
| |
| * bindings/scripts/IDLAttributes.txt: Added GetterMayThrowException, |
| MayThrowException, and SetterMayThrowException. |
| |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestException.cpp: |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestNondeterministic.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| * bindings/scripts/test/JS/JSattribute.cpp: |
| Regenerated results. |
| |
| * bindings/scripts/test/TestObj.idl: Added some test cases. |
| |
| * dom/DOMImplementation.cpp: |
| (WebCore::DOMImplementation::createDocumentType): Tweaked formatting. |
| (WebCore::DOMImplementation::createDocument): Ditto. |
| |
| * dom/DOMImplementation.idl: Added MayThrowException to two functions since |
| I am abandoning, for now, the ability to throw exceptions without any extended |
| attribute in the IDL file. This feature may return at some point if we figure |
| out a way to do it for functions without return values as well as functions with. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::exitPointerLock): Rewrote to streamline logic. |
| (WebCore::Document::pointerLockElement): Ditto. |
| (WebCore::Document::inputCursor): Added. No need for this to be inlined. |
| (WebCore::Document::setInputCursor): Changed to take Ref&&. |
| (WebCore::Document::getSelection): Added. Moved here from TreeScope. |
| |
| * dom/Document.h: Updated for above changes. |
| |
| * dom/Document.idl: Tweaked formatting. |
| |
| * dom/Exception.h: Merged the two constructors into one with a default |
| argument value, which should be equally efficient. Added releaseMessage function. |
| Added assertion that this is only created for actual exceptions with non-zero |
| ExceptionCode. Unlike ExceptionCode, which has a value of 0 which means no |
| exception, we do not create an Exception if there is no exception. |
| |
| * dom/ExceptionOr.h: Renamed takeReturnValue to releaseReturnValue. Replaced |
| exceptionCode and exceptionMessage with releaseException. Added ExceptionOr<void> |
| specialization. |
| |
| * dom/TreeScope.cpp: |
| (WebCore::TreeScope::~TreeScope): Removed code dealing with |
| m_selection, which is now in Document. |
| (WebCore::TreeScope::getSelection): Deleted. |
| |
| * dom/TreeScope.h: Removed DOMSelection. |
| |
| * page/DOMSelection.cpp: |
| (WebCore::selectionShadowAncestor): Changed to take a reference rather than |
| a guaranteed-non-null pointer. |
| (WebCore::DOMSelection::DOMSelection): Changed to take a Frame& instead of |
| of a TreeScope*. |
| (WebCore::DOMSelection::clearTreeScope): Deleted. |
| (WebCore::DOMSelection::isCollapsed): Updated call to selectionShadowAncestor. |
| (WebCore::DOMSelection::type): Took out obsolete uneeeded comment. Got rid |
| of case where this returns a null string. Use ASCIILiteral. |
| (WebCore::DOMSelection::rangeCount): Streamlined code. |
| (WebCore::DOMSelection::collapse): Removed redundant check of m_frame for |
| null which is already handled by the isValidForPosition function. |
| Removed non-helpful FIXME. |
| (WebCore::DOMSelection::collapseToEnd): Changed to use ExceptionOr instead of |
| ExceptionCode. |
| (WebCore::DOMSelection::collapseToStart): Ditto. |
| (WebCore::DOMSelection::setBaseAndExtent): Removed redundant check of m_frame |
| for null which is already handled by the isValidForPosition function. Removed |
| non-helpful FIXME. |
| (WebCore::DOMSelection::setPosition): Ditto. |
| (WebCore::DOMSelection::extend): Changed to use ExceptionOr instead of |
| ExceptionCode. |
| (WebCore::DOMSelection::getRangeAt): Ditto. |
| (WebCore::DOMSelection::isValidForPosition): Changed to return false when |
| m_frame is null rather than asserting is is non-null and having every caller |
| check m_frame before calling this. |
| |
| * page/DOMSelection.h: Use #pragma once. Fix indentation. Removed unneeded |
| comments. Use ExceptionOr rather than ExceptionCode. |
| |
| * page/DOMSelection.idl: Move from MayThrowLegacyException to MayThrowException. |
| |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::resetDOMWindowProperties): Sorted properties alphabetically |
| to make it more obvious if any are accidentally omitted or listed twice. |
| (WebCore::DOMWindow::getSelection): Changed ownership so that the window owns |
| the selection like all the other objects, rather than having it be owned by the |
| document instead. |
| |
| * page/DOMWindow.h: Added m_selection, sorted all the other related properties |
| alphabetically so it's easy to compare the list here with elsewhere. |
| |
| * replay/ReplayController.cpp: |
| (WebCore::ReplayController::frameNavigated): Updated to call setInputCursor |
| with a reference rather than a pointer. |
| |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::responseText): Use ExceptionOr rather than ExceptionCode. |
| (WebCore::XMLHttpRequest::responseXML): Ditto. |
| (WebCore::XMLHttpRequest::setTimeout): Ditto. |
| (WebCore::XMLHttpRequest::setResponseType): Ditto. |
| (WebCore::XMLHttpRequest::setWithCredentials): Ditto. |
| (WebCore::XMLHttpRequest::open): Ditto. |
| (WebCore::XMLHttpRequest::prepareToSend): Changed to return an |
| Optional<ExceptionOr> to reflect the three different states: an exception, |
| a value to return without sending, or "continue with the send algorithm". |
| The old code did this with a boolean plus an exception code. This sounds |
| confusing but is easy to read at the call sites, so probably OK to keep. |
| (WebCore::XMLHttpRequest::send): Use ExceptionOr rather than ExceptionCode. |
| (WebCore::XMLHttpRequest::sendBytesData): Ditto. |
| (WebCore::XMLHttpRequest::createRequest): Ditto. |
| (WebCore::XMLHttpRequest::overrideMimeType): Ditto. |
| (WebCore::XMLHttpRequest::setRequestHeader): Ditto. |
| |
| * xml/XMLHttpRequest.h: Updated for changes above. |
| |
| * xml/XMLHttpRequest.idl: Sorted interface extended attributes alphabetically. |
| Changed from MayThrowLegacyException to MayThrowException. |
| |
| 2016-10-06 Sam Weinig <sam@webkit.org> |
| |
| Autogenerate passing union types as part of a functions variadic arguments |
| https://bugs.webkit.org/show_bug.cgi?id=162919 |
| |
| Reviewed by Darin Adler. |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSBindingsAllInOne.cpp: |
| Remove deleted files. |
| |
| * bindings/generic/IDLTypes.h: |
| Switch to use std::reference_wrapper as it's implementation type. We may need more |
| granularity here in the future, but this will work for now. |
| |
| * bindings/js/JSCharacterDataCustom.cpp: Removed. |
| * bindings/js/JSDocumentTypeCustom.cpp: Removed. |
| * bindings/js/JSNodeOrString.cpp: Removed. |
| * bindings/js/JSNodeOrString.h: Removed. |
| |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::VariadicHelperBase::convert): Deleted. |
| (WebCore::toArguments): Deleted. |
| Moved to JSDOMConvert.h and renamed to convertVariadicArguments and make |
| it work in terms of IDLTypes. |
| |
| * bindings/js/JSDOMConvert.h: |
| (WebCore::Converter<IDLInterface<T>>::convert): |
| (WebCore::VariadicConverterBase::convert): |
| (WebCore::VariadicConverterBase<IDLInterface<T>>::convert): |
| (WebCore::convertVariadicArguments): |
| |
| * bindings/js/JSDocumentCustom.cpp: |
| (WebCore::JSDocument::prepend): Deleted. |
| (WebCore::JSDocument::append): Deleted. |
| * bindings/js/JSDocumentFragmentCustom.cpp: |
| (WebCore::JSDocumentFragment::prepend): Deleted. |
| (WebCore::JSDocumentFragment::append): Deleted. |
| * bindings/js/JSElementCustom.cpp: |
| (WebCore::JSElement::before): Deleted. |
| (WebCore::JSElement::after): Deleted. |
| (WebCore::JSElement::replaceWith): Deleted. |
| (WebCore::JSElement::prepend): Deleted. |
| (WebCore::JSElement::append): Deleted. |
| Remove now generated functions. |
| |
| * bindings/scripts/CodeGenerator.pm: |
| (assert): |
| Add assert to help debugging. |
| |
| (ParseInterface): |
| Don't treat union types as interfaces. |
| |
| (GetFlattenedMemberTypes): |
| (GetNumberOfNullableMemberTypes): |
| (GetIDLUnionMemberTypes): |
| Implement WebIDL algorithms for getting the flattened member list of union, and use it |
| to construct the c++ IDLType. |
| |
| (GetBaseIDLType): |
| (GetIDLType): |
| Add helper to convert an parsed idlType to a c++ IDLType. |
| |
| (IsWrapperType): |
| Don't treat union types as wrappers. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (AddToImplIncludesForIDLType): |
| Add helper for adding #includes based on a parsed idlType. It recursively handles union types. |
| |
| (GenerateParametersCheck): |
| Use the new convertVariadicArguments function to handle all variadic arguments, including |
| union types. |
| |
| * bindings/scripts/IDLParser.pm: |
| (parseDictionaryMember): |
| (parseAttributeRest): |
| (parseOptionalOrRequiredArgument): |
| (parseExceptionField): |
| Add an idlType to domSignature and populate it. |
| |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionOverloadedMethod13): |
| (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod): |
| (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod): |
| (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod): |
| (WebCore::jsTestObjPrototypeFunctionVariadicUnionMethod): |
| * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: |
| (WebCore::constructJSTestOverloadedConstructors5): |
| * bindings/scripts/test/TestObj.idl: |
| Add and update tests. |
| |
| * dom/ChildNode.idl: |
| * dom/ParentNode.idl: |
| Remove Custom extended attribute. |
| |
| * dom/ContainerNode.cpp: |
| * dom/ContainerNode.h: |
| * dom/Node.cpp: |
| * dom/Node.h: |
| Switch to using std::reference_wrapper instead of Ref<> for passed in parameters. |
| |
| 2016-10-08 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] Request constructor should provide exception messages |
| https://bugs.webkit.org/show_bug.cgi?id=162382 |
| |
| Reviewed by Darin Adler. |
| |
| No change of behavior, except that exceptions now have error messages. |
| |
| Added support of exception messages to ExceptionOr. |
| Making use of ExceptionOr for Request constructor parameter checking. |
| |
| * Modules/fetch/FetchRequest.cpp: |
| (WebCore::setReferrerPolicy): |
| (WebCore::setMode): |
| (WebCore::setCredentials): |
| (WebCore::setCache): |
| (WebCore::setRedirect): |
| (WebCore::setMethod): |
| (WebCore::setReferrer): |
| (WebCore::buildOptions): |
| (WebCore::FetchRequest::initializeOptions): |
| (WebCore::FetchRequest::initializeWith): |
| * Modules/fetch/FetchRequest.h: |
| * Modules/fetch/FetchRequest.idl: |
| * bindings/js/JSDOMBinding.cpp: |
| (WebCore::setDOMException): |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::toJS): |
| (WebCore::toJSNewlyCreated): |
| * dom/Exception.h: |
| (WebCore::Exception::code): |
| (WebCore::Exception::message): |
| (WebCore::Exception::Exception): |
| * dom/ExceptionOr.h: |
| (WebCore::ExceptionOr<ReturnType>::exceptionMessage): |
| |
| 2016-10-08 Youenn Fablet <youenn@apple.com> |
| |
| Refactor binding generated casted-this checks |
| https://bugs.webkit.org/show_bug.cgi?id=162677 |
| |
| Reviewed by Darin Adler. |
| |
| No change of behavior. |
| |
| Split the attribute getter function in two, one with the signature expected by JSCore and one used after casted-this checks. |
| |
| The second function takes directly a JSXX object and returns a JSValue instead of an EncodedJSValue. |
| In the future, the second function should only take references. |
| |
| Introducing BindingCaller as a way to templatize binding code used to cast thisValue with the desired JSXX value. |
| This allows implementing the first function using the second function as template parameter. |
| |
| Introducing JSClass::castForAttribute as a way to encapsulate differences in the way to handle thisValue access. |
| |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::BindingCaller::attribute): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): |
| (GenerateImplementation): |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.h: |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestEventConstructor.h: |
| * bindings/scripts/test/JS/JSTestException.cpp: |
| * bindings/scripts/test/JS/JSTestException.h: |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.h: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestNode.h: |
| * bindings/scripts/test/JS/JSTestNondeterministic.cpp: |
| * bindings/scripts/test/JS/JSTestNondeterministic.h: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestObj.h: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.h: |
| * bindings/scripts/test/JS/JSattribute.cpp: |
| * bindings/scripts/test/JS/JSattribute.h: |
| |
| 2016-10-08 Enrique Ocaña González <eocanha@igalia.com> |
| |
| Missing include in MediaDescription |
| https://bugs.webkit.org/show_bug.cgi?id=162873 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Added missing header. |
| |
| * platform/MediaDescription.h: |
| |
| 2016-10-08 Antti Koivisto <antti@apple.com> |
| |
| Move StyleResolver ownership from Document/ShadowRoot to Style::Scope |
| https://bugs.webkit.org/show_bug.cgi?id=163148 |
| |
| Reviewed by Andreas Kling. |
| |
| Reduce duplication between Document and ShadowRoot. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSStyleSheet.cpp: |
| (WebCore::CSSStyleSheet::didMutateRules): |
| * css/ElementRuleCollector.cpp: |
| (WebCore::ElementRuleCollector::matchHostPseudoClassRules): |
| (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules): |
| * css/MediaQueryMatcher.cpp: |
| (WebCore::MediaQueryMatcher::documentElementUserAgentStyle): |
| * css/StyleMedia.cpp: |
| (WebCore::StyleMedia::matchMedium): |
| * css/parser/SizesAttributeParser.cpp: |
| (WebCore::SizesAttributeParser::mediaConditionMatches): |
| * dom/Document.cpp: |
| (WebCore::Document::~Document): |
| (WebCore::Document::childrenChanged): |
| (WebCore::Document::isPageBoxVisible): |
| (WebCore::Document::pageSizeAndMarginsInPixels): |
| (WebCore::Document::userAgentShadowTreeStyleResolver): |
| (WebCore::Document::fontsNeedUpdate): |
| (WebCore::Document::didClearStyleResolver): |
| (WebCore::Document::updateViewportUnitsOnResize): |
| (WebCore::Document::createStyleResolver): Deleted. |
| (WebCore::Document::clearStyleResolver): Deleted. |
| * dom/Document.h: |
| (WebCore::Document::styleResolverIfExists): Deleted. |
| (WebCore::Document::ensureStyleResolver): Deleted. |
| * dom/Element.cpp: |
| (WebCore::Element::styleResolver): |
| * dom/ShadowRoot.cpp: |
| (WebCore::ShadowRoot::styleResolver): Deleted. |
| (WebCore::ShadowRoot::styleResolverIfExists): Deleted. |
| (WebCore::ShadowRoot::resetStyleResolver): Deleted. |
| * dom/ShadowRoot.h: |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::getMatchedCSSRules): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::layout): |
| * page/Page.cpp: |
| (WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment): |
| * page/PrintContext.cpp: |
| (WebCore::PrintContext::pageProperty): |
| * platform/MemoryPressureHandler.cpp: |
| (WebCore::MemoryPressureHandler::releaseCriticalMemory): |
| * style/AttributeChangeInvalidation.cpp: |
| (WebCore::Style::mayBeAffectedByHostStyle): |
| * style/ClassChangeInvalidation.cpp: |
| (WebCore::Style::mayBeAffectedByHostStyle): |
| * style/IdChangeInvalidation.cpp: |
| (WebCore::Style::mayBeAffectedByHostStyle): |
| * style/StyleScope.cpp: |
| (WebCore::Style::Scope::resolver): |
| (WebCore::Style::Scope::resolverIfExists): |
| (WebCore::Style::Scope::clearResolver): |
| (WebCore::Style::Scope::analyzeStyleSheetChange): |
| (WebCore::Style::Scope::updateActiveStyleSheets): |
| (WebCore::Style::Scope::updateStyleResolver): |
| (WebCore::Style::Scope::styleResolver): Deleted. |
| (WebCore::Style::Scope::styleResolverIfExists): Deleted. |
| * style/StyleScope.h: |
| * style/StyleSharingResolver.cpp: |
| (WebCore::Style::SharingResolver::resolve): |
| (WebCore::Style::SharingResolver::canShareStyleWithElement): |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::Scope::Scope): |
| (WebCore::Style::TreeResolver::resolve): |
| |
| 2016-10-07 Chris Dumez <cdumez@apple.com> |
| |
| window.navigator.language incorrectly returns all lowercase string |
| https://bugs.webkit.org/show_bug.cgi?id=163096 |
| |
| Reviewed by Darin Adler. |
| |
| Update navigator.language so that it no longer returns an all lowercase |
| string (e.g. 'en-us' -> 'en-US'). This matches the behavior of other |
| browsers and the specification which indicate we should return a |
| BCP 47 language tag: |
| - https://html.spec.whatwg.org/#dom-navigator-language |
| - https://tools.ietf.org/html/bcp47 |
| |
| The other call sites relying on userPreferredLanguages() use case |
| insensitive comparison so they will not break. |
| |
| No new tests, updated existing test. |
| |
| * platform/Language.h: |
| |
| 2016-10-07 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Support onbeforeinput event handling for the new InputEvent spec |
| https://bugs.webkit.org/show_bug.cgi?id=163021 |
| <rdar://problem/28658073> |
| |
| Reviewed by Darin Adler. |
| |
| Adds support for parsing the onbeforeinput attribute, and for sending default-preventable |
| `beforeinput` InputEvents to the page. To do this, we introduce two new virtual methods: |
| willApplyCommand and didApplyCommand on the CompositeEditCommand that are called before and |
| after CompositeEditCommand::doApply, respectively. willApplyCommand indicates whether or not |
| the composite editor command should proceed with applying the command. |
| |
| Tweaks existing layout tests and adds new tests. |
| |
| Tests: fast/events/before-input-events-different-start-end-elements.html |
| fast/events/before-input-events-prevent-default-in-textfield.html |
| fast/events/before-input-events-prevent-default.html |
| |
| * dom/Document.idl: |
| * dom/Element.idl: |
| * dom/EventNames.h: |
| * dom/Node.cpp: |
| (WebCore::Node::dispatchInputEvent): |
| (WebCore::Node::defaultEventHandler): |
| |
| Currently, we fire input events in Node in response to dispatching a webkitEditableContentChangedEvent. After |
| some discussion, Ryosuke and I believe that it will be ok to instead directly dispatch the input event where we |
| would normally dispatch a webkitEditableContentChangedEvent. |
| |
| * editing/CompositeEditCommand.cpp: |
| (WebCore::EditCommandComposition::unapply): |
| (WebCore::EditCommandComposition::reapply): |
| |
| Added calls to Editor::willUnapplyEditing and Editor::willReapplyEditing. |
| |
| (WebCore::CompositeEditCommand::willApplyCommand): |
| (WebCore::CompositeEditCommand::apply): |
| (WebCore::CompositeEditCommand::didApplyCommand): |
| |
| Added new virtual functions, willApplyCommand and didApplyCommand, that surround a call to |
| CompositeEditCommand::doApply. By default, they call willApplyEditing and appliedEditing on the editor, but may |
| be overridden in special cases, such as in TypingCommand, where we invoke appliedEditing after adding a new |
| typing command to the last open command. |
| |
| If willApplyCommand returns false, CompositeEditCommand::apply will bail and not proceed with the command. |
| |
| * editing/CompositeEditCommand.h: |
| * editing/Editor.cpp: |
| (WebCore::dispatchBeforeInputEvent): |
| (WebCore::dispatchBeforeInputEvents): |
| (WebCore::dispatchInputEvents): |
| (WebCore::Editor::willApplyEditing): |
| (WebCore::Editor::appliedEditing): |
| (WebCore::Editor::willUnapplyEditing): |
| (WebCore::Editor::unappliedEditing): |
| (WebCore::Editor::willReapplyEditing): |
| (WebCore::Editor::reappliedEditing): |
| (WebCore::Editor::computeAndSetTypingStyle): |
| (WebCore::dispatchEditableContentChangedEvents): Deleted. |
| * editing/Editor.h: |
| * editing/TypingCommand.cpp: |
| (WebCore::TypingCommand::willApplyCommand): |
| (WebCore::TypingCommand::didApplyCommand): |
| (WebCore::TypingCommand::willAddTypingToOpenCommand): |
| (WebCore::TypingCommand::insertTextRunWithoutNewlines): |
| (WebCore::TypingCommand::insertLineBreak): |
| (WebCore::TypingCommand::insertParagraphSeparator): |
| (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): |
| (WebCore::TypingCommand::deleteKeyPressed): |
| (WebCore::TypingCommand::forwardDeleteKeyPressed): |
| (WebCore::TypingCommand::deleteSelection): |
| |
| These now invoke willAddTypingToOpenCommand before proceeding with creating the command and applying it. The |
| flow is now: |
| - willAddTypingToOpenCommand |
| - create and apply a new command |
| - typingAddedToOpenCommand |
| |
| * editing/TypingCommand.h: |
| (WebCore::TypingCommand::preservesTypingStyle): Deleted. |
| (WebCore::TypingCommand::shouldRetainAutocorrectionIndicator): Deleted. |
| (WebCore::TypingCommand::setShouldRetainAutocorrectionIndicator): Deleted. |
| (WebCore::TypingCommand::shouldStopCaretBlinking): Deleted. |
| * html/HTMLAttributeNames.in: |
| * html/HTMLElement.cpp: |
| (WebCore::HTMLElement::createEventHandlerNameMap): |
| |
| 2016-10-07 Nan Wang <n_wang@apple.com> |
| |
| AX: <figcaption> should be AXTitleUIElement for other content inside the <figure> |
| https://bugs.webkit.org/show_bug.cgi?id=108996 |
| |
| Reviewed by Chris Fleizach. |
| |
| Exposed the figcaption element to be the AXTitleUIElement for the figure element. And used |
| the figcaption's content as the accessible name of the figure. Also, updated the figure element's |
| role description on Mac. |
| Accessible name and description calculation for figure elements: |
| https://w3c.github.io/html-aam/#figure-and-figcaption-elements |
| |
| Test: accessibility/mac/figure-element.html |
| |
| * English.lproj/Localizable.strings: |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::captionForFigure): |
| (WebCore::AccessibilityNodeObject::alternativeText): |
| * accessibility/AccessibilityNodeObject.h: |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::isFigure): |
| (WebCore::AccessibilityObject::isSuperscriptStyleGroup): Deleted. |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::exposesTitleUIElement): |
| (WebCore::AccessibilityRenderObject::titleUIElement): |
| (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper roleDescription]): |
| * platform/LocalizedStrings.cpp: |
| (WebCore::AXFigureText): |
| * platform/LocalizedStrings.h: |
| * platform/efl/LocalizedStringsEfl.cpp: |
| (WebCore::AXFigureText): |
| * platform/gtk/LocalizedStringsGtk.cpp: |
| (WebCore::AXFigureText): |
| |
| 2016-10-07 Alex Christensen <achristensen@webkit.org> |
| |
| Non-special URL fragments should percent-encode non-ASCII characters |
| https://bugs.webkit.org/show_bug.cgi?id=163153 |
| |
| Reviewed by Tim Horton. |
| |
| This is needed to keep compatibility with data URLs with non-ASCII characters after a '#' |
| which works in Chrome, Firefox, and Safari, while maintaining compatibility with Chrome, IE, and Edge |
| which keep non-ASCII characters in the fragments of special URLs. |
| This was proposed to the spec in https://github.com/whatwg/url/issues/150 |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::syntaxViolation): |
| Removed assertion because we now have fragments that need percent encoding but are all ASCII. |
| (WebCore::URLParser::fragmentSyntaxViolation): |
| (WebCore::URLParser::parse): |
| |
| 2016-10-07 Brent Fulgham <bfulgham@apple.com> |
| |
| EventHandler functions that need to guarantee event handler lifetime need to use Ref<Frame> |
| https://bugs.webkit.org/show_bug.cgi?id=98617 |
| <rdar://problem/12778649> |
| |
| Reviewed by Daniel Bates. |
| |
| Improve stability by ensuring that the Frame holding an active EventHandler is kept |
| alive while in the process of handling events and executing JavaScript. |
| |
| No new tests since there is no change in behavior. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::handleMousePressEventSingleClick): Protect the Frame with a Ref<>. |
| (WebCore::EventHandler::handleMousePressEvent): Ditto. |
| (WebCore::EventHandler::handleMouseDraggedEvent): Ditto. |
| (WebCore::EventHandler::eventMayStartDrag): Ditto. |
| (WebCore::EventHandler::handleMouseReleaseEvent): Ditto. |
| (WebCore::EventHandler::hitTestResultAtPoint): Ditto. |
| (WebCore::EventHandler::scrollRecursively): Ditto. |
| (WebCore::EventHandler::logicalScrollRecursively): Ditto. |
| (WebCore::EventHandler::selectCursor): Ditto. |
| (WebCore::EventHandler::handleMouseDoubleClickEvent): Ditto. |
| (WebCore::EventHandler::mouseMoved): Ditto. |
| (WebCore::EventHandler::handleMouseMoveEvent): Ditto. |
| (WebCore::EventHandler::handleMouseForceEvent): Ditto. |
| (WebCore::EventHandler::dispatchDragEvent): Ditto. |
| (WebCore::EventHandler::updateDragAndDrop): Ditto. |
| (WebCore::EventHandler::cancelDragAndDrop): Ditto. |
| (WebCore::EventHandler::performDragAndDrop): Ditto. |
| (WebCore::EventHandler::prepareMouseEvent): Ditto. |
| (WebCore::EventHandler::updateMouseEventTargetNode): Ditto. |
| (WebCore::EventHandler::dispatchMouseEvent): Ditto. |
| (WebCore::EventHandler::platformCompleteWheelEvent): Ditto. |
| (WebCore::EventHandler::handleWheelEvent): Ditto. |
| (WebCore::EventHandler::defaultWheelEventHandler): Ditto. |
| (WebCore::EventHandler::sendContextMenuEvent): Ditto. |
| (WebCore::EventHandler::sendContextMenuEventForKey): Ditto. |
| (WebCore::EventHandler::hoverTimerFired): Ditto. |
| (WebCore::EventHandler::keyEvent): Ditto. |
| (WebCore::EventHandler::defaultKeyboardEventHandler): Ditto. |
| (WebCore::EventHandler::handleDrag): Ditto. |
| (WebCore::EventHandler::handleTextInputEvent): Ditto. |
| (WebCore::EventHandler::defaultSpaceEventHandler): Ditto. |
| (WebCore::EventHandler::defaultTabEventHandler): Ditto. |
| (WebCore::EventHandler::sendScrollEvent): Ditto. |
| (WebCore::EventHandler::handleTouchEvent): Ditto. |
| * page/ios/EventHandlerIOS.mm: |
| (WebCore::EventHandler::focusDocumentView): Ditto. |
| * page/mac/EventHandlerMac.mm: |
| (WebCore::EventHandler::platformCompleteWheelEvent): Ditto. |
| |
| 2016-10-07 Chris Dumez <cdumez@apple.com> |
| |
| Regression(r201970): productSub / vendor / vendorSub should not be exposed on WorkerNavigator |
| https://bugs.webkit.org/show_bug.cgi?id=163124 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| productSub / vendor / vendorSub should not be exposed on WorkerNavigator: |
| - https://html.spec.whatwg.org/#navigatorid |
| |
| Test case: |
| - http://w3c-test.org/submissions/3881/html/webappapis/system-state-and-capabilities/the-navigator-object/NavigatorID.worker |
| |
| Note that the specification also restricts NavigatorID's appCodeName and |
| product attributes to Window. However, it seems the HTML specification is |
| about to get updated so that these get exposed to workers: |
| - https://github.com/whatwg/html/pull/1870 |
| |
| No new tests, updated existing test. |
| |
| * bindings/scripts/generate-bindings.pl: |
| (shouldPropertyBeExposed): |
| * page/NavigatorID.idl: |
| |
| 2016-10-07 Alex Christensen <achristensen@webkit.org> |
| |
| Disable URLParser logs by default in all builds |
| https://bugs.webkit.org/show_bug.cgi?id=163135 |
| |
| Reviewed by Brady Eidson. |
| |
| In debug builds with the URLParser enabled, some tests time out because |
| parameters to generate log strings are being evaluated for each character of each URL |
| and then not being used if URLParser logs are disabled. Generating these unused parameters |
| is too slow even for debug builds. Let's only generate them if they are to be used. |
| |
| No change in behaviour. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| (WebCore::URLParser::allValuesEqual): |
| |
| 2016-10-07 Andreas Kling <akling@apple.com> |
| |
| [WK2] didRemoveFrameFromHierarchy callback doesn't fire for subframes when evicting from PageCache. |
| <https://webkit.org/b/163098> |
| <rdar://problem/28663488> |
| |
| Reviewed by Antti Koivisto. |
| |
| Fix a bug where WK2 didRemoveFrameFromHierarchy callbacks wouldn't fire for subframes that were getting |
| kicked out of PageCache. The problem was happening because CachedFrame would disconnect the Frame from |
| its Page just before calling FrameLoader::detachViewsAndDocumentLoader() where the callbacks are fired. |
| Without a Page, the WebFrame on WK2 side can't find its WebPage, and so it can't fire its callbacks. |
| |
| The fix is just to switch the order of those two lines. |
| |
| This bug was causing frequent DOM and window object leaks in some clients *cough* Safari *cough* that |
| were relying on didRemoveFrameFromHierarchy to release their isolated worlds. |
| |
| Test: WebKit2.DidRemoveFrameFromHiearchyInPageCache |
| |
| * history/CachedFrame.cpp: |
| (WebCore::CachedFrame::destroy): |
| |
| 2016-10-07 Nan Wang <n_wang@apple.com> |
| |
| AX: AXRoleDescription for details and summary elements |
| https://bugs.webkit.org/show_bug.cgi?id=163094 |
| |
| Reviewed by Chris Fleizach. |
| |
| details and summary elements should have AXRoleDescription that is consistent with other |
| elements that have custom AXSubRole. |
| |
| Test: accessibility/mac/details-summary-role-description.html |
| |
| * English.lproj/Localizable.strings: |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper roleDescription]): |
| * platform/LocalizedStrings.cpp: |
| (WebCore::AXDetailsText): |
| (WebCore::AXSummaryText): |
| * platform/LocalizedStrings.h: |
| * platform/efl/LocalizedStringsEfl.cpp: |
| (WebCore::AXDetailsText): |
| (WebCore::AXSummaryText): |
| * platform/gtk/LocalizedStringsGtk.cpp: |
| (WebCore::AXDetailsText): |
| (WebCore::AXSummaryText): |
| |
| 2016-10-07 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Fix the Windows build after r206917. |
| |
| Unreviewed build fix. |
| |
| * dom/DOMAllInOne.cpp: |
| |
| 2016-10-07 Antti Koivisto <antti@apple.com> |
| |
| Rename AuthorStyleSheets to Style::Scope |
| https://bugs.webkit.org/show_bug.cgi?id=163108 |
| |
| Reviewed by Andreas Kling. |
| |
| It represents the style scope in DOM. |
| Also move the file under style/. |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/CSSStyleSheet.cpp: |
| (WebCore::CSSStyleSheet::styleSheetScope): |
| * css/CSSStyleSheet.h: |
| * css/InspectorCSSOMWrappers.cpp: |
| (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets): |
| * css/InspectorCSSOMWrappers.h: |
| * css/StyleSheetList.cpp: |
| (WebCore::StyleSheetList::styleSheets): |
| (WebCore::StyleSheetList::detachFromDocument): |
| * dom/AuthorStyleSheets.cpp: Removed. |
| * dom/AuthorStyleSheets.h: Removed. |
| * dom/Document.cpp: |
| (WebCore::Document::Document): |
| (WebCore::Document::setContentLanguage): |
| (WebCore::Document::recalcStyle): |
| (WebCore::Document::needsStyleRecalc): |
| (WebCore::Document::updateStyleIfNeeded): |
| (WebCore::Document::updateLayoutIgnorePendingStylesheets): |
| (WebCore::Document::createStyleResolver): |
| (WebCore::Document::didRemoveAllPendingStylesheet): |
| (WebCore::Document::usesStyleBasedEditability): |
| (WebCore::Document::processHttpEquiv): |
| (WebCore::Document::preferredStylesheetSet): |
| (WebCore::Document::selectedStylesheetSet): |
| (WebCore::Document::setSelectedStylesheetSet): |
| (WebCore::Document::haveStylesheetsLoaded): |
| * dom/Document.h: |
| (WebCore::Document::styleScope): |
| (WebCore::Document::authorStyleSheets): Deleted. |
| * dom/ExtensionStyleSheets.cpp: |
| (WebCore::ExtensionStyleSheets::clearPageUserSheet): |
| (WebCore::ExtensionStyleSheets::updatePageUserSheet): |
| (WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache): |
| (WebCore::ExtensionStyleSheets::addUserStyleSheet): |
| (WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting): |
| (WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired): |
| * dom/InlineStyleSheetOwner.cpp: |
| (WebCore::InlineStyleSheetOwner::insertedIntoDocument): |
| (WebCore::InlineStyleSheetOwner::removedFromDocument): |
| (WebCore::InlineStyleSheetOwner::clearDocumentData): |
| (WebCore::InlineStyleSheetOwner::createSheet): |
| (WebCore::InlineStyleSheetOwner::sheetLoaded): |
| (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet): |
| * dom/InlineStyleSheetOwner.h: |
| (WebCore::InlineStyleSheetOwner::styleScope): |
| (WebCore::InlineStyleSheetOwner::styleSheetScope): Deleted. |
| * dom/ProcessingInstruction.cpp: |
| (WebCore::ProcessingInstruction::~ProcessingInstruction): |
| (WebCore::ProcessingInstruction::checkStyleSheet): |
| (WebCore::ProcessingInstruction::sheetLoaded): |
| (WebCore::ProcessingInstruction::insertedInto): |
| (WebCore::ProcessingInstruction::removedFrom): |
| * dom/ShadowRoot.cpp: |
| (WebCore::ShadowRoot::styleResolver): |
| (WebCore::ShadowRoot::styleScope): |
| (WebCore::ShadowRoot::updateStyle): |
| (WebCore::ShadowRoot::authorStyleSheets): Deleted. |
| * dom/ShadowRoot.h: |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::~HTMLLinkElement): |
| (WebCore::HTMLLinkElement::setDisabledState): |
| (WebCore::HTMLLinkElement::parseAttribute): |
| (WebCore::HTMLLinkElement::process): |
| (WebCore::HTMLLinkElement::insertedInto): |
| (WebCore::HTMLLinkElement::removedFrom): |
| (WebCore::HTMLLinkElement::addPendingSheet): |
| (WebCore::HTMLLinkElement::removePendingSheet): |
| * html/HTMLStyleElement.cpp: |
| * inspector/InspectorCSSAgent.cpp: |
| (WebCore::InspectorCSSAgent::collectAllDocumentStyleSheets): |
| (WebCore::InspectorCSSAgent::forcePseudoState): |
| (WebCore::InspectorCSSAgent::buildObjectForRule): |
| (WebCore::InspectorCSSAgent::resetPseudoStates): |
| * inspector/InspectorPageAgent.cpp: |
| (WebCore::InspectorPageAgent::setEmulatedMedia): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::getMatchedCSSRules): |
| * page/Frame.cpp: |
| (WebCore::Frame::setPrinting): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::layout): |
| (WebCore::FrameView::setPagination): |
| (WebCore::FrameView::setViewportSizeForCSSViewportUnits): |
| * page/Page.cpp: |
| (WebCore::Page::setViewMode): |
| (WebCore::Page::setNeedsRecalcStyleInAllFrames): |
| (WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames): |
| * style/StyleScope.cpp: Copied from dom/AuthorStyleSheets.cpp. |
| (WebCore::Style::Scope::Scope): |
| (WebCore::Style::Scope::styleResolver): |
| (WebCore::Style::Scope::styleResolverIfExists): |
| (WebCore::Style::Scope::forNode): |
| (WebCore::Style::Scope::removePendingSheet): |
| (WebCore::Style::Scope::addStyleSheetCandidateNode): |
| (WebCore::Style::Scope::removeStyleSheetCandidateNode): |
| (WebCore::Style::Scope::collectActiveStyleSheets): |
| (WebCore::Style::Scope::analyzeStyleSheetChange): |
| (WebCore::Style::Scope::updateActiveStyleSheets): |
| (WebCore::Style::Scope::updateStyleResolver): |
| (WebCore::Style::Scope::activeStyleSheetsForInspector): |
| (WebCore::Style::Scope::activeStyleSheetsContains): |
| (WebCore::Style::Scope::flushPendingUpdate): |
| (WebCore::Style::Scope::clearPendingUpdate): |
| (WebCore::Style::Scope::scheduleActiveSetUpdate): |
| (WebCore::Style::Scope::didChangeCandidatesForActiveSet): |
| (WebCore::Style::Scope::didChangeContentsOrInterpretation): |
| (WebCore::Style::Scope::pendingUpdateTimerFired): |
| (WebCore::AuthorStyleSheets::AuthorStyleSheets): Deleted. |
| (WebCore::AuthorStyleSheets::styleResolver): Deleted. |
| (WebCore::AuthorStyleSheets::styleResolverIfExists): Deleted. |
| (WebCore::AuthorStyleSheets::forNode): Deleted. |
| (WebCore::AuthorStyleSheets::removePendingSheet): Deleted. |
| (WebCore::AuthorStyleSheets::addStyleSheetCandidateNode): Deleted. |
| (WebCore::AuthorStyleSheets::removeStyleSheetCandidateNode): Deleted. |
| (WebCore::AuthorStyleSheets::collectActiveStyleSheets): Deleted. |
| (WebCore::AuthorStyleSheets::analyzeStyleSheetChange): Deleted. |
| (WebCore::AuthorStyleSheets::updateActiveStyleSheets): Deleted. |
| (WebCore::AuthorStyleSheets::updateStyleResolver): Deleted. |
| (WebCore::AuthorStyleSheets::activeStyleSheetsForInspector): Deleted. |
| (WebCore::AuthorStyleSheets::activeStyleSheetsContains): Deleted. |
| (WebCore::AuthorStyleSheets::flushPendingUpdate): Deleted. |
| (WebCore::AuthorStyleSheets::clearPendingUpdate): Deleted. |
| (WebCore::AuthorStyleSheets::scheduleActiveSetUpdate): Deleted. |
| (WebCore::AuthorStyleSheets::didChangeCandidatesForActiveSet): Deleted. |
| (WebCore::AuthorStyleSheets::didChangeContentsOrInterpretation): Deleted. |
| (WebCore::AuthorStyleSheets::pendingUpdateTimerFired): Deleted. |
| * style/StyleScope.h: Copied from dom/AuthorStyleSheets.h. |
| * style/StyleTreeResolver.cpp: |
| * svg/SVGFontFaceElement.cpp: |
| (WebCore::SVGFontFaceElement::rebuildFontFace): |
| (WebCore::SVGFontFaceElement::removedFrom): |
| * xml/XMLTreeViewer.cpp: |
| (WebCore::XMLTreeViewer::transformDocumentToTreeView): |
| * xml/parser/XMLDocumentParser.cpp: |
| (WebCore::XMLDocumentParser::end): |
| * xml/parser/XMLDocumentParserLibxml2.cpp: |
| (WebCore::XMLDocumentParser::doEnd): |
| |
| 2016-10-07 Zalan Bujtas <zalan@apple.com> |
| |
| https://vuldb.com/?cvssv3.2012 takes long time to load. |
| https://bugs.webkit.org/show_bug.cgi?id=162994 |
| <rdar://problem/28593746> |
| |
| Reviewed by Darin Adler. |
| |
| Stop visiting cousins when we hit the style sharing search threshold. |
| |
| In addition to mistakenly ignoring the threshold at SharingResolver::findSibling(), we |
| continued on searching for cousin elements. |
| |
| Test: fast/selectors/slow-style-sharing-with-long-cousin-list.html |
| |
| * style/StyleSharingResolver.cpp: |
| (WebCore::Style::SharingResolver::resolve): |
| (WebCore::Style::SharingResolver::findSibling): |
| (WebCore::Style::SharingResolver::locateCousinList): |
| |
| 2016-10-07 Romain Bellessort <romain.bellessort@crf.canon.fr> |
| |
| [Readable Streams API] Implement generic reader functions |
| https://bugs.webkit.org/show_bug.cgi?id=163003 |
| |
| Reviewed by Darin Adler. |
| |
| Implements reader generic functions defined by spec in order to prepare BYOBReader integration. |
| Generic functions factorize some code that is used by both DefaultReader and BYOBReader. |
| |
| No change in behaviour. |
| |
| * Modules/streams/ReadableStreamDefaultReader.js: |
| (cancel): Rely on readableStreamReaderGenericCancel. |
| (releaseLock): Rely on readableStreamReaderGenericRelease. |
| * Modules/streams/ReadableStreamInternals.js: |
| (privateInitializeReadableStreamDefaultReader): Rely on readableStreamReaderGenericInitialize. |
| (readableStreamReaderGenericInitialize): Added. |
| (readableStreamReaderGenericCancel): Added. |
| (readableStreamReaderGenericRelease): Added. |
| |
| 2016-10-07 Adam Bergkvist <adam.bergkvist@ericsson.com> |
| |
| WebRTC: Misc gardening: Use typedefs consistently and remove unused code |
| https://bugs.webkit.org/show_bug.cgi?id=163104 |
| |
| Reviewed by Philippe Normand. |
| |
| Miscellaneous WebRTC gardening. See file list below for details. |
| |
| Testing: No change in behavior. |
| |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| * Modules/mediastream/MediaEndpointPeerConnection.h: |
| Move NotImplemented include to cpp-file. |
| * platform/mediastream/MediaEndpoint.h: |
| Use MediaPayloadVector typedef (instead of Vector<RefPtr<MediaPayload>>). |
| * platform/mediastream/PeerMediaDescription.h: |
| (WebCore::PeerMediaDescription::source): Deleted. |
| (WebCore::PeerMediaDescription::setSource): Deleted. |
| Sources are passed to updateSendConfiguration() via a source map and not added to each |
| PeerMediaDescription anymore. Remove unused code. |
| * platform/mock/MockMediaEndpoint.cpp: |
| (WebCore::MockMediaEndpoint::getDefaultAudioPayloads): |
| (WebCore::MockMediaEndpoint::getDefaultVideoPayloads): |
| Use MediaPayloadVector typedef. |
| * platform/mock/MockMediaEndpoint.h: |
| Use MediaPayloadVector typedef. |
| |
| 2016-10-07 Gwang Yoon Hwang <yoon@igalia.com> |
| |
| [GTK] Remove unneeded creation of TextureMapperPlatformLayerProxy |
| https://bugs.webkit.org/show_bug.cgi?id=163101 |
| |
| Reviewed by Žan Doberšek. |
| |
| Covered by existing tests. |
| |
| * platform/graphics/cairo/ImageBufferCairo.cpp: |
| (WebCore::ImageBufferData::ImageBufferData): Modified not to create |
| TextureMapperPlatformLayerProxy if it is not created for the |
| accelerated 2d canvas. |
| |
| 2016-10-07 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| Use 'use lib $FindBin::Bin' to append Perl module include path |
| https://bugs.webkit.org/show_bug.cgi?id=162256 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Some Perl scripts are needed to be executed with '-I' switch to |
| explicitly append Perl module include path. Use 'use lib' as well |
| as other Perl scripts do. |
| |
| * CMakeLists.txt: Removed '-I' options from invocation of Perl. |
| * DerivedSources.make: Ditto. |
| * bindings/scripts/generate-bindings.pl: Use 'use lib'. |
| * bindings/scripts/preprocess-idls.pl: Ditto. |
| * css/make-css-file-arrays.pl: Ditto. |
| * css/makegrammar.pl: Ditto. |
| * css/makeprop.pl: Ditto. |
| * css/makevalues.pl: Ditto. |
| * dom/make_dom_exceptions.pl: Ditto. |
| * dom/make_event_factory.pl: Ditto. |
| * dom/make_names.pl: Ditto. |
| * page/make_settings.pl: Ditto. |
| |
| 2016-10-07 Youenn Fablet <youenn@apple.com> |
| |
| Refactor CachedResourceClient::notifyFinished |
| https://bugs.webkit.org/show_bug.cgi?id=162060 |
| |
| Reviewed by Darin Adler. |
| |
| No change of behavior. |
| |
| Making CachedResourceClient and CachedRawResourceClient callbacks take CachedResource references and not pointers. |
| In most cases, the CachedResource parameter is only used for assertions. |
| Removing that parameter might be contemplated in the future. |
| The only real case is in RenderImage. |
| |
| Removed the CachedResource parameter from ContentFilter methods as code was calling these methods with null values. |
| |
| * dom/LoadableClassicScript.cpp: |
| (WebCore::LoadableClassicScript::notifyFinished): |
| * dom/LoadableClassicScript.h: |
| * html/HTMLImageLoader.cpp: |
| (WebCore::HTMLImageLoader::notifyFinished): |
| * html/HTMLImageLoader.h: |
| * loader/ContentFilter.cpp: |
| (WebCore::ContentFilter::continueAfterResponseReceived): |
| (WebCore::ContentFilter::continueAfterDataReceived): |
| (WebCore::ContentFilter::continueAfterNotifyFinished): |
| (WebCore::ContentFilter::deliverResourceData): |
| * loader/ContentFilter.h: |
| * loader/CrossOriginPreflightChecker.cpp: |
| (WebCore::CrossOriginPreflightChecker::notifyFinished): |
| * loader/CrossOriginPreflightChecker.h: |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::notifyFinished): |
| (WebCore::DocumentLoader::handleSubstituteDataLoadNow): |
| (WebCore::DocumentLoader::redirectReceived): |
| (WebCore::DocumentLoader::responseReceived): |
| (WebCore::DocumentLoader::continueAfterContentPolicy): |
| (WebCore::DocumentLoader::dataReceived): |
| * loader/DocumentLoader.h: |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::redirectReceived): |
| (WebCore::DocumentThreadableLoader::dataSent): |
| (WebCore::DocumentThreadableLoader::responseReceived): |
| (WebCore::DocumentThreadableLoader::dataReceived): |
| (WebCore::DocumentThreadableLoader::notifyFinished): |
| * loader/DocumentThreadableLoader.h: |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::notifyFinished): |
| * loader/ImageLoader.h: |
| * loader/LinkLoader.cpp: |
| (WebCore::LinkLoader::triggerEvents): |
| (WebCore::LinkLoader::notifyFinished): |
| * loader/LinkLoader.h: |
| * loader/LinkPreloadResourceClients.cpp: |
| (WebCore::LinkPreloadResourceClient::triggerEvents): |
| * loader/LinkPreloadResourceClients.h: |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResource::responseReceived): |
| (WebCore::MediaResource::shouldCacheResponse): |
| (WebCore::MediaResource::redirectReceived): |
| (WebCore::MediaResource::dataSent): |
| (WebCore::MediaResource::dataReceived): |
| (WebCore::MediaResource::notifyFinished): |
| (WebCore::MediaResource::getOrCreateReadBuffer): |
| * loader/MediaResourceLoader.h: |
| * loader/TextTrackLoader.cpp: |
| (WebCore::TextTrackLoader::processNewCueData): |
| (WebCore::TextTrackLoader::deprecatedDidReceiveCachedResource): |
| (WebCore::TextTrackLoader::notifyFinished): |
| * loader/TextTrackLoader.h: |
| * loader/cache/CachedRawResource.cpp: |
| (WebCore::CachedRawResource::notifyClientsDataWasReceived): |
| (WebCore::CachedRawResource::didAddClient): |
| (WebCore::CachedRawResource::redirectReceived): |
| (WebCore::CachedRawResource::responseReceived): |
| (WebCore::CachedRawResource::shouldCacheResponse): |
| (WebCore::CachedRawResource::didSendData): |
| * loader/cache/CachedRawResourceClient.h: |
| (WebCore::CachedRawResourceClient::dataSent): |
| (WebCore::CachedRawResourceClient::responseReceived): |
| (WebCore::CachedRawResourceClient::shouldCacheResponse): |
| (WebCore::CachedRawResourceClient::dataReceived): |
| (WebCore::CachedRawResourceClient::redirectReceived): |
| (WebCore::CachedRawResourceClient::getOrCreateReadBuffer): |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::checkNotify): |
| (WebCore::CachedResource::didAddClient): |
| * loader/cache/CachedResourceClient.h: |
| (WebCore::CachedResourceClient::notifyFinished): |
| (WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource): |
| * loader/cache/CachedTextTrack.cpp: |
| (WebCore::CachedTextTrack::updateData): |
| * loader/icon/IconLoader.cpp: |
| (WebCore::IconLoader::notifyFinished): |
| * loader/icon/IconLoader.h: |
| * loader/soup/CachedRawResourceSoup.cpp: |
| * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: |
| (WebCore::WebCoreAVCFResourceLoader::responseReceived): |
| (WebCore::WebCoreAVCFResourceLoader::dataReceived): |
| (WebCore::WebCoreAVCFResourceLoader::notifyFinished): |
| (WebCore::WebCoreAVCFResourceLoader::fulfillRequestWithResource): |
| * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.h: |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: |
| (WebCore::WebCoreAVFResourceLoader::responseReceived): |
| (WebCore::WebCoreAVFResourceLoader::dataReceived): |
| (WebCore::WebCoreAVFResourceLoader::notifyFinished): |
| (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): |
| * rendering/RenderImage.cpp: |
| (WebCore::RenderImage::notifyFinished): |
| * rendering/RenderImage.h: |
| * rendering/RenderLayerFilterInfo.cpp: |
| (WebCore::RenderLayer::FilterInfo::setRenderer): |
| (WebCore::RenderLayer::FilterInfo::notifyFinished): |
| * rendering/RenderLayerFilterInfo.h: |
| * svg/SVGFEImageElement.cpp: |
| (WebCore::SVGFEImageElement::notifyFinished): |
| * svg/SVGFEImageElement.h: |
| * svg/SVGUseElement.cpp: |
| (WebCore::SVGUseElement::notifyFinished): |
| * svg/SVGUseElement.h: |
| * xml/parser/XMLDocumentParser.cpp: |
| (WebCore::XMLDocumentParser::notifyFinished): |
| * xml/parser/XMLDocumentParser.h: |
| |
| 2016-10-06 Youenn Fablet <youenn@apple.com> |
| |
| CachedXSLStylesheet does not need to be updated according Origin/Fetch mode |
| https://bugs.webkit.org/show_bug.cgi?id=162389 |
| |
| Reviewed by Darin Adler. |
| |
| No change of behavior. |
| |
| Making clear that there is no reason to update cached XSLT resources according the origin, given that CORS is never checked and loading is always same-origin. |
| |
| Renaming CachedResource::isClean to CachedResource::isCORSSameOrigin to better match spec terminology. |
| Updating HTMLLinkElement accordingly. |
| |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::initializeStyleSheet): |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::isCORSSameOrigin): Ensuring that this method is not called for resource types for which CORS is not to be used. |
| (WebCore::CachedResource::isClean): Deleted. |
| * loader/cache/CachedResource.h: |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest): |
| |
| 2016-10-06 Youenn Fablet <youenn@apple.com> |
| |
| Add a place for common HTTP Header values |
| https://bugs.webkit.org/show_bug.cgi?id=163002 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| |
| Introducing HTTPHeaderValues with two Content-Type values. |
| |
| * CMakeLists.txt: |
| * Modules/fetch/FetchBody.cpp: |
| (WebCore::FetchBody::extract): |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/network/HTTPHeaderValues.cpp: Added. |
| (WebCore::HTTPHeaderValues::TextPlainContentType): |
| (WebCore::HTTPHeaderValues::FormURLEncodedContentType): |
| * platform/network/HTTPHeaderValues.h: Added. |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::send): |
| |
| 2016-10-06 Youenn Fablet <youenn@apple.com> |
| |
| CachedResourceRequest should not need to store defer and preload options |
| https://bugs.webkit.org/show_bug.cgi?id=163004 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| |
| Removing CachedResourceRequest defer and preload fields. |
| These fields are computed inside CachedResourceLoader instead. |
| |
| Updated setting of priority from CachedResourceRequest to CachedResource. |
| Priority is set for any new resource (this covers all cases where no cached resource can be reused from the memory cache). |
| Priority is set for a cached resource if the request is not a preload request. |
| |
| * loader/LinkLoader.cpp: |
| (WebCore::LinkLoader::preloadIfNeeded): |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::CachedResource): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::requestImage): |
| (WebCore::CachedResourceLoader::canRequest): |
| (WebCore::CachedResourceLoader::requestResource): |
| (WebCore::CachedResourceLoader::determineRevalidationPolicy): |
| (WebCore::CachedResourceLoader::requestPreload): |
| * loader/cache/CachedResourceLoader.h: |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::CachedResourceRequest): |
| * loader/cache/CachedResourceRequest.h: |
| (WebCore::CachedResourceRequest::priority): |
| (WebCore::CachedResourceRequest::forPreload): Deleted. |
| (WebCore::CachedResourceRequest::setForPreload): Deleted. |
| (WebCore::CachedResourceRequest::defer): Deleted. |
| (WebCore::CachedResourceRequest::setDefer): Deleted. |
| |
| 2016-10-06 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Variation fonts don't affect glyph advances |
| https://bugs.webkit.org/show_bug.cgi?id=163093 |
| |
| Reviewed by Darin Adler. |
| |
| Work around known bug <rdar://problem/28662086>. For variation fonts, |
| CTFontGetAdvancesForGlyphs() gives correct answers but |
| CTFontGetUnsummedAdvancesForGlyphsAndStyle() doesn't. |
| |
| Test: fast/text/variations/advances.html |
| |
| * platform/graphics/FontPlatformData.h: |
| (WebCore::FontPlatformData::hasVariations): |
| * platform/graphics/cocoa/FontCocoa.mm: |
| (WebCore::Font::platformWidthForGlyph): |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::FontPlatformData::FontPlatformData): |
| |
| 2016-10-06 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r206713. |
| https://bugs.webkit.org/show_bug.cgi?id=163097 |
| |
| triggers apparent codegen bug on ARM 32-bit (Requested by smfr |
| on #webkit). |
| |
| Reverted changeset: |
| |
| "Support transitions/animations of background-position with |
| right/bottom-relative values" |
| https://bugs.webkit.org/show_bug.cgi?id=162048 |
| http://trac.webkit.org/changeset/206713 |
| |
| 2016-10-06 Daniel Bates <dabates@apple.com> |
| |
| Remove unused WebCore::contentDispositionType() |
| https://bugs.webkit.org/show_bug.cgi?id=163095 |
| |
| Reviewed by Alex Christensen. |
| |
| The function WebCore::contentDispositionType() was only used by the Chromium and Qt ports |
| to parse the Content-Disposition HTTP header. Both of these ports have long since been |
| removed from the repository. We should remove WebCore::contentDispositionType(). |
| |
| * platform/network/HTTPParsers.cpp: |
| (WebCore::contentDispositionType): Deleted. |
| * platform/network/HTTPParsers.h: |
| |
| 2016-10-06 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Upgrading and constructing element should always report exception instead of rethrowing |
| https://bugs.webkit.org/show_bug.cgi?id=162996 |
| |
| Reviewed by Darin Adler. |
| |
| The latest HTML specification specifies that we must report exceptions thrown during element upgrades: |
| https://html.spec.whatwg.org/#upgrades |
| |
| In addition, F2F during 2016 TPAC had a consensus that we should do the same for document.createElement: |
| https://github.com/w3c/webcomponents/issues/569 |
| |
| Since the HTML parser already reports the exception thrown during custom element construction as it does |
| not have any JS stack, these changes make exceptions thrown during upgrades and constructions. |
| |
| In our implementation, this only reduces the code complexity as now we can push the logic to fallback |
| to HTMLUnknownElement into JSCustomElementInterface's constructElement, which has been renamed |
| to constructElementWithFallback, and eliminate ShouldClearException enum class entirely. Moreover, |
| constructElementWithFallback can now return Ref instead of RefPtr. |
| |
| No new tests. Existing tests have been updated. |
| |
| * bindings/js/JSCustomElementInterface.cpp: |
| (WebCore::JSCustomElementInterface::constructElementWithFallback): Create a HTMLUnknownElement if |
| an attempt to construct a custom element had failed in lieu of returning nullptr. |
| (WebCore::JSCustomElementInterface::tryToConstructCustomElement): Renamed from constructElement. |
| Always report exceptions (the same behavior as ShouldClearException::Clear). |
| (WebCore::JSCustomElementInterface::upgradeElement): Report exceptions instead of rethrowing. |
| * bindings/js/JSCustomElementInterface.h: |
| * dom/Document.cpp: |
| (WebCore::createHTMLElementWithNameValidation): |
| * html/parser/HTMLDocumentParser.cpp: |
| (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): |
| |
| 2016-10-06 Chris Dumez <cdumez@apple.com> |
| |
| Overwriting an attribute event listener can lead to wrong event listener firing order |
| https://bugs.webkit.org/show_bug.cgi?id=163083 |
| |
| Reviewed by Darin Adler. |
| |
| Overwriting an attribute event listener could lead to wrong event listener |
| firing order in WebKit. This is because we were removing the old event |
| listener and then appending the new one instead of actually *replacing* |
| the old one. |
| |
| No new tests, rebaselined existing tests. |
| |
| * dom/EventListenerMap.cpp: |
| (WebCore::EventListenerMap::replace): |
| * dom/EventListenerMap.h: |
| * dom/EventTarget.cpp: |
| (WebCore::EventTarget::setAttributeEventListener): |
| (WebCore::EventTarget::hasActiveEventListeners): Deleted. |
| (WebCore::EventTarget::dispatchEventForBindings): Deleted. |
| * dom/EventTarget.h: |
| |
| 2016-10-06 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser: Non-ASCII characters in Non-UTF-8 encoded queries of relative URLs with ws, wss, or nonspecial schemes should be UTF-8 encoded |
| https://bugs.webkit.org/show_bug.cgi?id=163089 |
| |
| Reviewed by Tim Horton. |
| |
| This is a change similar to r206818 but with relative URLs. |
| This matches the spec, URL::parse, and other browsers' behavior. |
| Covered by new API tests for URLParser. |
| This also fixes tests like http/tests/misc/url-in-utf32le.html when URLParser is enabled. |
| |
| * platform/URL.cpp: |
| (WebCore::URL::URL): |
| Use the same encoding for the URL constructor whether or not the URLParser is enabled. |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::copyURLPartsUntil): |
| (WebCore::URLParser::parse): |
| (WebCore::isSpecial): Deleted. |
| * platform/URLParser.h: |
| Use UTF-8 for non-special, ws, or wss schemes. |
| |
| 2016-10-06 Zalan Bujtas <zalan@apple.com> |
| |
| Add back ASSERT(!needsLayout) to RenderTableSection which is now valid |
| https://bugs.webkit.org/show_bug.cgi?id=92954 |
| <rdar://problem/12147973> |
| |
| Reviewed by Dan Bernstein. |
| |
| LayoutTests pass fine now with this assert on. |
| |
| Covered by existing tests. |
| |
| * rendering/RenderTableSection.cpp: |
| (WebCore::RenderTableSection::paint): |
| |
| 2016-10-06 Jiewen Tan <jiewen_tan@apple.com> |
| |
| Add a dummy SubtleCrypto interface |
| https://bugs.webkit.org/show_bug.cgi?id=162992 |
| <rdar://problem/28643573> |
| |
| Reviewed by Brent Fulgham. |
| |
| Add a dummy SubtleCrypto interface and rename KeyPair to CryptoKeyPair. |
| |
| Tests: crypto/subtle/gc-2.html |
| crypto/subtle/gc-3.html |
| crypto/subtle/gc.html |
| crypto/webkitSubtle/aes-cbc-192-encrypt-decrypt.html |
| crypto/webkitSubtle/aes-cbc-256-encrypt-decrypt.html |
| crypto/webkitSubtle/aes-cbc-encrypt-decrypt-with-padding.html |
| crypto/webkitSubtle/aes-cbc-encrypt-decrypt.html |
| crypto/webkitSubtle/aes-cbc-generate-key.html |
| crypto/webkitSubtle/aes-cbc-import-jwk.html |
| crypto/webkitSubtle/aes-cbc-invalid-length.html |
| crypto/webkitSubtle/aes-cbc-unwrap-failure.html |
| crypto/webkitSubtle/aes-cbc-unwrap-rsa.html |
| crypto/webkitSubtle/aes-cbc-wrap-rsa-non-extractable.html |
| crypto/webkitSubtle/aes-cbc-wrap-rsa.html |
| crypto/webkitSubtle/aes-cbc-wrong-key-class.html |
| crypto/webkitSubtle/aes-export-key.html |
| crypto/webkitSubtle/aes-kw-key-manipulation.html |
| crypto/webkitSubtle/aes-kw-wrap-unwrap-aes.html |
| crypto/webkitSubtle/aes-postMessage.html |
| crypto/webkitSubtle/argument-conversion.html |
| crypto/webkitSubtle/array-buffer-view-offset.html |
| crypto/webkitSubtle/crypto-key-algorithm-gc.html |
| crypto/webkitSubtle/crypto-key-usages-gc.html |
| crypto/webkitSubtle/hmac-check-algorithm.html |
| crypto/webkitSubtle/hmac-export-key.html |
| crypto/webkitSubtle/hmac-generate-key.html |
| crypto/webkitSubtle/hmac-import-jwk.html |
| crypto/webkitSubtle/hmac-postMessage.html |
| crypto/webkitSubtle/hmac-sign-verify-empty-key.html |
| crypto/webkitSubtle/hmac-sign-verify.html |
| crypto/webkitSubtle/import-jwk.html |
| crypto/webkitSubtle/jwk-export-use-values.html |
| crypto/webkitSubtle/jwk-import-use-values.html |
| crypto/webkitSubtle/rsa-export-generated-keys.html |
| crypto/webkitSubtle/rsa-export-key.html |
| crypto/webkitSubtle/rsa-export-private-key.html |
| crypto/webkitSubtle/rsa-indexeddb-non-exportable-private.html |
| crypto/webkitSubtle/rsa-indexeddb-non-exportable.html |
| crypto/webkitSubtle/rsa-indexeddb-private.html |
| crypto/webkitSubtle/rsa-indexeddb.html |
| crypto/webkitSubtle/rsa-oaep-generate-non-extractable-key.html |
| crypto/webkitSubtle/rsa-oaep-key-manipulation.html |
| crypto/webkitSubtle/rsa-oaep-plaintext-length.html |
| crypto/webkitSubtle/rsa-oaep-wrap-unwrap-aes.html |
| crypto/webkitSubtle/rsa-postMessage.html |
| crypto/webkitSubtle/rsaes-pkcs1-v1_5-decrypt.html |
| crypto/webkitSubtle/rsaes-pkcs1-v1_5-wrap-unwrap-aes.html |
| crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html |
| crypto/webkitSubtle/rsassa-pkcs1-v1_5-generate-key.html |
| crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html |
| crypto/webkitSubtle/rsassa-pkcs1-v1_5-import-jwk.html |
| crypto/webkitSubtle/rsassa-pkcs1-v1_5-sign-verify.html |
| crypto/webkitSubtle/sha-1.html |
| crypto/webkitSubtle/sha-224.html |
| crypto/webkitSubtle/sha-256.html |
| crypto/webkitSubtle/sha-384.html |
| crypto/webkitSubtle/sha-512.html |
| crypto/webkitSubtle/unimplemented-unwrap-crash.html |
| crypto/webkitSubtle/unwrapKey-check-usage.html |
| crypto/webkitSubtle/wrapKey-check-usage.html |
| crypto/workers/subtle/aes-postMessage-worker.html |
| crypto/workers/subtle/gc-worker.html |
| crypto/workers/subtle/hmac-postMessage-worker.html |
| crypto/workers/subtle/hrsa-postMessage-worker.html |
| crypto/workers/subtle/multiple-postMessage-worker.html |
| crypto/workers/subtle/rsa-postMessage-worker.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.cpp: |
| * DerivedSources.make: |
| * PlatformEfl.cmake: |
| * PlatformGTK.cmake: |
| * PlatformMac.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * crypto/CryptoKeyPair.idl: |
| * crypto/SubtleCrypto.cpp: |
| (WebCore::SubtleCrypto::SubtleCrypto): |
| * crypto/SubtleCrypto.h: |
| (WebCore::SubtleCrypto::create): |
| * crypto/SubtleCrypto.idl: Added. |
| * page/Crypto.cpp: |
| (WebCore::Crypto::Crypto): |
| (WebCore::Crypto::subtle): |
| * page/Crypto.h: |
| * page/Crypto.idl: |
| |
| 2016-10-06 Anders Carlsson <andersca@apple.com> |
| |
| Crash when ApplePaySession.completeMerchantValidation is not passed a dictionary |
| https://bugs.webkit.org/show_bug.cgi?id=163074 |
| rdar://problem/27824842 |
| |
| Reviewed by Tim Horton. |
| |
| Raise a type error on a null initializer object. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::ApplePaySession::completeMerchantValidation): |
| |
| 2016-10-06 Antti Koivisto <antti@apple.com> |
| |
| Mutating styleSheet in shadow tree doesn't update the style |
| https://bugs.webkit.org/show_bug.cgi?id=162744 |
| <rdar://problem/28550588> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| We weren't always invalidating the right AuthorStyleSheets (to be renamed) instance |
| for the scope after mutations. |
| |
| Test: fast/shadow-dom/mutating-stylesheet-in-shadow-tree.html |
| |
| * css/CSSStyleSheet.cpp: |
| (WebCore::CSSStyleSheet::didMutateRules): |
| (WebCore::CSSStyleSheet::didMutate): |
| (WebCore::CSSStyleSheet::clearOwnerNode): |
| (WebCore::CSSStyleSheet::rootStyleSheet): |
| (WebCore::CSSStyleSheet::ownerDocument): |
| (WebCore::CSSStyleSheet::styleSheetScope): |
| |
| Invalidate the right scope after stylesheet mutations. |
| |
| * css/CSSStyleSheet.h: |
| * dom/AuthorStyleSheets.cpp: |
| (WebCore::AuthorStyleSheets::styleResolver): |
| (WebCore::AuthorStyleSheets::styleResolverIfExists): |
| |
| Take care to update the right style resolver. |
| |
| (WebCore::AuthorStyleSheets::forNode): |
| (WebCore::AuthorStyleSheets::removeStyleSheetCandidateNode): |
| |
| Start the update timer so clients don't need to request update separately. |
| |
| (WebCore::AuthorStyleSheets::analyzeStyleSheetChange): |
| (WebCore::AuthorStyleSheets::updateActiveStyleSheets): |
| (WebCore::AuthorStyleSheets::updateStyleResolver): |
| * dom/AuthorStyleSheets.h: |
| * dom/InlineStyleSheetOwner.cpp: |
| (WebCore::InlineStyleSheetOwner::insertedIntoDocument): |
| |
| Save the scope we were inserted into so removals can be done reliably. |
| |
| (WebCore::InlineStyleSheetOwner::removedFromDocument): |
| |
| Use and clear the saved scope. |
| Remove didChangeCandidatesForActiveSet() as it is now done by removeStyleSheetCandidateNode() call. |
| |
| (WebCore::InlineStyleSheetOwner::clearDocumentData): |
| (WebCore::InlineStyleSheetOwner::createSheet): |
| (WebCore::InlineStyleSheetOwner::sheetLoaded): |
| (WebCore::InlineStyleSheetOwner::startLoadingDynamicSheet): |
| (WebCore::authorStyleSheetsForElement): Deleted. |
| * dom/InlineStyleSheetOwner.h: |
| (WebCore::InlineStyleSheetOwner::styleSheetScope): |
| * dom/ShadowRoot.cpp: |
| (WebCore::ShadowRoot::styleResolverIfExists): |
| * dom/ShadowRoot.h: |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::removedFrom): |
| |
| Remove didChangeCandidatesForActiveSet() as it is now done by removeStyleSheetCandidateNode() call. |
| |
| * html/HTMLStyleElement.cpp: |
| (WebCore::HTMLStyleElement::~HTMLStyleElement): |
| (WebCore::HTMLStyleElement::parseAttribute): |
| |
| Fix a bug where we wouldn't create stylesheet if a style element was activated by removing a media attribute. |
| |
| (WebCore::HTMLStyleElement::insertedInto): |
| (WebCore::HTMLStyleElement::removedFrom): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::getMatchedCSSRules): |
| * svg/SVGStyleElement.cpp: |
| (WebCore::SVGStyleElement::~SVGStyleElement): |
| (WebCore::SVGStyleElement::insertedInto): |
| (WebCore::SVGStyleElement::removedFrom): |
| |
| 2016-10-06 Alex Christensen <achristensen@webkit.org> |
| |
| Skip tabs and newlines between end of query and beginning of fragment in non-UTF-8-encoded URLs |
| https://bugs.webkit.org/show_bug.cgi?id=163071 |
| |
| Reviewed by Tim Horton. |
| |
| Covered by a new API test that would have asserted before this change. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::encodeQuery): |
| Skip tabs and newlines before asserting that we are at the end. |
| |
| 2016-10-06 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should parse file URLs with ports consistently |
| https://bugs.webkit.org/show_bug.cgi?id=163075 |
| |
| Reviewed by Brady Eidson. |
| |
| Covered by API tests. We used to assert when parsing the newly tested URLs. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| |
| 2016-10-06 Chris Dumez <cdumez@apple.com> |
| |
| [WebIDL] Add support for having dictionaries in their own IDL file |
| https://bugs.webkit.org/show_bug.cgi?id=162912 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for having dictionaries in their own IDL file so that they |
| can be shared by multiple interfaces. |
| |
| Leverage this new support to merge Element::ScrollToOptions and |
| DOMWindow::ScrollToOptions. |
| |
| No new tests, extended bindings tests. |
| |
| * CMakeLists.txt: |
| * DerivedSources.cpp: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/scripts/CodeGenerator.pm: |
| (ProcessDocument): |
| (IDLFileForInterface): |
| (GetDictionaryByName): |
| (IsDictionaryType): |
| (HasEnumImplementationNameOverride): Deleted. |
| (GetEnumImplementationNameOverride): Deleted. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDictionary): |
| (GetEnumerationClassName): |
| (GenerateEnumerationImplementationContent): |
| (GenerateEnumerationHeaderContent): |
| (GetDictionaryClassName): |
| (GenerateDefaultValue): |
| (GenerateDictionaryHeaderContent): |
| (GenerateDictionariesHeaderContent): |
| (GenerateDictionaryImplementationContent): |
| (GenerateDictionariesImplementationContent): |
| (GenerateHeader): |
| (GenerateImplementation): |
| (GenerateParametersCheck): |
| (GenerateDictionaryHeader): |
| (GenerateDictionaryImplementation): |
| (GenerateCallbackHeader): |
| (GenerateCallbackImplementation): |
| (GetNativeType): |
| (JSValueToNative): |
| (GetNestedClassName): Deleted. |
| (GenerateConversionRuleWithLeadingComma): Deleted. |
| (addIterableProperties): Deleted. |
| * bindings/scripts/preprocess-idls.pl: |
| (containsInterfaceOrExceptionFromIDL): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter): |
| (WebCore::jsTestObjPrototypeFunctionAttachShadowRoot): Deleted. |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: Added. |
| (WebCore::convertDictionary<TestStandaloneDictionary>): |
| * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: Added. |
| * bindings/scripts/test/TestObj.idl: |
| * bindings/scripts/test/TestStandaloneDictionary.idl: Added. |
| * dom/Element.h: |
| * dom/Element.idl: |
| * html/HTMLBodyElement.cpp: |
| (WebCore::HTMLBodyElement::scrollTo): |
| * page/DOMWindow.h: |
| * page/DOMWindow.idl: |
| * page/ScrollToOptions.h: Added. |
| * page/ScrollToOptions.idl: Added. |
| |
| 2016-10-06 Brent Fulgham <bfulgham@apple.com> |
| |
| Unreviewed build fix. |
| |
| * platform/graphics/Image.cpp: Add missing include |
| for 'NotImplemented' when building under Direct2D. |
| |
| 2016-10-06 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Add Direct2D CMake rules |
| https://bugs.webkit.org/show_bug.cgi?id=162925 |
| |
| Reviewed by Brent Fulgham. |
| |
| Modify PlatformAppleWin.cmake to conditionally build the CoreGraphics |
| and CoreAnimation implementation, or the Direct2D files, depending |
| on whether the USE_DIRECT2D macro is set in the CMake build options. |
| By default it builds the normal CA/CG way. |
| |
| Add a stub GraphicsLayer implementation for Direct2D. |
| |
| No new tests because there is no change in our active ports. |
| |
| * PlatformAppleWin.cmake: Conditionalize the build for CA/CG or |
| Direct2D. |
| * config.h: Make sure CA is turned of for Direct2D builds. |
| * page/win/FrameWinDirect2D.cpp: Add missing include file. |
| * platform/graphics/win/GraphicsLayerDirect2D.cpp: Added. |
| * platform/graphics/win/GraphicsLayerDirect2D.h: Added. |
| |
| 2016-10-06 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [WebCore][JSC] Use new @throwTypeError and @throwRangeError intrinsics |
| https://bugs.webkit.org/show_bug.cgi?id=163001 |
| |
| Reviewed by Keith Miller. |
| |
| Replace `throw new @XXXError(...)` to @throwXXXError intrinsic. |
| It reduces the size of bytecode sequence and facilitate inlining. |
| |
| No behavior change. |
| |
| * Modules/fetch/FetchHeaders.js: |
| (initializeFetchHeaders): |
| * Modules/fetch/FetchInternals.js: |
| (fillFetchHeaders): |
| * Modules/fetch/FetchRequest.js: |
| (initializeFetchRequest): |
| * Modules/fetch/FetchResponse.js: |
| (initializeFetchResponse): |
| (clone): |
| * Modules/mediastream/NavigatorUserMedia.js: |
| (webkitGetUserMedia): |
| * Modules/mediastream/RTCPeerConnection.js: |
| (initializeRTCPeerConnection): |
| (getLocalStreams): |
| (getStreamById): |
| (addStream): |
| * Modules/streams/ReadableStream.js: |
| (initializeReadableStream): |
| (getReader): |
| * Modules/streams/ReadableStreamDefaultController.js: |
| (enqueue): |
| (error): |
| (close): |
| * Modules/streams/ReadableStreamDefaultReader.js: |
| (releaseLock): |
| * Modules/streams/ReadableStreamInternals.js: |
| (privateInitializeReadableStreamDefaultReader): |
| (privateInitializeReadableStreamDefaultController): |
| (doStructuredClone): |
| (readableStreamError): |
| * Modules/streams/StreamInternals.js: |
| (validateAndNormalizeQueuingStrategy): |
| (enqueueValueWithSize): |
| * Modules/streams/WritableStream.js: |
| (initializeWritableStream): |
| (state): |
| * xml/XMLHttpRequest.js: |
| (response): |
| |
| 2016-10-06 John Wilander <wilander@apple.com> |
| |
| Update Resource Load Statistics |
| https://bugs.webkit.org/show_bug.cgi?id=162811 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. The counting is based on top privately owned domains |
| which currently is not supported by layout tests nor API tests. |
| |
| * Modules/websockets/WebSocket.cpp: |
| (WebCore::WebSocket::connect): |
| Now captures statistics for web sockets too. |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadResourceSynchronously): |
| * loader/ResourceLoadObserver.cpp: |
| Now captures statistics for synchronous XHR too. |
| (WebCore::is3xxRedirect): |
| Convenience function. |
| (WebCore::ResourceLoadObserver::shouldLog): |
| Convenience function. |
| (WebCore::ResourceLoadObserver::logFrameNavigation): |
| Updated to make use of new convenience functions. |
| (WebCore::ResourceLoadObserver::logSubresourceLoading): |
| Updated to make use of new convenience functions. |
| (WebCore::ResourceLoadObserver::logWebSocketLoading): |
| Added. |
| (WebCore::ResourceLoadObserver::logUserInteraction): |
| Updated to make use of new convenience functions. |
| (WebCore::ResourceLoadObserver::primaryDomain): |
| Now makes use of the Public Suffix list. |
| Removed old custom parsing of primary domain. |
| * loader/ResourceLoadObserver.h: |
| * loader/ResourceLoadStatisticsStore.cpp: |
| (WebCore::ResourceLoadStatisticsStore::prevalentResourceDomainsWithoutUserInteraction): |
| Convenience function. |
| (WebCore::ResourceLoadStatisticsStore::processStatistics): Deleted. |
| * loader/ResourceLoadStatisticsStore.h: |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::willSendRequestInternal): |
| Moved logging call higher up and added a check for whether we |
| are loading the main resource. The reason for moving it up is |
| to capture the request before some data may be cleared out in |
| redirect handling. We also want to capture failed CORS requests |
| since they are sent and then cancelled on the way back. |
| |
| 2016-10-06 Adam Bergkvist <adam.bergkvist@ericsson.com> |
| |
| WebRTC: Add support for the iceconnectionstatechange event in MediaEndpointPeerConnection |
| https://bugs.webkit.org/show_bug.cgi?id=162961 |
| |
| Reviewed by Eric Carlson. |
| |
| Implement MediaEndpointPeerConnection's iceTransportStateChanged callback. When called, it |
| updates the ICE transport state of the corresponding transceiver and determines if the |
| RTCPeerConnection's aggregated iceConnectionState needs to be updated. |
| |
| Update MediaEndpointMock's emulatePlatformEvent feature to support a new action: |
| "step-ice-transport-states". When initiated, this action replays a predefined set of ICE |
| transport state changes on a set of transceivers which can be observed via the |
| iceTransportStateChanged (mentioned above). |
| |
| Test: fast/mediastream/RTCPeerConnection-iceconnectionstatechange-event.html |
| |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| (WebCore::deriveAggregatedIceConnectionState): |
| (WebCore::MediaEndpointPeerConnection::iceTransportStateChanged): |
| * Modules/mediastream/MediaEndpointPeerConnection.h: |
| * platform/mediastream/MediaEndpoint.h: |
| (WebCore::MediaEndpointClient::~MediaEndpointClient): |
| * platform/mock/MockMediaEndpoint.cpp: |
| (WebCore::MockMediaEndpoint::MockMediaEndpoint): |
| (WebCore::MockMediaEndpoint::emulatePlatformEvent): |
| (WebCore::MockMediaEndpoint::stepIceTransportStates): |
| (WebCore::MockMediaEndpoint::iceTransportTimerFired): |
| * platform/mock/MockMediaEndpoint.h: |
| |
| 2016-10-06 Youenn Fablet <youenn@apple.com> |
| |
| CachedResource client handling methods should take reference |
| https://bugs.webkit.org/show_bug.cgi?id=163014 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| |
| * bindings/js/CachedScriptSourceProvider.h: |
| (WebCore::CachedScriptSourceProvider::~CachedScriptSourceProvider): |
| (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider): |
| * css/CSSCrossfadeValue.cpp: |
| (WebCore::CSSCrossfadeValue::~CSSCrossfadeValue): |
| (WebCore::CSSCrossfadeValue::loadSubimages): |
| * css/CSSFilterImageValue.cpp: |
| (WebCore::CSSFilterImageValue::~CSSFilterImageValue): |
| (WebCore::CSSFilterImageValue::loadSubimages): |
| * css/CSSFontFaceSource.cpp: |
| (WebCore::CSSFontFaceSource::CSSFontFaceSource): |
| (WebCore::CSSFontFaceSource::~CSSFontFaceSource): |
| * css/StyleRuleImport.cpp: |
| (WebCore::StyleRuleImport::~StyleRuleImport): |
| (WebCore::StyleRuleImport::requestStyleSheet): |
| * dom/DataTransfer.cpp: |
| (WebCore::DragImageLoader::startLoading): |
| (WebCore::DragImageLoader::stopLoading): |
| * dom/LoadableClassicScript.cpp: |
| (WebCore::LoadableClassicScript::create): |
| (WebCore::LoadableClassicScript::~LoadableClassicScript): |
| * dom/ProcessingInstruction.cpp: |
| (WebCore::ProcessingInstruction::~ProcessingInstruction): |
| (WebCore::ProcessingInstruction::checkStyleSheet): |
| (WebCore::ProcessingInstruction::parseStyleSheet): |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::~HTMLLinkElement): |
| (WebCore::HTMLLinkElement::process): |
| * loader/CrossOriginPreflightChecker.cpp: |
| (WebCore::CrossOriginPreflightChecker::~CrossOriginPreflightChecker): |
| (WebCore::CrossOriginPreflightChecker::startPreflight): |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::detachFromFrame): |
| (WebCore::DocumentLoader::clearMainResource): |
| (WebCore::DocumentLoader::becomeMainResourceClient): |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::~DocumentThreadableLoader): |
| (WebCore::DocumentThreadableLoader::clearResource): |
| (WebCore::DocumentThreadableLoader::loadRequest): |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::~ImageLoader): |
| (WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent): |
| (WebCore::ImageLoader::updateFromElement): |
| (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): |
| * loader/LinkLoader.cpp: |
| (WebCore::LinkLoader::~LinkLoader): |
| (WebCore::LinkLoader::notifyFinished): |
| (WebCore::LinkLoader::loadLink): |
| * loader/LinkPreloadResourceClients.h: |
| (WebCore::LinkPreloadResourceClient::addResource): |
| (WebCore::LinkPreloadResourceClient::clearResource): |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResource::MediaResource): |
| (WebCore::MediaResource::stop): |
| * loader/TextTrackLoader.cpp: |
| (WebCore::TextTrackLoader::~TextTrackLoader): |
| (WebCore::TextTrackLoader::cancelLoad): |
| (WebCore::TextTrackLoader::load): |
| * loader/cache/CachedCSSStyleSheet.cpp: |
| (WebCore::CachedCSSStyleSheet::didAddClient): |
| * loader/cache/CachedCSSStyleSheet.h: |
| * loader/cache/CachedFont.cpp: |
| (WebCore::CachedFont::didAddClient): |
| * loader/cache/CachedFont.h: |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::didAddClient): |
| (WebCore::CachedImage::didRemoveClient): |
| * loader/cache/CachedImage.h: |
| * loader/cache/CachedRawResource.cpp: |
| (WebCore::CachedRawResource::didAddClient): |
| * loader/cache/CachedRawResource.h: |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::addClient): |
| (WebCore::CachedResource::didAddClient): |
| (WebCore::CachedResource::addClientToSet): |
| (WebCore::CachedResource::removeClient): |
| (WebCore::CachedResource::switchClientsToRevalidatedResource): |
| (WebCore::CachedResource::Callback::timerFired): |
| * loader/cache/CachedResource.h: |
| (WebCore::CachedResource::hasClient): |
| (WebCore::CachedResource::didRemoveClient): |
| * loader/cache/CachedSVGDocumentReference.cpp: |
| (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference): |
| (WebCore::CachedSVGDocumentReference::load): |
| * loader/cache/CachedXSLStyleSheet.cpp: |
| (WebCore::CachedXSLStyleSheet::didAddClient): |
| * loader/cache/CachedXSLStyleSheet.h: |
| * loader/cache/MemoryCache.cpp: |
| (WebCore::MemoryCache::addImageToCache): |
| (WebCore::MemoryCache::removeImageFromCache): |
| * loader/icon/IconLoader.cpp: |
| (WebCore::IconLoader::startLoading): |
| (WebCore::IconLoader::stopLoading): |
| * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp: |
| (WebCore::WebCoreAVCFResourceLoader::startLoading): |
| (WebCore::WebCoreAVCFResourceLoader::stopLoading): |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: |
| (WebCore::WebCoreAVFResourceLoader::startLoading): |
| (WebCore::WebCoreAVFResourceLoader::stopLoading): |
| * rendering/RenderImageResource.cpp: |
| (WebCore::RenderImageResource::shutdown): |
| (WebCore::RenderImageResource::setCachedImage): |
| * rendering/RenderLayerFilterInfo.cpp: |
| (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): |
| (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): |
| * rendering/style/StyleCachedImage.cpp: |
| (WebCore::StyleCachedImage::addClient): |
| (WebCore::StyleCachedImage::removeClient): |
| * svg/SVGFEImageElement.cpp: |
| (WebCore::SVGFEImageElement::clearResourceReferences): |
| (WebCore::SVGFEImageElement::requestImageResource): |
| * svg/SVGFontFaceUriElement.cpp: |
| (WebCore::SVGFontFaceUriElement::~SVGFontFaceUriElement): |
| (WebCore::SVGFontFaceUriElement::loadFont): |
| * svg/SVGUseElement.cpp: |
| (WebCore::SVGUseElement::~SVGUseElement): |
| (WebCore::SVGUseElement::updateExternalDocument): |
| * xml/XSLImportRule.cpp: |
| (WebCore::XSLImportRule::~XSLImportRule): |
| (WebCore::XSLImportRule::setXSLStyleSheet): |
| (WebCore::XSLImportRule::loadSheet): |
| * xml/parser/XMLDocumentParser.cpp: |
| (WebCore::XMLDocumentParser::notifyFinished): |
| * xml/parser/XMLDocumentParserLibxml2.cpp: |
| (WebCore::XMLDocumentParser::~XMLDocumentParser): |
| (WebCore::XMLDocumentParser::endElementNs): |
| |
| 2016-10-05 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer][OWR] GL rendering support |
| https://bugs.webkit.org/show_bug.cgi?id=162972 |
| |
| Reviewed by Žan Doberšek. |
| |
| When GStreamer-GL is enabled the GL context needs to be properly passed |
| to the GStreamer pipeline running within the OpenWebRTC video renderer. |
| This is now supported using a new OpenWebRTC API that allows the |
| renderer to request the context from the application using a callback |
| registered within the renderer. |
| |
| The player's GL context/display set-up was refactored to a new |
| method, requestGLContext, which is used as callback for the |
| OpenWebRTC request_context handler. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage): |
| (WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: |
| (WebCore::MediaPlayerPrivateGStreamerBase::gstGLContext): |
| (WebCore::MediaPlayerPrivateGStreamerBase::gstGLDisplay): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerOwr::createVideoSink): |
| |
| 2016-10-06 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] Icon service and the IconButton class |
| https://bugs.webkit.org/show_bug.cgi?id=162970 |
| <rdar://problem/28631803> |
| |
| Reviewed by Dean Jackson. |
| |
| We introduce the new IconButton class to display buttons that show an icon |
| in modern media controls. An IconButton uses a CSS mask-image to display the icon |
| such that we may set the actual button color to any value by setting the element's |
| background-color property. |
| |
| Icons are obtained through the `iconService` singleton which knows how to load the |
| right icon for the current layout traits and resolution. Icons loaded through the |
| icon service are cached. In a later patch, we will be introducing functionality, |
| through the MediaControlsHost, to load the icon from the WebCore bundle. |
| |
| Tests: media/modern-media-controls/icon-button/icon-button-active-state.html |
| media/modern-media-controls/icon-button/icon-button.html |
| media/modern-media-controls/icon-service/icon-service.html |
| |
| * Modules/modern-media-controls/controls/button.css: |
| (button): |
| * Modules/modern-media-controls/controls/icon-button.css: Copied from Source/WebCore/Modules/modern-media-controls/controls/button.css. |
| (button.icon): |
| (button.icon:active): |
| * Modules/modern-media-controls/controls/icon-button.js: Added. |
| (IconButton): |
| (IconButton.prototype.get iconName): |
| (IconButton.prototype.set iconName): |
| (IconButton.prototype.handleEvent): |
| (IconButton.prototype.layout): |
| (IconButton.prototype._imageDidLoad): |
| (IconButton.prototype._updateImage): |
| * Modules/modern-media-controls/controls/icon-service.js: Copied from Source/WebCore/Modules/modern-media-controls/controls/layout-item.js. |
| (const.iconService.new.IconService): |
| (const.iconService.new.IconService.prototype.imageForIconNameAndLayoutTraits): |
| (const.iconService.new.IconService.prototype.urlForIconNameAndLayoutTraits): |
| * Modules/modern-media-controls/controls/layout-item.js: |
| * Modules/modern-media-controls/images/iOS/pause@2x.png: Added. |
| * Modules/modern-media-controls/images/iOS/pause@3x.png: Added. |
| * Modules/modern-media-controls/images/iOS/start@2x.png: Added. |
| * Modules/modern-media-controls/images/iOS/start@3x.png: Added. |
| * Modules/modern-media-controls/images/macOS/pause-fullscreen@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/pause-fullscreen@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/pause@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/pause@2x.png: Added. |
| * Modules/modern-media-controls/images/macOS/start@1x.png: Added. |
| * Modules/modern-media-controls/images/macOS/start@2x.png: Added. |
| |
| 2016-10-06 Miguel Gomez <magomez@igalia.com> |
| |
| [GTK] Fix build with GSTREAMER_GL enabled and ACCELERATED_2D_CANVAS disabled |
| https://bugs.webkit.org/show_bug.cgi?id=163008 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Put functions using cairo-gl behind appropriate guards. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::paintToCairoSurface): Deleted. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: |
| |
| 2016-10-06 Miguel Gomez <magomez@igalia.com> |
| |
| [GTK] Copying video textures to webgl should not depend on cairo-gl |
| https://bugs.webkit.org/show_bug.cgi?id=162904 |
| |
| Reviewed by Žan Doberšek. |
| |
| Perform the texture copy without using cairo-gl. |
| |
| Covered by existent tests. |
| |
| * platform/GStreamer.cmake: |
| Add the new VideoTextureCopierGStreamer class to the build. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture): |
| Use VideoTextureCopierGStreamer to perform the copy. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: |
| Add a VideoTextureCopierGStreamer as a class attribute. |
| * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp: Added. |
| (WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer): |
| (WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer): |
| (WebCore::VideoTextureCopierGStreamer::updateTextureSpaceMatrix): |
| Recalculates the matrix used as the texture coordinates transformation. |
| (WebCore::VideoTextureCopierGStreamer::updateTransformationMatrix): |
| Recalculates the matrices used as the vertices coordinates transformation. |
| (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture): |
| Performs the texture copy by using a shader that applies the rotation needed to follow |
| the video orientation. |
| * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: Added. |
| |
| 2016-10-06 Gwang Yoon Hwang <yoon@igalia.com> |
| |
| [GTK] Build fix for X11 and GStreamerGL after r183731 |
| https://bugs.webkit.org/show_bug.cgi?id=163000 |
| |
| Reviewed by Philippe Normand. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| Include gstgldisplay_egl.h if platform uses EGL. |
| |
| 2016-10-06 Mario Sanchez Prada <mario@endlessm.com> |
| |
| [GStreamer] Can't play any video with GSTREAMER_GL enabled |
| https://bugs.webkit.org/show_bug.cgi?id=162669 |
| |
| Reviewed by Philippe Normand. |
| |
| Make sure an EGLDisplay type is passed when creating the GstGlDisplay |
| for the EGL code path, instead of a native X11 display type, so |
| that we get a valid GstGlDisplay as a result, not a dummy one. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): |
| |
| 2016-10-06 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] Forbid redirection to non-HTTP(s) URL in non-navigation mode. |
| https://bugs.webkit.org/show_bug.cgi?id=162785 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by rebased and existing tests. |
| |
| Ensuring non-HTTP redirection URLs are not followed at DocumentThreadableLoader level for fetch API only. |
| This should be applied to all clients at some point, but there is still some uncertainty for data URLs. |
| |
| Did some refactoring to better separate the case of security checks in case of regular request or redirected request. |
| This allows in particular to handle more clearly the case of data URLs which are allowed in all modes for regular requests. |
| But they are not allowed for same-origin redirected requests. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::reportRedirectionWithBadScheme): Reporting bad scheme redirection error. |
| (WebCore::DocumentThreadableLoader::redirectReceived): Checking that redirection URLs are HTTP(s) in case of Fetch API. |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::willSendRequestInternal): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::requestImage): |
| (WebCore::CachedResourceLoader::checkInsecureContent): |
| (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy): |
| (WebCore::isSameOriginDataURL): |
| (WebCore::CachedResourceLoader::canRequest): |
| (WebCore::CachedResourceLoader::canRequestAfterRedirection): |
| (WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox): |
| (WebCore::CachedResourceLoader::requestResource): |
| * loader/cache/CachedResourceLoader.h: |
| |
| 2016-10-06 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] Use ReadableStream pull to transfer binary data to stream when application needs it |
| https://bugs.webkit.org/show_bug.cgi?id=162892 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by existing tests. |
| |
| Before this patch, FetchResponse was never resolving the start promise. |
| This way, it could enqueue data, error or close the stream whenever desired. |
| |
| With this patch, FetchResponse will feed the stream when being asked to. |
| This allows keeping the data in WebCore until the application needs it. |
| This is only implemented for network data. |
| For other data owned by response (blob, text...), data will be enqueued like previously as fast as possible. |
| |
| Note that FetchResponse can enqueue/error/close the stream at any time since JSFetchResponse has a reference to the stream. |
| And the stream has a reference to the controller. |
| |
| In addition to transfer binary chunks to ReadableStream only when needed, WebCore is now aware of the data |
| stored in the response, which may allow applying backpressure to the network source in the future. |
| |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::BodyLoader::didSucceed): |
| (WebCore::FetchResponse::BodyLoader::didReceiveData): Enqueuing only if stream is pulling. |
| Otherwise, storing in FetchBodyConsumer. If stream is pulling, we enqueue both buffered data and received chunk. |
| (WebCore::FetchResponse::consumeBodyAsStream): Resolving pull promise if we enqueued some buffered data. |
| (WebCore::FetchResponse::closeStream): |
| (WebCore::FetchResponse::feedStream): If we have some buffered data, we enqueue it. If there is no loader, the stream can be closed. |
| * Modules/fetch/FetchResponse.h: |
| * Modules/fetch/FetchResponseSource.cpp: |
| (WebCore::FetchResponseSource::doPull): |
| (WebCore::FetchResponseSource::close): |
| (WebCore::FetchResponseSource::error): |
| * Modules/fetch/FetchResponseSource.h: |
| * Modules/streams/ReadableStreamSource.h: |
| (WebCore::ReadableStreamSource::isPulling): Renamed from isStarting. |
| (WebCore::ReadableStreamSource::isStarting): Deleted. |
| |
| 2016-10-06 Adam Bergkvist <adam.bergkvist@ericsson.com> |
| |
| WebRTC: Add support for the icecandidate event in MediaEndpointPeerConnection |
| https://bugs.webkit.org/show_bug.cgi?id=162957 |
| |
| Reviewed by Eric Carlson. |
| |
| Implement MediaEndpointPeerConnection's gotIceCandidate and doneGatheringCandidates |
| callbacks. These are used by the MediaEndpoint (WebRTC backend implementation) to |
| notify about ICE events. |
| |
| Add API to Internals to emulate WebRTC platform events, such as dispatching a set of ICE |
| candidates followed by a gathering done indication. Initially, only a single action, |
| "dispatch-fake-ice-candidates", is supported, but the intention is to extend the set of |
| actions to support more test cases. |
| |
| Test: fast/mediastream/RTCPeerConnection-icecandidate-event.html |
| |
| * Modules/mediastream/MediaEndpointPeerConnection.cpp: |
| (WebCore::MediaEndpointPeerConnection::emulatePlatformEvent): |
| (WebCore::MediaEndpointPeerConnection::gotIceCandidate): |
| (WebCore::MediaEndpointPeerConnection::doneGatheringCandidates): |
| * Modules/mediastream/MediaEndpointPeerConnection.h: |
| * Modules/mediastream/PeerConnectionBackend.h: |
| * Modules/mediastream/RTCIceTransport.h: Added. |
| RTCIceCandidate will eventually be part of the JS API, but right now it's |
| only used to keep track of the ICE states related to a RTCRtpTranscevier. |
| (WebCore::RTCIceTransport::create): |
| (WebCore::RTCIceTransport::~RTCIceTransport): |
| (WebCore::RTCIceTransport::transportState): |
| (WebCore::RTCIceTransport::setTransportState): |
| (WebCore::RTCIceTransport::gatheringState): |
| (WebCore::RTCIceTransport::setGatheringState): |
| (WebCore::RTCIceTransport::RTCIceTransport): |
| * Modules/mediastream/RTCPeerConnection.cpp: |
| (WebCore::RTCPeerConnection::emulatePlatformEvent): |
| * Modules/mediastream/RTCPeerConnection.h: |
| * Modules/mediastream/RTCRtpTransceiver.cpp: |
| (WebCore::RTCRtpTransceiver::RTCRtpTransceiver): |
| * Modules/mediastream/RTCRtpTransceiver.h: |
| (WebCore::RTCRtpTransceiver::iceTransport): |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/mediastream/MediaEndpoint.h: |
| (WebCore::MediaEndpoint::emulatePlatformEvent): |
| * platform/mediastream/PeerConnectionStates.h: |
| * platform/mock/MockMediaEndpoint.cpp: |
| (WebCore::MockMediaEndpoint::MockMediaEndpoint): |
| (WebCore::MockMediaEndpoint::updateReceiveConfiguration): |
| (WebCore::MockMediaEndpoint::emulatePlatformEvent): |
| (WebCore::MockMediaEndpoint::dispatchFakeIceCandidates): |
| (WebCore::MockMediaEndpoint::iceCandidateTimerFired): |
| * platform/mock/MockMediaEndpoint.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::emulateRTCPeerConnectionPlatformEvent): |
| Generic API to signal down to the WebRTC platform mock. |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2016-10-06 Nan Wang <n_wang@apple.com> |
| |
| AX:[Mac] Unable to edit text input, textarea fields in iframe using VO naivgation |
| https://bugs.webkit.org/show_bug.cgi?id=162999 |
| |
| Reviewed by Chris Fleizach. |
| |
| In WebKit1, the top web area setting the selection to an input element inside an iframe |
| will make the input field not editable. The issue is that when the web area and the input element |
| have different documents, the setSelection function in FrameSelection will set the selection on |
| the input's frame and cause the caret to disappear. I fixed it by not setting the selection in such case. |
| |
| Test: accessibility/mac/wk1-set-selected-text-marker-range-input-element.html |
| |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange): |
| |
| 2016-10-05 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r206845. |
| https://bugs.webkit.org/show_bug.cgi?id=162998 |
| |
| broke el capitan build (Requested by alexchristensen on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "Add Display P3 ColorSpace" |
| https://bugs.webkit.org/show_bug.cgi?id=162880 |
| http://trac.webkit.org/changeset/206845 |
| |
| 2016-10-05 Youenn Fablet <youenn@apple.com> |
| |
| Reuse CodeGenerator::UpdateFile in Tools CodeGenerator |
| https://bugs.webkit.org/show_bug.cgi?id=162960 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| |
| * bindings/scripts/CodeGenerator.pm: |
| (UpdateFile): Adding FIXME to enable lazy writing when feasible. |
| |
| 2016-10-05 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [SOUP] HostTLSCertificateSet should not use SHA-1 hashes to compare certificates |
| https://bugs.webkit.org/show_bug.cgi?id=162965 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Use SHA-256 instead. |
| |
| No new tests, covered by TestSSL. |
| |
| * platform/network/soup/SoupNetworkSession.cpp: |
| (WebCore::HostTLSCertificateSet::computeCertificateHash): |
| |
| 2016-10-05 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Bump Chrome version in Chrome user agent quirk |
| https://bugs.webkit.org/show_bug.cgi?id=162984 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::buildUserAgentString): |
| |
| 2016-10-05 Dean Jackson <dino@apple.com> |
| |
| Add Display P3 ColorSpace |
| https://bugs.webkit.org/show_bug.cgi?id=162880 |
| <rdar://problem/28598564> |
| |
| Reviewed by Sam Weinig. |
| |
| Add a new ColorSpace for Display P3. |
| |
| This will be tested once the Color class can create |
| objects that reference other color spaces. |
| |
| * platform/graphics/ColorSpace.h: |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| (WebCore::displayP3ColorSpaceRef): |
| * platform/graphics/cg/GraphicsContextCG.h: |
| (WebCore::cachedCGColorSpace): |
| |
| 2016-10-05 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Introduce InputEvent bindings in preparation for the input events spec |
| https://bugs.webkit.org/show_bug.cgi?id=162954 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Creates new bindings for InputEvent. Also introduces a runtime switch that allows Node to dispatch InputEvents |
| rather than generic events of type 'input'. Adds a new test verifying that when the switch is enabled, inputs |
| and contenteditable divs fire these new InputEvents on input. So far, only inputType is a part of the object |
| prototype, since we will be implementing this first. getTargetRanges() will follow once the finer details of |
| StaticRange are hashed out. See https://bugs.webkit.org/show_bug.cgi?id=162947 for more details. |
| |
| Tests: fast/events/input-events-fired-when-typing.html |
| fast/events/ios/input-events-fired-when-typing-in-contenteditable.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.cpp: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/DOMAllInOne.cpp: |
| * dom/Event.cpp: |
| (WebCore::Event::composed): |
| (WebCore::Event::isInputEvent): |
| * dom/Event.h: |
| * dom/EventNames.in: |
| * dom/InputEvent.cpp: Added. |
| (WebCore::InputEvent::InputEvent): |
| * dom/InputEvent.h: Added. |
| * dom/InputEvent.idl: Added. |
| * dom/Node.cpp: |
| (WebCore::Node::dispatchInputEvent): |
| (WebCore::Node::defaultEventHandler): |
| * dom/Node.h: |
| * editing/Editor.cpp: |
| (WebCore::Editor::setBaseWritingDirection): |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent): |
| * html/HTMLInputElement.cpp: |
| (WebCore::HTMLInputElement::setEditingValue): |
| (WebCore::HTMLInputElement::setValueFromRenderer): |
| * html/HTMLSelectElement.cpp: |
| (WebCore::HTMLSelectElement::listBoxOnChange): |
| (WebCore::HTMLSelectElement::dispatchChangeEventForMenuList): |
| * html/shadow/MediaControlElements.cpp: |
| (WebCore::MediaControlTimelineElement::defaultEventHandler): |
| * page/Settings.in: |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::Backup::Backup): |
| (WebCore::InternalSettings::Backup::restoreTo): |
| * testing/InternalSettings.h: |
| * testing/InternalSettings.idl: |
| |
| 2016-10-05 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should parse IPv4 addresses as the last two pieces of an IPv6 address |
| https://bugs.webkit.org/show_bug.cgi?id=162991 |
| |
| Reviewed by Saam Barati. |
| |
| The last 32 bits of an IPv6 address can be written in the form of an IPv4 address, |
| but the syntax is stricter than if it were just an IPv4 address. There must be 4 pieces, |
| and each piece must be decimal (no octal or hex allowed). These should serialize to |
| regular hex IPv6 addresses. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseIPv4Piece): |
| (WebCore::URLParser::parseIPv4Host): |
| (WebCore::URLParser::parseIPv4PieceInsideIPv6): |
| (WebCore::URLParser::parseIPv4AddressInsideIPv6): |
| (WebCore::URLParser::parseIPv6Host): |
| (WebCore::URLParser::parseIPv4Number): Deleted. |
| * platform/URLParser.h: |
| |
| 2016-10-05 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Put variation fonts work behind a compile-time flag |
| https://bugs.webkit.org/show_bug.cgi?id=162949 |
| |
| Reviewed by Simon Fraser. |
| |
| No new tests because there is no behavior change. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSFontVariationValue.cpp: |
| * css/CSSFontVariationValue.h: |
| * css/CSSPropertyNames.in: |
| * css/CSSValue.cpp: |
| (WebCore::CSSValue::equals): |
| (WebCore::CSSValue::cssText): |
| (WebCore::CSSValue::destroy): |
| * css/CSSValue.h: |
| (WebCore::CSSValue::isFontFeatureValue): Deleted. |
| (WebCore::CSSValue::isFontVariationValue): Deleted. |
| * css/StyleBuilderConverter.h: |
| (WebCore::StyleBuilderConverter::convertFontVariationSettings): Deleted. |
| * css/StyleBuilderCustom.h: |
| (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings): Deleted. |
| (WebCore::StyleBuilderCustom::applyInheritFontVariationSettings): Deleted. |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParserContext::CSSParserContext): |
| (WebCore::operator==): |
| (WebCore::CSSParser::parseValue): |
| (WebCore::CSSParser::parseFontVariationSettings): Deleted. |
| * css/parser/CSSParserMode.h: |
| * page/Settings.in: |
| * page/animation/CSSPropertyAnimation.cpp: |
| (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): |
| (WebCore::blendFunc): Deleted. |
| * platform/graphics/FontCache.h: |
| (WebCore::FontDescriptionKey::FontDescriptionKey): |
| (WebCore::FontDescriptionKey::operator==): |
| (WebCore::FontDescriptionKey::computeHash): |
| * platform/graphics/FontDescription.cpp: |
| * platform/graphics/FontDescription.h: |
| (WebCore::FontDescription::operator==): |
| (WebCore::FontDescription::setFeatureSettings): Deleted. |
| (WebCore::FontDescription::setVariationSettings): Deleted. |
| * platform/graphics/FontTaggedSettings.cpp: |
| (WebCore::operator<<): Deleted. |
| * platform/graphics/FontTaggedSettings.h: |
| (WebCore::FontVariationSettings::isEmpty): |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::preparePlatformFont): |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::cascadeToLastResortAndVariationsFontDescriptor): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::setFontVariationSettings): Deleted. |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::fontVariationSettings): Deleted. |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::Backup::Backup): |
| (WebCore::InternalSettings::Backup::restoreTo): |
| (WebCore::InternalSettings::variationFontsEnabled): |
| (WebCore::InternalSettings::setVariationFontsEnabled): |
| * testing/InternalSettings.h: |
| |
| 2016-10-05 Brent Fulgham <bfulgham@apple.com> |
| |
| Unreviewed build fix after r206830 |
| |
| * platform/graphics/win/FontPlatformDataWin.cpp: Add missing include |
| when building with Direct2D. |
| |
| 2016-10-05 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Disable some CoreGraphics and CoreAnimation-based logic when building for D2D |
| https://bugs.webkit.org/show_bug.cgi?id=162977 |
| |
| Reviewed by Alex Christensen. |
| |
| Currently the Direct2D implementation does not support some of the accelerated compositing |
| features that require CoreAnimation. During this bring-up, we want to disable these routines |
| so that we can build and run in (mostly) unaccelerated drawing. |
| |
| This patch mostly consists of adding "#if USE(CG)" and "#if USE(CA)" to files that are |
| specific to those implementations. |
| |
| This change should have no impact on non-Direct2D ports. |
| |
| No change in behavior for active ports. |
| |
| * config.h: Turn of CG when building in Direct2D. |
| * css/CSSFontFaceSource.cpp: |
| * loader/cache/CachedFont.cpp: |
| * loader/cache/CachedSVGFont.cpp: |
| * page/CaptionUserPreferencesMediaAF.cpp: |
| * page/win/FrameCGWin.cpp: |
| * page/win/FrameDirect2D.cpp: Added. |
| * platform/graphics/Font.cpp: |
| * platform/graphics/FontCache.cpp: |
| * platform/graphics/FontPlatformData.cpp: |
| * platform/graphics/GraphicsContext.h: |
| * platform/graphics/Image.cpp: |
| * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: |
| * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| * platform/graphics/ca/PlatformCALayer.cpp: |
| * platform/graphics/ca/TileController.cpp: |
| * platform/graphics/ca/TileGrid.cpp: |
| * platform/graphics/ca/TileGrid.h: |
| * platform/graphics/ca/win/CACFLayerTreeHost.cpp: |
| * platform/graphics/ca/win/LayerChangesFlusher.cpp: |
| * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: |
| * platform/graphics/ca/win/PlatformCAAnimationWin.h: |
| * platform/graphics/ca/win/PlatformCAFiltersWin.cpp: |
| * platform/graphics/ca/win/PlatformCALayerWin.cpp: |
| * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: |
| * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: |
| * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp: |
| * platform/graphics/cg/GradientCG.cpp: |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| * platform/graphics/cg/ImageBufferCG.cpp: |
| * platform/graphics/cg/ImageBufferDataCG.cpp: |
| * platform/graphics/cg/PDFDocumentImage.cpp: |
| * platform/graphics/cg/PatternCG.cpp: |
| * platform/graphics/cg/SubimageCacheWithTimer.cpp: |
| * platform/graphics/win/FontCGWin.cpp: |
| * platform/graphics/win/FontPlatformDataCGWin.cpp: |
| * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp: |
| * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp: |
| * platform/graphics/win/GradientDirect2D.cpp: |
| * platform/graphics/win/PathDirect2D.cpp: Fix a few build problems I didn't notice |
| while building without Direct2D active. |
| * platform/graphics/win/SimpleFontDataCGWin.cpp: |
| * platform/graphics/win/SimpleFontDataWin.cpp: |
| * platform/win/DragImageCGWin.cpp: |
| * platform/win/DragImageDirect2D.cpp: Added. |
| * rendering/RenderMediaControls.cpp: |
| |
| 2016-10-05 Chris Dumez <cdumez@apple.com> |
| |
| KeyboardEvent.getModifierState() should support "CapsLock" modifier |
| https://bugs.webkit.org/show_bug.cgi?id=162861 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for "CapsLock" modifier on Mac / iOS for KeyboardEvent's |
| getModifierState() API, as per: |
| - https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate |
| |
| No new tests, updated existing test. |
| |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::KeyboardEvent): |
| (WebCore::KeyboardEvent::getModifierState): |
| * dom/KeyboardEvent.h: |
| * platform/PlatformEvent.h: |
| * platform/ios/PlatformEventFactoryIOS.mm: |
| (WebCore::modifiersForEvent): |
| * platform/mac/PlatformEventFactoryMac.mm: |
| (WebCore::keyIdentifierForKeyEvent): |
| |
| 2016-10-05 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Improve OS X UA quirk |
| https://bugs.webkit.org/show_bug.cgi?id=162613 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Include OS X version number in user agent, like Safari does. |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::buildUserAgentString): |
| |
| 2016-10-05 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Improve comment in platformVersionForUAString |
| https://bugs.webkit.org/show_bug.cgi?id=162612 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::platformVersionForUAString): |
| |
| 2016-10-05 Zalan Bujtas <zalan@apple.com> |
| |
| Missing quotation mark when <q> gets reparented. |
| https://bugs.webkit.org/show_bug.cgi?id=162940 |
| |
| Reviewed by Darin Adler. |
| |
| When an opening RenderQuote gets removed due to some change in the render tree, |
| we notify the closing RenderQuote so that it can update its content (") accordingly (and vice versa). |
| However when the same RenderQuote is added back to the render tree (aka reparenting), we fail to |
| let the other RenderQuote know about it and its content becomes stale. |
| This patch ensures that when either the opening or closing part of the quotation mark gets reparented, |
| we inform the other, corresponding opening/closing renderer about it. |
| |
| Test: fast/css-generated-content/missing-quotes-with-dynamic-content.html |
| |
| * dom/PseudoElement.cpp: |
| (WebCore::PseudoElement::didAttachRenderers): |
| * rendering/RenderQuote.cpp: |
| (WebCore::RenderQuote::insertedIntoTree): |
| * rendering/RenderQuote.h: |
| |
| 2016-10-05 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should correctly strip unnecessary 0's in IPv6 addresses |
| https://bugs.webkit.org/show_bug.cgi?id=162979 |
| |
| Reviewed by Brady Eidson. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseIPv6Host): |
| Strip leading 0's and any 0's before the last 0 if the value is 0. |
| |
| 2016-10-05 Alex Christensen <achristensen@webkit.org> |
| |
| UTF-8 encode queries of nonspecial and websocket schemes |
| https://bugs.webkit.org/show_bug.cgi?id=162956 |
| |
| Reviewed by Geoffrey Garen and Brady Eidson. |
| |
| The URL spec says in the query state: |
| 'If url is not special or url's scheme is either "ws" or "wss", set encoding to UTF-8.' |
| This should be determined as soon as we are done parsing the scheme. |
| |
| Covered by new API tests. |
| This also fixes tests like fast/loader/javascript-url-encoding-2.html when URLParser is enabled. |
| |
| * platform/URLParser.cpp: |
| (WebCore::isValidSchemeCharacter): |
| Renamed Scheme to ValidScheme so I can use Scheme as the name of an enum class in the same namespace. |
| (WebCore::isSpecial): |
| (WebCore::scheme): |
| Separate functionality so we can have different behavior for different sets of |
| ws and wss schemes, special, and non-special schemes. |
| (WebCore::URLParser::copyURLPartsUntil): |
| (WebCore::URLParser::parse): |
| Set isUTF8Encoding to true when we finish parsing the scheme if the scheme is ws, wss, or non-special, |
| according to spec. This also matches existing behavior. This way we will already know whether to go |
| into UTF8Query or NonUTF8Query state when we see a '?'. |
| (WebCore::isSpecialScheme): Deleted. |
| |
| 2016-10-05 Alex Christensen <achristensen@webkit.org> |
| |
| Prepare to enable URLParser |
| https://bugs.webkit.org/show_bug.cgi?id=162974 |
| |
| Reviewed by Brady Eidson. |
| |
| * platform/URL.cpp: |
| (WebCore::URL::serialize): |
| When we enable the URLParser, this attempt to make serialized URLs more spec compliant |
| won't be needed any more. |
| |
| 2016-10-05 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Add initial D2D Path and Gradient implementation |
| https://bugs.webkit.org/show_bug.cgi?id=162923 |
| |
| Reviewed by Alex Christensen. |
| |
| This patch lands a set of new files that implements initial Path |
| and Gradient features on Windows using Direct2D. |
| |
| No new tests until complete backend lands. |
| |
| * platform/graphics/Gradient.h: |
| * platform/graphics/Path.cpp: |
| * platform/graphics/Path.h: |
| * platform/graphics/win/GradientDirect2D.cpp: Added. |
| * platform/graphics/win/PathDirect2D.cpp: Added. |
| |
| 2016-10-05 Romain Bellessort <romain.bellessort@crf.canon.fr> |
| |
| [Readable Streams API] Align function names with spec |
| https://bugs.webkit.org/show_bug.cgi?id=162967 |
| |
| Reviewed by Darin Adler. |
| |
| Align function names with spec. Behaviour was already in line with spec, but previous function names had |
| sometimes been preserved to track the changes more easily. This led to some inconsistencies (for instance, |
| enqueueInReadableStream was still used even though it works on a controller instead of a stream) and it |
| also made it more difficult to compare spec and implementation. |
| |
| No change in behaviour. |
| |
| * Modules/fetch/FetchInternals.js: |
| (consumeStream): Updated with new function names. |
| * Modules/fetch/FetchResponse.js: |
| (clone): Updated with new function names. |
| * Modules/streams/ReadableStream.js: |
| (tee): Updated with new function names. |
| * Modules/streams/ReadableStreamDefaultController.js: |
| (enqueue): Updated with new function names. |
| (error): Updated with new function names. |
| * Modules/streams/ReadableStreamDefaultReader.js: |
| (read): Updated with new function names. |
| * Modules/streams/ReadableStreamInternals.js: |
| (privateInitializeReadableStreamDefaultController): Updated with new function names. |
| (readableStreamDefaultControllerError): Updated with new function names. |
| (readableStreamTee): Updated with new function names. |
| (readableStreamTeePullFunction): Updated with new function names. |
| (readableStreamTeeBranch2CancelFunction): Updated with new function names. |
| (readableStreamError): Updated with new function names. |
| (readableStreamCancel): Updated with new function names. |
| (readableStreamDefaultControllerPull): Updated with new function names. |
| (readableStreamDefaultControllerClose): Updated with new function names. |
| (readableStreamClose): Updated with new function names. |
| (readableStreamDefaultControllerEnqueue): Updated with new function names. |
| (readableStreamDefaultReaderRead): Updated with new function names. |
| |
| 2016-10-05 Chris Dumez <cdumez@apple.com> |
| |
| [Bindings] Declare dictionary / enumeration template specializations in the header |
| https://bugs.webkit.org/show_bug.cgi?id=162929 |
| |
| Reviewed by Darin Adler. |
| |
| Declare dictionary / enumeration template specializations in the header |
| so that: |
| - They can be used from custom bindings code. |
| - Dictionaries / enumerations can be used to their own IDL files to |
| share them (Bug 162912). |
| |
| No new tests, rebaselined bindings tests. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/generic/IDLTypes.h: |
| * bindings/js/JSDOMConvert.h: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateInterface): |
| (GenerateEnumerationImplementationContent): |
| (GenerateEnumerationHeaderContent): |
| (GenerateDictionaryHeaderContent): |
| (GenerateHeader): |
| (GenerateCallbackHeader): |
| (GenerateCallbackImplementation): |
| (GenerateDefaultValue): Deleted. |
| (GenerateDictionaryImplementationContent): Deleted. |
| (GenerateParametersCheck): Deleted. |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestObj.h: |
| |
| 2016-10-05 Zan Dobersek <zdobersek@igalia.com> |
| |
| Rename ENABLE_ENCRYPTED_MEDIA_V2 to ENABLE_LEGACY_ENCRYPTED_MEDIA |
| https://bugs.webkit.org/show_bug.cgi?id=162903 |
| |
| Reviewed by Alex Christensen. |
| |
| Rename build guards for the remaining implementation of the legacy EME API |
| to ENABLE_LEGACY_ENCRYPTED_MEDIA. This will allow for the future implementation |
| of the near-finished API to be guarded with the simple ENABLE_ENCRYPTED_MEDIA guards. |
| |
| No new tests -- no change in behavior. |
| |
| * CMakeLists.txt: |
| * Configurations/FeatureDefines.xcconfig: |
| * DerivedSources.cpp: |
| * DerivedSources.make: |
| * Modules/encryptedmedia/CDM.cpp: |
| * Modules/encryptedmedia/CDM.h: |
| * Modules/encryptedmedia/CDMPrivate.h: |
| * Modules/encryptedmedia/CDMPrivateClearKey.cpp: |
| * Modules/encryptedmedia/CDMPrivateClearKey.h: |
| * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: |
| * Modules/encryptedmedia/CDMPrivateMediaPlayer.h: |
| * Modules/encryptedmedia/CDMSessionClearKey.cpp: |
| * Modules/encryptedmedia/CDMSessionClearKey.h: |
| * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: |
| * Modules/encryptedmedia/MediaKeyMessageEvent.h: |
| * Modules/encryptedmedia/MediaKeyMessageEvent.idl: |
| * Modules/encryptedmedia/MediaKeyNeededEvent.cpp: |
| * Modules/encryptedmedia/MediaKeyNeededEvent.h: |
| * Modules/encryptedmedia/MediaKeyNeededEvent.idl: |
| * Modules/encryptedmedia/MediaKeySession.cpp: |
| * Modules/encryptedmedia/MediaKeySession.h: |
| * Modules/encryptedmedia/MediaKeySession.idl: |
| * Modules/encryptedmedia/MediaKeys.cpp: |
| * Modules/encryptedmedia/MediaKeys.h: |
| * Modules/encryptedmedia/MediaKeys.idl: |
| * bindings/js/JSDictionary.cpp: |
| * bindings/js/JSDictionary.h: |
| * dom/Element.idl: |
| * dom/EventNames.in: |
| * dom/EventTargetFactory.in: |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::~HTMLMediaElement): |
| (WebCore::HTMLMediaElement::webkitGenerateKeyRequest): |
| (WebCore::HTMLMediaElement::webkitAddKey): |
| * html/HTMLMediaElement.h: |
| * html/HTMLMediaElement.idl: |
| * html/MediaError.h: |
| * html/MediaError.idl: |
| * html/MediaKeyError.h: |
| * html/MediaKeyError.idl: |
| * page/Settings.h: |
| * platform/graphics/CDMSession.h: |
| * platform/graphics/MediaPlayer.cpp: |
| * platform/graphics/MediaPlayer.h: |
| * platform/graphics/MediaPlayerPrivate.h: |
| * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h: |
| * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: |
| * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: |
| * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: |
| * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp: |
| * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: |
| * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: |
| (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem): |
| (WebCore::AVFWrapper::shouldWaitForLoadingOfResource): |
| * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: |
| * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h: |
| * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: |
| * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: |
| * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm: |
| * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h: |
| * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: |
| * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: |
| * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem): |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): |
| (WebCore::playerKVOProperties): |
| (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: |
| * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID): |
| (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): |
| * testing/Internals.cpp: |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| * testing/MockCDM.cpp: |
| * testing/MockCDM.h: |
| |
| 2016-10-05 Daniel Bates <dabates@apple.com> |
| |
| Do not follow redirects when sending violation report |
| https://bugs.webkit.org/show_bug.cgi?id=162520 |
| <rdar://problem/27957639> |
| |
| Reviewed by Alex Christensen. |
| |
| Do not follow redirects when sending a Content Security Policy or XSS Auditor violation report |
| as redirects can be used to forward report details to a third-party. |
| |
| This changes makes WebKit more closely conform to the reporting requirements in section Reporting |
| of the Content Security Level 2 standard: <https://w3c.github.io/webappsec-csp/2/#violation-reports> |
| (Editor's Draft, 25 April 2016). |
| |
| Tests: http/tests/security/contentSecurityPolicy/report-blocked-uri-and-do-not-follow-redirect-when-sending-report.php |
| http/tests/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report.html |
| http/tests/security/xssAuditor/report-script-tag-full-block-and-do-not-follow-redirect-when-sending-report.html |
| |
| * loader/LoaderStrategy.h: Modified createPingHandle() to take a boolean, shouldFollowRedirects, |
| whether to follow redirect responses for a ping request. |
| * loader/PingLoader.cpp: |
| (WebCore::PingLoader::loadImage): Pass ShouldFollowRedirects::Yes to PingLoader::startPingLoad to |
| keep our current behavior. |
| (WebCore::PingLoader::sendPing): Ditto. Note our current behavior of following redirects matches |
| the behavior described in the section "Hyperlink auditing" of the HTML standard: |
| <https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing> (23 September 2016). |
| (WebCore::PingLoader::sendViolationReport): Pass ShouldFollowRedirects::No to PingLoader::startPingLoad |
| so that we do not follow redirects when sending a violation report. |
| (WebCore::PingLoader::startPingLoad): Modified to take argument shouldFollowRedirects whether to |
| follow redirect responses for a ping request. |
| * loader/PingLoader.h: |
| * platform/network/PingHandle.h: Add boolean m_shouldFollowRedirects. I grouped this boolean with |
| the existing boolean, m_shouldUseCredentialStorage, as opposed to appending to the end of the class |
| definition to avoid increasing object size as clang will coalesces the two bools into a single |
| machine word. Override ResourceHandleClient::willSendRequest() and ResourceHandleClient::willSendRequestAsync() |
| to follow a redirect, if applicable. |
| |
| 2016-10-05 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] Move global TLS errors handling from ResourceHandle to SoupNetworkSession |
| https://bugs.webkit.org/show_bug.cgi?id=162910 |
| |
| Reviewed by Alex Christensen. |
| |
| So that it will be shared with network session code. Also remove setHostAllowsAnyHTTPSCertificate() that we have |
| never actually used. |
| |
| * platform/network/ResourceHandle.h: |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::tlsErrorsChangedCallback): Use SoupNetworkSession::checkTLSErrors(). |
| * platform/network/soup/SoupNetworkSession.cpp: |
| (WebCore::HostTLSCertificateSet::add): |
| (WebCore::HostTLSCertificateSet::contains): |
| (WebCore::HostTLSCertificateSet::computeCertificateHash): |
| (WebCore::clientCertificates): |
| (WebCore::SoupNetworkSession::setShouldIgnoreTLSErrors): |
| (WebCore::SoupNetworkSession::checkTLSErrors): |
| (WebCore::SoupNetworkSession::allowSpecificHTTPSCertificateForHost): |
| * platform/network/soup/SoupNetworkSession.h: |
| |
| 2016-10-05 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] Move request HTTP body handling to ResourceRequestSoup and simplify it |
| https://bugs.webkit.org/show_bug.cgi?id=162891 |
| |
| Reviewed by Michael Catanzaro. |
| |
| We are currently adding the HTTP body to the message in ResourceHandleSoup, but we could do it as part of the |
| ResourceRequest::updateSoupMessage() method, since the HTTP body is indeed part of the request. The code can be |
| also simplified, especially the handling of files, by using SharedBuffer that already mmaps the file when |
| possible, instead of using GMappedFile API. |
| |
| * platform/SharedBuffer.h: Add createSoupBuffer() method. |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::createSoupMessageForHandleAndRequest): |
| (WebCore::milisecondsSinceRequest): Deleted. |
| (WebCore::ResourceHandle::didStartRequest): Deleted. |
| (WebCore::startingCallback): Deleted. |
| (WebCore::networkEventCallback): Deleted. |
| (WebCore::ResourceHandle::start): Deleted. |
| (WebCore::ResourceHandle::releaseForDownload): Deleted. |
| (WebCore::ResourceHandle::timeoutFired): Deleted. |
| * platform/network/soup/ResourceRequest.h: |
| * platform/network/soup/ResourceRequestSoup.cpp: |
| (WebCore::appendEncodedBlobItemToSoupMessageBody): Helper method to append the blob to the request message body. |
| (WebCore::ResourceRequest::updateSoupMessageBody): Add HTTPBody to the request message body. |
| (WebCore::ResourceRequest::updateSoupMessage): Call updateSoupMessageBody() to also update the body. |
| * platform/soup/SharedBufferSoup.cpp: |
| (WebCore::SharedBuffer::createSoupBuffer): Returns a new SoupBuffer for the SharedBuffer. |
| |
| 2016-10-04 Chris Dumez <cdumez@apple.com> |
| |
| Implement KeyboardEvent.code from the UI Event spec |
| https://bugs.webkit.org/show_bug.cgi?id=149584 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for Keyboard.code attribute: |
| - https://w3c.github.io/uievents/#dom-keyboardevent-code |
| - https://w3c.github.io/uievents-code/ |
| |
| The feature is only enabled on Mac for now as the implementation is |
| platform-specific and Mac only. |
| |
| Test: fast/events/keyboardevent-code.html |
| |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::KeyboardEvent): |
| * dom/KeyboardEvent.h: |
| * dom/KeyboardEvent.idl: |
| * platform/PlatformKeyboardEvent.h: |
| (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): |
| (WebCore::PlatformKeyboardEvent::code): |
| (WebCore::PlatformKeyboardEvent::unmodifiedText): Deleted. |
| * platform/mac/PlatformEventFactoryMac.h: |
| * platform/mac/PlatformEventFactoryMac.mm: |
| (WebCore::codeForKeyEvent): |
| (WebCore::keyIdentifierForKeyEvent): |
| * replay/SerializationMethods.cpp: |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue): |
| |
| 2016-10-04 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| The dragged image should be the current frame only of the animated image |
| https://bugs.webkit.org/show_bug.cgi?id=162109 |
| |
| Reviewed by Tim Horton. |
| |
| Instead of creating an NSImage with all the frames for the dragImage, |
| create an NSImage with the current frame only. |
| |
| * dom/DataTransferMac.mm: |
| (WebCore::DataTransfer::createDragImage): Call snapshotNSImage() to create the dragImage. |
| * editing/cocoa/HTMLConverter.mm: |
| (fileWrapperForElement): Call the Image function with its new name. |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/Image.h: |
| (WebCore::Image::nsImage): Rename getNSImage() to nsImage(). |
| (WebCore::Image::snapshotNSImage): Returns the NSImage of the current frame. |
| (WebCore::Image::tiffRepresentation): Rename getTIFFRepresentation() to tiffRepresentation(). |
| (WebCore::Image::getNSImage): Deleted. |
| (WebCore::Image::getTIFFRepresentation): Deleted. |
| * platform/graphics/mac/ImageMac.mm: |
| (WebCore::BitmapImage::tiffRepresentation): Rename getTIFFRepresentation() to tiffRepresentation(). |
| (WebCore::BitmapImage::nsImage): Rename getNSImage() to nsImage(). |
| (WebCore::BitmapImage::snapshotNSImage): Returns the NSImage of the current frame. |
| (WebCore::BitmapImage::getTIFFRepresentation): Deleted. |
| (WebCore::BitmapImage::getNSImage): Deleted. |
| * platform/mac/CursorMac.mm: |
| (WebCore::createCustomCursor): Call snapshotNSImage() since the cursor does not animate anyway. |
| * platform/mac/DragImageMac.mm: |
| (WebCore::createDragImageFromImage): Use snapshotNSImage() for the dragImage. |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::Pasteboard::write): Call the Image function with its new name. |
| |
| 2016-10-04 Andy Estes <aestes@apple.com> |
| |
| [iOS] Crash in WebResourceLoaderQuickLookDelegate when the client cancels the navigation to a QuickLook resource |
| https://bugs.webkit.org/show_bug.cgi?id=162950 |
| <rdar://problem/23759114> |
| |
| Reviewed by Brady Eidson. |
| |
| When we receive data from QLPreviewConverter for the first time, we call |
| ResourceLoader::didReceiveResponse() with the preview NSURLResponse from QuickLook. If the |
| client decides to cancel this navigation in decidePolicyForResponse(), |
| WebResourceLoaderQuickLookDelegate will end up with a null _resourceLoader after |
| didReceiveResponse() returns. This change adds null checks in the methods that use |
| _resourceLoader after calling -_sendDidReceiveResponseIfNecessary. |
| |
| New API test: QuickLook.CancelNavigationAfterResponse |
| |
| * platform/network/ios/QuickLook.mm: |
| (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): Changed to only |
| call ResourceLoader::didReceiveDataArray() if _resourceLoader is non-null. |
| (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto for |
| ResourceLoader::didReceiveData(). |
| (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto for |
| ResourceLoader::didFail(). |
| |
| 2016-10-04 Chris Dumez <cdumez@apple.com> |
| |
| Add support for KeyboardEvent.isComposing attribute |
| https://bugs.webkit.org/show_bug.cgi?id=162921 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for KeyboardEvent.isComposing attribute: |
| - https://www.w3.org/TR/uievents/#dom-keyboardevent-iscomposing |
| - https://www.w3.org/TR/uievents/#ref-for-dom-keyboardevent-iscomposing-3 |
| |
| Manual test: https://jsfiddle.net/ay92sr08/9/ |
| |
| No new tests, extended existing tests. |
| |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::KeyboardEvent): |
| * dom/KeyboardEvent.h: |
| * dom/KeyboardEvent.idl: |
| |
| 2016-10-03 Ryosuke Niwa <rniwa@webkit.org> |
| |
| ShadowRoot interface should have elementFromPoint |
| https://bugs.webkit.org/show_bug.cgi?id=162882 |
| |
| Reviewed by Chris Dumez. |
| |
| Add elementFromPoint to ShadowRoot's prototype as specified at: |
| https://www.w3.org/TR/shadow-dom/#extensions-to-the-documentorshadowroot-mixin |
| with changes proposed at https://github.com/w3c/csswg-drafts/issues/556 |
| |
| Added TreeScope::retargetToScope which implements |
| |
| This patch also factors DocumentOrShadowRoot.idl out of Document and ShadowRoot interfaces to better match |
| the latest DOM specification: https://dom.spec.whatwg.org/#mixin-documentorshadowroot |
| |
| Test: fast/shadow-dom/Document-prototype-elementFromPoint.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/Document.cpp: |
| (WebCore::Document::nodeFromPoint): Moved to TreeScope. |
| (WebCore::Document::elementFromPoint): Moved to TreeScope. |
| * dom/Document.h: |
| * dom/Document.idl: Moved elementFromPoint and activeElement to DocumentOrShadowRoot.idl. |
| * dom/DocumentOrShadowRoot.idl: Added. |
| * dom/EventPath.cpp: |
| (WebCore::RelatedNodeRetargeter::checkConsistency): Use newly added TreeScope::retargetToScope. |
| * dom/ShadowRoot.idl: Moved activeElement to DocumentOrShadowRoot.idl. |
| * dom/TreeScope.cpp: |
| (WebCore::TreeScope::retargetToScope): Added. Implements https://dom.spec.whatwg.org/#retarget efficiently. |
| Instead of checking whether A (node) is a shadow-including inclusive ancestor of B (this scope) at each |
| parent, find the lowest ancestor which contains both A and B, and return the self-inclusive ancestor of B |
| in that tree. To find the lowest common ancestor in O(n), traverse all ancestors of A and B separately and |
| do a top-down traversal. The last tree scope in which A's ancestor and B's ancestor match is the lowest |
| common ancestor. |
| (WebCore::TreeScope::nodeFromPoint): Moved from Document. |
| (WebCore::TreeScope::elementFromPoint): Moved from Document. Use retargetToScope and parentInComposedTree |
| instead of parentNode and ancestorInThisScope to match the semantics proposed in |
| https://github.com/w3c/csswg-drafts/issues/556 |
| * dom/TreeScope.h: |
| |
| 2016-10-04 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| font-family: cursive should map to KaiTi in Chinese |
| https://bugs.webkit.org/show_bug.cgi?id=162889 |
| <rdar://problem/28363547> |
| |
| Reviewed by Tim Horton. |
| |
| According to Bobby Tung, this is a better mapping. Previously, we were |
| relying on the system fallback mechanism. However, an explicit mapping |
| is more robust. |
| |
| Test: fast/text/cursive-zh.html |
| |
| * page/cocoa/SettingsCocoa.mm: |
| (WebCore::Settings::initializeDefaultFontFamilies): |
| |
| 2016-10-04 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser: query-only URLs relative to file URLs should just add a query |
| https://bugs.webkit.org/show_bug.cgi?id=162888 |
| |
| Reviewed by Tim Horton. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| Like bug 206749 but with queries instead of fragments. |
| |
| 2016-10-04 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should match URL::parse and other browsers when parsing a URL containing only scheme:// |
| https://bugs.webkit.org/show_bug.cgi?id=162909 |
| |
| Reviewed by Tim Horton. |
| |
| If there's no host in this case we shouldn't fail, but rather make a valid URL with the // in the path. |
| This matches Chrome, Firefox, and Safari's behavior. |
| Covered by API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| |
| 2016-10-04 Brent Fulgham <bfulgham@apple.com> |
| |
| Unreviewed build fix after r206773. |
| |
| Exclude Direct2D definitions when building for normal CG Windows. |
| |
| * platform/graphics/GraphicsContext.h: |
| |
| 2016-10-04 Yusuke Suzuki <utatane.tea@gmail.com> |
| |
| [DOMJIT] Introduce DOMJIT::GetterSetter to tell JIT information |
| https://bugs.webkit.org/show_bug.cgi?id=162916 |
| |
| Reviewed by Filip Pizlo. |
| |
| * ForwardingHeaders/domjit/DOMJITGetterSetter.h: Added. |
| * PlatformEfl.cmake: |
| * PlatformGTK.cmake: |
| * PlatformMac.cmake: |
| * PlatformWin.cmake: |
| |
| 2016-10-04 Chris Dumez <cdumez@apple.com> |
| |
| Return null when window.open() is popup blocked |
| https://bugs.webkit.org/show_bug.cgi?id=162897 |
| |
| Reviewed by Michael Catanzaro. |
| |
| The return value of window.open() when the popup is blocked should be null: |
| - https://github.com/whatwg/html/pull/1854 |
| - https://github.com/whatwg/html/issues/1851 |
| |
| Firefox / Edge return null. |
| |
| No new tests, rebaselined existing tests. |
| |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::JSDOMWindow::open): |
| |
| 2016-10-04 Chris Dumez <cdumez@apple.com> |
| |
| [Web IDL] Add support for dictionary inheritance |
| https://bugs.webkit.org/show_bug.cgi?id=162907 |
| |
| Reviewed by Sam Weinig. |
| |
| Add support for dictionary inheritance to our Web IDL parser and |
| bindings generator. Leverage this new support for EventTarget's |
| EventListenerOptions / AddEventListenerOptions dictionaries, in |
| order to match the DOM specification: |
| - https://dom.spec.whatwg.org/#interface-eventtarget |
| |
| Also update the bindings generator to convert the dictionary |
| members in lexicographical order, as per: |
| - https://heycam.github.io/webidl/#es-dictionary (Step 5.1) |
| |
| No new tests, rebaselined bindings tests. |
| |
| * bindings/scripts/CodeGenerator.pm: |
| (GetDictionaryByName): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDictionaryImplementationContent): |
| * bindings/scripts/IDLParser.pm: |
| (parseDictionary): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>): |
| (WebCore::convertDictionary<AlternateDictionaryName>): |
| (WebCore::convertDictionary<TestObj::ParentDictionary>): |
| (WebCore::convertDictionary<TestObj::ChildDictionary>): |
| * bindings/scripts/test/TestObj.idl: |
| * dom/EventTarget.idl: |
| |
| 2016-10-04 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Add initial D2D GraphicsContext implementation |
| https://bugs.webkit.org/show_bug.cgi?id=162917 |
| |
| Reviewed by Dean Jackson. |
| |
| This patch lands a set of new files that implement the GraphicsContext |
| features on Windows using Direct2D. |
| |
| No new tests until complete backend lands. |
| |
| * platform/graphics/Color.h: Add new casting operator. |
| * platform/graphics/FloatSize.h: Ditto. |
| * platform/graphics/GraphicsContext.cpp: Update for Direct2D |
| implementation. |
| * platform/graphics/GraphicsContext.h: |
| * platform/graphics/win/ColorDirect2D.cpp: |
| (WebCore::Color::operator D2D1_VECTOR_4F): Added. |
| * platform/graphics/win/GraphicsContextCGWin.cpp: Add compiler |
| guard to avoid building when using Direct2D. |
| * platform/graphics/win/GraphicsContextDirect2D.cpp: Added. |
| * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: Added. |
| * platform/graphics/win/GraphicsContextWin.cpp: Update for Direct2D |
| includes. |
| * platform/graphics/win/TransformationMatrixDirect2D.cpp: Fix comment. |
| |
| 2016-10-04 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] Remove SSLPolicyFlags from SoupNetworkSession |
| https://bugs.webkit.org/show_bug.cgi?id=162906 |
| |
| Reviewed by Michael Catanzaro. |
| |
| All soup based ports are setting SSLUseSystemCAFile flag unconditionally, so we can just use that when creating |
| the session like we do for all other construct parameters. |
| |
| * platform/network/soup/SoupNetworkSession.cpp: |
| (WebCore::SoupNetworkSession::createTestingSession): |
| (WebCore::SoupNetworkSession::setupLogger): |
| (WebCore::SoupNetworkSession::SoupNetworkSession): Deleted. |
| (WebCore::SoupNetworkSession::clearOldSoupCache): Deleted. |
| (WebCore::SoupNetworkSession::setHTTPProxy): Deleted. |
| * platform/network/soup/SoupNetworkSession.h: |
| (WebCore::SoupNetworkSession::soupSession): Deleted. |
| |
| 2016-10-04 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Media controls are displayed in the incorrect state momentarily after switching between tabs playing media |
| https://bugs.webkit.org/show_bug.cgi?id=162766 |
| <rdar://problem/28533523> |
| |
| Reviewed by Jer Noble. |
| |
| When showing Now Playing controls for a media session, we should first set up the Now Playing info and |
| playback state before telling MediaRemote to make the session visible. This is WebKit work in ensuring that |
| when switching Now Playing sessions by switching tabs, we do not first display an invalid Now Playing state |
| before updating to the expected state. |
| |
| Adds 2 new WebKit API tests in NowPlayingControlsTests: NowPlayingControlsHideAfterShowingClearsInfo and |
| NowPlayingControlsClearInfoAfterSessionIsNoLongerValid. |
| |
| * platform/audio/PlatformMediaSessionManager.h: |
| (WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingTitle): |
| (WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingDuration): |
| (WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingElapsedTime): |
| (WebCore::PlatformMediaSessionManager::hasActiveNowPlayingSession): Deleted. |
| * platform/audio/mac/MediaSessionManagerMac.h: |
| * platform/audio/mac/MediaSessionManagerMac.mm: |
| (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): |
| |
| 2016-10-04 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] ReadableStream should be errored with TypeError values |
| https://bugs.webkit.org/show_bug.cgi?id=162895 |
| |
| Reviewed by Alex Christensen. |
| |
| Test: imported/w3c/web-platform-tests/fetch/api/basic/error-after-response.html |
| |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::BodyLoader::didFail): Removing FIXME. |
| * bindings/js/ReadableStreamDefaultController.h: |
| (WebCore::ReadableStreamDefaultController::error<String>): Erroring with TypeError values. |
| |
| 2016-10-03 Chris Dumez <cdumez@apple.com> |
| |
| Bindings do not throw a TypeError if a required dictionary member is missing |
| https://bugs.webkit.org/show_bug.cgi?id=162734 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Bindings should throw a TypeError if a required dictionary member is missing. |
| For example, if there is a "required long id" member in a dictionary that is |
| missing, our bindings would prevously pass 0 to the implementation instead |
| of throwing a TypeError. |
| |
| Relevant specification: |
| - https://heycam.github.io/webidl/#es-dictionary |
| |
| I aligned our bindings generator implementation with the specification, |
| except for the support for dictionary inheritance that is still missing |
| and will be addressed in a follow-up patch. |
| |
| No new tests, I rebaselined the bindings tests and this is already covered |
| by fast/events/touch/touch-constructor.html on iOS. |
| |
| * bindings/js/JSCustomElementRegistryCustom.cpp: |
| (WebCore::JSCustomElementRegistry::define): |
| * bindings/js/JSDOMConvert.h: |
| (WebCore::convert): Deleted. |
| (WebCore::Converter<bool>::convert): Deleted. |
| (WebCore::Converter<String>::convert): Deleted. |
| (WebCore::Converter<IDLDOMString>::convert): Deleted. |
| (WebCore::Converter<IDLUSVString>::convert): Deleted. |
| (WebCore::Converter<JSC::JSValue>::convert): Deleted. |
| (WebCore::Converter<int8_t>::convert): Deleted. |
| (WebCore::Converter<uint8_t>::convert): Deleted. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDictionaryImplementationContent): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::convertDictionary<TestObj::Dictionary>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>): |
| (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>): |
| (WebCore::convertDictionary<AlternateDictionaryName>): |
| |
| 2016-10-03 Zalan Bujtas <zalan@apple.com> |
| |
| [ListItems] Render tree should be all clean by the end of FrameView::layout(). |
| https://bugs.webkit.org/show_bug.cgi?id=162832 |
| |
| Reviewed by Simon Fraser. |
| |
| List item markers are inserted into the tree during layout, right before laying out |
| the list item (that's a big FIXME). At this point we already know what part of the tree |
| needs to be laid out. Inserting a list item marker does not expand this dirty area. |
| However whenever we insert a new renderer into the tree, we call setNeedsLayout on the contining block chain. |
| In certain cases (floating renderers), it could potentially trigger some unintentional markings |
| and we return from FrameView::layout() with a dirty subtree. |
| |
| This patch preemptively marks the list item and its marker dirty so that |
| when the marker is getting inserted into the tree, we stop the marking at the parent. |
| |
| Not testable. |
| |
| * rendering/RenderListItem.cpp: |
| (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded): |
| |
| 2016-10-03 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Implement rendering of font-variation-settings |
| https://bugs.webkit.org/show_bug.cgi?id=162782 |
| |
| Reviewed by Zalan Bujtas. |
| |
| (Re-landing after fixing tests.) |
| |
| Because the heavy lifting for font-variation-settings is done by CoreText, |
| this patch is fairly minimal. It simply hooks up the CSS property to CoreText. |
| |
| There is an existing bug in CoreText where variations inside fonts do not |
| survive the addition of a cascade list. Therefore, FontPlatformData::ctFont() |
| needs to work around this (conditionally) by resupplying the variation at |
| the same time as the cascade list. The CoreText bug is <rdar://problem/28449441>. |
| |
| Tests: fast/text/variations/duplicate.html |
| fast/text/variations/exist.html |
| fast/text/variations/inheritance.html |
| fast/text/variations/order.html |
| fast/text/variations/outofbounds.html |
| |
| * platform/graphics/FontCache.h: |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::preparePlatformFont): |
| (WebCore::fontWithFamily): |
| (WebCore::FontCache::createFontPlatformData): |
| (WebCore::FontCache::systemFallbackForCharacters): |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::cascadeToLastResortAttributesDictionary): |
| (WebCore::cascadeToLastResortAndVariationsFontDescriptor): |
| (WebCore::FontPlatformData::ctFont): |
| (WebCore::cascadeToLastResortFontDescriptor): Deleted. |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::FontCustomPlatformData::fontPlatformData): |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): |
| |
| 2016-10-03 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should strip tabs at all locations |
| https://bugs.webkit.org/show_bug.cgi?id=162836 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Covered by adding tabs to each location of each API test |
| except tests that test the encoding of surrogate pairs, |
| because inserting a tab between the pairs changes the encoding. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::takesTwoAdvancesUntilEnd): |
| (WebCore::URLParser::parse): |
| (WebCore::URLParser::parseIPv4Number): |
| (WebCore::URLParser::parseIPv4Host): |
| * platform/URLParser.h: |
| |
| 2016-10-03 Antti Koivisto <antti@apple.com> |
| |
| Remove Document::elementSheet() |
| https://bugs.webkit.org/show_bug.cgi?id=162876 |
| |
| Reviewed by Andreas Kling. |
| |
| This is a Document owned stylesheet that exists as a context for parsing element inline style. |
| It never contains any rules and is generally confusing. |
| |
| This patch removes the requirement for a stylesheet to be present for CSSParser to operate in |
| the correct context. Inline style is now parsed without stylesheet and a context object is |
| passed instead. |
| |
| * bindings/js/JSCSSStyleDeclarationCustom.cpp: |
| (WebCore::root): |
| * bindings/js/JSCSSStyleDeclarationCustom.h: |
| (WebCore::root): Deleted. |
| * css/PropertySetCSSStyleDeclaration.cpp: |
| (WebCore::PropertySetCSSStyleDeclaration::setCssText): |
| (WebCore::PropertySetCSSStyleDeclaration::setProperty): |
| (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): |
| (WebCore::PropertySetCSSStyleDeclaration::cssParserContext): |
| (WebCore::StyleRuleCSSStyleDeclaration::parentStyleSheet): |
| (WebCore::StyleRuleCSSStyleDeclaration::cssParserContext): |
| (WebCore::InlineCSSStyleDeclaration::parentStyleSheet): |
| (WebCore::InlineCSSStyleDeclaration::cssParserContext): |
| * css/PropertySetCSSStyleDeclaration.h: |
| (WebCore::PropertySetCSSStyleDeclaration::didMutate): Deleted. |
| * css/StyleProperties.cpp: |
| (WebCore::MutableStyleProperties::setProperty): |
| (WebCore::MutableStyleProperties::setCustomProperty): |
| (WebCore::MutableStyleProperties::parseDeclaration): |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::parseValue): |
| (WebCore::CSSParser::parseCustomPropertyValue): |
| (WebCore::CSSParser::parseInlineStyleDeclaration): |
| * css/parser/CSSParser.h: |
| * css/parser/CSSParserImpl.cpp: |
| (WebCore::CSSParserImpl::parseInlineStyleDeclaration): |
| * dom/Document.cpp: |
| (WebCore::Document::~Document): |
| (WebCore::Document::updateBaseURL): |
| (WebCore::Document::usesStyleBasedEditability): |
| (WebCore::Document::setHasElementUsingStyleBasedEditability): |
| (WebCore::Document::elementSheet): Deleted. |
| * dom/Document.h: |
| * dom/StyledElement.cpp: |
| (WebCore::StyledElement::setInlineStyleFromString): |
| (WebCore::StyledElement::invalidateStyleAttribute): |
| |
| The usesStyleBasedEditability bit used to be set via the elementSheet. Instead check for it after inline style mutations. |
| |
| (WebCore::StyledElement::setInlineStyleProperty): |
| (WebCore::StyledElement::addPropertyToPresentationAttributeStyle): |
| * dom/StyledElement.h: |
| (WebCore::StyledElement::invalidateStyleAttribute): Deleted. |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): |
| * svg/SVGAnimateElementBase.cpp: |
| (WebCore::applyCSSPropertyToTarget): |
| |
| 2016-10-03 Brent Fulgham <bfulgham@apple.com> |
| |
| Avoid null dereference when changing focus in design mode. |
| https://bugs.webkit.org/show_bug.cgi?id=162877 |
| <rdar://problem/28061261> |
| |
| Reviewed by Chris Dumez. |
| |
| The bare m_frame pointer in DOMWindow can be cleared when setting focus to a new element. Check |
| that the m_frame pointer is non-null before using it after calling a routine that could |
| clear the pointer value. |
| |
| Test: fast/frames/iframe-focus-crash.html |
| |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::focus): Check that the pointer is still non-null after setting the |
| current focused element to nullptr. |
| |
| 2016-10-03 Chris Dumez <cdumez@apple.com> |
| |
| Add support for KeyboardEvent.key attribute |
| https://bugs.webkit.org/show_bug.cgi?id=36267 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for KeyboardEvent.key attribute: |
| - https://w3c.github.io/uievents/#dom-keyboardevent-key |
| |
| This is behind a compile time flag that is only enabled on Mac and |
| iOS and the implementation is still missing for other platforms. |
| |
| Test: fast/events/keyboardevent-key.html |
| |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::KeyboardEvent): |
| * dom/KeyboardEvent.h: |
| * dom/KeyboardEvent.idl: |
| * platform/PlatformKeyboardEvent.h: |
| (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): |
| (WebCore::PlatformKeyboardEvent::key): |
| * platform/cocoa/KeyEventCocoa.h: |
| * platform/cocoa/KeyEventCocoa.mm: |
| (WebCore::keyForCharCode): |
| * platform/ios/PlatformEventFactoryIOS.h: |
| * platform/ios/PlatformEventFactoryIOS.mm: |
| (WebCore::keyForKeyEvent): |
| (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): |
| * platform/mac/PlatformEventFactoryMac.h: |
| * platform/mac/PlatformEventFactoryMac.mm: |
| (WebCore::keyForKeyEvent): |
| (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): |
| (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): Deleted. |
| * replay/SerializationMethods.cpp: |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue): |
| |
| 2016-10-03 Chris Dumez <cdumez@apple.com> |
| |
| Add support for KeyboardEvent.key attribute |
| https://bugs.webkit.org/show_bug.cgi?id=36267 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for KeyboardEvent.key attribute: |
| - https://w3c.github.io/uievents/#dom-keyboardevent-key |
| |
| This is behind a compile time flag that is only enabled on Mac and |
| iOS and the implementation is still missing for other platforms. |
| |
| Test: fast/events/keyboardevent-key.html |
| |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::KeyboardEvent): |
| * dom/KeyboardEvent.h: |
| * dom/KeyboardEvent.idl: |
| * platform/PlatformKeyboardEvent.h: |
| (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): |
| (WebCore::PlatformKeyboardEvent::key): |
| * platform/cocoa/KeyEventCocoa.h: |
| * platform/cocoa/KeyEventCocoa.mm: |
| (WebCore::keyForCharCode): |
| * platform/ios/PlatformEventFactoryIOS.h: |
| * platform/ios/PlatformEventFactoryIOS.mm: |
| (WebCore::keyForKeyEvent): |
| (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): |
| * platform/mac/PlatformEventFactoryMac.h: |
| * platform/mac/PlatformEventFactoryMac.mm: |
| (WebCore::keyForKeyEvent): |
| (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): |
| (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): Deleted. |
| * replay/SerializationMethods.cpp: |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue): |
| |
| 2016-10-03 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser: fragment-only URLs relative to file URLs should just add a fragment |
| https://bugs.webkit.org/show_bug.cgi?id=162871 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| Instead of adding ///# after copying the base URL to the query, just add an #. |
| |
| 2016-10-03 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] LayoutItem and Button classes |
| https://bugs.webkit.org/show_bug.cgi?id=162868 |
| <rdar://problem/28590166> |
| |
| Reviewed by Dean Jackson. |
| |
| We introduce the new Button class and its parent class LayoutItem. We will subclass Button |
| a lot in coming patches, as it provides a way to create a button and provide a delegate to |
| respond to UI events via the `uiDelegate` property. A Button extends a LayoutItem, another |
| class that we'll subclass heavily in coming patches, which is simply a LayoutNode with a |
| `layoutDelegate` which allows to set the node's `layoutTraits`, a bit-mask allowing to |
| specify layout attributes such as the platform and playback styles. |
| |
| Tests: media/modern-media-controls/button/button.html |
| media/modern-media-controls/layout-item/layout-item.html |
| |
| * Modules/modern-media-controls/controls/button.css: Added. |
| (button): |
| * Modules/modern-media-controls/controls/button.js: Added. |
| (Button): |
| (Button.prototype.get enabled): |
| (Button.prototype.set enabled): |
| (Button.prototype.handleEvent): |
| (Button.prototype._handleUIEvent): |
| * Modules/modern-media-controls/controls/layout-item.js: Added. |
| (LayoutItem.prototype.get layoutTraits): |
| (LayoutItem): |
| |
| 2016-10-03 Andy Estes <aestes@apple.com> |
| |
| ASSERTION FAILED: url.containsOnlyASCII() in WebCore::checkEncodedString() when parsing an invalid CSS cursor URL |
| https://bugs.webkit.org/show_bug.cgi?id=162763 |
| <rdar://problem/28572758> |
| |
| Reviewed by Youenn Fablet. |
| |
| CSSCursorImageValue copies the URL of its underlying CSSImageValue by using the |
| ParsedURLString URL constructor on the String returned by CSSImageValue::url(). While |
| CSSImageValues were always being constructed from a URL implicitly converted to a String, |
| nothing ensured that the URL was valid. For invalid URLs, URL::string() returns the string |
| it was constructed with, which might still represent a relative URL or contain non-ASCII |
| characters, violating the preconditions of the ParsedURLString URL constructor and causing |
| an assertion to fail in Debug builds. |
| |
| Fix this by having CSSImageValue store its image URL using a WebCore::URL rather than a |
| String. CSSCursorImageValue can then copy this URL instead of attempting to re-parse a |
| possibly-invalid URL string. |
| |
| Test: fast/css/cursor-with-invalid-url.html |
| |
| * css/CSSCursorImageValue.cpp: |
| (WebCore::CSSCursorImageValue::CSSCursorImageValue): Copied m_imageValue.url() into |
| m_originalURL instead of using the ParsedURLString URL constructor, since |
| CSSImageValue::url() now returns a WebCore::URL. |
| (WebCore::CSSCursorImageValue::loadImage): Created a URL from cursorElement->href() by |
| calling Document::completeURL(). |
| * css/CSSImageValue.cpp: |
| (WebCore::CSSImageValue::CSSImageValue): Changed to take a URL&& instead of a const String&. |
| (WebCore::CSSImageValue::loadImage): Stopped calling Document::completeURL(), since m_url is |
| now a WebCore::URL. |
| * css/CSSImageValue.h: Changed url() to return a const URL&, and changed m_url to be a URL. |
| * html/HTMLBodyElement.cpp: |
| (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute): Removed a call to |
| URL::string(). |
| * html/HTMLTableElement.cpp: |
| (WebCore::HTMLTableElement::collectStyleForPresentationAttribute): Ditto. |
| * html/HTMLTablePartElement.cpp: |
| (WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute): Ditto. |
| |
| 2016-10-03 Zalan Bujtas <zalan@apple.com> |
| |
| Log an error to stderr when FrameView::layout() fails to clean all the renderers. |
| https://bugs.webkit.org/show_bug.cgi?id=162835 |
| |
| Reviewed by Simon Fraser. |
| |
| We've come across multiple layout/painting bugs caused by renderers left dirty |
| after FrameView::layout(). This patch helps catching such issues early. |
| Once all the blocking bugs are fixed (webkit.org/b/162835), logging should be replaced with ASSERT(). |
| |
| Not testable. |
| |
| * page/FrameView.cpp: |
| (WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker): |
| (WebCore::FrameView::layout): |
| |
| 2016-10-03 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Add D2D Bitmap Image handling code |
| https://bugs.webkit.org/show_bug.cgi?id=162761 |
| |
| Reviewed by Dean Jackson. |
| |
| This patch lands a set of new files that implement |
| Image and BitmapImage features on Windows using |
| Direct2D. |
| |
| The desired ID2D1RenderTarget handle is needed by the |
| image decoder so that it can load the resulting bitmap |
| into the GPU. |
| |
| No new tests until complete backend lands. |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::draw): Tell the Direct2D image decoder |
| which render target to use. |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/ImageBuffer.cpp: |
| * platform/graphics/ImageBuffer.h: |
| * platform/graphics/ImageBufferData.h: |
| * platform/graphics/ImageFrameCache.cpp: |
| (WebCore::ImageFrameCache::setRenderTarget): Added. |
| * platform/graphics/ImageFrameCache.h: |
| (WebCore::ImageFrameCache::decoder): Added. |
| * platform/graphics/ImageSource.cpp: |
| * platform/graphics/ImageSource.h: |
| (WebCore::ImageSource::setRenderTarget): |
| * platform/graphics/win/ImageBufferDataDirect2D.cpp: Added. |
| * platform/graphics/win/ImageBufferDataDirect2D.h: Added. |
| * platform/graphics/win/ImageBufferDirect2D.cpp: Added. |
| * platform/graphics/win/ImageCGWin.cpp: |
| * platform/graphics/win/ImageDecoderDirect2D.cpp: Added. |
| * platform/graphics/win/ImageDecoderDirect2D.h: Added. |
| * platform/graphics/win/ImageDirect2D.cpp: Added. |
| * platform/graphics/win/NativeImageDirect2D.cpp: Added. |
| |
| 2016-10-03 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] Remove unused methods toSoupMessage from ResourceRequest/Response |
| https://bugs.webkit.org/show_bug.cgi?id=162867 |
| |
| Reviewed by Sergio Villar Senin. |
| |
| * platform/network/soup/ResourceRequest.h: |
| * platform/network/soup/ResourceRequestSoup.cpp: |
| (WebCore::ResourceRequest::updateSoupMessage): |
| (WebCore::ResourceRequest::updateFromSoupMessage): Deleted. |
| * platform/network/soup/ResourceResponse.h: |
| * platform/network/soup/ResourceResponseSoup.cpp: |
| (WebCore::ResourceResponse::updateFromSoupMessage): Deleted. |
| |
| 2016-10-03 Youenn Fablet <youenn@apple.com> |
| |
| Remove FetchBody::m_isEmpty |
| https://bugs.webkit.org/show_bug.cgi?id=162857 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| |
| Moving handling of null bodies in FetchBodyOwner, by having an Optional<FetchBody> in FetchBodyOwner. |
| Moving storage of m_contentType in FetchBodyOwner. |
| |
| Moving header storage from FetchResponse/FetchRequest to FetchBodyOwner, as it helps updating m_contentType. |
| |
| * Modules/fetch/FetchBody.cpp: removing m_isEmpty and m_contentType. |
| (WebCore::FetchBody::extract): Computes the default content-type which is stored in FetchBodyOwner. |
| (WebCore::FetchBody::blob): |
| (WebCore::FetchBody::consume): |
| (WebCore::FetchBody::consumeAsStream): |
| (WebCore::FetchBody::loadingSucceeded): |
| (WebCore::FetchBody::bodyForInternalRequest): |
| (WebCore::FetchBody::clone): |
| * Modules/fetch/FetchBody.h: |
| (WebCore::FetchBody::loadingBody): |
| (WebCore::FetchBody::FetchBody): |
| * Modules/fetch/FetchBodyOwner.cpp: |
| (WebCore::FetchBodyOwner::FetchBodyOwner): |
| (WebCore::FetchBodyOwner::stop): |
| (WebCore::FetchBodyOwner::arrayBuffer): |
| (WebCore::FetchBodyOwner::blob): |
| (WebCore::FetchBodyOwner::cloneBody): Needs to clone m_contentType as well. |
| (WebCore::FetchBodyOwner::extractBody): |
| (WebCore::FetchBodyOwner::updateContentType): |
| (WebCore::FetchBodyOwner::consumeOnceLoadingFinished): |
| (WebCore::FetchBodyOwner::formData): |
| (WebCore::FetchBodyOwner::json): |
| (WebCore::FetchBodyOwner::text): |
| (WebCore::FetchBodyOwner::loadBlob): |
| (WebCore::FetchBodyOwner::blobLoadingSucceeded): |
| (WebCore::FetchBodyOwner::blobLoadingFailed): |
| (WebCore::FetchBodyOwner::finishBlobLoading): |
| * Modules/fetch/FetchBodyOwner.h: |
| (WebCore::FetchBodyOwner::body): |
| (WebCore::FetchBodyOwner::isBodyNull): |
| * Modules/fetch/FetchRequest.cpp: |
| (WebCore::FetchRequest::setBody): |
| (WebCore::FetchRequest::internalRequest): |
| (WebCore::FetchRequest::clone): |
| * Modules/fetch/FetchRequest.h: |
| (WebCore::FetchRequest::FetchRequest): |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::initializeWith): |
| (WebCore::FetchResponse::FetchResponse): |
| (WebCore::FetchResponse::cloneForJS): |
| (WebCore::FetchResponse::fetch): |
| (WebCore::FetchResponse::BodyLoader::didSucceed): |
| (WebCore::FetchResponse::BodyLoader::didReceiveResponse): |
| (WebCore::FetchResponse::BodyLoader::start): |
| (WebCore::FetchResponse::createReadableStreamSource): |
| * Modules/fetch/FetchResponse.h: |
| |
| 2016-10-03 Andy Estes <aestes@apple.com> |
| |
| ASSERTION FAILED: result in WebCore::CSSParser::parseURI |
| https://bugs.webkit.org/show_bug.cgi?id=141638 |
| <rdar://problem/27709952> |
| |
| Reviewed by Andreas Kling. |
| |
| CSSParser::parseURIInternal() failed to parse unquoted URLs with Unicode escape sequences |
| greater than 0xFF, even when the destination character type was multi-byte. Fixed by |
| checking the size of DestCharacterType instead of SrcCharacterType. |
| |
| Updated fast/css/url-with-multi-byte-unicode-escape.html to test for an unquoted URL. |
| |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::parseURIInternal): For code points greater than 0xFF, only returned |
| false if sizeof(DestCharacterType) == 1. |
| |
| 2016-10-03 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser: empty relative URLs should not copy fragment from the base URL |
| https://bugs.webkit.org/show_bug.cgi?id=162864 |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by new API tests. |
| |
| * platform/URL.cpp: |
| (WebCore::URL::removeFragmentIdentifier): |
| Optimize removing fragments, now that it happens more often. We don't need to reparse, |
| because the result will always be equal to just a substring when removing the fragment at the end. |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::copyASCIIStringUntil): |
| (WebCore::URLParser::copyURLPartsUntil): |
| (WebCore::containsOnlyC0ControlOrSpace): |
| (WebCore::URLParser::URLParser): |
| (WebCore::URLParser::parse): |
| * platform/URLParser.h: |
| Because we are not copying the fragment, we can simplify and remove some unreachable code. |
| |
| 2016-10-03 Chris Dumez <cdumez@apple.com> |
| |
| td.scope should only return known values |
| https://bugs.webkit.org/show_bug.cgi?id=162755 |
| |
| Reviewed by Sam Weinig. |
| |
| td.scope should only return known values: |
| - https://html.spec.whatwg.org/#dom-th-scope |
| |
| Firefox conforms to the specification. |
| |
| No new tests, rebaselined existing test. |
| |
| * html/HTMLTableCellElement.cpp: |
| (WebCore::HTMLTableCellElement::scope): |
| |
| 2016-10-03 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] Simplify AuthenticationChallenge |
| https://bugs.webkit.org/show_bug.cgi?id=162784 |
| |
| Reviewed by Alex Christensen. |
| |
| We don't really need to keep references to the SoupSession and SoupMessage in AuthenticationChallenge, the |
| SoupNetworkSession callback already forwards the challenge to the right ResourceHandle. |
| |
| * platform/network/soup/AuthenticationChallenge.h: |
| (WebCore::AuthenticationChallenge::authenticationClient): |
| (WebCore::AuthenticationChallenge::soupSession): Deleted. |
| (WebCore::AuthenticationChallenge::soupMessage): Deleted. |
| * platform/network/soup/AuthenticationChallengeSoup.cpp: |
| (WebCore::AuthenticationChallenge::AuthenticationChallenge): |
| (WebCore::AuthenticationChallenge::platformCompare): |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge): |
| (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): |
| (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): |
| (WebCore::ResourceHandle::receivedCredential): |
| (WebCore::ResourceHandle::receivedCancellation): |
| * platform/network/soup/SoupNetworkSession.cpp: |
| (WebCore::authenticateCallback): |
| |
| 2016-10-03 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] Cleanup persistent credential storage code |
| https://bugs.webkit.org/show_bug.cgi?id=162777 |
| |
| Reviewed by Alex Christensen. |
| |
| We have this feature behind ENABLE_CREDENTIAL_STORAGE flag, which is confusing, because we use credential |
| storage unconditionally and this is only about persistent storage. Also the flag assumes libsecret is available, |
| and since it's only used by GTK sometimes we use GTK ifdefs instead of CREDENTIAL_STORAGE. So, I think we should |
| use USE(LIBSECRET) instead, and reduce a bit the ifdefs in common soup code. Another problem is that current |
| implementation is always used, while it should depend on the current network storage session and never used in |
| ephemeral sessions. This patch moves the code from CredentialBackingStore to NetworkStorageSessionSoup and |
| modernizes a bit. |
| |
| * PlatformGTK.cmake: Remove CredentialBackingStore.cpp. |
| * platform/gtk/GRefPtrGtk.cpp: Use USE(LIBSECRET) |
| * platform/gtk/GRefPtrGtk.h: |
| * platform/network/NetworkStorageSession.h: |
| * platform/network/ResourceHandleInternal.h: |
| * platform/network/gtk/CredentialBackingStore.cpp: Removed. |
| * platform/network/gtk/CredentialBackingStore.h: Removed. |
| * platform/network/soup/NetworkStorageSessionSoup.cpp: |
| (WebCore::NetworkStorageSession::~NetworkStorageSession): |
| (WebCore::schemeFromProtectionSpaceServerType): |
| (WebCore::authTypeFromProtectionSpaceAuthenticationScheme): |
| (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage): |
| (WebCore::NetworkStorageSession::saveCredentialToPersistentStorage): |
| (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession): Deleted. |
| (WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted. |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::gotHeadersCallback): |
| (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): |
| (WebCore::ResourceHandle::receivedCredential): |
| (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge): Deleted. |
| (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): Deleted. |
| (WebCore::ResourceHandle::receivedCancellation): Deleted. |
| |
| 2016-10-03 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix the build with coordinated graphics enabled after r206712. |
| |
| * page/scrolling/ScrollingStateTree.cpp: |
| (WebCore::ScrollingStateTree::attachNode): |
| |
| 2016-10-02 Chris Dumez <cdumez@apple.com> |
| |
| Add support for KeyboardEvent.getModifierState() operation |
| https://bugs.webkit.org/show_bug.cgi?id=162855 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for KeyboardEvent.getModifierState() operation: |
| - https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate |
| |
| Test: fast/events/constructors/keyboard-event-getModifierState.html |
| |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::getModifierState): |
| * dom/KeyboardEvent.idl: |
| |
| 2016-10-02 Chris Dumez <cdumez@apple.com> |
| |
| Add support for KeyboardEvent.repeat attribute |
| https://bugs.webkit.org/show_bug.cgi?id=162854 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for KeyboardEvent.repeat attribute: |
| - https://w3c.github.io/uievents/#dom-keyboardevent-repeat |
| |
| No new tests, extended existing test. |
| |
| * dom/KeyboardEvent.cpp: |
| (WebCore::KeyboardEvent::KeyboardEvent): |
| * dom/KeyboardEvent.h: |
| * dom/KeyboardEvent.idl: |
| |
| 2016-10-02 Darin Adler <darin@apple.com> |
| |
| Rename ExceptionCode-based exception handling to "legacy" |
| https://bugs.webkit.org/show_bug.cgi?id=162859 |
| |
| Reviewed by Chris Dumez. |
| |
| RaisesException is now MayThrowLegacyException. |
| |
| A follow-up patch soon will add MayThrowException for the new style, |
| where we use ExceptionOr<> as the return type instead of an ExceptionCode |
| out argument. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| Removed the quotation marks from the syntax object->{PropertyName} so the |
| renaming script could handle it. Tweaked various comments and logic for clarity. |
| Changed to use the perl "x if y" syntax for brevity in many places. |
| Renamed with the script and by hand. Added code to skip including the same header |
| in both the implementation file and the header, just to make generated bindings |
| slightly smaller and faster to compile. Used "using" instead of "typedef". |
| |
| * bindings/scripts/IDLAttributes.txt: Updated from old names to new ones. |
| |
| * Modules/applepay/ApplePaySession.idl: |
| * Modules/encryptedmedia/MediaKeySession.idl: |
| * Modules/encryptedmedia/MediaKeys.idl: |
| * Modules/fetch/FetchHeaders.idl: |
| * Modules/fetch/FetchRequest.idl: |
| * Modules/fetch/FetchResponse.idl: |
| * Modules/indexeddb/IDBCursor.idl: |
| * Modules/indexeddb/IDBDatabase.idl: |
| * Modules/indexeddb/IDBFactory.idl: |
| * Modules/indexeddb/IDBIndex.idl: |
| * Modules/indexeddb/IDBKeyRange.idl: |
| * Modules/indexeddb/IDBObjectStore.idl: |
| * Modules/indexeddb/IDBRequest.idl: |
| * Modules/indexeddb/IDBTransaction.idl: |
| * Modules/mediasource/MediaSource.idl: |
| * Modules/mediasource/SourceBuffer.idl: |
| * Modules/mediastream/MediaDevices.idl: |
| * Modules/mediastream/RTCDTMFSender.idl: |
| * Modules/mediastream/RTCDataChannel.idl: |
| * Modules/mediastream/RTCIceCandidate.idl: |
| * Modules/mediastream/RTCPeerConnection.idl: |
| * Modules/mediastream/RTCRtpSender.idl: |
| * Modules/mediastream/RTCSessionDescription.idl: |
| * Modules/navigatorcontentutils/NavigatorContentUtils.idl: |
| * Modules/notifications/NotificationCenter.idl: |
| * Modules/webaudio/AnalyserNode.idl: |
| * Modules/webaudio/AudioBuffer.idl: |
| * Modules/webaudio/AudioBufferSourceNode.idl: |
| * Modules/webaudio/AudioContext.idl: |
| * Modules/webaudio/AudioNode.idl: |
| * Modules/webaudio/ConvolverNode.idl: |
| * Modules/webaudio/OfflineAudioContext.idl: |
| * Modules/webaudio/OscillatorNode.idl: |
| * Modules/webdatabase/DOMWindowWebDatabase.idl: |
| * Modules/webdatabase/SQLResultSet.idl: |
| * Modules/websockets/WebSocket.idl: |
| * bindings/scripts/test/TestImplements.idl: |
| * bindings/scripts/test/TestInterface.idl: |
| * bindings/scripts/test/TestNamedConstructor.idl: |
| * bindings/scripts/test/TestNondeterministic.idl: |
| * bindings/scripts/test/TestObj.idl: |
| * bindings/scripts/test/TestSupplemental.idl: |
| * bindings/scripts/test/TestTypedefs.idl: |
| * css/CSSCharsetRule.idl: |
| * css/CSSMediaRule.idl: |
| * css/CSSPrimitiveValue.idl: |
| * css/CSSRule.idl: |
| * css/CSSStyleDeclaration.idl: |
| * css/CSSStyleSheet.idl: |
| * css/CSSSupportsRule.idl: |
| * css/CSSValue.idl: |
| * css/FontFace.idl: |
| * css/FontFaceSet.idl: |
| * css/MediaList.idl: |
| * css/WebKitCSSMatrix.idl: |
| * dom/CharacterData.idl: |
| * dom/ChildNode.idl: |
| * dom/CustomElementRegistry.idl: |
| * dom/DataTransferItemList.idl: |
| * dom/Document.idl: |
| * dom/Element.idl: |
| * dom/EventTarget.idl: |
| * dom/MessagePort.idl: |
| * dom/MutationObserver.idl: |
| * dom/NamedNodeMap.idl: |
| * dom/Node.idl: |
| * dom/ParentNode.idl: |
| * dom/Range.idl: |
| * dom/ShadowRoot.idl: |
| * dom/Text.idl: |
| * fileapi/FileReader.idl: |
| * fileapi/FileReaderSync.idl: |
| * html/DOMTokenList.idl: |
| * html/DOMURL.idl: |
| * html/HTMLCanvasElement.idl: |
| * html/HTMLElement.idl: |
| * html/HTMLEmbedElement.idl: |
| * html/HTMLFrameElement.idl: |
| * html/HTMLIFrameElement.idl: |
| * html/HTMLInputElement.idl: |
| * html/HTMLMarqueeElement.idl: |
| * html/HTMLMediaElement.idl: |
| * html/HTMLObjectElement.idl: |
| * html/HTMLOptionElement.idl: |
| * html/HTMLOptionsCollection.idl: |
| * html/HTMLProgressElement.idl: |
| * html/HTMLSelectElement.idl: |
| * html/HTMLTableElement.idl: |
| * html/HTMLTableRowElement.idl: |
| * html/HTMLTableSectionElement.idl: |
| * html/HTMLTextAreaElement.idl: |
| * html/HTMLVideoElement.idl: |
| * html/ImageData.idl: |
| * html/MediaController.idl: |
| * html/TimeRanges.idl: |
| * html/URLUtils.idl: |
| * html/canvas/CanvasGradient.idl: |
| * html/canvas/CanvasPath.idl: |
| * html/canvas/CanvasRenderingContext2D.idl: |
| * html/canvas/OESVertexArrayObject.idl: |
| * html/canvas/WebGLRenderingContextBase.idl: |
| * html/track/DataCue.idl: |
| * html/track/TextTrack.idl: |
| * html/track/TextTrackCue.idl: |
| * html/track/VTTCue.idl: |
| * html/track/VTTRegion.idl: |
| * loader/appcache/DOMApplicationCache.idl: |
| * page/Crypto.idl: |
| * page/DOMSelection.idl: |
| * page/DOMWindow.idl: |
| * page/EventSource.idl: |
| * page/History.idl: |
| * page/Location.idl: |
| * page/Performance.idl: |
| * page/UserMessageHandler.idl: |
| * page/WindowOrWorkerGlobalScope.idl: |
| * storage/Storage.idl: |
| * svg/SVGAltGlyphElement.idl: |
| * svg/SVGAngle.idl: |
| * svg/SVGAnimatedBoolean.idl: |
| * svg/SVGAnimatedEnumeration.idl: |
| * svg/SVGAnimatedInteger.idl: |
| * svg/SVGAnimatedNumber.idl: |
| * svg/SVGAnimatedString.idl: |
| * svg/SVGAnimationElement.idl: |
| * svg/SVGColor.idl: |
| * svg/SVGGlyphRefElement.idl: |
| * svg/SVGGraphicsElement.idl: |
| * svg/SVGLength.idl: |
| * svg/SVGLengthList.idl: |
| * svg/SVGMatrix.idl: |
| * svg/SVGNumberList.idl: |
| * svg/SVGPaint.idl: |
| * svg/SVGPathSegList.idl: |
| * svg/SVGPointList.idl: |
| * svg/SVGPreserveAspectRatio.idl: |
| * svg/SVGStringList.idl: |
| * svg/SVGStyleElement.idl: |
| * svg/SVGTextContentElement.idl: |
| * svg/SVGTransformList.idl: |
| * svg/SVGViewSpec.idl: |
| * testing/InternalSettings.idl: |
| * testing/Internals.idl: |
| * workers/DedicatedWorkerGlobalScope.idl: |
| * workers/Worker.idl: |
| * xml/DOMParser.idl: |
| * xml/XMLHttpRequest.idl: |
| * xml/XPathEvaluator.idl: |
| * xml/XPathExpression.idl: |
| * xml/XPathResult.idl: |
| Allowed the rename script to rename the exception-related extended attributes. |
| |
| * bindings/scripts/test/JS/JSInterfaceName.cpp: |
| * bindings/scripts/test/JS/JSInterfaceName.h: |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.h: |
| * bindings/scripts/test/JS/JSTestCallback.cpp: |
| * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: |
| * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: |
| * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: |
| * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: |
| * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestEventConstructor.h: |
| * bindings/scripts/test/JS/JSTestEventTarget.cpp: |
| * bindings/scripts/test/JS/JSTestEventTarget.h: |
| * bindings/scripts/test/JS/JSTestException.cpp: |
| * bindings/scripts/test/JS/JSTestException.h: |
| * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: |
| * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestGlobalObject.h: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.h: |
| * bindings/scripts/test/JS/JSTestIterable.cpp: |
| * bindings/scripts/test/JS/JSTestIterable.h: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: |
| * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: |
| * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: |
| * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestNamedConstructor.h: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestNode.h: |
| * bindings/scripts/test/JS/JSTestNondeterministic.cpp: |
| * bindings/scripts/test/JS/JSTestNondeterministic.h: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestObj.h: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h: |
| * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: |
| * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.h: |
| * bindings/scripts/test/JS/JSattribute.cpp: |
| * bindings/scripts/test/JS/JSattribute.h: |
| * bindings/scripts/test/JS/JSreadonly.cpp: |
| * bindings/scripts/test/JS/JSreadonly.h: |
| Regenerated. |
| |
| |
| 2016-10-02 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Media controls for Soundcloud easily falls out of sync with what's actually playing |
| https://bugs.webkit.org/show_bug.cgi?id=162843 |
| <rdar://problem/28176874> |
| |
| Reviewed by Beth Dakin. |
| |
| Currently, audio elements are subject to the same main content restrictions as video elements. This is |
| problematic on sites where audio elements are really the main content, such as soundcloud. We need a different |
| heuristic for determining whether audio elements such as these should be allowed to show playback controls. |
| |
| Furthermore, we currently forbid autoplaying audio from showing controls if it has user gesture restrictions |
| (i.e. it started playing via script). This is, again, problematic on sites where audio elements are played one |
| after another (such as on soundcloud). Even though a subsequent audio element may have been triggered via |
| script, we might want still want to show controls for it if the user has explicitly triggered other elements on |
| the page to begin playing. However, if the user has not gestured on any media in the page, we still should not |
| show controls for audio elements that begin playing via script. |
| |
| Adds two new unit tests to TestWebKitAPI simulating audio playback behavior on soundcloud. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::removeBehaviorRestriction): |
| (WebCore::MediaElementSession::canShowControlsManager): |
| (WebCore::MediaElementSession::allowsPlaybackControlsForAutoplayingAudio): |
| * html/MediaElementSession.h: |
| * page/Page.h: |
| (WebCore::Page::allowsPlaybackControlsForAutoplayingAudio): |
| (WebCore::Page::setAllowsPlaybackControlsForAutoplayingAudio): |
| |
| 2016-10-02 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, rolling out r206683. |
| |
| This change caused API test WebKit2.FindMatches to fail on |
| Mac. |
| |
| Reverted changeset: |
| |
| "The dragged image should be the current frame only of the |
| animated image" |
| https://bugs.webkit.org/show_bug.cgi?id=162109 |
| http://trac.webkit.org/changeset/206683 |
| |
| 2016-10-02 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, rolling out r206692 and r206718. |
| |
| Seems to have caused >200 failures on Sierra |
| |
| Reverted changesets: |
| |
| "Implement rendering of font-variation-settings" |
| https://bugs.webkit.org/show_bug.cgi?id=162782 |
| http://trac.webkit.org/changeset/206692 |
| |
| "Tried to fix the build after r206692." |
| http://trac.webkit.org/changeset/206718 |
| |
| 2016-10-02 Dan Bernstein <mitz@apple.com> |
| |
| Tried to fix the build after r206692. |
| |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::cascadeToLastResortAndVariationsFontDescriptor): |
| |
| 2016-10-02 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r206716. |
| https://bugs.webkit.org/show_bug.cgi?id=162858 |
| |
| It is breaking Mac CMake Debug build (Requested by youenn on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "[Fetch API] Forbid redirection to non-HTTP(s) URL in non- |
| navigation mode." |
| https://bugs.webkit.org/show_bug.cgi?id=162785 |
| http://trac.webkit.org/changeset/206716 |
| |
| 2016-10-02 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] Forbid redirection to non-HTTP(s) URL in non-navigation mode. |
| https://bugs.webkit.org/show_bug.cgi?id=162785 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by rebased and existing tests. |
| |
| Ensuring non-HTTP redirection URLs are not followed at DocumentThreadableLoader level for fetch API only. |
| This should be applied to all clients at some point, but there is still some uncertainty for data URLs. |
| |
| Did some refactoring to better separate the case of security checks in case of regular request or redirected request. |
| This allows in particular to handle more clearly the case of data URLs which are allowed in all modes for regular requests. |
| But they are not allowed for same-origin redirected requests. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::reportRedirectionWithBadScheme): Reporting bad scheme redirection error. |
| (WebCore::DocumentThreadableLoader::redirectReceived): Checking that redirection URLs are HTTP(s) in case of Fetch API. |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::willSendRequestInternal): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::requestImage): |
| (WebCore::CachedResourceLoader::checkInsecureContent): |
| (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy): |
| (WebCore::isSameOriginDataURL): |
| (WebCore::CachedResourceLoader::canRequest): |
| (WebCore::CachedResourceLoader::canRequestAfterRedirection): |
| (WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox): |
| (WebCore::CachedResourceLoader::requestResource): |
| * loader/cache/CachedResourceLoader.h: |
| |
| 2016-10-01 Simon Fraser <simon.fraser@apple.com> |
| |
| Support transitions/animations of background-position with right/bottom-relative values |
| https://bugs.webkit.org/show_bug.cgi?id=162048 |
| |
| Reviewed by Dean Jackson. |
| |
| Make transitions between "background-position: 10px 20px" and "background-position: right 10px bottom 20px" |
| work. We do this by by converting "right 10px" to "calc(100% - 10px)" when blending. |
| |
| Also improve logging of calculated lengths, and better animation logging for FillLayer properties. |
| |
| Test: transitions/background-position-transitions.html |
| |
| * page/animation/CSSPropertyAnimation.cpp: |
| (WebCore::FillLayerAnimationPropertyWrapperBase::FillLayerAnimationPropertyWrapperBase): Keep the propertyID |
| around so logging can use it. |
| (WebCore::FillLayerAnimationPropertyWrapperBase::property): |
| (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter): |
| (WebCore::FillLayerPropertyWrapperGetter::value): |
| (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper): |
| (WebCore::createCalculatedLength): |
| (WebCore::FillLayerPositionPropertyWrapper::FillLayerPositionPropertyWrapper): |
| (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper): |
| (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper): |
| (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper): |
| (WebCore::CSSPropertyAnimation::blendProperties): Blend then log, so that the logging |
| can show the result. |
| * platform/CalculationValue.cpp: |
| (WebCore::CalcExpressionNumber::dump): |
| (WebCore::CalcExpressionBinaryOperation::dump): |
| (WebCore::CalcExpressionLength::dump): |
| (WebCore::CalcExpressionBlendLength::dump): |
| (WebCore::operator<<): |
| * platform/CalculationValue.h: |
| * platform/Length.cpp: |
| (WebCore::operator<<): |
| |
| 2016-10-01 Simon Fraser <simon.fraser@apple.com> |
| |
| Bad cast when CSS position programmatically changed from -webkit-sticky to fixed |
| https://bugs.webkit.org/show_bug.cgi?id=160826 |
| |
| Reviewed by Zalan Bujtas. |
| |
| If a scrolling state tree node changed type (e.g. from sticky to fixed), we'd fail |
| to recreate the node so keep a node with the wrong type. |
| |
| Fix by destroying the node and making a new one with a new ID in this case. The |
| new ID is necessary to ensure that the scrolling tree is updated. |
| |
| Test: fast/scrolling/sticky-to-fixed.html |
| |
| * page/scrolling/ScrollingStateTree.cpp: |
| (WebCore::ScrollingStateTree::nodeTypeAndParentMatch): |
| (WebCore::ScrollingStateTree::attachNode): |
| (WebCore::ScrollingStateTree::stateNodeForID): |
| * page/scrolling/ScrollingStateTree.h: |
| |
| 2016-10-01 Youenn Fablet <youenn@apple.com> |
| |
| removing FetchBoyd::m_type |
| |
| Remove FetchBody::m_type |
| https://bugs.webkit.org/show_bug.cgi?id=162841 |
| |
| Reviewed by Sam Weinig. |
| |
| No change of behavior. |
| |
| Removing FetchBody::m_type and using m_data in lieu. |
| Introducing temporarily FetchBody::m_isEmpty to handle the case of null bodies. |
| Null body handling should be moved to FetchBodyOwner in a follow-up patch. |
| |
| * Modules/fetch/FetchBody.cpp: |
| (WebCore::FetchBody::FetchBody): |
| (WebCore::FetchBody::extract): |
| (WebCore::FetchBody::arrayBuffer): |
| (WebCore::FetchBody::blob): |
| (WebCore::FetchBody::json): |
| (WebCore::FetchBody::text): |
| (WebCore::FetchBody::consumeOnceLoadingFinished): |
| (WebCore::FetchBody::consume): |
| (WebCore::FetchBody::consumeAsStream): |
| (WebCore::FetchBody::loadingSucceeded): |
| (WebCore::FetchBody::bodyForInternalRequest): |
| (WebCore::FetchBody::clone): |
| (WebCore::FetchBody::consumeText): Deleted. |
| (WebCore::FetchBody::consumeBlob): Deleted. |
| * Modules/fetch/FetchBody.h: |
| (WebCore::FetchBody::isEmpty): |
| (WebCore::FetchBody::isBlob): |
| (WebCore::FetchBody::isFormData): |
| (WebCore::FetchBody::isArrayBuffer): |
| (WebCore::FetchBody::isArrayBufferView): |
| (WebCore::FetchBody::isURLSearchParams): |
| (WebCore::FetchBody::isText): |
| (WebCore::FetchBody::FetchBody): |
| (WebCore::FetchBody::setContentType): Deleted. |
| (WebCore::FetchBody::urlSearchParamsBody): Deleted. |
| * Modules/fetch/FetchBodyOwner.cpp: |
| (WebCore::FetchBodyOwner::consumeOnceLoadingFinished): |
| (WebCore::FetchBodyOwner::blobLoadingSucceeded): |
| (WebCore::FetchBodyOwner::finishBlobLoading): Deleted. |
| * Modules/fetch/FetchBodyOwner.h: |
| (WebCore::FetchBodyOwner::body): Deleted. |
| * Modules/fetch/FetchRequest.cpp: |
| (WebCore::FetchRequest::setBody): |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::fetch): |
| (WebCore::FetchResponse::BodyLoader::didSucceed): |
| (WebCore::FetchResponse::consume): |
| (WebCore::FetchResponse::consumeBodyAsStream): |
| (WebCore::FetchResponse::createReadableStreamSource): |
| (WebCore::FetchResponse::finishConsumingStream): Deleted. |
| * Modules/fetch/FetchResponse.h: |
| |
| 2016-09-30 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r203424): WebCore::ImageBuffer::createCompatibleBuffer() in ImageBufferCG.cpp over-releases CGColorSpaceRef objects |
| <https://webkit.org/b/162823> |
| <rdar://problem/27723268> |
| |
| Reviewed by Joseph Pecoraro. |
| |
| Code is covered by existing tests, but no crashes have been |
| observed in practice. May require running one test multiple |
| times to reproduce. |
| |
| * platform/graphics/cg/ImageBufferCG.cpp: |
| (WebCore::ImageBuffer::createCompatibleBuffer): Don't use |
| adoptCF() when the function doesn't return a +1 retained |
| CGColorSpaceRef. |
| |
| 2016-09-30 Joonghun Park <jh718.park@samsung.com> |
| |
| [EFL] Fix build break since r206661. Unreviewed |
| https://bugs.webkit.org/show_bug.cgi?id=162825 |
| |
| No new tests, no new behaviours. |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::ClipRects::ClipRects): |
| |
| 2016-09-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Declare that our variation fonts work is in progress |
| https://bugs.webkit.org/show_bug.cgi?id=162816 |
| |
| Reviewed by Simon Fraser. |
| |
| * features.json: |
| |
| 2016-09-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Turn variation fonts on by default |
| https://bugs.webkit.org/show_bug.cgi?id=162818 |
| |
| Reviewed by Simon Fraser. |
| |
| No new tests because there is no behavior change. |
| |
| * page/Settings.in: |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::variationFontsEnabled): |
| |
| 2016-09-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Implement rendering of font-variation-settings |
| https://bugs.webkit.org/show_bug.cgi?id=162782 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Because the heavy lifting for font-variation-settings is done by CoreText, |
| this patch is fairly minimal. It simply hooks up the CSS property to CoreText. |
| |
| There is an existing bug in CoreText where variations inside fonts do not |
| survive the addition of a cascade list. Therefore, FontPlatformData::ctFont() |
| needs to work around this (conditionally) by resupplying the variation at |
| the same time as the cascade list. The CoreText bug is <rdar://problem/28449441>. |
| |
| Tests: fast/text/variations/duplicate.html |
| fast/text/variations/exist.html |
| fast/text/variations/inheritance.html |
| fast/text/variations/order.html |
| fast/text/variations/outofbounds.html |
| |
| * platform/graphics/FontCache.h: |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::preparePlatformFont): |
| (WebCore::fontWithFamily): |
| (WebCore::FontCache::createFontPlatformData): |
| (WebCore::FontCache::systemFallbackForCharacters): |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::cascadeToLastResortAttributesDictionary): |
| (WebCore::cascadeToLastResortAndVariationsFontDescriptor): |
| (WebCore::FontPlatformData::ctFont): |
| (WebCore::cascadeToLastResortFontDescriptor): Deleted. |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::FontCustomPlatformData::fontPlatformData): |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): |
| |
| 2016-09-29 Sam Weinig <sam@webkit.org> |
| |
| Add initial support for IDL union conversion |
| https://bugs.webkit.org/show_bug.cgi?id=161576 |
| |
| Reviewed by Chris Dumez. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| Add IDLTypes.h |
| |
| * bindings/generic/IDLTypes.h: Added. |
| Add a basic type hierarchy for types defined by WebIDL and their corresponding |
| WebCore implementation types. |
| |
| * bindings/js/JSDOMConvert.h: |
| (WebCore::Converter<IDLDOMString>::convert): |
| (WebCore::Converter<IDLUSVString>::convert): |
| Add Converters for IDLDOMString and IDLUSVString. |
| |
| (WebCore::ConditionalConverter<typename ReturnType, typename T, bool enabled>) |
| Add a struct to allow conditional conversion of types based on a compile boolean |
| value. This allows the union code to work, by ensuring that code for types that don't |
| exist doesn't get compiled. |
| |
| (WebCore::Converter<IDLUnion>::convert): |
| Add template meta programming based version of the WebIDL conversion algorithm. It uses |
| introspection of the typelist to conditionally execute the parts of the algorithm that |
| apply and relies on the compiler eliminate the dead code it produces. This initial cut |
| doesn't implement the full algorithm, just a subset needed to see if this method will work |
| out. |
| |
| * bindings/js/JSDOMWrapper.h: |
| (WebCore::isJSDOMWrapperType): |
| Add JSDOMWrapperType to the list of well known types to allow quick checking of wrappers |
| by the union code. |
| |
| * bindings/js/JSNodeOrString.cpp: |
| (WebCore::toNodeOrStringVector): |
| Switch to new IDLUnion based converter. |
| |
| 2016-09-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Implement animation of font-variation-settings |
| https://bugs.webkit.org/show_bug.cgi?id=162783 |
| |
| Reviewed by Simon Fraser. |
| |
| Modify CSSPropertyAnimation to understand FontVariationSettings objects and how |
| to interpolate them. |
| |
| If two FontVariationSettings objects are unlike (meaning they specify different |
| variation axes), for now the interpolation simply returns an empty object. This |
| might change in the future, but for now, this is a reasonable place to start. |
| |
| Because CSSPropertyAnimation interacts with RenderStyles instead of |
| FontDescriptions, this patch adds a transparent accessor from the RenderStyle |
| to the inner FontDescription. |
| |
| Tests: animations/font-variation-settings-order.html |
| animations/font-variation-settings-unlike.html |
| animations/font-variation-settings.html |
| |
| * page/animation/CSSPropertyAnimation.cpp: |
| (WebCore::blendFunc): |
| (WebCore::PropertyWrapperFontVariationSettings::PropertyWrapperFontVariationSettings): |
| (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::setFontVariationSettings): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::fontVariationSettings): |
| |
| 2016-09-30 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] layout nodes |
| https://bugs.webkit.org/show_bug.cgi?id=162799 |
| <rdar://problem/28569301> |
| |
| Reviewed by Dean Jackson. |
| |
| Modern media controls will be using a tree of LayoutNode objects that commit to the DOM |
| in coordinated `requestAnimationFrame()` calls to ensure all layouts are done in an efficient |
| and coordinated manner. As a preamble, we introduced the `scheduler` singleton in |
| https://webkit.org/b/162726 which is in charge of scheduling callbacks. |
| |
| A LayoutNode is created by providing an Element to its constructor, or an HTML string. Not |
| providing a parameter creates a simple <div>. |
| |
| When we set a property on a LayoutNode, we call `markDirtyProperty(propertyName)` which keeps |
| track of dirty properties in the `_dirtyProperties` set. When this set is non-empty, the node |
| is marked as dirty and registered in the global `dirtyNodes` map, asking the shared scheduler |
| that a layout is needed. When the layout is performed, all nodes in the `dirtyNodes` map are |
| processed such that `commitProperty(propertyName)` is called to commit dirty properties for |
| a given node to the DOM, and `layout()` is called to allow subclasses of LayoutNode to conduct |
| custom layout logic that goes beyond committing a given property. |
| |
| Another reason why a node may be marked as dirty is when a DOM hierarchy change is needed. A |
| host of DOM-like methods are exposed to allow flexible manipulations of nodes, with an extra |
| `children` property which allows wholesale change of a node's subtree with a single array |
| property assignment. Changes to the DOM hierarchy are performed in the same scheduler callback |
| as style properties. |
| |
| Nodes can be marked for layout explicitly with by setting the `needsLayout` property. |
| |
| Tests: media/modern-media-controls/layout-node/addChild.html |
| media/modern-media-controls/layout-node/children.html |
| media/modern-media-controls/layout-node/constructor.html |
| media/modern-media-controls/layout-node/height.html |
| media/modern-media-controls/layout-node/insertAfter.html |
| media/modern-media-controls/layout-node/insertBefore.html |
| media/modern-media-controls/layout-node/parent.html |
| media/modern-media-controls/layout-node/remove.html |
| media/modern-media-controls/layout-node/removeChild.html |
| media/modern-media-controls/layout-node/subclassing.html |
| media/modern-media-controls/layout-node/visible.html |
| media/modern-media-controls/layout-node/width.html |
| media/modern-media-controls/layout-node/x.html |
| media/modern-media-controls/layout-node/y.html |
| |
| * Modules/modern-media-controls/controls/layout-node.js: Added. |
| (LayoutNode): |
| (LayoutNode.prototype.get x): |
| (LayoutNode.prototype.set x): |
| (LayoutNode.prototype.get y): |
| (LayoutNode.prototype.set y): |
| (LayoutNode.prototype.get width): |
| (LayoutNode.prototype.set width): |
| (LayoutNode.prototype.get height): |
| (LayoutNode.prototype.set height): |
| (LayoutNode.prototype.get visible): |
| (LayoutNode.prototype.set visible): |
| (LayoutNode.prototype.get needsLayout): |
| (LayoutNode.prototype.set needsLayout): |
| (LayoutNode.prototype.get parent): |
| (LayoutNode.prototype.get children): |
| (LayoutNode.prototype.set children): |
| (LayoutNode.prototype.addChild): |
| (LayoutNode.prototype.insertBefore): |
| (LayoutNode.prototype.insertAfter): |
| (LayoutNode.prototype.removeChild): |
| (LayoutNode.prototype.remove): |
| (LayoutNode.prototype.markDirtyProperty): |
| (LayoutNode.prototype.commitProperty): |
| (LayoutNode.prototype.layout): |
| (LayoutNode.prototype._markNodeManipulation): |
| (LayoutNode.prototype._updateDirtyState): |
| (LayoutNode.prototype._updateChildren): |
| (performScheduledLayout): |
| (elementFromString): |
| |
| 2016-09-30 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| The dragged image should be the current frame only of the animated image |
| https://bugs.webkit.org/show_bug.cgi?id=162109 |
| |
| Reviewed by Tim Horton. |
| |
| Instead of creating an NSImage with all the frames for the dragImage, |
| create an NSImage with the current frame only. |
| |
| * dom/DataTransferMac.mm: |
| (WebCore::DataTransfer::createDragImage): Call currentFrameNSImage() to create the dragImage. |
| * editing/cocoa/HTMLConverter.mm: |
| (fileWrapperForElement): Call the Image function with its new name. |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/Image.h: |
| (WebCore::Image::nsImage): Rename getNSImage() to nsImage(). |
| (WebCore::Image::currentFrameNSImage): Returns the NSImage of the current frame. |
| (WebCore::Image::tiffRepresentation): Rename getTIFFRepresentation() to tiffRepresentation(). |
| (WebCore::Image::getNSImage): Deleted. |
| (WebCore::Image::getTIFFRepresentation): Deleted. |
| * platform/graphics/mac/ImageMac.mm: |
| (WebCore::BitmapImage::tiffRepresentation): Rename getTIFFRepresentation() to tiffRepresentation(). |
| (WebCore::BitmapImage::nsImage): Rename getNSImage() to nsImage(). |
| (WebCore::BitmapImage::currentFrameNSImage): Returns the NSImage of the current frame. |
| (WebCore::BitmapImage::getTIFFRepresentation): Deleted. |
| (WebCore::BitmapImage::getNSImage): Deleted. |
| * platform/mac/CursorMac.mm: |
| (WebCore::createCustomCursor): Call currentFrameNSImage() since the cursor does not animate anyway. |
| * platform/mac/DragImageMac.mm: |
| (WebCore::createDragImageFromImage): Use currentFrameNSImage() for the dragImage. |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::Pasteboard::write): Call the Image function with its new name. |
| |
| 2016-09-30 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Allow sequence<Touch> input in TouchEvent constructor |
| https://bugs.webkit.org/show_bug.cgi?id=162806 |
| <rdar://problem/28566429> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Allow sequence<Touch> input in TouchEvent constructor in addition to |
| TouchList objects. It is convenient for developers to pass arrays of |
| Touch objects. |
| |
| No new tests, already covered by: |
| imported/w3c/web-platform-tests/touch-events/touch-touchevent-constructor.html |
| |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::toRefNativeArray): |
| (WebCore::toRefPtrNativeArray): |
| * bindings/js/JSDictionary.cpp: |
| (WebCore::JSDictionary::convertValue): |
| |
| 2016-09-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Parse font-variation-settings |
| https://bugs.webkit.org/show_bug.cgi?id=162781 |
| |
| Reviewed by Simon Fraser. |
| |
| CSS Fonts level 4 [1] details the font-variation-settings property which allows variations |
| to be applied to fonts which accept it. The property accepts a list of key/value |
| pairs where the keys are four-character Ascii codes and the values are floating |
| point values. The implementation uses font-feature-settings as a model, but with one |
| big difference: font-variation-settings can be animated. The set of variation points |
| are animated individually. |
| |
| This font variations work is being done behind a run-time switch, which is settable from |
| the Safari Develop menu. |
| |
| Now that FontDescription is growing, I'd like to do an investigation into the possibility of |
| moving some of the rare pieces of it into their own class to reduce memory. However, upon |
| advice, this investigation will be fairly involved and should be done in its own bug. |
| |
| Test: fast/text/variations/getComputedStyle.html |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * css/CSSAllInOne.cpp: |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSFontVariationValue.cpp: Copied from Source/WebCore/platform/graphics/FontTaggedSettings.cpp. |
| (WebCore::CSSFontVariationValue::CSSFontVariationValue): |
| (WebCore::CSSFontVariationValue::customCSSText): |
| (WebCore::CSSFontVariationValue::equals): |
| * css/CSSFontVariationValue.h: Copied from Source/WebCore/platform/graphics/FontTaggedSettings.cpp. |
| * css/CSSPropertyNames.in: |
| * css/CSSValue.cpp: |
| (WebCore::CSSValue::equals): |
| (WebCore::CSSValue::cssText): |
| (WebCore::CSSValue::destroy): |
| * css/CSSValue.h: |
| (WebCore::CSSValue::isFontVariationValue): |
| (WebCore::CSSValue::isFontFeatureValue): Deleted. |
| * css/StyleBuilderConverter.h: |
| (WebCore::StyleBuilderConverter::convertFontVariationSettings): |
| * css/StyleBuilderCustom.h: |
| (WebCore::StyleBuilderCustom::applyInitialFontVariationSettings): |
| (WebCore::StyleBuilderCustom::applyInheritFontVariationSettings): |
| (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings): Deleted. |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParserContext::CSSParserContext): |
| (WebCore::operator==): |
| (WebCore::CSSParser::parseValue): |
| (WebCore::CSSParser::parseFontFeatureSettings): |
| (WebCore::CSSParser::parseFontVariationTag): |
| (WebCore::CSSParser::parseFontVariationSettings): |
| * css/parser/CSSParser.h: |
| * css/parser/CSSParserMode.h: |
| * platform/graphics/FontCache.h: |
| (WebCore::FontDescriptionKey::FontDescriptionKey): |
| (WebCore::FontDescriptionKey::operator==): |
| (WebCore::FontDescriptionKey::computeHash): |
| * platform/graphics/FontDescription.cpp: |
| * platform/graphics/FontDescription.h: |
| (WebCore::FontDescription::variationSettings): |
| (WebCore::FontDescription::setVariationSettings): |
| (WebCore::FontDescription::operator==): |
| (WebCore::FontDescription::featureSettings): Deleted. |
| (WebCore::FontDescription::setFeatureSettings): Deleted. |
| * platform/graphics/FontTaggedSettings.cpp: |
| (WebCore::FontVariationSettings::hash): |
| (WebCore::operator<<): |
| * platform/graphics/FontTaggedSettings.h: |
| |
| 2016-09-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Followup patch to r206664 |
| https://bugs.webkit.org/show_bug.cgi?id=162774 |
| |
| Unreviewed. |
| |
| No new tests because there is no behavior change. |
| |
| * platform/graphics/FontTaggedSettings.h: |
| (WebCore::FourCharacterTagHashTraits::isDeletedValue): Deleted. |
| |
| 2016-09-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Fix fast/text/trak-optimizeLegibility.html |
| https://bugs.webkit.org/show_bug.cgi?id=162779 |
| |
| Reviewed by Simon Fraser. |
| |
| I accidentally created this test to allow an unnecessary delta |
| in the width comparison. This covered the fact that the fonts |
| were not being selected correctly in our testing code. Update the |
| font selection code to work with system fonts correctly and |
| update the test to not use a delta when performing width |
| comparisons. |
| |
| Test: fast/text/trak-optimizeLegibility.html |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::isSystemFont): |
| (WebCore::platformFontLookupWithFamily): |
| |
| 2016-09-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Create runtime flag for variation font work |
| https://bugs.webkit.org/show_bug.cgi?id=162780 |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests because there is no behavior change. |
| |
| Variation font work should be behind a runtime flag. |
| |
| * page/Settings.in: |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::Backup::Backup): |
| (WebCore::InternalSettings::Backup::restoreTo): |
| (WebCore::InternalSettings::variationFontsEnabled): |
| (WebCore::InternalSettings::setVariationFontsEnabled): |
| * testing/InternalSettings.h: |
| * testing/InternalSettings.idl: |
| |
| 2016-09-30 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Templatize internal FontFeatureSettings class for variation font support |
| https://bugs.webkit.org/show_bug.cgi?id=162774 |
| |
| Reviewed by Alex Christensen. |
| |
| Font features and font variations are similar in that they are identified |
| by four-character tags and an associated value. However, the value is an |
| int for font features and is a float for font variations. In order to |
| simplify code, we can use the same class for both, and use a template |
| argument to distinguish between the two. Then, typedefs can be used to |
| name them. |
| |
| No new tests because there is no behavior change. |
| |
| * WebCore.xcodeproj/project.pbxproj: Rename FontFeatureSettings.{cpp,h} |
| to FontTaggedSettings.{cpp,h} |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSFontFace.h: |
| * css/CSSFontFaceSource.h: |
| * css/CSSFontFeatureValue.cpp: |
| (WebCore::CSSFontFeatureValue::CSSFontFeatureValue): |
| * css/CSSFontFeatureValue.h: |
| * css/FontFace.cpp: |
| (WebCore::FontFace::featureSettings): |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::parseFontFeatureTag): |
| * loader/cache/CachedFont.h: |
| * platform/graphics/FontDescription.h: |
| * platform/graphics/FontFeatureSettings.cpp: |
| (WebCore::FontFeature::FontFeature): Deleted. |
| (WebCore::FontFeature::operator==): Deleted. |
| (WebCore::FontFeature::operator<): Deleted. |
| (WebCore::FontFeatureSettings::insert): Deleted. |
| (WebCore::FontFeatureSettings::hash): Deleted. |
| * platform/graphics/FontFeatureSettings.h: Removed. |
| (WebCore::fontFeatureTag): Deleted. |
| (WebCore::FontFeatureTagHash::hash): Deleted. |
| (WebCore::FontFeatureTagHash::equal): Deleted. |
| (WebCore::FontFeatureTagHashTraits::constructDeletedValue): Deleted. |
| (WebCore::FontFeatureTagHashTraits::isDeletedValue): Deleted. |
| (WebCore::FontFeature::operator!=): Deleted. |
| (WebCore::FontFeature::tag): Deleted. |
| (WebCore::FontFeature::value): Deleted. |
| (WebCore::FontFeature::enabled): Deleted. |
| (WebCore::FontFeatureSettings::operator==): Deleted. |
| (WebCore::FontFeatureSettings::operator!=): Deleted. |
| (WebCore::FontFeatureSettings::size): Deleted. |
| (WebCore::FontFeatureSettings::operator[]): Deleted. |
| (WebCore::FontFeatureSettings::at): Deleted. |
| (WebCore::FontFeatureSettings::begin): Deleted. |
| (WebCore::FontFeatureSettings::end): Deleted. |
| * platform/graphics/FontTaggedSettings.cpp: Renamed from Source/WebCore/platform/graphics/FontFeatureSettings.cpp. |
| (WebCore::FontFeatureSettings::hash): |
| * platform/graphics/FontTaggedSettings.h: Added. |
| (WebCore::fontFeatureTag): |
| (WebCore::FourCharacterTagHash::hash): |
| (WebCore::FourCharacterTagHash::equal): |
| (WebCore::FourCharacterTagHashTraits::constructDeletedValue): |
| (WebCore::FourCharacterTagHashTraits::isDeletedValue): |
| (WebCore::FontTaggedSetting::operator!=): |
| (WebCore::FontTaggedSetting::tag): |
| (WebCore::FontTaggedSetting::value): |
| (WebCore::FontTaggedSetting::enabled): |
| (WebCore::FontTaggedSetting<T>::FontTaggedSetting): |
| (WebCore::=): |
| (WebCore::FontTaggedSetting<T>::operator<): |
| (WebCore::FontTaggedSettings::operator==): |
| (WebCore::FontTaggedSettings::operator!=): |
| (WebCore::FontTaggedSettings::isEmpty): |
| (WebCore::FontTaggedSettings::size): |
| (WebCore::FontTaggedSettings::operator[]): |
| (WebCore::FontTaggedSettings::at): |
| (WebCore::FontTaggedSettings::begin): |
| (WebCore::FontTaggedSettings::end): |
| (WebCore::FontTaggedSettings<T>::insert): |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::tagEquals): |
| (WebCore::appendOpenTypeFeature): |
| * platform/graphics/mac/FontCustomPlatformData.h: |
| |
| 2016-09-30 Chris Dumez <cdumez@apple.com> |
| |
| Fragment serialization should always use 'xml:' prefix for attributes in XML namespace |
| https://bugs.webkit.org/show_bug.cgi?id=162803 |
| |
| Reviewed by Sam Weinig. |
| |
| Fragment serialization should always use 'xml:' prefix for attributes in XML namespace: |
| - https://html.spec.whatwg.org/#serialising-html-fragments |
| """ |
| If the attribute is in the XML namespace |
| -> The attribute's serialized name is the string "xml:" followed by the attribute's local name. |
| """ |
| |
| - https://www.w3.org/TR/DOM-Parsing/#dfn-concept-xml-serialization-algorithm |
| """ |
| If ns is the XML namespace, then let qualified name be the concatenation of the string "xml:" |
| and the value of node's localName. |
| """ |
| |
| Firefox complies with the specification. |
| |
| No new tests, rebaselined existing test. |
| |
| * editing/MarkupAccumulator.cpp: |
| (WebCore::MarkupAccumulator::appendAttribute): |
| |
| 2016-09-30 Zalan Bujtas <zalan@apple.com> |
| |
| Unreviewed, rolling out r206611. |
| |
| Scroll perf did not recover. |
| |
| Reverted changeset: |
| |
| "Unreviewed, rolling out r206483." |
| https://bugs.webkit.org/show_bug.cgi?id=162750 |
| http://trac.webkit.org/changeset/206611 |
| |
| 2016-09-30 Zalan Bujtas <zalan@apple.com> |
| |
| Remove ClipRects's custom refcounting. |
| https://bugs.webkit.org/show_bug.cgi?id=162798 |
| |
| Reviewed by Simon Fraser. |
| |
| It's safer to use RefCounted<>. |
| |
| No change in functionality. |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::ClipRects::ClipRects): |
| (WebCore::ClipRectsCache::getClipRects): |
| (WebCore::ClipRectsCache::setClipRects): |
| (WebCore::ClipRectsCache::getIndex): |
| (WebCore::RenderLayer::updateClipRects): |
| (WebCore::ClipRects::ref): Deleted. |
| (WebCore::ClipRects::deref): Deleted. |
| |
| 2016-09-30 Chris Dumez <cdumez@apple.com> |
| |
| FileSaver.js does not work in WebKit |
| https://bugs.webkit.org/show_bug.cgi?id=162788 |
| |
| Reviewed by Sam Weinig. |
| |
| FileSaver.js does not work in WebKit: |
| - https://eligrey.com/demos/FileSaver.js/ |
| |
| It works in Firefox and Chrome, but in WebKit, we were getting a |
| "Synthetic clicks on anchors that have a download attribute are |
| ignored." warning. We were too strict in restricting synthetic clicks. |
| We now allow synthetic clicks as long as they are triggered by a user |
| gesture. |
| |
| Test: fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html |
| |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::handleClick): |
| |
| 2016-09-30 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Breakpoints on blank lines or comments don't break |
| https://bugs.webkit.org/show_bug.cgi?id=9885 |
| <rdar://problem/6134406> |
| |
| Reviewed by Mark Lam. |
| |
| Tests: inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html |
| inspector/debugger/breakpoints/resolved-dump-each-line.html |
| |
| * bindings/js/CachedScriptSourceProvider.h: |
| (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider): |
| |
| 2016-09-30 Joseph Pecoraro <pecoraro@apple.com> |
| |
| Web Inspector: Stepping out of a function finishes the line that called it. |
| https://bugs.webkit.org/show_bug.cgi?id=155325 |
| <rdar://problem/25094578> |
| |
| Reviewed by Mark Lam. |
| |
| Tests: inspector/debugger/stepping/stepInto.html |
| inspector/debugger/stepping/stepOut.html |
| inspector/debugger/stepping/stepOver.html |
| inspector/debugger/stepping/stepping-arrow-functions.html |
| inspector/debugger/stepping/stepping-classes.html |
| inspector/debugger/stepping/stepping-control-flow.html |
| inspector/debugger/stepping/stepping-function-calls.html |
| inspector/debugger/stepping/stepping-function-default-parameters.html |
| inspector/debugger/stepping/stepping-literal-construction.html |
| inspector/debugger/stepping/stepping-loops.html |
| inspector/debugger/stepping/stepping-misc.html |
| inspector/debugger/stepping/stepping-switch.html |
| inspector/debugger/stepping/stepping-template-string.html |
| inspector/debugger/stepping/stepping-try-catch-finally.html |
| |
| * inspector/InspectorDOMDebuggerAgent.h: |
| * inspector/InspectorDOMDebuggerAgent.cpp: |
| (WebCore::InspectorDOMDebuggerAgent::stepInto): Deleted. |
| Setting this state in step-into does not make sense since we do not |
| know when the debugger resumes and won't know when to clear it. |
| |
| 2016-09-30 Alex Christensen <achristensen@webkit.org> |
| |
| Fix off-by-one error in URLParser::parseIPv4Host |
| https://bugs.webkit.org/show_bug.cgi?id=162789 |
| |
| Reviewed by Tim Horton. |
| |
| The spec says "If any but the last item in numbers is greater than 255, return failure." |
| This means check up to size - 1, not size - 2. |
| |
| Covered by a new API test. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseIPv4Host): |
| |
| 2016-09-30 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser: parsing a URL with an empty host and a colon should fail |
| https://bugs.webkit.org/show_bug.cgi?id=162795 |
| |
| Reviewed by Tim Horton. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseHostAndPort): |
| |
| 2016-09-30 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser: handle syntax violations in non-UTF-8 encoded queries |
| https://bugs.webkit.org/show_bug.cgi?id=162770 |
| |
| Reviewed by Tim Horton. |
| |
| There is a fast path for queries of URLs that use UTF-8 encoding, which are quite common. |
| For non-UTF-8 encoded queries, which are less common, we put the code points in a Vector<UChar> |
| and encode them all at once. If there is a syntax violation in the query, we need to copy the |
| syntax-violation-free string up to the beginning of the query, then encode the query. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::percentEncodeByte): |
| (WebCore::URLParser::encodeQuery): |
| (WebCore::URLParser::parse): |
| * platform/URLParser.h: |
| |
| 2016-09-27 Anders Carlsson <andersca@apple.com> |
| |
| Remove a couple of unused members from PlatformKeyboardEvent |
| https://bugs.webkit.org/show_bug.cgi?id=162641 |
| |
| Reviewed by Tim Horton. |
| |
| * platform/PlatformKeyboardEvent.h: |
| (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): |
| (WebCore::PlatformKeyboardEvent::nativeVirtualKeyCode): Deleted. |
| (WebCore::PlatformKeyboardEvent::macCharCode): Deleted. |
| * platform/mac/PlatformEventFactoryMac.mm: |
| (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder): |
| * replay/SerializationMethods.cpp: |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue): |
| |
| 2016-09-30 Antti Koivisto <antti@apple.com> |
| |
| Remove "rem" unit optimization for document element font size changes |
| https://bugs.webkit.org/show_bug.cgi?id=162778 |
| |
| Reviewed by Alex Christensen. |
| |
| We awkwardly track from the parser level if any stylesheet in a document uses any rem units. This is only used to minimally |
| optimize a case where document element's (<html>) font size changes dynamically. |
| |
| In practice such changes are rare. Browsing around I couldn't find a single case where this optimization got used. |
| Even if it was used it would be of low value as a full style resolution is likely to happen anyway (as font inherits) |
| and the only thing really saved is that we don't need to invalidate the matched properties cache. |
| |
| * css/CSSGrammar.y.in: |
| * css/StyleSheetContents.cpp: |
| (WebCore::StyleSheetContents::StyleSheetContents): |
| * css/StyleSheetContents.h: |
| * dom/AuthorStyleSheets.cpp: |
| (WebCore::AuthorStyleSheets::updateActiveStyleSheets): |
| * dom/AuthorStyleSheets.h: |
| (WebCore::AuthorStyleSheets::usesRemUnits): Deleted. |
| (WebCore::AuthorStyleSheets::setUsesRemUnit): Deleted. |
| * dom/Document.cpp: |
| (WebCore::Document::recalcStyle): |
| (WebCore::Document::updateBaseURL): |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::resolveElement): |
| |
| 2016-09-30 Zalan Bujtas <zalan@apple.com> |
| |
| RenderLayer::clipRects may return nullptr. |
| https://bugs.webkit.org/show_bug.cgi?id=162729 |
| |
| Reviewed by Chris Dumez. |
| |
| This patch refactors RenderLayer::updateClipRects(), parentClipRects() and backgroundClipRect() |
| so that we don't have to rely on this seemingly unsafe line: clipRects = *parent()->clipRects(clipRectsContext); |
| Now updateClipRects() returns the computed/cached clip rects as opposed to update and refetch them. |
| While this patch makes the code look more readable/safer, it also eliminates cached item tripple retrievals. |
| |
| No change in functionality. |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::ClipRectsCache::getClipRects): |
| (WebCore::ClipRectsCache::setClipRects): |
| (WebCore::RenderLayer::updateClipRects): |
| (WebCore::RenderLayer::clipRects): |
| (WebCore::RenderLayer::calculateClipRects): |
| * rendering/RenderLayer.h: |
| |
| 2016-09-30 Youenn Fablet <youenn@apple.com> |
| |
| Add a way to go from a RefPtr<T> to Ref<const T> |
| https://bugs.webkit.org/show_bug.cgi?id=162683 |
| |
| Reviewed by Alex Christensen. |
| |
| No change of behavior. |
| |
| * Modules/fetch/FetchBody.cpp: |
| (WebCore::FetchBody::extract): |
| |
| 2016-09-30 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Unreviewed, fix 32-bit build. |
| |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::decodedSizeChanged): |
| |
| 2016-09-30 Youenn Fablet <youenn@apple.com> |
| |
| FetchBody should use UTF8Encoding to encode text data |
| https://bugs.webkit.org/show_bug.cgi?id=162775 |
| |
| Reviewed by Sam Weinig. |
| |
| Covered by added tests. |
| |
| Removing unnecesary vector allocation when extracting UTF8 bytes from a Request/Response text/URLSearchParams body. |
| Making use of UTF8Encoding for consistency with the upload code path. |
| |
| * Modules/fetch/FetchBody.cpp: |
| (WebCore::FetchBody::consumeAsStream): |
| (WebCore::FetchBody::consumeText): |
| (WebCore::extractBytesFromText): Deleted. |
| |
| 2016-09-30 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Change the MemoryCache and CachedResource adjustSize functions to take a long argument |
| https://bugs.webkit.org/show_bug.cgi?id=162708 |
| <rdar://problem/28555702> |
| |
| Reviewed by Brent Fulgham. |
| |
| Because the MemoryCache stores the size of the cached memory in unsigned, |
| two problems my happen when reporting a change in the size of the memory: |
| |
| 1. Signed integer overflow -- which can happen because MemoryCache::adjustSize() |
| takes a signed integer argument. If the allocated or the freed memory size is |
| larger than the maximum of a signed integer, an overflow will happen. |
| For the image caching code, this can be seen where the unsigned decodedSize |
| is casted to an integer before passing it to ImageObserver::decodedSizeChanged(). |
| |
| 2. Unsigned integer overflow -- which can happen if the new allocated memory |
| size plus the currentSize exceeds the maximum of unsigned. |
| This can be seen in MemoryCache::adjustSize() where we add delta to m_liveSize |
| or m_deadSize without checking whether this addition will overflow or not. We |
| do not assert for overflow although we assert for underflow. |
| |
| The fix for these two problems can be the following: |
| |
| 1. Make all the adjustSize functions all the way till MemoryCache::adjustSize() |
| take a signed long integer argument. |
| |
| 2. Do not create a NativeImagePtr for an ImageFrame if its frameBytes plus the |
| ImageFrameCache::decodedSize() will exceed the maximum of an unsigned integer. |
| |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::decodedSizeChanged): Change the argument to be long. No overflow will happen when casting the argument from unsigned to long. |
| * loader/cache/CachedImage.h: |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::setDecodedSize): Use long integer casting when calling MemoryCache::adjustSize(). |
| (WebCore::CachedResource::setEncodedSize): Ditto. |
| * loader/cache/MemoryCache.cpp: |
| (WebCore::MemoryCache::MemoryCache): Add as static assert to ensure sizeof(long long) can hold any unsigned or its negation. |
| (WebCore::MemoryCache::revalidationSucceeded): Use long integer casting when calling MemoryCache::adjustSize(). |
| (WebCore::MemoryCache::remove): Ditto. |
| (WebCore::MemoryCache::adjustSize): Change the function argument to long integer. No overflow will happen when casting the argument from unsigned to long. |
| * loader/cache/MemoryCache.h: |
| * platform/graphics/ImageFrameCache.cpp: |
| (WebCore::ImageFrameCache::destroyIncompleteDecodedData): Call a function with its new name. |
| (WebCore::ImageFrameCache::decodedSizeChanged): Change the function argument to long integer. No overflow will happen when casting the argument from unsigned to long. |
| (WebCore::ImageFrameCache::decodedSizeIncreased): Use long integer casting when calling decodedSizeChanged(). |
| (WebCore::ImageFrameCache::decodedSizeDecreased): Ditto. |
| (WebCore::ImageFrameCache::decodedSizeReset): Ditto. |
| (WebCore::ImageFrameCache::didDecodeProperties): Ditto. |
| (WebCore::ImageFrameCache::frameAtIndex): Do not create the NativeImage if adding its frameByes to the MemoryCache will cause numerical overflow. |
| (WebCore::ImageFrameCache::decodedSizeIncremented): Deleted. This function is renamed decodedSizeIncreased(). |
| (WebCore::ImageFrameCache::decodedSizeDecremented): Deleted. This function is renamed decodedSizeDecreased(). |
| * platform/graphics/ImageFrameCache.h: |
| * platform/graphics/ImageObserver.h: |
| * platform/graphics/IntSize.h: |
| (WebCore::IntSize::unclampedArea): Returns the area of an IntSize in size_t. |
| * platform/graphics/cg/PDFDocumentImage.cpp: |
| (WebCore::PDFDocumentImage::decodedSizeChanged): Use long integer casting when calling ImageObserver::decodedSizeChanged(). |
| |
| 2016-09-30 Chris Dumez <cdumez@apple.com> |
| |
| Add support for ImageData.data attribute |
| https://bugs.webkit.org/show_bug.cgi?id=162767 |
| |
| Reviewed by Sam Weinig. |
| |
| Add support for ImageData.data attribute: |
| - https://html.spec.whatwg.org/#imagedata |
| |
| Firefox already supports it. |
| |
| No new tests, updated existing tests. |
| |
| * html/ImageData.idl: |
| |
| 2016-09-30 Youenn Fablet <youenn@apple.com> |
| |
| DumpRenderTree crashed in com.apple.WebCore: WTF::Optional<WebCore::FetchBodyOwner::BlobLoader>::operator bool const + 12 |
| https://bugs.webkit.org/show_bug.cgi?id=162483 |
| |
| Reviewed by Alex Christensen. |
| |
| Test: fetch/closing-while-fetching-blob.html |
| No change of behavior. |
| |
| * Modules/fetch/FetchBodyOwner.cpp: |
| (WebCore::FetchBodyOwner::stop): Asserting m_blobLoader is null (meaning that unsetPendingActivity was done) |
| only in case FetchBodyOwner has no risk being destroyed. |
| |
| 2016-09-30 Youenn Fablet <youennf@gmail.com> |
| |
| [Fetch API] Add support for URLSearchParams body |
| https://bugs.webkit.org/show_bug.cgi?id=162667 |
| |
| Reviewed by Alex Christensen. |
| |
| Tests: imported/w3c/web-platform-tests/fetch/api/basic/request-upload-worker.html |
| imported/w3c/web-platform-tests/fetch/api/basic/request-upload.html |
| |
| * Modules/fetch/FetchBody.cpp: |
| (WebCore::extractBytesFromText): Moving to a static function that should be moved to a String method. |
| (WebCore::FetchBody::FetchBody): Adding constructor for URLSearchParams. |
| (WebCore::FetchBody::extract): Adding URLSearchParams body initialization. |
| (WebCore::FetchBody::consume): Consuming URLSearchParams bodies. |
| (WebCore::FetchBody::consumeAsStream): Ditto. |
| (WebCore::FetchBody::consumeText): Updated to take a parameter to handle both text and URLSearchParams bodies. |
| (WebCore::FetchBody::bodyForInternalRequest): Add URLSearchParams body upload. |
| (WebCore::FetchBody::clone): Add URLSearchParams body cloning |
| * Modules/fetch/FetchBody.h: |
| (WebCore::FetchBody::urlSearchParamsBody): |
| * html/URLSearchParams.cpp: |
| (WebCore::URLSearchParams::toString): |
| * html/URLSearchParams.h: |
| |
| 2016-09-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Re-order the arguments to drawPattern() functions |
| https://bugs.webkit.org/show_bug.cgi?id=162772 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Re-order the arguments to have the destination rect come near the front, |
| leaving CompositeOperator and BlendMode hanging out at the back like |
| other drawing functions. |
| |
| No behavior change. |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::drawPattern): |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/CrossfadeGeneratedImage.cpp: |
| (WebCore::CrossfadeGeneratedImage::drawPattern): |
| * platform/graphics/CrossfadeGeneratedImage.h: |
| * platform/graphics/GeneratedImage.h: |
| * platform/graphics/GradientImage.cpp: |
| (WebCore::GradientImage::drawPattern): |
| * platform/graphics/GradientImage.h: |
| * platform/graphics/GraphicsContext.h: |
| * platform/graphics/Image.cpp: |
| (WebCore::Image::drawTiled): |
| * platform/graphics/Image.h: |
| * platform/graphics/ImageBuffer.h: |
| * platform/graphics/NamedImageGeneratedImage.cpp: |
| (WebCore::NamedImageGeneratedImage::drawPattern): |
| * platform/graphics/NamedImageGeneratedImage.h: |
| * platform/graphics/cairo/GraphicsContextCairo.cpp: |
| (WebCore::GraphicsContext::drawPattern): |
| * platform/graphics/cairo/ImageBufferCairo.cpp: |
| (WebCore::ImageBuffer::drawPattern): |
| * platform/graphics/cairo/ImageCairo.cpp: |
| (WebCore::Image::drawPattern): |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| (WebCore::GraphicsContext::drawPattern): |
| * platform/graphics/cg/ImageBufferCG.cpp: |
| (WebCore::ImageBuffer::drawPattern): |
| * platform/graphics/cg/ImageCG.cpp: This file can probably be removed and the code moved, since the |
| code is almost the same as the cairo code, and not platform-specific. |
| (WebCore::Image::drawPattern): |
| * platform/graphics/displaylists/DisplayListItems.cpp: |
| (WebCore::DisplayList::DrawPattern::DrawPattern): |
| (WebCore::DisplayList::DrawPattern::apply): |
| * platform/graphics/displaylists/DisplayListItems.h: |
| (WebCore::DisplayList::DrawPattern::create): |
| * platform/graphics/displaylists/DisplayListRecorder.cpp: |
| (WebCore::DisplayList::Recorder::drawPattern): |
| * platform/graphics/displaylists/DisplayListRecorder.h: |
| * svg/graphics/SVGImage.cpp: |
| (WebCore::SVGImage::drawPatternForContainer): |
| * svg/graphics/SVGImageForContainer.cpp: |
| (WebCore::SVGImageForContainer::drawPattern): |
| * svg/graphics/SVGImageForContainer.h: |
| |
| 2016-09-29 Chris Dumez <cdumez@apple.com> |
| |
| Add support for download attribute on area elements |
| https://bugs.webkit.org/show_bug.cgi?id=162765 |
| |
| Reviewed by Brent Fulgham. |
| |
| Add support for download attribute on area elements: |
| - https://html.spec.whatwg.org/#htmlanchorelement |
| |
| Because HTMLAreaElement inherits from HTMLAnchorElement on native side, |
| and because HTMLAnchorElement already supports the download attribute, |
| all that was needed was to add the download attribute to |
| HTMLAreaElement.idl file. |
| |
| Test: http/tests/download/area-download.html |
| |
| * html/HTMLAreaElement.idl: |
| |
| 2016-09-29 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Editor::findStringAndScrollToVisible is unused |
| https://bugs.webkit.org/show_bug.cgi?id=162762 |
| |
| Reviewed by Simon Fraser. |
| |
| Deleted the unused function. |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::findStringAndScrollToVisible): Deleted. |
| * editing/Editor.h: |
| |
| 2016-09-29 Jiewen Tan <jiewen_tan@apple.com> |
| |
| Expose CryptoKey to web workers |
| https://bugs.webkit.org/show_bug.cgi?id=162640 |
| <rdar://problem/28182204> |
| |
| Reviewed by Brent Fulgham. |
| |
| Tests: crypto/workers/aes-postMessage-worker.html |
| crypto/workers/hmac-postMessage-worker.html |
| crypto/workers/hrsa-postMessage-worker.html |
| crypto/workers/multiple-postMessage-worker.html |
| crypto/workers/rsa-postMessage-worker.html |
| |
| * crypto/CryptoKey.idl: |
| * crypto/SerializedCryptoKeyWrap.h: |
| * crypto/mac/SerializedCryptoKeyWrapMac.mm: |
| (WebCore::deleteDefaultWebCryptoMasterKey): |
| Add a way to delete the default web crypto master key such that we can test |
| these APIs and cleanup. |
| * workers/WorkerGlobalScope.cpp: |
| (WebCore::WorkerGlobalScope::wrapCryptoKey): |
| (WebCore::WorkerGlobalScope::unwrapCryptoKey): |
| * workers/WorkerGlobalScope.h: |
| |
| 2016-09-29 Nan Wang <n_wang@apple.com> |
| |
| AX: iOS: Tapping <input> in Safari zooms in a bit when page has max scale = 1 |
| https://bugs.webkit.org/show_bug.cgi?id=162471 |
| |
| Reviewed by Simon Fraser. |
| |
| If the author has defined a maximum scale, we should honor that when keyboard focus moves |
| to a text field, instead of using the forceAlwaysUserScalableMaximumScale. |
| |
| Tests: fast/forms/ios/user-scalable-does-not-scale-for-keyboard-focus-with-author-defined-scale.html |
| fast/forms/ios/user-scalable-does-not-scale-for-keyboard-focus-with-user-scalable-no.html |
| fast/forms/ios/user-scalable-scales-for-keyboard-focus-with-no-author-defined-scale.html |
| |
| * page/ViewportConfiguration.cpp: |
| (WebCore::ViewportConfiguration::allowsUserScaling): |
| (WebCore::ViewportConfiguration::allowsUserScalingIgnoringAlwaysScalable): |
| (WebCore::ViewportConfiguration::allowsUserScalingIgnoringForceAlwaysScaling): Deleted. |
| * page/ViewportConfiguration.h: |
| (WebCore::ViewportConfiguration::maximumScaleIgnoringAlwaysScalable): |
| (WebCore::ViewportConfiguration::maximumScale): Deleted. |
| |
| 2016-09-29 Alex Christensen <achristensen@webkit.org> |
| |
| Fix syntax violation handling in IPv4 address parsing |
| https://bugs.webkit.org/show_bug.cgi?id=162756 |
| |
| Reviewed by Tim Horton. |
| |
| When we are parsing the up to 4 numbers in an IPv4 address, if we find a syntax violation |
| (the canonicalized address would be different than the input string) then wait to report |
| it until we have determined that this is a valid IPv4 address that will be canonicalized. |
| If it is not a valid IPv4 address, then we will just treat the characters as the host, and |
| that could be no syntax violation. |
| |
| Covered by a new API test and existing API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::URLParser): |
| (WebCore::URLParser::parseIPv4Number): |
| (WebCore::URLParser::parseIPv4Host): |
| * platform/URLParser.h: |
| |
| 2016-09-29 Chris Dumez <cdumez@apple.com> |
| |
| Fix post-landing nits after r206561. |
| https://bugs.webkit.org/show_bug.cgi?id=162659 |
| |
| Reviewed by Alex Christensen. |
| |
| Uses more StringViews and constness. |
| |
| * dom/SecurityContext.cpp: |
| (WebCore::SecurityContext::isSupportedSandboxPolicy): |
| * dom/SecurityContext.h: |
| * html/DOMTokenList.cpp: |
| (WebCore::DOMTokenList::DOMTokenList): |
| (WebCore::DOMTokenList::supports): |
| * html/DOMTokenList.h: |
| (WebCore::DOMTokenList::DOMTokenList): |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::relList): |
| * html/HTMLIFrameElement.cpp: |
| (WebCore::HTMLIFrameElement::sandbox): |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::relList): |
| * html/LinkRelAttribute.cpp: |
| (WebCore::LinkRelAttribute::isSupported): |
| * html/LinkRelAttribute.h: |
| |
| 2016-09-29 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should correctly parse ports with leading 0's |
| https://bugs.webkit.org/show_bug.cgi?id=162752 |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parsePort): |
| Followup. Remove branches based on Geoffrey's feedback. |
| |
| 2016-09-29 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should correctly parse ports with leading 0's |
| https://bugs.webkit.org/show_bug.cgi?id=162752 |
| |
| Reviewed by Tim Horton. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parsePort): |
| |
| 2016-09-29 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, rolling out r206483. |
| https://bugs.webkit.org/show_bug.cgi?id=162750 |
| |
| May have caused iOS perf regression (Requested by smfr on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "REGRESSION (r204552): Yelp carousel animation is not smooth." |
| https://bugs.webkit.org/show_bug.cgi?id=162632 |
| http://trac.webkit.org/changeset/206483 |
| |
| 2016-09-29 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser: make parsing invalid IPv4 addresses more robust and correct |
| https://bugs.webkit.org/show_bug.cgi?id=162746 |
| |
| Reviewed by Tim Horton. |
| |
| If parsing an IPv4 address fails, the characters are just treated as a regular domain. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseIPv4Number): |
| (WebCore::URLParser::parseIPv4Host): |
| |
| 2016-09-29 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser: IPv6 addresses followed by a colon are invalid |
| https://bugs.webkit.org/show_bug.cgi?id=162747 |
| |
| Reviewed by Tim Horton. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseIPv6Host): |
| |
| 2016-09-29 Antoine Quint <graouts@apple.com> |
| |
| [Modern Media Controls] scheduler for layout nodes |
| https://bugs.webkit.org/show_bug.cgi?id=162726 |
| <rdar://problem/28543043> |
| |
| Reviewed by Dean Jackson. |
| |
| For the work on the modern media controls we will be using a tree of LayoutNode objects that will |
| commit to the DOM in coordinated `requestAnimationFrame()` calls to ensure all layouts are done |
| in an efficient and coordinated manner. As a preamble, we introduce a `scheduler` singleton which |
| provides a single public method `scheduleLayout(callback)` to queue callbacks to be fired in the |
| next `requestAnimationFrame()` callback. |
| |
| Tests: media/modern-media-controls/scheduler/not-reentrant.html |
| media/modern-media-controls/scheduler/single-callback-when-registered-multiple-times.html |
| |
| * Modules/modern-media-controls/controls/scheduler.js: Added. |
| (const.scheduler.new.prototype.scheduleLayout): |
| (const.scheduler.new.prototype._requestFrameIfNeeded): |
| (const.scheduler.new.prototype._frameDidFire): |
| (const.scheduler.new.prototype._layout): |
| |
| 2016-09-28 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Text nodes assigned to a linked slot are not clickable |
| https://bugs.webkit.org/show_bug.cgi?id=162091 |
| <rdar://problem/28383300> |
| |
| Reviewed by Antti Koivisto. |
| |
| The bug was caused by updateMouseEventTargetNode adjusting the target to its parent element when |
| the original target was a text node. Fixed the bug by using the parent element in the composed tree. |
| |
| Also fixed the bug that the hit testing was not finding the anchor element and keeping the cursor |
| in I-beam by traversing the composed tree instead. |
| |
| Test: fast/shadow-dom/click-text-inside-linked-slot.html |
| |
| * dom/Node.cpp: |
| (WebCore::Node::enclosingLinkEventParentOrSelf): Fixed the cursor problem. |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::updateMouseEventTargetNode): Fixed the activation problem. |
| |
| 2016-09-29 Sam Weinig <sam@webkit.org> |
| |
| Allow overriding some NSURLSessionConfiguration properties on a per-NetworkProcess basis |
| <rdar://problem/27648683> |
| https://bugs.webkit.org/show_bug.cgi?id=162735 |
| |
| Reviewed by Dan Bernstein. |
| |
| * platform/spi/cf/CFNetworkSPI.h: |
| Forward declare _sourceApplicationSecondaryIdentifier and _CTDataConnectionServiceType |
| |
| 2016-09-29 Antti Koivisto <antti@apple.com> |
| |
| Remove addSubresourceStyleURLs functions |
| https://bugs.webkit.org/show_bug.cgi?id=162731 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Use the generic std::function taking traverseSubresources instead. This prevents bugs caused by the code paths |
| not being in sync. |
| |
| These functions are only used by the legacy webarchive code to gather URLs to locate CachedResources from the memory cache. |
| This can be improved further by returning the cached resources themselves instead of the URLs. |
| |
| * css/CSSFontFaceSrcValue.cpp: |
| (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Deleted. |
| * css/CSSFontFaceSrcValue.h: |
| * css/CSSPrimitiveValue.cpp: |
| (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Deleted. |
| * css/CSSPrimitiveValue.h: |
| * css/CSSReflectValue.cpp: |
| (WebCore::CSSReflectValue::addSubresourceStyleURLs): Deleted. |
| * css/CSSReflectValue.h: |
| * css/CSSValue.cpp: |
| (WebCore::CSSValue::addSubresourceStyleURLs): Deleted. |
| * css/CSSValue.h: |
| * css/CSSValueList.cpp: |
| (WebCore::CSSValueList::addSubresourceStyleURLs): Deleted. |
| * css/CSSValueList.h: |
| * css/StyleProperties.cpp: |
| (WebCore::StyleProperties::addSubresourceStyleURLs): Deleted. |
| * css/StyleProperties.h: |
| * css/StyleRuleImport.h: |
| * css/StyleSheetContents.cpp: |
| (WebCore::StyleSheetContents::traverseSubresources): |
| |
| Fix a bug where this would miss @import rules in @imported stylesheets. |
| Include the CachedResource for the imported stylesheet itself. |
| |
| Tested by the test cases under LayoutTests/webarchive |
| |
| (WebCore::StyleSheetContents::addSubresourceStyleURLs): Deleted. |
| * css/StyleSheetContents.h: |
| * dom/StyledElement.cpp: |
| (WebCore::StyledElement::addSubresourceAttributeURLs): |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): |
| * html/HTMLStyleElement.cpp: |
| (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): |
| |
| 2016-09-29 Brent Fulgham <bfulgham@apple.com> |
| |
| [Win][Direct2D] Add D2D Font handling code |
| https://bugs.webkit.org/show_bug.cgi?id=162712 |
| |
| Reviewed by Brent Fulgham. |
| |
| This patch lands a set of new files that implement |
| |
| No new tests until complete backend lands. |
| |
| * platform/graphics/Font.h: |
| * platform/graphics/FontCascade.h: |
| (WebCore::FontCascade::syntheticObliqueAngle): Added helper function. |
| * platform/graphics/FontPlatformData.h: |
| (WebCore::FontPlatformData::dwFont): Added. |
| (WebCore::FontPlatformData::dwFontFace): Ditto. |
| * platform/graphics/GlyphBuffer.h: |
| * platform/graphics/cocoa/FontCascadeCocoa.mm: |
| (WebCore::FontCascade::drawGlyphs): Use helper function. |
| * platform/graphics/win/FontCGWin.cpp: |
| (WebCore::FontCascade::drawGlyphs): Ditto. |
| * platform/graphics/win/FontCacheWin.cpp: |
| (WebCore::FontCache::createFontPlatformData): Add case for Direct2D. |
| * platform/graphics/win/FontCascadeDirect2D.cpp: Added. |
| * platform/graphics/win/FontCustomPlatformData.cpp: |
| (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Fix whitespace. |
| (WebCore::FontCustomPlatformData::fontPlatformData): Add Direct2D case. |
| * platform/graphics/win/FontPlatformDataCGWin.cpp: |
| (WebCore::FontPlatformData::FontPlatformData): Clean up C++ initializers. |
| * platform/graphics/win/FontPlatformDataCairoWin.cpp: |
| (WebCore::FontPlatformData::FontPlatformData): Ditto. |
| * platform/graphics/win/FontPlatformDataDirect2D.cpp: Added. |
| * platform/graphics/win/FontPlatformDataWin.cpp: |
| (WebCore::FontPlatformData::FontPlatformData): Clean up C++ initializers. |
| * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp: Added. |
| * platform/graphics/win/SimpleFontDataDirect2D.cpp: Added. |
| * platform/graphics/win/TextAnalyzerHelper.cpp: Added. |
| * platform/graphics/win/TextAnalyzerHelper.h: Added. |
| |
| 2016-09-29 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should fail to parse unclosed IPv6 addresses |
| https://bugs.webkit.org/show_bug.cgi?id=162715 |
| |
| Reviewed by Tim Horton. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseHostAndPort): |
| |
| 2016-09-29 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should ignore tabs at all possible locations |
| https://bugs.webkit.org/show_bug.cgi?id=162711 |
| |
| Reviewed by Tim Horton. |
| |
| The URL spec says to remove all tabs and newlines before parsing a URL. |
| To reduce passes on the URL and copies of data, I chose to just ignore them every time I increment the iterator. |
| This is fragile, but faster. It can be completely tested, though. That is what this patch does. |
| |
| Covered by an addition to the API tests that tries inserting one tab at each location of each test. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::advance): |
| (WebCore::URLParser::isWindowsDriveLetter): |
| (WebCore::URLParser::appendWindowsDriveLetter): |
| (WebCore::URLParser::isPercentEncodedDot): |
| (WebCore::URLParser::isSingleDotPathSegment): |
| (WebCore::URLParser::isDoubleDotPathSegment): |
| (WebCore::URLParser::consumeSingleDotPathSegment): |
| (WebCore::URLParser::consumeDoubleDotPathSegment): |
| (WebCore::URLParser::checkLocalhostCodePoint): |
| (WebCore::URLParser::isAtLocalhost): |
| (WebCore::URLParser::isLocalhost): |
| (WebCore::URLParser::URLParser): |
| (WebCore::URLParser::parse): |
| (WebCore::isPercentEncodedDot): Deleted. |
| (WebCore::isSingleDotPathSegment): Deleted. |
| (WebCore::isDoubleDotPathSegment): Deleted. |
| (WebCore::consumeSingleDotPathSegment): Deleted. |
| (WebCore::consumeDoubleDotPathSegment): Deleted. |
| * platform/URLParser.h: |
| (WebCore::URLParser::advance): |
| |
| 2016-09-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Fix hit testing on display:block <svg> elements |
| https://bugs.webkit.org/show_bug.cgi?id=162717 |
| rdar://problem/23261130 |
| |
| Reviewed by Zalan Bujtas. |
| |
| RenderSVGRoot::nodeAtPoint() needs to test for both the HitTestBlockBackground and |
| HitTestChildBlockBackground phases, since we only get the HitTestChildBlockBackground |
| phase when the <svg> is a block. This is similar to code in RenderTable::nodeAtPoint(), |
| and matches Blink code. |
| |
| This fixes the point dragging on http://anthonydugois.com/svg-path-builder/. |
| |
| Test: svg/hittest/block-svg.html |
| |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::nodeAtPoint): |
| |
| 2016-09-29 Chris Dumez <cdumez@apple.com> |
| |
| Assigning non-numeric to input.minlength should set minlength to 0 |
| https://bugs.webkit.org/show_bug.cgi?id=162727 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| There was a typo when we were updating the m_minLength member from the 'min' |
| content attribute instead of the 'minlength' one. |
| |
| Test: imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/minlength.html. |
| |
| * html/HTMLInputElement.cpp: |
| (WebCore::HTMLInputElement::parseAttribute): |
| |
| 2016-09-29 Chris Dumez <cdumez@apple.com> |
| |
| [Web IDL] Fix overload resolution when the distinguishing argument is a Window |
| https://bugs.webkit.org/show_bug.cgi?id=162728 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Fix overload resolution when the distinguishing argument is a Window. |
| Window is special because we could have a window or a proxy to the |
| Window (JSDOMWindowShell). |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateOverloadedFunctionOrConstructor): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9): |
| (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): |
| (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11): |
| (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12): |
| (WebCore::jsTestObjPrototypeFunctionOverloadedMethod13): |
| (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): |
| * bindings/scripts/test/TestObj.idl: |
| |
| 2016-09-29 Per Arne Vollan <pvollan@apple.com> |
| |
| [Win] Compile fix. |
| https://bugs.webkit.org/show_bug.cgi?id=162262 |
| |
| Reviewed by Anders Carlsson. |
| |
| If CoreText.h is included, we will get redefinition compile errors on some older SDK |
| versions. |
| |
| * platform/spi/win/CoreTextSPIWin.h: |
| |
| 2016-09-29 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [SOUP] Remove WebCoreSynchronousLoader from ResourceHandleSoup |
| https://bugs.webkit.org/show_bug.cgi?id=162723 |
| |
| Reviewed by Sergio Villar Senin. |
| |
| Since all soup based ports switched to NetworkProcess this is dead code. |
| |
| * platform/network/soup/ResourceHandleSoup.cpp: |
| (WebCore::ResourceHandle::platformLoadResourceSynchronously): |
| |
| 2016-09-29 Nan Wang <n_wang@apple.com> |
| |
| AX: Meter: [Mac] Content in label element should be used as AXTitle or AXDescription |
| https://bugs.webkit.org/show_bug.cgi?id=162586 |
| |
| Reviewed by Chris Fleizach. |
| |
| Exposed the label element's text as AXDescription for meter elements. |
| Also refactored the code for fetching the label element's text and taken care of |
| the case where aria-label and aria-labelledby attributes are used on label elements. |
| |
| Test: accessibility/mac/meter-with-label-element.html |
| |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::isLabelable): |
| (WebCore::AccessibilityNodeObject::textForLabelElement): |
| (WebCore::AccessibilityNodeObject::titleElementText): |
| (WebCore::AccessibilityNodeObject::title): |
| (WebCore::AccessibilityNodeObject::usesAltTagForTextComputation): Deleted. |
| * accessibility/AccessibilityNodeObject.h: |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::exposesTitleUIElement): |
| |
| 2016-09-29 Romain Bellessort <romain.bellessort@crf.canon.fr> |
| |
| [Streams API] Improve ReadableStreamDefaultController.h/cpp |
| https://bugs.webkit.org/show_bug.cgi?id=160293 |
| |
| Reviewed by Youenn Fablet. |
| |
| Various small improvements in ReadableStreamDefaultController code (helper methods and asserts). |
| |
| No change in behaviour. |
| |
| * bindings/js/ReadableStreamDefaultController.cpp: |
| (WebCore::ReadableStreamDefaultController::isControlledReadableStreamLocked): Added an assert and updated based |
| on new helper methods. |
| * bindings/js/ReadableStreamDefaultController.h: |
| (WebCore::ReadableStreamDefaultController::close): Updated based on new helper methods. |
| (WebCore::ReadableStreamDefaultController::error): Updated based on new helper methods. |
| (WebCore::ReadableStreamDefaultController::enqueue): Added an assert and updated based on new helper methods. |
| (WebCore::ReadableStreamDefaultController::jsController): New helper method. |
| (WebCore::ReadableStreamDefaultController::globalObject): Return reference instead of pointer. |
| (WebCore::ReadableStreamDefaultController::globalExec): New helper; return reference after performing an assert. |
| (WebCore::ReadableStreamDefaultController::error<String>): Added an assert and updated based on new helper methods. |
| |
| 2016-09-29 Jon Davis <jond@apple.com> |
| |
| Added Beacon API to the Feature Status page. |
| https://bugs.webkit.org/show_bug.cgi?id=162630 |
| |
| Reviewed by Alex Christensen. |
| |
| * features.json: |
| |
| 2016-09-28 Chris Dumez <cdumez@apple.com> |
| |
| Drop first 'state' parameter to JSDOMWindow::toWrapped() / JSEventTarget::toWrapped() |
| https://bugs.webkit.org/show_bug.cgi?id=162709 |
| |
| Reviewed by Alex Christensen. |
| |
| Drop first 'state' parameter to JSDOMWindow::toWrapped() / JSEventTarget::toWrapped() |
| as it is unused. This is the quickest way to allow DOMWindow / EventTarget members |
| in IDL dictionaries. This is because the generated bindings code relies on |
| convertWrapperType() in JSDOMConvert.h which calls toWrapped() with a single |
| parameter. Right now, the only type that requires an ExecState for its toWrapped() |
| is XPathNSResolver (which should likely be a callback interface rather than a |
| regular interface). |
| |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::JSDOMWindow::toWrapped): |
| * bindings/js/JSDictionary.cpp: |
| (WebCore::JSDictionary::convertValue): |
| * bindings/js/JSEventTargetCustom.cpp: |
| (WebCore::JSEventTarget::toWrapped): |
| * bindings/js/JSMessageEventCustom.cpp: |
| (WebCore::handleInitMessageEvent): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): |
| (JSValueToNative): |
| |
| 2016-09-28 Chris Dumez <cdumez@apple.com> |
| |
| Log console messages when the anchor download attribute is ignored |
| https://bugs.webkit.org/show_bug.cgi?id=162703 |
| |
| Reviewed by Alex Christensen. |
| |
| Log console messages when the anchor download attribute is ignored so |
| that the developer can better understand what's happening. |
| |
| No new tests, rebaselined existing tests. |
| |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::handleClick): |
| |
| 2016-09-28 Chris Dumez <cdumez@apple.com> |
| |
| Add support for DOMTokenList.supports() |
| https://bugs.webkit.org/show_bug.cgi?id=162659 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Add support for DOMTokenList.supports(): |
| - https://dom.spec.whatwg.org/#dom-domtokenlist-supports |
| |
| Firefox and Chrome already recently implemented it (Chrome since |
| version 50 and Firefox since version 49). |
| |
| Test: fast/dom/DOMTokenList-supports.html |
| |
| * dom/SecurityContext.cpp: |
| (WebCore::SecurityContext::isSupportedSandboxPolicy): |
| (WebCore::SecurityContext::enforceSandboxFlags): Deleted. |
| * dom/SecurityContext.h: |
| * html/DOMTokenList.cpp: |
| (WebCore::DOMTokenList::DOMTokenList): |
| (WebCore::DOMTokenList::supports): |
| (WebCore::DOMTokenList::replace): Deleted. |
| * html/DOMTokenList.h: |
| (WebCore::DOMTokenList::DOMTokenList): |
| * html/DOMTokenList.idl: |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::parseAttribute): |
| (WebCore::HTMLAnchorElement::relList): |
| * html/HTMLAnchorElement.idl: |
| * html/HTMLAreaElement.idl: |
| * html/HTMLIFrameElement.cpp: |
| (WebCore::HTMLIFrameElement::sandbox): |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::relList): |
| * html/HTMLTableCellElement.idl: |
| * html/LinkRelAttribute.cpp: |
| (WebCore::LinkRelAttribute::isSupported): |
| (WebCore::LinkRelAttribute::LinkRelAttribute): Deleted. |
| * html/LinkRelAttribute.h: |
| |
| 2016-09-28 Ryosuke Niwa <rniwa@webkit.org> |
| |
| DOMTokenList’s value and stringifier should not return parsed tokens |
| https://bugs.webkit.org/show_bug.cgi?id=161076 |
| |
| Reviewed by Chris Dumez. |
| |
| Updated our implementation of DOMTokenList.prototype.value and its toString function |
| to match the latest DOM specification: https://dom.spec.whatwg.org/#interface-domtokenlist |
| |
| "value" attribute, on getting, runs its serialize steps, which simply gets the attribute value. |
| On setting, it sets the attribute value with the given value. |
| |
| The stringification behavior returns the same serialize steps as "value" attribute on getting. |
| |
| This change simplifies our implementation of DOMTokenList and removes the need for m_cachedValue, |
| which has been removed in this patch. |
| |
| No new tests since existing tests cover this. |
| |
| * html/DOMTokenList.cpp: |
| (WebCore::DOMTokenList::value): Just call getAttribute. |
| (WebCore::DOMTokenList::setValue): Just call setAttribute. |
| (WebCore::DOMTokenList::updateTokensFromAttributeValue): |
| (WebCore::DOMTokenList::associatedAttributeValueChanged): |
| (WebCore::DOMTokenList::updateAssociatedAttributeFromTokens): Moved the code to update the tokens |
| from from the attribute value. This is the "update steps". |
| * html/DOMTokenList.h: |
| |
| 2016-09-28 Jer Noble <jer.noble@apple.com> |
| |
| CRASH at WebCore::CDMSessionAVStreamSession::update + 950 |
| https://bugs.webkit.org/show_bug.cgi?id=162701 |
| |
| Reviewed by Beth Dakin. |
| |
| If the SourceBuffer backing a <video> element is removed before CDMSessionAVStreamSession::update() gets |
| a chance to run, the protectedSourceBuffer will be null. Just bail early and indicate an error. |
| |
| * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: |
| (WebCore::CDMSessionAVStreamSession::update): |
| |
| 2016-09-28 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should properly handle unexpected periods and overflows in IPv4 addresses |
| https://bugs.webkit.org/show_bug.cgi?id=162655 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseIPv4Number): |
| (WebCore::URLParser::parseIPv4Host): |
| * platform/URLParser.h: |
| |
| 2016-09-28 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Some media tests are crashing due to soft-linking failures |
| https://bugs.webkit.org/show_bug.cgi?id=162698 |
| |
| Reviewed by Jer Noble. |
| |
| We should be handling soft-linking failures for MRMediaRemoteSetNowPlayingVisibility gracefully. Guards these |
| calls with canLoad_MediaRemote_MRMediaRemoteSetParentApplication and also use the |
| SOFT_LINK_FUNCTION_MAY_FAIL_FOR_HEADER macro when soft linking. |
| |
| * platform/audio/mac/MediaSessionManagerMac.mm: |
| (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): |
| * platform/mac/MediaRemoteSoftLink.cpp: |
| * platform/mac/MediaRemoteSoftLink.h: |
| |
| 2016-09-28 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should ignore tabs in authority |
| https://bugs.webkit.org/show_bug.cgi?id=162694 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseAuthority): |
| |
| 2016-09-28 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should ignore extra slashes after scheme:// and handle a missing slash after the port |
| https://bugs.webkit.org/show_bug.cgi?id=162690 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| |
| 2016-09-28 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser should correctly canonicalize uppercase IPv6 addresses |
| https://bugs.webkit.org/show_bug.cgi?id=162680 |
| |
| Reviewed by Tim Horton. |
| |
| Covered by a new API test. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parseIPv6Host): |
| If there is an uppercase character in the IPv6 address part, then it is a syntax violation |
| because the canonicalized IPv6 address differs from the input String. |
| |
| 2016-09-28 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, fix iOS build. |
| |
| * bindings/js/ios/TouchConstructors.cpp: |
| |
| 2016-09-28 Chris Dumez <cdumez@apple.com> |
| |
| It should be possible to dispatch events on template documents |
| https://bugs.webkit.org/show_bug.cgi?id=162687 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| It should be possible to dispatch events on template documents. Firefox |
| supports this. Chrome does not but this is likely not intentional as |
| Chrome generally supports dispatching events on frameless documents. |
| |
| Test: fast/dom/template-document-dispatchEvent.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::ensureTemplateDocument): |
| |
| 2016-09-27 Dean Jackson <dino@apple.com> |
| |
| Use Color references where possible |
| https://bugs.webkit.org/show_bug.cgi?id=162643 |
| <rdar://problem/28506550> |
| |
| Reviewed by Simon Fraser. |
| |
| There were a bunch of places where we pass or use |
| Colors by value. As the Color class gets a bit more |
| complicated, it would be nice to avoid copying, so |
| use references where possible. |
| |
| * css/CSSGradientValue.cpp: |
| (WebCore::interpolate): |
| * css/StyleColor.h: |
| (WebCore::StyleColor::getColor): |
| (WebCore::StyleColor::resolve): |
| * css/StyleResolver.h: |
| (WebCore::StyleResolver::State::backgroundColor): |
| * dom/Document.h: |
| (WebCore::Document::textColor): |
| * editing/FrameSelection.cpp: |
| (WebCore::disappearsIntoBackground): |
| * html/canvas/CanvasRenderingContext2D.cpp: |
| (WebCore::CanvasRenderingContext2D::setShadow): |
| * html/canvas/CanvasRenderingContext2D.h: |
| * html/track/TextTrackCueGeneric.h: |
| * page/PageOverlay.cpp: |
| (WebCore::PageOverlay::setBackgroundColor): |
| * page/PageOverlay.h: |
| * page/animation/CSSPropertyAnimation.cpp: |
| (WebCore::PropertyWrapperColor::PropertyWrapperColor): |
| (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor): |
| (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor): |
| * platform/graphics/GraphicsContext.cpp: |
| (WebCore::GraphicsContext::fillRectWithRoundedHole): |
| * platform/graphics/GraphicsContext.h: |
| (WebCore::GraphicsContext::strokeColor): |
| (WebCore::GraphicsContext::fillColor): |
| * platform/graphics/InbandTextTrackPrivateClient.h: |
| (WebCore::GenericCueData::foregroundColor): |
| (WebCore::GenericCueData::setForegroundColor): |
| (WebCore::GenericCueData::backgroundColor): |
| (WebCore::GenericCueData::setBackgroundColor): |
| (WebCore::GenericCueData::highlightColor): |
| (WebCore::GenericCueData::setHighlightColor): |
| * platform/graphics/ca/TileController.h: |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| (WebCore::GraphicsContext::drawRect): |
| (WebCore::GraphicsContext::fillRect): |
| (WebCore::GraphicsContext::platformFillRoundedRect): |
| (WebCore::GraphicsContext::fillRectWithRoundedHole): |
| * platform/graphics/displaylists/DisplayListItems.h: |
| (WebCore::DisplayList::DrawFocusRingPath::color): |
| (WebCore::DisplayList::DrawFocusRingRects::color): |
| (WebCore::DisplayList::FillRectWithColor::color): |
| (WebCore::DisplayList::FillCompositedRect::color): |
| (WebCore::DisplayList::FillRoundedRect::color): |
| (WebCore::DisplayList::FillRectWithRoundedHole::color): |
| * platform/graphics/filters/FEDiffuseLighting.cpp: |
| (WebCore::FEDiffuseLighting::lightingColor): |
| * platform/graphics/filters/FEDiffuseLighting.h: |
| * platform/graphics/filters/FEDropShadow.h: |
| (WebCore::FEDropShadow::shadowColor): |
| * platform/graphics/filters/FEFlood.cpp: |
| (WebCore::FEFlood::floodColor): |
| (WebCore::FEFlood::platformApplySoftware): |
| * platform/graphics/filters/FEFlood.h: |
| * platform/graphics/filters/FESpecularLighting.cpp: |
| (WebCore::FESpecularLighting::lightingColor): |
| * platform/graphics/filters/FESpecularLighting.h: |
| * platform/graphics/filters/FilterOperation.h: |
| * rendering/BorderEdge.h: |
| (WebCore::BorderEdge::color): |
| * rendering/InlineFlowBox.cpp: |
| (WebCore::InlineFlowBox::paintBoxDecorations): |
| * rendering/InlineTextBox.cpp: |
| (WebCore::InlineTextBox::paintSelection): |
| * rendering/InlineTextBox.h: |
| * rendering/RenderFrameSet.cpp: |
| (WebCore::borderStartEdgeColor): |
| (WebCore::borderEndEdgeColor): |
| (WebCore::borderFillColor): |
| * rendering/RenderInline.cpp: |
| (WebCore::RenderInline::paintOutlineForLine): |
| * rendering/RenderInline.h: |
| * rendering/RenderLayerCompositor.h: |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::paintBoxDecorations): |
| * rendering/TextDecorationPainter.cpp: |
| (WebCore::TextDecorationPainter::paintTextDecoration): |
| * rendering/TextPainter.cpp: |
| (WebCore::TextPainter::paintTextWithShadows): |
| * rendering/style/BorderValue.h: |
| (WebCore::BorderValue::color): |
| * rendering/style/CollapsedBorderValue.h: |
| (WebCore::CollapsedBorderValue::color): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::color): |
| (WebCore::RenderStyle::visitedLinkColor): |
| (WebCore::RenderStyle::setColor): |
| (WebCore::RenderStyle::setVisitedLinkColor): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::borderLeftColor): |
| (WebCore::RenderStyle::borderRightColor): |
| (WebCore::RenderStyle::borderTopColor): |
| (WebCore::RenderStyle::borderBottomColor): |
| (WebCore::RenderStyle::backgroundColor): |
| (WebCore::RenderStyle::columnRuleColor): |
| (WebCore::RenderStyle::outlineColor): |
| (WebCore::RenderStyle::textEmphasisColor): |
| (WebCore::RenderStyle::textFillColor): |
| (WebCore::RenderStyle::textStrokeColor): |
| (WebCore::RenderStyle::visitedLinkBackgroundColor): |
| (WebCore::RenderStyle::visitedLinkBorderLeftColor): |
| (WebCore::RenderStyle::visitedLinkBorderRightColor): |
| (WebCore::RenderStyle::visitedLinkBorderBottomColor): |
| (WebCore::RenderStyle::visitedLinkBorderTopColor): |
| (WebCore::RenderStyle::visitedLinkOutlineColor): |
| (WebCore::RenderStyle::visitedLinkColumnRuleColor): |
| (WebCore::RenderStyle::textDecorationColor): |
| (WebCore::RenderStyle::visitedLinkTextDecorationColor): |
| (WebCore::RenderStyle::visitedLinkTextEmphasisColor): |
| (WebCore::RenderStyle::visitedLinkTextFillColor): |
| (WebCore::RenderStyle::visitedLinkTextStrokeColor): |
| (WebCore::RenderStyle::stopColor): |
| (WebCore::RenderStyle::floodColor): |
| (WebCore::RenderStyle::lightingColor): |
| * svg/SVGFEDiffuseLightingElement.cpp: |
| (WebCore::SVGFEDiffuseLightingElement::build): |
| * svg/SVGFEDropShadowElement.cpp: |
| (WebCore::SVGFEDropShadowElement::build): |
| * svg/SVGFEFloodElement.cpp: |
| (WebCore::SVGFEFloodElement::build): |
| * svg/SVGFESpecularLightingElement.cpp: |
| (WebCore::SVGFESpecularLightingElement::build): |
| * svg/SVGGradientElement.cpp: |
| (WebCore::SVGGradientElement::buildStops): |
| |
| 2016-09-28 Ryosuke Niwa <rniwa@webkit.org> |
| |
| assignedNodes should include fallback contents when flattened option is set |
| https://bugs.webkit.org/show_bug.cgi?id=162656 |
| |
| Reviewed by Antti Koivisto. |
| |
| Fixed the bug by traversing through fallback contents when there are no assigned nodes. |
| |
| Tests: imported/w3c/web-platform-tests/shadow-dom/slots.html |
| imported/w3c/web-platform-tests/shadow-dom/slots-fallback.html |
| |
| * html/HTMLSlotElement.cpp: |
| (WebCore::flattenAssignedNodes): |
| (WebCore::HTMLSlotElement::assignedNodes): |
| |
| 2016-09-27 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Adopt MediaRemote SPI to achieve desired Now Playing behavior |
| https://bugs.webkit.org/show_bug.cgi?id=162658 |
| <rdar://problem/28499358> |
| |
| Reviewed by Jer Noble. |
| |
| Restores the changes previously rolled out in r206444, and adopts new MediaRemote SPI to achieve the desired |
| behavior for media in background tabs without breaking other features. |
| |
| Introduces 2 new unit tests in NowPlayingControlsTests. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::pageAllowsNowPlayingControls): |
| * page/Page.cpp: |
| (WebCore::Page::setViewState): |
| * platform/audio/PlatformMediaSessionManager.h: |
| (WebCore::PlatformMediaSessionManager::hasActiveNowPlayingSession): |
| * platform/audio/mac/MediaSessionManagerMac.h: |
| * platform/audio/mac/MediaSessionManagerMac.mm: |
| (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): |
| * platform/mac/MediaRemoteSoftLink.cpp: |
| * platform/mac/MediaRemoteSoftLink.h: |
| * platform/spi/mac/MediaRemoteSPI.h: |
| |
| 2016-09-28 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| REGRESSION(r206481): ASSERTION FAILED: isDecoderAvailable() |
| https://bugs.webkit.org/show_bug.cgi?id=162665 |
| |
| Reviewed by Simon Fraser. |
| |
| Remove a wrong assertion from ImageSource::destroyDecodedData(). Before |
| r206481, the original function BitmapImage::destroyDecodedData() did not |
| have this assertion. Destroying the decoded ImageFrames can happen after |
| releasing the ImageDecoder. And it can happen also if decoding the image |
| fails and BitmapImage::isNull() is true. See CachedImage::finishLoading(). |
| |
| * platform/graphics/ImageSource.cpp: |
| (WebCore::ImageSource::destroyDecodedData): |
| |
| 2016-09-28 Youenn Fablet <youenn@apple.com> |
| |
| WebCore::ResourceErrorBase::setType is crashing |
| https://bugs.webkit.org/show_bug.cgi?id=162484 |
| <rdar://problem/28390828> |
| |
| Reviewed by Alex Christensen. |
| |
| Test: http/tests/xmlhttprequest/on-network-timeout-error-during-preflight.html |
| |
| Behavior is slightly changed as we are no longer casting Timeout preflight errors as AccessControl errors. |
| This is more inline with fetch spec which prescribes to send back any error received by preflight as response error for fetch. |
| |
| Ideally, we should not need to change errors received during preflight loads but the error type is important for some clients: |
| - EventSource may try to reconnect if error is not AccessControl |
| - XMLHttpRequest will send abort events in case of Cancellation errors and timeout events in case of Timeout errors |
| |
| * loader/CrossOriginPreflightChecker.cpp: |
| (WebCore::CrossOriginPreflightChecker::notifyFinished): Setting error type to AccessControl except in case of Timeout. |
| (WebCore::CrossOriginPreflightChecker::doPreflight): Ditto. |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::preflightFailure): Removing ASSERT since Timeout errors may be returned. |
| * platform/network/ResourceErrorBase.h: |
| (WebCore::ResourceErrorBase::isGeneral): New getter. |
| |
| 2016-09-28 Jer Noble <jer.noble@apple.com> |
| |
| PiP shows incorrect state of play button. |
| https://bugs.webkit.org/show_bug.cgi?id=162652 |
| |
| Reviewed by Eric Carlson. |
| |
| After getting a new WebPlaybackSessionModel, the first thing WebVideoFullscreenInterfaceMac |
| should do is query for it's playbackRate() and isPlaying() properties. |
| |
| * platform/mac/WebVideoFullscreenInterfaceMac.mm: |
| (WebCore::WebVideoFullscreenInterfaceMac::WebVideoFullscreenInterfaceMac): |
| |
| 2016-09-28 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Add Chrome UA quirk |
| https://bugs.webkit.org/show_bug.cgi?id=162617 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Add Chrome UA quirk and use it on typekit.net, typekit.com, youtube.com, slack.com, and |
| any domain that begins with "google". |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::buildUserAgentString): |
| (WebCore::urlRequiresChromeBrowser): |
| (WebCore::standardUserAgentForURL): |
| |
| 2016-09-28 Jer Noble <jer.noble@apple.com> |
| |
| [MSE][Mac] In SourceBufferPrivateAVFObjC::abort(), support reseting parser to the last appended initialization segment. |
| https://bugs.webkit.org/show_bug.cgi?id=135164 |
| |
| Reviewed by Eric Carlson. |
| |
| Test: media/media-source/media-source-abort-resets-parser.html |
| |
| Use the -[AVStreamDataParser appendStreamData:withFlags:] to implement "resetting" the parser. In this case, |
| the parser isn't explicitly reset during resetParserState(), but rather a flag is set so that the next append |
| signals a data discontinuity, and the parser is reset at that point. |
| |
| Because a previous append operation may be in-flight during this abort(), care must be taken to invalidate any |
| operations which may have already started on a background thread. So SourceBufferPrivateAVFObjC will use a |
| separate WeakPtrFactory for its append operations, will invalidate any outstanding WeakPtrs during an abort(), |
| and will block until the previous append() operation completes. |
| |
| This will require the WebAVStreamDataParserListener object to occasionally have it's WeakPtr pointing back to the |
| SourceBufferPrivateAVFObjC to be reset after an abort(), so make that ivar an @property. Rather than passing a |
| RetainPtr to itself in all the callbacks it handles, the WebAVStreamDataParserListener can just pass in a copy |
| of its own WeakPtr (which may be invalidated during an abort()). |
| |
| Break the distinct operations of "abort()" and "resetParserState()" into their own methods in SourceBufferPrivate |
| and all its subclasses. |
| |
| * Modules/mediasource/SourceBuffer.cpp: |
| (WebCore::SourceBuffer::resetParserState): |
| (WebCore::SourceBuffer::abortIfUpdating): |
| * platform/graphics/SourceBufferPrivate.h: |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h: |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): |
| (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): |
| (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): |
| (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): |
| (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]): |
| (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): |
| (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]): |
| (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC): |
| (WebCore::SourceBufferPrivateAVFObjC::append): |
| (WebCore::SourceBufferPrivateAVFObjC::abort): |
| (WebCore::SourceBufferPrivateAVFObjC::resetParserState): |
| (-[WebAVStreamDataParserListener initWithParser:parent:]): Deleted. |
| * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp: |
| (WebCore::SourceBufferPrivateGStreamer::resetParserState): |
| * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h: |
| * platform/mock/mediasource/MockSourceBufferPrivate.cpp: |
| (WebCore::MockSourceBufferPrivate::resetParserState): |
| * platform/mock/mediasource/MockSourceBufferPrivate.h: |
| * platform/spi/mac/AVFoundationSPI.h: |
| |
| 2016-09-28 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] User agent should always claim to be Intel |
| https://bugs.webkit.org/show_bug.cgi?id=162610 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| We should always claim to be running on Intel regardless of actual CPU type. See discussion |
| in bug #162548 for details. In particular, we can never advertise ARM because it causes dumb |
| websites to send mobile pages. |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::platformVersionForUAString): |
| (WebCore::buildUserAgentString): |
| (WebCore::cpuDescriptionForUAString): Deleted. |
| |
| 2016-09-28 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Adjust OS X UA quirks list |
| https://bugs.webkit.org/show_bug.cgi?id=162616 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Remove the OS X quirk for yahoo.com as it's no longer needed. Add quirks for taobao.com and |
| whatsapp.com. |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::urlRequiresMacintoshPlatform): |
| (WebCore::standardUserAgentForURL): |
| |
| 2016-09-28 Alejandro G. Castro <alex@igalia.com> |
| |
| Add WebIDL special operation support: serializer |
| https://bugs.webkit.org/show_bug.cgi?id=156293 |
| |
| Reviewed by Youenn Fablet. |
| |
| Added support for the serializer special operation for WebIDLs, |
| current implementation adds support for: |
| - just the keyword: serializer; It will return all the |
| attributes of in an object. |
| - map of entries with the attributes: serializer = {attribute1, |
| attribute2, ...} |
| |
| It creates a toJSON method that returns the serialized value |
| converted into an ECMAScript value. For more information check the |
| definition of the operation: |
| |
| http://heycam.github.io/webidl/#idl-serializers |
| |
| We have created a new function in the API of the objects |
| that are marked as serializer. |
| |
| Used the support to add new API for RTCIceCandidate and |
| RTCSessionDescription. |
| |
| Updated the tests expectations of the bindings. |
| |
| Tests: bindings/scripts/test/TestNode.idl |
| bindings/scripts/test/TestObj.idl |
| fast/mediastream/RTCIceCandidate.html |
| fast/mediastream/RTCSessionDescription.html |
| |
| * Modules/mediastream/RTCIceCandidate.idl: Added the serializer |
| operation. |
| * Modules/mediastream/RTCSessionDescription.idl: Added the |
| serializer operation. |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): Added the calls to the serializer |
| code generator. |
| (GenerateSerializerFunction): Added, generates the toJSON function |
| adding all the serializable->attributes value to an object as |
| defined in the spec. |
| * bindings/scripts/IDLParser.pm: Modified the serializer parser |
| that was unused to support the WebIDL spec parts. Added a new |
| domSerializable type to store the list of attributes in the |
| possible map. |
| (parseSerializer): Modified the function to follow the |
| semicolon rule in the spec, now the serializer line must have a |
| semicolon like any other line. |
| (parseSerializerRest): The function now has to get the attributes |
| list from the pattern parsing function and add them to the |
| domSerializable item. |
| (parseSerializationPattern): Now this function returns the list of |
| attributes in the serializable map or list if we have one. |
| (parseSerializationAttributes): Added, this function replaces the |
| Map and List functions, the currently supported parts are similar |
| for both situations. |
| (applyMemberList): Added the serializable item to the interface |
| variable and populate the serializable in case there is not a |
| defined map. |
| (parseSerializationPatternMap): Replaced with |
| parseSerializationAttributes. |
| (parseSerializationPatternList): Ditto. |
| * bindings/scripts/test/JS/JSTestNode.cpp: Modified the expected result. |
| (WebCore::jsTestNodePrototypeFunctionToJSON): |
| * bindings/scripts/test/JS/JSTestObj.cpp: Modified the expected result. |
| (WebCore::jsTestObjPrototypeFunctionToJSON): |
| * bindings/scripts/test/TestNode.idl: Added the serializer test. |
| * bindings/scripts/test/TestObj.idl: Added serializer map test. |
| |
| 2016-09-28 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Simplify platformForUAString |
| https://bugs.webkit.org/show_bug.cgi?id=162614 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Note in particular that the previous PLATFORM(MAC) check was wrong here, as that is never |
| true for GTK; this patch risks changing it to OS(MAC_OS_X), on the hope that advertising Mac |
| when running on Mac might not break anything. If it does, then we should remove it and just |
| always pretend to be on X11. |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::platformForUAString): |
| |
| 2016-09-28 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Bump fake Safari version in UA |
| https://bugs.webkit.org/show_bug.cgi?id=162615 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Pretend to be Safari 10.0 to fix sites that don't work when we pretend to be Safari 8.0. |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::buildUserAgentString): |
| |
| 2016-09-28 Khaled Hosny <khaledhosny@eglug.org> |
| |
| Use new woff2 API |
| https://bugs.webkit.org/show_bug.cgi?id=162608 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Test: fast/text/woff2-totalsfntsize.html |
| |
| * platform/graphics/WOFFFileFormat.cpp: |
| (WebCore::WOFF2VectorOut::WOFF2VectorOut): |
| (WebCore::WOFF2VectorOut::Write): |
| (WebCore::WOFF2VectorOut::Size): |
| (WebCore::convertWOFFToSfnt): |
| |
| 2016-09-28 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Add warning comment in UserAgentGtk.cpp |
| https://bugs.webkit.org/show_bug.cgi?id=162618 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| |
| 2016-09-28 Romain Bellessort <romain.bellessort@crf.canon.fr> |
| |
| [Streams API] Align cancelReadableStream() with spec |
| https://bugs.webkit.org/show_bug.cgi?id=162556 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Aligned cancelReadableStream() with Streams API. In particular, private cancel() method |
| was added to ReadableStreamDefaultController and function name was replaced by readableStreamCancel(). |
| Implementation of cancel() (as well as pull()) is actually made in ReadableStreamInternals.js to |
| avoid creating new function for each controller. |
| |
| No change in behaviour. |
| |
| * Modules/streams/ReadableStream.js: |
| (cancel): Updated with reference to readableStreamCancel(). |
| * Modules/streams/ReadableStreamDefaultReader.js: |
| (cancel): Updated with reference to readableStreamCancel(). |
| * Modules/streams/ReadableStreamInternals.js: |
| (privateInitializeReadableStreamDefaultController): Refer to external functions (cancel/pull) to avoid |
| creating new functions. |
| (teeReadableStreamBranch2CancelFunction): Updated with reference to readableStreamCancel(). |
| (readableStreamCancel): New name for cancelReadableStream(), behaviour aligned with spec. |
| (readableStreamDefaultControllerCancel): Added to avoid creating new function for each controller. |
| (readableStreamDefaultControllerPull): Added to avoid creating new function for each controller. |
| (readFromReadableStreamDefaultReader): Updated call to pull method to pass controller. |
| * bindings/js/WebCoreBuiltinNames.h: Added "cancel". |
| |
| 2016-09-27 Joonghun Park <jh718.park@samsung.com> |
| |
| [EFL] Fix debug build break since r206481. Unreviewed |
| https://bugs.webkit.org/show_bug.cgi?id=162662 |
| |
| No new tests, no new behaviours. |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::draw): |
| |
| 2016-09-27 Nan Wang <n_wang@apple.com> |
| |
| AX: CrashTracer: com.apple.WebKit.WebContent at WebCore::AXObjectCache::localCaretRectForCharacterOffset(WebCore::RenderObject*&, WebCore::CharacterOffset const&) + 116 |
| https://bugs.webkit.org/show_bug.cgi?id=162654 |
| |
| Reviewed by Chris Fleizach. |
| |
| rangeForUnorderedCharacterOffsets() can return a null Range but we failed to |
| do a null check in localCaretRectForCharacterOffset() before dereferencing it. |
| |
| Test: accessibility/mac/bounds-for-range-crash.html |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::localCaretRectForCharacterOffset): |
| |
| 2016-09-27 Alex Christensen <achristensen@webkit.org> |
| |
| Inline critical functions in URLParser |
| https://bugs.webkit.org/show_bug.cgi?id=162653 |
| |
| Reviewed by Myles C. Maxfield. |
| |
| This gives me about a 15% speed improvement. |
| |
| * platform/URLParser.cpp: |
| (WebCore::CodePointIterator::CodePointIterator): |
| (WebCore::CodePointIterator::operator==): |
| (WebCore::CodePointIterator::operator!=): |
| (WebCore::CodePointIterator::operator=): |
| (WebCore::CodePointIterator::atEnd): |
| (WebCore::CodePointIterator::codeUnitsSince): |
| (WebCore::CodePointIterator<LChar>::operator): |
| (WebCore::CodePointIterator<UChar>::operator): |
| (WebCore::appendCodePoint): |
| (WebCore::isC0Control): |
| (WebCore::isC0ControlOrSpace): |
| (WebCore::isTabOrNewline): |
| (WebCore::isInSimpleEncodeSet): |
| (WebCore::isInDefaultEncodeSet): |
| (WebCore::isInUserInfoEncodeSet): |
| (WebCore::isInvalidDomainCharacter): |
| (WebCore::isPercentOrNonASCII): |
| (WebCore::isSlashQuestionOrHash): |
| (WebCore::isValidSchemeCharacter): |
| (WebCore::URLParser::advance): |
| (WebCore::URLParser::isWindowsDriveLetter): |
| (WebCore::URLParser::appendToASCIIBuffer): |
| (WebCore::percentEncodeByte): |
| (WebCore::URLParser::utf8PercentEncode): |
| (WebCore::URLParser::utf8QueryEncode): |
| (WebCore::isDefaultPort): |
| (WebCore::isSpecialScheme): |
| (WebCore::isPercentEncodedDot): |
| (WebCore::isSingleDotPathSegment): |
| (WebCore::isDoubleDotPathSegment): |
| (WebCore::consumeSingleDotPathSegment): |
| (WebCore::consumeDoubleDotPathSegment): |
| (WebCore::URLParser::popPath): |
| (WebCore::URLParser::parsedDataView): |
| (WebCore::URLParser::currentPosition): |
| (WebCore::zeroSequenceLength): |
| (WebCore::findLongestZeroSequence): |
| (WebCore::pow256): |
| (WebCore::percentDecode): |
| (WebCore::containsOnlyASCII): |
| (WebCore::domainToASCII): |
| (WebCore::hasInvalidDomainCharacter): |
| (WebCore::formURLDecode): |
| (WebCore::serializeURLEncodedForm): |
| |
| 2016-09-27 Zalan Bujtas <zalan@apple.com> |
| |
| REGRESSION (r204552): Yelp carousel animation is not smooth. |
| https://bugs.webkit.org/show_bug.cgi?id=162632 |
| |
| Reviewed by Simon Fraser. |
| |
| For composited state changes when the layers don't need rebuilding, the updateGeometry() traversal |
| is post-order (see webkit.org/162634), so we can't rely on the offsetfromRenderer() value when |
| computing the graphics layer position on the descendants. We need this workaround until after webkit.org/162634 |
| gets fixed. |
| |
| Tests: compositing/hidpi-composited-container-and-graphics-layer-gap-changes.html |
| compositing/hidpi-negative-composited-bounds-on-device-pixel.html |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::computeOffsetFromAncestorGraphicsLayer): |
| (WebCore::ComputedOffsets::ComputedOffsets): |
| (WebCore::ComputedOffsets::fromAncestorGraphicsLayer): |
| (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect): |
| |
| 2016-09-27 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Move caching the ImageFrame from BitmapImage to ImageSource |
| https://bugs.webkit.org/show_bug.cgi?id=155498 |
| |
| Reviewed by Simon Fraser. |
| |
| BitmapImage has two modes of operation regarding its image decoding state. |
| The first mode happens when a remote image is loaded as encoded data and |
| which requires an ImageDecoder to generate the image metadata and the |
| the ImageFrames. The second mode happens when a BitmapImage is created |
| with a NativeImagePtr. In this case, no ImageDecoder is needed. |
| |
| To remove this burden from the BitmapImage the member 'm_frames' is removed |
| from BitmapImage. A new member named 'm_frameCache' of type ImageFrameCache |
| is added to ImageSource. This class handles caching and recaching the image |
| metadata and the ImageFrames if the image needs decoding. When the BitmapImage |
| is initialized with a memory image, the ImageFrameCache initializes its |
| metadata and ImageFrames directly from the NativeImagePtr. |
| |
| The plan for ImageFrameCache is to be extended for the asynchronous image |
| decoding and also to be used by the non CG image decoders which cache |
| other copies of the ImageFrames. This double caching should be removed. |
| |
| When the BitmapImage is replying to the ImageFrame queries, it will ask the |
| ImageSource which will pass the query the ImageFrameCache. ImageFrameCache |
| will ensure the requested ImageFrame is cached and is valid for the requested |
| SubSamplingLevel before accessing the data members of this ImageFrame. |
| |
| * CMakeLists.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| Add and ImageFrameCache.cpp to the WebCore project. |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::BitmapImage): Move initializing the image metadata to |
| ImageSource. Add initializers for the remaining members in the class declaration. |
| |
| (WebCore::BitmapImage::destroyDecodedData): Move most of the logic of this |
| function to ImageFrameCache::destroyDecodedData(). The only part which can't |
| be moved is the call invalidatePlatformData(). |
| |
| (WebCore::BitmapImage::destroyDecodedDataIfNecessary): Move the logic of this |
| function to ImageFrameCache::destroyDecodedDataIfNecessary(). |
| |
| (WebCore::BitmapImage::dataChanged): Move the logic of this function to |
| ImageSource::dataChanged(). |
| |
| (WebCore::BitmapImage::frameImageAtIndex): Move most of the logic of this |
| function to ImageFrameCache::frameImageAtIndex(). The only part which can't |
| be moved is the call invalidatePlatformData() if the required subsampling |
| level is different from the subsampling level for the cached frame image. |
| |
| (WebCore::BitmapImage::draw): Replace the BitmapImage cached metadata with |
| the corresponding ImageSource cached metadata. |
| (WebCore::BitmapImage::drawPattern): Ditto. |
| (WebCore::BitmapImage::shouldAnimate): Ditto. |
| (WebCore::BitmapImage::startAnimation): Ditto. |
| (WebCore::BitmapImage::internalAdvanceAnimation): Ditto. |
| |
| (WebCore::BitmapImage::dump): Call ImageSource::dump() to dump the image |
| cached metadata. |
| |
| (WebCore::BitmapImage::haveFrameImageAtIndex): Deleted. |
| (WebCore::BitmapImage::destroyMetadataAndNotify): Deleted. |
| (WebCore::BitmapImage::cacheFrame): Deleted. |
| (WebCore::BitmapImage::didDecodeProperties): Deleted. |
| (WebCore::BitmapImage::updateSize): Deleted. |
| (WebCore::BitmapImage::size): Deleted. |
| (WebCore::BitmapImage::sizeRespectingOrientation): Deleted. |
| (WebCore::BitmapImage::hotSpot): Deleted. |
| (WebCore::BitmapImage::frameCount): Deleted. |
| (WebCore::BitmapImage::isSizeAvailable): Deleted. |
| (WebCore::BitmapImage::ensureFrameAtIndexIsCached): Deleted. |
| (WebCore::BitmapImage::frameIsCompleteAtIndex): Deleted. |
| (WebCore::BitmapImage::frameDurationAtIndex): Deleted. |
| (WebCore::BitmapImage::frameHasAlphaAtIndex): Deleted. |
| (WebCore::BitmapImage::currentFrameKnownToBeOpaque): Deleted. |
| (WebCore::BitmapImage::frameOrientationAtIndex): Deleted. |
| (WebCore::BitmapImage::singlePixelSolidColor): Deleted. |
| (WebCore::BitmapImage::repetitionCount): Deleted. |
| * platform/graphics/BitmapImage.h: |
| Managing the ImageFrames caching is moved to ImageFrameCache. Caching the |
| image metadata is now moved to the ImageSource. |
| |
| * platform/graphics/GeneratedImage.h: |
| * platform/graphics/Image.h: |
| (WebCore::Image::orientationForCurrentFrame): |
| (WebCore::Image::singlePixelSolidColor): |
| Change currentFrameKnownToBeOpaque(), orientationForCurrentFrame() and |
| singlePixelSolidColor() to be const. |
| |
| * platform/graphics/ImageFrame.cpp: |
| (WebCore::ImageFrame::defaultFrame): Returns an empty ImageFrame to get the default ImageFrame metadata. |
| (WebCore::ImageFrame::fillMetadata): Deleted. Moved to ImageFrameCache. |
| (WebCore::ImageFrame::initialize): Deleted. Ditto. |
| |
| * platform/graphics/ImageFrame.h: |
| (WebCore::ImageFrame::setDuration): Change the type of the argument to float instead of unsigned. |
| (WebCore::ImageFrame::hasAlpha): Protect the unset m_hasAlpha by checking hasMetadata() first. |
| |
| * platform/graphics/ImageFrameCache.cpp: Added. |
| (WebCore::ImageFrameCache::ImageFrameCache): Two constructors similar to what we do for ImageSource and BitmapImage. |
| (WebCore::ImageFrameCache::destroyDecodedData): Moved from BitmapImage.cpp. |
| (WebCore::ImageFrameCache::destroyDecodedDataIfNecessary): Ditto. |
| (WebCore::ImageFrameCache::destroyIncompleteDecodedData): Ditto. |
| (WebCore::ImageFrameCache::decodedSizeChanged): Ditto. |
| (WebCore::ImageFrameCache::decodedSizeIncremented): Ditto. |
| (WebCore::ImageFrameCache::decodedSizeDecremented): Ditto. |
| (WebCore::ImageFrameCache::decodedSizeReset): Ditto. |
| (WebCore::ImageFrameCache::didDecodeProperties): Ditto. |
| (WebCore::ImageFrameCache::growFrames): Grows the size of m_frames if necessary. |
| (WebCore::ImageFrameCache::setNativeImage): Initializes the ImageFrame metadata directly from the NativeImagePtr. |
| (WebCore::ImageFrameCache::setFrameNativeImage): Initializes the ImageFrame image and the metadata. |
| (WebCore::ImageFrameCache::setFrameMetadata): Initializes the ImageFrame metadata from the ImageDecoder. |
| (WebCore::ImageFrameCache::frameAtIndex): Returns an ImageFrame given its index. Cache or recache the requested ImageFrame if necessary. |
| (WebCore::ImageFrameCache::clearMetadata): Invalidates the cached image metadata. |
| (WebCore::ImageFrameCache::metadata): A template function which returns an image metadata property. |
| (WebCore::ImageFrameCache::frameMetadataAtIndex): A template function which returns an ImageFrame metadata property. |
| (WebCore::ImageFrameCache::isSizeAvailable): An image metadata property. |
| (WebCore::ImageFrameCache::frameCount): Ditto. |
| (WebCore::ImageFrameCache::repetitionCount): Ditto. |
| (WebCore::ImageFrameCache::filenameExtension): Ditto. |
| (WebCore::ImageFrameCache::hotSpot): Ditto. |
| (WebCore::ImageFrameCache::size): An image metadata property but we get it from the first ImageFrame. |
| (WebCore::ImageFrameCache::sizeRespectingOrientation): Ditto. |
| (WebCore::ImageFrameCache::singlePixelSolidColor): Ditto. |
| (WebCore::ImageFrameCache::frameIsCompleteAtIndex): An ImageFrame metadata property. |
| (WebCore::ImageFrameCache::frameHasAlphaAtIndex): Ditto. |
| (WebCore::ImageFrameCache::frameHasImageAtIndex): Ditto. |
| (WebCore::ImageFrameCache::frameHasInvalidNativeImageAtIndex): Ditto. |
| (WebCore::ImageFrameCache::frameSubsamplingLevelAtIndex): Ditto. |
| (WebCore::ImageFrameCache::frameSizeAtIndex): Ditto. |
| (WebCore::ImageFrameCache::frameBytesAtIndex): Ditto. |
| (WebCore::ImageFrameCache::frameDurationAtIndex): Ditto. |
| (WebCore::ImageFrameCache::frameOrientationAtIndex): Ditto. |
| (WebCore::ImageFrameCache::frameImageAtIndex): Ditto. |
| |
| * platform/graphics/ImageFrameCache.h: Added. |
| (WebCore::ImageFrameCache::setDecoder): Sets the current ImageDecoder which is owned by the ImageSource. |
| (WebCore::ImageFrameCache::decodedSize): Returns the size of the cached NativeImages. |
| (WebCore::ImageFrameCache::isDecoderAvailable): Returns whether an ImageDecoder is available. |
| |
| * platform/graphics/ImageSource.cpp: |
| (WebCore::ImageSource::ImageSource): Initializes the ImageFrameCache based on the image decoding state. |
| (WebCore::ImageSource::clearFrameBufferCache): Replace initialized() with isDecoderAvailable(). |
| (WebCore::ImageSource::clear): Clears the ImageDecoder of the ImageFrameCache. |
| (WebCore::ImageSource::destroyDecodedData): Moved from BitmapImage.cpp. |
| (WebCore::ImageSource::destroyDecodedDataIfNecessary): Ditto. |
| (WebCore::ImageSource::ensureDecoderAvailable): Creates an ImageDecoder if necessary and sets it in ImageFrameCache. |
| (WebCore::ImageSource::setData): |
| (WebCore::ImageSource::dataChanged): Moved from BitmapImage.cpp. |
| (WebCore::ImageSource::isAllDataReceived): |
| (WebCore::ImageSource::maximumSubsamplingLevel): Rename calculateMaximumSubsamplingLevel() to maximumSubsamplingLevel(). |
| (WebCore::ImageSource::subsamplingLevelForScale): |
| (WebCore::ImageSource::createFrameImageAtIndex): |
| (WebCore::ImageSource::dump): |
| (WebCore::ImageSource::calculateMaximumSubsamplingLevel): Deleted. Renamed to maximumSubsamplingLevel(). |
| (WebCore::ImageSource::updateMetadata): Deleted. Not needed. Caching the image metadata is the responsibility of ImageFrameCache. |
| (WebCore::ImageSource::bytesDecodedToDetermineProperties): Deleted. Not needed. |
| (WebCore::ImageSource::isSizeAvailable): Deleted. Moved to ImageSource.h. |
| (WebCore::ImageSource::size): Deleted. Ditto. |
| (WebCore::ImageSource::sizeRespectingOrientation): Deleted. Ditto. |
| (WebCore::ImageSource::frameCount): Deleted. Ditto. |
| (WebCore::ImageSource::repetitionCount): Deleted. Ditto. |
| (WebCore::ImageSource::filenameExtension): Deleted. Ditto. |
| (WebCore::ImageSource::hotSpot): Deleted. Ditto. |
| (WebCore::ImageSource::frameIsCompleteAtIndex): Deleted. Ditto. |
| (WebCore::ImageSource::frameHasAlphaAtIndex): Deleted. Ditto. |
| (WebCore::ImageSource::frameAllowSubsamplingAtIndex): Deleted. Ditto. |
| (WebCore::ImageSource::frameSizeAtIndex): Deleted. Ditto. |
| (WebCore::ImageSource::frameBytesAtIndex): Deleted. Ditto. |
| (WebCore::ImageSource::frameDurationAtIndex): Deleted. Ditto. |
| (WebCore::ImageSource::frameOrientationAtIndex): Deleted. Ditto. |
| |
| * platform/graphics/ImageSource.h: |
| (WebCore::ImageSource::isDecoderAvailable): initialized() was renamed to isDecoderAvailable(). |
| (WebCore::ImageSource::decodedSize): Send the query to ImageFrameCache. |
| (WebCore::ImageSource::isSizeAvailable): Ditto. |
| (WebCore::ImageSource::frameCount): Ditto. |
| (WebCore::ImageSource::repetitionCount): Ditto. |
| (WebCore::ImageSource::filenameExtension): Ditto. |
| (WebCore::ImageSource::hotSpot): Ditto. |
| (WebCore::ImageSource::size): Ditto. |
| (WebCore::ImageSource::sizeRespectingOrientation): Ditto. |
| (WebCore::ImageSource::singlePixelSolidColor): Ditto. |
| (WebCore::ImageSource::frameIsCompleteAtIndex): Ditto. |
| (WebCore::ImageSource::frameHasAlphaAtIndex): Ditto. |
| (WebCore::ImageSource::frameHasImageAtIndex): Ditto. |
| (WebCore::ImageSource::frameHasInvalidNativeImageAtIndex): Ditto. |
| (WebCore::ImageSource::frameSubsamplingLevelAtIndex): Ditto. |
| (WebCore::ImageSource::frameSizeAtIndex): Ditto. |
| (WebCore::ImageSource::frameBytesAtIndex): Ditto. |
| (WebCore::ImageSource::frameDurationAtIndex): Ditto. |
| (WebCore::ImageSource::frameOrientationAtIndex): Ditto. |
| (WebCore::ImageSource::frameImageAtIndex): Ditto. |
| (WebCore::ImageSource::decoder): Deleted. Not needed. |
| (WebCore::ImageSource::initialized): Deleted. Was renamed to isDecoderAvailable(). |
| (WebCore::ImageSource::setNeedsUpdateMetadata): Deleted. Not needed. |
| |
| * platform/graphics/cairo/GraphicsContext3DCairo.cpp: |
| (WebCore::GraphicsContext3D::ImageExtractor::extractImage): AlphaOption and GammaAndColorProfileOption are moved out of ImageSource. |
| * platform/graphics/cg/GraphicsContext3DCG.cpp: |
| (WebCore::GraphicsContext3D::ImageExtractor::extractImage): Ditto. |
| |
| * platform/graphics/cg/ImageDecoderCG.cpp: |
| (WebCore::ImageDecoder::ImageDecoder): Make the constructor of ImageDecoder be the same for all ports. |
| (WebCore::ImageDecoder::setData): Removed unused overloaded function. |
| (WebCore::ImageDecoder::size): Deleted. Removed unused function. |
| |
| * platform/graphics/cg/ImageDecoderCG.h: |
| (WebCore::ImageDecoder::create): Make the constructor of CG ImageDecoder be like the other ports. |
| (WebCore::ImageDecoder::isAllDataReceived): Make this property owned by ImageDecoder. |
| |
| * platform/graphics/cg/PDFDocumentImage.h: Change currentFrameKnownToBeOpaque() to be const. |
| |
| * platform/graphics/efl/GraphicsContext3DEfl.cpp: |
| (WebCore::GraphicsContext3D::ImageExtractor::extractImage): AlphaOption and GammaAndColorProfileOption are moved out of ImageSource. |
| |
| * platform/graphics/mac/ImageMac.mm: |
| (WebCore::BitmapImage::invalidatePlatformData): m_frames is owned by ImageFrameCache. ImageFrameCache::frameCount() has to |
| be equal to ImageFrame::m_frames.size(). |
| |
| * platform/image-decoders/ImageDecoder.cpp: |
| (WebCore::ImageDecoder::create): AlphaOption and GammaAndColorProfileOption are moved out of ImageSource. |
| * platform/image-decoders/ImageDecoder.h: |
| (WebCore::ImageDecoder::ImageDecoder): Ditto. |
| (WebCore::ImageDecoder::frameCount): Make frameCount const so it can be passed to the template function ImageFrameCache::metadata(). |
| * platform/image-decoders/bmp/BMPImageDecoder.cpp: |
| (WebCore::BMPImageDecoder::BMPImageDecoder): AlphaOption and GammaAndColorProfileOption are moved out of ImageSource. |
| * platform/image-decoders/bmp/BMPImageDecoder.h: |
| * platform/image-decoders/gif/GIFImageDecoder.cpp: |
| (WebCore::GIFImageDecoder::GIFImageDecoder): AlphaOption and GammaAndColorProfileOption are moved out of ImageSource. |
| (WebCore::GIFImageDecoder::frameCount): Make frameCount const so it can be passed to the template function ImageFrameCache::metadata(). |
| * platform/image-decoders/gif/GIFImageDecoder.h: |
| * platform/image-decoders/gif/GIFImageReader.cpp: |
| * platform/image-decoders/gif/GIFImageReader.h: |
| * platform/image-decoders/ico/ICOImageDecoder.cpp: |
| (WebCore::ICOImageDecoder::ICOImageDecoder): |
| (WebCore::ICOImageDecoder::frameCount): Make frameCount const so it can be passed to the template function ImageFrameCache::metadata(). |
| (WebCore::ICOImageDecoder::decode): Move resizing the m_frameBufferCache from ICOImageDecoder::frameCount() to ICOImageDecoder::decode(). |
| (WebCore::ICOImageDecoder::decodeAtIndex): AlphaOption and GammaAndColorProfileOption are moved out of ImageSource. |
| * platform/image-decoders/ico/ICOImageDecoder.h: |
| * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: |
| (WebCore::JPEGImageDecoder::JPEGImageDecoder): AlphaOption and GammaAndColorProfileOption are moved out of ImageSource. |
| * platform/image-decoders/jpeg/JPEGImageDecoder.h: |
| * platform/image-decoders/png/PNGImageDecoder.cpp: |
| (WebCore::PNGImageDecoder::PNGImageDecoder): AlphaOption and GammaAndColorProfileOption are moved out of ImageSource. |
| * platform/image-decoders/png/PNGImageDecoder.h: |
| (WebCore::PNGImageDecoder::frameCount): Make frameCount const so it can be passed to the template function ImageFrameCache::metadata(). |
| * platform/image-decoders/webp/WEBPImageDecoder.cpp: |
| (WebCore::WEBPImageDecoder::WEBPImageDecoder): |
| * platform/image-decoders/webp/WEBPImageDecoder.h: |
| |
| * svg/graphics/SVGImage.h: Make currentFrameKnownToBeOpaque() be const. |
| * svg/graphics/SVGImageForContainer.h: Ditto. |
| |
| 2016-09-27 Alex Christensen <achristensen@webkit.org> |
| |
| Correctly parse URLs with the first tab in the fragment |
| https://bugs.webkit.org/show_bug.cgi?id=162650 |
| |
| Reviewed by Saam Barati. |
| |
| Covered by a new API test. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::fragmentSyntaxViolation): |
| |
| 2016-09-27 Chris Dumez <cdumez@apple.com> |
| |
| <a download> does not honor the same-origin requirement |
| https://bugs.webkit.org/show_bug.cgi?id=156100 |
| |
| Reviewed by Alex Christensen. |
| |
| We now completely ignore the "download" attribute on anchors if the |
| href URL is cross-origin. We therefore navigate to the URL instead |
| of forcefully downloading it in this case and leave it up to the server |
| to give us the right headers if it should be downloaded. This is |
| conservative and matches Firefox. |
| |
| Chrome and the HTML specification ignore only the suggested filename |
| if the URL is cross-origin but still download the file. |
| |
| No new tests, updated existing test. |
| |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::handleClick): |
| |
| 2016-09-27 Alex Christensen <achristensen@webkit.org> |
| |
| URLParser: Handle windows drive letters after two slashes in relative URLs according to spec |
| https://bugs.webkit.org/show_bug.cgi?id=162646 |
| |
| Reviewed by Saam Barati. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::CodePointIterator::codeUnitsSince): |
| (WebCore::URLParser::appendWindowsDriveLetter): |
| (WebCore::URLParser::parse): |
| (WebCore::isWindowsDriveLetter): Deleted. |
| (WebCore::URLParser::checkWindowsDriveLetter): Deleted. |
| * platform/URLParser.h: |
| |
| 2016-09-27 Alex Christensen <achristensen@webkit.org> |
| |
| URLs with @ in the user should only search for the last @ until the end of the authority and host |
| https://bugs.webkit.org/show_bug.cgi?id=162635 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Covered by new API tests. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::parse): |
| |
| 2016-09-27 Chris Dumez <cdumez@apple.com> |
| |
| It should be possible to dispatch events on documents created using DOMParser |
| https://bugs.webkit.org/show_bug.cgi?id=26147 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| It should be possible to dispatch events on documents created using |
| DOMParser. It did not work because we were not setting the context |
| document on the newly created document in DOMParser::parseFromString(). |
| |
| Firefox and Chrome both already support this. |
| |
| Test: fast/dom/parsed-document-dispatchEvent.html |
| |
| * xml/DOMParser.cpp: |
| (WebCore::DOMParser::DOMParser): |
| (WebCore::DOMParser::parseFromString): |
| * xml/DOMParser.h: |
| (WebCore::DOMParser::create): |
| * xml/DOMParser.idl: |
| |
| 2016-09-26 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [Cocoa] Improve performance of complex text codepath |
| https://bugs.webkit.org/show_bug.cgi?id=161936 |
| |
| Reviewed by Simon Fraser. |
| |
| CoreText exposes a bit on the CTRunStatus which represents whether |
| the run actually uses the glyph origins concept introduced in |
| r205396. If this bit is not set, we can use the (slightly faster) |
| call to CTRunGetAdvances() instead of |
| CTRunGetBaseAdvancesAndOrigins(). In addition, if none of the runs |
| have this bit set, we don't need to allocate storage for the vector |
| of origins at all, thereby using less memory. |
| |
| No new tests because there is no behavior change. |
| |
| * platform/graphics/mac/ComplexTextController.cpp: |
| (WebCore::ComplexTextController::advance): |
| (WebCore::ComplexTextController::adjustGlyphsAndAdvances): |
| * platform/graphics/mac/ComplexTextController.h: |
| (WebCore::ComplexTextController::ComplexTextRun::glyphOrigins): |
| (WebCore::ComplexTextController::glyphOrigin): |
| * platform/graphics/mac/ComplexTextControllerCoreText.mm: |
| (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): |
| * platform/spi/cocoa/CoreTextSPI.h: |
| |
| 2016-09-27 Ryosuke Niwa <rniwa@webkit.org> |
| |
| Import w3c shadow DOM tests and fix one assertion |
| https://bugs.webkit.org/show_bug.cgi?id=162629 |
| |
| Reviewed by Chris Dumez. |
| |
| The assertion failure was caused by RelatedNodeRetargeter's constructor mixing up the ancestor tree scopes |
| for the target and the related target. Fixed the bug by reversing the two. |
| |
| Tests: imported/w3c/web-platform-tests/shadow-dom/event-composed-path-with-related-target.html |
| |
| * dom/EventPath.cpp: |
| (WebCore::RelatedNodeRetargeter::RelatedNodeRetargeter): i and m_ancestorTreeScopes are for the related target |
| and j and targetTreeScopeAncestors are for the target. |
| |
| 2016-09-27 Chris Dumez <cdumez@apple.com> |
| |
| It should be possible to dispatch events on documents that do not have a browsing context |
| https://bugs.webkit.org/show_bug.cgi?id=162620 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| It should be possible to dispatch events on documents that do not have a browsing |
| context (e.g. Documents created using DOMImplementation.createHTMLDocument()). |
| Gecko and Blink both allow this but WebKit did not. |
| |
| The approach chosen to support this is similar to the one in Blink. When constructing |
| a new document (e.g. using DOMImplementation.createHTMLDocument()) we now keep track |
| of the context document. When requesting the scriptExecutionContext(), we now return |
| the context document if the document has one instead of the document itself. |
| |
| Test: imported/w3c/web-platform-tests/dom/events/Event-dispatch-other-document.html |
| |
| * bindings/js/JSDocumentCustom.cpp: |
| (WebCore::JSDocument::visitAdditionalChildren): |
| * dom/DOMImplementation.cpp: |
| (WebCore::DOMImplementation::createDocument): |
| (WebCore::DOMImplementation::createHTMLDocument): |
| * dom/Document.cpp: |
| (WebCore::Document::create): |
| (WebCore::Document::cloneDataFromDocument): |
| (WebCore::Document::contextDocument): |
| (WebCore::Document::takeDOMWindowFrom): Deleted. |
| * dom/Document.h: |
| (WebCore::Document::setContextDocument): |
| (WebCore::Node::scriptExecutionContext): |
| (WebCore::Node::isDocumentNode): Deleted. |
| * dom/Document.idl: |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::responseXML): |
| |
| 2016-09-27 Alex Christensen <achristensen@webkit.org> |
| |
| Implement URLParser::syntaxViolation |
| https://bugs.webkit.org/show_bug.cgi?id=162593 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Most of the time when parsing URLs, we just look at the URL, find offsets of the host, path, query, etc., |
| and the String can be used untouched. When this happens, we do not want to allocate and copy the String. |
| We want to just add a reference to an existing String. |
| |
| Sometimes we need to canonicalize the String because there has been a syntaxViolation, |
| defined as any String that is different than its canonicalized URL String. In such cases we need to |
| allocate a new String and fill it with the canonicalized URL String. When a syntaxViolation happens for the |
| first time, we know that everything in the input String up to that point is equal to what it would have been |
| if we had canonicalized the beginning of the URL, copy it into a buffer, and continue parsing in a mode where |
| instead of just looking at the input URL String, we canonicalize each code point into the buffer. |
| |
| Changes to behavior involve additional spec compliance with tabs and newlines in different places in URLs, |
| as well as additional spec compliance when parsing empty and null URLs relative to other URLs. |
| Both are covered by new API tests. Existing behavior covered by existing API tests. |
| |
| This is about a 15% speed improvement on my URL parsing benchmark. |
| |
| * platform/URL.cpp: |
| (WebCore::assertProtocolIsGood): |
| (WebCore::URL::protocolIs): |
| (WebCore::protocolIs): |
| * platform/URL.h: |
| * platform/URLParser.cpp: |
| (WebCore::isTabOrNewline): |
| (WebCore::URLParser::incrementIteratorSkippingTabsAndNewlines): |
| (WebCore::URLParser::isWindowsDriveLetter): |
| (WebCore::URLParser::appendToASCIIBuffer): |
| (WebCore::URLParser::checkWindowsDriveLetter): |
| (WebCore::URLParser::shouldCopyFileURL): |
| (WebCore::URLParser::utf8PercentEncode): |
| (WebCore::URLParser::utf8QueryEncode): |
| (WebCore::URLParser::copyURLPartsUntil): |
| (WebCore::URLParser::syntaxViolation): |
| (WebCore::URLParser::fragmentSyntaxViolation): |
| (WebCore::URLParser::parsedDataView): |
| (WebCore::URLParser::currentPosition): |
| (WebCore::URLParser::URLParser): |
| (WebCore::URLParser::parse): |
| (WebCore::URLParser::parseAuthority): |
| (WebCore::URLParser::parseIPv4Number): |
| (WebCore::URLParser::parseIPv4Host): |
| (WebCore::URLParser::parseIPv6Host): |
| (WebCore::URLParser::parsePort): |
| (WebCore::URLParser::parseHostAndPort): |
| (WebCore::serializeURLEncodedForm): |
| (WebCore::URLParser::allValuesEqual): |
| (WebCore::URLParser::internalValuesConsistent): |
| (WebCore::URLParser::incrementIteratorSkippingTabAndNewLine): Deleted. |
| (WebCore::URLParser::syntaxError): Deleted. |
| (WebCore::parseIPv4Number): Deleted. |
| * platform/URLParser.h: |
| (WebCore::URLParser::incrementIteratorSkippingTabsAndNewlines): |
| |
| 2016-09-27 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Related videos on YouTube (and YouTube playlists) cause media controls to disappear |
| https://bugs.webkit.org/show_bug.cgi?id=162621 |
| <rdar://problem/28484193> |
| |
| Reviewed by Jer Noble. |
| |
| Tweaks the main content media heuristic for better Now Playing behavior on YouTube by making the following |
| changes: |
| - Remove the strict requirement for audio to be actively playing for the session to be able to show |
| controls for the purpose of Now Playing, making it the same as our policy for the controls manager. |
| - Make playback requirement restrictions apply only for the controls manager. Videos that do not |
| autoplay will still have the correct behavior with respect to Now Playing, since we will bail in the |
| hasEverNotifiedAboutPlaying() check. |
| - Only consider the main content heuristic as preventing media controls from showing up for the purposes |
| of the controls manager. Now Playing should instead account for this by preferring elements large |
| enough for main content after collecting all of the candidate sessions. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::mediaElementSessionInfoForSession): |
| (WebCore::preferMediaControlsForCandidateSessionOverOtherCandidateSession): |
| (WebCore::HTMLMediaElement::updatePlayState): |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::canShowControlsManager): |
| * platform/audio/mac/MediaSessionManagerMac.mm: |
| (WebCore::MediaSessionManagerMac::sessionWillBeginPlayback): |
| |
| 2016-09-27 Chris Dumez <cdumez@apple.com> |
| |
| Second parameter to MutationObserver.observe() should be optional |
| https://bugs.webkit.org/show_bug.cgi?id=162627 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Second parameter to MutationObserver.observe() should be optional: |
| - https://dom.spec.whatwg.org/#interface-mutationobserver |
| |
| Firefox agrees with the specification. There is no real behavior change |
| except that MutationObserver.prototype.observe.length is now 1 instead |
| of 2. Passing only one parameter will still throw a TypeError because |
| the Dictionary is empty. However, this parameter needs to be marked as |
| optional because Web IDL requires the last parameter to be optional if |
| it is a Dictionary. |
| |
| No new tests, rebaselined existing test. |
| |
| * dom/MutationObserver.idl: |
| |
| 2016-09-20 Anders Carlsson <andersca@apple.com> |
| |
| PlatformEvent::m_modifiers should be an OptionSet |
| https://bugs.webkit.org/show_bug.cgi?id=162326 |
| |
| Reviewed by Daniel Bates. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::handleAccessKey): |
| * page/EventHandler.h: |
| * page/mac/EventHandlerMac.mm: |
| (WebCore::EventHandler::accessKeyModifiers): |
| * platform/PlatformEvent.h: |
| (WebCore::PlatformEvent::shiftKey): |
| (WebCore::PlatformEvent::ctrlKey): |
| (WebCore::PlatformEvent::altKey): |
| (WebCore::PlatformEvent::metaKey): |
| (WebCore::PlatformEvent::modifiers): |
| (WebCore::PlatformEvent::PlatformEvent): |
| * platform/PlatformKeyboardEvent.h: |
| (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): |
| * platform/mac/PlatformEventFactoryMac.mm: |
| (WebCore::modifiersForEvent): |
| (WebCore::typeForEvent): |
| * replay/SerializationMethods.cpp: |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): |
| (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue): |
| * replay/WebInputs.json: |
| |
| 2016-09-27 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> |
| |
| [GTK] Handle Wayland & X11 correctly for GST_GL |
| https://bugs.webkit.org/show_bug.cgi?id=162619 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| The checks for GST_GL consider X11 and Wayland are exclusive alternatives, but it |
| turns out we can enable both! We need to check them independently and also include |
| a runtime check. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): fix checks for X11 and |
| Wayland to handle the case where both are enabled. Includes a runtime check. |
| |
| 2016-09-27 Eric Carlson <eric.carlson@apple.com> |
| |
| [MediaStream] Restructure MediaConstraints classes |
| https://bugs.webkit.org/show_bug.cgi?id=162571 |
| |
| Reviewed by Jer Noble. |
| |
| No new tests, no functional changes. |
| |
| * Modules/mediastream/MediaConstraintsImpl.cpp: |
| (WebCore::MediaConstraintsImpl::initialize): Deleted, no longer used. |
| * Modules/mediastream/MediaConstraintsImpl.h: |
| |
| * bindings/js/JSMediaDevicesCustom.cpp: |
| (WebCore::createStringConstraint): Return Optional<> instead of RefPtr<>. |
| (WebCore::createBooleanConstraint): Ditto. |
| (WebCore::createDoubleConstraint): Ditto. |
| (WebCore::createIntConstraint): Ditto. |
| (WebCore::parseMediaTrackConstraintSetForKey): Deal with above change. |
| |
| * platform/mediastream/CaptureDeviceManager.cpp: |
| (CaptureDeviceManager::verifyConstraintsForMediaType): Use constraints.mandatoryConstraints.filter |
| instead of direct enumeration. |
| (CaptureDeviceManager::sessionSupportsConstraint): Use downcast<>. |
| (CaptureDeviceManager::isSupportedFrameRate): Ditto. |
| |
| * platform/mediastream/MediaConstraints.cpp: |
| (WebCore::StringConstraint::find): Lose the ConstraintType parameter. |
| (WebCore::StringConstraint::merge): Use downcast<>. |
| (WebCore::FlattenedConstraint::set): Use ConstraintHolder. |
| (WebCore::FlattenedConstraint::merge): Ditto. |
| (WebCore::MediaTrackConstraintSetMap::forEach): New. |
| (WebCore::MediaTrackConstraintSetMap::filter): Ditto. |
| (WebCore::MediaTrackConstraintSetMap::isEmpty): Ditto. |
| (WebCore::MediaTrackConstraintSetMap::set): Ditto. |
| (WebCore::MediaConstraint::copy): Deleted. |
| (WebCore::IntConstraint::copy): Deleted. |
| (WebCore::DoubleConstraint::copy): Deleted. |
| (WebCore::BooleanConstraint::copy): Deleted. |
| (WebCore::StringConstraint::copy): Deleted. |
| * platform/mediastream/MediaConstraints.h: |
| (WebCore::MediaConstraint::MediaConstraint): |
| (WebCore::MediaConstraint::isEmpty): |
| (WebCore::MediaConstraint::isMandatory): |
| (WebCore::MediaConstraint::merge): |
| (WebCore::MediaConstraint::isInt): |
| (WebCore::MediaConstraint::isDouble): |
| (WebCore::MediaConstraint::isBoolean): |
| (WebCore::MediaConstraint::isString): |
| (WebCore::MediaConstraint::dataType): |
| (WebCore::MediaConstraint::constraintType): |
| (WebCore::NumericConstraint::getMin): |
| (WebCore::NumericConstraint::getMax): |
| (WebCore::NumericConstraint::getExact): |
| (WebCore::NumericConstraint::getIdeal): |
| (WebCore::NumericConstraint::fitnessDistance): |
| (WebCore::NumericConstraint::validForRange): |
| (WebCore::NumericConstraint::find): |
| (WebCore::NumericConstraint::NumericConstraint): |
| (WebCore::NumericConstraint::innerMerge): |
| (WebCore::FlattenedConstraint::isEmpty): |
| (WebCore::FlattenedConstraint::iterator::iterator): |
| (WebCore::FlattenedConstraint::iterator::operator*): |
| (WebCore::FlattenedConstraint::iterator::operator++): |
| (WebCore::FlattenedConstraint::iterator::operator==): |
| (WebCore::FlattenedConstraint::iterator::operator!=): |
| (WebCore::FlattenedConstraint::begin): |
| (WebCore::FlattenedConstraint::end): |
| (WebCore::FlattenedConstraint::ConstraintHolder::create): |
| (WebCore::FlattenedConstraint::ConstraintHolder::~ConstraintHolder): |
| (WebCore::FlattenedConstraint::ConstraintHolder::constraint): |
| (WebCore::FlattenedConstraint::ConstraintHolder::dataType): |
| (WebCore::FlattenedConstraint::ConstraintHolder::constraintType): |
| (WebCore::FlattenedConstraint::ConstraintHolder::ConstraintHolder): |
| (WebCore::MediaConstraint::getMin): Deleted. |
| (WebCore::MediaConstraint::getMax): Deleted. |
| (WebCore::MediaConstraint::getExact): Deleted. |
| (WebCore::MediaConstraint::getIdeal): Deleted. |
| (WebCore::MediaConstraint::validForRange): Deleted. |
| (WebCore::MediaConstraint::find): Deleted. |
| (WebCore::MediaConstraint::fitnessDistance): Deleted. |
| (WebCore::MediaConstraint::type): Deleted. |
| |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::fitnessDistance): Use downcast<>. |
| (WebCore::applyNumericConstraint): |
| (WebCore::RealtimeMediaSource::applyConstraint): Ditto. |
| (WebCore::RealtimeMediaSource::selectSettings): Ditto. Use constraints.mandatoryConstraints.filter |
| instead of direct enumeration. |
| (WebCore::RealtimeMediaSource::applyConstraints): |
| (WebCore::RealtimeMediaSource::setSampleRate): Sample rate is an int, not a double. |
| (WebCore::RealtimeMediaSource::setSampleSize): Sample size is also an int. |
| * platform/mediastream/RealtimeMediaSource.h: |
| |
| * platform/mediastream/mac/AVCaptureDeviceManager.mm: |
| (WebCore::AVCaptureDeviceManager::sessionSupportsConstraint): Use downcast<>. |
| |
| * platform/mock/MediaConstraintsMock.cpp: |
| (WebCore::isIntMediaConstraintSatisfiable): Use downcast<>. |
| (WebCore::isDoubleMediaConstraintSatisfiable): Ditto. |
| (WebCore::isBooleanMediaConstraintSatisfiable): Ditto. |
| (WebCore::isStringMediaConstraintSatisfiable): |
| (WebCore::isSatisfiable): |
| (WebCore::MediaConstraintsMock::verifyConstraints): Use constraints.mandatoryConstraints.filter |
| instead of direct enumeration. |
| * platform/mock/MediaConstraintsMock.h: |
| |
| * platform/mock/MockRealtimeAudioSource.h: |
| * platform/mock/MockRealtimeMediaSourceCenter.cpp: |
| (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): |
| |
| 2016-09-27 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Some Now Playing behavior is broken after r206315 |
| https://bugs.webkit.org/show_bug.cgi?id=162625 |
| <rdar://problem/28496755> |
| |
| Reviewed by Jer Noble. |
| |
| Reverts the part of our heuristic that disables Now Playing in active tabs in the main window. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::pageAllowsNowPlayingControls): |
| * page/Page.cpp: |
| (WebCore::Page::setViewState): |
| |
| 2016-09-27 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Remove an unneeded assert in InspectorOverlay.cpp |
| https://bugs.webkit.org/show_bug.cgi?id=162581 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| This assertion was added to catch unknown issues, but it is firing frequently enough on certain Inspector |
| tests that it is causing more harm than good. |
| |
| * inspector/InspectorOverlay.cpp: |
| (WebCore::buildQuadObjectForCSSRegionContentClip): |
| (WebCore::evaluateCommandInOverlay): |
| |
| 2016-09-27 Jer Noble <jer.noble@apple.com> |
| |
| Remove deprecated ENCRYPTED_MEDIA implementation. |
| https://bugs.webkit.org/show_bug.cgi?id=161010 |
| |
| Reviewed by Eric Carlson. |
| |
| Remove all references to the deprecated ENABLE_ENCRYPTED_MEDIA (leaving in place |
| the soon-to-be deprecated ENABLE_ENCRYPTED_MEDIA_V2). |
| |
| * CMakeLists.txt: |
| * Configurations/FeatureDefines.xcconfig: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/objc/DOMHTMLMediaElement.h: |
| * bindings/objc/DOMHTMLMediaElement.mm: |
| (-[DOMHTMLMediaElement canPlayType:]): |
| (-[DOMHTMLMediaElement canPlayType:keySystem:]): Deleted. |
| * bindings/js/JSDictionary.cpp: |
| * bindings/js/JSDictionary.h: |
| * dom/Element.idl: |
| * dom/EventNames.in: |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::selectNextSourceChild): |
| (WebCore::exceptionCodeForMediaKeyException): Deleted. |
| (WebCore::HTMLMediaElement::canPlayType): Deleted. |
| (WebCore::HTMLMediaElement::mediaPlayerKeyAdded): Deleted. |
| (WebCore::HTMLMediaElement::mediaPlayerKeyError): Deleted. |
| (WebCore::HTMLMediaElement::mediaPlayerKeyMessage): Deleted. |
| (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): Deleted. |
| * html/HTMLMediaElement.h: |
| * html/HTMLMediaElement.idl: |
| * html/MediaError.h: |
| * html/MediaError.idl: |
| * html/MediaKeyError.h: |
| * html/MediaKeyError.idl: |
| * html/MediaKeyEvent.cpp: Removed. |
| (WebCore::MediaKeyEvent::MediaKeyEvent): Deleted. |
| (WebCore::MediaKeyEvent::~MediaKeyEvent): Deleted. |
| (WebCore::MediaKeyEvent::eventInterface): Deleted. |
| * html/MediaKeyEvent.h: Removed. |
| * html/MediaKeyEvent.idl: Removed. |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::nextBestMediaEngine): |
| (WebCore::MediaPlayer::generateKeyRequest): Deleted. |
| (WebCore::MediaPlayer::addKey): Deleted. |
| (WebCore::MediaPlayer::cancelKeyRequest): Deleted. |
| (WebCore::MediaPlayer::keyAdded): Deleted. |
| (WebCore::MediaPlayer::keyError): Deleted. |
| (WebCore::MediaPlayer::keyMessage): Deleted. |
| (WebCore::MediaPlayer::keyNeeded): Deleted. |
| * platform/graphics/MediaPlayer.h: |
| (WebCore::MediaPlayerClient::mediaPlayerKeyAdded): Deleted. |
| (WebCore::MediaPlayerClient::mediaPlayerKeyError): Deleted. |
| (WebCore::MediaPlayerClient::mediaPlayerKeyMessage): Deleted. |
| (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded): Deleted. |
| * platform/graphics/MediaPlayerPrivate.h: |
| (WebCore::MediaPlayerPrivateInterface::addKey): Deleted. |
| (WebCore::MediaPlayerPrivateInterface::generateKeyRequest): Deleted. |
| (WebCore::MediaPlayerPrivateInterface::cancelKeyRequest): Deleted. |
| * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: |
| * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: |
| * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: |
| (WebCore::CDMSessionAVContentKeySession::update): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem): |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Deleted. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest): Deleted. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::addKey): Deleted. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelKeyRequest): Deleted. |
| * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: |
| (WebCore::MediaPlayerPrivateQTKit::supportsType): Deleted. |
| * testing/MockCDM.h: |
| |
| 2016-09-27 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] Use Ref<const T> in FetchBody::m_data variant |
| https://bugs.webkit.org/show_bug.cgi?id=162599 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by existing tests. |
| |
| Using Ref<const T> for all variants of m_data except for FormData since FetchBody is actually creating it and may modifiy it. |
| Updating blob loading code path to use a const Blob& instead of a Blob&. |
| |
| * Modules/fetch/FetchBody.cpp: |
| (WebCore::FetchBody::FetchBody): |
| (WebCore::FetchBody::extract): |
| (WebCore::FetchBody::clone): |
| * Modules/fetch/FetchBody.h: |
| (WebCore::FetchBody::blobBody): |
| (WebCore::FetchBody::arrayBufferBody): |
| (WebCore::FetchBody::arrayBufferViewBody): |
| * Modules/fetch/FetchBodyOwner.cpp: |
| (WebCore::FetchBodyOwner::loadBlob): |
| * Modules/fetch/FetchBodyOwner.h: |
| * Modules/fetch/FetchLoader.cpp: |
| (WebCore::FetchLoader::start): |
| * Modules/fetch/FetchLoader.h: |
| |
| 2016-09-27 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| Unreviewed typo fix |
| |
| * platform/gtk/UserAgentGtk.cpp: |
| (WebCore::standardUserAgent): |
| |
| 2016-09-27 Youenn Fablet <youenn@apple.com> |
| |
| Clean-up CachedImage constructor |
| https://bugs.webkit.org/show_bug.cgi?id=162601 |
| |
| Reviewed by Sam Weinig. |
| |
| No change of behavior. |
| Removing an unused constructor. |
| Specializing one constructor for manually cached images. |
| Cleaning initialization of some CachedImage fields. |
| |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::CachedImage): |
| * loader/cache/CachedImage.h: |
| * loader/cache/MemoryCache.cpp: |
| (WebCore::MemoryCache::addImageToCache): |
| |
| 2016-09-27 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [FreeType] Add comment further justifying use of FT_LOAD_FORCE_AUTOHINT |
| https://bugs.webkit.org/show_bug.cgi?id=162607 |
| |
| Reviewed by Martin Robinson. |
| |
| * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: |
| (WebCore::FontCustomPlatformData::FontCustomPlatformData): |
| |
| 2016-09-27 Mario Sanchez Prada <mario@endlessm.com> |
| |
| Build fails for X11+EGL due to missing gst_gl_display_x11_new_with_display() |
| https://bugs.webkit.org/show_bug.cgi?id=162606 |
| |
| Reviewed by Gustavo Noronha Silva. |
| |
| Use the right check to retrieve the right instance of GstGLDisplay |
| depending on whether we're using GLX or EGL, not X11 or Wayland. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): |
| |
| 2016-09-27 Youenn Fablet <youenn@apple.com> |
| |
| [GTK][EFL] imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html is failing |
| https://bugs.webkit.org/show_bug.cgi?id=162547 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Covered by existing tests. |
| |
| * platform/network/soup/SoupNetworkSession.cpp: |
| (WebCore::SoupNetworkSession::createTestingSession): Setting the underlying soupSession. |
| |
| 2016-09-27 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] Remove ReadableStreamSource firstReadCallback |
| https://bugs.webkit.org/show_bug.cgi?id=162339 |
| |
| Reviewed by Sam Weinig. |
| |
| No observable change of behavior. |
| Removing ReadableStreamSource firstReadCallback. |
| This makes the enqueuing of data to happen when the stream is created. |
| In the future, we may want to implement doPull() to enqueue data when stream actually needs it. |
| |
| * Modules/fetch/FetchResponseSource.cpp: |
| (WebCore::FetchResponseSource::doPull): Introduced as we introduce pull() in ReadableStreamSource. |
| * Modules/fetch/FetchResponseSource.h: |
| * Modules/streams/ReadableStreamInternals.js: |
| (readFromReadableStreamDefaultReader): Removing firstReadCallback use. |
| * Modules/streams/ReadableStreamSource.h: Renaming m_startPromise in m_promise since m_promise may store start and pull promises. |
| (WebCore::ReadableStreamSource::isStarting): |
| (WebCore::ReadableStreamSource::start): |
| (WebCore::ReadableStreamSource::pull): Introduced to support ReadableStreamSource pulling. |
| (WebCore::ReadableStreamSource::startFinished): |
| (WebCore::ReadableStreamSource::pullFinished): Ditto. |
| (WebCore::ReadableStreamSource::clean): |
| * Modules/streams/ReadableStreamSource.idl: Ditto. |
| * bindings/js/JSReadableStreamSourceCustom.cpp: Refactoring to use callPromiseFunction |
| (WebCore::startReadableStream): |
| (WebCore::JSReadableStreamSource::start): |
| (WebCore::pullReadableStream): Introduced to support ReadableStreamSource pulling. |
| (WebCore::JSReadableStreamSource::pull): Ditto. |
| * bindings/js/WebCoreBuiltinNames.h: Removing firstReadCallback |
| |
| 2016-09-27 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| REGRESSION(r205883): Letterpressed text is invisible |
| https://bugs.webkit.org/show_bug.cgi?id=162590 |
| <rdar://problem/28141512> |
| |
| Reviewed by Simon Fraser. |
| |
| r205883 removed the last place where we use CGFonts directly in WebKit. However, |
| our letterpress code is sensitive to the current state of the CGContext. |
| |
| Tests: fast/text/letterpress-different.html |
| fast/text/letterpress-paint.html |
| |
| * platform/graphics/cocoa/FontCascadeCocoa.mm: |
| (WebCore::showLetterpressedGlyphsWithAdvances): |
| |
| 2016-09-27 Youenn Fablet <youenn@apple.com> |
| |
| [Fetch API] Refactor FetchBody to use std::experimental::variant |
| https://bugs.webkit.org/show_bug.cgi?id=162559 |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by exiting tests. |
| |
| Using variant to represent the variant data types. |
| Adding nullptr as a specific type for default empty values and to allow clean-up. |
| Adding FetchBody::clone as the default copy constructor is deleted with this change. |
| |
| * Modules/fetch/FetchBody.cpp: |
| (WebCore::FetchBody::FetchBody): |
| (WebCore::FetchBody::json): |
| (WebCore::FetchBody::text): |
| (WebCore::FetchBody::consumeAsStream): |
| (WebCore::FetchBody::consumeArrayBuffer): |
| (WebCore::FetchBody::consumeArrayBufferView): |
| (WebCore::FetchBody::consumeText): |
| (WebCore::FetchBody::consumeBlob): |
| (WebCore::FetchBody::extractFromText): |
| (WebCore::FetchBody::bodyForInternalRequest): |
| (WebCore::FetchBody::clone): |
| * Modules/fetch/FetchBody.h: |
| (WebCore::FetchBody::blobBody): |
| (WebCore::FetchBody::formDataBody): |
| (WebCore::FetchBody::arrayBufferBody): |
| (WebCore::FetchBody::arrayBufferViewBody): |
| (WebCore::FetchBody::textBody): |
| * Modules/fetch/FetchRequest.cpp: |
| (WebCore::FetchRequest::clone): |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::cloneForJS): |
| |
| 2016-09-26 Joonghun Park <jh718.park@samsung.com> |
| |
| [EFL] Fix debug build break since r204205. Unreviewed |
| https://bugs.webkit.org/show_bug.cgi?id=162596 |
| |
| No new tests, no new behaviours. |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::frameImageAtIndex): |
| |
| 2016-09-26 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| If you play a youtube video from now playing after it finished in Safari, controls disappear |
| https://bugs.webkit.org/show_bug.cgi?id=162589 |
| <rdar://problem/28484047> |
| |
| Reviewed by Jer Noble. |
| |
| Tweaks the main content heuristic slightly to remove the "mostly in mainframe" requirement in the case of Now |
| Playing. This was added in the case of the controls manager as an additional way to identify video elements that |
| should not show controls, since we relax audio and video constraints for showing videos in the controls manager, |
| so that a video element is prevented from showing controls on grounds of lacking audio only if it has never had |
| audio before. In the case of Now Playing, we have stricter requirements for videos, which must have audio, which |
| makes the mainframe heuristic not necessary. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::canShowControlsManager): |
| |
| 2016-09-26 Antti Koivisto <antti@apple.com> |
| |
| Setter on style element's textContent or cssText doesn't trigger style recalc |
| https://bugs.webkit.org/show_bug.cgi?id=160331 |
| <rdar://problem/27609715> |
| |
| Reviewed by Ryosuke Niwa and Daniel Bates. |
| |
| We would not notify the parent when text node content changed in a shadow tree. |
| |
| Test: fast/shadow-dom/shadow-style-text-mutation.html |
| |
| * dom/AuthorStyleSheets.cpp: |
| (WebCore::AuthorStyleSheets::updateActiveStyleSheets): |
| |
| Invalidate shadow root children instead of the root itself when doing full invalidation. |
| The invalidity bits have no meaning for non-element, non-texts. |
| |
| * dom/CharacterData.cpp: |
| (WebCore::CharacterData::parserAppendData): |
| (WebCore::CharacterData::setDataAndUpdate): |
| (WebCore::CharacterData::notifyParentAfterChange): |
| |
| Add a helper and call it also in shadow trees. |
| |
| (WebCore::CharacterData::dispatchModifiedEvent): |
| * dom/CharacterData.h: |
| |
| 2016-09-26 Antti Koivisto <antti@apple.com> |
| |
| Input elements don't work inside shadow tree |
| https://bugs.webkit.org/show_bug.cgi?id=160427 |
| |
| Reviewed by Darin Adler. |
| |
| There is a bug in ComposedTreeIterator. If the iterator is initialized with an initial state where the root |
| is inside a shadow tree it won't iterate into slots. |
| |
| If an input element is in a shadow tree it generates narrowly scoped style updates. When RenderTreeUpdater |
| applies such an update the update root will be inside the shadow tree and the bug will prevent the render tree |
| for slotted content from updating. |
| |
| Added tests for both the iterator behavior and the specific symptom with input elements. |
| |
| Tests: fast/shadow-dom/composed-tree-shadow-child-subtree.html |
| fast/shadow-dom/input-element-in-shadow.html |
| |
| * dom/ComposedTreeIterator.cpp: |
| (WebCore::ComposedTreeIterator::ComposedTreeIterator): |
| |
| Check and cache if the root is inside shadow tree. |
| |
| (WebCore::ComposedTreeIterator::traverseNextInShadowTree): |
| * dom/ComposedTreeIterator.h: |
| (WebCore::ComposedTreeIterator::traverseNext): |
| |
| If it is, always use the shadow traversal code path. |
| |
| 2016-09-26 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Seeking video doesn't update seek position |
| https://bugs.webkit.org/show_bug.cgi?id=162575 |
| <rdar://problem/28457219> |
| |
| Reviewed by Jer Noble. |
| |
| On ToT, seeking in a video causes the playhead to stutter, and does not actually update media remote's seek |
| position. This is partly due to how we do not update media remote with new information when beginning to respond |
| to remote seek commands, so media remote continues to think that a playing video is still playing despite the |
| user attempting to seek through it. |
| |
| To fix this, we introduce timer-based guards around remote seek commands, such that a seek "gesture" begins when |
| we receive the first seek command and ends when no seek command has been received in a set amount of time (this |
| is 0.5 seconds, which is approximately what other clients around the platform use). |
| |
| Also, when responding to a remote seek, perform the seek with no tolerance. This prevents the playhead from |
| stuttering at the end of a seek from the final requested destination of the seek to the last actually seeked |
| time in the video. |
| |
| When beginning to seek, we must pause the media. Through existing mechanisms, this causes the media session |
| manager to update its Now Playing information, which informs media remote that we are no longer playing and |
| prevents us from stuttering. However, when ending a seek, we must also trigger an additional update to again |
| refresh media remote's view of the current time. This prevents a flicker when playing media after seeking. |
| |
| Unit tests to be added in a follow-up due to time constraints. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::HTMLMediaElement): |
| (WebCore::HTMLMediaElement::handleSeekToPlaybackPosition): |
| (WebCore::HTMLMediaElement::seekToPlaybackPositionEndedTimerFired): |
| (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): |
| * html/HTMLMediaElement.h: |
| * platform/audio/PlatformMediaSessionManager.h: |
| (WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo): |
| (WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing): |
| (WebCore::PlatformMediaSessionManager::sessions): Deleted. |
| * platform/audio/mac/MediaSessionManagerMac.h: |
| * platform/audio/mac/MediaSessionManagerMac.mm: |
| (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): |
| (WebCore::MediaSessionManagerMac::scheduleUpdateNowPlayingInfo): |
| (WebCore::MediaSessionManagerMac::sessionDidEndRemoteScrubbing): |
| (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): |
| |
| 2016-09-26 Chris Dumez <cdumez@apple.com> |
| |
| [WK2] BlobDownloadClient should use asynchronous IPC to decide destination path |
| https://bugs.webkit.org/show_bug.cgi?id=162568 |
| |
| Reviewed by Alex Christensen. |
| |
| Update BlobResourceHandle to wait for continueDidReceiveResponse() to be |
| called after it calls the client's didReceiveResponseAsync(), before |
| actually reading the Blob Data. |
| |
| No new tests, covered by existing tests. |
| |
| * platform/network/BlobResourceHandle.cpp: |
| (WebCore::BlobResourceHandle::continueDidReceiveResponse): |
| (WebCore::BlobResourceHandle::getSizeForNext): |
| (WebCore::BlobResourceHandle::notifyResponseOnSuccess): |
| (WebCore::BlobResourceHandle::notifyResponseOnError): |
| |
| 2016-09-26 Daniel Bates <dabates@apple.com> |
| |
| Mark Ping{Handle, Load} as final |
| https://bugs.webkit.org/show_bug.cgi?id=162576 |
| |
| Reviewed by Alex Christensen. |
| |
| We should not support subclassing of a ping handle or overriding its ResourceHandleClient |
| callbacks because there are security/privacy implications with a ping request. We should |
| not encourage subclassing without careful consideration. |
| |
| * platform/network/PingHandle.h: |
| |
| 2016-09-26 Daniel Bates <dabates@apple.com> |
| |
| Rename IOS_TEXT_AUTOSIZING to TEXT_AUTOSIZING |
| https://bugs.webkit.org/show_bug.cgi?id=162365 |
| |
| Reviewed by Simon Fraser. |
| |
| Repurpose the feature name TEXT_AUTOSIZING for the ENABLE(IOS_TEXT_AUTOSIZING)-guarded code |
| as this code represents WebKit's automatic text size adjustment machinery and is compiled |
| on both macOS and iOS. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::propertyValue): |
| * css/CSSPropertyNames.in: |
| * css/StyleBuilderCustom.h: |
| * css/StyleResolver.cpp: |
| (WebCore::StyleResolver::updateFont): |
| * css/StyleResolver.h: |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParserContext::CSSParserContext): |
| (WebCore::CSSParser::parseValue): |
| * css/parser/CSSParser.h: |
| * css/parser/CSSParserMode.h: |
| * dom/Document.cpp: |
| (WebCore::Document::destroyRenderTree): |
| * dom/Document.h: |
| * editing/EditingStyle.cpp: |
| * page/FrameView.cpp: |
| (WebCore::FrameView::layout): |
| * page/Page.cpp: |
| (WebCore::Page::Page): |
| * page/Page.h: |
| * page/Settings.in: |
| * platform/graphics/FontCascade.h: |
| * platform/graphics/FontDescription.cpp: |
| * platform/graphics/FontDescription.h: |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::RenderBlockFlow): |
| * rendering/RenderBlockFlow.h: |
| * rendering/RenderElement.cpp: |
| * rendering/RenderElement.h: |
| * rendering/RenderObject.cpp: |
| * rendering/RenderObject.h: |
| * rendering/RenderText.cpp: |
| (WebCore::RenderText::RenderText): |
| * rendering/RenderText.h: |
| * rendering/TextAutoSizing.cpp: |
| * rendering/TextAutoSizing.h: |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::changeRequiresLayout): |
| * rendering/style/RenderStyle.h: |
| * rendering/style/StyleInheritedData.cpp: |
| (WebCore::StyleInheritedData::StyleInheritedData): |
| (WebCore::StyleInheritedData::operator==): |
| * rendering/style/StyleInheritedData.h: |
| * rendering/style/StyleRareInheritedData.cpp: |
| (WebCore::StyleRareInheritedData::StyleRareInheritedData): |
| (WebCore::StyleRareInheritedData::operator==): |
| * rendering/style/StyleRareInheritedData.h: |
| * rendering/style/TextSizeAdjustment.h: |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::Backup::Backup): |
| (WebCore::InternalSettings::Backup::restoreTo): |
| (WebCore::InternalSettings::setTextAutosizingEnabled): |
| (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): |
| * testing/InternalSettings.h: |
| |
| 2016-09-26 Nan Wang <n_wang@apple.com> |
| |
| AX: Progress: [Mac] Content in label element should be used as AXTitle or AXDescription |
| https://bugs.webkit.org/show_bug.cgi?id=162573 |
| |
| Reviewed by Chris Fleizach. |
| |
| Exposed the label element's text as the AXTitle of the progress indicator. |
| |
| Test: accessibility/mac/progress-with-label-element.html |
| |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::titleElementText): |
| (WebCore::AccessibilityNodeObject::title): |
| |
| 2016-09-26 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Rebaseline bindings tests after r206386. |
| |
| Unreviewed test gardening. |
| |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| * bindings/scripts/test/JS/JSTestNondeterministic.cpp: |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: |
| * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: |
| * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: |
| * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| |
| 2016-09-26 Youenn Fablet <youenn@apple.com> |
| |
| ASSERTION FAILED: m_origin || m_type == CachedResource::MainResource |
| https://bugs.webkit.org/show_bug.cgi?id=162472 |
| <rdar://problem/28431522> |
| |
| Reviewed by Chris Dumez. |
| |
| Covered by existing tests. |
| |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::CachedImage): Fixing the last CachedImage constructor. |
| Using CachedResource protected constructor. |
| * loader/cache/CachedResource.h: Small clean-up. |
| |
| 2016-09-26 Youenn Fablet <youenn@apple.com> |
| |
| [GTK][EFL] imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html is failing |
| https://bugs.webkit.org/show_bug.cgi?id=162547 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Covered by LayoutTests/imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html now passing. |
| |
| * platform/network/soup/SoupNetworkSession.cpp: |
| (WebCore::SoupNetworkSession::createTestingSession): Setting a default Accept-Language value. |
| |
| 2016-09-26 Mark Lam <mark.lam@apple.com> |
| |
| Added RETURN_IF_EXCEPTION() macro and use it for exception checks. |
| https://bugs.webkit.org/show_bug.cgi?id=162521 |
| |
| Reviewed by Saam Barati. |
| |
| No new tests because this patch is mostly refactoring. The only change in |
| behavior is that functions that have a JSValue return type will now return the |
| empty JSValue when an exception is thrown. I tested this behavior by running |
| the existing JSC and layout tests. |
| |
| * bindings/js/ArrayValue.cpp: |
| (WebCore::ArrayValue::get): |
| * bindings/js/IDBBindingUtilities.cpp: |
| (WebCore::toJS): |
| * bindings/js/JSApplePaySessionCustom.cpp: |
| (WebCore::JSApplePaySession::completeShippingMethodSelection): |
| (WebCore::JSApplePaySession::completeShippingContactSelection): |
| (WebCore::JSApplePaySession::completePaymentMethodSelection): |
| * bindings/js/JSAudioTrackCustom.cpp: |
| (WebCore::JSAudioTrack::setKind): |
| (WebCore::JSAudioTrack::setLanguage): |
| * bindings/js/JSBlobCustom.cpp: |
| (WebCore::constructJSBlob): |
| * bindings/js/JSCSSStyleDeclarationCustom.cpp: |
| (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): |
| * bindings/js/JSCommandLineAPIHostCustom.cpp: |
| (WebCore::getJSListenerFunctions): |
| * bindings/js/JSCryptoAlgorithmDictionary.cpp: |
| (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier): |
| (WebCore::getHashAlgorithm): |
| (WebCore::createAesCbcParams): |
| (WebCore::createAesKeyGenParams): |
| (WebCore::createHmacKeyParams): |
| (WebCore::createRsaKeyGenParams): |
| (WebCore::createRsaOaepParams): |
| * bindings/js/JSCryptoKeySerializationJWK.cpp: |
| (WebCore::getStringFromJSON): |
| (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): |
| (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): |
| (WebCore::buildJSONForRSAComponents): |
| (WebCore::addUsagesToJSON): |
| (WebCore::JSCryptoKeySerializationJWK::serialize): |
| * bindings/js/JSCustomElementInterface.cpp: |
| (WebCore::constructCustomElementSynchronously): |
| (WebCore::JSCustomElementInterface::upgradeElement): |
| * bindings/js/JSCustomElementRegistryCustom.cpp: |
| (WebCore::getCustomElementCallback): |
| (WebCore::JSCustomElementRegistry::define): |
| (WebCore::whenDefinedPromise): |
| * bindings/js/JSDOMBinding.cpp: |
| (WebCore::valueToUSVString): |
| (WebCore::hasIteratorMethod): |
| (WebCore::toSmallerInt): |
| (WebCore::toSmallerUInt): |
| (WebCore::toInt32EnforceRange): |
| (WebCore::toUInt32EnforceRange): |
| (WebCore::toInt64EnforceRange): |
| (WebCore::toUInt64EnforceRange): |
| * bindings/js/JSDOMBinding.h: |
| (WebCore::toJSSequence): |
| (WebCore::toJS): |
| (WebCore::jsFrozenArray): |
| * bindings/js/JSDOMPromise.cpp: |
| (WebCore::rejectPromiseWithExceptionIfAny): |
| * bindings/js/JSDOMStringMapCustom.cpp: |
| (WebCore::JSDOMStringMap::putDelegate): |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::JSDOMWindow::setLocation): |
| (WebCore::JSDOMWindow::open): |
| (WebCore::JSDOMWindow::showModalDialog): |
| (WebCore::handlePostMessage): |
| (WebCore::JSDOMWindow::setTimeout): |
| (WebCore::JSDOMWindow::setInterval): |
| * bindings/js/JSDataCueCustom.cpp: |
| (WebCore::constructJSDataCue): |
| * bindings/js/JSDeviceMotionEventCustom.cpp: |
| (WebCore::readAccelerationArgument): |
| (WebCore::readRotationRateArgument): |
| (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent): |
| * bindings/js/JSDictionary.cpp: |
| (WebCore::JSDictionary::tryGetProperty): |
| (WebCore::JSDictionary::convertValue): |
| * bindings/js/JSDictionary.h: |
| (WebCore::JSDictionary::tryGetPropertyAndResult): |
| * bindings/js/JSDocumentCustom.cpp: |
| (WebCore::JSDocument::getCSSCanvasContext): |
| * bindings/js/JSFileCustom.cpp: |
| (WebCore::constructJSFile): |
| * bindings/js/JSGeolocationCustom.cpp: |
| (WebCore::JSGeolocation::getCurrentPosition): |
| (WebCore::JSGeolocation::watchPosition): |
| * bindings/js/JSHTMLAllCollectionCustom.cpp: |
| (WebCore::callHTMLAllCollection): |
| * bindings/js/JSHTMLCanvasElementCustom.cpp: |
| (WebCore::JSHTMLCanvasElement::getContext): |
| * bindings/js/JSHTMLElementCustom.cpp: |
| (WebCore::constructJSHTMLElement): |
| * bindings/js/JSHistoryCustom.cpp: |
| (WebCore::JSHistory::pushState): |
| (WebCore::JSHistory::replaceState): |
| * bindings/js/JSIDBDatabaseCustom.cpp: |
| (WebCore::JSIDBDatabase::createObjectStore): |
| * bindings/js/JSMessageEventCustom.cpp: |
| (WebCore::handleInitMessageEvent): |
| * bindings/js/JSMessagePortCustom.cpp: |
| (WebCore::fillMessagePortArray): |
| * bindings/js/JSMessagePortCustom.h: |
| (WebCore::handlePostMessage): |
| * bindings/js/JSMockContentFilterSettingsCustom.cpp: |
| (WebCore::JSMockContentFilterSettings::setDecisionPoint): |
| (WebCore::toDecision): |
| (WebCore::JSMockContentFilterSettings::setDecision): |
| (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision): |
| * bindings/js/JSNodeFilterCustom.cpp: |
| (WebCore::JSNodeFilter::acceptNode): |
| * bindings/js/JSNodeOrString.cpp: |
| (WebCore::toNodeOrStringVector): |
| * bindings/js/JSSQLTransactionCustom.cpp: |
| (WebCore::JSSQLTransaction::executeSql): |
| * bindings/js/JSSVGLengthCustom.cpp: |
| (WebCore::JSSVGLength::convertToSpecifiedUnits): |
| * bindings/js/JSStorageCustom.cpp: |
| (WebCore::JSStorage::getOwnPropertyNames): |
| * bindings/js/JSTextTrackCustom.cpp: |
| (WebCore::JSTextTrack::setLanguage): |
| * bindings/js/JSVideoTrackCustom.cpp: |
| (WebCore::JSVideoTrack::setKind): |
| (WebCore::JSVideoTrack::setLanguage): |
| * bindings/js/JSWebGL2RenderingContextCustom.cpp: |
| (WebCore::JSWebGL2RenderingContext::getIndexedParameter): |
| * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: |
| (WebCore::getObjectParameter): |
| (WebCore::JSWebGLRenderingContextBase::getExtension): |
| (WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter): |
| (WebCore::JSWebGLRenderingContextBase::getParameter): |
| (WebCore::JSWebGLRenderingContextBase::getProgramParameter): |
| (WebCore::JSWebGLRenderingContextBase::getShaderParameter): |
| (WebCore::toVector): |
| (WebCore::dataFunctionf): |
| (WebCore::dataFunctionMatrix): |
| * bindings/js/JSWebKitSubtleCryptoCustom.cpp: |
| (WebCore::cryptoKeyFormatFromJSValue): |
| (WebCore::cryptoKeyUsagesFromJSValue): |
| (WebCore::JSWebKitSubtleCrypto::generateKey): |
| (WebCore::importKey): |
| (WebCore::JSWebKitSubtleCrypto::importKey): |
| (WebCore::exportKey): |
| (WebCore::JSWebKitSubtleCrypto::exportKey): |
| (WebCore::JSWebKitSubtleCrypto::unwrapKey): |
| * bindings/js/JSWorkerCustom.cpp: |
| (WebCore::constructJSWorker): |
| * bindings/js/JSWorkerGlobalScopeCustom.cpp: |
| (WebCore::JSWorkerGlobalScope::importScripts): |
| (WebCore::JSWorkerGlobalScope::setTimeout): |
| (WebCore::JSWorkerGlobalScope::setInterval): |
| * bindings/js/ReadableStreamDefaultController.cpp: |
| (WebCore::ReadableStreamDefaultController::invoke): |
| * bindings/js/ScheduledAction.cpp: |
| (WebCore::ScheduledAction::create): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDictionaryImplementationContent): |
| (GenerateImplementation): |
| (GenerateParametersCheck): |
| (GenerateImplementationFunctionCall): |
| (GenerateConstructorDefinition): |
| * html/HTMLMediaElement.cpp: |
| (WebCore::controllerJSValue): |
| (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): |
| (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus): |
| |
| 2016-09-26 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| -Wtautological-compare triggered in URLParser::internalValuesConsistent |
| https://bugs.webkit.org/show_bug.cgi?id=162551 |
| |
| Reviewed by Alex Christensen. |
| |
| Fix logic error. |
| |
| * platform/URLParser.cpp: |
| (WebCore::URLParser::internalValuesConsistent): |
| |
| 2016-09-26 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| Add CairoUniquePtr and use it in FontPlatformDataFreetype.cpp |
| https://bugs.webkit.org/show_bug.cgi?id=162557 |
| |
| Reviewed by Alex Christensen. |
| |
| * platform/graphics/cairo/CairoUniquePtr.h: Added. |
| (WebCore::CairoPtrDeleter<cairo_font_options_t>::operator()): |
| * platform/graphics/freetype/FontPlatformDataFreeType.cpp: |
| (WebCore::getDefaultCairoFontOptions): Return a smart pointer. |
| (WebCore::FontPlatformData::buildScaledFont): Use smart pointer. |
| |
| 2016-09-26 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| Silence unused parameter warnings from Geoclue2Interface.c |
| https://bugs.webkit.org/show_bug.cgi?id=162545 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * PlatformGTK.cmake: |
| |
| 2016-09-26 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| std::unique_ptr deleter functions should not check if pointer is null |
| https://bugs.webkit.org/show_bug.cgi?id=162558 |
| |
| Reviewed by Alex Christensen. |
| |
| std::unique_ptr already does this before calling the deleter. |
| |
| * platform/graphics/x11/XUniquePtr.h: |
| (WebCore::XPtrDeleter::operator()): |
| (WebCore::XPtrDeleter<XImage>::operator()): |
| (WebCore::XPtrDeleter<_XGC>::operator()): |
| (WebCore::XPtrDeleter<__GLXcontextRec>::operator()): |
| |
| 2016-09-26 Per Arne Vollan <pvollan@apple.com> |
| |
| [Win][Debug] Compile fix. |
| https://bugs.webkit.org/show_bug.cgi?id=162550 |
| |
| Reviewed by Alex Christensen. |
| |
| Windows headers need the FragmentForwardIterator '==' operator in debug mode. |
| |
| * rendering/SimpleLineLayout.cpp: |
| (WebCore::SimpleLineLayout::FragmentForwardIterator::operator==): |
| |
| 2016-09-26 Michael Catanzaro <mcatanzaro@igalia.com> |
| |
| [GTK] Unnecessary extern functions in FontPlatformDataFreeType.cpp |
| https://bugs.webkit.org/show_bug.cgi?id=162555 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| These functions should be file-static. |
| |
| * platform/graphics/freetype/FontPlatformDataFreeType.cpp: |
| (WebCore::convertFontConfigSubpixelOrder): |
| (WebCore::convertFontConfigHintStyle): |
| (WebCore::setCairoFontOptionsFromFontConfigPattern): |
| |
| == Rolled over to ChangeLog-2016-09-26 == |