1 2016-12-06 Antoine Quint <graouts@apple.com>
3 [Modern Media Controls] Media controls use the fullscreen layout after going from inline to fullscreen to PiP to inline
4 https://bugs.webkit.org/show_bug.cgi?id=165494
6 Reviewed by Dean Jackson.
8 We would only call _updateControlsIfNeeded() when entering or leaving fullscreen, so we going from fullscreen to PiP to
9 inline would retain fullscreen controls since we would not check for the event that indicates we went back from PiP to
10 inline. On platforms that support it, we listen to the "webkitpresentationmodechanged" event
11 to update the controls, and only "webkitfullscreenchange" on others (ie. Yosemite).
13 Test: media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html
15 * Modules/modern-media-controls/media/media-controller.js:
17 (MediaController.prototype.handleEvent):
18 (MediaController.prototype._returnMediaLayerToInlineIfNeeded):
20 2016-12-06 Antoine Quint <graouts@apple.com>
22 [Modern Media Controls] Rendering issues with controls bar when captions are on
23 https://bugs.webkit.org/show_bug.cgi?id=165390
25 Reviewed by Dean Jackson.
27 We would face some layout issues with captions due to RenderImage::layoutShadowControls()
28 expecting a single RenderBox in the media controls shadow root, which was the case with
29 legacy media controls, but no longer the case with modern media controls. We now host
30 both the captions and the media controls elements under a single container, and add
31 an asertion in RenderImage to check that a single RenderBox child exists.
33 Test: media/modern-media-controls/media-controller/media-controller-single-container.html
35 * Modules/modern-media-controls/controls/media-controls.css:
36 (.media-controls-container):
37 (.media-controls-container,):
38 (.media-controls-container > *):
40 * Modules/modern-media-controls/controls/text-tracks.css:
41 (video::-webkit-media-text-track-container):
42 * Modules/modern-media-controls/media/media-controller.js:
44 (MediaController.prototype._updateControlsIfNeeded):
45 * rendering/RenderImage.cpp:
46 (WebCore::RenderImage::layoutShadowControls):
48 2016-12-06 Antoine Quint <graouts@apple.com>
50 [Modern Media Controls] Automatically hide the controls bar when the mouse is idle
51 https://bugs.webkit.org/show_bug.cgi?id=165492
53 Reviewed by Dean Jackson.
55 We now automatically hide the controls bar. When the media is no longer paused, the controls remain
56 visible for 4 seconds, regardless of where the mouse pointer is located. When the user mouses over the
57 media, the controls become visible and automatically hide 4 seconds after the last time the user has
58 moved his mouse over the media. When the user mouses out of the media, the controls automatically hide.
59 When the mouse is over the controls bar, it remains visible. When the media is paused, the controls bar
60 remain visible regardless of the mouse position.
62 Tests: media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-and-mouse-leave.html
63 media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-enter-over-controls-bar.html
64 media/modern-media-controls/media-controller/media-controller-auto-hide-mouse-leave-after-play.html
65 media/modern-media-controls/media-controller/media-controller-auto-hide-pause.html
66 media/modern-media-controls/media-controller/media-controller-auto-hide-rewind-with-mouse-enter.html
67 media/modern-media-controls/media-controller/media-controller-auto-hide.html
69 * Modules/modern-media-controls/controls/controls-bar.css: Added.
71 (.controls-bar.faded):
72 * Modules/modern-media-controls/controls/controls-bar.js:
73 (ControlsBar.prototype.get userInteractionEnabled):
74 (ControlsBar.prototype.set userInteractionEnabled):
75 (ControlsBar.prototype.get fadesWhileIdle):
76 (ControlsBar.prototype.set fadesWhileIdle):
77 (ControlsBar.prototype.get visible):
78 (ControlsBar.prototype.set visible):
79 (ControlsBar.prototype.get faded):
80 (ControlsBar.prototype.set faded):
81 (ControlsBar.prototype.handleEvent):
82 (ControlsBar.prototype.commitProperty):
83 (ControlsBar.prototype._cancelAutoHideTimer):
84 (ControlsBar.prototype._rewindAutoHideTimer):
85 (ControlsBar.prototype._autoHideTimerFired):
86 * Modules/modern-media-controls/controls/media-controls.js:
87 * Modules/modern-media-controls/media/controls-visibility-support.js:
88 (ControlsVisibilitySupport.prototype.get mediaEvents):
89 (ControlsVisibilitySupport.prototype.syncControl):
90 (ControlsVisibilitySupport):
91 * Modules/modern-media-controls/media/media-controller.js:
92 (MediaController.prototype._updateControlsIfNeeded):
94 2016-12-06 Zalan Bujtas <zalan@apple.com>
96 Can not select whole line when using flexbox
97 https://bugs.webkit.org/show_bug.cgi?id=165299
99 Reviewed by David Hyatt.
101 RootInlineBox::selectionTopAdjustedForPrecedingBlock assumes that the preceding block is
102 always above the current line. However in certain layout contexts (flex as an example) the block before
103 could just be on the same line as the current one.
105 This patch checks if we actually need to adjust the selection top to avoid vertical selection overlap.
107 Test: fast/flexbox/flexbox-fail-to-select-same-line.html
109 * rendering/RenderBlock.cpp:
110 (WebCore::RenderBlock::blockBeforeWithinSelectionRoot): Deleted.
111 * rendering/RenderBlock.h:
112 * rendering/RootInlineBox.cpp:
113 (WebCore::blockBeforeWithinSelectionRoot):
114 (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
116 2016-12-06 Ryosuke Niwa <rniwa@webkit.org>
118 Add more assertions to ElementQueue diagnose a bug
119 https://bugs.webkit.org/show_bug.cgi?id=164814
121 Reviewed by Alexey Proskuryakov.
123 Set m_invoking in release builds now that assertions are also run in release builds.
125 * dom/CustomElementReactionQueue.cpp:
126 (WebCore::CustomElementReactionStack::ElementQueue::invokeAll):
128 2016-12-06 Jer Noble <jer.noble@apple.com>
130 YouTube sometimes pauses when switching tabs
131 https://bugs.webkit.org/show_bug.cgi?id=165468
133 Reviewed by Eric Carlson.
135 Test: media/media-session-restrictions.html
137 The bitfield which represents the restrictions for "VideoAudio" media type was unititialized,
138 leading to what was effectively a random set of restrictions at runtime.
140 * platform/audio/PlatformMediaSessionManager.cpp:
141 (WebCore::PlatformMediaSessionManager::resetRestrictions):
142 * testing/Internals.cpp:
143 (WebCore::mediaTypeFromString):
144 (WebCore::Internals::setMediaSessionRestrictions):
145 (WebCore::Internals::mediaSessionRestrictions):
146 * testing/Internals.h:
147 * testing/Internals.idl:
149 2016-12-06 Mark Lam <mark.lam@apple.com>
151 Introduce the concept of Immutable Prototype Exotic Objects to comply with the spec.
152 https://bugs.webkit.org/show_bug.cgi?id=165227
153 <rdar://problem/29442665>
155 Reviewed by Saam Barati.
157 Make all objects in window.__proto__'s prototype chain immutable prototype exotic
158 objects. This gives us roughly equivalent behavior to other browsers.
160 Firefox's behavior differ slightly in that Firefox will fail any attempted
161 assignment their __proto__, while the immutable prototype exotic objects will
162 only fail if the assignment is of a different value. See
163 https://tc39.github.io/ecma262/#sec-immutable-prototype-exotic-objects.
165 Chrome differs in that assignment to window.__proto__ is also handled like an
166 immutable prototype exotic object. Instead we adhere to the current HTML spec
167 that says that the assignment should fail unconditionally. See
168 https://html.spec.whatwg.org/#the-windowproxy-exotic-object and
169 https://html.spec.whatwg.org/#windowproxy-setprototypeof.
171 If the HTML spec is changed to make the WindowProxy and Location objects into
172 immutable prototype exotic objects later, we can update to match the spec then.
174 Test: js/prototype-assignment.html
176 * bindings/js/JSDOMWindowProperties.h:
177 * bindings/scripts/CodeGeneratorJS.pm:
179 (GeneratePrototypeDeclaration):
180 * bindings/scripts/IDLAttributes.txt:
181 * dom/EventTarget.idl:
182 * page/DOMWindow.idl:
184 2016-12-06 Andreas Kling <akling@apple.com>
186 [Cocoa] Add some memory usage related information to sysdiagnose state dumps
187 <https://webkit.org/b/165375>
188 <rdar://problem/29057243>
190 Reviewed by Darin Adler.
192 Follow-up to address two more review comments.
194 * page/PerformanceLogging.cpp:
195 (WebCore::PerformanceLogging::javaScriptObjectCounts): Use WTFMove() when returning the
196 HashCountedSet to avoid making an extra copy.
198 2016-12-06 Dave Hyatt <hyatt@apple.com>
200 REGRESSION (Safari 10): Scrolling not working inside height 100% table
201 https://bugs.webkit.org/show_bug.cgi?id=164366
202 <rdar://problem/29095535>
204 Reviewed by Zalan Bujtas.
206 Added fast/table/overflow-percent-height-regression.html
208 * rendering/RenderBox.cpp:
209 (WebCore::RenderBox::computePercentageLogicalHeight):
210 This patch wasn't merged correctly from Blink. The value returned needed
213 2016-12-06 Sam Weinig <sam@webkit.org>
215 REGRESSION: media/track LayoutTests are flaky failures
216 https://bugs.webkit.org/show_bug.cgi?id=165432
218 Reviewed by Antoine Quint.
220 RenderThemeMac was caching the media controls script / style sheets
221 and not being invalidated when the RuntimeEnabledFeatures changed. So,
222 we can just cache both.
224 * bindings/generic/RuntimeEnabledFeatures.h:
225 Initialize m_areModernMediaControlsEnabled to false.
227 * rendering/RenderThemeMac.h:
228 * rendering/RenderThemeMac.mm:
229 (WebCore::RenderThemeMac::mediaControlsStyleSheet):
230 (WebCore::RenderThemeMac::mediaControlsScript):
231 Have separate caches for the modern and legacy media control scripts/style sheets.
233 2016-12-06 Sam Weinig <sam@webkit.org>
235 DumpRenderTree crashed in com.apple.WebCore: WebCore::MockMediaEndpoint::generateDtlsInfo const + 23
236 https://bugs.webkit.org/show_bug.cgi?id=165486
237 <rdar://problem/29149588>
239 Reviewed by Tim Horton.
241 The MockMediaEndpoint can be destroyed before the task created in MockMediaEndpoint::generateDtlsInfo()
242 gets a chance to run, so guard it with a weak pointer.
244 * platform/mock/MockMediaEndpoint.cpp:
245 (WebCore::MockMediaEndpoint::MockMediaEndpoint):
246 (WebCore::MockMediaEndpoint::generateDtlsInfo):
247 * platform/mock/MockMediaEndpoint.h:
249 2016-12-06 Chris Dumez <cdumez@apple.com>
251 Add HTML interactive form validation blacklist for some WebKit-specific sites
252 https://bugs.webkit.org/show_bug.cgi?id=165470
253 <rdar://problem/29509424>
255 Reviewed by Simon Fraser.
257 Add HTML interactive form validation blacklist for some WebKit-specific sites
258 expecting our old behavior, until they get a chance to be updated.
260 * html/HTMLFormElement.cpp:
261 (WebCore::isURLBlacklistedForInteractiveFormValidation):
262 (WebCore::HTMLFormElement::prepareForSubmission):
264 2016-12-06 Chris Dumez <cdumez@apple.com>
266 Unreviewed, rollout r209050.
268 This change may impact other popovers than the HTML validation one.
269 The previous code is safer.
271 * platform/ValidationBubble.h:
272 * platform/ios/ValidationBubbleIOS.mm:
273 (-[WebValidationBubbleDelegate adaptivePresentationStyleForPresentationController:traitCollection:]):
274 (WebCore::ValidationBubble::setAnchorRect):
275 * platform/spi/ios/UIKitSPI.h:
277 2016-12-05 Simon Fraser <simon.fraser@apple.com>
279 Improve the behavior of scroll-into-view when the target is inside position:fixed
280 https://bugs.webkit.org/show_bug.cgi?id=165354
282 Reviewed by Zalan Bujtas.
284 The existing RenderLayer::scrollRectToVisible() code paid no heed to whether the
285 target was inside position:fixed, resulting in unwanted scrolls.
287 Fix this by plumbing through from the call sites a "insideFixed" flag which we get
288 when we call localToAbsolute(), and use this flag to avoid scrolling at all if
291 If zoomed and we're focussing something inside position:fixed, and if visual viewports
292 are enabled, we can compute the visual viewport required to reveal the target rect,
293 which gives us the ideal scroll position.
295 Fix a bug on non-iOS platforms when zoomed, which is to scale the viewRect since
296 frameView.visibleContentRect() gives an unscaled rect on those platforms.
298 Not all callers of scrollRectToVisible() are fixed, but those that are not will get
299 the current behavior.
301 Tests: fast/overflow/scroll-anchor-in-position-fixed.html
302 fast/visual-viewport/zoomed-scroll-into-view-fixed.html
303 fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html
306 (WebCore::Element::scrollIntoView):
307 (WebCore::Element::scrollIntoViewIfNeeded):
308 (WebCore::Element::scrollIntoViewIfNotVisible):
309 (WebCore::Element::updateFocusAppearance):
310 * editing/FrameSelection.cpp:
311 (WebCore::FrameSelection::FrameSelection):
312 (WebCore::FrameSelection::absoluteCaretBounds):
313 (WebCore::FrameSelection::recomputeCaretRect):
314 (WebCore::FrameSelection::revealSelection):
315 * editing/FrameSelection.h:
316 * editing/VisiblePosition.cpp:
317 (WebCore::VisiblePosition::absoluteCaretBounds):
318 * editing/VisiblePosition.h:
319 * editing/htmlediting.cpp:
320 (WebCore::absoluteBoundsForLocalCaretRect):
321 * editing/htmlediting.h:
322 * page/FrameView.cpp:
323 (WebCore::FrameView::scrollElementToRect):
324 (WebCore::FrameView::scrollToAnchor):
325 * page/PrintContext.cpp:
326 (WebCore::PrintContext::outputLinkedDestinations):
327 * rendering/RenderElement.cpp:
328 (WebCore::RenderElement::getLeadingCorner):
329 (WebCore::RenderElement::getTrailingCorner):
330 (WebCore::RenderElement::absoluteAnchorRect):
331 (WebCore::RenderElement::anchorRect): Deleted.
332 * rendering/RenderElement.h:
333 * rendering/RenderLayer.cpp:
334 (WebCore::RenderLayer::scrollRectToVisible):
335 (WebCore::RenderLayer::getRectToExpose):
336 (WebCore::RenderLayer::autoscroll):
337 * rendering/RenderLayer.h:
338 * rendering/RenderObject.cpp:
339 (WebCore::RenderObject::scrollRectToVisible):
340 * rendering/RenderObject.h:
342 2016-12-06 Myles C. Maxfield <mmaxfield@apple.com>
344 [Cocoa] REGRESSION(r205396): Intermediate CTRuns with initial advances get double counted when glyph origins are enabled
345 https://bugs.webkit.org/show_bug.cgi?id=165084
347 Reviewed by Simon Fraser.
349 When glyph origins are not enabled, an intermediate CTRun's initial advance is simply added
350 to the previous glyph's advance. However, when glyph origins are enabled, this shouldn't
353 Test: fast/text/initial-advance-in-intermediate-run-complex.html
355 * platform/graphics/mac/ComplexTextController.cpp:
356 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
358 2016-12-06 Simon Fraser <simon.fraser@apple.com>
360 Enable visual viewports by default on Mac, and iOS Wk2
361 https://bugs.webkit.org/show_bug.cgi?id=165452
363 Reviewed by Zalan Bujtas.
365 Some tests revealed an issue where, during scrollbar updates, the visual viewport would be
366 15px wider than the layout viewport, which results in the layout viewport shifting 15px to the
367 right. Prevent this by disallowing viewport updates during the AdjustViewSize phase; we'll
368 be called again in postLayoutTasks.
370 * page/FrameView.cpp:
371 (WebCore::FrameView::updateLayoutViewport):
373 2016-12-06 Daniel Bates <dabates@apple.com>
375 Cleanup: Rename some HTTP 0.9-specific functions to conform to WebKit Code Style Guidelines
376 https://bugs.webkit.org/show_bug.cgi?id=165451
378 Reviewed by Alex Christensen.
380 Rename Document::shouldEnforceHTTP0_9Sandbox() and ResourceResponseBase::isHttpVersion0_9()
381 to Document::shouldEnforceHTTP09Sandbox() and ResourceResponseBase::isHTTP09, respectively,
382 to conform to the WebKit Code Style Guidelines.
385 (WebCore::Document::initSecurityContext):
386 (WebCore::Document::shouldEnforceHTTP09Sandbox): Renamed; formerly named shouldEnforceHTTP0_9Sandbox
388 * platform/network/ResourceHandle.cpp:
389 (WebCore::ResourceHandle::didReceiveResponse):
390 * platform/network/ResourceResponseBase.cpp:
391 (WebCore::ResourceResponseBase::isHTTP09): Renamed; formerly named isHttpVersion0_9.
392 * platform/network/ResourceResponseBase.h:
394 2016-12-06 Daniel Bates <dabates@apple.com>
396 Use Vector::uncheckedAppend() in more places
397 https://bugs.webkit.org/show_bug.cgi?id=164952
399 Reviewed by Darin Adler.
401 We can use Vector::uncheckedAppend() whenever the number of items that will be appended
402 to a vector is equal to or less than its capacity. Using Vector::uncheckedAppend() is
403 more efficient than Vector::append() as it avoids checking the capacity of the vector
404 before appending a value to the end of it.
406 * bindings/js/SerializedScriptValue.cpp:
407 (WebCore::SerializedScriptValue::SerializedScriptValue):
408 * contentextensions/DFABytecodeCompiler.cpp:
409 (WebCore::ContentExtensions::DFABytecodeCompiler::extractJumpTable):
410 * contentextensions/DFAMinimizer.cpp:
411 * css/StyleProperties.cpp:
412 (WebCore::StyleProperties::copyPropertiesInSet): Use Vector::uncheckedAppend() and inline
413 the assignment of the temporary variable value into the if condition to limit its scope
414 as it is referenced exactly once in the loop body.
416 (WebCore::StyleRuleGroup::StyleRuleGroup): Use Vector::uncheckedAppend() and write for-loop
417 using a C++11 range-based for-loop.
418 * css/parser/CSSParserValues.cpp:
419 (WebCore::CSSParserSelector::setLangArgumentList):
420 * cssjit/SelectorCompiler.cpp:
421 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
422 * dom/DocumentMarkerController.cpp:
423 (WebCore::updateRenderedRectsForMarker):
424 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
425 (WebCore::convertToLayoutUnits):
426 * platform/audio/AudioBus.cpp:
427 (WebCore::AudioBus::AudioBus):
428 * platform/graphics/FontCache.cpp:
429 (WebCore::FontCache::purgeInactiveFontData):
430 * platform/graphics/PathUtilities.cpp:
431 (WebCore::polygonsForRect):
432 * platform/mediastream/CaptureDeviceManager.cpp:
433 (CaptureDeviceManager::bestSourcesForTypeAndConstraints):
434 * platform/mediastream/RealtimeMediaSource.cpp:
435 (WebCore::RealtimeMediaSource::fitnessDistance):
436 * platform/network/cf/FormDataStreamCFNet.cpp:
437 (WebCore::formCreate):
439 2016-12-04 Darin Adler <darin@apple.com>
441 Use ASCIICType more, and improve it a little bit
442 https://bugs.webkit.org/show_bug.cgi?id=165360
444 Reviewed by Sam Weinig.
446 * css/CSSGrammar.y.in: Use isASCIIDigit.
448 * css/parser/CSSParser.cpp:
449 (WebCore::CSSParser::parseFontFaceUnicodeRange): Use isASCIIHexDigit and
451 (WebCore::isEqualToCSSIdentifier): Use isASCIILower.
452 * html/FormController.cpp:
453 (WebCore::isNotFormControlTypeCharacter): Use isASCIILower.
454 * html/parser/CSSPreloadScanner.cpp:
455 (WebCore::CSSPreloadScanner::tokenize): Use isASCIIAlpha.
456 * platform/Decimal.cpp:
457 (WebCore::Decimal::fromString): Use isASCIIDigit.
458 * platform/FileSystem.cpp:
459 (WebCore::decodeFromFilename): Use isASCIIHexDigit and toASCIIHexValue.
461 (WebCore::isLetterMatchIgnoringCase): Deleted.
462 (WebCore::isSchemeCharacterMatchIgnoringCase): Deleted.
463 (WebCore::assertProtocolIsGood): Use isASCIIUpper.
464 (WebCore::URL::protocolIs): Use isASCIIAlphaCaselessEqual.
465 (WebCore::URL::parse): Ditto.
466 (WebCore::protocolIs): Ditto.
467 (WebCore::protocolIsInHTTPFamily): Ditto.
468 * platform/URLParser.cpp:
469 (WeCore::URLParser::parseIPv4Piece): Use isASCIIDigit.
471 * platform/mac/WebCoreNSURLExtras.mm:
472 (WebCore::isRussianDomainNameCharacter): Use isASCIIDigit.
473 (WebCore::allCharactersAllowedByTLDRules): Ditto.
474 (WebCore::dataWithUserTypedString): Use upperNibbleToASCIIHexDigit and
475 lowerNibbleToASCIIHexDigit.
476 (WebCore::dataForURLComponentType): Ditto.
477 (WebCore::createStringWithEscapedUnsafeCharacters): Ditto.
478 (WebCore::userVisibleString): Use isASCIIHexDigit, toASCIIHexValue,
479 upperNibbleToASCIIHexDigit, and lowerNibbleToASCIIHexDigit.
480 (WebCore::isUserVisibleURL): Use isASCIIHexDigit and toASCIIHexValue.
482 * platform/network/FormDataBuilder.cpp:
483 (WebCore::FormDataBuilder::encodeStringAsFormData): Use isASCIIAlphanumeric.
485 * rendering/mathml/RenderMathMLToken.cpp:
486 (WebCore::mathVariant): Use isASCIIUpper, isASCIILower, and isASCIIDigit.
488 * svg/SVGParserUtilities.cpp:
489 (WebCore::genericParseNumber): Use isASCIIDigit.
490 * svg/SVGPathStringSource.cpp:
491 (WebCore::nextCommandHelper): Ditto.
492 * xml/XPathParser.cpp:
493 (WebCore::XPath::Parser::lexNumber): Ditto.
494 (WebCore::XPath::Parser::nextTokenInternal): Ditto.
496 2016-12-06 Ryan Haddad <ryanhaddad@apple.com>
498 Rebaseline bindings tests after r209390.
500 Unreviewed test gardening.
502 * bindings/scripts/test/JS/JSTestObj.cpp:
503 (WebCore::convertDictionaryToJS):
504 * bindings/scripts/test/JS/JSTestObj.h:
506 2016-12-06 Tim Horton <timothy_horton@apple.com>
508 PDF markup/annotations visible in Mail on macOS but not on iOS
509 https://bugs.webkit.org/show_bug.cgi?id=165444
510 <rdar://problem/28942896>
512 Reviewed by Simon Fraser.
514 No new tests, but enabled an existing test for this feature.
516 * platform/graphics/cg/PDFDocumentImage.cpp:
517 (WebCore::PDFDocumentImage::drawPDFPage):
518 * platform/spi/cg/CoreGraphicsSPI.h:
519 Make use of CGContextDrawPDFPageWithAnnotations where available,
520 to paint the page with annotations.
522 2016-12-06 Dave Hyatt <hyatt@apple.com>
524 [CSS Parser] Turn on the new CSS parser
525 https://bugs.webkit.org/show_bug.cgi?id=165213
527 Reviewed by Zalan Bujtas.
531 2016-12-06 Dan Bernstein <mitz@apple.com>
533 Tried to fix the USE(APPLE_INTERNAL_SDK) build after r209385.
535 * platform/spi/cocoa/NSTouchBarSPI.h:
537 2016-12-05 Jer Noble <jer.noble@apple.com>
539 [pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
540 https://bugs.webkit.org/show_bug.cgi?id=165377
542 Reviewed by Darin Adler.
544 Introduce the concept of "force cursor to become visible" when requesting the pointer be
545 unlocked. ESC events will cause the pointer to become visible, while normal key events
548 * page/EventHandler.cpp:
549 (WebCore::EventHandler::keyEvent):
550 * page/PointerLockController.cpp:
551 (WebCore::PointerLockController::requestPointerUnlock):
552 (WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible):
553 (WebCore::PointerLockController::documentDetached):
554 (WebCore::PointerLockController::didLosePointerLock):
555 * page/PointerLockController.h:
557 Drive-by fix: apply Darin's feedback to existing functions:
560 (WebCore::Document::prepareForDestruction):
562 (WebCore::Element::removedFrom):
563 * page/PointerLockController.cpp:
564 (WebCore::PointerLockController::elementRemoved):
565 (WebCore::PointerLockController::documentDetached):
568 2016-12-06 Sam Weinig <sam@webkit.org>
570 [WebIDL] Add support for converting dictionaries to JS
571 https://bugs.webkit.org/show_bug.cgi?id=165367
573 Reviewed by Darin Adler and Alex Christensen.
575 - Adds support for converting dictionary types to JSValues via JSDOMConvert.
576 - Adopts that functionality to correct the CryptoKeyPair implementation, which
577 is supposed to be a dictionary.
578 (While doing this, I also update places that were passing both a CryptoKey
579 and CryptoKeyPair to use a Variant, since they always only wanted one.)
580 - Re-works DOMPromise and DeferredPromise to be based on JSDOMConvert and IDLTypes.
586 * WebCore.xcodeproj/project.pbxproj:
587 Remove JSCryptoKeyPairCustom.cpp and CryptoKeyPair.cpp.
589 * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
590 * Modules/mediasource/MediaSource.cpp:
591 * Modules/mediasource/SourceBuffer.cpp:
592 * bindings/js/JSMediaDevicesCustom.cpp:
593 * html/MediaController.cpp:
594 * html/track/TextTrack.cpp:
595 Add some missing includes.
597 * Modules/applepay/ApplePaySession.cpp:
598 (WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
599 (WebCore::ApplePaySession::openPaymentSetup):
600 * Modules/fetch/FetchBody.cpp:
601 (WebCore::FetchBody::text):
602 (WebCore::FetchBody::consume):
603 (WebCore::FetchBody::loadingFailed):
604 * Modules/fetch/FetchBodyConsumer.cpp:
605 (WebCore::FetchBodyConsumer::resolveWithData):
606 (WebCore::FetchBodyConsumer::resolve):
607 * Modules/fetch/FetchBodyOwner.cpp:
608 (WebCore::FetchBodyOwner::blob):
609 (WebCore::FetchBodyOwner::formData):
610 (WebCore::FetchBodyOwner::text):
611 * Modules/fetch/FetchResponse.h:
612 * Modules/mediastream/MediaDevices.h:
613 * Modules/mediastream/MediaEndpointPeerConnection.cpp:
614 (WebCore::MediaEndpointPeerConnection::replaceTrack):
615 (WebCore::MediaEndpointPeerConnection::replaceTrackTask):
616 * Modules/mediastream/MediaEndpointPeerConnection.h:
617 * Modules/mediastream/MediaStreamTrack.cpp:
618 (WebCore::MediaStreamTrack::applyConstraints):
619 * Modules/mediastream/PeerConnectionBackend.cpp:
620 (WebCore::PeerConnectionBackend::setLocalDescription):
621 (WebCore::PeerConnectionBackend::setRemoteDescription):
622 (WebCore::PeerConnectionBackend::addIceCandidate):
623 * Modules/mediastream/PeerConnectionBackend.h:
624 * Modules/mediastream/RTCPeerConnection.cpp:
625 (WebCore::RTCPeerConnection::queuedSetLocalDescription):
626 (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
627 (WebCore::RTCPeerConnection::queuedAddIceCandidate):
628 (WebCore::RTCPeerConnection::replaceTrack):
629 * Modules/mediastream/RTCPeerConnection.h:
630 * Modules/mediastream/RTCRtpSender.cpp:
631 (WebCore::RTCRtpSender::replaceTrack):
632 * Modules/mediastream/RTCRtpSender.h:
633 * Modules/mediastream/UserMediaRequest.cpp:
634 (WebCore::UserMediaRequest::deny):
635 * Modules/webaudio/AudioContext.cpp:
636 (WebCore::AudioContext::suspend):
637 (WebCore::AudioContext::resume):
638 * bindings/js/JSCustomElementRegistryCustom.cpp:
639 (WebCore::whenDefinedPromise):
640 * bindings/js/ScriptModuleLoader.cpp:
641 (WebCore::ScriptModuleLoader::resolve):
642 (WebCore::ScriptModuleLoader::notifyFinished):
644 * css/FontFaceSet.cpp:
645 (WebCore::FontFaceSet::load):
647 * dom/CustomElementRegistry.cpp:
648 (WebCore::CustomElementRegistry::addElementDefinition):
649 * html/HTMLMediaElement.cpp:
650 (WebCore::HTMLMediaElement::rejectPendingPlayPromises):
651 * html/HTMLMediaElement.h:
652 Update to use new IDLType based promises.
654 * bindings/generic/IDLTypes.h:
655 Add a new type, ParameterType, to use as the parameter to
656 DOMPromise/DeferredPromise.
658 * bindings/js/JSCryptoKeyPairCustom.cpp:
661 * bindings/js/JSDOMConvert.h:
662 (WebCore::JSConverter<IDLDictionary<T>>::convert):
663 Add JSConverter specialization for IDLDictionary. Have it simply forward to a generated
664 convertDictionaryToJS function, following the convention set in place by IDLEnumeration.
666 * bindings/js/JSDOMPromise.cpp:
667 * bindings/js/JSDOMPromise.h:
668 Re-write to be based on IDLTypes and JSDOMConvert, simplifying the implementation.
670 * bindings/js/JSSubtleCryptoCustom.cpp:
671 * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
672 Update for variant based KeyOrKeyPair.
674 * bindings/scripts/CodeGeneratorJS.pm:
675 (GenerateDictionaryHeaderContent):
676 (GenerateDictionaryImplementationContent):
677 Add generation of the convertDictionaryToJS function. I made it require the JSGenerateToJSObject
678 extended attribute for now, as the majority of dictionaries do not need this code generated for them.
680 * bindings/scripts/test/JS/JSTestObj.cpp:
681 (WebCore::convertDictionaryToJS):
682 * bindings/scripts/test/JS/JSTestObj.h:
683 * bindings/scripts/test/TestObj.idl:
684 Add JSGenerateToJSObject to a dictionary to test generation in bindings tests.
686 * crypto/CryptoAlgorithm.h:
687 Change KeyOrKeyPairCallback to take a Variant<RefPtr<CryptoKey>, CryptoKeyPair>, rather
688 than two separate arguments.
690 * crypto/CryptoKeyPair.cpp:
693 * crypto/CryptoKeyPair.h:
696 * crypto/CryptoKeyPair.idl:
697 Convert to a dictionary.
699 * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
700 (WebCore::CryptoAlgorithmAES_CBC::generateKey):
701 * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
702 (WebCore::CryptoAlgorithmAES_KW::generateKey):
703 * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
704 (WebCore::CryptoAlgorithmHMAC::generateKey):
705 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
706 (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
707 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
708 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
709 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
710 (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
711 * crypto/keys/CryptoKeyRSA.h:
712 * crypto/mac/CryptoKeyRSAMac.cpp:
713 (WebCore::CryptoKeyRSA::generatePair):
714 Update for new signature of KeyOrKeyPairCallback.
716 2016-12-05 Dave Hyatt <hyatt@apple.com>
718 [CSS Parser] Reject invalid hex colors on the fast path
719 https://bugs.webkit.org/show_bug.cgi?id=165461
721 Reviewed by Zalan Bujtas.
723 * css/parser/CSSParserFastPaths.cpp:
724 (WebCore::fastParseColorInternal):
725 Make sure to check for success. There was even a FIXME in the code about this!
726 Matches our old parser's behavior.
728 2016-12-05 Antoine Quint <graouts@apple.com>
730 [Modern Media Controls] Controls bar in fullscreen cannot be dragged
731 https://bugs.webkit.org/show_bug.cgi?id=165448
733 Reviewed by Simon Fraser.
735 We weren't listening to mousemove and mouseup events on the right event target, window in the context
736 of a fullscreen shadow root makes no sense. We now listen to those events on the media controls, which
737 we size to fit the whole of the media element's bounds. We then apply a transform to the controls bar
738 to apply the dragging distance.
740 Test: media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-drag.html
742 * Modules/modern-media-controls/controls/controls-bar.js:
743 (ControlsBar.prototype.get translation):
744 (ControlsBar.prototype.set translation):
745 (ControlsBar.prototype.commitProperty):
746 (ControlsBar): Deleted.
747 * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:
748 (.media-controls.mac.fullscreen):
749 (.media-controls.mac.fullscreen > .controls-bar):
750 * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
751 (MacOSFullscreenMediaControls.prototype._handleMousedown):
752 (MacOSFullscreenMediaControls.prototype._handleMousemove):
753 (MacOSFullscreenMediaControls.prototype._handleMouseup):
755 2016-12-05 Dave Hyatt <hyatt@apple.com>
757 [CSS Parser] Allow calc in SVG attributes
758 https://bugs.webkit.org/show_bug.cgi?id=165459
760 Reviewed by Zalan Bujtas.
762 * css/parser/CSSPropertyParserHelpers.cpp:
763 (WebCore::CSSPropertyParserHelpers::consumeLength):
765 2016-12-05 Brady Eidson <beidson@apple.com>
767 Build fix followup to r209379:
769 STP 19 fails to launch on 16B255
770 https://bugs.webkit.org/show_bug.cgi?id=165388
772 rdar://problem/29514476
774 Rubberstamped by Tim Horton.
776 No new tests (No behavior change).
778 * platform/spi/cocoa/NSTouchBarSPI.h: Strategically relocate NS_ASSUME_NONNULL* macros.
780 2016-12-05 Dave Hyatt <hyatt@apple.com>
782 [CSS Parser] Make sure the SVGPaint URI and currentColor style still paints using the URI
783 https://bugs.webkit.org/show_bug.cgi?id=165457
785 Reviewed by Zalan Bujtas.
787 * rendering/svg/SVGResources.cpp:
788 (WebCore::paintingResourceFromSVGPaint):
789 Add support for this paint type. The old parser doesn't use it.
791 2016-12-05 Dave Hyatt <hyatt@apple.com>
793 [CSS Parser] Fix dashboard region parsing
794 https://bugs.webkit.org/show_bug.cgi?id=165456
796 Reviewed by Zalan Bujtas.
798 * css/parser/CSSPropertyParser.cpp:
799 (WebCore::consumeWebkitDashboardRegion):
800 Make sure to reject whitespace by itself as well as unclosed dashboard-region functions.
802 2016-12-05 Dave Hyatt <hyatt@apple.com>
804 [CSS Parser] Properly reject large numeric values
805 https://bugs.webkit.org/show_bug.cgi?id=165455
807 Reviewed by Zalan Bujtas.
809 The new parser clamped numeric values in both the slow and fast paths to the max
810 and min float values. The old parser simply allowed the values to be inf, and then
811 had std::isinf checks to reject.
813 Blink rejects also even though it clamps, but I could not discern the mechanism by
814 which they did so. Therefore I am changing the new parser to exactly match the old
815 parser. Numeric values are no longer clamped, but instead are allowed to be inf, and
816 isinf checks now exist in the new parser in the same places they do in the old parser.
818 * css/parser/CSSParserFastPaths.cpp:
819 (WebCore::parseSimpleLength):
820 (WebCore::parseSimpleLengthValue):
821 * css/parser/CSSParserToken.cpp:
822 (WebCore::CSSParserToken::CSSParserToken):
823 * css/parser/CSSPropertyParserHelpers.cpp:
824 (WebCore::CSSPropertyParserHelpers::consumeLength):
825 (WebCore::CSSPropertyParserHelpers::consumePercent):
827 2016-12-05 Ricky Mondello <rmondello@apple.com>
829 STP 19 fails to launch on 16B255
830 https://bugs.webkit.org/show_bug.cgi?id=165388
832 rdar://problem/29514476
834 Reviewed by Tim Horton.
836 * platform/spi/cocoa/NSTouchBarSPI.h: Re-declare the SPI symbols as weak. The cited crash itself is for a
837 symbol we weren't handling here, but is part of the same group. Re-declare all four of these symbols to
840 2016-12-05 Antoine Quint <graouts@apple.com>
842 ERROR: post-layout: dirty renderer(s) - Encountered with LayoutTest media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html
843 https://bugs.webkit.org/show_bug.cgi?id=165312
845 Reviewed by Simon Fraser.
847 Reverting part of the code added in https://bugs.webkit.org/show_bug.cgi?id=165287 that triggered
848 an assertion. We go back to removing previous media controls as we add new ones when the fullscreen
849 status changes, and simply hide the controls during the animated transition using a CSS pseudo-class.
850 This also fixes an issue where we wouldn't have removed the previous controls should we have entered
851 fullscreen in a different way than clicking on the fullscreen button in the media controls.
853 We restore testing coverage that was fixed due to this assertion.
855 * Modules/modern-media-controls/controls/media-controls.css:
856 (:host(:-webkit-animating-full-screen-transition) .media-controls):
857 * Modules/modern-media-controls/controls/media-controls.js:
858 (MediaControls.prototype.fadeIn):
859 (MediaControls.prototype.presentInElement): Deleted.
860 * Modules/modern-media-controls/media/fullscreen-support.js:
861 (FullscreenSupport.prototype.buttonWasClicked):
862 * Modules/modern-media-controls/media/media-controller.js:
863 (MediaController.prototype._updateControlsIfNeeded):
865 2016-12-05 Dean Jackson <dino@apple.com>
867 MediaDocuments crash with modern media controls
868 https://bugs.webkit.org/show_bug.cgi?id=165446
869 <rdar://problem/29524959>
871 Reviewed by Antoine Quint.
873 The modern media controls inject a <style> element into
874 the document, which exposed a bug when used in MediaDocuments.
875 Such documents were not getting a charset, and the hash table
876 for the CSSParserContexts was crashing.
878 Test: media/modern-media-controls/media-documents/insert-style-should-not-crash.html
880 * css/parser/CSSParserMode.h: Guard against an empty charset.
881 (WebCore::CSSParserContextHash::hash):
882 * dom/InlineStyleSheetOwner.cpp: Ask for the charset with fallback.
883 (WebCore::parserContextForElement):
885 2016-12-05 Dave Hyatt <hyatt@apple.com>
887 [CSS Parser] shape-rendering supports crispEdges rather than crisp-edges
888 https://bugs.webkit.org/show_bug.cgi?id=165443
890 Reviewed by Tim Horton.
892 * css/parser/CSSParserFastPaths.cpp:
893 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
895 2016-12-05 Dave Hyatt <hyatt@apple.com>
897 [CSS Parser] Support setting of custom properties from the CSS OM
898 https://bugs.webkit.org/show_bug.cgi?id=165442
900 Reviewed by Tim Horton.
902 * css/parser/CSSParser.cpp:
903 (WebCore::CSSParser::parseCustomPropertyValue):
904 Call in to a new function in CSSParserImpl that can handle
905 custom property parsing.
907 * css/parser/CSSParserImpl.cpp:
908 (WebCore::CSSParserImpl::parseCustomPropertyValue):
909 New function that is similar to parseValue, but handling custom
912 (WebCore::CSSParserImpl::consumeDeclaration):
913 (WebCore::CSSParserImpl::consumeCustomPropertyValue):
914 (WebCore::CSSParserImpl::consumeVariableValue): Deleted.
915 * css/parser/CSSParserImpl.h:
916 Rename consumeVariableValue to consumeCustomPropertyValue, since that
917 is more clear. consumeVariableValue sounds like you might be resolving
918 a variable reference rather than parsing a custom property's value.
920 2016-12-05 Tim Horton <timothy_horton@apple.com>
922 Adopt CAMachPort-as-layer-contents
923 https://bugs.webkit.org/show_bug.cgi?id=141687
924 <rdar://problem/19393233>
926 Reviewed by Darin Adler.
928 No new tests, just a performance bump.
930 * platform/spi/cocoa/QuartzCoreSPI.h:
933 2016-12-05 Dave Hyatt <hyatt@apple.com>
935 [CSS Parser] calcs on column-width that resolve to 0 should be discarded
936 https://bugs.webkit.org/show_bug.cgi?id=165439
938 Reviewed by Dean Jackson.
940 * css/parser/CSSPropertyParser.cpp:
941 (WebCore::consumeColumnWidth):
943 2016-12-05 Dean Jackson <dino@apple.com>
945 pointer lock needs to be feature detectable
946 https://bugs.webkit.org/show_bug.cgi?id=165426
947 <rdar://problem/29486715>
949 Reviewed by Antoine Quint.
951 Annotate the public-facing API for pointer-lock, so
952 that it is hidden when not available.
954 Also move the Setting to a RuntimeEnabledFeature, since
955 pointer-lock is exposed from WebKit as a feature.
957 Tests: pointer-lock/pointerlock-interface-disabled.html
958 pointer-lock/pointerlock-interface.html
960 * bindings/generic/RuntimeEnabledFeatures.h:
961 (WebCore::RuntimeEnabledFeatures::setPointerLockEnabled):
962 (WebCore::RuntimeEnabledFeatures::pointerLockEnabled):
965 * page/PointerLockController.cpp:
966 (WebCore::PointerLockController::requestPointerLock):
967 (WebCore::PointerLockController::requestPointerUnlock):
970 2016-12-05 Keith Rollin <krollin@apple.com>
972 Reduce number of platformMemoryUsage calls
973 https://bugs.webkit.org/show_bug.cgi?id=164375
975 Reviewed by Darin Adler.
977 Removed the calls to WTF::releaseFastMallocFreeMemory (it's already
978 called elsewhere in the free-all-memory pipeline) and
979 malloc_zone_pressure_relief (it should be called by the OS on its own
982 No new tests -- no new or changed features.
984 * platform/cocoa/MemoryPressureHandlerCocoa.mm:
985 (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
987 2016-12-05 Dave Hyatt <hyatt@apple.com>
989 [CSS Parser] Leave the Animation type alone when the property is invalid
990 https://bugs.webkit.org/show_bug.cgi?id=165418
992 Reviewed by Dean Jackson.
994 * css/CSSToStyleMap.cpp:
995 (WebCore::CSSToStyleMap::mapAnimationProperty):
997 2016-12-05 Antti Koivisto <antti@apple.com>
999 keyframes do not work when defined inside a style in a shadowRoot
1000 https://bugs.webkit.org/show_bug.cgi?id=164608
1001 <rdar://problem/29210251>
1003 Reviewed by Darin Adler.
1005 With :host and ::slotted rules a keyframe animation affecting an element can be
1006 defined in a style scope different from the element's own scope. Style resolver
1007 loses the scope information when building the RenderStyle so there is no way
1008 to find out the correct scope.
1010 Fix by passing style scope through to style builder and including a scope association
1011 with the animation name. Find the correct scope when resolving keyframes.
1013 Test: fast/shadow-dom/shadow-host-animation.html
1015 * css/CSSToStyleMap.cpp:
1016 (WebCore::CSSToStyleMap::mapAnimationName):
1018 Include scope with the name.
1020 * css/ElementRuleCollector.cpp:
1021 (WebCore::MatchRequest::MatchRequest):
1022 (WebCore::ElementRuleCollector::addMatchedRule):
1023 (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
1024 (WebCore::ElementRuleCollector::matchAuthorRules):
1025 (WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules):
1026 (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
1027 (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
1028 (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1030 Replace treeContextOrdinal int with Style::ScopeOrdinal enum carrying the same information.
1031 Simplify the code removing unnecessary use of MatchRequest struct.
1033 (WebCore::compareRules):
1034 * css/ElementRuleCollector.h:
1035 * css/StyleResolver.cpp:
1036 (WebCore::StyleResolver::MatchResult::addMatchedProperties):
1037 (WebCore::StyleResolver::CascadedProperties::setPropertyInternal):
1038 (WebCore::StyleResolver::CascadedProperties::set):
1039 (WebCore::StyleResolver::CascadedProperties::setDeferred):
1041 Pass styleScopeOrdinal through the cascade mechanism
1043 (WebCore::cascadeLevelForIndex):
1044 (WebCore::StyleResolver::CascadedProperties::addMatch):
1045 (WebCore::StyleResolver::CascadedProperties::addImportantMatches):
1046 (WebCore::StyleResolver::CascadedProperties::Property::apply):
1048 Set styleScopeOrdinal in State when applying style.
1050 (WebCore::StyleResolver::CascadedProperties::addStyleProperties): Deleted.
1052 Move the code to the only caller.
1054 * css/StyleResolver.h:
1055 (WebCore::StyleResolver::State::styleScopeOrdinal):
1056 (WebCore::StyleResolver::State::setStyleScopeOrdinal):
1057 * page/animation/CompositeAnimation.cpp:
1058 (WebCore::KeyframeAnimation::KeyframeAnimation):
1059 (WebCore::KeyframeAnimation::resolveKeyframeStyles):
1061 Find the correct scope for resolving keyframes based on the scope ordinal.
1063 * platform/animation/Animation.cpp:
1064 * platform/animation/Animation.h:
1066 Add m_nameStyleScopeOrdinal that tells the scope where the name is defined.
1068 * style/StyleScope.cpp:
1069 (WebCore::Style::Scope::forOrdinal):
1071 Find the scope for ordinal.
1073 * style/StyleScope.h:
1075 Define ScopeOrdinal types.
1077 (WebCore::Style::operator++):
1079 2016-12-05 Dave Hyatt <hyatt@apple.com>
1081 [CSS Parser] Support glyph-orientation-horizontal and glyph-orientation-vertical
1082 https://bugs.webkit.org/show_bug.cgi?id=165414
1084 Reviewed by Zalan Bujtas.
1086 * css/parser/CSSPropertyParser.cpp:
1087 (WebCore::consumeGlyphOrientation):
1088 (WebCore::CSSPropertyParser::parseSingleValue):
1089 Add support for the glyph-orientation-horizontal and glyph-orientation-vertical
1090 properties. They take an angle and allow unitless values.
1092 * css/parser/CSSPropertyParserHelpers.cpp:
1093 (WebCore::CSSPropertyParserHelpers::consumeAngle):
1094 Fix a bug in the handling of unitless values for angles. Make sure to
1095 actually pass in the value instead of always doing 0. Blink does not
1096 accept unitless values for angles at all, so this is another difference
1097 to investigate for SVG in the future.
1099 2016-12-05 Ryan Haddad <ryanhaddad@apple.com>
1101 Unreviewed, rolling out r209299.
1103 This change appears to have caused LayoutTest failures on
1108 "Improve the behavior of scroll-into-view when the target is
1109 inside position:fixed"
1110 https://bugs.webkit.org/show_bug.cgi?id=165354
1111 http://trac.webkit.org/changeset/209299
1113 2016-12-05 Andreas Kling <akling@apple.com>
1115 [Cocoa] Add some memory usage related information to sysdiagnose state dumps
1116 <https://webkit.org/b/165375>
1117 <rdar://problem/29057243>
1119 Reviewed by Darin Adler.
1121 Add a flag to memoryUsageStatistics() to allow gathering of slightly more expensive information.
1122 This mode is used when capturing a state dump for sysdiagnose.
1124 The more expensive information added in this patch relates to information about live objects
1125 and memory on the JavaScript heap.
1127 * WebCore.xcodeproj/project.pbxproj:
1128 * page/PerformanceLogging.cpp:
1129 (WebCore::PerformanceLogging::memoryUsageStatistics):
1130 (WebCore::PerformanceLogging::javaScriptObjectCounts):
1131 (WebCore::PerformanceLogging::didReachPointOfInterest):
1132 * page/PerformanceLogging.h:
1134 2016-12-05 Dave Hyatt <hyatt@apple.com>
1136 [CSS Parser] Make sure the transform fast path uses WebKitCSSTransformValue
1137 https://bugs.webkit.org/show_bug.cgi?id=165399
1139 Reviewed by Dean Jackson.
1141 * css/parser/CSSParserFastPaths.cpp:
1142 (WebCore::parseTransformTranslateArguments):
1143 (WebCore::parseTransformNumberArguments):
1144 (WebCore::parseSimpleTransformValue):
1145 (WebCore::parseSimpleTransformList):
1147 2016-12-05 Dave Hyatt <hyatt@apple.com>
1149 [CSS Parser] Fix calc() with -webkit-line-clamp
1150 https://bugs.webkit.org/show_bug.cgi?id=165398
1152 Reviewed by Zalan Bujtas.
1154 Remove the aggressive token type checking up front, since it was causing calc() to not
1157 * css/parser/CSSPropertyParser.cpp:
1158 (WebCore::consumeLineClamp):
1160 2016-12-05 Dave Hyatt <hyatt@apple.com>
1162 [CSS Parser] Support -webkit-text-decoration
1163 https://bugs.webkit.org/show_bug.cgi?id=165391
1165 Reviewed by Dean Jackson.
1167 * css/parser/CSSPropertyParser.cpp:
1168 (WebCore::CSSPropertyParser::parseShorthand):
1170 2016-12-05 Beth Dakin <bdakin@apple.com>
1172 STP 19 fails to launch on 16B255
1173 https://bugs.webkit.org/show_bug.cgi?id=165388
1175 rdar://problem/29514476
1177 Rubber-stamped by Brady Eidson.
1179 * platform/spi/cocoa/NSTouchBarSPI.h:
1181 2016-12-05 Beth Dakin <bdakin@apple.com>
1183 STP 19 fails to launch on 16B255
1184 https://bugs.webkit.org/show_bug.cgi?id=165388
1186 rdar://problem/29514476
1188 Reviewed by Tim Horton.
1191 * platform/spi/cocoa/NSTouchBarSPI.h:
1193 2016-12-05 Dave Hyatt <hyatt@apple.com>
1195 [CSS Parser] Support the 'alphabetic' keyword for text-underline-position
1196 https://bugs.webkit.org/show_bug.cgi?id=165387
1198 Reviewed by Simon Fraser.
1200 Fixes fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position.html
1202 * css/parser/CSSPropertyParser.cpp:
1203 (WebCore::CSSPropertyParser::parseSingleValue):
1205 2016-12-05 Dave Hyatt <hyatt@apple.com>
1207 [CSS Parser] Fix assert when unknown properties are encountered.
1208 https://bugs.webkit.org/show_bug.cgi?id=165385
1210 Reviewed by Zalan Bujtas.
1212 * css/CSSToStyleMap.cpp:
1213 (WebCore::CSSToStyleMap::mapAnimationProperty):
1215 2016-12-05 Dave Hyatt <hyatt@apple.com>
1217 [CSS Parser] Fix rx and ry parsing
1218 https://bugs.webkit.org/show_bug.cgi?id=165383
1220 Reviewed by Dean Jackson.
1222 * css/parser/CSSParserFastPaths.cpp:
1223 (WebCore::isSimpleLengthPropertyID):
1224 rx and ry can be negative in the slow path, so make sure they can be negative in the
1227 * css/parser/CSSPropertyParser.cpp:
1228 (WebCore::consumeRxOrRy):
1229 Disallow auto as a value since we are not equipped to handle it, and it's not clear if it's
1232 2016-12-05 Konstantin Tokarev <annulen@yandex.ru>
1234 Add __STDC_FORMAT_MACROS before inttypes.h is included
1235 https://bugs.webkit.org/show_bug.cgi?id=165374
1237 We need formatting macros like PRIu64 to be available in all places where
1238 inttypes.h header is used. All these usages get inttypes.h definitions
1239 via wtf/Assertions.h header, except SQLiteFileSystem.cpp where formatting
1240 macros are not used anymore since r185129.
1242 This patch fixes multiple build errors with MinGW and reduces number of
1243 independent __STDC_FORMAT_MACROS uses in the code base.
1245 Reviewed by Darin Adler.
1247 No new tests needed.
1249 * platform/sql/SQLiteFileSystem.cpp: Removed unused inttypes.h
1252 2016-12-05 Dave Hyatt <hyatt@apple.com>
1254 [CSS Parser] Properly fail on bad values for -webkit-clip-path
1255 https://bugs.webkit.org/show_bug.cgi?id=165382
1257 Reviewed by Dean Jackson.
1259 * css/parser/CSSPropertyParser.cpp:
1260 (WebCore::consumeBasicShapeOrBox):
1262 2016-12-05 Dave Hyatt <hyatt@apple.com>
1264 [CSS Parser] The page-break-* properties are only keyword props for old parser.
1265 https://bugs.webkit.org/show_bug.cgi?id=165381
1267 Reviewed by Dean Jackson.
1269 * css/parser/CSSParser.cpp:
1270 (WebCore::isKeywordPropertyID):
1271 * css/parser/CSSParserFastPaths.cpp:
1272 (WebCore::CSSParserFastPaths::isKeywordPropertyID):
1274 2016-12-05 Dave Hyatt <hyatt@apple.com>
1276 [CSS Parser] Don't use CSS_PARSER_INTEGER unit for resolved integer calcs.
1277 https://bugs.webkit.org/show_bug.cgi?id=165379
1279 Reviewed by Dean Jackson.
1281 * css/parser/CSSPropertyParserHelpers.cpp:
1282 (WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumber):
1284 2016-12-05 Dave Hyatt <hyatt@apple.com>
1286 [CSS Parser] Add parseValue support to new parser. Use new parser for UA sheet too if useNewParser is set.
1287 https://bugs.webkit.org/show_bug.cgi?id=165376
1289 Reviewed by Zalan Bujtas.
1291 * css/StyleColor.cpp:
1292 (WebCore::StyleColor::isColorKeyword):
1293 Include system colors when using the fast parseValue path.
1295 * css/parser/CSSParser.cpp:
1296 (WebCore::CSSParser::setupParser):
1297 Add an assert to catch any code path using the old parser when the new parser flag is set.
1299 (WebCore::CSSParser::parseSheet):
1300 (WebCore::CSSParser::parseRule):
1301 (WebCore::CSSParser::parseKeyframeRule):
1302 (WebCore::CSSParser::parseSupportsCondition):
1303 (WebCore::CSSParser::parseValue):
1304 (WebCore::CSSParser::parseSelector):
1305 (WebCore::CSSParser::parseDeclaration):
1306 Patched to use the new parser in UASheetMode as well as other modes when the new parser flag
1307 is set. parseValue is patched to use the new parser's fast paths and to call into CSSParserImpl's
1310 * css/parser/CSSParserFastPaths.cpp:
1311 (WebCore::isSimpleLengthPropertyID):
1312 Support CSSPropertyShapeMargin in the fast path since the old parser did in its fast path.
1314 (WebCore::parseSimpleLengthValue):
1315 Don't ever return unitless numbers. If we accept a unitless number, convert the unit to PX still.
1317 (WebCore::CSSParserFastPaths::parseColor):
1318 Use the CSSValuePool when creating colors on the fast path.
1320 * css/parser/CSSParserImpl.cpp:
1321 (WebCore::CSSParserImpl::parseValue):
1322 * css/parser/CSSParserImpl.h:
1323 Change the return type to be compatible with the old parser's ParseResult flag.
1325 2016-12-05 Konstantin Tokarev <annulen@yandex.ru>
1327 Removed MediaPlayerPrivateTaskTimer
1328 https://bugs.webkit.org/show_bug.cgi?id=165373
1330 Reviewed by Sam Weinig.
1332 It is not used anywhere since QTSDK removal in r165476.
1334 No new tests needed.
1336 * platform/graphics/win/MediaPlayerPrivateTaskTimer.cpp: Removed.
1337 * platform/graphics/win/MediaPlayerPrivateTaskTimer.h: Removed.
1339 2016-12-04 Dave Hyatt <hyatt@apple.com>
1341 [CSS Parser] Eliminate in-place lowercasing in the parser.
1342 https://bugs.webkit.org/show_bug.cgi?id=165368
1344 Reviewed by Darin Adler.
1346 Replace the in-place lowercasing that the parser does with new
1347 mechanisms. In-place lowercasing ruins serialization and doesn't
1348 work on CSS parsed from static strings. It also has the side effect
1349 of mutating strings passed in from JavaScript like for querySelectorAll.
1351 For class/id selectors, we now check if the string is lowercase or not.
1352 If it contains uppercase ASCII characters, then we allocate the RareData
1353 for the selector. RareData now has two fields instead of one for the value,
1354 a matching value (all lowercase in quirks mode), and a serializing value (the
1355 original string). Because this is done at the CSSSelector level, the old
1356 parser has been patched as well for these cases.
1358 In addition, in-place lowercasing was done for pseudo-elements, for
1359 media query features, and for attr(). In all of these cases we do
1360 lowercase converting by first checking if it's needed. Serialization will
1361 not retain the original string in these cases, so we may want to revisit
1362 these cases in the future and apply a solution similar to what we did for
1365 * css/CSSGrammar.y.in:
1366 * css/CSSSelector.cpp:
1367 (WebCore::CSSSelector::createRareData):
1368 (WebCore::CSSSelector::selectorText):
1369 (WebCore::CSSSelector::RareData::RareData):
1370 (WebCore::CSSSelector::RareData::~RareData):
1371 * css/CSSSelector.h:
1372 (WebCore::CSSSelector::RareData::create):
1373 (WebCore::CSSSelector::setValue):
1374 (WebCore::CSSSelector::value):
1375 (WebCore::CSSSelector::serializingValue):
1376 * css/MediaQueryExp.cpp:
1377 (WebCore::MediaQueryExpression::MediaQueryExpression):
1378 * css/parser/CSSParserToken.cpp:
1379 (WebCore::convertToASCIILowercaseInPlace): Deleted.
1380 (WebCore::CSSParserToken::convertToASCIILowercaseInPlace): Deleted.
1381 * css/parser/CSSParserToken.h:
1382 * css/parser/CSSParserValues.h:
1383 (WebCore::CSSParserSelector::setValue):
1384 * css/parser/CSSPropertyParser.cpp:
1385 (WebCore::consumeAttr):
1386 * css/parser/CSSSelectorParser.cpp:
1387 (WebCore::CSSSelectorParser::consumeId):
1388 (WebCore::CSSSelectorParser::consumeClass):
1389 (WebCore::CSSSelectorParser::consumePseudo):
1390 * css/parser/MediaQueryParser.cpp:
1391 (WebCore::MediaQueryParser::readFeature):
1393 2016-12-04 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1395 Fix a build break on EFL since r209303.
1397 Unreviewed build fix.
1399 * bindings/js/SerializedScriptValue.cpp:
1400 (WebCore::exceptionForSerializationFailure): Add a return in the end of function.
1402 2016-12-03 Dan Bernstein <mitz@apple.com>
1404 [Cocoa] Expose InjectedBundlePageEditorClient via the Objective-C bundle SPI
1405 https://bugs.webkit.org/show_bug.cgi?id=165276
1406 <rdar://problem/29467040>
1408 Reviewed by Darin Adler.
1410 * platform/ios/PlatformPasteboardIOS.mm:
1411 (WebCore::PlatformPasteboard::write): Make sure to put the client data on the pasteboard,
1412 like we do on macOS.
1414 2016-12-03 Dave Hyatt <hyatt@apple.com>
1416 [CSS Parser] Remove line numbers from StyleRule.
1417 https://bugs.webkit.org/show_bug.cgi?id=165361
1419 Reviewed by Simon Fraser.
1421 StyleRules have a concept of a source line that is eventually passed
1422 to the inspector. This was only ever used by normal rules, i.e., ones with
1423 selectors, and set to 0 for all other rules. This line was set to the line number
1424 at which the end of the selector text occurred.
1426 Because Inspector already computes the start and end range for the selector
1427 text, storing a source line on StyleRule ends up being redundant. This patch
1428 gets rid of the source line and uses the end line of the selector text
1431 * css/CSSGrammar.y.in:
1432 Remove the code that updates the last seen selector line.
1434 * css/CSSKeyframeRule.cpp:
1435 (WebCore::StyleKeyframe::StyleKeyframe):
1436 * css/CSSKeyframesRule.cpp:
1437 (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
1438 No longer need to pass in a 0 line number.
1440 * css/StyleRule.cpp:
1441 (WebCore::StyleRule::StyleRule):
1442 (WebCore::StyleRule::create):
1443 (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
1444 (WebCore::StyleRuleFontFace::StyleRuleFontFace):
1445 (WebCore::StyleRuleGroup::StyleRuleGroup):
1446 (WebCore::StyleRuleCharset::StyleRuleCharset):
1447 (WebCore::StyleRuleNamespace::StyleRuleNamespace):
1449 (WebCore::StyleRuleBase::StyleRuleBase):
1450 (WebCore::StyleRuleBase::sourceLine): Deleted.
1451 * css/StyleRuleImport.cpp:
1452 (WebCore::StyleRuleImport::StyleRuleImport):
1453 Remove m_sourceLine and change the create methods and constructors to not
1454 require a line number.
1456 * css/parser/CSSParser.cpp:
1457 (WebCore::CSSParser::createStyleRule):
1458 Line number no longer needed.
1460 (WebCore::CSSParser::updateLastSelectorLineAndPosition): Deleted.
1461 * css/parser/CSSParser.h:
1462 Got rid of the function that tracks and updates the last seen selector line.
1464 * css/parser/CSSParserImpl.cpp:
1465 (WebCore::CSSParserImpl::consumeStyleRule):
1466 Fix the rule creation in the new parser to not pass in a 0 line number.
1468 * inspector/InspectorStyleSheet.cpp:
1469 (WebCore::buildSourceRangeObject):
1470 (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
1471 (WebCore::InspectorStyleSheet::buildObjectForRule):
1472 * inspector/InspectorStyleSheet.h:
1473 Patch the methods that build up the selector range to return the end line
1474 information for selector text so that it can be set as the source line
1475 for the rule (thus eliminating the need to store the line number on the style
1478 2016-12-02 Sam Weinig <sam@webkit.org>
1480 optional sequence values not handled correctly by binding generator
1481 https://bugs.webkit.org/show_bug.cgi?id=142562
1484 Remove non-standard postMessage overload
1485 https://bugs.webkit.org/show_bug.cgi?id=161911
1487 Wrong argument order in window.postMessage
1488 https://bugs.webkit.org/show_bug.cgi?id=63141
1490 Reviewed by Darin Adler.
1492 * WebCore.xcodeproj/project.pbxproj:
1493 Remove no longer needed files.
1495 * bindings/generic/IDLTypes.h:
1496 * bindings/js/JSDOMConvert.h:
1497 (WebCore::Converter<IDLObject>::convert):
1498 Add support for the WebIDL object type.
1500 * bindings/js/JSDOMBinding.cpp:
1501 (WebCore::createDOMException):
1502 Add support for throwing stack overflow errors.
1504 * bindings/js/JSDOMWindowCustom.cpp:
1505 (WebCore::handlePostMessage): Deleted.
1506 (WebCore::JSDOMWindow::postMessage): Deleted.
1507 * bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Removed.
1508 * bindings/js/JSMessagePortCustom.cpp:
1509 (WebCore::JSMessagePort::postMessage): Deleted.
1510 (WebCore::extractTransferables): Deleted.
1511 * bindings/js/JSMessagePortCustom.h: Removed.
1512 * bindings/js/JSWorkerCustom.cpp:
1513 (WebCore::JSWorker::postMessage): Deleted.
1514 Remove custom bindings for postMessage.
1516 * bindings/js/SerializedScriptValue.h:
1517 Switch to using enum class.
1519 * bindings/js/SerializedScriptValue.cpp:
1520 (WebCore::SerializedScriptValue::transferArrayBuffers):
1521 (WebCore::SerializedScriptValue::create):
1522 Add new create function that takes the transfer list, processes it, and returns
1523 MessagePorts and SerializedScriptValue / exception.
1525 (WebCore::CloneBase::throwStackOverflow): Deleted.
1526 (WebCore::CloneDeserializer::throwValidationError): Deleted.
1527 Remove uncalled functions.
1529 * bindings/scripts/CodeGenerator.pm:
1532 * bindings/scripts/CodeGeneratorJS.pm:
1533 (AddToIncludesForIDLType):
1535 Add support for the WebIDL 'object' type.
1537 * bindings/scripts/test/JS/JSTestObj.cpp:
1538 * bindings/scripts/test/TestObj.idl:
1539 Add tests for 'object'.
1541 * dom/ExceptionCode.h:
1542 Add two new ExceptionCodes:
1543 - ExistingExceptionError, to indicate that implementation code threw a JS exception.
1544 - StackOverflowError, to indicate that a stack overflow exception should be thrown.
1546 * dom/MessagePort.cpp:
1547 (WebCore::MessagePort::postMessage):
1548 * dom/MessagePort.h:
1549 * dom/MessagePort.idl:
1550 * page/DOMWindow.cpp:
1551 (WebCore::DOMWindow::postMessage):
1553 * page/DOMWindow.idl:
1554 * workers/DedicatedWorkerGlobalScope.cpp:
1555 (WebCore::DedicatedWorkerGlobalScope::postMessage):
1556 * workers/DedicatedWorkerGlobalScope.h:
1557 * workers/DedicatedWorkerGlobalScope.idl:
1558 * workers/Worker.cpp:
1559 (WebCore::Worker::postMessage):
1561 * workers/Worker.idl:
1562 Update to call new SerializedScriptValue create function.
1564 2016-12-03 Dave Hyatt <hyatt@apple.com>
1566 [CSS Parser] Support Dashboard Regions
1567 https://bugs.webkit.org/show_bug.cgi?id=165357
1569 Reviewed by Daniel Bates.
1571 * css/CSSValueKeywords.in:
1572 * css/parser/CSSPropertyParser.cpp:
1573 (WebCore::consumeWebkitDashboardRegion):
1574 (WebCore::CSSPropertyParser::parseSingleValue):
1576 2016-12-02 Simon Fraser <simon.fraser@apple.com>
1578 Improve the behavior of scroll-into-view when the target is inside position:fixed
1579 https://bugs.webkit.org/show_bug.cgi?id=165354
1581 Reviewed by Zalan Bujtas.
1583 The existing RenderLayer::scrollRectToVisible() code paid no heed to whether the
1584 target was inside position:fixed, resulting in unwanted scrolls.
1586 Fix this by plumbing through from the call sites a "insideFixed" flag which we get
1587 when we call localToAbsolute(), and use this flag to avoid scrolling at all if
1590 If zoomed and we're focussing something inside position:fixed, and if visual viewports
1591 are enabled, we can compute the visual viewport required to reveal the target rect,
1592 which gives us the ideal scroll position.
1594 Fix a bug on non-iOS platforms when zoomed, which is to scale the viewRect since
1595 frameView.visibleContentRect() gives an unscaled rect on those platforms.
1597 Not all callers of scrollRectToVisible() are fixed, but those that are not will get
1598 the current behavior.
1600 Tests: fast/overflow/scroll-anchor-in-position-fixed.html
1601 fast/visual-viewport/zoomed-scroll-into-view-fixed.html
1602 fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html
1605 (WebCore::Element::scrollIntoView):
1606 (WebCore::Element::scrollIntoViewIfNeeded):
1607 (WebCore::Element::scrollIntoViewIfNotVisible):
1608 (WebCore::Element::updateFocusAppearance):
1609 * editing/FrameSelection.cpp:
1610 (WebCore::FrameSelection::FrameSelection):
1611 (WebCore::FrameSelection::absoluteCaretBounds):
1612 (WebCore::FrameSelection::recomputeCaretRect):
1613 (WebCore::FrameSelection::revealSelection):
1614 * editing/FrameSelection.h:
1615 * editing/VisiblePosition.cpp:
1616 (WebCore::VisiblePosition::absoluteCaretBounds):
1617 * editing/VisiblePosition.h:
1618 * editing/htmlediting.cpp:
1619 (WebCore::absoluteBoundsForLocalCaretRect):
1620 * editing/htmlediting.h:
1621 * page/FrameView.cpp:
1622 (WebCore::FrameView::scrollElementToRect):
1623 (WebCore::FrameView::scrollToAnchor):
1624 * page/PrintContext.cpp:
1625 (WebCore::PrintContext::outputLinkedDestinations):
1626 * rendering/RenderElement.cpp:
1627 (WebCore::RenderElement::getLeadingCorner):
1628 (WebCore::RenderElement::getTrailingCorner):
1629 (WebCore::RenderElement::absoluteAnchorRect):
1630 (WebCore::RenderElement::anchorRect): Renamed to absoluteAnchorRect().
1631 * rendering/RenderElement.h:
1632 * rendering/RenderLayer.cpp:
1633 (WebCore::RenderLayer::scrollRectToVisible):
1634 (WebCore::RenderLayer::getRectToExpose):
1635 (WebCore::RenderLayer::autoscroll):
1636 * rendering/RenderLayer.h:
1637 * rendering/RenderObject.cpp:
1638 (WebCore::RenderObject::scrollRectToVisible):
1639 * rendering/RenderObject.h:
1641 2016-11-30 Simon Fraser <simon.fraser@apple.com>
1643 localToAbsolute() does incorrect conversion for elements inside position:fixed with zooming
1644 https://bugs.webkit.org/show_bug.cgi?id=165244
1646 Reviewed by Zalan Bujtas.
1648 RenderView::mapLocalToContainer() and RenderView::mapAbsoluteToLocalPoint() handle the coordinate
1649 mapping through the RenderView's transform (when zoomed), and apply the scroll offset for position:fixed
1652 They did this in the wrong order; "local to absolute" applied the zoom scale, and then adjusted for the scroll position,
1653 and "absolute to local" applied the scroll position and then the transform.
1655 However that scroll position adjustment should be in unzoomed coordinates, since it's accounting for the
1656 layout adjustment that position:fixed receives (which actually occurs via the localToAbsolute() call
1657 in RenderLayer's accumulateOffsetTowardsAncestor()). "local to absolute" should therefore apply the scroll
1658 adjustment first before the transform, and "absolute to local" the reverse.
1660 In both visual viewport mode, and legacy drifty fixed mode FrameView::scrollPositionForFixedPosition()
1661 returns a scroll offset that is unaffected by zoom, which is correct and confirms this change.
1663 [Confusingly, ScrollView scroll positions _are_ affected by zoom, as the entire document gets bigger.]
1665 RenderGeometryMap::mapToContainer(), which is an optimization on top of RenderView::mapLocalToContainer(),
1668 Test: fast/zooming/client-rect-in-fixed-zoomed.html
1670 * rendering/RenderGeometryMap.cpp:
1671 (WebCore::RenderGeometryMap::mapToContainer):
1672 * rendering/RenderView.cpp:
1673 (WebCore::RenderView::mapLocalToContainer):
1674 (WebCore::RenderView::mapAbsoluteToLocalPoint):
1676 2016-12-02 Simon Fraser <simon.fraser@apple.com>
1678 Put names on layers in release builds
1679 https://bugs.webkit.org/show_bug.cgi?id=165347
1681 Reviewed by Tim Horton.
1683 Put names on GraphicsLayers (and therefore CALayers) in release builds. Release names
1684 are a simpler, truncated version of debug names, with <tagname> id class names.
1686 Non-primary layer names converted to lowercase and "layer" removed.
1688 Fix comments that refer to gdb.
1690 Use ENABLE(TREE_DEBUGGING) in more places.
1695 * editing/FrameSelection.h:
1696 * editing/VisiblePosition.h:
1697 * editing/VisibleSelection.h:
1698 * history/HistoryItem.h:
1700 * platform/graphics/GraphicsLayer.h:
1701 * platform/graphics/ca/GraphicsLayerCA.cpp:
1702 (WebCore::GraphicsLayerCA::setName):
1703 (WebCore::GraphicsLayerCA::setContentsToSolidColor):
1704 (WebCore::GraphicsLayerCA::updateNames):
1705 (WebCore::GraphicsLayerCA::updateBackdropFilters):
1706 (WebCore::GraphicsLayerCA::updateContentsImage):
1707 (WebCore::GraphicsLayerCA::updateClippingStrategy):
1708 (WebCore::GraphicsLayerCA::updateContentsRects):
1709 (WebCore::GraphicsLayerCA::changeLayerTypeTo):
1710 * platform/graphics/ca/TileController.cpp:
1711 (WebCore::TileController::tileGridContainerLayerName):
1712 (WebCore::TileController::zoomedOutTileGridContainerLayerName):
1713 (WebCore::TileController::createTileLayer):
1714 * rendering/CounterNode.h:
1715 * rendering/InlineBox.h:
1716 * rendering/InlineFlowBox.h:
1717 * rendering/RenderCounter.h:
1718 * rendering/RenderLayer.cpp:
1719 (WebCore::RenderLayer::name):
1720 * rendering/RenderLayer.h:
1721 * rendering/RenderLayerBacking.cpp:
1722 (WebCore::RenderLayerBacking::createGraphicsLayer):
1723 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1724 (WebCore::RenderLayerBacking::updateAncestorClippingLayer):
1725 (WebCore::RenderLayerBacking::updateDescendantClippingLayer):
1726 (WebCore::RenderLayerBacking::updateForegroundLayer):
1727 (WebCore::RenderLayerBacking::updateBackgroundLayer):
1728 (WebCore::RenderLayerBacking::updateMaskingLayer):
1729 (WebCore::RenderLayerBacking::updateChildClippingStrategy):
1730 (WebCore::RenderLayerBacking::updateScrollingLayers):
1731 * rendering/RenderLayerCompositor.cpp:
1732 (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
1733 (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
1734 (WebCore::RenderLayerCompositor::updateLayerForHeader):
1735 (WebCore::RenderLayerCompositor::updateLayerForFooter):
1736 (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1737 (WebCore::RenderLayerCompositor::ensureRootLayer):
1738 * rendering/RenderObject.h:
1740 2016-12-02 Antoine Quint <graouts@apple.com>
1742 [Modern Media Controls] Update the media controls size as the media element is resized
1743 https://bugs.webkit.org/show_bug.cgi?id=165346
1745 Reviewed by Dean Jackson.
1747 The "resize" event dispatched by HTMLMediaElement indicates a change in the media's
1748 intrinsic size, while the "resize" event dispatched by the HTMLMediaElement's ShadowRoot
1749 indicates that the layout size of the media element has changed. We now use the latter.
1751 * Modules/modern-media-controls/media/media-controller.js:
1753 (MediaController.prototype.handleEvent):
1755 2016-12-02 Andy Estes <aestes@apple.com>
1757 [Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
1758 https://bugs.webkit.org/show_bug.cgi?id=164492
1760 Reviewed by Dan Bernstein.
1762 * Configurations/WebCore.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
1763 com.apple.$(PRODUCT_NAME:rfc1034identifier).
1764 * Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to
1765 ${PRODUCT_BUNDLE_IDENTIFIER}.
1767 2016-12-02 Chris Dumez <cdumez@apple.com>
1769 HTML Interactive Form Validation popovers do not show in iOS WKWebViews
1770 https://bugs.webkit.org/show_bug.cgi?id=165340
1771 <rdar://problem/29489966>
1773 Reviewed by Simon Fraser.
1775 HTML Interactive Form Validation popovers do not show in iOS WKWebViews,
1776 only in MobileSafari. To address the issue try to find an appropriate
1777 UIViewController to present the popover when the client does not provide
1778 a presenting view controller.
1780 * platform/ValidationBubble.h:
1781 * platform/ios/ValidationBubbleIOS.mm:
1782 (WebCore::fallbackViewController):
1783 (WebCore::ValidationBubble::setAnchorRect):
1784 * platform/spi/ios/UIKitSPI.h:
1786 2016-12-02 Zalan Bujtas <zalan@apple.com>
1788 Remove redundant LayoutUnit conversions.
1789 https://bugs.webkit.org/show_bug.cgi?id=165338
1791 Reviewed by Simon Fraser.
1793 RenderBlockFlow::computeColumnCountAndWidth has some redundant LayoutUnti <-> unsigned conversions.
1795 No change in functionality.
1797 * rendering/RenderBlockFlow.cpp:
1798 (WebCore::RenderBlockFlow::computeColumnCountAndWidth):
1800 2016-12-02 Antoine Quint <graouts@apple.com>
1802 [Modern Media Controls] Add rewind and fast-forward support
1803 https://bugs.webkit.org/show_bug.cgi?id=165294
1805 Reviewed by Dean Jackson.
1807 We implement support for rewinding and fast-forwarding the media by pressing dedicated
1808 buttons in fullscreen on macOS. We introduce a new SeekButton class that the existing
1809 RewindButton and ForwardButton classes now extend and which provides handling of
1810 "mousedown" and "mouseup" events to indicate that a button is being pressed to the
1813 We also introduce a new SeekSupport class from which SeekBackwardSupport and
1814 SeekForwardSupport inherit to integrate with those controls and update the media
1817 Tests: media/modern-media-controls/layout-node/layout-node-parent-of-type.html
1818 media/modern-media-controls/seek-backward-support/seek-backward-support.html
1819 media/modern-media-controls/seek-forward-support/seek-forward-support.html
1821 * Modules/modern-media-controls/controls/forward-button.js:
1822 * Modules/modern-media-controls/controls/layout-node.js:
1823 (LayoutNode.prototype.parentOfType):
1824 * Modules/modern-media-controls/controls/rewind-button.js:
1825 * Modules/modern-media-controls/controls/seek-button.js: Added.
1827 (SeekButton.prototype.handleEvent):
1828 (SeekButton.prototype._didStartPressing):
1829 (SeekButton.prototype._didStopPressing):
1830 (SeekButton.prototype._notifyDelegateOfPressingState):
1831 * Modules/modern-media-controls/js-files:
1832 * Modules/modern-media-controls/media/media-controller.js:
1833 (MediaController.prototype._updateControlsIfNeeded):
1834 * Modules/modern-media-controls/media/seek-backward-support.js: Added.
1835 (SeekBackwardSupport.prototype.get control):
1836 (SeekBackwardSupport.prototype.get multiplier):
1837 (SeekBackwardSupport):
1838 * Modules/modern-media-controls/media/seek-forward-support.js: Added.
1839 (SeekForwardSupport.prototype.get control):
1840 (SeekForwardSupport.prototype.get multiplier):
1841 (SeekForwardSupport):
1842 * Modules/modern-media-controls/media/seek-support.js: Added.
1843 (SeekSupport.prototype.get multiplier):
1844 (SeekSupport.prototype.buttonPressedStateDidChange):
1845 (SeekSupport.prototype._startSeeking):
1846 (SeekSupport.prototype._stopSeeking):
1847 (SeekSupport.prototype._seek):
1849 * WebCore.xcodeproj/project.pbxproj:
1851 2016-12-02 Dave Hyatt <hyatt@apple.com>
1853 [CSS Parser] Need to set edit flags properly when user-modify/select are used.
1854 https://bugs.webkit.org/show_bug.cgi?id=165334
1856 Reviewed by Dean Jackson.
1858 The old parser calls parserSetUsesStyleBasedEditability on
1859 StyleSheetContents* from inside isValidKeywordPropertyAndValue. This
1860 is pretty lame, but we have to do the same in order to pass editing
1863 All of the functions below have been patched with the sole purpose of
1864 propagating StyleSheetContents* through to isValidKeywordPropertyAndValue
1867 * css/parser/CSSParser.cpp:
1868 (WebCore::CSSParser::parseValueWithVariableReferences):
1869 * css/parser/CSSParser.h:
1870 * css/parser/CSSParserFastPaths.cpp:
1871 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1872 (WebCore::parseKeywordValue):
1873 (WebCore::CSSParserFastPaths::maybeParseValue):
1874 * css/parser/CSSParserFastPaths.h:
1875 * css/parser/CSSParserImpl.cpp:
1876 (WebCore::CSSParserImpl::consumeDeclarationValue):
1877 * css/parser/CSSPropertyParser.cpp:
1878 (WebCore::CSSPropertyParser::CSSPropertyParser):
1879 (WebCore::CSSPropertyParser::parseValue):
1880 (WebCore::CSSPropertyParser::parseSingleValue):
1881 (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
1882 (WebCore::CSSPropertyParser::consumeFont):
1883 (WebCore::CSSPropertyParser::parseShorthand):
1884 * css/parser/CSSPropertyParser.h:
1886 2016-12-02 Beth Dakin <bdakin@apple.com>
1888 REGRESSION (r208802): TouchBar pause button doesn't work
1889 https://bugs.webkit.org/show_bug.cgi?id=165333
1891 rdar://problem/29487187
1893 Reviewed by Wenson Hsieh.
1895 The previous code got this right by using self.playing. _playing was totally un-
1896 used, so this patch just removes it.
1898 * platform/mac/WebPlaybackControlsManager.h:
1899 * platform/mac/WebPlaybackControlsManager.mm:
1900 (-[WebPlaybackControlsManager setPlaying:]):
1902 2016-12-02 John Wilander <wilander@apple.com>
1904 Require preflight for non-standard CORS-safelisted request headers Accept, Accept-Language, and Content-Language
1905 https://bugs.webkit.org/show_bug.cgi?id=165178
1906 <rdar://problem/18792250>
1908 Reviewed by Youenn Fablet.
1910 Fetch currently only restricts the header Content-Type for simple requests:
1911 https://fetch.spec.whatwg.org/#cors-safelisted-request-header
1913 This means simple CORS requests can send unexpected characters in Accept,
1914 Accept-Language, and Content-Language header values.
1916 RFC 7231 implies restrictions on these header values:
1917 - Accept https://tools.ietf.org/html/rfc7231#section-5.3.2
1918 - Accept-Language https://tools.ietf.org/html/rfc7231#section-5.3.5
1919 - Content-Language https://tools.ietf.org/html/rfc7231#section-3.1.3.2
1921 As per discussions in the W3C WebAppSec group we should try to restrict
1922 these header values to help protect servers that do not expect simple CORS
1925 Non-standard, safelisted header values should trigger a preflight and require
1926 the headers to be whitelisted in the response's Access-Control-Allow-Headers.
1927 For Fetch in no-cors mode this change means non-standard header values are not
1930 Test: http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight.html
1932 * loader/CrossOriginAccessControl.cpp:
1933 (WebCore::isSimpleCrossOriginAccessRequest):
1934 Now calls WebCore::isCrossOriginSafeRequestHeader() instead of
1935 WebCore::isOnAccessControlSimpleRequestHeaderWhitelist().
1936 (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Deleted.
1937 It was a duplicate of WebCore::isCrossOriginSafeRequestHeader().
1938 * loader/CrossOriginAccessControl.h:
1939 * loader/CrossOriginPreflightResultCache.cpp:
1940 (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
1941 Now calls WebCore::isCrossOriginSafeRequestHeader() instead of
1942 WebCore::isOnAccessControlSimpleRequestHeaderWhitelist().
1943 * platform/network/HTTPParsers.cpp:
1944 (WebCore::isValidAcceptHeaderValue):
1945 Basic check that the characters are all ASCII alphanumeric, ' ', '*', '.',
1947 (WebCore::isValidLanguageHeaderValue):
1948 Basic check that the characters are all ASCII alphanumeric, ' ', '*', '-',
1950 (WebCore::isSimpleHeader):
1951 Removed duplicate code. Now calls WebCore::isCrossOriginSafeRequestHeader().
1952 (WebCore::isCrossOriginSafeRequestHeader):
1953 Now makes a call to WebCore::isValidAcceptHeaderValue() for Accept
1954 headers and WebCore::isValidLanguageHeaderValue() for Accept-Language
1955 and Content-Language headers.
1956 * platform/network/HTTPParsers.h:
1958 2016-12-02 Zalan Bujtas <zalan@apple.com>
1960 ASSERTION FAILED: flowThread->regionInRange(region, startRegion, endRegion) in WebCore::RenderBox::borderBoxRectInRegion
1961 https://bugs.webkit.org/show_bug.cgi?id=152113
1962 <rdar://problem/27720221>
1964 Reviewed by David Hyatt.
1966 In a nested column context, do not process a spanner if it belongs to an inner column.
1968 While populating a flow, we search for possible spanners and construct multicolumnsets accordingly.
1969 However due to the top-down nature of populating flows, a descendant spanner could belong to an inner
1970 flow which hasn't been populated yet.
1971 This patch checks if a potential spanner has an ancestor (which is also a descendant
1972 of the flow that we are populating -> nested) that will eventually create a flow context.
1974 Test: fast/multicol/assert-with-nested-columns-and-spanner.html
1976 * rendering/RenderBlockFlow.cpp:
1977 (WebCore::RenderBlockFlow::computeColumnCountAndWidth):
1978 (WebCore::RenderBlockFlow::willCreateColumns):
1979 * rendering/RenderBlockFlow.h:
1980 * rendering/RenderMultiColumnFlowThread.cpp:
1981 (WebCore::isValidColumnSpanner):
1983 2016-12-02 Dave Hyatt <hyatt@apple.com>
1985 [CSS Parser] Make sure the z-component of transform-origin can be implicit
1986 https://bugs.webkit.org/show_bug.cgi?id=165326
1988 Reviewed by Tim Horton.
1990 * css/parser/CSSPropertyParser.cpp:
1991 (WebCore::CSSPropertyParser::consumeTransformOrigin):
1993 2016-12-02 Dave Hyatt <hyatt@apple.com>
1995 [CSS Parser] Fix :any/:host to allow pseudo-elements. Support -webkit-border-radius.
1996 https://bugs.webkit.org/show_bug.cgi?id=165323
1998 Reviewed by Dean Jackson.
2000 * css/parser/CSSPropertyParser.cpp:
2001 (WebCore::CSSPropertyParser::parseShorthand):
2002 * css/parser/CSSSelectorParser.cpp:
2003 (WebCore::CSSSelectorParser::consumePseudo):
2005 2016-12-02 Chris Dumez <cdumez@apple.com>
2007 [iOS] Tapping on an HTML validation bubble should dismiss it
2008 https://bugs.webkit.org/show_bug.cgi?id=165122
2009 <rdar://problem/29429372>
2011 Reviewed by Simon Fraser.
2013 Tapping on an HTML validation bubble should dismiss it. Previously it did
2016 No new tests, I tried writing one but the validation popover does not
2017 show in the simulator, only on device. I believe at least one reason is that
2018 _presentingViewControllerForWebView() is required and is currently not
2019 implemented by WKTR. I'll look into this issue separately.
2021 * platform/ValidationBubble.h:
2022 * platform/ios/ValidationBubbleIOS.mm:
2023 (-[WebValidationBubbleTapRecognizer initWithPopoverController:withPopoverView:]):
2024 (-[WebValidationBubbleTapRecognizer dismissPopover]):
2025 (WebCore::ValidationBubble::ValidationBubble):
2027 2016-12-02 Dave Hyatt <hyatt@apple.com>
2029 [CSS Parser] Add support for the SVG 'kerning' property
2030 https://bugs.webkit.org/show_bug.cgi?id=165315
2032 Reviewed by Zalan Bujtas.
2034 * css/parser/CSSPropertyParser.cpp:
2035 (WebCore::consumeKerning):
2036 (WebCore::CSSPropertyParser::parseSingleValue):
2038 2016-12-02 Sam Weinig <sam@webkit.org>
2040 [WebIDL] Remove support for the 'Nondeterministic' extended attribute
2041 https://bugs.webkit.org/show_bug.cgi?id=165307
2043 Reviewed by Chris Dumez.
2045 We are not currently using the WebReplay functionality that the Nondeterministic
2046 extended attribute is intended to aide. If we come back to WebReplay in the future,
2047 we can bring it back.
2049 * bindings/scripts/CodeGeneratorJS.pm:
2050 (GenerateImplementation):
2051 (GenerateImplementationFunctionCall):
2052 (GetNativeTypeForMemoization): Deleted.
2053 * bindings/scripts/IDLAttributes.txt:
2054 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Removed.
2055 * bindings/scripts/test/JS/JSTestNondeterministic.h: Removed.
2056 * bindings/scripts/test/TestNondeterministic.idl: Removed.
2057 * page/Navigator.idl:
2060 2016-12-02 Dave Hyatt <hyatt@apple.com>
2062 [CSS Parser] Support the -webkit-letterpress value for text-decoration
2063 https://bugs.webkit.org/show_bug.cgi?id=165313
2065 Reviewed by Dean Jackson.
2067 * css/parser/CSSPropertyParser.cpp:
2068 (WebCore::consumeTextDecorationLine):
2070 2016-12-02 Dave Hyatt <hyatt@apple.com>
2072 [CSS Parser] Fix the color-gamut media query evaluator
2073 https://bugs.webkit.org/show_bug.cgi?id=165309
2075 Reviewed by Zalan Bujtas).
2077 * css/MediaQueryEvaluator.cpp:
2078 (WebCore::colorGamutEvaluate):
2079 Unknown values should result in a failed match, not a successful match.
2081 2016-12-02 Darin Adler <darin@apple.com>
2083 Remove use of WebCore::Dictionary in MediaSession
2084 https://bugs.webkit.org/show_bug.cgi?id=165296
2086 Reviewed by Chris Dumez.
2088 I am not exactly sure of the status of this code. When I enabled it to test my
2089 changes it did not compile until I fixed some things, and it's far out of date
2090 of the latest draft of the Media Session Standard. But despite that I updated it.
2092 * DerivedSources.make: Removed a line that was breaking the build for some
2093 configurations, perhaps only for programmers from Apple, after r209198.
2095 * Modules/mediasession/MediaSession.cpp:
2096 (WebCore::MediaSession::MediaSession): Fixed so it compiles.
2097 (WebCore::MediaSession::setMetadata): Changed argument to use a struct rather
2098 htan a WebCore::Dictionary.
2099 * Modules/mediasession/MediaSession.h: Added a Metadata struct, and used it.
2100 Also fixed the arguments to the constructor.
2101 * Modules/mediasession/MediaSession.idl: Added MediaMetadata and used it instead
2104 2016-12-02 Dave Hyatt <hyatt@apple.com>
2106 [CSS Parser] Make sure margin and font set the implicit flag properly
2107 https://bugs.webkit.org/show_bug.cgi?id=165306
2109 Reviewed by Zalan Bujtas.
2111 * css/parser/CSSPropertyParser.cpp:
2112 (WebCore::CSSPropertyParser::consumeFont):
2113 (WebCore::CSSPropertyParser::consume4Values):
2115 2016-12-02 Dave Hyatt <hyatt@apple.com>
2117 [CSS Parser] Make sure the templatized consumeIdent uses CSSValuePool
2118 https://bugs.webkit.org/show_bug.cgi?id=165302
2120 Reviewed by Zalan Bujtas.
2122 * css/parser/CSSPropertyParserHelpers.h:
2123 (WebCore::CSSPropertyParserHelpers::consumeIdent):
2125 2016-12-02 Dave Hyatt <hyatt@apple.com>
2127 [CSS Parser] Fix font-variant parsing
2128 https://bugs.webkit.org/show_bug.cgi?id=165301
2130 Reviewed by Zalan Bujtas.
2132 * css/parser/CSSPropertyParser.cpp:
2133 (WebCore::consumeFontVariantEastAsian):
2134 (WebCore::CSSPropertyParser::consumeFontVariantShorthand):
2135 Fix a bug with font-variant-east-asian parsing where the id
2136 was getting improperly consumed even when it didn't match.
2138 2016-12-02 Dave Hyatt <hyatt@apple.com>
2140 [CSS Parser] Fix animation property parsing
2141 https://bugs.webkit.org/show_bug.cgi?id=165305
2143 Reviewed by Zalan Bujtas.
2145 * css/parser/CSSPropertyParser.cpp:
2146 (WebCore::consumeAnimationPropertyList):
2147 Match the old parser by only creating a list for animation properties if there
2148 are two or more comma-separated values. Otherwise just return the CSSValue for
2149 the singleton without creating a list.
2151 2016-12-02 Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
2153 Fix build break when disabling some features.
2154 https://bugs.webkit.org/show_bug.cgi?id=165254
2156 Reviewed by Michael Catanzaro.
2158 If we disable SVG_FONTS or XSLT, then
2159 WebCore::CachedResource::isCORSSameOrigin() would have assertions
2160 on non-existent members. These should be isolated within "#if" as
2163 If we're in DEVELOPER_MODE but did not provide
2164 TEST_HYPHENATAION_PATH, then we must mark UNUSED_PARAM() if we're
2165 not on GTK port (ie: EFL).
2167 No new tests as this is a build fix.
2169 * loader/cache/CachedResource.cpp:
2170 (WebCore::CachedResource::isCORSSameOrigin):
2171 - missing #if ENABLED(SVG_FONTS)
2172 - missing #if ENABLED(XSLT)
2173 * platform/text/hyphen/HyphenationLibHyphen.cpp:
2174 (WebCore::scanTestDictionariesDirectoryIfNecessary):
2175 - missing UNUSED_PARAM()
2178 2016-12-02 Miguel Gomez <magomez@igalia.com>
2180 [GTK] Use an OpenGL < 3.0 compliant way to request the OpenGL version
2181 https://bugs.webkit.org/show_bug.cgi?id=165253
2183 Reviewed by Carlos Garcia Campos.
2185 Use glGetString(GL_VERSION) to get the OpenGL version, as glGetIntegerv with GL_MAJOR_VERSION
2186 and GL_MINOR_VERSION is only supported from 3.0 on.
2188 Covered by existent tests.
2190 * platform/graphics/GLContext.cpp:
2191 (WebCore::GLContext::version):
2193 2016-12-02 Alex Christensen <achristensen@webkit.org>
2195 Fix WinCairo build after r208997
2196 https://bugs.webkit.org/show_bug.cgi?id=165283
2198 Reviewed by Carlos Garcia Campos.
2200 * platform/graphics/GLContext.cpp:
2201 glGetIntegerv is defined in gl2.h.
2202 GL_MAJOR_VERSION is defined in gl3.h.
2203 These are not included in the WinCairo build.
2205 2016-11-30 Darin Adler <darin@apple.com>
2207 Stop using WebCore::Dictionary in bindings for Fetch
2208 https://bugs.webkit.org/show_bug.cgi?id=165241
2210 Reviewed by Chris Dumez.
2212 * Modules/fetch/DOMWindowFetch.idl: Use RequestInit instead of Dictionary.
2213 No effect on code generated since this is a JSBuiltin.
2215 * Modules/fetch/FetchRequest.cpp:
2216 (WebCore::setReferrerPolicy): Deleted. Bindings handle this now.
2217 (WebCore::setMode): Ditto.
2218 (WebCore::setCredentials): Ditto.
2219 (WebCore::setCache): Ditto.
2220 (WebCore::setRedirect): Ditto.
2221 (WebCore::setReferrer): Changed argument from Dictionary to String.
2222 (WebCore::buildOptions): Changed argument from Dictionary to FetchRequest::Init,
2223 and simplified the code accordingly.
2224 (WebCore::FetchRequest::initializeOptions): Ditto.
2225 (WebCore::FetchRequest::initializeWith): Ditto.
2226 * Modules/fetch/FetchRequest.h: Updated for above changes. Also added the Init struct.
2228 * Modules/fetch/FetchRequest.idl: Added missing "only-if-cached" value to RequestCache.
2229 Added RequestInit dictionary and used it instead of Dictionary. Used more-specific string
2230 types for the method and referrer attributes; no effect at runtime, since the code for
2231 getters is the same for ByteString, USVString, and DOMString and these are read-only.
2233 * Modules/fetch/WorkerGlobalScopeFetch.idl: Use RequestInit instead of Dictionary.
2234 No effect on code generated since this is a JSBuiltin.
2236 2016-12-01 Jiewen Tan <jiewen_tan@apple.com>
2238 Add a runtime flag for SubtleCrypto
2239 https://bugs.webkit.org/show_bug.cgi?id=164982
2241 Reviewed by Brent Fulgham.
2243 * bindings/generic/RuntimeEnabledFeatures.h:
2244 (WebCore::RuntimeEnabledFeatures::setSubtleCryptoEnabled):
2245 (WebCore::RuntimeEnabledFeatures::subtleCryptoEnabled):
2248 2016-12-01 Saam Barati <sbarati@apple.com>
2250 Rename CallFrame::callee() to CallFrame::jsCallee()
2251 https://bugs.webkit.org/show_bug.cgi?id=165293
2253 Reviewed by Keith Miller.
2255 * bindings/js/JSDOMConstructor.h:
2256 (WebCore::JSBuiltinConstructor<JSClass>::construct):
2257 * bindings/js/JSDataCueCustom.cpp:
2258 (WebCore::constructJSDataCue):
2259 * bindings/js/JSHTMLAllCollectionCustom.cpp:
2260 (WebCore::callHTMLAllCollection):
2261 * bindings/js/JSHTMLElementCustom.cpp:
2262 (WebCore::constructJSHTMLElement):
2263 * bindings/js/JSImageConstructor.cpp:
2264 (WebCore::JSImageConstructor::construct):
2265 * bindings/js/JSMutationObserverCustom.cpp:
2266 (WebCore::constructJSMutationObserver):
2267 * bindings/js/JSPluginElementFunctions.cpp:
2268 (WebCore::callPlugin):
2269 * bindings/js/JSWorkerCustom.cpp:
2270 (WebCore::constructJSWorker):
2271 * bindings/scripts/CodeGeneratorJS.pm:
2272 (GenerateConstructorDefinition):
2273 * bindings/scripts/test/JS/JSFloat64Array.cpp:
2274 (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
2275 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2276 (WebCore::JSTestEventConstructorConstructor::construct):
2277 * bindings/scripts/test/JS/JSTestInterface.cpp:
2278 (WebCore::JSTestInterfaceConstructor::construct):
2279 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2280 (WebCore::JSTestNamedConstructorNamedConstructor::construct):
2281 * bindings/scripts/test/JS/JSTestNode.cpp:
2282 (WebCore::JSTestNodeConstructor::construct):
2283 * bindings/scripts/test/JS/JSTestObj.cpp:
2284 (WebCore::JSTestObjConstructor::construct):
2285 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2286 (WebCore::constructJSTestOverloadedConstructors1):
2287 (WebCore::constructJSTestOverloadedConstructors2):
2288 (WebCore::constructJSTestOverloadedConstructors3):
2289 (WebCore::constructJSTestOverloadedConstructors4):
2290 (WebCore::constructJSTestOverloadedConstructors5):
2291 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2292 (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
2293 (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
2294 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2295 (WebCore::JSTestTypedefsConstructor::construct):
2296 * bridge/objc/objc_runtime.mm:
2297 (JSC::Bindings::callObjCFallbackObject):
2298 * bridge/runtime_method.cpp:
2299 (JSC::callRuntimeMethod):
2300 * bridge/runtime_object.cpp:
2301 (JSC::Bindings::callRuntimeObject):
2302 (JSC::Bindings::callRuntimeConstructor):
2304 2016-12-01 Antoine Quint <graouts@apple.com>
2306 [Modern Media Controls] Fade controls in when entering and exiting fullscreen
2307 https://bugs.webkit.org/show_bug.cgi?id=165287
2309 Reviewed by Dean Jackson.
2311 Fade controls in when we enter and leave fullscreen.
2313 Test: media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html
2315 * Modules/modern-media-controls/controls/media-controls.css:
2316 (.media-controls.fade-in):
2317 (@keyframes fade-in):
2319 * Modules/modern-media-controls/controls/media-controls.js:
2320 (MediaControls.prototype.presentInElement):
2321 * Modules/modern-media-controls/media/fullscreen-support.js:
2322 (FullscreenSupport.prototype.buttonWasClicked):
2323 * Modules/modern-media-controls/media/media-controller.js:
2324 (MediaController.prototype._updateControlsIfNeeded):
2326 2016-12-01 Antoine Quint <graouts@apple.com>
2328 [Modern Media Controls] Show and populate the tracks panel
2329 https://bugs.webkit.org/show_bug.cgi?id=165284
2331 Reviewed by Dean Jackson.
2333 We added a TracksPanel in https://bugs.webkit.org/show_bug.cgi?id=165239 which allows to
2334 show a list of media tracks and text tracks to choose from. We now show this panel when
2335 clicking on the tracks button in the controls bar and populate its content with the
2336 list of audio and text tracks for the media element. As an item is picked from the tracks
2337 panel, we toggle the represented track's enabled state and dismiss the panel.
2339 We also pick up the text track container display mostly unchanged from current media controls.
2341 Tests: media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html
2342 media/modern-media-controls/tracks-support/tracks-support-show-and-populate-panel.html
2344 * Modules/modern-media-controls/controls/macos-inline-media-controls.js:
2345 (MacOSInlineMediaControls.prototype.showTracksPanel):
2346 * Modules/modern-media-controls/controls/text-tracks.css: Added.
2347 (video::-webkit-media-text-track-container):
2349 (video::-webkit-media-text-track-display):
2350 (video::-webkit-media-text-track-display-backdrop):
2351 (video::cue(:future)):
2352 (video::-webkit-media-text-track-container b):
2353 (video::-webkit-media-text-track-container u):
2354 (video::-webkit-media-text-track-container i):
2355 (video::-webkit-media-text-track-container .hidden):
2356 * Modules/modern-media-controls/media/media-controller.js:
2358 * Modules/modern-media-controls/media/tracks-support.js:
2360 (TracksSupport.prototype.destroy):
2361 (TracksSupport.prototype.buttonWasClicked):
2362 (TracksSupport.prototype.tracksPanelNumberOfSections):
2363 (TracksSupport.prototype.tracksPanelTitleForSection):
2364 (TracksSupport.prototype.tracksPanelNumberOfTracksInSection):
2365 (TracksSupport.prototype.tracksPanelTitleForTrackInSection):
2366 (TracksSupport.prototype.tracksPanelIsTrackInSectionSelected):
2367 (TracksSupport.prototype.tracksPanelSelectionDidChange):
2368 (TracksSupport.prototype.syncControl):
2369 (TracksSupport.prototype._textTracks):
2370 (TracksSupport.prototype._audioTracks):
2371 (TracksSupport.prototype._canPickAudioTracks):
2372 (TracksSupport.prototype._canPickTextTracks):
2373 (TracksSupport.prototype._sortedTrackList):
2375 2016-12-01 Brent Fulgham <bfulgham@apple.com>
2377 Rare crash when preparing to print
2378 https://bugs.webkit.org/show_bug.cgi?id=165280
2379 <rdar://problem/28240254>
2381 Reviewed by Dean Jackson.
2384 (WebCore::Frame::setPrinting): Only manipulate the FrameView if it is non-null.
2385 (WebCore::Frame::documentAtPoint): Drive-by fix to change a 0 return to nullptr.
2387 2016-12-01 Simon Fraser <simon.fraser@apple.com>
2389 Put an obvious debug border on layers with backdrop filters
2390 https://bugs.webkit.org/show_bug.cgi?id=165291
2392 Reviewed by Tim Horton.
2394 Put a wide magenta border on layers with backdrop filters, to highlight their performance impact.
2396 Change the "contents layer" color (used by WebGL, video etc) to blue.
2398 Make the clipping layer border slightly narrower.
2400 * platform/graphics/GraphicsLayer.cpp:
2401 (WebCore::GraphicsLayer::getDebugBorderInfo):
2402 * platform/graphics/ca/GraphicsLayerCA.cpp:
2403 (WebCore::GraphicsLayerCA::setBackdropFilters):
2405 2016-12-01 Brian Burg <bburg@apple.com>
2407 Fix the Windows Release build after r209198
2408 https://bugs.webkit.org/show_bug.cgi?id=165285
2410 Unreviewed build fix.
2412 * Modules/webdriver/NavigatorWebDriver.cpp:
2413 Brute force include all the inlines to work around a JSC issue.
2415 2016-12-01 Dave Hyatt <hyatt@apple.com>
2417 [CSS Parser] Only allow a single font-family in @font-face
2418 https://bugs.webkit.org/show_bug.cgi?id=165278
2420 Reviewed by Zalan Bujtas.
2422 * css/parser/CSSPropertyParser.cpp:
2423 (WebCore::consumeFontFamilyDescriptor):
2424 (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
2426 2016-12-01 Beth Dakin <bdakin@apple.com>
2428 Blacklist Netflix for TouchBar support
2429 https://bugs.webkit.org/show_bug.cgi?id=165104
2431 Rubber-stamped by Tim Horton.
2433 Meant to not have the www. in the first case because that is covered by the second
2436 * html/HTMLMediaElement.cpp:
2437 (WebCore::needsPlaybackControlsManagerQuirk):
2439 2016-12-01 Dave Hyatt <hyatt@apple.com>
2441 [CSS Parser] Support -webkit-overflow-scrolling: touch
2442 https://bugs.webkit.org/show_bug.cgi?id=165275
2444 Reviewed by Zalan Bujtas.
2446 * css/parser/CSSParserFastPaths.cpp:
2447 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2449 2016-12-01 Jiewen Tan <jiewen_tan@apple.com>
2451 Update SubtleCrypto::unwrapKey to match the latest spec
2452 https://bugs.webkit.org/show_bug.cgi?id=164747
2453 <rdar://problem/29258198>
2455 Reviewed by Brent Fulgham.
2457 This patch does following few things:
2458 1. It updates the SubtleCrypto::unwrapKey method to match the latest spec:
2459 https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-unwrapKey.
2460 It also refers to the latest Editor's Draft to a certain degree:
2461 https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-unwrapKey.
2462 2. It implements unwrapKey operations of the following algorithms: AES-KW.
2464 Tests: crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-private.html
2465 crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html
2466 crypto/subtle/aes-kw-generate-key-wrap-key-unwrap-key.html
2467 crypto/subtle/aes-kw-import-key-unwrap-raw-key.html
2468 crypto/subtle/rsa-oaep-import-key-unwrap-jwk-oct-key.html
2469 crypto/subtle/unwrapKey-malformed-parameters.html
2470 crypto/workers/subtle/aes-cbc-import-key-unwrap-key.html
2471 crypto/workers/subtle/aes-kw-import-key-unwrap-key.html
2472 crypto/workers/subtle/rsa-oaep-import-key-unwrap-key.html
2474 * bindings/js/JSSubtleCryptoCustom.cpp:
2475 (WebCore::normalizeCryptoAlgorithmParameters):
2476 (WebCore::jsSubtleCryptoFunctionWrapKeyPromise):
2478 (WebCore::jsSubtleCryptoFunctionUnwrapKeyPromise):
2479 (WebCore::JSSubtleCrypto::unwrapKey):
2480 * crypto/CryptoAlgorithm.cpp:
2481 (WebCore::CryptoAlgorithm::unwrapKey):
2482 * crypto/CryptoAlgorithm.h:
2483 * crypto/SubtleCrypto.idl:
2484 * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
2485 (WebCore::CryptoAlgorithmAES_KW::unwrapKey):
2486 * crypto/algorithms/CryptoAlgorithmAES_KW.h:
2487 * crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:
2488 (WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey):
2489 * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
2490 (WebCore::unwrapKeyAES_KW):
2491 (WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey):
2492 (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
2494 2016-12-01 Dave Hyatt <hyatt@apple.com>
2496 [CSS Parser] Fix font-variant parsing
2497 https://bugs.webkit.org/show_bug.cgi?id=165266
2499 Reviewed by Dean Jackson.
2501 * css/parser/CSSPropertyParser.cpp:
2502 (WebCore::consumeFontVariantEastAsian):
2503 (WebCore::consumeFontVariantAlternates):
2504 (WebCore::consumeFontVariantPosition):
2505 (WebCore::CSSPropertyParser::parseSingleValue):
2506 (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
2507 (WebCore::CSSPropertyParser::consumeFontVariantShorthand):
2508 (WebCore::consumeFontVariantList): Deleted.
2510 2016-12-01 Brian Burg <bburg@apple.com>
2512 Web Automation: expose navigator.webdriver if the page is controlled by automation
2513 https://bugs.webkit.org/show_bug.cgi?id=165245
2514 <rdar://problem/29449874>
2516 Reviewed by Joseph Pecoraro.
2518 Move the implementation into OpenSource. It's in Modules/webdriver/.
2521 * DerivedSources.make:
2522 Add new paths and files.
2524 * Modules/webdriver/NavigatorWebDriver.cpp: Added.
2525 (WebCore::NavigatorWebDriver::NavigatorWebDriver):
2526 (WebCore::NavigatorWebDriver::~NavigatorWebDriver):
2527 (WebCore::NavigatorWebDriver::supplementName):
2528 (WebCore::NavigatorWebDriver::isControlledByAutomation):
2529 (WebCore::NavigatorWebDriver::from):
2530 (WebCore::JSNavigator::webdriver):
2531 * Modules/webdriver/NavigatorWebDriver.h: Added.
2532 * Modules/webdriver/NavigatorWebDriver.idl: Added.
2533 * WebCore.xcodeproj/project.pbxproj:
2535 2016-12-01 Brady Eidson <beidson@apple.com>
2537 IndexedDB 2.0: Implement IDBObjectStore.getKey().
2538 https://bugs.webkit.org/show_bug.cgi?id=165256
2540 Reviewed by Alex Christensen.
2542 Tests: storage/indexeddb/modern/idbobjectstore-getkey-1-private.html
2543 storage/indexeddb/modern/idbobjectstore-getkey-1.html
2545 * Modules/indexeddb/IDBObjectStore.cpp:
2546 (WebCore::IDBObjectStore::get):
2547 (WebCore::IDBObjectStore::getKey):
2548 * Modules/indexeddb/IDBObjectStore.h:
2549 * Modules/indexeddb/IDBObjectStore.idl:
2551 * Modules/indexeddb/IDBRequest.cpp:
2552 (WebCore::IDBRequest::createObjectStoreGet):
2553 (WebCore::IDBRequest::IDBRequest):
2554 (WebCore::IDBRequest::requestedObjectStoreRecordType):
2555 * Modules/indexeddb/IDBRequest.h:
2557 * Modules/indexeddb/IDBTransaction.cpp:
2558 (WebCore::IDBTransaction::requestGetRecord):
2559 (WebCore::IDBTransaction::requestIndexRecord):
2560 (WebCore::IDBTransaction::didGetRecordOnServer):
2562 * Modules/indexeddb/IndexedDB.h:
2564 * Modules/indexeddb/server/IDBBackingStore.h:
2566 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2567 (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
2568 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
2570 * Modules/indexeddb/server/MemoryObjectStore.h:
2572 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2573 (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
2574 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
2576 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2577 (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
2578 (WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
2579 * Modules/indexeddb/server/UniqueIDBDatabase.h:
2581 * Modules/indexeddb/shared/IDBGetRecordData.cpp:
2582 (WebCore::IDBGetRecordData::isolatedCopy):
2583 * Modules/indexeddb/shared/IDBGetRecordData.h:
2584 (WebCore::IDBGetRecordData::encode):
2585 (WebCore::IDBGetRecordData::decode):
2587 2016-12-01 Joseph Pecoraro <pecoraro@apple.com>
2589 Misc. cleanup in Modules/fetch
2590 https://bugs.webkit.org/show_bug.cgi?id=165240
2592 Reviewed by Darin Adler.
2594 * Modules/fetch/DOMWindowFetch.h:
2595 * Modules/fetch/FetchBody.cpp:
2596 * Modules/fetch/FetchBody.h:
2597 * Modules/fetch/FetchBodyConsumer.cpp:
2598 * Modules/fetch/FetchBodyOwner.cpp:
2599 * Modules/fetch/FetchBodyOwner.h:
2600 * Modules/fetch/FetchInternals.js:
2602 * Modules/fetch/FetchLoader.cpp:
2603 * Modules/fetch/FetchResponse.h:
2604 Remove unnecessary includes and forward declarations.
2606 * Modules/fetch/DOMWindowFetch.js:
2608 * Modules/fetch/FetchResponse.js:
2609 (initializeFetchResponse):
2610 * Modules/fetch/WorkerGlobalScopeFetch.js:
2614 2016-12-01 Antoine Quint <graouts@apple.com>
2616 [Modern Media Controls] Turn off text selection
2617 https://bugs.webkit.org/show_bug.cgi?id=165261
2619 Reviewed by Dean Jackson.
2621 We turn off text selection and force a non-text cursor for all text in media controls.
2623 Tests: media/modern-media-controls/airplay-placard/airplay-placard-text-section.html
2624 media/modern-media-controls/pip-placard/pip-placard-text-section.html
2625 media/modern-media-controls/status-label/status-label-text-selection.html
2627 * Modules/modern-media-controls/controls/media-controls.css:
2630 2016-12-01 Chris Dumez <cdumez@apple.com>
2632 Parameter to DOMStringList.contains() should be mandatory
2633 https://bugs.webkit.org/show_bug.cgi?id=165257
2635 Reviewed by Alex Christensen.
2637 Parameter to DOMStringList.contains() should be mandatory.
2638 Gecko and Blink have it mandatory but WebKit had it optional and the
2639 string 'undefined" was used by default, which is not helpful.
2641 No new tests, updated existing test.
2643 * dom/DOMStringList.idl:
2645 2016-12-01 Jiewen Tan <jiewen_tan@apple.com>
2647 SubtleCrypto::deriveBits always return NOT_SUPPORTED_ERR for now
2648 https://bugs.webkit.org/show_bug.cgi?id=164745
2649 <rdar://problem/29258118>
2651 Reviewed by Darin Adler.
2653 Since we don't support any cryptography algorithms that has deriveBits operations,
2654 SubtleCrypto::deriveBits will always return NOT_SUPPORTED_ERR for now.
2656 Test: crypto/subtle/deriveBits-malformed-parameters.html
2658 * bindings/js/JSSubtleCryptoCustom.cpp:
2659 (WebCore::normalizeCryptoAlgorithmParameters):
2660 (WebCore::jsSubtleCryptoFunctionDeriveBitsPromise):
2661 (WebCore::JSSubtleCrypto::deriveBits):
2662 * crypto/SubtleCrypto.idl:
2664 2016-12-01 Eric Carlson <eric.carlson@apple.com>
2666 [MediaStream][Mac] Video presets sometimes don't work
2667 https://bugs.webkit.org/show_bug.cgi?id=165214
2668 <rdar://problem/29444533>
2670 Reviewed by Jer Noble.
2672 * platform/mediastream/mac/AVVideoCaptureSource.h:
2673 * platform/mediastream/mac/AVVideoCaptureSource.mm:
2674 (WebCore::AVVideoCaptureSource::setPreset): Set videoSettings width and height.
2675 (WebCore::AVVideoCaptureSource::setupCaptureSession): Store videoSettings object for later use.
2676 Set videoSettings width and height.
2677 (WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions):
2678 (WebCore::AVVideoCaptureSource::sizeForPreset): New.
2680 2016-12-01 Antoine Quint <graouts@apple.com>
2682 [Modern Media Controls] Promote the "on" property from AirPlayButton to IconButton
2683 https://bugs.webkit.org/show_bug.cgi?id=165260
2685 Reviewed by Dean Jackson.
2687 With the fix for https://bugs.webkit.org/show_bug.cgi?id=165239 we now set the "on"
2688 property for the TracksButton as well, so it makes sense to provide that property
2689 for all IconButton subclasses, not just AirplayButton.
2691 Test: media/modern-media-controls/icon-button/icon-button-on.html
2693 * Modules/modern-media-controls/controls/airplay-button.css:
2694 (button.airplay.on):
2695 * Modules/modern-media-controls/controls/airplay-button.js:
2697 (AirplayButton.prototype.get on): Deleted.
2698 (AirplayButton.prototype.set on): Deleted.
2699 * Modules/modern-media-controls/controls/icon-button.css:
2700 (button.icon:active,):
2701 (button.icon:active): Deleted.
2702 * Modules/modern-media-controls/controls/icon-button.js:
2703 (IconButton.prototype.get on):
2704 (IconButton.prototype.set on):
2706 2016-11-30 Sam Weinig <sam@webkit.org>
2708 [WebIDL] Remove custom bindings for File and Blob constructors
2709 https://bugs.webkit.org/show_bug.cgi?id=165218
2711 Reviewed by Darin Adler.
2714 * DerivedSources.make:
2715 * WebCore.xcodeproj/project.pbxproj:
2716 Add/remove new files.
2718 * bindings/js/JSBlobCustom.cpp:
2719 (WebCore::constructJSBlob): Deleted.
2720 * bindings/js/JSFileCustom.cpp: Removed.
2721 Remove custom constructors.
2723 * bindings/scripts/CodeGeneratorJS.pm:
2724 (GenerateDefaultValue):
2725 (GenerateDictionaryImplementationContent):
2726 (GenerateParametersCheck):
2727 Add support for optional sequences without default values. Move string default value
2728 optimizations into GenerateDefaultValue.
2731 (WebCore::Blob::Blob):
2733 (WebCore::Blob::create):
2736 (WebCore::File::File):
2739 Add support for the generated constructors.
2741 * fileapi/BlobBuilder.cpp: Copied from Source/WebCore/fileapi/WebKitBlobBuilder.cpp.
2742 * fileapi/BlobBuilder.h: Copied from Source/WebCore/fileapi/WebKitBlobBuilder.h.
2743 * fileapi/WebKitBlobBuilder.cpp: Removed.
2744 * fileapi/WebKitBlobBuilder.h: Removed.
2745 Rename WebKitBlobBuilder to BlobBuilder, and update to work with generated constructor.
2747 * fileapi/BlobPropertyBag.h: Added.
2748 * fileapi/BlobPropertyBag.idl: Added.
2751 * fileapi/ThreadableBlobRegistry.cpp:
2752 (WebCore::ThreadableBlobRegistry::registerBlobURL):
2753 * fileapi/ThreadableBlobRegistry.h:
2754 * platform/network/BlobRegistry.h:
2755 * platform/network/BlobRegistryImpl.cpp:
2756 (WebCore::BlobRegistryImpl::registerBlobURL):
2757 * platform/network/BlobRegistryImpl.h:
2758 Avoid copies of the BlobPart Vector.
2760 * platform/network/BlobPart.h:
2761 Replace header-guards with #pragma once.
2763 2016-12-01 Antoine Quint <graouts@apple.com>
2765 [Modern Media Controls] Provide a UI object to show a list of tracks
2766 https://bugs.webkit.org/show_bug.cgi?id=165239
2768 Reviewed by Dean Jackson.
2770 We add a new TracksPanel object which we will be using to display a list of
2771 audio and text tracks. The tracks panel can be shown by calling showTracksPanel()
2772 on a MacOSMediaControls object and will be dismissed by hitting the Escape key
2773 or mousing down outside of the panel's bounds. While the tracks panel is up,
2774 arrows can be used to focus individual tracks which can be activated by either
2775 pressing the Space bar or Enter key.
2777 Activating a track will briefly animate its background to indicate selection and
2778 dismissing the tracks panel is also animated with a quick fade-out animation.
2780 Data for the tracks panel is provided by specifying a dataSource property and
2781 implementing the required methods to provide the number of sections in the panel,
2782 the number of tracks in each section, etc.
2784 Tests: media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html
2785 media/modern-media-controls/tracks-panel/tracks-panel-hide-esc-key.html
2786 media/modern-media-controls/tracks-panel/tracks-panel-hide.html
2787 media/modern-media-controls/tracks-panel/tracks-panel-population.html
2788 media/modern-media-controls/tracks-panel/tracks-panel-right-x.html
2789 media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard.html
2790 media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-mouse.html
2791 media/modern-media-controls/tracks-panel/tracks-panel.html
2793 * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:
2794 (.media-controls.mac.fullscreen):
2795 (.media-controls.mac.fullscreen > .controls-bar):
2796 (.media-controls.mac.fullscreen .tracks-panel):
2797 * Modules/modern-media-controls/controls/macos-inline-media-controls.css:
2798 (.media-controls.mac.inline .tracks-panel):
2799 * Modules/modern-media-controls/controls/macos-media-controls.js:
2800 (MacOSMediaControls.prototype.showTracksPanel):
2801 (MacOSMediaControls.prototype.hideTracksPanel):
2802 (MacOSMediaControls):
2803 * Modules/modern-media-controls/controls/media-controls.css:
2805 * Modules/modern-media-controls/controls/placard.css:
2807 * Modules/modern-media-controls/controls/status-label.css:
2809 * Modules/modern-media-controls/controls/tracks-panel.css: Added.
2812 (.tracks-panel.fade-out):
2813 (.tracks-panel-section):
2814 (.tracks-panel-section:first-of-type):
2815 (.tracks-panel-section > h3):
2816 (.tracks-panel-section > ul):
2817 (.tracks-panel-section > ul > li):
2818 (.tracks-panel-section > ul > li:focus):
2819 (.tracks-panel-section > ul > li.selected:before):
2820 (.tracks-panel-section > ul > li.animated):
2821 (@keyframes tracks-panel-item-selection):
2823 * Modules/modern-media-controls/controls/tracks-panel.js: Added.
2824 (TracksPanel.prototype.get presented):
2825 (TracksPanel.prototype.presentInParent):
2826 (TracksPanel.prototype.hide):
2827 (TracksPanel.prototype.get rightX):
2828 (TracksPanel.prototype.set rightX):
2829 (TracksPanel.prototype.trackNodeSelectionAnimationDidEnd):
2830 (TracksPanel.prototype.mouseMovedOverTrackNode):
2831 (TracksPanel.prototype.mouseExitedTrackNode):
2832 (TracksPanel.prototype.commitProperty):
2833 (TracksPanel.prototype.handleEvent):
2834 (TracksPanel.prototype._childrenFromDataSource.):
2835 (TracksPanel.prototype._childrenFromDataSource):
2836 (TracksPanel.prototype._handleMousedown):
2837 (TracksPanel.prototype._handleKeydown):
2838 (TracksPanel.prototype._dismiss):
2839 (TracksPanel.prototype._focusTrackNode):
2840 (TracksPanel.prototype._focusPreviousTrackNode):
2841 (TracksPanel.prototype._focusNextTrackNode):
2842 (TracksPanel.prototype._focusFirstTrackNode):
2843 (TracksPanel.prototype._focusLastTrackNode):
2845 (TrackNode.prototype.activate):
2846 (TrackNode.prototype.handleEvent):
2847 (TrackNode.prototype._animationDidEnd):
2848 * Modules/modern-media-controls/js-files:
2849 * WebCore.xcodeproj/project.pbxproj:
2851 2016-12-01 Andreas Kling <akling@apple.com>
2853 Log some basic memory usage stats at interesting points in time
2854 <https://webkit.org/b/165206>
2856 Reviewed by Antti Koivisto.
2858 This patch adds a mechanism to mark points of interests where we might
2859 want to do performance-related logging:
2861 class PerformanceLogging {
2862 enum PointOfInterest {
2863 MainFrameLoadStarted,
2864 MainFrameLoadCompleted,
2866 void didReachPointOfInterest(PointOfInterest)
2869 You get to this object via MainFrame::performanceLogging().
2871 We respond to these callbacks by logging some basic data about memory usage
2872 to the PerformanceLogging channel.
2874 More PointOfInterest values will be added soon.
2877 * WebCore.xcodeproj/project.pbxproj:
2878 * loader/FrameLoader.cpp:
2879 (WebCore::FrameLoader::loadWithDocumentLoader):
2880 (WebCore::FrameLoader::setState):
2881 * page/MainFrame.cpp:
2882 (WebCore::MainFrame::MainFrame):
2884 * page/PerformanceLogging.cpp: Added.
2885 (WebCore::toString):
2886 (WebCore::getMemoryUsageStatistics):
2887 (WebCore::PerformanceLogging::PerformanceLogging):
2888 (WebCore::writeLog):
2889 (WebCore::PerformanceLogging::didReachPointOfInterest):
2890 (WebCore::PerformanceLogging::getPlatformMemoryUsageStatistics):
2891 * page/PerformanceLogging.h: Added.
2892 * page/cocoa/PerformanceLoggingCocoa.mm: Added.
2893 (WebCore::PerformanceLogging::getPlatformMemoryUsageStatistics):
2894 * platform/Logging.h:
2896 2016-11-28 Sergio Villar Senin <svillar@igalia.com>
2898 [css-grid] Move more attributes from RenderGrid to the new Grid class
2899 https://bugs.webkit.org/show_bug.cgi?id=165094
2901 Reviewed by Darin Adler.
2903 Moved more attributes from RenderGrid to Grid as they are not really part of the state of
2904 the RenderGrid object. In particular m_autoRepeat{Columns|Rows},
2905 m_autoRepeatEmpty{Columns|Rows} and m_orderIterator. All of them are now private attributes
2906 of the Grid class so clients should use the getters/setters provided by this patch.
2908 This change allows to definitely remove the grid{Column|Row}Count() methods from
2909 RenderGrid. These two became Grid::numTracks() which returns the number of tracks in the
2910 data structure used to represent the grid (currently a matrix). Contrary to that,
2911 RenderGrid::numTracks() returns the actual size of the grid.
2913 No new tests as this is a refactoring.
2915 * rendering/RenderGrid.cpp:
2916 (WebCore::RenderGrid::Grid::numTracks):
2917 (WebCore::RenderGrid::Grid::ensureGridSize):
2918 (WebCore::RenderGrid::Grid::setAutoRepeatTracks):
2919 (WebCore::RenderGrid::Grid::autoRepeatTracks):
2920 (WebCore::RenderGrid::Grid::setAutoRepeatEmptyColumns):
2921 (WebCore::RenderGrid::Grid::setAutoRepeatEmptyRows):
2922 (WebCore::RenderGrid::Grid::hasAutoRepeatEmptyTracks):
2923 (WebCore::RenderGrid::Grid::isEmptyAutoRepeatTrack):
2924 (WebCore::RenderGrid::Grid::autoRepeatEmptyTracks):
2925 (WebCore::RenderGrid::Grid::gridItemSpan):
2926 (WebCore::RenderGrid::Grid::clear):
2927 (WebCore::RenderGrid::RenderGrid):
2928 (WebCore::RenderGrid::computeTrackSizesForDirection):
2929 (WebCore::RenderGrid::guttersSize):
2930 (WebCore::RenderGrid::computeIntrinsicLogicalHeight):
2931 (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2932 (WebCore::RenderGrid::rawGridTrackSize):
2933 (WebCore::RenderGrid::gridTrackSize):
2934 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2935 (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
2936 (WebCore::RenderGrid::placeItemsOnGrid):
2937 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
2938 (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
2939 (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
2940 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2941 (WebCore::RenderGrid::trackSizesForComputedStyle):
2942 (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
2943 (WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild):
2944 (WebCore::RenderGrid::gridAreaBreadthForChild):
2945 (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
2946 (WebCore::RenderGrid::populateGridPositionsForDirection):
2947 (WebCore::RenderGrid::columnAxisOffsetForChild):
2948 (WebCore::RenderGrid::rowAxisOffsetForChild):
2949 (WebCore::RenderGrid::numTracks):
2950 (WebCore::RenderGrid::paintChildren):
2951 (WebCore::RenderGrid::gridColumnCount): Deleted.
2952 (WebCore::RenderGrid::gridRowCount): Deleted.
2953 (WebCore::RenderGrid::hasAutoRepeatEmptyTracks): Deleted.
2954 (WebCore::RenderGrid::isEmptyAutoRepeatTrack): Deleted.
2955 (WebCore::RenderGrid::cachedGridSpan): Deleted.
2956 * rendering/RenderGrid.h:
2957 (WebCore::RenderGrid::autoRepeatCountForDirection): Deleted.
2959 2016-11-30 Brady Eidson <beidson@apple.com>
2961 Unreviewed, rolling out r209168.
2963 Caused 2 API tests to fail
2967 "IndexedDB: When doing puts, don't
2968 "updateAllIndexesForAddRecord" if there are no indexes."
2969 https://bugs.webkit.org/show_bug.cgi?id=165215
2970 http://trac.webkit.org/changeset/209168
2972 2016-11-30 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2974 Build break when using --minimal
2975 https://bugs.webkit.org/show_bug.cgi?id=165238
2977 Reviewed by Darin Adler.
2979 * css/parser/CSSSelectorParser.cpp:
2980 (WebCore::CSSSelectorParser::consumePseudo): Use #if ENABLE(VIDEO_TRACK) guard.
2982 2016-11-30 Antoine Quint <graouts@apple.com>
2984 [Modern Media Controls] Add support for right-to-left layouts
2985 https://bugs.webkit.org/show_bug.cgi?id=165229
2987 Reviewed by Dean Jackson.
2989 We implement the "usesLTRUserInterfaceLayoutDirection" property which is set by HTMLMediaElement
2990 and set a CSS class when the layout is left-to-right, flipping the fullscreen volume slider in the
2991 case that it would not be present (right-to-left).
2993 Test: media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html
2995 * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:
2996 (.media-controls.mac.fullscreen:not(.uses-ltr-user-interface-layout-direction) .volume.slider):
2997 * Modules/modern-media-controls/controls/media-controls.js:
2998 (MediaControls.prototype.get usesLTRUserInterfaceLayoutDirection):
2999 (MediaControls.prototype.set usesLTRUserInterfaceLayoutDirection):
3000 * Modules/modern-media-controls/media/media-controller.js:
3001 (MediaController.prototype.set usesLTRUserInterfaceLayoutDirection):
3002 (MediaController.prototype._updateControlsIfNeeded):
3004 2016-11-30 Joseph Pecoraro <pecoraro@apple.com>
3006 Web Inspector: Remove unused parameter of InspectorInstrumentation::didFinishXHRLoading
3007 https://bugs.webkit.org/show_bug.cgi?id=165233
3009 Reviewed by Brian Burg.
3011 * inspector/InspectorInstrumentation.cpp:
3012 (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
3013 * inspector/InspectorInstrumentation.h:
3014 (WebCore::InspectorInstrumentation::didFinishXHRLoading):
3015 * inspector/InspectorNetworkAgent.cpp:
3016 (WebCore::InspectorNetworkAgent::didFinishXHRLoading):
3017 * inspector/InspectorNetworkAgent.h:
3018 * xml/XMLHttpRequest.cpp:
3019 (WebCore::XMLHttpRequest::didFinishLoading):
3020 Remove unused ThreadableLoaderClient parameter.
3022 2016-11-30 Brady Eidson <beidson@apple.com>
3024 IndexedDB: When doing puts, don't "updateAllIndexesForAddRecord" if there are no indexes.
3025 https://bugs.webkit.org/show_bug.cgi?id=165215
3027 Reviewed by Alex Christensen.
3029 No new tests (No observable behavior change).
3031 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3032 (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Don't "updateAllIndexesForAddRecord" if there are no indexes.
3033 Avoiding this saved us some IDBKey serialization and Javascript object manipulation.
3035 2016-11-30 Antoine Quint <graouts@apple.com>
3037 [Modern Media Controls] LayoutNode: only mark properties as dirty if different than current value
3038 https://bugs.webkit.org/show_bug.cgi?id=165236
3040 Reviewed by Simon Fraser.
3042 Check that the new value is different than the current value before marking the property as dirty.
3044 * Modules/modern-media-controls/controls/layout-node.js:
3045 (LayoutNode.prototype.set x):
3046 (LayoutNode.prototype.set y):
3047 (LayoutNode.prototype.set width):
3048 (LayoutNode.prototype.set height):
3049 (LayoutNode.prototype.set visible):
3050 (performScheduledLayout):
3051 * Modules/modern-media-controls/controls/scheduler.js:
3052 (const.scheduler.new.prototype.get hasScheduledLayoutCallbacks):
3054 2016-11-30 Jiewen Tan <jiewen_tan@apple.com>
3056 SubtleCrypto::deriveKey always return NOT_SUPPORTED_ERR for now
3057 https://bugs.webkit.org/show_bug.cgi?id=164744
3058 <rdar://problem/29258083>
3060 Reviewed by Darin Adler.
3062 Since we don't support any cryptography algorithms that has deriveKey operations,
3063 SubtleCrypto::deriveKey will always return NOT_SUPPORTED_ERR for now.
3065 Test: crypto/subtle/deriveKey-malformed-parameters.html
3067 * bindings/js/JSSubtleCryptoCustom.cpp:
3068 (WebCore::normalizeCryptoAlgorithmParameters):
3069 (WebCore::jsSubtleCryptoFunctionDeriveKeyPromise):
3070 (WebCore::JSSubtleCrypto::deriveKey):
3071 * crypto/SubtleCrypto.idl:
3073 2016-11-26 Jiewen Tan <jiewen_tan@apple.com>
3075 Update SubtleCrypto::digest to match the latest spec
3076 https://bugs.webkit.org/show_bug.cgi?id=164742
3077 <rdar://problem/29258037>
3079 Reviewed by Darin Adler.
3081 This patch updates the SubtleCrypto::digest method to match the latest spec:
3082 https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-digest.
3083 It also refers to the latest Editor's Draft to a certain degree:
3084 https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-digest.
3085 Currently supported digest algorithms are SHA-1, SHA-224, SHA-256, SHA-384,
3088 Tests: crypto/subtle/digest-malformed-parameters.html
3089 crypto/subtle/sha1-digest.html
3090 crypto/subtle/sha224-digest.html
3091 crypto/subtle/sha256-digest.html
3092 crypto/subtle/sha384-digest.html
3093 crypto/subtle/sha512-digest.html
3094 crypto/workers/subtle/sha1-digest.html
3095 crypto/workers/subtle/sha224-digest.html
3096 crypto/workers/subtle/sha256-digest.html
3097 crypto/workers/subtle/sha384-digest.html
3098 crypto/workers/subtle/sha512-digest.html
3100 * bindings/js/JSSubtleCryptoCustom.cpp:
3101 (WebCore::jsSubtleCryptoFunctionDigestPromise):
3102 (WebCore::JSSubtleCrypto::digest):
3103 * crypto/CryptoAlgorithm.cpp:
3104 (WebCore::CryptoAlgorithm::digest):
3105 * crypto/CryptoAlgorithm.h:
3106 * crypto/SubtleCrypto.idl:
3107 * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
3108 (WebCore::CryptoAlgorithmSHA1::digest):
3109 * crypto/algorithms/CryptoAlgorithmSHA1.h:
3110 * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
3111 (WebCore::CryptoAlgorithmSHA224::digest):
3112 * crypto/algorithms/CryptoAlgorithmSHA224.h:
3113 * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
3114 (WebCore::CryptoAlgorithmSHA256::digest):
3115 * crypto/algorithms/CryptoAlgorithmSHA256.h:
3116 * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
3117 (WebCore::CryptoAlgorithmSHA384::digest):
3118 * crypto/algorithms/CryptoAlgorithmSHA384.h:
3119 * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
3120 (WebCore::CryptoAlgorithmSHA512::digest):
3121 * crypto/algorithms/CryptoAlgorithmSHA512.h:
3123 2016-11-30 Antoine Quint <graouts@apple.com>
3125 [Modern Media Controls] UI Library: <audio> controls
3126 https://bugs.webkit.org/show_bug.cgi?id=164619
3127 <rdar://problem/29207215>
3129 Reviewed by Dean Jackson.
3131 Add a default size for <audio> elements (200x50).
3133 Tests: media/modern-media-controls/audio/audio-controls-buttons.html
3134 media/modern-media-controls/audio/audio-controls-metrics.html
3136 * Modules/modern-media-controls/controls/media-controls.css:
3139 2016-11-30 Brady Eidson <beidson@apple.com>
3141 REGRESSION (r209144): API test IndexedDB.DeleteRecovery failing.
3142 https://bugs.webkit.org/show_bug.cgi?id=165216
3144 Rubberstamped by Tim Horton.
3146 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3147 (WebCore::IDBServer::SQLiteIDBBackingStore::closeSQLiteDB): Change invalid ASSERT into a null check.
3149 2016-11-30 Said Abou-Hallawa <sabouhallawa@apple.com>
3151 Add separate settings and preferences to enable/disable async decoding for large images and animated images
3152 https://bugs.webkit.org/show_bug.cgi?id=165177
3154 Reviewed by Simon Fraser.
3156 Instead of having the async image decoding be controlled by one setting,
3157 two separate settings are added:
3158 largeImageAsyncDecodingEnabled
3159 animatedImageAsyncDecodingEnabled
3161 And an existing setting is removed:
3162 asyncImageDecodingEnabled
3164 * loader/cache/CachedImage.cpp:
3165 (WebCore::CachedImage::load):
3166 * loader/cache/CachedImage.h:
3168 * platform/graphics/BitmapImage.cpp:
3169 (WebCore::BitmapImage::internalStartAnimation):
3170 * platform/graphics/BitmapImage.h:
3171 * platform/graphics/ImageObserver.h:
3173 2016-11-30 Zalan Bujtas <zalan@apple.com>
3175 ASSERTION FAILED: layoutState->m_renderer == this in WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage
3176 https://bugs.webkit.org/show_bug.cgi?id=155364
3177 <rdar://problem/27720461>
3179 Reviewed by David Hyatt.
3181 RenderNamedFlowThread is considered to be a root for the current renderer context so
3182 we need to bail out from the containing block traversal here (like we do for the RenderView).
3184 Test: fast/replaced/replaced-element-with-percentage-width-inside-flow-asserts.html
3186 * rendering/RenderBox.cpp:
3187 (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3189 2016-11-30 Brady Eidson <beidson@apple.com>
3191 IndexedDB 2.0: Send operations off to the server in batches instead of one at a time.
3192 https://bugs.webkit.org/show_bug.cgi?id=165221
3194 Reviewed by Myles C. Maxfield.
3196 No new tests (No observable behavior change).
3198 On a profile of "Lots of writes to an IndexedDB", timer scheduling/firing presented as over 10% of the time.
3200 This patch negates much of that.
3202 * Modules/indexeddb/IDBTransaction.cpp:
3203 (WebCore::IDBTransaction::pendingOperationTimerFired): Send 100 operations off to the server
3204 before spinning the runloop, instead of only 1.
3206 2016-11-30 Antoine Quint <graouts@apple.com>
3208 [Modern Media Controls] Controls are not visible when returning from picture-in-picture playback
3209 https://bugs.webkit.org/show_bug.cgi?id=165183
3211 Reviewed by Dean Jackson.
3213 We need to call MediaControlsHost::setPreparedToReturnVideoLayerToInline() when we return from
3214 picture-in-picture playback such that the video layer is correctly stacked under the media controls.
3215 We call that function in a rAF call to ensure it's performed in sync with the next scheduled layout
3216 or the media controls would not appear in sync with the video layer.
3218 We also fix an error from a previous commit in ControlsVisibilitySupport.
3220 * Modules/modern-media-controls/media/controls-visibility-support.js:
3221 (ControlsVisibilitySupport.prototype.syncControl):
3222 (ControlsVisibilitySupport):
3223 * Modules/modern-media-controls/media/media-controller.js:
3225 (MediaController.prototype.handleEvent):
3226 (MediaController.prototype._returnMediaLayerToInlineIfNeeded):
3228 2016-11-30 Jiewen Tan <jiewen_tan@apple.com>
3230 Update SubtleCrypto::wrapKey to match the latest spec
3231 https://bugs.webkit.org/show_bug.cgi?id=164746
3232 <rdar://problem/29258160>
3234 Reviewed by Brent Fulgham.
3236 This patch does following few things:
3237 1. It updates the SubtleCrypto::wrapKey method to match the latest spec:
3238 https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-wrapKey.
3239 It also refers to the latest Editor's Draft to a certain degree:
3240 https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-wrapKey.
3241 2. It implements wrapKey operations of the following algorithms: AES-KW.
3242 3. It also replaces JSSubtleCrypto* with auto in all promise functions.
3244 Tests: crypto/subtle/aes-cbc-import-key-wrap-jwk-rsa-key-private.html
3245 crypto/subtle/aes-cbc-import-key-wrap-jwk-rsa-key-public.html
3246 crypto/subtle/aes-kw-import-key-wrap-raw-key.html
3247 crypto/subtle/aes-kw-wrap-key-malformed-parameters.html
3248 crypto/subtle/rsa-oaep-import-key-wrap-jwk-oct-key.html
3249 crypto/subtle/wrapKey-malformed-parameters.html
3250 crypto/workers/subtle/aes-cbc-import-key-wrap-key.html
3251 crypto/workers/subtle/aes-kw-import-key-wrap-key.html
3252 crypto/workers/subtle/rsa-oaep-import-key-wrap-key.html
3254 * bindings/js/JSSubtleCryptoCustom.cpp:
3255 (WebCore::normalizeCryptoAlgorithmParameters):
3256 (WebCore::supportExportKeyThrow):
3257 (WebCore::jsSubtleCryptoFunctionEncryptPromise):
3258 (WebCore::jsSubtleCryptoFunctionDecryptPromise):
3259 (WebCore::jsSubtleCryptoFunctionExportKeyPromise):
3260 (WebCore::jsSubtleCryptoFunctionWrapKeyPromise):
3261 (WebCore::JSSubtleCrypto::wrapKey):
3262 * crypto/CryptoAlgorithm.cpp:
3263 (WebCore::CryptoAlgorithm::wrapKey):
3264 * crypto/CryptoAlgorithm.h:
3265 * crypto/SubtleCrypto.idl:
3266 * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
3267 (WebCore::CryptoAlgorithmAES_KW::wrapKey):
3268 * crypto/algorithms/CryptoAlgorithmAES_KW.h:
3269 * crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:
3270 (WebCore::CryptoAlgorithmAES_KW::platformWrapKey):
3271 * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
3272 (WebCore::wrapKeyAES_KW):
3273 (WebCore::CryptoAlgorithmAES_KW::platformWrapKey):
3274 (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
3276 2016-11-29 Sam Weinig <sam@webkit.org>
3278 [WebIDL] Add support for more missing / exotic IDLTypes
3279 https://bugs.webkit.org/show_bug.cgi?id=165156
3281 Reviewed by Alex Christensen.
3283 - Adds JSDOMConvert support for WebIDL's 'callback interface' and 'callback function'.
3284 - Adds JSDOMConvert support for WebIDL extensions for SerializedScriptValue, Dictionary,
3285 EventListener and XPathNSResolver (moving much of their special casing out of perl and
3288 * DerivedSources.make:
3289 Adds $(WebCore)/testing to the list of available IDL directories to keep internals
3292 * Modules/webaudio/WaveShaperNode.cpp:
3293 * Modules/webaudio/WaveShaperNode.h:
3294 Update to take curve by reference.
3296 * bindings/generic/IDLTypes.h:
3297 (WebCore::IDLWrapper):
3298 Add helper type, IDLWrapper, which serves as a base type for all IDLTypes that are
3301 * bindings/js/JSDOMConvert.h:
3303 (WebCore::Converter<IDLNullable<T>>::convert):
3304 (WebCore::Converter<IDLCallbackFunction<T>>::convert):
3305 (WebCore::JSConverter<IDLCallbackFunction<T>>::convert):
3306 (WebCore::JSConverter<IDLCallbackFunction<T>>::convertNewlyCreated):
3307 (WebCore::Converter<IDLCallbackInterface<T>>::convert):
3308 (WebCore::JSConverter<IDLCallbackInterface<T>>::convert):
3309 (WebCore::JSConverter<IDLCallbackInterface<T>>::convertNewlyCreated):
3310 (WebCore::Converter<IDLSerializedScriptValue<T>>::convert):
3311 (WebCore::JSConverter<IDLSerializedScriptValue<T>>::convert):
3312 (WebCore::Converter<IDLLegacyDictionary<T>>::convert):
3313 (WebCore::Converter<IDLEventListener<T>>::convert):
3314 (WebCore::Converter<IDLXPathNSResolver<T>>::convert):
3315 (WebCore::JSConverter<IDLXPathNSResolver<T>>::convert):
3316 (WebCore::JSConverter<IDLXPathNSResolver<T>>::convertNewlyCreated):
3317 Add converters for the new types. IDLSerializedScriptValue, IDLLegacyDictionary, IDLEventListener and IDLXPathNSResolver
3318 have been templatized to avoid including their implementation classes everywhere. We can improve this in the future by
3319 splitting JSDOMConvert up into to separate files.
3321 * bindings/scripts/CodeGenerator.pm:
3325 (ComputeIsCallbackInterface):
3326 (ComputeIsCallbackFunction):
3327 Add new predicates, IsBuiltinType and IsInterfaceType, and re-work IsWrapperType to determine all types that
3328 have a JS wrapper (and consequently a JS{name}.h file).
3330 * bindings/scripts/CodeGeneratorJS.pm:
3331 (AddToIncludesForIDLType):
3332 Update to add include for EventListener.
3334 (GetArgumentExceptionFunction):
3335 (GetArgumentExceptionThrower):
3336 (GetAttributeExceptionFunction):
3337 (GetAttributeExceptionThrower):
3338 Add support for exceptions for callbacks.
3340 (PassArgumentExpression):
3341 Factor out logic on how to pass arguments to C++.
3344 Make toWrapped and JSDOMWrapperConverterTraits work with XPathNSResolver.
3346 (GenerateImplementation):
3347 Update to use PassArgumentExpression and pass a global object reference to JSValueToNative.
3349 (GenerateParametersCheck):
3350 Remove special casing for callbacks.
3352 (GenerateCallbackHeaderContent):
3353 (GenerateCallbackImplementationContent):
3354 Simplify toJS functions. State and global object are not necessary.
3357 Add support for new types. Add assertion so that unknown types can't get through.
3359 (ShouldPassArgumentByReference):
3360 Rename from ShouldPassWrapperByReference, and merge in CodeGenerator's ShouldPassWrapperByReference.
3362 (JSValueToNativeDOMConvertNeedsThisObject):
3363 Added. Predicate to determine types that need a this object for conversion.
3365 (JSValueToNativeDOMConvertNeedsGlobalObject):
3366 Added. Predicate to determine types that need a global object for conversion.
3369 Remove special cases for new types.
3371 (NativeToJSValueDOMConvertNeedsState):
3372 Add SerializedScriptValue and XPathNSResolver.
3374 (NativeToJSValueDOMConvertNeedsGlobalObject):
3375 Add SerializedScriptValue and XPathNSResolver.
3377 (NativeToJSValueUsingReferences):
3378 (NativeToJSValueUsingPointers):
3380 Remove unused $statePointer and replace $globalObject with $globalObjectReference. Remove
3381 special cases for new types.
3383 (GenerateConstructorDefinition):
3384 Use PassArgumentExpression.
3386 * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
3387 * bindings/scripts/test/JS/JSTestCallbackFunction.h:
3388 * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
3389 * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h:
3390 * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
3391 * bindings/scripts/test/JS/JSTestCallbackInterface.h:
3392 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3393 * bindings/scripts/test/JS/JSTestObj.cpp:
3394 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3395 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3396 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3397 * bindings/scripts/test/TestObj.idl:
3398 * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
3399 Update tests. Remove test for a readonly attribute returning a Promise, which is not supported
3400 yet (this was caught by the assertion added to GetBaseIDLType). Add tests for passing and returning
3401 SerializedScriptValues from functions.
3403 2016-11-30 Jiewen Tan <jiewen_tan@apple.com>
3405 Update SubtleCrypto::verify to match the latest spec
3406 https://bugs.webkit.org/show_bug.cgi?id=164741
3407 <rdar://problem/29257935>
3409 Reviewed by Brent Fulgham.
3411 This patch does following few things:
3412 1. It updates the SubtleCrypto::verify method to match the latest spec:
3413 https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-verify.
3414 It also refers to the latest Editor's Draft to a certain degree:
3415 https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-verify.
3416 2. It implements verify operations of the following algorithms: HMAC, and
3419 Tests: crypto/subtle/hmac-generate-key-sign-verify.html
3420 crypto/subtle/hmac-import-key-verify-sha1.html
3421 crypto/subtle/hmac-import-key-verify-sha224.html
3422 crypto/subtle/hmac-import-key-verify-sha256.html
3423 crypto/subtle/hmac-import-key-verify-sha384.html
3424 crypto/subtle/hmac-import-key-verify-sha512.html
3425 crypto/subtle/rsassa-pkcs1-v1_5-generate-key-sign-verify.html
3426 crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha1.html
3427 crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha224.html
3428 crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha256.html
3429 crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha384.html
3430 crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha512.html
3431 crypto/subtle/verify-malformed-parameters.html
3432 crypto/workers/subtle/hmac-import-key-verify.html
3433 crypto/workers/subtle/rsassa-pkcs1-v1_5-import-key-verify.html
3435 * bindings/js/JSSubtleCryptoCustom.cpp:
3436 (WebCore::normalizeCryptoAlgorithmParameters):
3437 (WebCore::jsSubtleCryptoFunctionVerifyPromise):
3438 (WebCore::JSSubtleCrypto::verify):
3439 * crypto/CryptoAlgorithm.cpp:
3440 (WebCore::CryptoAlgorithm::verify):
3441 * crypto/CryptoAlgorithm.h:
3442 * crypto/SubtleCrypto.idl:
3443 * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
3444 (WebCore::CryptoAlgorithmHMAC::verify):
3445 * crypto/algorithms/CryptoAlgorithmHMAC.h:
3446 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
3447 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
3448 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
3449 * crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
3450 (WebCore::CryptoAlgorithmHMAC::platformVerify):
3451 * crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:
3452 (WebCore::CryptoAlgorithmHMAC::platformVerify):
3453 * crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:
3454 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
3455 * crypto/mac/CryptoAlgorithmHMACMac.cpp:
3456 (WebCore::CryptoAlgorithmHMAC::platformVerify):
3457 * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3458 (WebCore::verifyRSASSA_PKCS1_v1_5):
3459 (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
3461 2016-11-30 Dave Hyatt <hyatt@apple.com>
3463 [CSS Parser] Fix columns shorthand parsing
3464 https://bugs.webkit.org/show_bug.cgi?id=165210
3466 Reviewed by Zalan Bujtas.
3468 * css/parser/CSSPropertyParser.cpp:
3469 (WebCore::CSSPropertyParser::consumeColumns):
3470 (WebCore::consumeColumnWidthOrCount): Deleted.
3471 Bring over the old parser code, since it was actually better at creating implicit values for auto.
3473 2016-11-30 Andy Estes <aestes@apple.com>
3475 [Cocoa] Pass the embedding app's bundle ID to new instances of NEFilterSource
3476 https://bugs.webkit.org/show_bug.cgi?id=165168
3477 <rdar://problem/29003618>