1 2018-05-16 Jer Noble <jer.noble@apple.com>
3 CRASH: Exception thrown from -[AVContentKeySession processContentKeyRequestWithIdentifier:initializationData:options:] after -expire called
4 https://bugs.webkit.org/show_bug.cgi?id=185690
5 <rdar://problem/38297768>
7 Reviewed by Eric Carlson.
9 Reject all calls to update() after close() has been called on the session.
11 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
12 (WebCore::CDMSessionAVContentKeySession::update):
14 2018-05-16 Andy VanWagoner <andy@vanwagoner.family>
16 Add support for Intl NumberFormat formatToParts
17 https://bugs.webkit.org/show_bug.cgi?id=185375
19 Reviewed by Yusuke Suzuki.
21 Test: js/intl-numberformat-format-to-parts.html
23 Add flag & tests for NumberFormat formatToParts.
25 * Configurations/FeatureDefines.xcconfig:
27 2018-05-16 Eric Carlson <eric.carlson@apple.com>
29 Improve NowPlaying "title"
30 https://bugs.webkit.org/show_bug.cgi?id=185680
31 <rdar://problem/40296700>
33 Reviewed by Jer Noble.
35 We send NowPlaying the element's title attribute if not empty, else the element's current url.
36 Title should be preferred because it is the most specific, but we should use the document
37 title if non-empty next, and if falling back to the element's url use just the domain instead
38 of the full url because it isn't likely to be useful to the user given the small amount of
39 space control center uses to display the title. Further, don't use any title at all when
40 in private browsing mode.
42 Tests: http/tests/media/now-playing-info-private-browsing.html
43 http/tests/media/now-playing-info.html
45 * html/HTMLMediaElement.cpp:
46 (WebCore::HTMLMediaElement::parseAttribute): Update NowPlaying when the title attribute changes.
47 (WebCore::HTMLMediaElement::finishSeek): Update NowPlaying when a seek completes.
48 (WebCore::HTMLMediaElement::mediaSessionTitle const): Update logic.
49 (WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const): Use the hash of the current
50 url as the unique identifier.
51 * html/HTMLMediaElement.h:
53 * platform/audio/PlatformMediaSession.cpp:
54 (WebCore::PlatformMediaSession::uniqueIdentifier const): New.
55 (WebCore::PlatformMediaSessionClient::mediaSessionUniqueIdentifier const): Ditto.
56 * platform/audio/PlatformMediaSession.h:
58 * platform/audio/ios/MediaSessionManagerIOS.mm:
59 (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Update m_lastUpdatedNowPlayingInfoUniqueIdentifier.
61 * platform/audio/mac/MediaSessionManagerMac.mm:
62 (WebCore::MediaSessionManagerMac::updateNowPlayingInfo): Update.
64 * testing/Internals.cpp:
65 (WebCore::Internals::nowPlayingState const): Expose NowPlaying state.
66 * testing/Internals.h:
67 * testing/Internals.idl:
69 2018-05-16 Daniel Bates <dabates@apple.com>
71 Attempt to fix the WinCairo build following r231859
72 (https://bugs.webkit.org/show_bug.cgi?id=185654)
74 Instantiate Cookie as a struct and set applicable fields.
76 * platform/network/curl/CookieJarDB.cpp:
77 (WebCore::CookieJarDB::searchCookies):
79 2018-05-16 Daniel Bates <dabates@apple.com>
81 Cleanup platform Cookie
82 https://bugs.webkit.org/show_bug.cgi?id=185654
84 Reviewed by Per Arne Vollan.
86 Remove unnecessary constructor and use =default for default constructor.
87 Simplify Cookie::decode() by having it decode directly into a stack-allocated
88 cookie. Remove some unnecessary local variables. Fix style nits.
91 (WebCore::Cookie::Cookie):
92 (WebCore::Cookie::isNull const):
93 (WebCore::Cookie::encode const):
94 (WebCore::Cookie::decode):
95 * platform/network/cf/CookieJarCFNet.cpp:
96 (WebCore::getRawCookies):
97 * platform/network/cocoa/CookieCocoa.mm:
98 (WebCore::cookieCreated):
99 (WebCore::Cookie::Cookie):
100 (WebCore::Cookie::operator== const):
101 (WebCore::Cookie::hash const):
102 * platform/network/soup/CookieJarSoup.cpp:
103 (WebCore::getRawCookies):
105 2018-05-14 Yusuke Suzuki <utatane.tea@gmail.com>
107 [Win] Use C++17 in MSVC
108 https://bugs.webkit.org/show_bug.cgi?id=185232
110 Reviewed by Alex Christensen.
112 Workaround for MSVC + /std:c++17.
114 * Modules/geolocation/Coordinates.h:
115 (WebCore::Coordinates::isolatedCopy const):
117 2018-05-16 Chris Nardi <cnardi@chromium.org>
119 Remove Document#selectedStylesheetSet/preferredStylesheetSet
120 https://bugs.webkit.org/show_bug.cgi?id=185381
122 Reviewed by Darin Adler.
124 Document#selectedStylesheetSet/preferredStylesheetSet are non-standard methods that
125 are only implemented WebKit. Blink removed these methods in https://crbug.com/690609.
126 The standard versions of these methods are are no longer in the spec. Remove them
127 entirely from our implementation.
129 Updated existing tests and imported/w3c/web-platform-tests/cssom/historical.html.
132 (WebCore::Document::processHttpEquiv):
135 * style/StyleScope.cpp:
136 (WebCore::Style::Scope::collectActiveStyleSheets):
137 * style/StyleScope.h:
138 (WebCore::Style::Scope::preferredStylesheetSetName const):
140 2018-05-16 Zalan Bujtas <zalan@apple.com>
142 [LFC] Implement width computation for replaced inflow elements.
143 https://bugs.webkit.org/show_bug.cgi?id=185672
145 Reviewed by Antti Koivisto.
147 Replaced width for block, inline and float elements compute the same way.
149 * layout/FormattingContext.cpp:
150 (WebCore::Layout::FormattingContext::computeWidth const):
151 (WebCore::Layout::FormattingContext::computeFloatingWidth const):
152 (WebCore::Layout::FormattingContext::computeInFlowReplacedWidth const):
153 * layout/FormattingContext.h:
154 * layout/blockformatting/BlockFormattingContext.cpp:
155 (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
156 * layout/layouttree/LayoutBox.cpp:
157 (WebCore::Layout::Box::hasIntrinsicWidth const):
158 (WebCore::Layout::Box::hasIntrinsicHeight const):
159 (WebCore::Layout::Box::hasIntrinsicRatio const):
160 (WebCore::Layout::Box::intrinsicWidth const):
161 (WebCore::Layout::Box::intrinsicHeight const):
162 (WebCore::Layout::Box::intrinsicRatio const):
163 * layout/layouttree/LayoutBox.h:
165 2018-05-16 Zalan Bujtas <zalan@apple.com>
167 [LFC] Make Display::Box box sizing aware
168 https://bugs.webkit.org/show_bug.cgi?id=185649
170 Reviewed by Antti Koivisto.
172 Display::Box::width() == Display::Box::contentBox().width() <= box-sizing: content-box; (initial and default value)
173 Display::Box::width() == Display::Box::borderBox().width() <= box-sizing: border-box;
175 * layout/LayoutContext.cpp:
176 (WebCore::Layout::LayoutContext::createDisplayBox):
177 * layout/displaytree/DisplayBox.cpp:
178 (WebCore::Display::Box::Box):
179 (WebCore::Display::Box::marginBox const):
180 (WebCore::Display::Box::borderBox const):
181 (WebCore::Display::Box::paddingBox const):
182 (WebCore::Display::Box::contentBox const):
183 * layout/displaytree/DisplayBox.h:
185 2018-05-16 Antoine Quint <graouts@apple.com>
187 REGRESSION (r230574): Interrupted hardware transitions don't behave correctly
188 https://bugs.webkit.org/show_bug.cgi?id=185299
189 <rdar://problem/39630230>
191 Reviewed by Simon Fraser.
193 In r230574, the fix for webkit.org/b/184518, we changed the processing order in GraphicsLayerCA::updateAnimations() to first
194 process m_uncomittedAnimations and then m_animationsToProcess, so we are guaranteed animations exist before we attempt to pause
195 or seek them. This broke interrupting and resuming hardware animations (such as an interrupted CSS Transition or an animation
196 running in a non-visible tab) since a pause operation recorded _before_ an animation was added would be paused anyway since
197 the animation was now first added, and then paused. The fix is simply to clear any pending AnimationProcessingAction for a
198 newly-uncommitted animation.
200 Test: transitions/interrupted-transition-hardware.html
202 * platform/graphics/ca/GraphicsLayerCA.cpp:
203 (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
204 (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
205 (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
206 * platform/graphics/ca/GraphicsLayerCA.h:
207 (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
209 2018-05-15 Yusuke Suzuki <utatane.tea@gmail.com>
211 [JSC] Check TypeInfo first before calling getCallData when we would like to check whether given object is a function
212 https://bugs.webkit.org/show_bug.cgi?id=185601
214 Reviewed by Saam Barati.
218 * Modules/plugins/QuickTimePluginReplacement.mm:
219 (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
220 * bindings/js/JSCustomElementRegistryCustom.cpp:
221 (WebCore::getCustomElementCallback):
222 * bindings/js/JSDOMConstructorBase.h:
223 * bindings/js/JSDOMConvertCallbacks.h:
224 (WebCore::Converter<IDLCallbackFunction<T>>::convert):
225 * bindings/js/JSDOMPromise.cpp:
226 (WebCore::DOMPromise::whenSettled):
227 * bindings/js/ReadableStream.cpp:
228 (WebCore::ReadableStream::pipeTo):
229 (WebCore::ReadableStream::tee):
230 * bindings/js/ReadableStreamDefaultController.cpp:
231 (WebCore::ReadableStreamDefaultController::invoke):
232 * bindings/scripts/CodeGeneratorJS.pm:
234 (GenerateOverloadDispatcher):
235 * bindings/scripts/test/JS/JSTestObj.h:
236 * bindings/scripts/test/JS/JSTestPluginInterface.h:
237 * bridge/objc/objc_runtime.h:
238 * bridge/runtime_method.h:
239 * bridge/runtime_object.h:
240 * html/HTMLMediaElement.cpp:
241 (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
242 * testing/Internals.cpp:
243 (WebCore::Internals::parserMetaData):
244 (WebCore::Internals::cloneArrayBuffer):
246 2018-05-15 Matt Baker <mattbaker@apple.com>
248 Web Inspector: element details hanger in inspector overlay should have better placement logic
249 https://bugs.webkit.org/show_bug.cgi?id=128482
250 <rdar://problem/16020709>
252 Reviewed by Timothy Hatcher.
254 When determining the best position for the hovered element details "tooltip",
255 perform placement tests in view space, not canvas space, and account for the
258 * inspector/InspectorOverlayPage.js:
259 (reset): Drive by fix: added missing `.height`.
262 2018-05-15 Commit Queue <commit-queue@webkit.org>
264 Unreviewed, rolling out r231765.
265 https://bugs.webkit.org/show_bug.cgi?id=185668
267 the layout test added with this change is very flaky
268 (Requested by realdawei on #webkit).
272 "REGRESSION (r230574): Interrupted hardware transitions don't
274 https://bugs.webkit.org/show_bug.cgi?id=185299
275 https://trac.webkit.org/changeset/231765
277 2018-05-15 Devin Rousso <webkit@devinrousso.com>
279 Web Inspector: Add rulers and guides
280 https://bugs.webkit.org/show_bug.cgi?id=32263
281 <rdar://problem/19281564>
283 Reviewed by Matt Baker.
285 This patch is purely a visual change for WebInspector, and doesn't affect anything else.
287 * inspector/InspectorOverlay.h:
288 * inspector/InspectorOverlay.cpp:
289 (WebCore::InspectorOverlay::update):
290 (WebCore::InspectorOverlay::reset):
291 (WebCore::InspectorOverlay::drawGutter): Deleted.
293 * inspector/InspectorOverlayPage.html:
294 * inspector/InspectorOverlayPage.js:
296 (Bounds.prototype.get minX): Added.
297 (Bounds.prototype.get minY): Added.
298 (Bounds.prototype.get maxX): Added.
299 (Bounds.prototype.get maxY): Added.
300 (Bounds.prototype.update): Added.
304 (_isolateActions): Added.
305 (_quadToPath): Added.
306 (_quadToPath.parseQuadPoint): Added.
307 (_drawOutlinedQuad): Added.
309 (_drawPath.parsePoints): Added.
310 (_drawOutlinedQuadWithClip): Added.
312 (_drawShapeHighlight):
313 (_drawFragmentHighlight):
314 (_drawRulers): Added.
315 (quadToPath): Deleted.
316 (drawOutlinedQuad): Deleted.
317 (pathCommand): Deleted.
319 (drawOutlinedQuadWithClip): Deleted.
320 (drawGutter): Deleted.
321 * inspector/InspectorOverlayPage.css:
323 (#right-gutter): Deleted.
324 (#bottom-gutter): Deleted.
326 2018-05-15 Jer Noble <jer.noble@apple.com>
328 Media continues loading after rendered invisible (removed from DOM; scrolled off screen)
329 https://bugs.webkit.org/show_bug.cgi?id=185487
331 Reviewed by Eric Carlson.
333 Test: media/video-buffering-allowed.html
335 When a media element is removed from the dom (e.g. through innerHTML=""), it doesn't
336 necessarily stop loading media data; it will continue to do so until its destructor is
337 called through garbage collection. Similarly, when a media element is rendered not-visible
338 by being scrolled off-screen or being made display:none, media loading continues. There
339 are legitimate use cases for out-of-DOM media loading, so only temporarily block loading
340 when the element transitions out of the document. Similarly, only block loading for non-visible
341 media elements when returning from the "page is hidden" state, and only until the media
342 element is asked to play or is otherwise made visible.
344 Note: this refactors a lot of code out of PlatformMediaSession and into MediaElementSession,
345 since this code is specific to "media elements".
347 * html/HTMLMediaElement.cpp:
348 (WebCore::HTMLMediaElement::HTMLMediaElement):
349 (WebCore::HTMLMediaElement::insertedIntoAncestor):
350 (WebCore::HTMLMediaElement::removedFromAncestor):
351 (WebCore::HTMLMediaElement::playInternal):
352 (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
353 (WebCore::HTMLMediaElement::resume):
354 (WebCore::HTMLMediaElement::visibilityStateChanged):
355 (WebCore::HTMLMediaElement::createMediaPlayer):
356 (WebCore::HTMLMediaElement::setShouldBufferData):
357 (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
358 (WebCore::HTMLMediaElement::isVisibleInViewportChanged):
359 (WebCore::HTMLMediaElement::fullscreenModeChanged):
360 (WebCore::HTMLMediaElement::setInActiveDocument):
361 * html/HTMLMediaElement.h:
362 (WebCore::HTMLMediaElement::shouldBufferData const):
363 (WebCore::HTMLMediaElement::elementIsHidden const):
364 * html/MediaElementSession.cpp:
365 (WebCore::MediaElementSession::MediaElementSession):
366 (WebCore::MediaElementSession::clientWillBeginAutoplaying):
367 (WebCore::MediaElementSession::clientWillBeginPlayback):
368 (WebCore::MediaElementSession::clientWillPausePlayback):
369 (WebCore::MediaElementSession::visibilityChanged):
370 (WebCore::MediaElementSession::isVisibleInViewportChanged):
371 (WebCore::MediaElementSession::inActiveDocumentChanged):
372 (WebCore::MediaElementSession::scheduleClientDataBufferingCheck):
373 (WebCore::MediaElementSession::clientDataBufferingTimerFired):
374 (WebCore::MediaElementSession::updateClientDataBuffering):
375 (WebCore::MediaElementSession::dataBufferingPermitted const):
376 (WebCore::MediaElementSession::wantsToObserveViewportVisibilityForAutoplay const):
377 * html/MediaElementSession.h:
378 * platform/audio/PlatformMediaSession.cpp:
379 (WebCore::PlatformMediaSession::PlatformMediaSession):
380 (WebCore::PlatformMediaSession::clientWillBeginAutoplaying):
381 (WebCore::PlatformMediaSession::clientWillBeginPlayback):
382 (WebCore::PlatformMediaSession::clientWillPausePlayback):
384 (WebCore::PlatformMediaSession::visibilityChanged): Deleted.
385 (WebCore::PlatformMediaSession::scheduleClientDataBufferingCheck): Deleted.
386 (WebCore::PlatformMediaSession::clientDataBufferingTimerFired): Deleted.
387 (WebCore::PlatformMediaSession::updateClientDataBuffering): Deleted.
388 (WebCore::PlatformMediaSession::isHidden const): Deleted.
389 * platform/audio/PlatformMediaSession.h:
390 (WebCore::PlatformMediaSessionClient::setShouldBufferData): Deleted.
391 (WebCore::PlatformMediaSessionClient::elementIsHidden const): Deleted.
392 * platform/audio/PlatformMediaSessionManager.cpp:
393 (WebCore::PlatformMediaSessionManager::sessionCanLoadMedia const): Deleted.
394 * platform/audio/PlatformMediaSessionManager.h:
395 * platform/audio/ios/MediaSessionManagerIOS.h:
396 * platform/audio/ios/MediaSessionManagerIOS.mm:
397 (WebCore::MediaSessionManageriOS::sessionCanLoadMedia const): Deleted.
398 * rendering/RenderVideo.cpp:
399 (WebCore::RenderVideo::willBeDestroyed):
400 * testing/Internals.cpp:
401 (WebCore::Internals::elementShouldBufferData):
402 * testing/Internals.h:
403 * testing/Internals.idl:
405 2018-05-15 Charles Vazac <cvazac@gmail.com>
407 Add the PerformanceServerTiming Interface which makes Server-Timing header timing values available to JavaScript running in the browser.
408 https://bugs.webkit.org/show_bug.cgi?id=175569
410 Reviewed by Youenn Fablet.
412 Tests were imported from web-platform-tests: WebKit/LayoutTests/imported/w3c/web-platform-tests/server-timing/*
414 * Sources.txt: Added references to HeaderFieldTokenizer.cpp, ServerTiming.cpp, and ServerTimingParser.cpp.
415 * WebCore.xcodeproj/project.pbxproj: Added various files.
416 * loader/HeaderFieldTokenizer.cpp: Added.
417 (WebCore::HeaderFieldTokenizer::HeaderFieldTokenizer): Added class for tokenizing header values.
418 (WebCore::HeaderFieldTokenizer::consume): Added method to consume a specified character.
419 (WebCore::HeaderFieldTokenizer::consumeQuotedString): Added method to consume a quote-string.
420 (WebCore::HeaderFieldTokenizer::consumeToken): Added a method to consume a token.
421 (WebCore::HeaderFieldTokenizer::consumeTokenOrQuotedString): Added method to consume a quote-string or quote-string, depending on net character.
422 (WebCore::HeaderFieldTokenizer::skipSpaces): Added method to skip whitespace.
423 (WebCore::HeaderFieldTokenizer::consumeBeforeAnyCharMatch): Added method to advance the cursor up until any of a list of characters.
424 * loader/HeaderFieldTokenizer.h: Added.
425 * loader/HTTPHeaderField.cpp: Expose isTokenCharacter and isWhitespace.
426 * loader/HTTPHeaderField.h: Expose isTokenCharacter and isWhitespace.
427 * loader/PolicyChecker.cpp: Added #include so source compiled on my machine.
428 * loader/ResourceTiming.cpp:
429 (WebCore::ResourceTiming::ResourceTiming): Added call to initServerTiming to parse the header.
430 (WebCore::ResourceTiming::initServerTiming): Added method to parse the header.
431 (WebCore::ResourceTiming::populateServerTiming): Added method to populate the server timing entries on a PerformanceResourceTiming object.
432 (WebCore::ResourceTiming::isolatedCopy const): Added code to copy over the server timing entries.
433 * loader/ResourceTiming.h:
434 (WebCore::ResourceTiming::ResourceTiming): Accept collection of server timing entries in c'tor.
435 * loader/ServerTiming.cpp: Added.
436 (WebCore::ServerTiming::setParameter): Set named parameters, ignoring unrecognized or duplicates.
437 (WebCore::ServerTiming::isolatedCopy const): Return a new pointer to the object.
438 * loader/ServerTiming.h: Added.
439 (WebCore::ServerTiming::ServerTiming): Added struct for the data needed by a server timing entry.
440 (WebCore::ServerTiming::name const): Added name field of a server timing entry.
441 (WebCore::ServerTiming::duration const): Added duration field of a server timing entry.
442 (WebCore::ServerTiming::description const): Added description field of a server timing entry.
443 * loader/ServerTimingParser.cpp: Added.
444 (WebCore::ServerTimingParser::parseServerTiming): Parses the header generating a collection of server timing structs.
445 * loader/ServerTimingParser.h: Added.
446 * loader/WorkerThreadableLoader.h: Fix build.
447 * page/Performance.cpp:
448 (WebCore::Performance::addResourceTiming): Fixed a typo.
449 * page/PerformanceResourceTiming.cpp:
450 (WebCore::PerformanceResourceTiming::PerformanceResourceTiming): Given a ResourceTiming object, populate our collection of PerformanceServerTiming objects.
451 * page/PerformanceResourceTiming.h: Added serverTiming member and getter.
452 * page/PerformanceResourceTiming.idl: Added serverTiming member to interface.
453 * platform/network/HTTPHeaderNames.in: Added "Server-Timing" to the header enum.
454 * platform/network/ResourceResponseBase.cpp: Added "Server-Timing" to isSafeCrossOriginResponseHeader whitelist.
456 2018-05-15 Brady Eidson <beidson@apple.com>
458 Fix crash after a Worker terminates but there are still IDB transactions the server is trying to open for it.
459 <rdar://problem/33744241> and https://bugs.webkit.org/show_bug.cgi?id=185653
461 Reviewed by Andy Estes.
463 Test: storage/indexeddb/modern/worker-transaction-open-after-worker-stop.html
465 * Modules/indexeddb/client/IDBConnectionProxy.cpp:
466 (WebCore::IDBClient::IDBConnectionProxy::didStartTransaction): It's okay to not be able to find a pending TX
467 that the server has started. e.g. When it was a WebWorker that asked for the TX but it has since terminated.
469 2018-05-15 Thomas Klausner <tk@giga.or.at>
471 Add missing header to fix build.
472 https://bugs.webkit.org/show_bug.cgi?id=185378
474 Reviewed by Michael Catanzaro.
476 * platform/network/soup/SoupNetworkSession.h:
478 2018-05-15 Carlos Alberto Lopez Perez <clopez@igalia.com>
480 [WPE] Build failure with RPi userland drivers and gstreamer-gl
481 https://bugs.webkit.org/show_bug.cgi?id=185639
483 Reviewed by Philippe Normand.
485 When building for the RPi with userland drivers (dispmanx) override the
486 value of GST_GL_HAVE_GLSYNC to 1 to avoid that the gstreamer-gl headers
487 try to redefine the GLsync type that is already defined in libepoxy.
489 Defining __gl2_h_ is also needed to avoid other conflicting type
490 definitions that happen between libepoxy and RPi GLES2 userland
491 headers when the gstreamer-gl headers are included.
493 The issue doesn't happen with 1.14.0, so a check for that is added
496 No new tests, no behavior change. It is a build fix.
498 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
500 2018-05-15 Michael Catanzaro <mcatanzaro@igalia.com>
502 Unreviewed, rolling out r230749
504 This did not work as desired.
506 * platform/UserAgentQuirks.cpp:
507 (WebCore::urlRequiresMacintoshPlatform):
509 2018-05-15 Dirk Schulze <krit@webkit.org>
511 Add new SVGDOM SVGFEBLEND constants
512 https://bugs.webkit.org/show_bug.cgi?id=185581
514 Reviewed by Simon Fraser.
516 Provide new SVG DOM constants for the new blend modes added to feBlend.
518 https://drafts.fxtf.org/filter-effects-1/#InterfaceSVGFEBlendElement
520 * platform/graphics/GraphicsTypes.cpp:
521 (WebCore::blendModeName):
522 * platform/graphics/GraphicsTypes.h:
523 * svg/SVGFEBlendElement.h:
524 (WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue):
525 (WebCore::SVGPropertyTraits<BlendMode>::toString):
526 * svg/SVGFEBlendElement.idl:
528 2018-05-15 Antoine Quint <graouts@apple.com>
530 [Web Animations] Expose Web Animations CSS integration as an experimental feature
531 https://bugs.webkit.org/show_bug.cgi?id=185647
533 Reviewed by Dean Jackson.
535 Make the Web Animations CSS integration flag an experimental feature, and only indicate that it is on if the Web Animations
536 experimental feature is also enabled.
539 (WebCore::Document::didBecomeCurrentDocumentInFrame):
540 (WebCore::Document::resume):
542 (WebCore::Element::removedFromAncestor):
543 * dom/PseudoElement.cpp:
544 (WebCore::PseudoElement::clearHostElement):
545 * history/CachedFrame.cpp:
546 (WebCore::CachedFrameBase::restore):
548 (WebCore::Frame::clearTimers):
549 * page/FrameView.cpp:
550 (WebCore::FrameView::didDestroyRenderTree):
552 (WebCore::Page::handleLowModePowerChange):
553 (WebCore::Page::setIsVisibleInternal):
554 (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged):
555 * page/RuntimeEnabledFeatures.h:
556 (WebCore::RuntimeEnabledFeatures::setWebAnimationsCSSIntegrationEnabled):
557 (WebCore::RuntimeEnabledFeatures::webAnimationsCSSIntegrationEnabled const):
558 (WebCore::RuntimeEnabledFeatures::setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled): Deleted.
559 (WebCore::RuntimeEnabledFeatures::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled const): Deleted.
560 * rendering/RenderLayer.cpp:
561 (WebCore::RenderLayer::currentTransform const):
562 (WebCore::RenderLayer::calculateClipRects const):
563 * rendering/RenderLayerBacking.cpp:
564 (WebCore::RenderLayerBacking::updateGeometry):
565 * rendering/RenderLayerCompositor.cpp:
566 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
567 (WebCore::RenderLayerCompositor::isRunningTransformAnimation const):
568 * rendering/updating/RenderTreeUpdater.cpp:
569 (WebCore::RenderTreeUpdater::tearDownRenderers):
570 * style/StyleTreeResolver.cpp:
571 (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
572 * testing/InternalSettings.cpp:
573 (WebCore::InternalSettings::webAnimationsCSSIntegrationEnabled):
574 (WebCore::InternalSettings::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled): Deleted.
575 * testing/InternalSettings.h:
576 * testing/InternalSettings.idl:
577 * testing/Internals.cpp:
578 (WebCore::Internals::numberOfActiveAnimations const):
579 (WebCore::Internals::animationsAreSuspended const):
580 (WebCore::Internals::animationsInterval const):
581 (WebCore::Internals::suspendAnimations const):
582 (WebCore::Internals::resumeAnimations const):
584 2018-05-15 David Kilzer <ddkilzer@apple.com>
586 Fix -Wreturn-std-move warnings in WebKit found by new clang compiler
587 <https://webkit.org/b/185621>
589 Reviewed by Youenn Fablet.
591 Fix warnings like the following:
593 In file included from DerivedSources/WebCore/unified-sources/UnifiedSource139.cpp:5:
594 ./Modules/mediastream/PeerConnectionBackend.cpp:412:16: error: local variable 'sdp' will be copied despite being returned by name [-Werror,-Wreturn-std-move]
597 ./Modules/mediastream/PeerConnectionBackend.cpp:412:16: note: call 'std::move' explicitly to avoid copying
603 * Modules/mediastream/PeerConnectionBackend.cpp:
604 (WebCore::PeerConnectionBackend::filterSDP const):
605 * accessibility/AccessibilityObject.cpp:
606 (WebCore::rangeClosestToRange):
607 * bindings/js/JSDOMConvertSequences.h:
608 (WebCore::Detail::GenericSequenceConverter::convert):
609 (WebCore::Detail::NumericSequenceConverter::convertArray):
610 * bindings/js/JSDOMConvertStrings.cpp:
611 (WebCore::stringToByteString):
612 (WebCore::stringToUSVString):
613 - Use WTFMove() in return statements to fix the warnings.
615 2018-05-14 Dean Jackson <dino@apple.com>
617 Download and present System Preview
618 https://bugs.webkit.org/show_bug.cgi?id=185459
619 <rdar://problem/40079228>
621 Reviewed by Tim Horton.
623 If an <a> is a system preview, tell the resource request about it.
625 * html/HTMLAnchorElement.cpp:
626 (WebCore::HTMLAnchorElement::handleClick):
628 2018-05-15 Antti Koivisto <antti@apple.com>
630 animation-play-state: paused causes very high cpu load because of style invalidation loop
631 https://bugs.webkit.org/show_bug.cgi?id=182436
632 <rdar://problem/37182562>
634 Reviewed by Dean Jackson.
636 Test: animations/animation-playstate-paused-style-resolution.html
638 If the style of an element with 'animation-play-state: paused' is recomputed so it stays
639 paused we would enter zero-duration animation timer loop.
641 * page/animation/AnimationBase.cpp:
642 (WebCore::AnimationBase::updateStateMachine):
644 Don't move to AnimationState::PausedWaitResponse unless we get AnimationStateInput::StyleAvailable
645 (matching the comments). Otherwise just stay in the existing paused state.
647 Remove AnimationStateInput::StartAnimation from assertion as the case can't happen.
649 2018-05-14 Youenn Fablet <youenn@apple.com>
651 readableStreamDefaultControllerError should return early if stream is not readable
652 https://bugs.webkit.org/show_bug.cgi?id=185602
654 Reviewed by Chris Dumez.
656 Return early if stream is not readable in @readableStreamDefaultControllerError.
657 Update call sites to no longer check for ReadableStream state.
658 Covered by unflaked and rebased tests.
660 * Modules/streams/ReadableStreamDefaultController.js:
662 * Modules/streams/ReadableStreamInternals.js:
663 (readableStreamDefaultControllerError):
664 (readableStreamDefaultControllerCallPullIfNeeded):
666 2018-05-14 Zalan Bujtas <zalan@apple.com>
668 [LFC] Implement width computation for non-replaced block level inflow elements.
669 https://bugs.webkit.org/show_bug.cgi?id=185641
671 Reviewed by Sam Weinig.
673 Block level inflow elements participate in block formatting context.
675 * layout/FormattingContext.cpp:
676 (WebCore::Layout::FormattingContext::computeWidth const):
677 * layout/FormattingContext.h:
678 * layout/blockformatting/BlockFormattingContext.cpp:
679 (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
680 * layout/blockformatting/BlockFormattingContext.h:
681 * layout/inlineformatting/InlineFormattingContext.cpp:
682 (WebCore::Layout::InlineFormattingContext::computeInFlowWidth const):
683 * layout/inlineformatting/InlineFormattingContext.h:
685 2018-05-14 Wenson Hsieh <wenson_hsieh@apple.com>
687 Unreviewed, fix the iOS build after r231779
689 Also address a minor in-person review comment by returning "extrazoom" instead of the empty string.
691 * page/DisabledAdaptations.cpp:
692 (WebCore::extraZoomModeAdaptationName):
694 2018-05-14 Zalan Bujtas <zalan@apple.com>
696 [LFC] FormattingContext:computeOutOfFlowNonReplacedHeight/Width should use the computed margins/paddings/borders
697 https://bugs.webkit.org/show_bug.cgi?id=185633
699 Reviewed by Sam Weinig.
701 By the time we start computing height and width, DisplayBox should already have the computed values for margin/padding/border.
703 * layout/FormattingContext.cpp:
704 (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
705 (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
706 * layout/displaytree/DisplayBox.h:
707 (WebCore::Display::Box::paddingTop const):
708 (WebCore::Display::Box::paddingLeft const):
709 (WebCore::Display::Box::paddingBottom const):
710 (WebCore::Display::Box::paddingRight const):
711 (WebCore::Display::Box::borderTop const):
712 (WebCore::Display::Box::borderLeft const):
713 (WebCore::Display::Box::borderBottom const):
714 (WebCore::Display::Box::borderRight const):
716 2018-05-14 Wenson Hsieh <wenson_hsieh@apple.com>
718 [Extra zoom mode] Google search results are excessively zoomed in
719 https://bugs.webkit.org/show_bug.cgi?id=185347
720 <rdar://problem/39999778>
722 Reviewed by Tim Horton.
724 It turns out that basing minimum layout size and shrink-to-fit behaviors off of the `shrink-to-fit` viewport
725 argument poses compatibility risks with web pages that already specify `shrink-to-fit` to opt out of default
726 viewport shrinking behaviors in 1/3 multitasking mode on iPad.
728 One way to resolve this is to introduce a new viewport meta content attribute to disable viewport heuristics in
729 extra zoom mode. However, combined shrink-to-fit and minimum device width behaviors are difficult to describe
730 using a single backwards-compatible viewport meta content attribute, and the need to suppress the default
731 behavior of `shrink-to-fit=no` if such an attribute is not disabled further muddles our viewport story.
733 After some internal deliberation, we’ve decided to experiment with a new meta tag named "disabled-adaptations".
734 The content of this meta tag is a comma-separated list of adaptation names; if an adaptation name matches a
735 known adaptation type (for instance, extra zoom mode), we disable the class of behaviors used to adapt web
736 content. The first and only known adaptation type is extra zoom mode, which affects `shrink-to-fit` and layout
739 See per-method changes below for more details.
741 Test: fast/viewport/extrazoom/viewport-disable-extra-zoom-adaptations.html
744 * WebCore.xcodeproj/project.pbxproj:
746 (WebCore::Document::processDisabledAdaptations):
748 (WebCore::Document::disabledAdaptations const):
750 Add disabled adaptations to Document. Changes to disabled adaptations are not propagated if the parsed disabled
751 adaptation types don't change; upon changing adaptation types, notify the client to adjust for the new disabled
752 adaptations (currently, this only affects the viewport configuration).
754 * dom/ViewportArguments.h:
755 * html/HTMLMetaElement.cpp:
756 (WebCore::HTMLMetaElement::process):
757 * html/parser/HTMLPreloadScanner.cpp:
758 (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
759 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
760 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
761 * loader/FrameLoader.cpp:
762 (WebCore::FrameLoader::commitProvisionalLoad):
764 Restore the set of disabled adaptations when restoring a page from the cache.
767 (WebCore::Chrome::dispatchDisabledAdaptationsDidChange const):
769 * page/ChromeClient.h:
771 Add plumbing for changes to the set of disabled adaptations.
773 * page/DisabledAdaptations.cpp: Added.
774 (WebCore::extraZoomModeAdaptationName):
775 * page/DisabledAdaptations.h: Added.
777 Introduce a header containing a new enum for the extra zoom mode adaptation, as well as a helper function to
778 return the extra zoom mode adaptation name.
781 (WebCore::Page::disabledAdaptations const):
783 Returns the mainframe's set of adaptations to disable.
786 * page/RemoteFrame.h:
787 * page/RuntimeEnabledFeatures.h:
788 (WebCore::RuntimeEnabledFeatures::setDisabledAdaptationsMetaTagEnabled):
789 (WebCore::RuntimeEnabledFeatures::disabledAdaptationsMetaTagEnabled const):
791 Add a new runtime feature to gate handling the "disabled-adaptations" meta tag.
793 * page/ViewportConfiguration.cpp:
794 (WebCore::shouldOverrideShrinkToFitArgument):
795 (WebCore::needsUpdateAfterChangingDisabledAdaptations):
796 (WebCore::ViewportConfiguration::setDisabledAdaptations):
797 (WebCore::ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit const):
799 Consult whether or not extra zoom mode adaptations are disabled, instead of the shrink-to-fit attribute value.
801 (WebCore::ViewportConfiguration::updateConfiguration):
802 * page/ViewportConfiguration.h:
804 Add an OptionSet of disabled adaptation types to ViewportConfiguration. Updates to the adaptation type are
805 propagated to the ViewportConfiguration from Document, through the ChromeClient and the client layer (refer to
806 changes in WebKit). Once the OptionSet is changed, we recompute the viewport configuration only if needed by the
809 (WebCore::ViewportConfiguration::viewLayoutSize const):
810 (WebCore::ViewportConfiguration::disabledAdaptations const):
811 * page/WindowFeatures.cpp:
812 (WebCore::parseDisabledAdaptations):
813 * page/WindowFeatures.h:
815 Add a new helper to parse the meta content of a "disabled-adaptations" tag as an OptionSet of disabled
816 adaptation types. The string is parsed by first splitting on the comma character, and then iterating over lower
817 case, whitespace-stripped tokens to look for known adaptation names. So far, only extra zoom mode is supported.
819 * testing/Internals.cpp:
820 (WebCore::Internals::extraZoomModeAdaptationName const):
821 * testing/Internals.h:
822 * testing/Internals.idl:
824 Expose the extra zoom mode adaptation name to the DOM, only when running layout tests.
826 2018-05-14 Joanmarie Diggs <jdiggs@igalia.com>
828 AX: Listbox and Combobox roles embedded in labels should participate in name calculation
829 https://bugs.webkit.org/show_bug.cgi?id=185521
831 Reviewed by Chris Fleizach.
833 Take selected children into account when computing the name in accessibleNameForNode.
834 Add ListBox to the roles for which accessibleNameDerivesFromContent returns false so
835 that native select elements with size > 1 are treated the same way as ARIA listbox.
836 Also add ListBox to the roles which are treated as controls when used in ARIA. Finally,
837 prevent labels which contain unrelated controls from being used as an AXTitleUIElement.
838 This causes us to build a string from the label and its descendants, ensuring the latter
839 participate in the name calculation.
841 Test: accessibility/text-alternative-calculation-from-listbox.html
843 * accessibility/AccessibilityLabel.cpp:
844 (WebCore::childrenContainUnrelatedControls):
845 (WebCore::AccessibilityLabel::containsUnrelatedControls const):
846 * accessibility/AccessibilityLabel.h:
847 * accessibility/AccessibilityNodeObject.cpp:
848 (WebCore::accessibleNameForNode):
849 * accessibility/AccessibilityObject.cpp:
850 (WebCore::AccessibilityObject::accessibleNameDerivesFromContent const):
851 (WebCore::AccessibilityObject::isARIAControl):
852 * accessibility/AccessibilityRenderObject.cpp:
853 (WebCore::AccessibilityRenderObject::exposesTitleUIElement const):
854 (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
856 2018-05-14 Antoine Quint <graouts@apple.com>
858 [Web Animations] Tests using the new animation engine may crash under WebCore::FrameView::didDestroyRenderTree when using internals methods
859 https://bugs.webkit.org/show_bug.cgi?id=185612
860 <rdar://problem/39579344>
862 Reviewed by Dean Jackson.
864 Add a new internals.pseudoElement() method to obtain a pseudo element matching a given pseudo-id. This is necessary to be able to move off
865 internals.pauseTransitionAtTimeOnPseudoElement() and internals.pauseAnimationAtTimeOnPseudoElement() for Web Animations testing.
867 * testing/Internals.cpp:
868 (WebCore::Internals::pseudoElement):
869 * testing/Internals.h:
870 * testing/Internals.idl:
872 2018-05-14 Antoine Quint <graouts@apple.com>
874 REGRESSION (r230574): Interrupted hardware transitions don't behave correctly
875 https://bugs.webkit.org/show_bug.cgi?id=185299
876 <rdar://problem/39630230>
878 Reviewed by Simon Fraser.
880 In r230574, the fix for webkit.org/b/184518, we changed the processing order in GraphicsLayerCA::updateAnimations() to first
881 process m_uncomittedAnimations and then m_animationsToProcess, so we are guaranteed animations exist before we attempt to pause
882 or seek them. This broke interrupting and resuming hardware animations (such as an interrupted CSS Transition or an animation
883 running in a non-visible tab) since a pause operation recorded _before_ an animation was added would be paused anyway since
884 the animation was now first added, and then paused. The fix is simply to clear any pending AnimationProcessingAction for a
885 newly-uncommitted animation.
887 Test: transitions/interrupted-transition-hardware.html
889 * platform/graphics/ca/GraphicsLayerCA.cpp:
890 (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
891 (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
892 (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
893 * platform/graphics/ca/GraphicsLayerCA.h:
894 (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
896 2018-05-14 Thibault Saunier <tsaunier@igalia.com>
898 [GStreamer] Fix style issue in MediaPlayerPrivateGStreamerBase
899 https://bugs.webkit.org/show_bug.cgi?id=185510
901 Reviewed by Philippe Normand.
903 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:629: More than one command on the same line [whitespace/newline] [4]
904 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:684: More than one command on the same line [whitespace/newline] [4]
905 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:807: More than one command on the same line [whitespace/newline] [4]
907 Indentation and style issue fixed only.
909 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
910 (WebCore::MediaPlayerPrivateGStreamerBase::volumeChangedCallback):
911 (WebCore::MediaPlayerPrivateGStreamerBase::muteChangedCallback):
912 (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
914 2018-05-14 Zalan Bujtas <zalan@apple.com>
916 [LFC] Implement height computation for non-replaced out of flow elements.
917 https://bugs.webkit.org/show_bug.cgi?id=185585
919 Reviewed by Antti Koivisto.
921 * layout/FormattingContext.cpp:
922 (WebCore::Layout::FormattingContext::computeHeight const):
923 (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
924 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
925 (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedHeight const):
926 (WebCore::Layout::FormattingContext::computeHeightForBlockFormattingContextRootWithAutoHeight const):
927 * layout/FormattingContext.h:
928 * layout/blockformatting/BlockFormattingContext.h:
929 * layout/displaytree/DisplayBox.h:
931 2018-05-14 Manuel Rego Casasnovas <rego@igalia.com>
933 Renaming of overrides in LayoutBox
934 https://bugs.webkit.org/show_bug.cgi?id=185609
936 Reviewed by Javier Fernandez.
938 The names of the methods for the overrides were not consistent,
939 this patch fixes it by using the same structure in all the cases.
941 No new tests, no change of behavior.
943 * rendering/GridLayoutFunctions.cpp:
944 (WebCore::GridLayoutFunctions::hasOverrideContainingBlockContentSizeForChild):
945 * rendering/GridTrackSizingAlgorithm.cpp:
946 (WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForChild const):
947 * rendering/RenderBlock.cpp:
948 (WebCore::RenderBlock::computeChildPreferredLogicalWidths const):
949 (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):
950 * rendering/RenderBlockFlow.cpp:
951 (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
952 * rendering/RenderBlockLineLayout.cpp:
953 (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
954 * rendering/RenderBox.cpp:
955 (WebCore::RenderBox::willBeDestroyed):
956 (WebCore::RenderBox::hasOverrideContentLogicalHeight const):
957 (WebCore::RenderBox::hasOverrideContentLogicalWidth const):
958 (WebCore::RenderBox::setOverrideContentLogicalHeight):
959 (WebCore::RenderBox::setOverrideContentLogicalWidth):
960 (WebCore::RenderBox::clearOverrideContentLogicalHeight):
961 (WebCore::RenderBox::clearOverrideContentLogicalWidth):
962 (WebCore::RenderBox::clearOverrideContentSize):
963 (WebCore::RenderBox::overrideContentLogicalWidth const):
964 (WebCore::RenderBox::overrideContentLogicalHeight const):
965 (WebCore::RenderBox::overrideContainingBlockContentLogicalWidth const):
966 (WebCore::RenderBox::overrideContainingBlockContentLogicalHeight const):
967 (WebCore::RenderBox::hasOverrideContainingBlockContentLogicalWidth const):
968 (WebCore::RenderBox::hasOverrideContainingBlockContentLogicalHeight const):
969 (WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth):
970 (WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight):
971 (WebCore::RenderBox::clearOverrideContainingBlockContentSize):
972 (WebCore::RenderBox::clearOverrideContainingBlockContentLogicalHeight):
973 (WebCore::RenderBox::containingBlockLogicalWidthForContent const):
974 (WebCore::RenderBox::containingBlockLogicalHeightForContent const):
975 (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight const):
976 (WebCore::RenderBox::computeLogicalWidthInFragment const):
977 (WebCore::RenderBox::computeLogicalHeight const):
978 (WebCore::RenderBox::computePercentageLogicalHeight const):
979 (WebCore::RenderBox::computeReplacedLogicalHeightUsing const):
980 (WebCore::RenderBox::availableLogicalHeightUsing const):
981 (WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
982 (WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
983 * rendering/RenderBox.h:
984 * rendering/RenderBoxModelObject.cpp:
985 (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const):
986 * rendering/RenderDeprecatedFlexibleBox.cpp:
987 (WebCore::contentWidthForChild):
988 (WebCore::contentHeightForChild):
989 (WebCore::gatherFlexChildrenInfo):
990 (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
991 (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
992 (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
993 (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
994 * rendering/RenderFlexibleBox.cpp:
995 (WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild):
996 (WebCore::RenderFlexibleBox::crossSizeForPercentageResolution):
997 (WebCore::RenderFlexibleBox::mainSizeForPercentageResolution):
998 (WebCore::RenderFlexibleBox::constructFlexItem):
999 (WebCore::RenderFlexibleBox::setOverrideMainAxisContentSizeForChild):
1000 (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
1001 * rendering/RenderFullScreen.cpp:
1002 (WebCore::RenderFullScreen::unwrapRenderer):
1003 * rendering/RenderGrid.cpp:
1004 (WebCore::RenderGrid::layoutBlock):
1005 (WebCore::RenderGrid::layoutGridItems):
1006 (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
1007 * rendering/RenderRubyBase.cpp:
1008 (WebCore::RenderRubyBase::adjustInlineDirectionLineBounds const):
1009 * rendering/RenderTableCell.cpp:
1010 (WebCore::RenderTableCell::setOverrideContentLogicalHeightFromRowHeight):
1011 * rendering/RenderTableCell.h:
1012 * rendering/RenderTableSection.cpp:
1013 (WebCore::RenderTableSection::calcRowLogicalHeight):
1014 (WebCore::RenderTableSection::relayoutCellIfFlexed):
1016 2018-05-14 Zalan Bujtas <zalan@apple.com>
1018 [LFC] Implement width computation for non-replaced out of flow elements.
1019 https://bugs.webkit.org/show_bug.cgi?id=185598
1021 Reviewed by Antti Koivisto.
1023 * layout/FormattingContext.cpp:
1024 (WebCore::Layout::FormattingContext::computeWidth const):
1025 (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
1026 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
1027 (WebCore::Layout::FormattingContext::computeOutOfFlowNonReplacedWidth const):
1028 (WebCore::Layout::FormattingContext::shrinkToFitWidth const):
1029 * layout/FormattingContext.h:
1030 * layout/blockformatting/BlockFormattingContext.cpp:
1031 (WebCore::Layout::BlockFormattingContext::layout const):
1032 * layout/displaytree/DisplayBox.h:
1034 2018-05-14 Zan Dobersek <zdobersek@igalia.com>
1036 Drop the m_compositorTexture member variable in TextureMapperGC3DPlatformLayer.
1037 It's not used at all inside the class or outside it.
1039 Rubber-stamped by Michael Catanzaro.
1041 * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
1043 2018-05-14 Zan Dobersek <zdobersek@igalia.com>
1045 [GTK] REGRESSION(r231170) Build broken with Clang 5.0
1046 https://bugs.webkit.org/show_bug.cgi?id=185198
1048 Reviewed by Michael Catanzaro.
1050 Avoid gperf files using the register keyword which has been made
1051 reserved and as such unusable in C++17.
1053 * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
1054 * css/makeSelectorPseudoElementsMap.py:
1056 * css/makevalues.pl:
1057 * platform/ColorData.gperf:
1058 * platform/ReferrerPolicy.h: With std::optional forward declaration
1059 gone, explicitly include the WTF Optional.h header.
1060 * platform/Theme.h: Ditto.
1061 * platform/network/create-http-header-name-table:
1063 2018-05-14 Commit Queue <commit-queue@webkit.org>
1065 Unreviewed, rolling out r219515.
1066 https://bugs.webkit.org/show_bug.cgi?id=185603
1068 It sometimes makes AudioUnitInitialize call to fail in
1069 CoreAudioCaptureSource (Requested by youenn on #webkit).
1073 "Remove CoreAudioCaptureSource speaker configuration"
1074 https://bugs.webkit.org/show_bug.cgi?id=174512
1075 https://trac.webkit.org/changeset/219515
1077 2018-05-13 Dirk Schulze <krit@webkit.org>
1079 Implement SVGGeometryElement's isPointInFill and isPointInStroke
1080 https://bugs.webkit.org/show_bug.cgi?id=185580
1082 Reviewed by Antti Koivisto.
1084 Implement isPointInFill and isPointInStroke methods for
1085 SVGGeometryElement interface from SVG2.
1087 https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement
1089 Tests: svg/dom/SVGGeometry-isPointInFill.xhtml
1090 svg/dom/SVGGeometry-isPointInStroke.xhtml
1092 * rendering/svg/RenderSVGEllipse.cpp:
1093 (WebCore::RenderSVGEllipse::shapeDependentStrokeContains): Flag
1094 to switch between local and "global" coordinate space for hit testing.
1095 * rendering/svg/RenderSVGEllipse.h:
1096 * rendering/svg/RenderSVGPath.cpp:
1097 (WebCore::RenderSVGPath::shapeDependentStrokeContains): Flag
1098 to switch between local and "global" coordinate space for hit testing.
1099 * rendering/svg/RenderSVGPath.h:
1100 * rendering/svg/RenderSVGRect.cpp:
1101 (WebCore::RenderSVGRect::shapeDependentStrokeContains): Flag
1102 to switch between local and "global" coordinate space for hit testing.
1103 * rendering/svg/RenderSVGRect.h:
1104 * rendering/svg/RenderSVGShape.cpp:
1105 (WebCore::RenderSVGShape::shapeDependentStrokeContains): Flag
1106 to switch between local and "global" coordinate space for hit testing.
1107 (WebCore::RenderSVGShape::isPointInFill): Take the winding rule given by
1108 `fill-rule` to test if a given point is in the fill area of a path.
1109 (WebCore::RenderSVGShape::isPointInStroke): Take stroke properties into
1110 account to check if a point is on top of the stroke area.
1111 * rendering/svg/RenderSVGShape.h:
1112 * svg/SVGGeometryElement.cpp:
1113 (WebCore::SVGGeometryElement::isPointInFill):
1114 (WebCore::SVGGeometryElement::isPointInStroke):
1115 (WebCore::SVGGeometryElement::createElementRenderer): Deleted. This is getting implemented
1116 by inheriting classes. No need to create RenderSVGPath here.
1117 * svg/SVGGeometryElement.h:
1118 * svg/SVGGeometryElement.idl:
1120 2018-05-12 Zalan Bujtas <zalan@apple.com>
1122 Use WeakPtr for m_enclosingPaginationLayer in RenderLayer
1123 https://bugs.webkit.org/show_bug.cgi?id=185566
1124 <rdar://problem/36486052>
1126 Reviewed by Simon Fraser.
1128 Since RenderLayer does not own the enclosing pagination layout, it should
1129 construct a weak pointer instead of holding on to a raw pointer.
1131 Unable to create a reliably reproducible test case.
1133 * page/mac/EventHandlerMac.mm:
1134 (WebCore::scrollableAreaForEventTarget):
1135 (WebCore::scrollableAreaForContainerNode):
1136 (WebCore::EventHandler::platformPrepareForWheelEvents):
1137 * platform/ScrollableArea.h:
1138 (WebCore::ScrollableArea::weakPtrFactory const):
1139 (WebCore::ScrollableArea::createWeakPtr): Deleted.
1140 * rendering/RenderLayer.cpp:
1141 (WebCore::RenderLayer::RenderLayer):
1142 (WebCore::RenderLayer::updatePagination):
1143 * rendering/RenderLayer.h:
1145 2018-05-11 Daniel Bates <dabates@apple.com>
1147 X-Frame-Options: SAMEORIGIN needs to check all ancestor frames
1148 https://bugs.webkit.org/show_bug.cgi?id=185567
1149 <rdar://problem/40175008>
1151 Reviewed by Brent Fulgham.
1153 Change the behavior of "X-Frame-Options: SAMEORIGIN" to ensure that all ancestors frames
1154 are same-origin with the document that delivered this header. This prevents an intermediary
1155 malicious frame from clickjacking a child frame whose document is same-origin with the top-
1156 level frame. It also makes the behavior of X-Frame-Options in WebKit more closely match
1157 the behavior of X-Frame-Options in other browsers, including Chrome and Firefox.
1159 Currently a document delivered with "X-Frame-Options: SAMEORIGIN" must only be same-origin
1160 with the top-level frame's document in order to be displayed. This prevents clickjacking by
1161 a malicious page that embeds a page delivered with "X-Frame-Options: SAMEORIGIN". However,
1162 it does not protect against clickjacking of the "X-Frame-Options: SAMEORIGIN" page (victim)
1163 if embedded by an intermediate malicious iframe, say a "rogue ad", that was embedded in a
1164 document same origin with the victim page. We should protect against such attacks.
1166 Tests: http/tests/security/XFrameOptions/x-frame-options-ancestors-same-origin-allow.html
1167 http/tests/security/XFrameOptions/x-frame-options-ancestors-same-origin-deny.html
1169 * loader/FrameLoader.cpp:
1170 (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1172 2018-05-11 Daniel Bates <dabates@apple.com>
1174 [iOS] Text decoration of dragged content does not paint with opacity
1175 https://bugs.webkit.org/show_bug.cgi?id=185551
1176 <rdar://problem/40166867>
1178 Reviewed by Wenson Hsieh.
1180 Respect alpha when painting the text decoration for dragged content.
1182 * rendering/InlineTextBox.cpp:
1183 (WebCore::InlineTextBox::MarkedTextStyle::areDecorationMarkedTextStylesEqual): Consider alpha when
1184 comparing decoration styles for equality so that we do not coalesce styles with differing alpha.
1185 (WebCore::InlineTextBox::paintMarkedTextDecoration): Respect alpha when painting dragged content.
1187 2018-05-11 Nan Wang <n_wang@apple.com>
1189 AX: In role=dialog elements with aria-modal=true VoiceOver iOS/macOS can't manually focus or read dialog paragraph description text inside the modal.
1190 https://bugs.webkit.org/show_bug.cgi?id=185219
1191 <rdar://problem/39920009>
1193 Reviewed by Chris Fleizach.
1195 The text node descendants of a modal dialog are ignored. Fixed it by using AccessibilityObject's
1196 node() to determine if it's the descendant of the modal dialog node.
1198 Test: accessibility/aria-modal-text-descendants.html
1200 * accessibility/AccessibilityObject.cpp:
1201 (WebCore::AccessibilityObject::isModalDescendant const):
1203 2018-05-11 Ryosuke Niwa <rniwa@webkit.org>
1205 Tapping after CSS-based table casues an infinite loop in wordRangeFromPosition
1206 https://bugs.webkit.org/show_bug.cgi?id=185465
1207 <rdar://problem/35263057>
1209 Reviewed by Antti Koivisto.
1211 The bug was caused by TextIterator not emitting a line break when exiting a CSS-based table when an element
1212 with `display: table-row` has an invisible text node. Specifically, TextIterator::exitNode is never called on
1213 an element with `table-cell: row` when m_node is a text node with whitespaces which appears after an element
1214 with `display: table-cell`.
1216 For example, for a tree structure like:
1221 Getting out of (C) would result in moving onto (2) without generating a line break for (R).
1223 When this happens in nextBoundary as it tries to find the end of the last word in the table cell, we end up
1224 finding the end of the document as the end of the word. As a result, nextWordBoundaryInDirection, the caller
1225 of nextBoundary, ends up infinite looping between the positon at the end of the document and the position
1226 immediately before the last word in the last table cell when it traverses words backwards.
1228 This patch fixes the hang by addressing this root cause in TextIterator. Namely, TextIterator now generates
1229 a line break when exiting a block while walking up ancestors in TextIterator::advance().
1231 Tests: editing/selection/tapping-in-table-at-end-of-document.html
1232 editing/text-iterator/table-at-end-of-document.html
1234 * editing/TextIterator.cpp:
1235 (WebCore::TextIterator::advance): Fixed the bug.
1236 (WebCore::shouldEmitNewlineAfterNode): Do generate a new line at the end of a document when we're trying to
1237 generate every visible poitions even there are no renderers beyond this point. e.g. a position inside the
1238 last cell of a table at the end of a document hits this condition.
1239 (WebCore::shouldEmitExtraNewlineForNode): Don't emit a line break when the render box's height is 0px
1240 to avoid generating many empty lines for empty paragraph and header elements (this function is used to generate
1241 a blank line between p's and h1/h2/...'s).
1242 (WebCore::TextIterator::exitNode):
1244 2018-05-11 Dean Jackson <dino@apple.com>
1246 System preview badge doesn't show on <picture> elements
1247 https://bugs.webkit.org/show_bug.cgi?id=185559
1248 <rdar://problem/40150066>
1250 Reviewed by Tim Horton.
1252 We should also identify <img>s that are the child of a <picture>
1253 contained inside the appropriate <a> element.
1255 Tested internally, since the badge is platform specific.
1257 * html/HTMLImageElement.cpp:
1258 (WebCore::HTMLImageElement::isSystemPreviewImage const): Add logic
1259 to look for <picture> parents.
1261 2018-05-11 Chris Dumez <cdumez@apple.com>
1263 REGRESSION (async policy delegate): Revoking an object URL immediately after triggering download breaks file download
1264 https://bugs.webkit.org/show_bug.cgi?id=185531
1265 <rdar://problem/39909589>
1267 Reviewed by Geoffrey Garen.
1269 Whenever we start an asynchronous navigation policy decision for a blob URL, create a temporary
1270 blob URL pointing to the same data, and update the request's URL. This way, if the page's JS revokes
1271 the URL during the policy decision, the load will still succeed.
1273 Test: fast/dom/HTMLAnchorElement/anchor-file-blob-download-then-revoke.html
1275 * loader/DocumentLoader.cpp:
1276 (WebCore::DocumentLoader::willSendRequest):
1277 * loader/FrameLoader.cpp:
1278 (WebCore::FrameLoader::loadURL):
1279 (WebCore::FrameLoader::load):
1280 (WebCore::FrameLoader::loadPostRequest):
1281 * loader/PolicyChecker.cpp:
1282 (WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
1283 (WebCore::PolicyChecker::checkNavigationPolicy):
1284 (WebCore::PolicyChecker::checkNewWindowPolicy):
1285 * loader/PolicyChecker.h:
1287 2018-05-11 Antti Koivisto <antti@apple.com>
1289 LinkLoader fails to remove CachedResourceClient in some cases
1290 https://bugs.webkit.org/show_bug.cgi?id=185553
1291 <rdar://problem/36879656>
1293 Reviewed by Geoffrey Garen.
1295 Test: http/tests/preload/link-preload-client-remove.html
1297 * loader/LinkLoader.cpp:
1298 (WebCore::LinkLoader::loadLink):
1300 If there is a link preload already in progress, we fail to clear the client for the ongoing load.
1301 This may leave the CachedResource client map in a bad state.
1303 2018-05-11 Charles Vazac <cvazac@gmail.com>
1305 Runtime feature flag for Server-Timing
1306 https://bugs.webkit.org/show_bug.cgi?id=184758
1308 Reviewed by Youenn Fablet.
1310 * Source/WebCore/CMakeLists.txt: Added reference to PerformanceServerTiming.idl.
1311 * Source/WebCore/DerivedSources.make: Added reference to PerformanceServerTiming.idl.
1312 * Source/WebCore/Sources.txt: Added reference to PerformanceServerTiming.cpp and JSPerformanceServerTiming.cpp.
1313 * Source/WebCore/WebCore.xcodeproj/project.pbxproj: Added references to PerformanceServerTiming.cpp, PerformanceServerTiming.h, and PerformanceServerTiming.idl.
1314 * Source/WebCore/bindings/js/WebCoreBuiltinNames.h: Added PerformanceServerTiming.
1315 * Source/WebCore/page/PerformanceResourceTiming.h: Added serverTiming member.
1316 * Source/WebCore/page/PerformanceResourceTiming.idl: Added serverTiming attribute.
1317 * Source/WebCore/page/PerformanceServerTiming.cpp: Added.
1318 * Source/WebCore/page/PerformanceServerTiming.h: Added.
1319 * Source/WebCore/page/PerformanceServerTiming.idl: Added.
1321 2018-05-11 Brady Eidson <beidson@apple.com>
1323 Make sure history navigations reuse the existing process when necessary.
1324 <rdar://problem/39746516> and https://bugs.webkit.org/show_bug.cgi?id=185532
1326 Reviewed by Ryosuke Niwa.
1328 Covered by new API tests.
1330 In WebCore-land, make sure *all* NavigationActions to a back/forward item are tagged with
1331 the item identifier.
1333 * history/HistoryItem.cpp:
1334 (WebCore::HistoryItem::HistoryItem):
1335 (WebCore::HistoryItem::logString const):
1336 * history/HistoryItem.h:
1338 * loader/FrameLoader.cpp:
1339 (WebCore::FrameLoader::loadDifferentDocumentItem):
1341 * loader/NavigationAction.cpp:
1342 (WebCore::NavigationAction::setTargetBackForwardItem):
1344 * loader/NavigationAction.h:
1345 (WebCore::NavigationAction::targetBackForwardItemIdentifier const):
1347 2018-05-11 Yacine Bandou <yacine.bandou_ext@softathome.com>
1349 [EME][GStreamer] Handle the protection event in MediaPlayerPrivate
1350 https://bugs.webkit.org/show_bug.cgi?id=185535
1352 Reviewed by Xabier Rodriguez-Calvar.
1354 This patch is based on this calvaris's commit
1355 https://github.com/WebPlatformForEmbedded/WPEWebKit/commit/d966168b0d2b65f9ca9415426e26d3752c78b03e
1357 It adds a handler for the protection event in MediaPalyerPrivateGStreamerBase, it extracts the InitData from the event
1358 and sends the encrypted event to JS via HTMLMediaElement.
1359 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1360 (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
1361 (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
1362 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1363 * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: Add a new type InitData.
1365 2018-05-11 Basuke Suzuki <Basuke.Suzuki@sony.com>
1367 [Curl] Make the cipher suites, the signing algorithms and the curve lists configurable.
1368 https://bugs.webkit.org/show_bug.cgi?id=185139
1370 Add interface to configure the cipher suites, the signing algorithms and the curve lists
1371 used by OpenSSL and libcurl to exchange, to sign or to verify keys.
1373 Reviewed by Youenn Fablet.
1375 No new tests in public. Have tested internally.
1377 * platform/network/curl/CurlContext.cpp:
1378 (WebCore::CurlHandle::setSslCipherList):
1379 * platform/network/curl/CurlContext.h:
1380 * platform/network/curl/CurlRequest.cpp:
1381 (WebCore::CurlRequest::setupTransfer):
1382 (WebCore::CurlRequest::willSetupSslCtx):
1383 * platform/network/curl/CurlSSLHandle.cpp:
1384 (WebCore::CurlSSLHandle::getCACertPathEnv):
1385 * platform/network/curl/CurlSSLHandle.h:
1386 (WebCore::CurlSSLHandle::getCipherList const):
1387 (WebCore::CurlSSLHandle::getSignatureAlgorithmsList const):
1388 (WebCore::CurlSSLHandle::getCurvesList const):
1389 (WebCore::CurlSSLHandle::setCipherList):
1390 (WebCore::CurlSSLHandle::setSignatureAlgorithmsList):
1391 (WebCore::CurlSSLHandle::setCurvesList):
1392 (WebCore::CurlSSLHandle::getCACertPath const):
1393 (WebCore::CurlSSLHandle::setCACertPath):
1394 * platform/network/curl/CurlSSLVerifier.cpp:
1395 (WebCore::CurlSSLVerifier::CurlSSLVerifier):
1397 2018-05-10 Daniel Bates <dabates@apple.com>
1399 Use PlatformStrategies to switch between WebKit and WebKitLegacy checking of CSP frame-ancestors and X-Frame-Options
1400 https://bugs.webkit.org/show_bug.cgi?id=185412
1402 Reviewed by Ryosuke Niwa.
1404 Consolidate the knowledge on how to determine whether security checks were performed on a ResourceResponse
1405 into LoaderStrategy::havePerformedSecurityChecks() (default implementation returns false) and query it
1406 to determine whether CSP frame-ancestors and X-Frame-Options need to be checked for a ResourceResponse.
1408 Additionally, rename LoaderStrategy::isDoingLoadingSecurityChecks() to shouldPerformSecurityChecks()
1409 for consistency with havePerformedSecurityChecks(). Querying shouldPerformSecurityChecks() answers the
1410 question of whether the loader strategy is responsible for performing security checks when building up
1411 a ResourceRequest to have the loader strategy load. And LoaderStrategy::havePerformedSecurityChecks()
1412 is used to determine whether the loader strategy performed these security checks for a given ResourceResponse.
1414 * inspector/agents/InspectorNetworkAgent.cpp:
1415 (WebCore::InspectorNetworkAgent::didReceiveResponse):
1416 (WebCore::InspectorNetworkAgent::didFinishLoading):
1417 (WebCore::isResponseProbablyComingFromNetworkProcess): Deleted.
1418 * loader/DocumentLoader.cpp:
1419 (WebCore::DocumentLoader::responseReceived):
1420 * loader/DocumentThreadableLoader.cpp:
1421 (WebCore::shouldPerformSecurityChecks):
1422 (WebCore::DocumentThreadableLoader::shouldSetHTTPHeadersToKeep const):
1423 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
1424 (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
1425 (WebCore::DocumentThreadableLoader::redirectReceived):
1426 (WebCore::DocumentThreadableLoader::didFail):
1427 (WebCore::DocumentThreadableLoader::loadRequest):
1428 (WebCore::isDoingSecurityChecksInNetworkProcess): Deleted.
1429 (WebCore::isResponseComingFromNetworkProcess): Deleted.
1430 * loader/LoaderStrategy.cpp:
1431 * loader/LoaderStrategy.h:
1432 * page/Settings.yaml: Remove setting networkProcessCSPFrameAncestorsCheckingEnabled as we now make
1433 use of the loader strategy to determine whether to perform CSP frame-ancestors and X-Frame-Options
1434 checking in DocumentLoader.
1435 * platform/network/ResourceResponseBase.h:
1436 (WebCore::ResourceResponseBase::setSource): Added an ASSERT to catch the programming error of setting
1437 source to ResourceResponse::Source::Unknown. This source type represents an uninitialized ResourceResponse.
1439 2018-05-10 Tim Horton <timothy_horton@apple.com>
1441 Lookup sometimes shows a second yellow highlight on top of WebKit's TextIndicator
1442 https://bugs.webkit.org/show_bug.cgi?id=185538
1443 <rdar://problem/38817825>
1445 Reviewed by Sam Weinig.
1447 * editing/mac/DictionaryLookup.mm:
1448 (WebCore::showPopupOrCreateAnimationController):
1449 Options can be nil, in which case we can't mutableCopy it and add
1450 LUTermOptionDisableSearchTermIndicator. Instead, create a new dictionary,
1451 and add the items from options, if it's not nil.
1453 2018-05-10 Matt Baker <mattbaker@apple.com>
1455 Web Inspector: ASSERT_NOT_REACHED in PageDebuggerAgent::didAddEventListener when page adds attribute event listener
1456 https://bugs.webkit.org/show_bug.cgi?id=181580
1457 <rdar://problem/36461309>
1459 Reviewed by Brian Burg.
1461 EventTarget should pass newly added EventListeners to InspectorInstrumentation,
1462 instead of PageDebuggerAgent assuming the last item in the EventListenerVector
1463 is the most recently added listener. This assumption does not hold when
1464 the new listener replaces an existing listener.
1466 * dom/EventTarget.cpp:
1467 (WebCore::EventTarget::addEventListener):
1468 (WebCore::EventTarget::setAttributeEventListener):
1470 * inspector/InspectorInstrumentation.cpp:
1471 (WebCore::InspectorInstrumentation::didAddEventListenerImpl):
1473 * inspector/InspectorInstrumentation.h:
1474 (WebCore::InspectorInstrumentation::didAddEventListener):
1476 * inspector/agents/page/PageDebuggerAgent.cpp:
1477 (WebCore::PageDebuggerAgent::didAddEventListener):
1478 * inspector/agents/page/PageDebuggerAgent.h:
1480 2018-05-10 Chris Dumez <cdumez@apple.com>
1482 'Cross-Origin-Options header implementation follow-up
1483 https://bugs.webkit.org/show_bug.cgi?id=185520
1485 Reviewed by Ryosuke Niwa.
1489 * loader/FrameLoader.cpp:
1490 (WebCore::FrameLoader::didBeginDocument):
1491 Using isNull() check is sufficient here as the header parsing
1492 function will do the right thing when passed the empty string.
1493 Also set the options directly on the window instead of the
1494 document. The window is guaranteed to have been constructed
1495 by then because didBeginDocument() is called DocumentWriter::begin()
1496 which calls Document::createDOMWindow() or Document::takeDOMWindowFrom().
1498 * page/AbstractDOMWindow.cpp:
1499 (WebCore::AbstractDOMWindow::AbstractDOMWindow):
1500 * page/AbstractDOMWindow.h:
1501 * page/DOMWindow.cpp:
1502 (WebCore::DOMWindow::DOMWindow):
1503 (WebCore::DOMWindow::didSecureTransitionTo):
1504 * page/RemoteDOMWindow.cpp:
1505 (WebCore::RemoteDOMWindow::RemoteDOMWindow):
1506 * page/RemoteDOMWindow.h:
1507 CrossOriginOptions are now stored only on the Window, not the Document.
1509 * platform/network/HTTPParsers.cpp:
1510 (WebCore::parseCrossOriginOptionsHeader):
1511 Drop strippedHeader local variable as it is not strictly needed.
1513 2018-05-10 Tim Horton <timothy_horton@apple.com>
1515 Fix the build after r231393
1516 https://bugs.webkit.org/show_bug.cgi?id=185519
1517 <rdar://problem/40131741>
1519 Reviewed by Simon Fraser.
1521 * Configurations/WebCore.xcconfig:
1523 2018-05-10 Eric Carlson <eric.carlson@apple.com>
1525 Log missing cues correctly
1526 https://bugs.webkit.org/show_bug.cgi?id=185499
1527 <rdar://problem/40113821>
1529 Reviewed by Daniel Bates.
1531 No new tests, tested manually.
1533 * html/track/InbandGenericTextTrack.cpp:
1534 (WebCore::InbandGenericTextTrack::removeGenericCue): Log the cue we searched for, not
1537 2018-05-10 Zalan Bujtas <zalan@apple.com>
1539 [LFC] Implement height computation for non-replaced inflow elements.
1540 https://bugs.webkit.org/show_bug.cgi?id=185474
1542 Reviewed by Antti Koivisto.
1544 Initial implementation. Does not cover all the cases.
1546 * layout/FormattingContext.cpp:
1547 (WebCore::Layout::FormattingContext::computeHeight const):
1548 * layout/FormattingContext.h:
1549 * layout/blockformatting/BlockFormattingContext.cpp:
1550 (WebCore::Layout::BlockFormattingContext::layout const):
1551 (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
1552 (WebCore::Layout::BlockFormattingContext::computeInFlowNonReplacedHeight const):
1553 * layout/blockformatting/BlockFormattingContext.h:
1554 * layout/blockformatting/BlockMarginCollapse.cpp:
1555 (WebCore::Layout::collapsedMarginBottomFromLastChild):
1556 (WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithParent):
1557 (WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithParentMarginBottom):
1558 (WebCore::Layout::isMarginBottomCollapsedWithParent): Deleted.
1559 * layout/blockformatting/BlockMarginCollapse.h:
1560 * layout/inlineformatting/InlineFormattingContext.cpp:
1561 (WebCore::Layout::InlineFormattingContext::computeInFlowHeight const):
1562 * layout/inlineformatting/InlineFormattingContext.h:
1563 * layout/layouttree/LayoutBox.cpp:
1564 (WebCore::Layout::Box::isReplaced const):
1565 * layout/layouttree/LayoutBox.h:
1567 2018-05-10 Thibault Saunier <tsaunier@igalia.com>
1569 [GTK] Implement ImageBuffer::toBGRAData
1570 https://bugs.webkit.org/show_bug.cgi?id=185511
1572 Reviewed by Michael Catanzaro.
1574 This was never implemented but will be required for the MediaStream API
1577 * platform/graphics/ImageBuffer.cpp:
1578 (WebCore::ImageBuffer::toBGRAData const):
1579 * platform/graphics/cg/ImageBufferCG.cpp:
1580 (WebCore::ImageBuffer::toBGRAData const):
1581 * platform/graphics/gtk/ImageBufferGtk.cpp:
1582 (WebCore::ImageBuffer::toBGRAData const):
1584 2018-05-10 Yacine Bandou <yacine.bandou_ext@softathome.com>
1586 [EME][GStreamer] Add a handler for GStreamer protection event
1587 https://bugs.webkit.org/show_bug.cgi?id=185245
1589 Reviewed by Xabier Rodriguez-Calvar.
1591 Qtdemux sends the protection event when encountered a new PSSH box (encrypted content).
1593 The Decryptor is moved from AppendPipeline to PlaybackPipeline (see https://bugs.webkit.org/show_bug.cgi?id=181855),
1594 thus the protection event is no longer handled because the Decryptor is not in the same pipeline as qtdemux.
1596 AppendPipeline: httpsrc-->qtdemux-->appsink
1597 PlaybackPipeline: appsrc-->parser--> decryptor-->decoder-->sink
1599 This patch attaches a probe to the sink pad of the appsink in the appendPipeline in order to
1600 catch and manage the protection event.
1602 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1603 (WebCore::AppendPipeline::AppendPipeline):
1604 (WebCore::AppendPipeline::~AppendPipeline):
1605 (WebCore::appendPipelineAppsinkPadEventProbe):
1606 * platform/graphics/gstreamer/mse/AppendPipeline.h:
1607 (WebCore::AppendPipeline::playerPrivate):
1609 2018-05-10 Yacine Bandou <yacine.bandou_ext@softathome.com>
1611 [EME][GStreamer] Move the decryptor from AppendPipeline to PlaybackPipeline.
1612 https://bugs.webkit.org/show_bug.cgi?id=181855
1614 Reviewed by Xabier Rodriguez-Calvar.
1616 The goal of this move is to handle the limitation of SVP (Secure Video Path) memory size.
1618 When the decryptor is in the AppendPipeline and we use SVP, we buffer in MediaSource queue
1619 the decrypted GstBuffers that are in SVP memory.
1620 This behavior cause an out-of-memory error, because we are limited in SVP memory size.
1622 By moving the decryptor in PlaybackPipeline, we avoid to buffer the decrypted GstBuffers
1623 which use the SVP memory and we buffer the encrypted GstBuffers that are in system memory.
1625 This new architecture also allows to start the buffering before obtaining the DRM license
1626 and it makes easier to manage dynamic change of the license or Key.
1628 The decryptor is auto plugged by GStreamer playbin in PlaybackPipeline.
1630 SVP: Secure Video Path also named trusted or protected video path, it is a memory which is
1631 protected by a hardware access control engine, it is not accessible to other unauthorised
1632 software or hardware components.
1635 media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html
1636 media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse.html
1638 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
1639 (webkitMediaCommonEncryptionDecryptSinkEventHandler):
1640 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1641 (WebCore::dumpAppendState):
1642 (WebCore::AppendPipeline::AppendPipeline):
1643 (WebCore::AppendPipeline::handleNeedContextSyncMessage):
1644 (WebCore::AppendPipeline::handleAppsrcNeedDataReceived):
1645 (WebCore::AppendPipeline::setAppendState):
1646 (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
1647 (WebCore::AppendPipeline::appsinkNewSample):
1648 (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
1649 (WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
1650 (WebCore::appendPipelineElementMessageCallback): Deleted.
1651 (WebCore::AppendPipeline::handleElementMessage): Deleted.
1652 (WebCore::AppendPipeline::dispatchPendingDecryptionStructure): Deleted.
1653 (WebCore::AppendPipeline::dispatchDecryptionStructure): Deleted.
1654 * platform/graphics/gstreamer/mse/AppendPipeline.h:
1655 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1656 (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithInstance):
1657 * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
1659 2018-05-09 Nan Wang <n_wang@apple.com>
1661 AX: VoiceOver iframe scrolling focus jumping bug
1662 https://bugs.webkit.org/show_bug.cgi?id=176615
1663 <rdar://problem/34333067>
1665 Reviewed by Chris Fleizach.
1667 Scrolling to make elements visible is not working correctly for elements inside an
1668 offscreen iframe. Fixed it by using RenderLayer::scrollRectToVisible() to handle
1669 scrolling more properly.
1671 Test: accessibility/scroll-to-make-visible-iframe-offscreen.html
1673 * accessibility/AccessibilityObject.cpp:
1674 (WebCore::AccessibilityObject::scrollToMakeVisible const):
1676 2018-05-09 Joanmarie Diggs <jdiggs@igalia.com>
1678 AX: accessibleNameForNode should simplify whitespace when using innerText
1679 https://bugs.webkit.org/show_bug.cgi?id=185498
1681 Reviewed by Chris Fleizach.
1683 Test: accessibility/text-alternative-calculation-from-unrendered-table.html
1685 Call simplifyWhiteSpace() before returning the innerText value.
1687 * accessibility/AccessibilityNodeObject.cpp:
1688 (WebCore::accessibleNameForNode):
1690 2018-05-09 Chris Dumez <cdumez@apple.com>
1692 Add initial support for 'Cross-Origin-Options' HTTP response header
1693 https://bugs.webkit.org/show_bug.cgi?id=184996
1694 <rdar://problem/39664620>
1696 Reviewed by Geoff Garen.
1698 Add initial support for 'Cross-Origin-Options' HTTP response header behind an experimental
1699 feature flag, on by default. When the HTTP server services this HTTP response header for a
1700 main resource, we'll set these options on the corresponding Document. This will impact the
1701 behavior of the Document's associated Window API when cross-origin.
1703 The HTTP header has 3 possible values:
1704 - allow: This is the default. Regular cross-origin Window API is available.
1705 - allow-postmessage: Only postMessage() is available on a cross-origin window, trying to
1706 access anything else will throw a SecurityError.
1707 - deny: Trying to do anything with a cross-origin window will throw a SecurityError.
1709 The header has no effect when accessing same origin windows.
1711 Note that on cross-origin access from Window A to Window B, we check the cross-origin
1712 options for both Window A and Window B and use the lowest common denominator as effective
1713 cross-origin options for the access. So if Window A has 'Cross-Origin-Options: deny' and
1714 tries to call postMessage() on Window B which has 'Cross-Origin-Options: allow-postmessage',
1715 we will throw a SecurityError. This is because Window A's more restrictive options (deny)
1718 Tests: http/wpt/cross-origin-options/allow-postmessage-from-deny.html
1719 http/wpt/cross-origin-options/allow-postmessage.html
1720 http/wpt/cross-origin-options/cross-origin-options-header.html
1722 * bindings/js/JSDOMBindingSecurity.cpp:
1723 (WebCore::BindingSecurity::shouldAllowAccessToDOMWindowGivenMinimumCrossOriginOptions):
1724 * bindings/js/JSDOMBindingSecurity.h:
1725 * bindings/js/JSDOMWindowCustom.cpp:
1726 (WebCore::effectiveCrossOriginOptionsForAccess):
1727 (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
1728 (WebCore::JSDOMWindow::getOwnPropertySlot):
1729 (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1730 (WebCore::addCrossOriginWindowPropertyNames):
1731 (WebCore::addScopedChildrenIndexes):
1732 (WebCore::addCrossOriginWindowOwnPropertyNames):
1733 (WebCore::JSDOMWindow::getOwnPropertyNames):
1734 * bindings/js/JSDOMWindowCustom.h:
1735 * bindings/js/JSRemoteDOMWindowCustom.cpp:
1736 (WebCore::JSRemoteDOMWindow::getOwnPropertySlot):
1737 (WebCore::JSRemoteDOMWindow::getOwnPropertySlotByIndex):
1738 (WebCore::JSRemoteDOMWindow::getOwnPropertyNames):
1739 * bindings/scripts/CodeGeneratorJS.pm:
1740 (GenerateAttributeGetterBodyDefinition):
1741 (GetCrossOriginsOptionsFromExtendedAttributeValue):
1742 (GenerateAttributeSetterBodyDefinition):
1743 (GenerateOperationBodyDefinition):
1744 * bindings/scripts/IDLAttributes.json:
1746 (WebCore::Document::setCrossOriginOptions):
1748 (WebCore::Document::crossOriginOptions const):
1749 * loader/FrameLoader.cpp:
1750 (WebCore::FrameLoader::didBeginDocument):
1751 * page/AbstractDOMWindow.cpp:
1752 (WebCore::AbstractDOMWindow::AbstractDOMWindow):
1753 * page/AbstractDOMWindow.h:
1754 (WebCore::AbstractDOMWindow::crossOriginOptions):
1755 (WebCore::AbstractDOMWindow::setCrossOriginOptions):
1756 * page/DOMWindow.cpp:
1757 (WebCore::DOMWindow::DOMWindow):
1758 (WebCore::DOMWindow::didSecureTransitionTo):
1759 * page/DOMWindow.idl:
1761 * page/RemoteDOMWindow.cpp:
1762 (WebCore::RemoteDOMWindow::RemoteDOMWindow):
1763 * page/RemoteDOMWindow.h:
1764 * page/Settings.yaml:
1765 * platform/network/HTTPHeaderNames.in:
1766 * platform/network/HTTPParsers.cpp:
1767 (WebCore::parseCrossOriginOptionsHeader):
1768 * platform/network/HTTPParsers.h:
1770 2018-05-09 Ryosuke Niwa <rniwa@webkit.org>
1772 Release assert in TreeScopeOrderedMap::remove via HTMLImageElement::removedFromAncestor
1773 https://bugs.webkit.org/show_bug.cgi?id=185493
1775 Reviewed by Brent Fulgham.
1777 Fixed the bug that HTMLImageElement::removedFromAncestor and HTMLMapElement::removedFromAncestor
1778 were calling removeImageElementByUsemap on the document instead of the shadow tree from which it was removed.
1780 Test: fast/images/imagemap-in-shadow-tree-removed.html
1782 * html/HTMLImageElement.cpp:
1783 (WebCore::HTMLImageElement::removedFromAncestor):
1784 * html/HTMLMapElement.cpp:
1785 (WebCore::HTMLMapElement::removedFromAncestor):
1787 2018-05-09 Joanmarie Diggs <jdiggs@igalia.com>
1789 AX: Hidden nodes which are not directly referenced should not participate name/description from content
1790 https://bugs.webkit.org/show_bug.cgi?id=185478
1792 Reviewed by Chris Fleizach.
1794 Add a check to AccessibilityNodeObject::textUnderElement() and return early
1795 if the node is hidden, not referenced by aria-labelledby or aria-describedby,
1796 not an HTMLLabelElement, and not fallback content for an HTMLCanvasElement.
1798 Test: accessibility/text-alternative-calculation-hidden-nodes.html
1800 * accessibility/AccessibilityNodeObject.cpp:
1801 (WebCore::AccessibilityNodeObject::textUnderElement const):
1803 2018-05-09 Eric Carlson <eric.carlson@apple.com>
1805 Update MediaSession to use release logging
1806 https://bugs.webkit.org/show_bug.cgi?id=185376
1807 <rdar://problem/40022203>
1809 Reviewed by Youenn Fablet.
1811 No new tests, tested manually.
1813 * Modules/mediastream/MediaStream.h: hostingDocument() doesn't need to return a const Document.
1814 * Modules/webaudio/AudioContext.cpp:
1815 (WebCore::AudioContext::hostingDocument const): Ditto.
1816 * Modules/webaudio/AudioContext.h:
1818 * html/HTMLMediaElement.h: Ditto.
1820 * html/MediaElementSession.cpp:
1821 (WebCore::MediaElementSession::MediaElementSession):
1822 (WebCore::MediaElementSession::addBehaviorRestriction):
1823 (WebCore::MediaElementSession::removeBehaviorRestriction):
1824 (WebCore::MediaElementSession::dataLoadingPermitted const):
1825 (WebCore::MediaElementSession::fullscreenPermitted const):
1826 (WebCore::MediaElementSession::pageAllowsDataLoading const):
1827 (WebCore::MediaElementSession::pageAllowsPlaybackAfterResuming const):
1828 (WebCore::MediaElementSession::canShowControlsManager const):
1829 (WebCore::MediaElementSession::showPlaybackTargetPicker):
1830 (WebCore::MediaElementSession::hasWirelessPlaybackTargets const):
1831 (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled const):
1832 (WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
1833 (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
1834 (WebCore::MediaElementSession::externalOutputDeviceAvailableDidChange):
1835 (WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):
1836 (WebCore::MediaElementSession::mediaEngineUpdated):
1837 (WebCore::MediaElementSession::willLog const): Deleted.
1838 (WebCore::MediaElementSession::logger const): Deleted.
1839 (WebCore::MediaElementSession::logIdentifier const): Deleted.
1840 (WebCore::MediaElementSession::logChannel const): Deleted.
1841 * html/MediaElementSession.h:
1843 * platform/audio/PlatformMediaSession.cpp:
1844 (WebCore::nextLogIdentifier):
1845 (WebCore::convertEnumerationToString):
1846 (WebCore::PlatformMediaSession::PlatformMediaSession):
1847 (WebCore::PlatformMediaSession::setState):
1848 (WebCore::PlatformMediaSession::beginInterruption):
1849 (WebCore::PlatformMediaSession::endInterruption):
1850 (WebCore::PlatformMediaSession::clientWillBeginAutoplaying):
1851 (WebCore::PlatformMediaSession::clientWillPausePlayback):
1852 (WebCore::PlatformMediaSession::pauseSession):
1853 (WebCore::PlatformMediaSession::stopSession):
1854 (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
1855 (WebCore::PlatformMediaSession::logChannel const):
1856 (WebCore::stateName): Deleted.
1857 (WebCore::interruptionName): Deleted.
1858 * platform/audio/PlatformMediaSession.h:
1859 (WTF::LogArgument<WebCore::PlatformMediaSession::State>::toString):
1860 (WTF::LogArgument<WebCore::PlatformMediaSession::InterruptionType>::toString):
1862 2018-05-09 Thibault Saunier <tsaunier@igalia.com>
1864 [GStreamer] Never call updateTracks if running on legacy pipeline
1865 https://bugs.webkit.org/show_bug.cgi?id=184581
1867 This makes sure failling code path is never reached in the conditions where it should not have been reached.
1869 Reviewed by Philippe Normand.
1871 Re enables all tests that were disabled after fixing.
1873 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1874 (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1876 2018-05-09 Daniel Bates <dabates@apple.com>
1878 REGRESSION (r231479): http/tests/appcache/x-frame-options-prevents-framing.php is timing out
1879 https://bugs.webkit.org/show_bug.cgi?id=185443
1880 <rdar://problem/40100660>
1882 Reviewed by Andy Estes.
1884 Following r231479 when using WebKit2 and Restricted HTTP Response Access is enabled (enabled in
1885 WebKitTestRunner) we only check the CSP frame-ancestors directive and X-Frame-Options in
1886 NetworkProcess. We need to check these security requirements in WebContent process whenever
1887 we are performing a substitute data load, such as for app cache, as these loads do not go
1888 through NetworkProcess.
1890 * loader/DocumentLoader.cpp:
1891 (WebCore::DocumentLoader::responseReceived):
1893 2018-05-09 Justin Fan <justin_fan@apple.com>
1895 Hooked up ASTC support in WebGL; requires OpenGL ES 3 context to work.
1896 https://bugs.webkit.org/show_bug.cgi?id=185272
1897 <rdar://problem/15745737>
1899 Reviewed by Dean Jackson.
1901 Also added in Khronos' ASTC test from version 1.0.4 beta of their conformance test suite,
1902 although again, this requires OpenGL ES 3 context for WebKit to detect proper support.
1904 Test: fast/canvas/webgl/webgl-compressed-texture-astc.html
1906 * DerivedSources.make:
1908 * WebCore.xcodeproj/project.pbxproj:
1909 * bindings/js/JSDOMConvertWebGL.cpp:
1910 (WebCore::convertToJSValue):
1911 * html/canvas/WebGL2RenderingContext.cpp:
1912 (WebCore::WebGL2RenderingContext::getExtension):
1913 (WebCore::WebGL2RenderingContext::getSupportedExtensions):
1914 * html/canvas/WebGLCompressedTextureASTC.cpp: Added.
1915 (WebCore::WebGLCompressedTextureASTC::WebGLCompressedTextureASTC):
1916 (WebCore::WebGLCompressedTextureASTC::getName const):
1917 (WebCore::WebGLCompressedTextureASTC::supported):
1918 (WebCore::WebGLCompressedTextureASTC::getSupportedProfiles):
1919 * html/canvas/WebGLCompressedTextureASTC.h: Added.
1920 * html/canvas/WebGLCompressedTextureASTC.idl: Added.
1921 * html/canvas/WebGLExtension.h:
1922 * html/canvas/WebGLRenderingContext.cpp:
1923 (WebCore::WebGLRenderingContext::getExtension):
1924 (WebCore::WebGLRenderingContext::getSupportedExtensions):
1925 * html/canvas/WebGLRenderingContextBase.cpp:
1926 (WebCore::WebGLRenderingContextBase::validateCompressedTexFuncData):
1927 (WebCore::WebGLRenderingContextBase::validateCompressedTexDimensions):
1928 * html/canvas/WebGLRenderingContextBase.h:
1929 * platform/graphics/Extensions3D.h:
1931 2018-05-09 Youenn Fablet <youenn@apple.com>
1933 Allow WebResourceLoader to cancel a load served from a service worker
1934 https://bugs.webkit.org/show_bug.cgi?id=185274
1936 Reviewed by Chris Dumez.
1938 Add support for cancelling a fetch from WebProcess to service worker process.
1939 Use FetchIdentifier instead of uint64_t.
1941 * Modules/fetch/FetchIdentifier.h: Added.
1942 * WebCore.xcodeproj/project.pbxproj:
1943 * workers/service/context/ServiceWorkerFetch.h:
1944 * workers/service/context/ServiceWorkerThreadProxy.cpp:
1945 (WebCore::ServiceWorkerThreadProxy::startFetch):
1946 (WebCore::ServiceWorkerThreadProxy::cancelFetch):
1947 * workers/service/context/ServiceWorkerThreadProxy.h:
1949 2018-05-09 Thibault Saunier <tsaunier@igalia.com>
1951 [GStreamer] Fix style issue in MediaPlayerPrivateGStreamer
1952 https://bugs.webkit.org/show_bug.cgi?id=185479
1954 Reviewed by Philippe Normand.
1956 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:114: Multi line control clauses should use braces. [whitespace/braces] [4]
1957 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:194: Multi line control clauses should use braces. [whitespace/braces] [4]
1958 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:398: One line control clauses should not use braces. [whitespace/braces] [4]
1959 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:440: One line control clauses should not use braces. [whitespace/braces] [4]
1960 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:806: More than one command on the same line [whitespace/newline] [4]
1961 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:869: More than one command on the same line [whitespace/newline] [4]
1962 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:880: More than one command on the same line [whitespace/newline] [4]
1963 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:940: More than one command on the same line [whitespace/newline] [4]
1964 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1102: Multi line control clauses should use braces. [whitespace/braces] [4]
1965 ERROR: Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1109: Multi line control clauses should use braces. [whitespace/braces] [4]
1967 Indentation and style issue fixed only.
1969 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1970 (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
1971 (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1972 (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
1973 (WebCore::MediaPlayerPrivateGStreamer::play):
1974 (WebCore::MediaPlayerPrivateGStreamer::videoChangedCallback):
1975 (WebCore::MediaPlayerPrivateGStreamer::videoSinkCapsChangedCallback):
1976 (WebCore::MediaPlayerPrivateGStreamer::audioChangedCallback):
1977 (WebCore::MediaPlayerPrivateGStreamer::textChangedCallback):
1978 (WebCore::MediaPlayerPrivateGStreamer::buffered const):
1979 (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
1981 2018-05-09 Daniel Bates <dabates@apple.com>
1983 REGRESSION (r231479): com.apple.WebCore crash in WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied()
1984 https://bugs.webkit.org/show_bug.cgi?id=185475
1985 <rdar://problem/40093853>
1987 Reviewed by Andy Estes.
1989 DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() must extends its lifetime
1990 until completion as dispatching a DOM load event at the associated frame can cause JavaScript execution
1991 that can do anything, including destroying the loader that dispatched the event.
1993 Following r231479 DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() is now
1994 invoked by both DocumentLoader::responseReceived() and WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied().
1995 The latter only can happen when using WebKit2 and the experimental feature Restricted HTTP Response Access
1996 is enabled (RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess()). Unlike DocumentLoader::responseReceived()
1997 WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() does not take out a ref
1998 on the DocumentLoader before invoking DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied().
1999 Therefore, DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() can cause its
2000 own destruction as a result of dispatching a DOM load event at the frame. We should take out a ref on
2001 the DocumentLoader when executing DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied().
2003 * loader/DocumentLoader.cpp:
2004 (WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
2006 2018-05-09 Tim Horton <timothy_horton@apple.com>
2008 Fix the build by ignoring some deprecation warnings
2010 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2011 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
2013 2018-05-09 Michael Catanzaro <mcatanzaro@igalia.com>
2015 [WPE] Build cleanly with GCC 8 and ICU 60
2016 https://bugs.webkit.org/show_bug.cgi?id=185462
2018 Reviewed by Carlos Alberto Lopez Perez.
2020 * PlatformGTK.cmake: Include directories are in the wrong place.
2021 * accessibility/AXObjectCache.cpp: Silence -Wclass-memaccess problems and leave warnings.
2022 (WebCore::AXObjectCache::startOrEndTextMarkerDataForRange):
2023 (WebCore::AXObjectCache::textMarkerDataForCharacterOffset):
2024 (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
2025 (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
2026 * css/CSSFontFace.cpp: Silence -Wfallthrough
2027 (WebCore::CSSFontFace::fontLoadTiming const):
2028 * css/CSSSelectorList.cpp: Silence -Wclass-memaccess, this one is intentional.
2029 (WebCore::CSSSelectorList::adoptSelectorVector):
2030 * editing/TextIterator.cpp: Silence ICU deprecation warnings.
2031 * platform/Length.h:
2032 (WebCore::Length::operator=): More -Wclass-memaccess, looks benign.
2033 * platform/graphics/Gradient.cpp:
2034 (WebCore::Gradient::hash const): -Wclass-memaccess again. Leave a warning.
2035 * platform/graphics/SurrogatePairAwareTextIterator.cpp: Silence ICU deprecation warnings.
2036 * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2037 (WebCore::FontCascade::fontForCombiningCharacterSequence const): Silence ICU deprecation.
2038 * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
2039 (WebCore::FontCustomPlatformData::FontCustomPlatformData): Silence -Wcast-function-type.
2040 * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2041 (WebCore::Font::canRenderCombiningCharacterSequence const): Silence ICU deprecation.
2042 * platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp:
2043 (gstAllocatorFastMallocMemUnmap): Fix -Wcast-function-type.
2044 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2045 (WebCore::MediaPlayerPrivateGStreamer::updateTracks): Fix bad printf.
2046 (WebCore::MediaPlayerPrivateGStreamer::enableTrack): Another bad printf.
2047 (WebCore::findHLSQueue): Fix -Wcast-function-type.
2048 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
2049 (webKitMediaClearKeyDecryptorDecrypt): Fix another bad printf.
2050 * platform/network/soup/SocketStreamHandleImplSoup.cpp: Silence -Wcast-function-type.
2051 (WebCore::SocketStreamHandleImpl::beginWaitingForSocketWritability):
2052 * platform/text/TextEncoding.cpp: Silence ICU deprecration.
2054 2018-05-08 Simon Fraser <simon.fraser@apple.com>
2056 SVG lighting colors need to be converted into linearSRGB
2057 https://bugs.webkit.org/show_bug.cgi?id=181196
2059 Reviewed by Darin Adler.
2061 Address post-commit comments. Don't make a Color that contains linearRGB components,
2062 but use FloatComponents instead. Since these FloatComponents are in the 0-1 range,
2063 FELighting::setPixelInternal() needs to multiply by 255 since the output pixels are
2066 Change linearToSRGBColorComponent() and sRGBToLinearColorComponent() to do math in
2067 floats without promoting to doubles.
2069 * platform/graphics/ColorUtilities.cpp:
2070 (WebCore::FloatComponents::FloatComponents):
2071 (WebCore::linearToSRGBColorComponent):
2072 (WebCore::sRGBToLinearColorComponent):
2073 (WebCore::sRGBColorToLinearComponents):
2074 (WebCore::linearToSRGBColor): Deleted.
2075 (WebCore::sRGBToLinearColor): Deleted.
2076 * platform/graphics/ColorUtilities.h:
2077 * platform/graphics/filters/FELighting.cpp:
2078 (WebCore::FELighting::setPixelInternal):
2079 (WebCore::FELighting::drawLighting):
2081 2018-05-09 Timothy Hatcher <timothy@apple.com>
2083 Use StyleColor::Options in more places.
2085 https://bugs.webkit.org/show_bug.cgi?id=185458
2086 rdar://problem/39853798
2088 Add UseDefaultAppearance to StyleColor::Options, to avoid passing yet another
2089 boolean on some of these functions.
2091 Reviewed by Tim Horton.
2093 * css/MediaQueryEvaluator.cpp:
2096 (WebCore::Document::useDefaultAppearance const):
2097 (WebCore::Document::styleColorOptions const):
2099 * platform/Theme.cpp:
2100 (WebCore::Theme::paint):
2102 * platform/mac/LocalDefaultSystemAppearance.h:
2103 * platform/mac/LocalDefaultSystemAppearance.mm:
2104 (WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
2105 (WebCore::LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance):
2106 * platform/mac/ThemeMac.h:
2107 * platform/mac/ThemeMac.mm:
2108 (WebCore::paintToggleButton):
2109 (WebCore::paintButton):
2110 (WebCore::ThemeMac::ensuredView):
2111 (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
2112 (WebCore::ThemeMac::paint):
2113 (-[WebCoreThemeView initWithUseSystemAppearance:]): Deleted.
2114 * platform/wpe/ThemeWPE.cpp:
2115 (WebCore::ThemeWPE::paint):
2116 * platform/wpe/ThemeWPE.h:
2117 * rendering/RenderListBox.cpp:
2118 (WebCore::RenderListBox::paintItemBackground):
2119 * rendering/RenderTheme.cpp:
2120 (WebCore::RenderTheme::paint):
2121 (WebCore::RenderTheme::inactiveListBoxSelectionBackgroundColor const):
2122 (WebCore::RenderTheme::platformInactiveListBoxSelectionBackgroundColor const):
2123 * rendering/RenderTheme.h:
2124 * rendering/RenderThemeGtk.cpp:
2125 (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor const):
2126 * rendering/RenderThemeGtk.h:
2127 * rendering/RenderThemeMac.h:
2128 * rendering/RenderThemeMac.mm:
2129 (WebCore::RenderThemeMac::documentViewFor const):
2130 (WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const):
2131 (WebCore::RenderThemeMac::systemColor const):
2132 (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
2133 (WebCore::RenderThemeMac::paintSliderThumb):
2135 2018-05-09 Yacine Bandou <yacine.bandou_ext@softathome.com>
2137 [EME][GStreamer] Crash when the mediaKeys are created before loading the media in debug conf
2138 https://bugs.webkit.org/show_bug.cgi?id=185244
2140 Reviewed by Xabier Rodriguez-Calvar.
2142 The function "MediaPlayerPrivateGStreamerBase::cdmInstanceAttached" is expected to be called once,
2143 so there is an ASSERT(!m_cdmInstance).
2144 But when the MediaKeys are created before loading the media, the cdminstance is created and attached
2145 to the MediaPlayerPrivate via "MediaPlayerPrivateGStreamerBase::cdmInstanceAttached" before loading
2146 the media, then when the media is loading, the function "MediaPlayerPrivateGStreamerBase::cdmInstanceAttached"
2147 will be called several times via the function "mediaEngineWasUpdated" wich is called for each change
2148 in the MediaElement state, thus the WebProcess crashes in the ASSERT(!m_cdmInstance).
2150 This commit avoid the crash by replacing the assert with a simple check.
2152 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2153 (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached):
2154 (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceDetached):
2156 2018-05-09 Antti Koivisto <antti@apple.com>
2158 Add OptionSet::operator& and operator bool
2159 https://bugs.webkit.org/show_bug.cgi?id=185306
2161 Reviewed by Anders Carlsson.
2163 Use it in a few places.
2165 * loader/FrameLoader.cpp:
2166 (WebCore::FrameLoader::reload):
2167 * rendering/RenderLayerCompositor.cpp:
2168 (WebCore::RenderLayerCompositor::logReasonsForCompositing):
2169 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2171 2018-05-08 Dean Jackson <dino@apple.com>
2173 Disable system preview link fetching
2174 https://bugs.webkit.org/show_bug.cgi?id=185463
2176 Reviewed by Jon Lee.
2178 Temporarily disable system preview detection when a link
2181 * html/HTMLAnchorElement.cpp:
2182 (WebCore::HTMLAnchorElement::handleClick):
2184 2018-05-08 Wenson Hsieh <wenson_hsieh@apple.com>
2186 Unreviewed, fix the internal iOS build
2188 Add a missing import statement in an implementation file.
2190 * editing/cocoa/WebContentReaderCocoa.mm:
2192 2018-05-08 Ryan Haddad <ryanhaddad@apple.com>
2194 Unreviewed, rolling out r231486.
2196 Caused service worker LayoutTest failures on macOS Debug WK2.
2200 "Allow WebResourceLoader to cancel a load served from a
2202 https://bugs.webkit.org/show_bug.cgi?id=185274
2203 https://trac.webkit.org/changeset/231486
2205 2018-05-08 Wenson Hsieh <wenson_hsieh@apple.com>
2207 Consolidate WebContentReaderIOS and WebContentReaderMac into WebContentReaderCocoa
2208 https://bugs.webkit.org/show_bug.cgi?id=185340
2210 Reviewed by Tim Horton.
2212 WebContentReader::readURL is currently the only method implemented separately in iOS and macOS platform
2213 WebContentReader files. The implementation across macOS and iOS is nearly identical (with some exceptions with
2214 the way iOS handles file URLs and plain text editing), so we can merge these into a single method
2215 WebContentReaderCocoa and delete WebContentReaderIOS and WebContentReaderMac.
2217 This also has the added bonus of fixing a latent bug in WebContentReaderMac, wherein URLs written to the
2218 pasteboard using -[NSPasteboard writeObjects:] are currently pasted as empty anchor elements. In this case, the
2219 link title isn't made explicit, so the `title` passed in to WebContentReader::readURL is empty. On iOS, we have
2220 code to fall back to pasting the absolute string of the URL if the title is empty, but on macOS, we'll just use
2221 this empty string as the title of the anchor.
2223 Test: PasteMixedContent.PasteURLWrittenToPasteboardUsingWriteObjects
2226 * WebCore.xcodeproj/project.pbxproj:
2227 * editing/cocoa/WebContentReaderCocoa.mm:
2228 (WebCore::WebContentReader::readURL):
2229 * editing/ios/WebContentReaderIOS.mm: Removed.
2230 * editing/mac/WebContentReaderMac.mm: Removed.
2232 2018-05-08 Zalan Bujtas <zalan@apple.com>
2234 [Simple line layout] Cache run resolver.
2235 https://bugs.webkit.org/show_bug.cgi?id=185411
2237 Reviewed by Antti Koivisto.
2239 This patch caches the run resolver on the [SimpleLine]Layout object.
2240 In certain cases, when the block container has thousands of elements (foobar1<br>foobar2<br>.....foobar9999<br>),
2241 constructing the resolver (and its dependencies) in a repeating fashion could hang the WebProcess.
2243 Covered by existing tests.
2245 * rendering/SimpleLineLayout.cpp:
2246 (WebCore::SimpleLineLayout::create):
2247 (WebCore::SimpleLineLayout::Layout::create):
2248 (WebCore::SimpleLineLayout::Layout::Layout):
2249 * rendering/SimpleLineLayout.h:
2250 (WebCore::SimpleLineLayout::Layout::runResolver const):
2251 * rendering/SimpleLineLayoutFunctions.cpp:
2252 (WebCore::SimpleLineLayout::paintFlow):
2253 (WebCore::SimpleLineLayout::hitTestFlow):
2254 (WebCore::SimpleLineLayout::collectFlowOverflow):
2255 (WebCore::SimpleLineLayout::computeBoundingBox):
2256 (WebCore::SimpleLineLayout::computeFirstRunLocation):
2257 (WebCore::SimpleLineLayout::collectAbsoluteRects):
2258 (WebCore::SimpleLineLayout::collectAbsoluteQuads):
2259 (WebCore::SimpleLineLayout::textOffsetForPoint):
2260 (WebCore::SimpleLineLayout::collectAbsoluteQuadsForRange):
2261 (WebCore::SimpleLineLayout::generateLineBoxTree):
2262 * rendering/SimpleLineLayoutResolver.cpp:
2263 (WebCore::SimpleLineLayout::LineResolver::LineResolver):
2264 * rendering/SimpleLineLayoutResolver.h:
2265 (WebCore::SimpleLineLayout::lineResolver):
2267 2018-05-08 Brent Fulgham <bfulgham@apple.com>
2269 Switch some RELEASE_ASSERTS to plain debug ASSERTS in PlatformScreenMac.mm
2270 https://bugs.webkit.org/show_bug.cgi?id=185451
2271 <rdar://problem/39620348>
2273 Reviewed by Zalan Bujtas.
2275 Change a set of RELEASE_ASSERTS used to prevent accessing NSScreen related functions in the
2276 PlatformScreenMac implementation to less expensive Debug ASSERTS.
2278 No change in behavior.
2280 * platform/mac/PlatformScreenMac.mm:
2281 (WebCore::screenHasInvertedColors):
2282 (WebCore::screenDepth):
2283 (WebCore::screenDepthPerComponent):
2284 (WebCore::screenRectForDisplay):
2285 (WebCore::screenRect):
2286 (WebCore::screenAvailableRect):
2287 (WebCore::screenColorSpace):
2288 (WebCore::screenSupportsExtendedColor):
2290 2018-05-08 Daniel Bates <dabates@apple.com>
2292 Resign Strong Password appearance when text field value changes
2293 https://bugs.webkit.org/show_bug.cgi?id=185433
2294 <rdar://problem/39958508>
2296 Reviewed by Ryosuke Niwa.
2298 Remove the Strong Password decoration when the text field's value changes to avoid interfering
2299 with web sites that allow a person to clear the password field.
2301 Tests: fast/forms/auto-fill-button/auto-fill-strong-password-button-when-maxlength-changes.html
2302 fast/forms/auto-fill-button/auto-fill-strong-password-button-when-minlength-changes.html
2303 fast/forms/auto-fill-button/hide-auto-fill-strong-password-button-when-value-changes.html
2305 * html/HTMLInputElement.cpp:
2306 (WebCore::HTMLInputElement::resignStrongPasswordAppearance): Extracted from HTMLInputElement::updateType().
2307 (WebCore::HTMLInputElement::updateType): Extract out logic to resign the Strong Password appearance
2308 into a function that can be shared by this function and HTMLInputElement::setValue().
2309 (WebCore::HTMLInputElement::setValue): Resign the Strong Password appearance if this field was
2310 changed programmatically (i.e. no DOM change event was dispatched).
2311 * html/HTMLInputElement.h:
2313 2018-05-08 Jer Noble <jer.noble@apple.com>
2315 Unreviewed build fix; add missing function definition.
2317 * html/HTMLMediaElement.h:
2318 (WebCore::HTMLMediaElement::didPassCORSAccessCheck const):
2320 2018-05-08 Jer Noble <jer.noble@apple.com>
2322 Mute MediaElementSourceNode when tainted.
2323 https://bugs.webkit.org/show_bug.cgi?id=184866
2325 Reviewed by Eric Carlson.
2327 Test: http/tests/security/webaudio-render-remote-audio-blocked-no-crossorigin.html
2329 * Modules/webaudio/AudioContext.cpp:
2330 (WebCore::AudioContext::wouldTaintOrigin const):
2331 * Modules/webaudio/AudioContext.h:
2332 * Modules/webaudio/MediaElementAudioSourceNode.cpp:
2333 (WebCore::MediaElementAudioSourceNode::setFormat):
2334 (WebCore::MediaElementAudioSourceNode::wouldTaintOrigin):
2335 (WebCore::MediaElementAudioSourceNode::process):
2336 * Modules/webaudio/MediaElementAudioSourceNode.h:
2338 2018-05-08 Eric Carlson <eric.carlson@apple.com>
2340 Log rtcstats as JSON
2341 https://bugs.webkit.org/show_bug.cgi?id=185437
2342 <rdar://problem/40065332>
2344 Reviewed by Youenn Fablet.
2346 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2347 (WebCore::RTCStatsLogger::RTCStatsLogger): Create a wrapper class so we don't have to add a
2348 toJSONString method to libwebrtc.
2349 (WebCore::RTCStatsLogger::toJSONString const): Log stats as JSON.
2350 (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered): Don't use the LOGIDENTIFIER macro because
2351 it doesn't work well inside of a lambda.
2352 (WTF::LogArgument<WebCore::RTCStatsLogger>::toString): Move into .cpp file because it is only
2354 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
2355 (WTF::LogArgument<webrtc::RTCStats>::toString): Deleted. Move to .cpp file.
2357 2018-05-08 Dean Jackson <dino@apple.com>
2359 System Preview links should trigger a download
2360 https://bugs.webkit.org/show_bug.cgi?id=185439
2361 <rdar://problem/40065545>
2363 Reviewed by Jon Lee.
2365 Add a new field to FrameLoadRequest, which then is copied
2366 into ResourceRequest, identifying if the link clicked
2367 is a system preview.
2369 * html/HTMLAnchorElement.cpp:
2370 (WebCore::HTMLAnchorElement::handleClick): Look for isSystemPreviewLink().
2371 * loader/FrameLoadRequest.cpp:
2372 (WebCore::FrameLoadRequest::FrameLoadRequest):
2373 * loader/FrameLoadRequest.h: New property.
2374 (WebCore::FrameLoadRequest::FrameLoadRequest):
2375 (WebCore::FrameLoadRequest::isSystemPreview const):
2376 * loader/FrameLoader.cpp:
2377 (WebCore::FrameLoader::urlSelected):
2378 (WebCore::FrameLoader::loadURL):
2379 * loader/FrameLoader.h:
2380 * platform/network/ResourceRequestBase.cpp:
2381 (WebCore::ResourceRequestBase::isSystemPreview const):
2382 (WebCore::ResourceRequestBase::setSystemPreview):
2383 * platform/network/ResourceRequestBase.h:
2385 2018-05-08 Commit Queue <commit-queue@webkit.org>
2387 Unreviewed, rolling out r231491.
2388 https://bugs.webkit.org/show_bug.cgi?id=185434
2390 Setting the Created key on a cookie does not work yet, due a
2391 bug in CFNetwork (Requested by ggaren on #webkit).
2395 "[WKHTTPCookieStore getAllCookies] returns inconsistent
2397 https://bugs.webkit.org/show_bug.cgi?id=185041
2398 https://trac.webkit.org/changeset/231491
2400 2018-05-08 Sihui Liu <sihui_liu@apple.com>
2402 [WKHTTPCookieStore getAllCookies] returns inconsistent creation time
2403 https://bugs.webkit.org/show_bug.cgi?id=185041
2404 <rdar://problem/34684214>
2406 Reviewed by Geoffrey Garen.
2408 Set creationtime property when creating Cookie object to keep consistency after conversion.
2410 New API test: WebKit.WKHTTPCookieStoreCreationTime.
2412 * platform/network/cocoa/CookieCocoa.mm:
2413 (WebCore::Cookie::operator NSHTTPCookie * const):
2415 2018-05-08 Eric Carlson <eric.carlson@apple.com>
2417 Text track cue logging should include cue text
2418 https://bugs.webkit.org/show_bug.cgi?id=185353
2419 <rdar://problem/40003565>
2421 Reviewed by Brent Fulgham.
2423 No new tests, tested manually.
2425 * html/track/VTTCue.cpp:
2426 (WebCore::VTTCue::toJSON const):
2427 * platform/graphics/InbandTextTrackPrivateClient.h:
2428 (WebCore::GenericCueData::toJSONString const):
2429 * platform/graphics/iso/ISOVTTCue.cpp:
2430 (WebCore::ISOWebVTTCue::toJSONString const):
2432 2018-05-08 Sam Weinig <sam@webkit.org>
2434 More cleanup of XMLHttpRequestUpload
2435 https://bugs.webkit.org/show_bug.cgi?id=185409
2437 Reviewed by Alex Christensen.
2439 - Remove unneeded #includes
2440 - Rename m_xmlHttpRequest to m_request
2441 - Make some overloaded some methods private, and mark them as final rather
2444 * xml/XMLHttpRequestUpload.cpp:
2445 (WebCore::XMLHttpRequestUpload::XMLHttpRequestUpload):
2446 * xml/XMLHttpRequestUpload.h:
2448 2018-05-08 Zalan Bujtas <zalan@apple.com>
2450 [LFC] Start using BlockMarginCollapse
2451 https://bugs.webkit.org/show_bug.cgi?id=185424
2453 Reviewed by Antti Koivisto.
2455 BlockMarginCollapse could be all static.
2457 * layout/blockformatting/BlockFormattingContext.cpp:
2458 (WebCore::Layout::BlockFormattingContext::marginTop const):
2459 (WebCore::Layout::BlockFormattingContext::marginBottom const):
2460 * layout/blockformatting/BlockMarginCollapse.cpp:
2461 (WebCore::Layout::isMarginTopCollapsedWithSibling):
2462 (WebCore::Layout::isMarginBottomCollapsedWithSibling):
2463 (WebCore::Layout::isMarginTopCollapsedWithParent):
2464 (WebCore::Layout::isMarginBottomCollapsedWithParent):
2465 (WebCore::Layout::collapsedMarginTopFromFirstChild):
2466 (WebCore::Layout::collapsedMarginBottomFromLastChild):
2467 (WebCore::Layout::nonCollapsedMarginTop):
2468 (WebCore::Layout::nonCollapsedMarginBottom):
2469 (WebCore::Layout::BlockMarginCollapse::marginTop):
2470 (WebCore::Layout::BlockMarginCollapse::marginBottom):
2471 (WebCore::Layout::BlockMarginCollapse::BlockMarginCollapse): Deleted.
2472 (WebCore::Layout::BlockMarginCollapse::marginTop const): Deleted.
2473 (WebCore::Layout::BlockMarginCollapse::marginBottom const): Deleted.
2474 (WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithSibling const): Deleted.
2475 (WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithSibling const): Deleted.
2476 (WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithParent const): Deleted.
2477 (WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithParent const): Deleted.
2478 (WebCore::Layout::BlockMarginCollapse::nonCollapsedMarginTop const): Deleted.
2479 (WebCore::Layout::BlockMarginCollapse::nonCollapsedMarginBottom const): Deleted.
2480 (WebCore::Layout::BlockMarginCollapse::collapsedMarginTopFromFirstChild const): Deleted.
2481 (WebCore::Layout::BlockMarginCollapse::collapsedMarginBottomFromLastChild const): Deleted.
2482 (WebCore::Layout::BlockMarginCollapse::hasAdjoiningMarginTopAndBottom const): Deleted.
2483 * layout/blockformatting/BlockMarginCollapse.h:
2485 2018-05-08 Youenn Fablet <youenn@apple.com>
2487 Allow WebResourceLoader to cancel a load served from a service worker
2488 https://bugs.webkit.org/show_bug.cgi?id=185274
2490 Reviewed by Chris Dumez.
2492 Add support for cancelling a fetch from WebProcess to service worker process.
2493 Use FetchIdentifier instead of uint64_t.
2495 * Modules/fetch/FetchIdentifier.h: Added.
2496 * WebCore.xcodeproj/project.pbxproj:
2497 * workers/service/context/ServiceWorkerFetch.h:
2498 * workers/service/context/ServiceWorkerThreadProxy.cpp:
2499 (WebCore::ServiceWorkerThreadProxy::startFetch):
2500 (WebCore::ServiceWorkerThreadProxy::cancelFetch):
2501 * workers/service/context/ServiceWorkerThreadProxy.h:
2503 2018-05-08 Said Abou-Hallawa <sabouhallawa@apple.com>
2505 feTurbulence is not rendered correctly on Retina display
2506 https://bugs.webkit.org/show_bug.cgi?id=183798
2508 Reviewed by Simon Fraser.
2510 On 2x display the feTurbulence filter creates a scaled ImageBuffer but
2511 processes only the unscaled size. This is a remaining work of r168577 and
2512 is very similar to what was done for the feMorphology filter in r188271.
2514 Test: fast/hidpi/filters-turbulence.html
2516 * platform/graphics/filters/FETurbulence.cpp:
2517 (WebCore::FETurbulence::fillRegion const):
2518 (WebCore::FETurbulence::platformApplySoftware):
2520 2018-05-07 Zalan Bujtas <zalan@apple.com>
2522 [LFC] Add FormattingContext::layoutOutOfFlowDescendants implementation
2523 https://bugs.webkit.org/show_bug.cgi?id=185377
2525 Reviewed by Antti Koivisto.
2527 Also, remove FormattingContext's m_layoutContext member and pass it in to ::layout() instead.
2528 In theory LayoutContext is needed only during ::layout() call.
2530 * layout/FormattingContext.cpp:
2531 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
2532 * layout/FormattingContext.h:
2533 (WebCore::Layout::FormattingContext::layoutContext const):
2534 * layout/LayoutContext.cpp:
2535 (WebCore::Layout::LayoutContext::updateLayout):
2536 * layout/blockformatting/BlockFormattingContext.cpp:
2537 (WebCore::Layout::BlockFormattingContext::layout const):
2538 * layout/blockformatting/BlockFormattingContext.h:
2539 * layout/inlineformatting/InlineFormattingContext.cpp:
2540 (WebCore::Layout::InlineFormattingContext::layout const):
2541 * layout/inlineformatting/InlineFormattingContext.h:
2543 2018-05-07 Daniel Bates <dabates@apple.com>
2545 Check X-Frame-Options and CSP frame-ancestors in network process
2546 https://bugs.webkit.org/show_bug.cgi?id=185410
2547 <rdar://problem/37733934>
2549 Reviewed by Ryosuke Niwa.
2551 * WebCore.xcodeproj/project.pbxproj: Make PingLoader.h a private header so that we can include it in WebKit.
2552 * loader/DocumentLoader.cpp:
2553 (WebCore::DocumentLoader::responseReceived): Only check CSP frame-ancestors and X-Frame-Options here if
2554 we are not checking them in the NetworkProcess and HTTP response access is restricted. I code is otherwise kept
2555 unchanged. There may be opportunities to clean this code up more and share more of it. We should look into this
2557 * loader/DocumentLoader.h: Change visibility of stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied() from
2558 private to public and export it so that we can call it from the WebKit.
2559 * loader/PingLoader.h:
2560 * page/Settings.yaml: Add a new setting called networkProcessCSPFrameAncestorsCheckingEnabled (defaults: false)
2561 and is hardcoded in WebPage.cpp to be enabled. This setting is used to determine if we will be using the NetworkProcess.
2562 Ideally we wouldn't have this setting and just key off RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess().
2563 However RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess() is always enabled in WebKit Legacy
2564 at the time of writing (why?). And, strangely, RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess()
2565 is conditionally enabled in WebKit. For now, we add a new setting, networkProcessCSPFrameAncestorsCheckingEnabled,
2566 to determine if CSP checking should be performed in NetworkProcess. For checking to actually happen in NetworkProcess
2567 and not in DocumentLoader::responseReceived() RuntimeEnabledFeatures::sharedFeatures().restrictedHTTPResponseAccess()
2568 will also need to be enabled.
2569 * page/csp/ContentSecurityPolicy.cpp:
2570 (WebCore::ContentSecurityPolicy::allowFrameAncestors const): Added a variant that takes a vector of ancestor origins.
2571 * page/csp/ContentSecurityPolicy.h:
2572 * page/csp/ContentSecurityPolicyDirectiveList.cpp:
2573 (WebCore::checkFrameAncestors): Ditto.
2574 (WebCore::ContentSecurityPolicyDirectiveList::violatedDirectiveForFrameAncestorOrigins const): Ditto.
2575 * page/csp/ContentSecurityPolicyDirectiveList.h: Export constructor so that we can invoke it from NetworkResourceLoader::shouldInterruptLoadForCSPFrameAncestorsOrXFrameOptions().
2576 * page/csp/ContentSecurityPolicyResponseHeaders.h:
2577 * platform/network/HTTPParsers.h: Export XFrameOptionsDisposition() so that we can use in WebKit.
2579 2018-05-07 Daniel Bates <dabates@apple.com>
2581 Abstract logic to log console messages and send CSP violation reports into a client
2582 https://bugs.webkit.org/show_bug.cgi?id=185393
2583 <rdar://problem/40036053>
2585 Reviewed by Brent Fulgham.
2587 First pass at adding infrastructure to supporting CSP reporting from NetworkProcess and workers.
2588 Replaces the existing ContentSecurityPolicy constructor that takes a Frame with one that
2589 takes a ContentSecurityPolicyClient to delegate to for logging and sending reports. We will look
2590 to remove ContentSecurityPolicy constructor that takes a ScriptExecutionContext in a follow up.
2592 Standardize on instantiating a ContentSecurityPolicy with the full URL to resource that it protects
2593 instead of taking only the SecurityOrigin of this URL. By taking the full URL the ContentSecurityPolicy
2594 object is now capable of resolving a relative report URL without needing a Document/ScriptExecutionContext.
2596 We are underutilizing the CSPInfo struct and ContentSecurityPolicyClient::willSendCSPViolationReport()
2597 delegate callback in this patch. We will make use of this functionality in a subsequent patch to
2598 support collecting script state (e.g. source line number) when reporting CSP violations in worker
2599 threads. We also no longer go through the unnecessary motions to try to collect script state for a
2600 frame-ancestors violation (since DocumentLoader extends ContentSecurityPolicyClient and does not
2601 implement ContentSecurityPolicyClient::willSendCSPViolationReport()). The frame-ancestors directive
2602 is checked before a document is parsed and executes script; => there will never be any script state
2603 to collect; => it is not necessary to try to collect it as we currently do.
2605 * Sources.txt: Add file ContentSecurityPolicyClient.cpp. See the remarks for ContentSecurityPolicyClient.cpp
2606 below on why we have this file.
2607 * WebCore.xcodeproj/project.pbxproj: Add files ContentSecurityPolicyClient.{h, cpp}.
2609 (WebCore::Document::initSecurityContext): Pass the URL of the protected document.
2610 * loader/DocumentLoader.cpp:
2611 (WebCore::DocumentLoader::responseReceived): Ditto.
2612 (WebCore::DocumentLoader::addConsoleMessage): Added.
2613 (WebCore::DocumentLoader::sendCSPViolationReport): Added.
2614 (WebCore::DocumentLoader::dispatchSecurityPolicyViolationEvent): Added.
2615 * loader/DocumentLoader.h:
2616 * loader/FrameLoaderClient.h: Fix typo in comment.
2617 * loader/WorkerThreadableLoader.cpp:
2618 (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Pass the URL of the worker script.
2619 * page/csp/ContentSecurityPolicy.cpp:
2620 (WebCore::ContentSecurityPolicy::ContentSecurityPolicy): Added overload that takes a URL&& and an optional
2621 ContentSecurityPolicyClient*.
2622 (WebCore::ContentSecurityPolicy::deprecatedURLForReporting const): Extracted and simplified stripURLForUseInReport()
2623 into this member function.
2624 (WebCore::ContentSecurityPolicy::reportViolation const): Modified to make use of the client, if we have
2625 one and removed code for handling a ContentSecurityPolicy that was instantiated with a Frame.
2626 (WebCore::ContentSecurityPolicy::logToConsole const): Ditto.
2627 (WebCore::stripURLForUseInReport): Deleted; incorporated into ContentSecurityPolicy::deprecatedURLForReporting().
2628 * page/csp/ContentSecurityPolicy.h:
2629 * page/csp/ContentSecurityPolicyClient.cpp: Added. This file exists so that we can define the virtual
2630 destructor out-of-line and export this abstract class so as to avoid the need for the vtable to be
2631 defined in the translation unit of each derived class.
2632 * page/csp/ContentSecurityPolicyClient.h: Added.
2633 * page/csp/ContentSecurityPolicySource.cpp:
2634 (WebCore::ContentSecurityPolicySource::operator SecurityOriginData const): Added.
2635 * page/csp/ContentSecurityPolicySource.h:
2636 * workers/WorkerGlobalScope.cpp:
2637 (WebCore::WorkerGlobalScope::WorkerGlobalScope): Instantiate the ContentSecurityPolicy object with the
2638 URL of the worker script.
2640 2018-05-07 Simon Fraser <simon.fraser@apple.com>
2642 CSS filters which reference SVG filters fail to respect the "color-interpolation-filters" of the filter
2643 https://bugs.webkit.org/show_bug.cgi?id=185343
2645 Reviewed by Dean Jackson.
2647 Test: css3/filters/color-interpolation-filters.html
2649 When applying CSS reference filters, apply the value of "color-interpolation-filters" for the
2650 referenced filter effect element, just as we do for SVG filters.
2652 * rendering/FilterEffectRenderer.cpp:
2653 (WebCore::FilterEffectRenderer::buildReferenceFilter):
2655 2018-05-07 Daniel Bates <dabates@apple.com>
2657 CSP status-code incorrect for document blocked due to violation of its frame-ancestors directive
2658 https://bugs.webkit.org/show_bug.cgi?id=185366
2659 <rdar://problem/40035116>
2661 Reviewed by Brent Fulgham.
2663 Fixes an issue where the status-code in the sent CSP report for an HTTP document blocked because
2664 its frame-ancestors directive was violated would be the status code of the previously loaded
2665 document in the frame. If the previously loaded document was about:blank then this would be 0.
2667 Currently whenever we send a CSP report we ask the document's loader (Document::loader()) for the
2668 HTTP status code for the last response. Document::loader() returns the loader for the last committed
2669 document its frame. For a frame-ancestors violation, a CSP report is sent before the document
2670 that had the frame-ancestors directive has been committed and after it has been associate with a frame.
2671 As a result we are in are in a transient transition state for the frame and hence the last response
2672 for new document's loader (Document::loader()) is actually the last response of the previously loaded
2673 document in the frame. Instead we need to take care to tell CSP about the HTTP status code for the
2674 response associated with the document the CSP came from.
2677 (WebCore::Document::processHttpEquiv):
2678 (WebCore::Document::initSecurityContext):
2679 Pass the HTTP status code to CSP.
2681 * page/csp/ContentSecurityPolicy.cpp:
2682 (WebCore::ContentSecurityPolicy::copyStateFrom):
2683 (WebCore::ContentSecurityPolicy::responseHeaders const):
2684 (WebCore::ContentSecurityPolicy::didReceiveHeaders):
2685 (WebCore::ContentSecurityPolicy::didReceiveHeader):
2686 (WebCore::ContentSecurityPolicy::reportViolation const):
2687 * page/csp/ContentSecurityPolicy.h:
2688 Modify existing functions to take the HTTP status code, store it in a instance variable,
2689 and reference this variable when reporting a violation.
2691 * page/csp/ContentSecurityPolicyResponseHeaders.cpp:
2692 (WebCore::ContentSecurityPolicyResponseHeaders::ContentSecurityPolicyResponseHeaders):
2693 (WebCore::ContentSecurityPolicyResponseHeaders::isolatedCopy const):
2694 * page/csp/ContentSecurityPolicyResponseHeaders.h:
2695 (WebCore::ContentSecurityPolicyResponseHeaders::encode const):
2696 (WebCore::ContentSecurityPolicyResponseHeaders::decode):
2697 Store the HTTP status code along with the response headers.
2699 2018-05-07 Daniel Bates <dabates@apple.com>
2701 CSP referrer incorrect for document blocked due to violation of its frame-ancestors directive
2702 https://bugs.webkit.org/show_bug.cgi?id=185380
2704 Reviewed by Brent Fulgham.
2706 Similar to <https://bugs.webkit.org/show_bug.cgi?id=185366>, fixes an issue where the referrer
2707 in the sent CSP report for an HTTP document blocked because its frame-ancestors directive was
2708 violated would be the referrer of the previously loaded document in the frame.
2710 Currently whenever we send a CSP report we ask the document's loader (Document::loader()) for
2711 the referrer for the last request. Document::loader() returns the loader for the last committed
2712 document in its frame. For a frame-ancestors violation, a CSP report is sent before the document
2713 that had the frame-ancestors directive has been committed and after it has been associate with a
2714 frame. As a result we are in a transient transition state for the frame and hence the last request
2715 for the new document's loader (Document::loader()) is actually the last request of the previously
2716 loaded document in the frame. Instead we need to take care to tell CSP about the referrer for the
2717 request associated with the document the CSP came from.
2719 * loader/DocumentLoader.cpp:
2720 (WebCore::DocumentLoader::responseReceived):
2722 2018-05-07 Brent Fulgham <bfulgham@apple.com>
2724 Add experimental feature to prompt for Storage Access API use
2725 https://bugs.webkit.org/show_bug.cgi?id=185335
2726 <rdar://problem/39994649>
2728 Reviewed by Alex Christensen and Youenn Fablet.
2730 Create a new experimental feature that gates the ability of WebKit clients to prompt the user when
2731 Storage Access API is invoked.
2733 Currently this feature doesn't have any user-visible impact.
2735 * page/RuntimeEnabledFeatures.h:
2736 (WebCore::RuntimeEnabledFeatures::setStorageAccessPromptsEnabled):
2737 (WebCore::RuntimeEnabledFeatures::storageAccessPromptsEnabled const):
2738 * testing/InternalSettings.cpp:
2739 (WebCore::InternalSettings::Backup::Backup):
2740 (WebCore::InternalSettings::Backup::restoreTo):
2741 (WebCore::InternalSettings::setStorageAccessPromptsEnabled):
2742 * testing/InternalSettings.h:
2743 * testing/InternalSettings.idl:
2745 2018-05-07 Chris Dumez <cdumez@apple.com>
2747 Stop using an iframe's id as fallback if its name attribute is not set
2748 https://bugs.webkit.org/show_bug.cgi?id=11388
2750 Reviewed by Geoff Garen.
2752 WebKit had logic to use an iframe's id as fallback name when its name
2753 content attribute is not set. This behavior was not standard and did not
2754 match other browsers:
2755 - https://html.spec.whatwg.org/#attr-iframe-name
2757 Gecko / Trident never behaved this way. Blink was aligned with us until
2758 they started to match the specification in:
2759 - https://bugs.chromium.org/p/chromium/issues/detail?id=347169
2761 This WebKit quirk was causing some Web-compatibility issues because it
2762 would affect the behavior of Window's name property getter when trying
2763 to look up an iframe by id. Because of Window's named property getter
2764 behavior [1], we would return the frame's contentWindow instead of the
2765 iframe element itself.
2767 [1] https://html.spec.whatwg.org/multipage/window-object.html#named-access-on-the-window-object
2769 Test: fast/dom/Window/named-getter-frame-id.html
2771 * html/HTMLFrameElementBase.cpp:
2772 (WebCore::HTMLFrameElementBase::openURL):
2773 (WebCore::HTMLFrameElementBase::parseAttribute):
2774 (WebCore::HTMLFrameElementBase::didFinishInsertingNode):
2775 * html/HTMLFrameElementBase.h:
2777 2018-05-07 Chris Dumez <cdumez@apple.com>
2779 ASSERT(!childItemWithTarget(child->target())) is hit in HistoryItem::addChildItem()
2780 https://bugs.webkit.org/show_bug.cgi?id=185322
2782 Reviewed by Geoff Garen.
2784 We generate unique names for Frame to be used in HistoryItem. Those names not only
2785 need to be unique, they also need to be repeatable to avoid layout tests flakiness
2786 and for things like restoring form state from a HistoryItem.
2788 The previously generated frame names were relying on the Frame's index among a
2789 parent Frame's children. The issue was that we could end up with duplicate names
2790 because one could insert a Frame *before* an existing one. This is because the code
2791 would not take care of updating existing Frames' unique name on frame tree mutation.
2793 Updating frame tree names on mutation would be inefficient and is also not necessary.
2794 The approach chosen in this patch is to stop using the Frame's index and instead rely
2795 on an increasing counter stored on the top-frame's FrameTree. To make the names
2796 repeatable, we reset the counter on page navigation.
2799 (WebCore::Frame::setDocument):
2800 * page/FrameTree.cpp:
2801 (WebCore::FrameTree::uniqueChildName const):
2802 (WebCore::FrameTree::generateUniqueName const):
2804 (WebCore::FrameTree::resetFrameIdentifiers):
2806 2018-05-07 Yacine Bandou <yacine.bandou_ext@softathome.com>
2808 [EME][GStreamer] Fix wrong subsample parsing on r227067
2809 https://bugs.webkit.org/show_bug.cgi?id=185382
2811 Reviewed by Philippe Normand.
2813 The initialization of sampleIndex should be moved outside of the loop.
2814 Without this patch we will have a bad log and the check of the subsample
2815 count will be useless.
2817 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
2818 (webKitMediaClearKeyDecryptorDecrypt):
2820 2018-05-07 Daniel Bates <dabates@apple.com>
2822 CSP should be passed the referrer
2823 https://bugs.webkit.org/show_bug.cgi?id=185367
2825 Reviewed by Per Arne Vollan.
2827 As a step towards formalizing a CSP delegate object and removing the dependencies
2828 on ScriptExecutionContext and Frame, we should pass the document's referrer directly
2829 instead of indirectly obtaining it from the ScriptExecutionContext or Frame used
2830 to instantiate the ContentSecurityPolicy object.
2833 (WebCore::Document::processHttpEquiv): Pass the document's referrer.
2834 (WebCore::Document::initSecurityContext): Ditto.
2835 (WebCore::Document::applyQuickLookSandbox): Ditto.
2836 * loader/DocumentLoader.cpp:
2837 (WebCore::DocumentLoader::responseReceived): Ditto.
2838 * loader/FrameLoader.cpp:
2839 (WebCore::FrameLoader::didBeginDocument): Ditto.
2840 * page/csp/ContentSecurityPolicy.cpp:
2841 (WebCore::ContentSecurityPolicy::copyStateFrom): We pass a null string for the referrer
2842 to didReceiveHeader() as a placeholder since it requires the referrer be given to it. We
2843 fix up the referrer (m_referrer) after copying all the policy headers.
2844 (WebCore::ContentSecurityPolicy::didReceiveHeaders): Ditto.
2845 (WebCore::ContentSecurityPolicy::didReceiveHeader): Modified to take a referrer and WTFMove()s
2846 it into an instance variable (m_referrer).
2847 (WebCore::ContentSecurityPolicy::reportViolation const): Modified to use the stored referrer.
2848 * page/csp/ContentSecurityPolicy.h:
2849 * workers/WorkerGlobalScope.cpp:
2850 (WebCore::WorkerGlobalScope::applyContentSecurityPolicyResponseHeaders): Pass a null string
2851 for the referrer as a worker does not have a referrer.
2853 2018-05-07 Daniel Bates <dabates@apple.com>
2855 CSP should only notify Inspector to pause the debugger on the first policy to violate a directive
2856 https://bugs.webkit.org/show_bug.cgi?id=185364
2858 Reviewed by Brent Fulgham.
2860 Notify Web Inspector that a script was blocked on the first enforced CSP policy that it
2863 A page can have more than one enforced Content Security Policy. Currently for inline
2864 scripts, inline event handlers, JavaScript URLs, and eval() that are blocked by CSP
2865 we notify Web Inspector that it was blocked for each CSP policy that blocked it. When
2866 Web Inspector is notified it pauses script execution. It does not seem very meaningful
2867 to pause script execution on the same script for each CSP policy that blocked it.
2868 Therefore, only tell Web Inspector that a script was blocked for the first enforced CSP
2869 policy that blocked it.
2871 * page/csp/ContentSecurityPolicy.cpp:
2872 (WebCore::ContentSecurityPolicy::allowJavaScriptURLs const):
2873 (WebCore::ContentSecurityPolicy::allowInlineEventHandlers const):
2874 (WebCore::ContentSecurityPolicy::allowInlineScript const):
2875 (WebCore::ContentSecurityPolicy::allowEval const):
2877 2018-05-07 Daniel Bates <dabates@apple.com>
2879 Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
2880 https://bugs.webkit.org/show_bug.cgi?id=185170
2882 Reviewed by Per Arne Vollan.
2884 Rename CrossOriginPreflightResultCache::empty() to CrossOriginPreflightResultCache::clear() make
2885 it consistent with the terminology we use in WebKit to signify a function that clears a collection.
2886 A member function named "empty" is expected to return an instance of a class in its "empty state".
2887 For example, StringImpl::empty() returns a StringImpl instance that represents the empty string.
2888 However CrossOriginPreflightResultCache::empty() clears out the cache in-place. We should rename
2889 this function to better describe its purpose.
2891 * loader/CrossOriginPreflightResultCache.cpp:
2892 (WebCore::CrossOriginPreflightResultCache::clear):
2893 (WebCore::CrossOriginPreflightResultCache::empty): Deleted.
2894 * loader/CrossOriginPreflightResultCache.h:
2896 2018-05-06 Dean Jackson <dino@apple.com>
2898 WebGL: Reset simulated values after validation fails
2899 https://bugs.webkit.org/show_bug.cgi?id=185363
2900 <rdar://problem/39733417>
2902 Reviewed by Anders Carlsson.
2904 While fixing a previous bug, I forgot to reset some values
2905 when validation fails. This caused a bug where a subsequent
2906 invalid call might use those values and escape detection.
2908 Test: fast/canvas/webgl/index-validation-with-subsequent-draws.html
2910 * html/canvas/WebGLRenderingContextBase.cpp:
2911 (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): Reset the
2912 sizes when validation fails.
2913 * html/canvas/WebGLRenderingContextBase.h:
2915 2018-05-07 Ms2ger <Ms2ger@igalia.com>
2917 Support negative sw/sh values in createImageBitmap().
2918 https://bugs.webkit.org/show_bug.cgi?id=184449
2920 Reviewed by Dean Jackson.
2922 Tests: LayoutTests/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
2923 LayoutTests/http/wpt/2dcontext/imagebitmap/createImageBitmap.html
2925 * html/ImageBitmap.cpp:
2926 (WebCore::ImageBitmap::createPromise): handle negative values per spec.
2928 2018-05-07 Brian Burg <bburg@apple.com>
2930 Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected
2931 https://bugs.webkit.org/show_bug.cgi?id=184861
2932 <rdar://problem/39153768>
2934 Reviewed by Timothy Hatcher.
2936 Notify the client of the current connection count whenever a frontend connects or disconnects.
2938 Covered by new API test.
2940 * inspector/InspectorClient.h:
2941 (WebCore::InspectorClient::frontendCountChanged):
2942 * inspector/InspectorController.cpp:
2943 (WebCore::InspectorController::connectFrontend):
2944 (WebCore::InspectorController::disconnectFrontend):
2945 (WebCore::InspectorController::disconnectAllFrontends):
2946 * inspector/InspectorController.h:
2948 2018-05-07 Eric Carlson <eric.carlson@apple.com>
2950 Text track cue logging should include cue text
2951 https://bugs.webkit.org/show_bug.cgi?id=185353
2952 <rdar://problem/40003565>
2954 Reviewed by Youenn Fablet.
2956 No new tests, tested manually.
2958 * html/track/VTTCue.cpp:
2959 (WebCore::VTTCue::toJSONString const): Use toJSON.
2960 (WebCore::VTTCue::toJSON const): New.
2961 * html/track/VTTCue.h:
2963 * platform/graphics/InbandTextTrackPrivateClient.h:
2964 (WebCore::GenericCueData::toJSONString const): Log m_content.
2966 * platform/graphics/iso/ISOVTTCue.cpp:
2967 (WebCore::ISOWebVTTCue::toJSONString const): Log m_cueText.
2969 2018-05-06 Zalan Bujtas <zalan@apple.com>
2971 [LFC] Add assertions for stale Display::Box geometry
2972 https://bugs.webkit.org/show_bug.cgi?id=185357
2974 Reviewed by Antti Koivisto.
2976 Ensure that we don't access stale geometry of other boxes during layout.
2977 For example, in order to layout a block child we need the containing block's content box top/left and width (but not the height)
2979 * layout/displaytree/DisplayBox.h:
2980 (WebCore::Display::Box::invalidateTop):
2981 (WebCore::Display::Box::invalidateLeft):
2982 (WebCore::Display::Box::invalidateWidth):
2983 (WebCore::Display::Box::invalidateHeight):
2984 (WebCore::Display::Box::hasValidPosition const):
2985 (WebCore::Display::Box::hasValidSize const):
2986 (WebCore::Display::Box::hasValidGeometry const):
2987 (WebCore::Display::Box::invalidatePosition):
2988 (WebCore::Display::Box::invalidateSize):
2989 (WebCore::Display::Box::setHasValidPosition):
2990 (WebCore::Display::Box::setHasValidSize):
2991 (WebCore::Display::Box::setHasValidGeometry):
2992 (WebCore::Display::Box::rect const):
2993 (WebCore::Display::Box::top const):
2994 (WebCore::Display::Box::left const):
2995 (WebCore::Display::Box::bottom const):
2996 (WebCore::Display::Box::right const):
2997 (WebCore::Display::Box::topLeft const):
2998 (WebCore::Display::Box::bottomRight const):
2999 (WebCore::Display::Box::size const):
3000 (WebCore::Display::Box::width const):
3001 (WebCore::Display::Box::height const):
3002 (WebCore::Display::Box::setRect):
3003 (WebCore::Display::Box::setTopLeft):
3004 (WebCore::Display::Box::setTop):
3005 (WebCore::Display::Box::setLeft):
3006 (WebCore::Display::Box::setSize):
3007 (WebCore::Display::Box::setWidth):
3008 (WebCore::Display::Box::setHeight):
3010 2018-05-06 Zalan Bujtas <zalan@apple.com>
3012 [LFC] Add BlockFormattingContext::computeStaticPosition
3013 https://bugs.webkit.org/show_bug.cgi?id=185352
3015 Reviewed by Antti Koivisto.
3017 This is the core logic for positioning inflow boxes in a block formatting context (very naive though).
3019 * layout/blockformatting/BlockFormattingContext.cpp:
3020 (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
3021 * layout/displaytree/DisplayBox.h:
3023 2018-05-05 Sam Weinig <sam@webkit.org>
3025 Cleanup XMLHttpRequestUpload a little
3026 https://bugs.webkit.org/show_bug.cgi?id=185344
3028 Reviewed by Yusuke Suzuki.
3030 * bindings/js/JSXMLHttpRequestCustom.cpp:
3031 (WebCore::JSXMLHttpRequest::visitAdditionalChildren):
3032 Use auto to reduce redundancy.
3034 * xml/XMLHttpRequest.cpp:
3035 (WebCore::XMLHttpRequest::upload):
3036 * xml/XMLHttpRequest.h:
3037 Switch upload() to return a reference.
3039 * xml/XMLHttpRequestUpload.cpp:
3040 (WebCore::XMLHttpRequestUpload::XMLHttpRequestUpload):
3041 (WebCore::XMLHttpRequestUpload::dispatchProgressEvent):
3042 * xml/XMLHttpRequestUpload.h:
3043 Cleanup formatting, modernize and switch XMLHttpRequest member from a pointer
3046 2018-05-05 Dean Jackson <dino@apple.com>
3048 Draw a drop-shadow behind the system preview badge
3049 https://bugs.webkit.org/show_bug.cgi?id=185356
3050 <rdar://problem/40004936>
3052 Reviewed by Wenson Hsieh.
3054 Draw a very subtle drop-shadow under the system
3055 preview badge so that it is more visible on a pure
3058 I also moved some code around to make it more clear
3059 and improved comments.
3061 * rendering/RenderThemeIOS.mm:
3062 (WebCore::RenderThemeIOS::paintSystemPreviewBadge):
3064 2018-05-04 Wenson Hsieh <wenson_hsieh@apple.com>
3066 [iOS] Multiple links in Mail are dropped in a single line, and are difficult to tell apart
3067 https://bugs.webkit.org/show_bug.cgi?id=185289
3068 <rdar://problem/35756912>
3070 Reviewed by Tim Horton and Darin Adler.
3072 When inserting multiple URLs as individual items in a single drop, we currently separate each item with a space
3073 (see r217284). However, it still seems difficult to tell dropped links apart. This patch makes some slight
3074 tweaks to WebContentReader::readURL so that it inserts line breaks before dropped URLs, if the dropped URL isn't
3075 the first item to be inserted in the resulting document fragment.
3077 Augments existing API tests in DataInteractionTests.
3079 * editing/ios/WebContentReaderIOS.mm:
3081 Additionally remove some extraneous header imports from this implementation file.
3083 (WebCore::WebContentReader::readURL):
3085 2018-05-02 Dean Jackson <dino@apple.com>
3087 Use IOSurfaces for CoreImage operations where possible
3088 https://bugs.webkit.org/show_bug.cgi?id=185230
3089 <rdar://problem/39926929>
3091 Reviewed by Jon Lee.
3093 On iOS hardware, we can use IOSurfaces as a rendering destination
3094 for CoreImage, which means we're keeping data on the GPU
3097 As a drive-by fix, I used a convenience method for Gaussian blurs.
3099 * rendering/RenderThemeIOS.mm:
3100 (WebCore::RenderThemeIOS::paintSystemPreviewBadge):
3102 2018-05-04 Tim Horton <timothy_horton@apple.com>
3104 Shift to a lower-level framework for simplifying URLs
3105 https://bugs.webkit.org/show_bug.cgi?id=185334
3107 Reviewed by Dan Bernstein.
3109 * Configurations/WebCore.xcconfig:
3110 * platform/mac/DragImageMac.mm:
3111 (WebCore::LinkImageLayout::LinkImageLayout):
3113 2018-05-03 Ryosuke Niwa <rniwa@webkit.org>
3115 Release assert in ScriptController::canExecuteScripts via HTMLMediaElement::~HTMLMediaElement()
3116 https://bugs.webkit.org/show_bug.cgi?id=185288
3118 Reviewed by Jer Noble.
3120 The crash is caused by HTMLMediaElement::~HTMLMediaElement canceling the resource load via CachedResource
3121 which ends up calling FrameLoader::checkCompleted() and fire load event on the document synchronously.
3122 Speculatively fix the crash by scheduling the check instead.
3124 In long term, ResourceLoader::cancel should never fire load event synchronously: webkit.org/b/185284.
3126 Unfortunately, no new tests since I can't get MediaResource to get destructed at the right time.
3128 * html/HTMLMediaElement.cpp:
3129 (WebCore::HTMLMediaElement::isRunningDestructor): Added to detect this specific case.
3130 (WebCore::HTMLMediaElementDestructorScope): Added.
3131 (WebCore::HTMLMediaElementDestructorScope::HTMLMediaElementDestructorScope): Added.
3132 (WebCore::HTMLMediaElementDestructorScope::~HTMLMediaElementDestructorScope): Added.
3133 (WebCore::HTMLMediaElement::~HTMLMediaElement): Instantiate HTMLMediaElement.
3134 * html/HTMLMediaElement.h:
3135 * loader/FrameLoader.cpp:
3136 (WebCore::FrameLoader::checkCompleted): Call scheduleCheckCompleted instead of synchronously calling
3137 checkCompleted if we're in the middle of destructing a HTMLMediaElement.
3139 2018-05-04 Ryosuke Niwa <rniwa@webkit.org>
3141 Rename DocumentOrderedMap to TreeScopeOrderedMap
3142 https://bugs.webkit.org/show_bug.cgi?id=185290
3144 Reviewed by Zalan Bujtas.
3146 Renamed the class since it's almost always a mistake to use this class as a member variable of Document.
3149 * WebCore.xcodeproj/project.pbxproj:
3150 * dom/MouseRelatedEvent.cpp: Include the forgotten DOMWindow.h. Unified build files bit us here.
3151 * dom/TreeScope.cpp:
3152 (WebCore::TreeScope::addElementById):
3153 (WebCore::TreeScope::addElementByName):
3154 (WebCore::TreeScope::addImageMap):
3155 (WebCore::TreeScope::addImageElementByUsemap):
3156 (WebCore::TreeScope::labelElementForId):
3158 * dom/TreeScopeOrderedMap.cpp: Renamed from DocumentOrderedMap.cpp
3159 * dom/TreeScopeOrderedMap.h: Renamed from DocumentOrderedMap.h
3160 * html/HTMLDocument.h:
3162 2018-05-04 Don Olmstead <don.olmstead@sony.com>
3164 [Win][WebKit] Fix forwarding headers for Windows build
3165 https://bugs.webkit.org/show_bug.cgi?id=184412
3167 Reviewed by Alex Christensen.
3169 No new tests. No change in behavior.
3171 * PlatformWin.cmake:
3173 2018-05-04 Zalan Bujtas <zalan@apple.com>
3175 [Simple line layout] Add support for line layout box generation with multiple text renderers.
3176 https://bugs.webkit.org/show_bug.cgi?id=185276
3178 Reviewed by Antti Koivisto.
3180 Covered by existing tests.
3182 * rendering/SimpleLineLayoutFunctions.cpp:
3183 (WebCore::SimpleLineLayout::canUseForLineBoxTree):
3184 (WebCore::SimpleLineLayout::generateLineBoxTree):
3185 * rendering/SimpleLineLayoutResolver.cpp:
3186 (WebCore::SimpleLineLayout::RunResolver::Run::renderer const):
3187 (WebCore::SimpleLineLayout::RunResolver::Run::localStart const):
3188 (WebCore::SimpleLineLayout::RunResolver::Run::localEnd const):
3189 * rendering/SimpleLineLayoutResolver.h:
3191 2018-05-04 Timothy Hatcher <timothy@apple.com>
3193 Deprecate legacy WebView and friends
3194 https://bugs.webkit.org/show_bug.cgi?id=185279
3195 rdar://problem/33268700
3197 Reviewed by Tim Horton.
3199 * Configurations/WebCore.xcconfig:
3200 Added BUILDING_WEBKIT define to disable the deprecation macros.
3201 * bridge/objc/WebScriptObject.h:
3202 Added deprecation macros to WebScriptObject and WebUndefined.
3203 * platform/cocoa/WebKitAvailability.h:
3204 Added more macros and a way to disable deprecation warnings for
3205 WebKit build and in clients like Safari.
3207 2018-05-04 Eric Carlson <eric.carlson@apple.com>
3209 Log media time range as JSON
3210 https://bugs.webkit.org/show_bug.cgi?id=185321
3211 <rdar://problem/39986746>
3213 Reviewed by Youenn Fablet.
3215 No new tests, tested manually.
3217 * html/HTMLMediaElement.cpp:
3218 (WebCore::HTMLMediaElement::addPlayedRange): Log as time range.
3219 (WebCore::HTMLMediaElement::visibilityStateChanged): Cleanup.
3221 * platform/graphics/MediaPlayer.h:
3222 (WTF::LogArgument<MediaTime>::toString):
3223 (WTF::LogArgument<MediaTimeRange>::toString):
3225 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3226 (WebCore::InbandTextTrackPrivateAVF::processAttributedStrings): Log error as time range.
3228 2018-05-04 Zalan Bujtas <zalan@apple.com>
3230 Use the containing block to compute the pagination gap when the container is inline.
3231 https://bugs.webkit.org/show_bug.cgi?id=184724
3232 <rdar://problem/39521800>
3234 Reviewed by Simon Fraser.
3236 Test: fast/overflow/page-overflow-with-inline-body-crash.html
3238 * page/FrameView.cpp:
3239 (WebCore::FrameView::applyPaginationToViewport):
3241 2018-05-04 Tim Horton <timothy_horton@apple.com>
3243 Don't use GSFont* in minimal simulator mode
3244 https://bugs.webkit.org/show_bug.cgi?id=185320
3245 <rdar://problem/39734478>
3247 Reviewed by Beth Dakin.
3249 * page/cocoa/MemoryReleaseCocoa.mm:
3250 (WebCore::platformReleaseMemory):
3252 2018-05-04 Chris Dumez <cdumez@apple.com>
3254 Unreviewed, rolling out r231331.
3256 Caused a few tests to assert
3260 "Stop using an iframe's id as fallback if its name attribute
3262 https://bugs.webkit.org/show_bug.cgi?id=11388
3263 https://trac.webkit.org/changeset/231331
3265 2018-05-04 Youenn Fablet <youenn@apple.com>
3267 Use more references in updateTracksOfType
3268 https://bugs.webkit.org/show_bug.cgi?id=185305
3270 Reviewed by Eric Carlson.
3272 No change of behavior.
3274 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3275 (WebCore::updateTracksOfType):
3276 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
3278 2018-05-04 Myles C. Maxfield <mmaxfield@apple.com>
3280 Text shaping in the simple path is flipped in the y direction
3281 https://bugs.webkit.org/show_bug.cgi?id=185062
3282 <rdar://problem/39778678>
3284 Reviewed by Simon Fraser.
3286 Shaping in our simple codepath occurs in an "increasing-y-goes-up" coordinate system, but our painting
3287 code uses an "increasing-y-goes-down" coordinate system. We weren't fixing up the coordinate systems
3288 because we never noticed. This is because the simple codepath is only designed for kerning and ligatures,
3289 neither of which move glyphs vertically in the common case.
3291 Test: fast/text/vertical-displacement-simple-codepath.html
3293 * platform/graphics/Font.cpp:
3294 (WebCore::Font::applyTransforms const):
3295 * platform/graphics/WidthIterator.cpp:
3296 (WebCore::WidthIterator::applyFontTransforms):
3298 2018-05-04 Chris Nardi <cnardi@chromium.org>
3300 Serialize all URLs with double-quotes per CSSOM spec
3301 https://bugs.webkit.org/show_bug.cgi?id=184935
3303 Reviewed by Antti Koivisto.
3305 According to https://drafts.csswg.org/cssom/#serialize-a-url, all URLs should be serialized as strings,
3306 which means they should have double quotes around the text of the URL. Update our implementation to match
3307 this (and Firefox/Chrome). Also remove isCSSTokenizerURL() as this method is no longer needed.
3309 Tests: Many LayoutTests updated to use double quotes.
3311 * css/CSSMarkup.cpp:
3312 (WebCore::serializeString): Remove FIXME as this was already fixed in a previous patch.
3313 (WebCore::serializeURL): Remove FIXME and update implementation.
3315 2018-05-04 Youenn Fablet <youenn@apple.com>
3317 LayoutTests/fast/mediastream/change-tracks-media-stream-being-played.html is crashing after r231304
3318 https://bugs.webkit.org/show_bug.cgi?id=185303
3320 Reviewed by Eric Carlson.
3322 We need to stop observing the audio track like we do for video track once we are no longer interested in it.
3323 Covered by test no longer crashing.
3325 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3326 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
3328 2018-05-04 Zalan Bujtas <zalan@apple.com>
3330 [LFC] Set the invalidation root as the result of style change.
3331 https://bugs.webkit.org/show_bug.cgi?id=185301
3333 Reviewed by Antti Koivisto.
3335 Compute/propagate the update type on the ancestor chain and return the invalidation root
3336 so that LayoutContext could use it as the entry point for the next layout frame.
3338 * layout/LayoutContext.cpp:
3339 (WebCore::Layout::LayoutContext::updateLayout):
3340 (WebCore::Layout::LayoutContext::styleChanged):
3341 * layout/LayoutContext.h: order is not important.
3342 * layout/blockformatting/BlockInvalidation.cpp:
3343 (WebCore::Layout::invalidationStopsAtFormattingContextBoundary):
3344 (WebCore::Layout::computeUpdateType):
3345 (WebCore::Layout::computeUpdateTypeForAncestor):
3346 (WebCore::Layout::BlockInvalidation::invalidate):
3347 * layout/blockformatting/BlockInvalidation.h:
3348 * layout/inlineformatting/InlineInvalidation.cpp:
3349 (WebCore::Layout::InlineInvalidation::invalidate):
3350 * layout/inlineformatting/InlineInvalidation.h:
3352 2018-05-04 Youenn Fablet <youenn@apple.com>
3354 PeerConnection should have its connectionState closed even if doing gathering
3355 https://bugs.webkit.org/show_bug.cgi?id=185267
3357 Reviewed by Darin Adler.
3359 Test: webrtc/addICECandidate-closed.html
3361 In case m_iceConnectionState is closed, m_connectionState should also be set to closed
3362 and RTCPeerConnection should be closed so as to reject any other call.
3364 * Modules/mediastream/RTCPeerConnection.cpp:
3365 (WebCore::RTCPeerConnection::close):
3366 (WebCore::RTCPeerConnection::updateConnectionState):
3368 2018-05-04 Yacine Bandou <yacine.bandou_ext@softathome.com>
3370 [MSE][GStreamer] Delete properly the stream from the WebKitMediaSource
3371 https://bugs.webkit.org/show_bug.cgi?id=185242
3373 Reviewed by Xabier Rodriguez-Calvar.
3375 When the sourceBuffer is removed from mediasource, the appropriate stream is not
3376 properly deleted from WebKitMediaSource, because the appsrc and parser elements
3377 of the stream are not removed from the WebKitMediaSource bin.
3379 This patch avoids the regression of r231089, see https://bugs.webkit.org/show_bug.cgi?id=185071
3381 * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
3382 (webKitMediaSrcFreeStream):
3384 2018-05-04 Carlos Garcia Campos <cgarcia@igalia.com>
3386 [GTK] Epiphany (GNOME Web) says "Error downloading: Service Unavailable." when trying to download an image from discogs.com
3387 https://bugs.webkit.org/show_bug.cgi?id=174730
3389 Reviewed by Michael Catanzaro.
3391 Export ResourceRequestBase::hasHTTPHeaderField().
3393 * platform/network/ResourceRequestBase.h:
3395 2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com>
3397 Use subprocess.call instead of os.system to handle path with spaces
3398 https://bugs.webkit.org/show_bug.cgi?id=185291
3400 Reviewed by Darin Adler.
3402 If gperf path includes spaces, these python scripts fail to execute gperf.
3403 We use subprocess module instead of os.system to invoke gperf.
3405 * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
3406 * css/makeSelectorPseudoElementsMap.py:
3407 * platform/network/create-http-header-name-table:
3409 2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com>
3411 Unreviewed, attempt to fix WinCairo build failure
3412 https://bugs.webkit.org/show_bug.cgi?id=185218
3414 * platform/text/win/LocaleWin.cpp:
3415 (WebCore::LocaleWin::getLocaleInfoString):
3417 2018-05-03 Filip Pizlo <fpizlo@apple.com>
3419 Strings should not be allocated in a gigacage
3420 https://bugs.webkit.org/show_bug.cgi?id=185218
3422 Reviewed by Saam Barati.
3424 No new tests because no new behavior.
3426 * Modules/indexeddb/server/IDBSerialization.cpp:
3427 (WebCore::decodeKey):
3428 * bindings/js/SerializedScriptValue.cpp:
3429 (WebCore::CloneDeserializer::readString):
3430 * html/canvas/CanvasRenderingContext2D.cpp:
3431 (WebCore::normalizeSpaces):
3432 * html/parser/HTMLTreeBuilder.cpp:
3433 (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace):
3434 * platform/URLParser.cpp:
3435 (WebCore::percentEncodeByte):
3436 (WebCore::serializeURLEncodedForm):
3437 (WebCore::URLParser::serialize):
3438 * platform/URLParser.h:
3439 * platform/graphics/FourCC.cpp:
3440 (WebCore::FourCC::toString const):
3441 * platform/graphics/ca/GraphicsLayerCA.cpp:
3442 (WebCore::GraphicsLayerCA::ReplicaState::cloneID const):
3443 * platform/text/LocaleICU.cpp:
3444 (WebCore::LocaleICU::decimalSymbol):
3445 (WebCore::LocaleICU::decimalTextAttribute):
3446 (WebCore::getDateFormatPattern):
3447 (WebCore::LocaleICU::createLabelVector):
3448 (WebCore::getFormatForSkeleton):
3449 * platform/win/FileSystemWin.cpp:
3450 (WebCore::FileSystem::getFinalPathName):
3451 (WebCore::FileSystem::pathByAppendingComponent):
3452 (WebCore::FileSystem::storageDirectory):
3454 2018-05-02 Brent Fulgham <bfulgham@apple.com>
3456 Widgets should hold a WeakPtr to their parents
3457 https://bugs.webkit.org/show_bug.cgi?id=185239
3458 <rdar://problem/39741250>
3460 Reviewed by Zalan Bujtas.
3462 * platform/ScrollView.h:
3463 (WebCore::ScrollView::weakPtrFactory): Added.
3464 * platform/Widget.cpp:
3465 (WebCore::Widget::init): Don't perform an unnecessary assignment.
3466 (WebCore::Widget::setParent): Grab a WeakPtr to the parent ScrollView.
3467 * platform/Widget.h:
3468 (WebCore::Widget::parent const): Change type to a WeakPtr.
3470 2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com>
3472 Use pointer instead of std::optional<T&>
3473 https://bugs.webkit.org/show_bug.cgi?id=185186
3475 Reviewed by Alex Christensen.
3477 std::optional<T&> is not accepted in C++17 spec.
3478 In this patch, we replace it with T*, which is well-aligned to
3479 WebKit's convention.
3481 * Modules/mediastream/RTCPeerConnection.cpp:
3482 (WebCore::iceServersFromConfiguration):
3483 (WebCore::RTCPeerConnection::initializeConfiguration):
3484 (WebCore::RTCPeerConnection::setConfiguration):
3485 * css/parser/CSSParser.cpp:
3486 (WebCore::CSSParser::parseSystemColor):
3487 * css/parser/CSSParser.h:
3488 * dom/DatasetDOMStringMap.cpp:
3489 (WebCore::DatasetDOMStringMap::item const):
3490 (WebCore::DatasetDOMStringMap::namedItem const):
3491 (WebCore:: const): Deleted.
3492 * dom/DatasetDOMStringMap.h:
3494 (WebCore::Element::insertAdjacentHTML):
3496 * html/canvas/CanvasStyle.cpp:
3497 (WebCore::parseColor):
3498 * inspector/DOMEditor.cpp:
3499 * platform/network/curl/CurlFormDataStream.cpp:
3500 (WebCore::CurlFormDataStream::getPostData):
3502 * platform/network/curl/CurlFormDataStream.h:
3503 * platform/network/curl/CurlRequest.cpp:
3504 (WebCore::CurlRequest::setupPOST):
3505 * testing/MockCDMFactory.cpp:
3506 (WebCore::MockCDMFactory::keysForSessionWithID const):
3507 (WebCore::MockCDMInstance::updateLicense):
3508 (WebCore:: const): Deleted.
3509 * testing/MockCDMFactory.h:
3511 2018-05-03 Chris Dumez <cdumez@apple.com>
3513 Stop using an iframe's id as fallback if its name attribute is not set
3514 https://bugs.webkit.org/show_bug.cgi?id=11388
3516 Reviewed by Geoff Garen.
3518 WebKit had logic to use an iframe's id as fallback name when its name
3519 content attribute is not set. This behavior was not standard and did not
3520 match other browsers:
3521 - https://html.spec.whatwg.org/#attr-iframe-name
3523 Gecko / Trident never behaved this way. Blink was aligned with us until
3524 they started to match the specification in:
3525 - https://bugs.chromium.org/p/chromium/issues/detail?id=347169
3527 This WebKit quirk was causing some Web-compatibility issues because it
3528 would affect the behavior of Window's name property getter when trying
3529 to look up an iframe by id. Because of Window's named property getter
3530 behavior [1], we would return the frame's contentWindow instead of the
3531 iframe element itself.
3533 [1] https://html.spec.whatwg.org/multipage/window-object.html#named-access-on-the-window-object
3535 Test: fast/dom/Window/named-getter-frame-id.html
3537 * html/HTMLFrameElementBase.cpp:
3538 (WebCore::HTMLFrameElementBase::openURL):
3539 (WebCore::HTMLFrameElementBase::parseAttribute):
3540 (WebCore::HTMLFrameElementBase::didFinishInsertingNode):
3541 * html/HTMLFrameElementBase.h:
3543 2018-05-03 Eric Carlson <eric.carlson@apple.com>
3545 [iOS] Internal text and audio tracks not in fullscreen menu
3546 https://bugs.webkit.org/show_bug.cgi?id=185268
3547 <rdar://problem/38673440>
3549 Reviewed by Jer Noble.
3551 * platform/cocoa/PlaybackSessionModelMediaElement.mm:
3552 (WebCore::PlaybackSessionModelMediaElement::setMediaElement): 'addtrack' and 'removetrack'
3553 events are fired at the track lists, not the media element.
3555 2018-05-03 Ryosuke Niwa <rniwa@webkit.org>
3557 Using image map inside a shadow tree results hits a release assert in DocumentOrderedMap::add
3558 https://bugs.webkit.org/show_bug.cgi?id=185238
3560 Reviewed by Antti Koivisto.
3562 The bug was caused by DocumentOrderedMap for the image elements with usemap being stored in Document
3563 even if those image elements were in a shadow tree. Fixed the bug by moving the map to TreeScope.
3565 Test: fast/images/imagemap-in-nested-shadow-tree.html
3566 fast/images/imagemap-in-shadow-tree.html
3569 (WebCore::Document::addImageElementByUsemap): Moved to TreeScope.
3570 (WebCore::Document::removeImageElementByUsemap): Ditto.
3571 (WebCore::Document::imageElementByUsemap const): Ditto.
3573 * dom/TreeScope.cpp:
3574 (WebCore::TreeScope::destroyTreeScopeData): Clear m_imagesByUsemap as well as m_elementsByName.
3575 (WebCore::TreeScope::getImageMap const): Removed the code to parse usemap. RenderImage::imageMap()
3576 which used to call this function with the raw value of the usemap content attribute now calls it
3577 via HTMLImageElement::associatedMapElement(), which uses the parsed usemap.
3578 (WebCore::TreeScope::addImageElementByUsemap): Moved from Document.
3579 (WebCore::TreeScope::removeImageElementByUsemap): Ditto.
3580 (WebCore::TreeScope::imageElementByUsemap const): Ditto.
3582 * html/HTMLImageElement.cpp:
3583 (WebCore::HTMLImageElement::parseAttribute):
3584 (WebCore::HTMLImageElement::insertedIntoAncestor): This image element can be associated with a map element
3585 if it's connected to a document.
3586 (WebCore::HTMLImageElement::removedFromAncestor):
3587 (WebCore::HTMLImageElement::associatedMapElement const):
3588 * html/HTMLImageElement.h:
3589 * html/HTMLMapElement.cpp:
3590 (WebCore::HTMLMapElement::imageElement):
3591 * rendering/RenderImage.cpp:
3592 (WebCore::RenderImage::imageMap const):
3594 2018-05-03 Justin Fan <justin_fan@apple.com>
3596 [WebGL] Add runtime flag for enabling ASTC support in WebGL
3597 https://bugs.webkit.org/show_bug.cgi?id=184840
3599 Reviewed by Myles C. Maxfield.
3601 Added runtime flag for ASTC support in WebGL, to turn on/off when extension is implemented.
3603 * page/RuntimeEnabledFeatures.h:
3604 (WebCore::RuntimeEnabledFeatures::setWebGLCompressedTextureASTCSupportEnabled):
3605 (WebCore::RuntimeEnabledFeatures::webGLCompressedTextureASTCSupportEnabled const):
3607 2018-05-03 Chris Nardi <cnardi@chromium.org>
3609 Remove [NoInterfaceObject] from DOMRectList
3610 https://bugs.webkit.org/show_bug.cgi?id=185255
3612 Reviewed by Chris Dumez.
3614 In https://github.com/w3c/fxtf-drafts/issues/233, [NoInterfaceObject] was removed
3615 from DOMRectList. Remove it from our implementation to match the spec, as well as
3618 Updated web platform tests IDL test for the Geometry spec.
3620 * dom/DOMRectList.idl:
3622 2018-05-03 Chris Dumez <cdumez@apple.com>
3624 REGRESSION(iOS 11.3): Crashes in TimerBase::~TimerBase() in Tencent x5gamehelper
3625 https://bugs.webkit.org/show_bug.cgi?id=185073
3626 <rdar://problem/39821223>
3628 Reviewed by Alexey Proskuryakov.
3630 The following changes were made:
3631 - Make sure SocketStream callbacks are always scheduled on the right runloop:
3632 WebThreadRunLoop() on WebKitLegacy iOS, loaderRunLoop() on Windows and
3633 main runloop otherwise.
3634 - When the SocketStream callbacks are called, unconditionally call callOnMainThreadAndWait()
3635 before calling methods on the SocketStream client. Previously, this code path
3636 was specific to Windows but there is no reason to have platform-specific code here.
3637 callOnMainThreadAndWait() calls the function right away if we're already on the main
3638 thread, which will be the case on other platform than Windows.
3640 * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
3641 (WebCore::callbacksRunLoop):
3642 (WebCore::callbacksRunLoopMode):
3643 (WebCore::SocketStreamHandleImpl::scheduleStreams):
3644 (WebCore::SocketStreamHandleImpl::pacExecutionCallback):
3645 (WebCore::SocketStreamHandleImpl::executePACFileURL):
3646 (WebCore::SocketStreamHandleImpl::removePACRunLoopSource):
3647 (WebCore::SocketStreamHandleImpl::readStreamCallback):
3648 (WebCore::SocketStreamHandleImpl::writeStreamCallback):
3649 (WebCore::SocketStreamHandleImpl::platformClose):
3651 2018-05-03 Zalan Bujtas <zalan@apple.com>
3653 [LFC] Enable multiple layout roots for incremental layout.
3654 https://bugs.webkit.org/show_bug.cgi?id=185185
3656 Reviewed by Antti Koivisto.
3658 With certain type of style changes, we can stop the box invalidation at the formatting context boundary.
3659 When multiple boxes need updating in different formatting contexts, instead of marking the parent containing block chain all
3660 the way up to a common ancestor, we could just work with a list of layout entry points per layout frame.
3662 * layout/FormattingState.h:
3663 * layout/LayoutContext.cpp:
3664 (WebCore::Layout::LayoutContext::updateLayout):
3665 (WebCore::Layout::LayoutContext::addLayoutEntryPoint):
3666 * layout/LayoutContext.h:
3668 2018-05-03 Zalan Bujtas <zalan@apple.com>
3670 [LFC] Box invalidation logic should go to dedicated classes.
3671 https://bugs.webkit.org/show_bug.cgi?id=185249
3673 Reviewed by Antti Koivisto.
3675 Each formatting context can initiate a different type of invalidation when
3676 style attribute changes in a box.
3679 * WebCore.xcodeproj/project.pbxproj:
3680 * layout/FormattingState.cpp:
3681 (WebCore::Layout::FormattingState::FormattingState):
3682 * layout/FormattingState.h:
3683 (WebCore::Layout::FormattingState::isBlockFormattingState const):
3684 (WebCore::Layout::FormattingState::isInlineFormattingState const):
3685 * layout/LayoutContext.cpp:
3686 (WebCore::Layout::LayoutContext::styleChanged):
3687 (WebCore::Layout::LayoutContext::markNeedsUpdate):
3688 * layout/LayoutContext.h:
3689 * layout/blockformatting/BlockFormattingState.cpp:
3690 (WebCore::Layout::BlockFormattingState::BlockFormattingState):
3691 * layout/blockformatting/BlockFormattingState.h:
3692 * layout/blockformatting/BlockInvalidation.cpp: Copied from Source/WebCore/layout/blockformatting/BlockFormattingState.cpp.
3693 (WebCore::Layout::BlockInvalidation::invalidate):
3694 * layout/blockformatting/BlockInvalidation.h: Copied from Source/WebCore/layout/inlineformatting/InlineFormattingState.h.
3695 * layout/inlineformatting/InlineFormattingState.cpp:
3696 (WebCore::Layout::InlineFormattingState::InlineFormattingState):
3697 * layout/inlineformatting/InlineFormattingState.h:
3698 * layout/inlineformatting/InlineInvalidation.cpp: Copied from Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp.
3699 (WebCore::Layout::InlineInvalidation::invalidate):
3700 * layout/inlineformatting/InlineInvalidation.h: Copied from Source/WebCore/layout/blockformatting/BlockFormattingState.h.
3702 2018-05-03 Michael Catanzaro <mcatanzaro@igalia.com>
3704 WebKit should send fake macOS user agent to docs.google.com
3705 https://bugs.webkit.org/show_bug.cgi?id=185165
3707 Reviewed by Carlos Garcia Campos.
3709 * platform/UserAgentQuirks.cpp:
3710 (WebCore::urlRequiresMacintoshPlatform):
3711 (WebCore::urlRequiresLinuxDesktopPlatform):
3713 2018-05-03 Commit Queue <commit-queue@webkit.org>
3715 Unreviewed, rolling out r231223 and r231288.
3716 https://bugs.webkit.org/show_bug.cgi?id=185256
3718 The change in r231223 breaks internal builds, and r231288 is a
3719 dependent change. (Requested by ryanhaddad on #webkit).
3721 Reverted changesets:
3723 "Use default std::optional if it is provided"
3724 https://bugs.webkit.org/show_bug.cgi?id=185159
3725 https://trac.webkit.org/changeset/231223
3727 "Use pointer instead of
3728 std::optional<std::reference_wrapper<>>"
3729 https://bugs.webkit.org/show_bug.cgi?id=185186
3730 https://trac.webkit.org/changeset/231288
3732 2018-05-03 Ryan Haddad <ryanhaddad@apple.com>
3734 Unreviewed, rolling out r231253.
3736 The API test added with this change is crashing on the bots.
3740 "Web Inspector: opt out of process swap on navigation if a Web
3741 Inspector frontend is connected"
3742 https://bugs.webkit.org/show_bug.cgi?id=184861
3743 https://trac.webkit.org/changeset/231253
3745 2018-05-03 Youenn Fablet <youenn@apple.com>
3747 A MediaStream being played should allow removing some of its tracks
3748 https://bugs.webkit.org/show_bug.cgi?id=185233
3750 Reviewed by Eric Carlson.
3752 Update the tracks out of the for loop.
3753 Test: fast/mediastream/change-tracks-media-stream-being-played.html
3755 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3756 (WebCore::updateTracksOfType):
3758 2018-05-03 Miguel Gomez <magomez@igalia.com>
3760 WebCore::TextureMapperLayer object used after freed
3761 https://bugs.webkit.org/show_bug.cgi?id=184729
3763 Reviewed by Michael Catanzaro.
3765 Replace the raw pointers with WeakPtr for effectTarget, maskLayer and replicaLayer
3766 inside TextureMapperLayer.
3768 * platform/graphics/texmap/TextureMapperLayer.cpp:
3769 (WebCore::TextureMapperLayer::~TextureMapperLayer):
3770 (WebCore::TextureMapperLayer::setMaskLayer):
3771 (WebCore::TextureMapperLayer::setReplicaLayer):
3772 * platform/graphics/texmap/TextureMapperLayer.h:
3774 2018-05-03 Basuke Suzuki <Basuke.Suzuki@sony.com>
3776 [Curl] Add OpenSSL/LibreSSL multi-threading support
3777 https://bugs.webkit.org/show_bug.cgi?id=185138
3779 The older OpenSSL manual says the locking_function and threadid_function should
3780 be set when use it in multi-threading environment. This applies to LibreSSL also.
3781 https://www.openssl.org/docs/man1.0.2/crypto/threads.html
3783 For unix and other similar os, the default threadId_function implementation is
3784 good enough. We'll set custom callback only for Windows OS.
3786 Note it's not required for OpenSSL 1.1.0 and after.
3787 https://www.openssl.org/blog/blog/2017/02/21/threads/
3789 Reviewed by Per Arne Vollan.
3791 * platform/network/curl/CurlSSLHandle.cpp:
3792 (WebCore::CurlSSLHandle::CurlSSLHandle):
3793 (WebCore::CurlSSLHandle::ThreadSupport::ThreadSupport):
3794 (WebCore::CurlSSLHandle::ThreadSupport::lockingCallback):
3795 (WebCore::CurlSSLHandle::ThreadSupport::threadIdCallback):
3796 * platform/network/curl/CurlSSLHandle.h:
3797 (WebCore::CurlSSLHandle::ThreadSupport::setup):
3798 (WebCore::CurlSSLHandle::ThreadSupport::singleton):
3799 (WebCore::CurlSSLHandle::ThreadSupport::lock):
3800 (WebCore::CurlSSLHandle::ThreadSupport::unlock):
3802 2018-05-02 Ryosuke Niwa <rniwa@webkit.org>
3804 Remove superfluous check for a null attribute value check in Element::removeAttributeInternal
3805 https://bugs.webkit.org/show_bug.cgi?id=185227
3807 Reviewed by Chris Dumez.
3809 Removed the check. The attribute value string can never be null.
3812 (WebCore::Element::removeAttributeInternal):
3814 2018-05-02 Zalan Bujtas <zalan@apple.com>
3816 [LFC] Implement LayoutContext::createDisplayBox
3817 https://bugs.webkit.org/show_bug.cgi?id=185158
3819 Reviewed by Antti Koivisto.
3821 Now compute*() functions take both the const layout and the corresponding non-const display boxes.
3822 Display boxes are owned by the LayoutContext and they don't form a tree structure (only implicitly through the layout tree).
3823 (This might need to change in the future if we decide to arrange them in some sort of painting order)
3825 * layout/FloatingContext.cpp:
3826 (WebCore::Layout::FloatingContext::computePosition):
3827 * layout/FloatingContext.h:
3828 * layout/FormattingContext.cpp:
3829 (WebCore::Layout::FormattingContext::computeStaticPosition const):
3830 (WebCore::Layout::FormattingContext::computeInFlowPositionedPosition const):
3831 (WebCore::Layout::FormattingContext::computeOutOfFlowPosition const):
3832 (WebCore::Layout::FormattingContext::computeWidth const):
3833 (WebCore::Layout::FormattingContext::computeHeight const):
3834 (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
3835 (WebCore::Layout::FormattingContext::computeFloatingWidth const):
3836 (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
3837 (WebCore::Layout::FormattingContext::computeFloatingHeight const):
3838 * layout/FormattingContext.h:
3839 * layout/LayoutContext.cpp:
3840 (WebCore::Layout::LayoutContext::createDisplayBox):
3841 * layout/LayoutContext.h:
3842 (WebCore::Layout::LayoutContext::displayBoxForLayoutBox const):
3843 * layout/blockformatting/BlockFormattingContext.cpp:
3844 (WebCore::Layout::BlockFormattingContext::layout const):
3845 (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
3846 (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
3847 (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
3848 * layout/blockformatting/BlockFormattingContext.h:
3849 * layout/displaytree/DisplayBox.h:
3850 (WebCore::Display::Box::parent const): Deleted.
3851 (WebCore::Display::Box::nextSibling const): Deleted.
3852 (WebCore::Display::Box::previousSibling const): Deleted.
3853 (WebCore::Display::Box::firstChild const): Deleted.
3854 (WebCore::Display::Box::lastChild const): Deleted.
3855 (WebCore::Display::Box::setParent): Deleted.
3856 (WebCore::Display::Box::setNextSibling): Deleted.
3857 (WebCore::Display::Box::setPreviousSibling): Deleted.
3858 (WebCore::Display::Box::setFirstChild): Deleted.
3859 (WebCore::Display::Box::setLastChild): Deleted.
3861 * layout/inlineformatting/InlineFormattingContext.cpp:
3862 (WebCore::Layout::InlineFormattingContext::computeInFlowWidth const):
3863 (WebCore::Layout::InlineFormattingContext::computeInFlowHeight const):
3864 * layout/inlineformatting/InlineFormattingContext.h:
3866 2018-05-02 Said Abou-Hallawa <sabouhallawa@apple.com>
3868 Hiding then showing an <object> of type image makes the underlaying image disappear
3869 https://bugs.webkit.org/show_bug.cgi?id=185216
3870 <rdar://problem/39055630>
3872 Reviewed by Youenn Fablet.
3874 Ensure the HTMLPlugInImageElement updates the RenderImageResource of its
3875 RenderImage with the CachedImage of its ImageLoader when the RenderImage
3878 Test: fast/images/object-image-hide-show.html
3880 * html/HTMLPlugInImageElement.cpp:
3881 (WebCore::HTMLPlugInImageElement::didAttachRenderers):
3882 This is very similar to what we do in HTMLImageElement::didAttachRenderers().
3885 2018-05-02 Brent Fulgham <bfulgham@apple.com>
3887 Use RetainPtr for form input type
3888 https://bugs.webkit.org/show_bug.cgi?id=185210
3889 <rdar://problem/39734040>
3891 Reviewed by Ryosuke Niwa.
3893 Refactor our HTMLInputElement class to store its InputType member as a RefPtr.
3895 Test: fast/forms/access-key-mutation-2.html.
3897 * html/HTMLInputElement.cpp:
3898 (WebCore::HTMLInputElement::HTMLInputElement):
3899 (WebCore::HTMLInputElement::didAddUserAgentShadowRoot):
3900 (WebCore::HTMLInputElement::accessKeyAction):
3901 (WebCore::HTMLInputElement::parseAttribute):
3902 (WebCore::HTMLInputElement::appendFormData):
3903 * html/HTMLInputElement.h:
3904 * html/InputType.cpp:
3905 (WebCore::createInputType):
3906 (WebCore::InputType::create):
3907 (WebCore::InputType::createText):
3910 2018-05-01 Yusuke Suzuki <utatane.tea@gmail.com>
3912 Use pointer instead of std::optional<std::reference_wrapper<>>
3913 https://bugs.webkit.org/show_bug.cgi?id=185186
3915 Reviewed by Alex Christensen.
3917 std::optional<T&> is not accepted in C++17 spec. So we replaced it
3918 with std::optional<std::reference_wrapper<T>>.
3920 In this patch, we replace it with T*, which is well-aligned to
3921 WebKit's convention.
3923 * Modules/mediastream/RTCPeerConnection.cpp:
3924 (WebCore::iceServersFromConfiguration):
3925 (WebCore::RTCPeerConnection::initializeConfiguration):
3926 (WebCore::RTCPeerConnection::setConfiguration):
3927 * css/parser/CSSParser.cpp:
3928 (WebCore::CSSParser::parseSystemColor):
3929 * css/parser/CSSParser.h:
3930 * dom/DatasetDOMStringMap.cpp:
3931 (WebCore::DatasetDOMStringMap::item const):
3932 (WebCore::DatasetDOMStringMap::namedItem const):
3933 * dom/DatasetDOMStringMap.h:
3935 (WebCore::Element::insertAdjacentHTML):
3937 * html/canvas/CanvasStyle.cpp:
3938 (WebCore::parseColor):
3939 * inspector/DOMEditor.cpp:
3940 * platform/network/curl/CurlFormDataStream.cpp:
3941 (WebCore::CurlFormDataStream::getPostData):
3942 * platform/network/curl/CurlFormDataStream.h:
3943 * platform/network/curl/CurlRequest.cpp:
3944 (WebCore::CurlRequest::setupPOST):
3945 * testing/MockCDMFactory.cpp:
3946 (WebCore::MockCDMFactory::keysForSessionWithID const):
3947 (WebCore::MockCDMInstance::updateLicense):
3948 * testing/MockCDMFactory.h:
3950 2018-05-02 Keith Rollin <krollin@apple.com>
3952 Add facility for tracking times and results of page and resource loading
3953 https://bugs.webkit.org/show_bug.cgi?id=184838
3954 <rdar://problem/36548974>
3956 Reviewed by Brent Fulgham.
3958 Update FrameProgressTracker to send the necessary page load start/stop
3959 signals so that we can track the entire page load at a network level.
3960 Add an empty override of the pure virtual
3961 LoaderStrategy::pageLoadCompleted method.
3963 No new tests. There is no testable effect from these changes. On
3964 Cocoa, measurable changes take place in another (non-WebKit) process.
3965 On non-Cocoa systems, this facility is currently disabled.
3967 * loader/FrameLoader.cpp:
3968 (WebCore::FrameLoader::FrameProgressTracker::progressCompleted):
3969 * loader/LoaderStrategy.h:
3971 2018-05-02 Aditya Keerthi <akeerthi@apple.com>
3973 Can't copy and paste URLs that have no title into Mail (macOS)
3974 https://bugs.webkit.org/show_bug.cgi?id=185205
3975 <rdar://problem/36352406>
3977 Reviewed by Tim Horton.
3979 The pasteboardURL generated has an empty title for URLs without titles. Currently, the pasteboardURL.title is being saved to the pasteboard.
3981 To fix the error, we check whether the title is empty and instead save the lastPathComponent to the pasteboard. This matches current behavior as the fallback title.
3983 Augmented WebKitLegacy.ContextMenuCanCopyURL test
3985 * platform/mac/PasteboardMac.mm:
3986 (WebCore::writeURLForTypes):
3988 2018-05-01 Ryosuke Niwa <rniwa@webkit.org>
3990 REGRESSION(r225868): Release assert when removing an SVGUseElement from Document::m_svgUseElements
3991 https://bugs.webkit.org/show_bug.cgi?id=182188
3992 <rdar://problem/36689240>
3994 Reviewed by Antti Koivisto.