1 2017-08-14 Jer Noble <jer.noble@apple.com>
3 Obj-C exception crash in AVStreamSession when using EME in Private Browsing mode
4 https://bugs.webkit.org/show_bug.cgi?id=175547
6 Reviewed by Eric Carlson.
8 When the storagePath() is empty, do not use those AVStreamSession APIs which require a valid file path to stored
9 proof-of-key-release data.
11 Drive-by fix: return emptyString() from HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory() when in Private
12 Browsing mode, to match the behavior of WebKitMediaKeySession.
14 * html/HTMLMediaElement.cpp:
15 (WebCore::HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory const):
16 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
17 (WebCore::CDMSessionAVStreamSession::releaseKeys):
18 (WebCore::CDMSessionAVStreamSession::update):
19 (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
21 2017-08-14 Andy Estes <aestes@apple.com>
23 REGRESSION (r220456): Crash in PreviewLoader::shouldCreateForMIMEType() when a ResourceResponse has a null MIME type
24 https://bugs.webkit.org/show_bug.cgi?id=175548
25 <rdar://problem/33866206>
27 Reviewed by Brady Eidson.
29 New API test: QuickLook.ShouldCreateForMIMEType
31 * WebCore.xcodeproj/project.pbxproj:
32 * loader/ios/PreviewLoader.h:
33 * loader/ios/PreviewLoader.mm:
34 (WebCore::PreviewLoader::shouldCreateForMIMEType): Check if mimeType is a null String before
35 calling HashSet::contains().
37 2017-08-14 Andy Estes <aestes@apple.com>
39 [Apple Pay] Add support for phonetic contact names
40 https://bugs.webkit.org/show_bug.cgi?id=175537
41 <rdar://problem/32002644>
43 Reviewed by Tim Horton.
45 * Modules/applepay/ApplePayError.idl: Defined "phoneticName" in ApplePayErrorContactField.
46 * Modules/applepay/ApplePayPaymentContact.h: Defined phoneticGivenName and phoneticFamilyName
47 in ApplePayPaymentContact.
48 * Modules/applepay/ApplePayPaymentContact.idl: Ditto.
49 * Modules/applepay/ApplePayPaymentRequest.h: Defined PhoneticName in
50 ApplePayPaymentRequest::ContactField.
51 * Modules/applepay/ApplePayPaymentRequest.idl: Defined "phoneticName" in ApplePayContactField.
52 * Modules/applepay/ApplePaySession.cpp:
53 (WebCore::convertAndValidate): Added a version parameter. Added code to convert
54 ContactField::PhoneticName, throwing an exception if version is less than 3.
55 * Modules/applepay/PaymentContact.h: Added a version parameter to fromApplePayPaymentContact().
56 * Modules/applepay/PaymentRequest.h: Defined phoneticName in PaymentRequest::ContactFields
57 and defined PhoneticName in PaymentError::ContactField.
58 * Modules/applepay/cocoa/PaymentContactCocoa.mm:
59 (WebCore::convert): Added a version parameter. Set a phoneticRepresentation on the
60 PKContact's name if there are non-empty phonetic names and version is 3 or greater.
61 (WebCore::PaymentContact::fromApplePayPaymentContact): Passed version to convert().
63 2017-08-14 Said Abou-Hallawa <sabouhallawa@apple.com>
65 The none smooth stroke applied to an SVG shape breaks its hit testing
66 https://bugs.webkit.org/show_bug.cgi?id=175506
68 Reviewed by Simon Fraser.
70 Clear RenderSVGShape::m_path when calling RenderSVGRect::updateShapeFromElement().
71 The m_path will be recalculated when RenderSVGShape::updateShapeFromElement()
72 is called from RenderSVGRect::shapeDependentStrokeContains().
74 Test: svg/stroke/stroke-linejoin-click.html
76 * rendering/svg/RenderSVGRect.cpp:
77 (WebCore::RenderSVGRect::updateShapeFromElement):
78 * rendering/svg/RenderSVGShape.h:
79 (WebCore::RenderSVGShape::clearPath):
81 2017-08-14 Adrian Perez de Castro <aperez@igalia.com>
83 [WPE] Implement WebCore::standardUserAgent()
84 https://bugs.webkit.org/show_bug.cgi?id=175507
86 Reviewed by Michael Catanzaro.
88 Remove "_GLIB" from user-agent version macros.
90 * platform/glib/UserAgentGLib.cpp:
91 (WebCore::versionForUAString):
93 2017-08-14 Chris Dumez <cdumez@apple.com>
95 Unreviewed, rollout r220622 & r220696
96 https://bugs.webkit.org/show_bug.cgi?id=175482
97 <rdar://problem/33860695>
99 Seems to have caused failures on iOS.
102 * Modules/beacon/NavigatorBeacon.cpp:
103 (WebCore::NavigatorBeacon::sendBeacon):
104 * Modules/fetch/FetchBodyOwner.cpp:
105 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
106 (WebCore::FetchBodyOwner::BlobLoader::didFail):
107 * Modules/fetch/FetchBodyOwner.h:
108 * Modules/fetch/FetchLoader.cpp:
109 (WebCore::FetchLoader::start):
110 (WebCore::FetchLoader::didFail):
111 * Modules/fetch/FetchLoaderClient.h:
112 * Modules/fetch/FetchResponse.cpp:
113 (WebCore::FetchResponse::BodyLoader::didFail):
114 * Modules/fetch/FetchResponse.h:
115 * WebCore.xcodeproj/project.pbxproj:
116 * loader/DocumentThreadableLoader.cpp:
117 (WebCore::DocumentThreadableLoader::loadRequest):
118 * loader/cache/CachedRawResource.cpp:
119 (WebCore::CachedRawResource::finishLoading):
120 * loader/cache/CachedResource.cpp:
121 (WebCore::CachedResource::load):
122 * loader/cache/CachedResource.h:
123 (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
124 * loader/cache/CachedResourceLoader.cpp:
125 (WebCore::createResource):
126 (WebCore::CachedResourceLoader::requestImage):
127 (WebCore::CachedResourceLoader::requestFont):
128 (WebCore::CachedResourceLoader::requestTextTrack):
129 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
130 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
131 (WebCore::CachedResourceLoader::requestScript):
132 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
133 (WebCore::CachedResourceLoader::requestSVGDocument):
134 (WebCore::CachedResourceLoader::requestLinkResource):
135 (WebCore::CachedResourceLoader::requestMedia):
136 (WebCore::CachedResourceLoader::requestIcon):
137 (WebCore::CachedResourceLoader::requestRawResource):
138 (WebCore::CachedResourceLoader::requestBeaconResource):
139 (WebCore::CachedResourceLoader::requestMainResource):
140 (WebCore::CachedResourceLoader::requestResource):
141 (WebCore::CachedResourceLoader::preload):
142 * loader/cache/CachedResourceLoader.h:
143 * loader/cache/KeepaliveRequestTracker.cpp: Removed.
144 * loader/cache/KeepaliveRequestTracker.h: Removed.
145 * platform/network/FormData.cpp:
146 (WebCore::FormData::appendFile):
147 (WebCore::FormData::appendFileRange):
148 (WebCore::FormData::appendBlob):
149 (WebCore::FormData::expandDataStore):
150 * platform/network/FormData.h:
152 2017-08-14 Daniel Bates <dabates@apple.com>
154 [css-ui] Implement caret-color support
155 https://bugs.webkit.org/show_bug.cgi?id=166572
156 <rdar://problem/33852589>
158 Reviewed by David Hyatt.
160 Add support for the CSS property caret-color as per <https://www.w3.org/TR/css-ui-3/#caret-color> (02 March 2017).
161 The property caret-color specifies the color of the text insertion caret in an editable element,
162 say an HTML textarea element.
164 Unlike other CSS color properties caret-color can have value "auto" and this is its initial
165 value. Internally we treat value "auto" as an invalid caret color to simplify the code.
167 Tests: editing/pasteboard/preserve-caret-color.html
168 fast/css/caret-color-auto.html
169 fast/css/caret-color-fallback-to-color.html
170 fast/css/caret-color-inherit.html
171 fast/css/caret-color-span-inside-editable-parent.html
172 fast/css/caret-color.html
173 fast/history/visited-link-caret-color.html
175 * css/CSSComputedStyleDeclaration.cpp:
176 (WebCore::ComputedStyleExtractor::propertyValue):
177 * css/CSSProperties.json: Add property caret-color. We represent the initial "auto" Also, fix up
178 wording in a comment while I am here.
179 * css/StyleResolver.cpp:
180 (WebCore::isValidVisitedLinkProperty): Add caret-color to the list of properties that can be
181 applied to visited hyperlinks.
182 * css/parser/CSSParserFastPaths.cpp:
183 (WebCore::parseCaretColor): Added.
184 (WebCore::CSSParserFastPaths::maybeParseValue): Unlike other CSS color properties caret-color
185 can be defined to be "auto". We explicitly check if the property is caret-color and use
186 parseCaretColor() to parse its value.
187 * css/parser/CSSPropertyParser.cpp:
188 (WebCore::consumeCaretColor): Added.
189 (WebCore::CSSPropertyParser::parseSingleValue): Similar to the change to CSSParserFastPaths::maybeParseValue()
190 use a dedicated code path to parse caret-color.
191 * editing/EditingStyle.cpp: Preserve caret-color during editing operations.
192 * editing/FrameSelection.cpp:
193 (WebCore::CaretBase::paintCaret const): Modified code to query property caret-color instead of
194 color for the color of the text insertion caret. Always honor the caret-color of the editable
195 element if it is valid color. Note that "caret-color: auto" is treated as an invalid color
196 internally. A caret-color can have an invalid color if its inherits from the CSS color property
197 with an invalid color. If caret-color is a valid color then we take it to be the color of the
198 text insertion caret. Otherwise, we do what we do today and use a heuristic to determine the
199 color of the text-insertion caret.
200 (WebCore::disappearsIntoBackground): Deleted; moved logic into CaretBase::paintCaret().
201 * page/animation/CSSPropertyAnimation.cpp:
202 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add property wrapper
203 to support animating caret-color.
204 * rendering/style/RenderStyle.cpp:
205 (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const): Modified to consider
206 changes to caret color.
207 (WebCore::RenderStyle::colorIncludingFallback const): Modified to compute the appropriate
208 color for property caret-color with respect to an unvisited or visited link.
209 * rendering/style/RenderStyle.h:
210 (WebCore::RenderStyle::setCaretColor): Added.
211 (WebCore::RenderStyle::setVisitedLinkCaretColor): Added.
212 (WebCore::RenderStyle::caretColor const): Added.
213 (WebCore::RenderStyle::visitedLinkCaretColor const): Added.
214 * rendering/style/StyleRareInheritedData.cpp:
215 (WebCore::StyleRareInheritedData::StyleRareInheritedData): Modified to consider caret color.
216 (WebCore::StyleRareInheritedData::operator== const): Ditto.
217 * rendering/style/StyleRareInheritedData.h:
219 2017-08-14 Zan Dobersek <zdobersek@igalia.com>
221 REGRESSION(r220517-r220521) [GTK] Various compositing tests fail
222 https://bugs.webkit.org/show_bug.cgi?id=175478
224 Reviewed by Sergio Villar Senin.
226 Fix a regression introduced in r220519. Move a framebuffer binding in TextureMapperGL
227 away from GraphicsContext3D and onto the OpenGL API to work around the framebuffer
228 binding state that's kept in the GraphicsContext3D class. This mismatch in how the
229 framebuffer was bound was causing a couple of test failures in compositing tests.
231 No new tests -- regressed tests have their failure expectations removed.
233 * platform/graphics/texmap/TextureMapperGL.cpp:
234 (WebCore::TextureMapperGL::bindDefaultSurface): Don't use GraphicsContext3D for the
235 glBindFramebuffer() call. This would be done in subsequent patches that would move
236 TextureMapperGL off the GraphicsContext3D usage, but this specific use case clashes
237 with the framebuffer binding that's done in BitmapTextureGL and was causing test
240 2017-08-14 Chris Dumez <cdumez@apple.com>
242 Unreviewed fix after r220622 to address crashes on iOS.
244 * loader/cache/CachedRawResource.cpp:
245 (WebCore::CachedRawResource::finishLoading):
247 2017-08-14 Antti Koivisto <antti@apple.com>
249 Factor text autosizing into a class
250 https://bugs.webkit.org/show_bug.cgi?id=175530
252 Reviewed by Andreas Kling.
254 Move the remaining parts out of Document.
256 * css/StyleBuilderCustom.h:
257 (WebCore::computeLineHeightMultiplierDueToFontSize):
259 (WebCore::Document::destroyRenderTree):
260 (WebCore::Document::textAutoSizing):
261 (WebCore::TextAutoSizingTraits::constructDeletedValue): Deleted.
262 (WebCore::TextAutoSizingTraits::isDeletedValue): Deleted.
263 (WebCore::Document::addAutoSizedNode): Deleted.
264 (WebCore::Document::updateAutoSizedNodes): Deleted.
265 (WebCore::Document::clearAutoSizedNodes): Deleted.
267 * rendering/RenderBlockFlow.cpp:
268 (WebCore::RenderBlockFlow::adjustComputedFontSizes):
269 * rendering/RenderElement.cpp:
270 (WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
271 (WebCore::RenderElement::resetTextAutosizing):
272 * rendering/TextAutoSizing.cpp:
273 (WebCore::TextAutoSizingTraits::constructDeletedValue):
274 (WebCore::TextAutoSizingTraits::isDeletedValue):
275 (WebCore::TextAutoSizing::addTextNode):
276 (WebCore::TextAutoSizing::updateRenderTree):
277 (WebCore::TextAutoSizing::reset):
278 * rendering/TextAutoSizing.h:
280 2017-08-14 Antti Koivisto <antti@apple.com>
282 [Render Tree Mutation] First letter should not mutate the render tree while in layout.
283 https://bugs.webkit.org/show_bug.cgi?id=163848
285 Reviewed by Zalan Bujtas.
287 RenderBlock::updateFirstLetter shouldn't be called during layout. Instead it should
288 be invoked by the RenderTreeUpdater.
290 With this future patches can move updateFirstLetter() and the related functions
291 completely out of the render tree.
293 * rendering/RenderBlock.cpp:
294 (WebCore::RenderBlock::layout):
296 No more updateFirstLetter calls during layout...
298 (WebCore::RenderBlock::computePreferredLogicalWidths):
300 ...or preferred width computation.
302 (WebCore::RenderBlock::updateFirstLetter):
303 * rendering/RenderBlock.h:
304 * rendering/RenderRubyRun.cpp:
305 (WebCore::RenderRubyRun::updateFirstLetter):
306 * rendering/RenderRubyRun.h:
307 * rendering/RenderTable.cpp:
308 (WebCore::RenderTable::updateFirstLetter):
309 * rendering/RenderTable.h:
310 * rendering/svg/RenderSVGText.cpp:
311 (WebCore::RenderSVGText::updateFirstLetter):
312 * rendering/svg/RenderSVGText.h:
313 * style/RenderTreeUpdater.cpp:
314 (WebCore::RenderTreeUpdater::popParent):
316 Call updateFirstLetter when closing the element. All of of descedant renderers are known here
317 so this can be resolved correctly.
319 2017-08-13 Manuel Rego Casasnovas <rego@igalia.com>
321 Composition underline color is always black
322 https://bugs.webkit.org/show_bug.cgi?id=174675
324 Reviewed by Ryosuke Niwa.
326 This patch uses the current color of the text instead of black
327 for the composition underline marker.
328 This makes it visible in the case we have a black/dark background.
330 Test: editing/composition-underline-color.html
332 * editing/CompositionUnderline.h:
333 (WebCore::CompositionUnderline::CompositionUnderline):
334 Added new attribute compositionUnderlineColor.
335 * rendering/InlineTextBox.cpp:
336 (WebCore::InlineTextBox::paintCompositionUnderline):
337 Use the text color if compositionUnderlineColor is TextColor.
339 2017-08-13 Carlos Garcia Campos <cgarcia@igalia.com>
341 [GTK] stop kinetic scrolling when a zero movement is reached
342 https://bugs.webkit.org/show_bug.cgi?id=175468
344 Reviewed by Michael Catanzaro.
346 This is GTK+ change by Christian Hergert.
347 https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=4f63d839550f7a9038b391e7d3e1e6fc8bdfafa6
349 When the kinetic scrolling reduces its speed, there can be multiple frames where the movement is zero pixels,
350 followed by a 1 pixel movement later on. This causes a "jitter" right at the end of the scroll which makes it
351 feel less quality than other platforms. Instead, we should just clamp it as soon as we get a zero movement.
353 * platform/ScrollAnimationKinetic.cpp:
354 (WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll):
356 2017-08-13 Chris Dumez <cdumez@apple.com>
358 Drop non-const getter for CachedResource::resourceRequest()
359 https://bugs.webkit.org/show_bug.cgi?id=175524
361 Reviewed by Youenn Fablet.
363 Drop non-const getter for CachedResource::resourceRequest(). It would be unsafe to modify the request of a CachedResource
364 after it has been cached. Exposing such a getter is therefore a footgun.
366 * loader/LinkLoader.cpp:
367 (WebCore::LinkLoader::preloadIfNeeded):
368 * loader/cache/CachedImage.cpp:
369 (WebCore::CachedImage::CachedImage):
370 * loader/cache/CachedImage.h:
371 * loader/cache/CachedResource.cpp:
372 (WebCore::CachedResource::CachedResource):
373 * loader/cache/CachedResource.h:
374 (WebCore::CachedResource::resourceRequest const):
375 (WebCore::CachedResource::ignoreForRequestCount const):
376 (WebCore::CachedResource::setIgnoreForRequestCount):
377 * loader/cache/CachedResourceLoader.cpp:
378 (WebCore::CachedResourceLoader::requestResource):
379 * loader/cache/CachedResourceRequest.h:
380 (WebCore::CachedResourceRequest::ignoreForRequestCount const):
381 (WebCore::CachedResourceRequest::setIgnoreForRequestCount):
382 * loader/cache/MemoryCache.cpp:
383 (WebCore::MemoryCache::addImageToCache):
384 * platform/network/ResourceRequestBase.h:
386 2017-08-13 Adrian Perez de Castro <aperez@igalia.com>
388 [WPE] Implement WebCore::standardUserAgent()
389 https://bugs.webkit.org/show_bug.cgi?id=175507
391 Reviewed by Carlos Alberto Lopez Perez.
393 Implement missing User-Agent handling for the WPE port by sharing the code with the GTK+ port.
395 * PlatformGTK.cmake: Handlde renaming of UserAgentGtk.cpp to UserAgentGLib.cpp.
396 * PlatformWPE.cmake: Add UserAgentGLib.cpp and UserAgentQuirks.cpp to the list of built WebCore sources.
397 * platform/glib/UserAgentGLib.cpp: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.cpp.
398 (WebCore::versionForUAString): Change "GTK" in UA version macros to "GLIB".
400 2017-08-11 Ryosuke Niwa <rniwa@webkit.org>
402 Replace DATA_TRANSFER_ITEMS by a runtime flag and add a stub implementation
403 https://bugs.webkit.org/show_bug.cgi?id=175474
404 <rdar://problem/33844628>
406 Reviewed by Wenson Hsieh.
408 Replaced the build flag by a runtime flag and added a stub implementation for DataTransferItemList
409 and DataTransferItem to make it compile. DataTransferItemList is created lazily by DataTransfer.items,
410 and its lifetime is tied to DataTransfer by forwarding ref and deref.
412 See https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitemlist-interface
414 Tests: editing/pasteboard/datatransfer-idl.html
417 * Configurations/FeatureDefines.xcconfig:
418 * WebCore.xcodeproj/project.pbxproj:
419 * dom/DataTransfer.cpp:
420 (WebCore::DataTransfer::items): Added. Create DataTransferItemList lazily
421 * dom/DataTransfer.h:
422 * dom/DataTransfer.idl:
423 * dom/DataTransferItem.cpp:
424 (WebCore::DataTransferItem::DataTransferItem): Added a stub implementation.
425 (WebCore::DataTransferItem::~DataTransferItem): Ditto.
426 (WebCore::DataTransferItem::getAsString const): Ditto.
427 (WebCore::DataTransferItem::getAsFile const): Ditto.
428 * dom/DataTransferItem.h:
429 (WebCore::DataTransferItemList): Devirtualized functions.
430 (WebCore::DataTransferItemList::kind const):
431 (WebCore::DataTransferItemList::type const):
432 * dom/DataTransferItem.idl:
433 * dom/DataTransferItemList.cpp: Added.
434 (WebCore::DataTransferItemList::length const): Added a stub implementation.
435 (WebCore::DataTransferItemList::item): Ditto.
436 (WebCore::DataTransferItemList::add): Ditto.
437 (WebCore::DataTransferItemList::remove): Ditto.
438 (WebCore::DataTransferItemList::clear): Ditto.
439 * dom/DataTransferItemList.h:
440 (WebCore::DataTransferItemList::DataTransferItemList):
441 (WebCore::DataTransferItemList::~DataTransferItemList): Deleted.
442 (WebCore::DataTransferItemList::ref): Forwards to DataTransfer's ref.
443 (WebCore::DataTransferItemList::deref): Ditto.
444 * dom/DataTransferItemList.idl: Updated to match the latest specification.
445 * page/RuntimeEnabledFeatures.h:
446 (WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled): Added.
447 (WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled const): Added.
449 2017-08-11 Brady Eidson <beidson@apple.com>
451 Move files inside WebCore/workers to WebCore/workers/service.
452 https://bugs.webkit.org/show_bug.cgi?id=175495
454 Rubberstamped by Tim Horton.
457 * DerivedSources.make:
458 * WebCore.xcodeproj/project.pbxproj:
460 * workers/service/ServiceWorker.cpp: Renamed from Source/WebCore/workers/ServiceWorker.cpp.
461 * workers/service/ServiceWorker.h: Renamed from Source/WebCore/workers/ServiceWorker.h.
462 * workers/service/ServiceWorker.idl: Renamed from Source/WebCore/workers/ServiceWorker.idl.
463 * workers/service/ServiceWorkerContainer.cpp: Renamed from Source/WebCore/workers/ServiceWorkerContainer.cpp.
464 * workers/service/ServiceWorkerContainer.h: Renamed from Source/WebCore/workers/ServiceWorkerContainer.h.
465 * workers/service/ServiceWorkerContainer.idl: Renamed from Source/WebCore/workers/ServiceWorkerContainer.idl.
466 * workers/service/ServiceWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.cpp.
467 * workers/service/ServiceWorkerGlobalScope.h: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.h.
468 * workers/service/ServiceWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.idl.
469 * workers/service/ServiceWorkerJob.cpp: Renamed from Source/WebCore/workers/ServiceWorkerJob.cpp.
470 * workers/service/ServiceWorkerJob.h: Renamed from Source/WebCore/workers/ServiceWorkerJob.h.
471 * workers/service/ServiceWorkerJobClient.h: Renamed from Source/WebCore/workers/ServiceWorkerJobClient.h.
472 * workers/service/ServiceWorkerProvider.cpp: Renamed from Source/WebCore/workers/ServiceWorkerProvider.cpp.
473 * workers/service/ServiceWorkerProvider.h: Renamed from Source/WebCore/workers/ServiceWorkerProvider.h.
474 * workers/service/ServiceWorkerRegistration.cpp: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.cpp.
475 * workers/service/ServiceWorkerRegistration.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.h.
476 * workers/service/ServiceWorkerRegistration.idl: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.idl.
477 * workers/service/ServiceWorkerRegistrationOptions.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationOptions.h.
478 * workers/service/ServiceWorkerRegistrationParameters.cpp: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationParameters.cpp.
479 * workers/service/ServiceWorkerRegistrationParameters.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationParameters.h.
480 * workers/service/ServiceWorkerUpdateViaCache.h: Renamed from Source/WebCore/workers/ServiceWorkerUpdateViaCache.h.
481 * workers/service/ServiceWorkerUpdateViaCache.idl: Renamed from Source/WebCore/workers/ServiceWorkerUpdateViaCache.idl.
483 2017-08-11 Chris Dumez <cdumez@apple.com>
485 Implement quota limitation for keepalive Fetch requests
486 https://bugs.webkit.org/show_bug.cgi?id=175482
488 Reviewed by Sam Weinig and Youenn Fablet.
490 Implement quota limitation for keepalive Fetch requests as per:
491 - https://fetch.spec.whatwg.org/#http-network-or-cache-fetch (Step 9)
493 This partly works for Beacon as well, meaning that no Beacon with a body
494 over 64Kb can be sent. However, we don't keep track about wether or not
495 beacon loads are inflight or not.
497 Also update CachedResourceLoader::requestResource() so that the caller
498 can get a ResourceError when it returns null. This is useful for both
499 Fetch and Beacon to return better error messages.
501 Test: http/wpt/beacon/beacon-quota.html
504 * Modules/beacon/NavigatorBeacon.cpp:
505 (WebCore::NavigatorBeacon::sendBeacon):
506 * Modules/fetch/FetchBodyOwner.cpp:
507 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
508 (WebCore::FetchBodyOwner::BlobLoader::didFail):
509 * Modules/fetch/FetchBodyOwner.h:
510 * Modules/fetch/FetchLoader.cpp:
511 (WebCore::FetchLoader::start):
512 (WebCore::FetchLoader::didFail):
513 * Modules/fetch/FetchLoaderClient.h:
514 * Modules/fetch/FetchResponse.cpp:
515 (WebCore::FetchResponse::BodyLoader::didFail):
516 * Modules/fetch/FetchResponse.h:
517 * WebCore.xcodeproj/project.pbxproj:
518 * loader/DocumentThreadableLoader.cpp:
519 (WebCore::DocumentThreadableLoader::loadRequest):
520 * loader/cache/CachedResource.cpp:
521 (WebCore::CachedResource::load):
522 * loader/cache/CachedResource.h:
523 (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
524 * loader/cache/CachedResourceLoader.cpp:
525 (WebCore::createResource):
526 (WebCore::CachedResourceLoader::requestImage):
527 (WebCore::CachedResourceLoader::requestFont):
528 (WebCore::CachedResourceLoader::requestTextTrack):
529 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
530 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
531 (WebCore::CachedResourceLoader::requestScript):
532 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
533 (WebCore::CachedResourceLoader::requestSVGDocument):
534 (WebCore::CachedResourceLoader::requestLinkResource):
535 (WebCore::CachedResourceLoader::requestMedia):
536 (WebCore::CachedResourceLoader::requestIcon):
537 (WebCore::CachedResourceLoader::requestRawResource):
538 (WebCore::CachedResourceLoader::requestBeaconResource):
539 (WebCore::CachedResourceLoader::requestMainResource):
540 (WebCore::CachedResourceLoader::requestResource):
541 (WebCore::CachedResourceLoader::preload):
542 * loader/cache/CachedResourceLoader.h:
543 * loader/cache/KeepaliveRequestTracker.cpp: Added.
544 (WebCore::KeepaliveRequestTracker::~KeepaliveRequestTracker):
545 (WebCore::KeepaliveRequestTracker::canLoadRequest):
546 (WebCore::KeepaliveRequestTracker::registerRequest):
547 (WebCore::KeepaliveRequestTracker::responseReceived):
548 (WebCore::KeepaliveRequestTracker::notifyFinished):
549 (WebCore::KeepaliveRequestTracker::unregisterRequest):
550 * loader/cache/KeepaliveRequestTracker.h: Added.
551 * platform/network/FormData.cpp:
552 (WebCore::FormDataElement::lengthInBytes const):
553 (WebCore::FormData::lengthInBytes const):
554 * platform/network/FormData.h:
556 2017-08-11 Don Olmstead <don.olmstead@sony.com>
558 [WTF] Move ValueToString into WTF
559 https://bugs.webkit.org/show_bug.cgi?id=175469
561 Reviewed by Sam Weinig.
563 No new tests. No change in behavior.
565 * WebCore.xcodeproj/project.pbxproj:
566 * html/HTMLMediaElement.h:
567 (WTF::ValueToString<WebCore::TextTrackCue::string):
568 (WebCore::ValueToString<TextTrackCue::string): Deleted.
569 (WebCore::ValueToString<MediaTime>::string): Deleted.
570 * platform/LayoutUnit.h:
571 (WTF::ValueToString<WebCore::LayoutUnit>::string):
572 (WebCore::ValueToString<LayoutUnit>::string): Deleted.
573 * platform/PODInterval.h:
574 * platform/PODIntervalTree.h:
575 * platform/PODRedBlackTree.h:
576 * platform/graphics/FloatPolygon.h:
577 (WTF::ValueToString<WebCore::FloatPolygonEdge::string):
578 (WebCore::ValueToString<FloatPolygonEdge::string): Deleted.
579 * rendering/FloatingObjects.h:
580 (WTF::ValueToString<WebCore::FloatingObject::string):
581 (WebCore::ValueToString<FloatingObject::string): Deleted.
582 * rendering/RenderFlowThread.h:
583 (WTF::ValueToString<WebCore::RenderRegion::string):
584 (WebCore::ValueToString<RenderRegion::string): Deleted.
586 2017-08-11 Sam Weinig <sam@webkit.org>
588 [Bindings] Simplify DOMPromiseProxy now that WTF::Function can return references
589 https://bugs.webkit.org/show_bug.cgi?id=175394
591 Reviewed by Chris Dumez.
593 * bindings/IDLTypes.h:
594 (WebCore::IDLWrapper::convertToParameterType): Deleted.
596 Remove no longer used convertToParameterType.
598 * bindings/js/DOMPromiseProxy.h:
600 - Replace Variant<Value, Exception> with ExceptionOr<Value> / ExceptionOr<void>.
601 - Update ResolveCallback to have a return type of IDLType::ParameterType, rather than
602 IDLType::ImplementationType, now that WTF::Function supports references as the
603 return type. This is needed, since the IDLType::ParameterType for an interface T
608 * css/FontFaceSet.cpp:
611 Update resolve callbacks to return a reference rather than a RefPtr, matching
612 the new signature requirement.
614 2017-08-11 Sam Weinig <sam@webkit.org>
616 [WebIDL] Replace JSCryptoKeyCustom and JSCryptoAlgorithmBuilder with generated code
617 https://bugs.webkit.org/show_bug.cgi?id=175457
619 Reviewed by Chris Dumez.
622 * DerivedSources.make:
623 * WebCore.xcodeproj/project.pbxproj:
624 * bindings/js/JSCryptoAlgorithmBuilder.cpp: Removed.
625 * bindings/js/JSCryptoAlgorithmBuilder.h: Removed.
626 * bindings/js/JSCryptoKeyCustom.cpp: Removed.
628 Remove JSCryptoAlgorithmBuilder and JSCryptoKeyCustom, add KeyAlgorithm
631 * crypto/CryptoKey.cpp:
632 * crypto/CryptoKey.h:
633 * crypto/CryptoKey.idl:
635 Replace custom algorithm attribute with a union of the supported key algorithms.
637 * crypto/keys/CryptoAesKeyAlgorithm.h: Added.
638 * crypto/keys/CryptoAesKeyAlgorithm.idl: Added.
639 * crypto/keys/CryptoEcKeyAlgorithm.h: Added.
640 * crypto/keys/CryptoEcKeyAlgorithm.idl: Added.
641 * crypto/keys/CryptoHmacKeyAlgorithm.h: Added.
642 * crypto/keys/CryptoHmacKeyAlgorithm.idl: Added.
643 * crypto/keys/CryptoKeyAlgorithm.h: Added.
644 * crypto/keys/CryptoKeyAlgorithm.idl: Added.
645 * crypto/keys/CryptoRsaHashedKeyAlgorithm.h: Added.
646 * crypto/keys/CryptoRsaHashedKeyAlgorithm.idl: Added.
647 * crypto/keys/CryptoRsaKeyAlgorithm.h: Added.
648 * crypto/keys/CryptoRsaKeyAlgorithm.idl: Added.
650 Add IDLs and headers fo the supported key algorithms.
652 * crypto/keys/CryptoKeyAES.h:
653 * crypto/keys/CryptoKeyEC.h:
654 * crypto/keys/CryptoKeyHMAC.h:
655 * crypto/keys/CryptoKeyRSA.h:
656 * crypto/keys/CryptoKeyRaw.h:
658 Give each of the existing KeyAlgorithm subclasses a dictionary() function
659 that returns the populated corresponding spec'd dictionary.
661 2017-08-11 Simon Fraser <simon.fraser@apple.com>
663 Some RenderSVGResource cleanup
664 https://bugs.webkit.org/show_bug.cgi?id=175494
666 Reviewed by Zalan Bujtas.
668 Use more initializers. Remove spurious use of bitfields that didn't save any space at all.
673 * rendering/svg/RenderSVGResourceContainer.cpp:
674 (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
675 * rendering/svg/RenderSVGResourceContainer.h:
676 * rendering/svg/RenderSVGResourceGradient.cpp:
677 (WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient):
678 (WebCore::RenderSVGResourceGradient::applyResource):
679 * rendering/svg/RenderSVGResourceGradient.h:
680 * rendering/svg/RenderSVGResourcePattern.cpp:
681 (WebCore::RenderSVGResourcePattern::RenderSVGResourcePattern):
682 * rendering/svg/RenderSVGResourcePattern.h:
683 * rendering/svg/RenderSVGShape.cpp:
684 (WebCore::RenderSVGShape::fillShape):
685 (WebCore::RenderSVGShape::strokeShape):
686 * rendering/svg/SVGRenderingContext.cpp:
687 (WebCore::SVGRenderingContext::~SVGRenderingContext):
688 (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
689 * rendering/svg/SVGRenderingContext.h:
690 (WebCore::SVGRenderingContext::SVGRenderingContext):
692 2017-08-11 Tim Horton <timothy_horton@apple.com>
694 Fix the build with modern Clang's -Wexpansion-to-defined
695 https://bugs.webkit.org/show_bug.cgi?id=175467
696 <rdar://problem/33667497>
698 Reviewed by Simon Fraser.
700 * crypto/mac/SerializedCryptoKeyWrapMac.mm:
702 2017-08-11 Brady Eidson <beidson@apple.com>
704 Crash under ServiceWorkerJob::failedWithException.
705 https://bugs.webkit.org/show_bug.cgi?id=175488
707 Reviewed by Tim Horton.
709 Covered by existing tests.
711 * workers/ServiceWorkerJob.cpp:
712 (WebCore::ServiceWorkerJob::failedWithException): jobDidFinish might cause the Job to be deleted, so make it last.
714 2017-08-10 Sam Weinig <sam@webkit.org>
716 WTF::Function does not allow for reference / non-default constructible return types
717 https://bugs.webkit.org/show_bug.cgi?id=175244
719 Reviewed by Chris Dumez.
721 * bindings/js/JSCustomElementInterface.h:
722 (WebCore::JSCustomElementInterface::invokeCallback):
723 Update the default value for the addArguments parameter to be an empty lambda, rather than
724 default initialization, which leads to a null WTF::Function. This allows us to remove support
725 for calling null WTF::Function. No change in behavior.
727 2017-08-11 Antti Koivisto <antti@apple.com>
729 Remove RenderQuote collection from RenderView
730 https://bugs.webkit.org/show_bug.cgi?id=175479
732 Reviewed by Andreas Kling.
734 We can do it well enough without maintaining this pointer structure.
736 Global updating doesn't work well with future direction for first-letter and similar anyway.
737 We need to update quote immediately when updating its style.
739 * rendering/RenderQuote.cpp:
740 (WebCore::RenderQuote::insertedIntoTree):
741 (WebCore::RenderQuote::willBeRemovedFromTree):
743 Just tell the view that there are renderers to update.
745 (WebCore::RenderQuote::styleDidChange):
746 (WebCore::RenderQuote::isOpen const):
747 (WebCore::RenderQuote::updateRenderer):
748 (WebCore::RenderQuote::updateRenderers): Deleted.
750 Update single renderer only. RenderTreeUpdater provides the previous renderer to compute the depth.
752 * rendering/RenderQuote.h:
753 * rendering/RenderView.cpp:
754 (WebCore::RenderView::registerQuote): Deleted.
755 (WebCore::RenderView::unregisterQuote): Deleted.
756 (WebCore::RenderView::updateSpecialRenderers): Deleted.
758 Remove the quote list.
760 * rendering/RenderView.h:
761 * style/RenderTreeUpdater.cpp:
762 (WebCore::RenderTreeUpdater::commit):
764 Ensure that all quotes are updated.
766 (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
767 (WebCore::RenderTreeUpdater::updateQuotesUpTo):
769 Traverse render tree to find quotes to update starting from the previous updated quote.
771 * style/RenderTreeUpdater.h:
773 2017-08-11 Adrian Perez de Castro <aperez@igalia.com>
775 [CMake] Many warning about missing “override” keywords in ANGLE with Clang
776 https://bugs.webkit.org/show_bug.cgi?id=175475
778 Reviewed by Michael Catanzaro.
780 * CMakeLists.txt: Add "-Wno-inconsistent-missing-override" to the
781 compiler flags using for building the ANGLE sources.
783 2017-08-11 Adrian Perez de Castro <aperez@igalia.com>
785 [GTK][WPE] Overriden virtual function not marked “override” in ImageBufferDataCairo.h
786 https://bugs.webkit.org/show_bug.cgi?id=175476
788 Reviewed by Carlos Garcia Campos.
790 * platform/graphics/cairo/ImageBufferDataCairo.h: Add missing "override" qualifier.
792 2017-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
794 [Soup] Cannot access HTTPS sites using a HTTP proxy that requires authentication
795 https://bugs.webkit.org/show_bug.cgi?id=175378
797 Reviewed by Sergio Villar Senin.
799 Bring back part of the code removed in r206732, to keep a reference to the SoupMessage in the
800 AuthenticationChallenge since it can be different to the resource message.
802 * platform/network/soup/AuthenticationChallenge.h:
803 (WebCore::AuthenticationChallenge::AuthenticationChallenge): Deleted.
804 (WebCore::AuthenticationChallenge::authenticationClient const): Deleted.
805 (WebCore::AuthenticationChallenge::soupAuth const): Deleted.
806 (WebCore::AuthenticationChallenge::setProposedCredential): Deleted.
807 * platform/network/soup/AuthenticationChallengeSoup.cpp:
808 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
809 (WebCore::AuthenticationChallenge::platformCompare):
811 2017-08-10 Dan Bernstein <mitz@apple.com>
813 Fixed building for macOS 10.12 with the macOS 10.13 SDK.
815 Suppressed the unguarded-availability-new warning around uses of AVSampleBufferAudioRenderer
816 and AVSampleBufferRenderSynchronizer. Even though the 10.13 SDK declares them as available
817 starting in that release, they have been available as SPI earlier.
819 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
820 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
821 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
822 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
823 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
824 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
825 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
826 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
827 (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
828 (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
829 (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
830 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
831 (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
832 (WebCore::SourceBufferPrivateAVFObjC::flush):
834 2017-08-10 Brady Eidson <beidson@apple.com>
836 Rename the source files for the WTF persistent coders.
837 https://bugs.webkit.org/show_bug.cgi?id=175441
839 Reviewed by Tim Horton.
841 * platform/network/NetworkLoadMetrics.h:
843 2017-08-10 Yusuke Suzuki <utatane.tea@gmail.com>
845 Make ThreadGlobalData RefCounted for web thread
846 https://bugs.webkit.org/show_bug.cgi?id=175439
848 Reviewed by Mark Lam.
850 When the web thread is enabled, we share ThreadGlobalData between the web thread and the main thread.
851 The problem happens when the main thread is dying. It could start deallocating TLS and the web
852 thread may see the destructed ThreadGlobalData.
854 Even though, the current implementation is safe because the main thread do not perform TLS deallocation
855 in the Darwin environment. But this is not true in Windows. And we should not rely on this condition
856 that depends on the platforms.
858 In this patch, we make ThreadGlobalData ThreadSafeRefCounted. This type verbosely describes that
859 ThreadGlobalData could be shared between threads when the web thread enabled. And make the life time
860 management simple instead of relying on the platform dependent TLS implementation.
862 * platform/ThreadGlobalData.cpp:
863 (WebCore::ThreadGlobalData::setWebCoreThreadData):
864 (WebCore::threadGlobalData):
865 * platform/ThreadGlobalData.h:
866 (WebCore::ThreadGlobalData::cachedResourceRequestInitiators): Deleted.
867 (WebCore::ThreadGlobalData::eventNames): Deleted.
868 (WebCore::ThreadGlobalData::threadTimers): Deleted.
869 (WebCore::ThreadGlobalData::qualifiedNameCache): Deleted.
870 (WebCore::ThreadGlobalData::cachedConverterICU): Deleted.
871 (WebCore::ThreadGlobalData::cachedConverterTEC): Deleted.
873 2017-08-10 Yusuke Suzuki <utatane.tea@gmail.com>
875 [JSC] Use @toNumber in builtins
876 https://bugs.webkit.org/show_bug.cgi?id=172692
878 Reviewed by Sam Weinig.
880 Use @toNumber bytecode intrinsic. It emits op_to_number, which efficiently converts
881 a given argument to a number.
883 * Modules/streams/ReadableByteStreamInternals.js:
884 (privateInitializeReadableByteStreamController):
885 (readableByteStreamControllerRespond):
886 * Modules/streams/StreamInternals.js:
887 (validateAndNormalizeQueuingStrategy):
888 (enqueueValueWithSize):
890 2017-08-10 Nan Wang <n_wang@apple.com>
892 AX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
893 https://bugs.webkit.org/show_bug.cgi?id=175340
894 <rdar://problem/33782159>
896 Reviewed by Chris Fleizach.
898 The issue here is that we manualy set the parent object of the AccessibilitySVGRoot object
899 and there are chances that the parent doesn't detach it properly during the parent's destroying
900 process. Accessing the stale parent object will lead to a crash.
901 Fixed this by making the parent object a weak pointer so we don't access an invalid memory.
903 Test: accessibility/add-children-pseudo-element.html
905 * accessibility/AccessibilityRenderObject.cpp:
906 (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
907 * accessibility/AccessibilityRenderObject.h:
908 (WebCore::AccessibilityRenderObject::createWeakPtr):
909 * accessibility/AccessibilitySVGRoot.cpp:
910 (WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
911 (WebCore::AccessibilitySVGRoot::setParent):
912 (WebCore::AccessibilitySVGRoot::parentObject const):
913 * accessibility/AccessibilitySVGRoot.h:
915 2017-08-10 Chris Dumez <cdumez@apple.com>
917 [Beacon] Do connect-src CSP check on redirects as well
918 https://bugs.webkit.org/show_bug.cgi?id=175410
919 <rdar://problem/33815470>
921 Reviewed by Youenn Fablet.
923 Pass ContentSecurityPolicy object to createPingHandle so that we can send
924 enough data to the NetworkProcess so do CSP checks for Ping loads such
925 as Beacon. For the IPC, we serialize the ContentSecurityPolicy's response
926 headers. Those headers are now cached in ContentSecurityPolicy for
927 performance reasons. CSP headers are rarely updated in practice but
928 sendBeacon() may get called repeatedly for a given document.
930 Tests: http/wpt/beacon/connect-src-beacon-redirect-allowed.sub.html
931 http/wpt/beacon/connect-src-beacon-redirect-blocked.sub.html
933 * loader/LoaderStrategy.h:
934 * loader/PingLoader.cpp:
935 (WebCore::PingLoader::loadImage):
936 (WebCore::PingLoader::sendPing):
937 (WebCore::PingLoader::sendViolationReport):
938 (WebCore::PingLoader::startPingLoad):
939 * loader/PingLoader.h:
940 * loader/cache/CachedResource.cpp:
941 (WebCore::CachedResource::load):
942 * page/csp/ContentSecurityPolicy.cpp:
943 (WebCore::ContentSecurityPolicy::responseHeaders const):
944 (WebCore::ContentSecurityPolicy::didReceiveHeader):
945 * page/csp/ContentSecurityPolicy.h:
946 * page/csp/ContentSecurityPolicyResponseHeaders.h:
947 (WebCore::ContentSecurityPolicyResponseHeaders::encode const):
948 (WebCore::ContentSecurityPolicyResponseHeaders::decode):
950 2017-08-09 Yusuke Suzuki <utatane.tea@gmail.com>
952 [WTF] ThreadSpecific should not introduce additional indirection
953 https://bugs.webkit.org/show_bug.cgi?id=175187
955 Reviewed by Mark Lam.
957 We drop ThreadSpecific::replace feature which is only used by
958 Web thread. Instead, we use ThreadSpecific<std::unique_ptr<T>> here.
960 While this std::unique_ptr<T> shares one instance between main thread
961 and web thread, this is the same to the current implementation. It is
962 safe because the web thread never finishes.
964 And for non-web thread implementation, we just use ThreadSpecific<T>,
965 since it is the most efficient.
967 * platform/ThreadGlobalData.cpp:
968 (WebCore::ThreadGlobalData::ThreadGlobalData):
969 (WebCore::ThreadGlobalData::setWebCoreThreadData):
970 (WebCore::threadGlobalData):
971 We also drop StringImpl::empty() call since it is not necessary now:
972 StringImpl::empty data is statically initialized by using constexpr.
974 * platform/ThreadGlobalData.h:
975 We make it FAST_ALLOCATED since it is previously allocated by fast malloc
978 2017-08-10 Michael Catanzaro <mcatanzaro@igalia.com>
980 REGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
981 https://bugs.webkit.org/show_bug.cgi?id=175426
983 Reviewed by Carlos Alberto Lopez Perez.
985 Also stop using GEOCLUE_LIBRARIES and GEOCLUE_INCLUDE_DIRS, since they are empty. Apparently
986 we have not actually been using the client library at all this whole time, only the D-Bus
991 2017-08-10 Brady Eidson <beidson@apple.com>
993 Add ServiceWorkerJob.
994 https://bugs.webkit.org/show_bug.cgi?id=175241
996 Reviewed by Tim Horton.
998 Test: http/tests/workers/service/basic-register.html
1000 This patch does a few things:
1001 - Adds the spec concept of a ServiceWorkerJob (in the WebProcess, at least)
1002 - Adds a ServiceWorkerProvider interface for WebKit to implement
1003 - Actually creates a job for service worker registration and "schedules" it,
1004 though it always immediately errors out the promise.
1006 Actually queuing jobs and executing asynchronously is coming up soon.
1009 * WebCore.xcodeproj/project.pbxproj:
1012 (WebCore::Document::sessionID const):
1015 * workers/ServiceWorkerContainer.cpp:
1016 (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
1017 (WebCore::ServiceWorkerContainer::addRegistration):
1018 (WebCore::ServiceWorkerContainer::scheduleJob):
1019 (WebCore::ServiceWorkerContainer::jobDidFinish):
1020 * workers/ServiceWorkerContainer.h:
1022 * workers/ServiceWorkerJob.cpp: Added.
1023 (WebCore::ServiceWorkerJob::ServiceWorkerJob):
1024 (WebCore::ServiceWorkerJob::~ServiceWorkerJob):
1025 (WebCore::ServiceWorkerJob::failedWithException):
1026 * workers/ServiceWorkerJob.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
1027 (WebCore::ServiceWorkerJob::createRegisterJob):
1028 (WebCore::ServiceWorkerJob::identifier const):
1030 * workers/ServiceWorkerJobClient.h: Added.
1031 (WebCore::ServiceWorkerJobClient::~ServiceWorkerJobClient):
1033 * workers/ServiceWorkerProvider.cpp: Added.
1034 (WebCore::ServiceWorkerProvider::singleton):
1035 (WebCore::ServiceWorkerProvider::setSharedProvider):
1036 * workers/ServiceWorkerProvider.h: Added.
1037 * workers/ServiceWorkerRegistrationOptions.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
1038 * workers/ServiceWorkerRegistrationParameters.cpp: Added.
1039 * workers/ServiceWorkerRegistrationParameters.h: Added.
1041 2017-08-10 Tim Horton <timothy_horton@apple.com>
1043 Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
1044 https://bugs.webkit.org/show_bug.cgi?id=175436
1045 <rdar://problem/33667497>
1047 Reviewed by Simon Fraser.
1049 * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
1050 (PlatformMediaSessionManager::updateSessionState):
1051 * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
1052 (WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
1054 2017-08-10 Commit Queue <commit-queue@webkit.org>
1056 Unreviewed, rolling out r220463.
1057 https://bugs.webkit.org/show_bug.cgi?id=175435
1059 unaccepted fix (Requested by n_wang on #webkit).
1064 WebCore::AccessibilityObject::supportsARIALiveRegion() const +
1066 https://bugs.webkit.org/show_bug.cgi?id=175340
1067 http://trac.webkit.org/changeset/220463
1069 2017-08-10 Michael Catanzaro <mcatanzaro@igalia.com>
1071 Remove ENABLE_GAMEPAD_DEPRECATED
1072 https://bugs.webkit.org/show_bug.cgi?id=175361
1074 Reviewed by Carlos Garcia Campos.
1077 * Configurations/FeatureDefines.xcconfig:
1078 * PlatformGTK.cmake:
1079 * PlatformWPE.cmake:
1080 * platform/Linux.cmake: Removed.
1081 * platform/gamepad/deprecated/Gamepads.h: Removed.
1082 * platform/gamepad/glib/GamepadsGlib.cpp: Removed.
1083 * platform/gamepad/linux/GamepadDeviceLinux.cpp: Removed.
1084 * platform/gamepad/linux/GamepadDeviceLinux.h: Removed.
1086 2017-08-10 Myles C. Maxfield <mmaxfield@apple.com>
1088 Addressing post-review comments after r219173.
1089 https://bugs.webkit.org/show_bug.cgi?id=174149
1093 * css/CSSFontStyleValue.h:
1094 * editing/EditingStyle.cpp:
1095 (WebCore::identifierForStyleProperty):
1097 2017-08-10 Antti Koivisto <antti@apple.com>
1099 Try to fix windows build.
1101 * style/StyleUpdate.h:
1102 (WebCore::Style::TextUpdate::TextUpdate):
1104 2017-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
1106 [GTK] Crashes in WebCore::PasteboardHelper::fillSelectionData when source file of drag is unavailable
1107 https://bugs.webkit.org/show_bug.cgi?id=174161
1109 Reviewed by Xabier Rodriguez-Calvar.
1111 In r219385 we changed the early return in fillSelectionData() to check the selection data length instead of the
1112 data pointer. However, the gtk_selection_data_get_length() can return -1, so we need to check also if the value
1113 less than 0. The case of setting an empty string could be valid depending on the target type, so it's better to
1114 return early only when data lenght is less than 0 and handle the 0 length case in each target.
1116 * platform/gtk/PasteboardHelper.cpp:
1117 (WebCore::PasteboardHelper::fillSelectionData):
1119 2017-08-10 Antti Koivisto <antti@apple.com>
1121 Text renderer updates should be done by RenderTreeUpdater
1122 https://bugs.webkit.org/show_bug.cgi?id=175417
1124 Reviewed by Andreas Kling.
1126 All render tree mutations should be done by RenderTreeUpdater. Currently
1127 Text::updateRendererAfterContentChange calls RenderText::setTextWithOffset directly.
1130 (WebCore::Document::updateTextRenderer):
1136 (WebCore::Text::updateRendererAfterContentChange):
1138 Remove call to setTextWithOffset and pass the range to updateTextRenderer
1140 * style/RenderTreeUpdater.cpp:
1141 (WebCore::RenderTreeUpdater::updateRenderTree):
1142 (WebCore::RenderTreeUpdater::updateTextRenderer):
1144 Call setTextWithOffset here.
1146 * style/RenderTreeUpdater.h:
1147 * style/StyleTreeResolver.cpp:
1148 (WebCore::Style::TreeResolver::resolveComposedTree):
1149 * style/StyleUpdate.cpp:
1150 (WebCore::Style::Update::textUpdate const):
1151 (WebCore::Style::Update::addText):
1153 Add TextUpdate struct similar to ElementUpdate to pass the range to the RenderTreeUpdater.
1155 * style/StyleUpdate.h:
1157 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
1159 Unreviewed GTK+ build fix for ENABLE_GLES2=ON.
1161 * platform/graphics/texmap/TextureMapperGLHeaders.h:
1162 Define various GL constants that are not provided in GLES2 headers
1163 but are only leveraged in OpenGL calls if at runtime the underlying
1164 OpenGL is GLES2-capable.
1166 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
1168 [TexMap] Remove GraphicsContext3D usage from BitmapTexturePool
1169 https://bugs.webkit.org/show_bug.cgi?id=175319
1171 Reviewed by Carlos Garcia Campos.
1173 Drop the GraphicsContext3D reference in BitmapTexturePool now
1174 that the BitmapTextureGL doesn't require it anymore.
1176 No new tests -- no change in behavior.
1178 * platform/graphics/texmap/BitmapTexturePool.cpp:
1179 (WebCore::BitmapTexturePool::BitmapTexturePool):
1180 * platform/graphics/texmap/BitmapTexturePool.h:
1181 * platform/graphics/texmap/TextureMapperGL.cpp:
1182 (WebCore::TextureMapperGL::TextureMapperGL):
1184 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
1186 [TexMap] Drop GraphicsContext3D usage from BitmapTextureGL
1187 https://bugs.webkit.org/show_bug.cgi?id=175317
1189 Reviewed by Carlos Garcia Campos.
1191 Have BitmapTextureGL use direct OpenGL API entrypoints and constants
1192 instead of leveraging the GraphicsContext3D class. Any GraphicsContext3D
1193 object passed to BitmapTextureGL would assume rendering to the GL context
1194 that's current on that thread, translating method invocations to the
1195 OpenGL API. We can do this by ourselves and benefit by avoiding allocating
1196 GraphicsContext3D resources like the ANGLE compiler that are by most useful
1199 BitmapTextureGL::create() call sites are adjusted to stop passing a
1200 GraphicsContext3D reference. BitmapTextureGL::bindAsSurface() doesn't need
1201 a replacement for the passed-in GraphicsContext3D object since that object
1202 originated from the TextureMapperGL instance, whose GraphicsContext3D is by
1203 default of the render-to-current-context nature. Other changes are direct
1204 translations of GraphicsContext3D methods to OpenGL API calls, or of
1205 GraphicsContext3D values to OpenGL API constants.
1207 No new tests -- no change in behavior.
1209 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1210 (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
1211 * platform/graphics/texmap/BitmapTextureGL.cpp:
1212 Also remove an unnecessary GraphicsContext.h header inclusion.
1213 (WebCore::BitmapTextureGL::BitmapTextureGL):
1214 (WebCore::BitmapTextureGL::didReset):
1215 (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
1216 (WebCore::BitmapTextureGL::updateContents):
1217 (WebCore::BitmapTextureGL::initializeStencil):
1218 (WebCore::BitmapTextureGL::initializeDepthBuffer):
1219 (WebCore::BitmapTextureGL::clearIfNeeded):
1220 (WebCore::BitmapTextureGL::createFboIfNeeded):
1221 (WebCore::BitmapTextureGL::bindAsSurface):
1222 (WebCore::BitmapTextureGL::~BitmapTextureGL):
1223 (WebCore::BitmapTextureGL::copyFromExternalTexture):
1224 * platform/graphics/texmap/BitmapTextureGL.h:
1225 (WebCore::BitmapTextureGL::create):
1226 (WebCore::BitmapTextureGL::textureTarget const):
1227 (WebCore::BitmapTextureGL::internalFormat const):
1228 * platform/graphics/texmap/BitmapTexturePool.cpp:
1229 (WebCore::BitmapTexturePool::createTexture):
1230 * platform/graphics/texmap/TextureMapperGL.cpp:
1231 (WebCore::TextureMapperGL::bindSurface):
1232 (WebCore::TextureMapperGL::createTexture):
1234 2017-08-09 Michael Catanzaro <mcatanzaro@igalia.com>
1236 [GTK] Remove support for geoclue1
1237 https://bugs.webkit.org/show_bug.cgi?id=164205
1239 Reviewed by Carlos Garcia Campos.
1241 * PlatformGTK.cmake:
1242 * platform/geoclue/GeolocationProviderGeoclue.h:
1243 * platform/geoclue/GeolocationProviderGeoclue1.cpp: Removed.
1244 * platform/geoclue/GeolocationProviderGeoclue2.cpp: Removed.
1246 2017-08-09 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
1248 [PAL] Move spi/cocoa and spi/cg directories into PAL
1249 https://bugs.webkit.org/show_bug.cgi?id=175175
1251 Reviewed by Myles C. Maxfield.
1253 * Modules/applepay/cocoa/PaymentCocoa.mm:
1254 * Modules/applepay/cocoa/PaymentContactCocoa.mm:
1255 * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
1256 * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
1257 * PlatformAppleWin.cmake:
1258 * WebCore.xcodeproj/project.pbxproj:
1259 * editing/cocoa/EditorCocoa.mm:
1260 * editing/cocoa/HTMLConverter.mm:
1261 * editing/ios/EditorIOS.mm:
1262 * page/cocoa/ResourceUsageThreadCocoa.mm:
1263 * page/mac/TextIndicatorWindow.mm:
1264 * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
1265 * platform/cocoa/DataDetectorsCoreSoftLink.h:
1266 * platform/cocoa/MIMETypeRegistryCocoa.mm:
1267 * platform/cocoa/NetworkExtensionContentFilter.mm:
1268 * platform/cocoa/ParentalControlsContentFilter.mm:
1269 * platform/cocoa/SleepDisablerCocoa.cpp:
1270 * platform/graphics/Font.cpp:
1271 * platform/graphics/Font.h:
1272 * platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:
1273 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1274 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1275 * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
1276 * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
1277 * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
1278 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1279 * platform/graphics/cg/ColorCG.cpp:
1280 * platform/graphics/cg/GraphicsContextCG.cpp:
1281 * platform/graphics/cg/ImageBufferCG.cpp:
1282 * platform/graphics/cg/ImageBufferDataCG.cpp:
1283 * platform/graphics/cg/ImageDecoderCG.cpp:
1284 * platform/graphics/cg/NativeImageCG.cpp:
1285 * platform/graphics/cocoa/FontCacheCoreText.cpp:
1286 * platform/graphics/cocoa/FontCascadeCocoa.mm:
1287 * platform/graphics/cocoa/FontCocoa.mm:
1288 * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
1289 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1290 * platform/graphics/cocoa/IOSurface.mm:
1291 * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
1292 * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
1293 * platform/graphics/ios/FontAntialiasingStateSaver.h:
1294 * platform/graphics/ios/FontCacheIOS.mm:
1295 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1296 * platform/graphics/mac/FontCacheMac.mm:
1297 * platform/graphics/mac/GlyphPageMac.cpp:
1298 * platform/graphics/win/FontCacheWin.cpp:
1299 * platform/ios/LegacyTileCache.mm:
1300 * platform/ios/LegacyTileGrid.mm:
1301 * platform/ios/LegacyTileGridTile.mm:
1302 * platform/ios/PlaybackSessionInterfaceAVKit.mm:
1303 * platform/ios/QuickLook.mm:
1304 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1305 * platform/ios/WebAVPlayerController.h:
1306 * platform/ios/WebAVPlayerController.mm:
1307 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1308 * platform/ios/wak/WKGraphics.mm:
1309 * platform/mac/DragImageMac.mm:
1310 * platform/mac/PlatformScreenMac.mm:
1311 * platform/mac/PlaybackSessionInterfaceMac.mm:
1312 * platform/mac/ThemeMac.mm:
1313 * platform/mac/VideoFullscreenInterfaceMac.mm:
1314 * platform/mac/WebPlaybackControlsManager.h:
1315 * platform/mac/WebVideoFullscreenHUDWindowController.mm:
1316 * platform/network/cocoa/CookieStorageObserver.mm:
1317 * platform/network/cocoa/NetworkLoadMetrics.mm:
1318 * platform/network/mac/AuthenticationMac.mm:
1319 * platform/network/mac/ResourceHandleMac.mm:
1320 * platform/spi/ios/DataDetectorsUISPI.h:
1321 * platform/spi/mac/DataDetectorsSPI.h:
1322 * platform/spi/mac/NSViewSPI.h:
1323 * rendering/RenderThemeCocoa.mm:
1324 * rendering/RenderThemeIOS.mm:
1325 * rendering/RenderThemeMac.mm:
1327 2017-08-09 Don Olmstead <don.olmstead@sony.com>
1329 [WTF] Move TextStream into WTF
1330 https://bugs.webkit.org/show_bug.cgi?id=175211
1332 Reviewed by Myles C. Maxfield.
1334 No new tests. No change in behavior.
1337 * WebCore.xcodeproj/project.pbxproj:
1338 * dom/ComposedTreeIterator.cpp:
1342 (WebCore::operator<<):
1344 * dom/ViewportArguments.cpp:
1345 * dom/ViewportArguments.h:
1346 * editing/VisiblePosition.cpp:
1347 * editing/VisiblePosition.h:
1348 * editing/VisibleSelection.cpp:
1349 * editing/VisibleSelection.h:
1350 * html/HTMLVideoElement.cpp:
1351 * html/canvas/CanvasRenderingContext2D.cpp:
1352 * page/FrameView.cpp:
1353 * page/ViewportConfiguration.cpp:
1354 * page/ViewportConfiguration.h:
1355 * page/WheelEventDeltaFilter.cpp:
1356 * page/animation/CSSPropertyAnimation.cpp:
1357 * page/scrolling/AsyncScrollingCoordinator.cpp:
1358 * page/scrolling/ScrollingConstraints.cpp:
1359 * page/scrolling/ScrollingConstraints.h:
1360 * page/scrolling/ScrollingCoordinator.cpp:
1361 * page/scrolling/ScrollingCoordinator.h:
1362 * page/scrolling/ScrollingStateFixedNode.cpp:
1363 * page/scrolling/ScrollingStateFixedNode.h:
1364 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1365 * page/scrolling/ScrollingStateFrameScrollingNode.h:
1366 * page/scrolling/ScrollingStateNode.cpp:
1367 * page/scrolling/ScrollingStateNode.h:
1368 * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1369 * page/scrolling/ScrollingStateOverflowScrollingNode.h:
1370 * page/scrolling/ScrollingStateScrollingNode.cpp:
1371 * page/scrolling/ScrollingStateScrollingNode.h:
1372 * page/scrolling/ScrollingStateStickyNode.cpp:
1373 * page/scrolling/ScrollingStateStickyNode.h:
1374 * page/scrolling/ScrollingTree.cpp:
1375 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
1376 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
1377 * page/scrolling/ScrollingTreeNode.cpp:
1378 * page/scrolling/ScrollingTreeNode.h:
1379 * page/scrolling/ScrollingTreeScrollingNode.cpp:
1380 * page/scrolling/ScrollingTreeScrollingNode.h:
1381 * page/scrolling/mac/ScrollingTreeFixedNode.h:
1382 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1383 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1384 * page/scrolling/mac/ScrollingTreeStickyNode.h:
1385 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1386 * platform/CalculationValue.cpp:
1387 * platform/CalculationValue.h:
1388 * platform/LayoutUnit.cpp:
1389 * platform/LayoutUnit.h:
1390 * platform/Length.cpp:
1391 * platform/Length.h:
1392 * platform/LengthBox.cpp:
1393 * platform/LengthBox.h:
1394 * platform/LengthPoint.cpp:
1395 * platform/LengthPoint.h:
1396 * platform/LengthSize.cpp:
1397 * platform/LengthSize.h:
1398 * platform/LogMacros.h:
1399 * platform/ScrollView.cpp:
1400 * platform/ScrollableArea.cpp:
1401 * platform/animation/TimingFunction.cpp:
1402 * platform/animation/TimingFunction.h:
1403 * platform/graphics/BitmapImage.cpp:
1404 * platform/graphics/BitmapImage.h:
1405 * platform/graphics/Color.cpp:
1406 * platform/graphics/Color.h:
1407 * platform/graphics/CrossfadeGeneratedImage.cpp:
1408 * platform/graphics/CrossfadeGeneratedImage.h:
1409 * platform/graphics/FloatPoint.cpp:
1410 * platform/graphics/FloatPoint.h:
1411 * platform/graphics/FloatPoint3D.cpp:
1412 * platform/graphics/FloatPoint3D.h:
1413 * platform/graphics/FloatRect.cpp:
1414 * platform/graphics/FloatRect.h:
1415 * platform/graphics/FloatRoundedRect.cpp:
1416 * platform/graphics/FloatRoundedRect.h:
1417 * platform/graphics/FloatSize.cpp:
1418 * platform/graphics/FloatSize.h:
1419 * platform/graphics/FontTaggedSettings.cpp:
1420 * platform/graphics/FontTaggedSettings.h:
1421 * platform/graphics/GradientImage.cpp:
1422 (WebCore::GradientImage::dump const):
1423 * platform/graphics/GradientImage.h:
1424 * platform/graphics/GraphicsContext.cpp:
1425 * platform/graphics/GraphicsContext.h:
1426 * platform/graphics/GraphicsLayer.cpp:
1427 * platform/graphics/GraphicsLayer.h:
1428 (WebCore::GraphicsLayer::dumpAdditionalProperties const):
1429 * platform/graphics/GraphicsTypes.cpp:
1430 * platform/graphics/GraphicsTypes.h:
1431 * platform/graphics/Image.cpp:
1432 * platform/graphics/Image.h:
1433 * platform/graphics/ImageSource.h:
1434 * platform/graphics/IntPoint.cpp:
1435 * platform/graphics/IntPoint.h:
1436 * platform/graphics/IntRect.cpp:
1437 * platform/graphics/IntRect.h:
1438 * platform/graphics/IntSize.cpp:
1439 * platform/graphics/IntSize.h:
1440 * platform/graphics/LayoutPoint.cpp:
1441 * platform/graphics/LayoutPoint.h:
1442 * platform/graphics/LayoutRect.cpp:
1443 * platform/graphics/LayoutRect.h:
1444 * platform/graphics/LayoutSize.cpp:
1445 * platform/graphics/LayoutSize.h:
1446 * platform/graphics/NamedImageGeneratedImage.cpp:
1447 * platform/graphics/NamedImageGeneratedImage.h:
1448 * platform/graphics/Path.cpp:
1449 * platform/graphics/Path.h:
1450 * platform/graphics/ca/GraphicsLayerCA.cpp:
1451 * platform/graphics/ca/GraphicsLayerCA.h:
1452 * platform/graphics/ca/PlatformCAAnimation.cpp:
1453 * platform/graphics/ca/PlatformCAAnimation.h:
1454 * platform/graphics/ca/PlatformCALayer.cpp:
1455 * platform/graphics/ca/PlatformCALayer.h:
1456 * platform/graphics/ca/TileController.cpp:
1457 * platform/graphics/ca/TileGrid.cpp:
1458 * platform/graphics/cg/GraphicsContextCG.cpp:
1459 * platform/graphics/cg/PDFDocumentImage.cpp:
1460 * platform/graphics/cg/PDFDocumentImage.h:
1461 * platform/graphics/cocoa/IOSurface.h:
1462 * platform/graphics/cocoa/IOSurface.mm:
1463 * platform/graphics/displaylists/DisplayList.cpp:
1464 (WebCore::DisplayList::DisplayList::description const):
1465 * platform/graphics/displaylists/DisplayList.h:
1466 * platform/graphics/displaylists/DisplayListItems.cpp:
1467 * platform/graphics/displaylists/DisplayListItems.h:
1468 * platform/graphics/displaylists/DisplayListRecorder.cpp:
1469 * platform/graphics/displaylists/DisplayListReplayer.cpp:
1470 * platform/graphics/filters/DistantLightSource.cpp:
1471 * platform/graphics/filters/DistantLightSource.h:
1472 * platform/graphics/filters/FEBlend.cpp:
1473 * platform/graphics/filters/FEBlend.h:
1474 * platform/graphics/filters/FEColorMatrix.cpp:
1475 * platform/graphics/filters/FEColorMatrix.h:
1476 * platform/graphics/filters/FEComponentTransfer.cpp:
1477 * platform/graphics/filters/FEComponentTransfer.h:
1478 * platform/graphics/filters/FEComposite.cpp:
1479 * platform/graphics/filters/FEComposite.h:
1480 * platform/graphics/filters/FEConvolveMatrix.cpp:
1481 * platform/graphics/filters/FEConvolveMatrix.h:
1482 * platform/graphics/filters/FEDiffuseLighting.cpp:
1483 * platform/graphics/filters/FEDiffuseLighting.h:
1484 * platform/graphics/filters/FEDisplacementMap.cpp:
1485 * platform/graphics/filters/FEDisplacementMap.h:
1486 * platform/graphics/filters/FEDropShadow.cpp:
1487 * platform/graphics/filters/FEDropShadow.h:
1488 * platform/graphics/filters/FEFlood.cpp:
1489 * platform/graphics/filters/FEFlood.h:
1490 * platform/graphics/filters/FEGaussianBlur.cpp:
1491 * platform/graphics/filters/FEGaussianBlur.h:
1492 * platform/graphics/filters/FEMerge.cpp:
1493 * platform/graphics/filters/FEMerge.h:
1494 * platform/graphics/filters/FEMorphology.cpp:
1495 * platform/graphics/filters/FEMorphology.h:
1496 * platform/graphics/filters/FEOffset.cpp:
1497 * platform/graphics/filters/FEOffset.h:
1498 * platform/graphics/filters/FESpecularLighting.cpp:
1499 * platform/graphics/filters/FESpecularLighting.h:
1500 * platform/graphics/filters/FETile.cpp:
1501 * platform/graphics/filters/FETile.h:
1502 * platform/graphics/filters/FETurbulence.cpp:
1503 * platform/graphics/filters/FETurbulence.h:
1504 * platform/graphics/filters/FilterEffect.cpp:
1505 * platform/graphics/filters/FilterEffect.h:
1506 * platform/graphics/filters/FilterOperation.cpp:
1507 * platform/graphics/filters/FilterOperation.h:
1508 * platform/graphics/filters/FilterOperations.cpp:
1509 * platform/graphics/filters/FilterOperations.h:
1510 * platform/graphics/filters/LightSource.h:
1511 * platform/graphics/filters/PointLightSource.cpp:
1512 * platform/graphics/filters/PointLightSource.h:
1513 * platform/graphics/filters/SourceAlpha.cpp:
1514 * platform/graphics/filters/SourceAlpha.h:
1515 * platform/graphics/filters/SourceGraphic.cpp:
1516 * platform/graphics/filters/SourceGraphic.h:
1517 * platform/graphics/filters/SpotLightSource.cpp:
1518 * platform/graphics/filters/SpotLightSource.h:
1519 * platform/graphics/transforms/AffineTransform.cpp:
1520 * platform/graphics/transforms/AffineTransform.h:
1521 * platform/graphics/transforms/IdentityTransformOperation.h:
1522 * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
1523 * platform/graphics/transforms/Matrix3DTransformOperation.h:
1524 * platform/graphics/transforms/MatrixTransformOperation.cpp:
1525 * platform/graphics/transforms/MatrixTransformOperation.h:
1526 * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1527 * platform/graphics/transforms/PerspectiveTransformOperation.h:
1528 * platform/graphics/transforms/RotateTransformOperation.cpp:
1529 * platform/graphics/transforms/RotateTransformOperation.h:
1530 * platform/graphics/transforms/ScaleTransformOperation.cpp:
1531 * platform/graphics/transforms/ScaleTransformOperation.h:
1532 * platform/graphics/transforms/SkewTransformOperation.cpp:
1533 * platform/graphics/transforms/SkewTransformOperation.h:
1534 * platform/graphics/transforms/TransformOperation.cpp:
1535 * platform/graphics/transforms/TransformOperation.h:
1536 * platform/graphics/transforms/TransformOperations.cpp:
1537 * platform/graphics/transforms/TransformOperations.h:
1538 * platform/graphics/transforms/TransformationMatrix.cpp:
1539 * platform/graphics/transforms/TransformationMatrix.h:
1540 * platform/graphics/transforms/TranslateTransformOperation.cpp:
1541 * platform/graphics/transforms/TranslateTransformOperation.h:
1542 * platform/ios/SelectionRect.cpp:
1543 (WebCore::operator<<):
1544 * platform/ios/SelectionRect.h:
1545 * platform/mac/ScrollAnimatorMac.mm:
1546 * platform/text/TextAllInOne.cpp:
1547 * rendering/InlineBox.cpp:
1548 * rendering/InlineBox.h:
1549 * rendering/InlineFlowBox.cpp:
1550 (WebCore::InlineFlowBox::outputLineTreeAndMark const):
1551 * rendering/InlineFlowBox.h:
1552 * rendering/InlineTextBox.cpp:
1553 * rendering/InlineTextBox.h:
1554 * rendering/RenderBlockFlow.cpp:
1555 (WebCore::RenderBlockFlow::outputLineTreeAndMark const):
1556 * rendering/RenderBlockFlow.h:
1557 * rendering/RenderLayer.cpp:
1558 * rendering/RenderLayerCompositor.cpp:
1559 * rendering/RenderObject.cpp:
1560 * rendering/RenderObject.h:
1561 * rendering/RenderTreeAsText.cpp:
1562 * rendering/RenderTreeAsText.h:
1563 * rendering/ScrollAlignment.cpp:
1564 * rendering/ScrollAlignment.h:
1565 * rendering/SimpleLineLayoutCoverage.cpp:
1566 * rendering/SimpleLineLayoutFunctions.cpp:
1567 * rendering/SimpleLineLayoutFunctions.h:
1568 * rendering/style/FillLayer.cpp:
1569 * rendering/style/FillLayer.h:
1570 * rendering/style/NinePieceImage.cpp:
1571 * rendering/style/NinePieceImage.h:
1572 * rendering/style/RenderStyleConstants.cpp:
1573 * rendering/style/RenderStyleConstants.h:
1574 * rendering/svg/SVGRenderTreeAsText.cpp:
1575 (WebCore::operator<<):
1576 * rendering/svg/SVGRenderTreeAsText.h:
1577 (WebCore::operator<<):
1578 * svg/SVGLengthValue.cpp:
1579 * svg/SVGLengthValue.h:
1580 * svg/graphics/SVGImage.cpp:
1581 * svg/graphics/SVGImage.h:
1582 * svg/graphics/filters/SVGFEImage.cpp:
1583 * svg/graphics/filters/SVGFEImage.h:
1585 2017-08-09 Commit Queue <commit-queue@webkit.org>
1587 Unreviewed, rolling out r220466, r220477, and r220487.
1588 https://bugs.webkit.org/show_bug.cgi?id=175411
1590 This change broke existing API tests and follow up fixes did
1591 not resolve all the issues. (Requested by ryanhaddad on
1594 Reverted changesets:
1596 https://bugs.webkit.org/show_bug.cgi?id=175244
1597 http://trac.webkit.org/changeset/220466
1599 "WTF::Function does not allow for reference / non-default
1600 constructible return types"
1601 https://bugs.webkit.org/show_bug.cgi?id=175244
1602 http://trac.webkit.org/changeset/220477
1604 https://bugs.webkit.org/show_bug.cgi?id=175244
1605 http://trac.webkit.org/changeset/220487
1607 2017-08-09 Chris Dumez <cdumez@apple.com>
1609 [Beacon][NetworkSession] Support CORS-preflighting on redirects
1610 https://bugs.webkit.org/show_bug.cgi?id=175386
1611 <rdar://problem/33801370>
1613 Reviewed by Youenn Fablet.
1615 Export a couple of WebCore symbols so I can use them in WebKit2.
1617 Tests: http/wpt/beacon/cors/cors-preflight-redirect-failure.html
1618 http/wpt/beacon/cors/cors-preflight-redirect-from-crossorigin-to-sameorigin.html
1619 http/wpt/beacon/cors/cors-preflight-redirect-success.html
1621 * loader/CrossOriginAccessControl.h:
1622 * page/SecurityOrigin.h:
1624 2017-08-09 Jeremy Jones <jeremyj@apple.com>
1626 Use MPAVRoutingController instead of deprecated versions.
1627 https://bugs.webkit.org/show_bug.cgi?id=175063
1629 Reviewed by Tim Horton.
1631 No new tests because no behavior change. This uses a different platform class to present
1634 Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
1635 Add MPMediaControlsViewController.
1637 * platform/spi/ios/MediaPlayerSPI.h:
1639 2017-08-09 Myles C. Maxfield <mmaxfield@apple.com>
1641 Mark font-display as in development
1642 https://bugs.webkit.org/show_bug.cgi?id=175387
1648 2017-08-09 Commit Queue <commit-queue@webkit.org>
1650 Unreviewed, rolling out r219334.
1651 https://bugs.webkit.org/show_bug.cgi?id=175398
1653 Caused bug 175023 (Requested by ap on #webkit).
1657 "[SVG] Leak in SVGAnimatedListPropertyTearOff"
1658 https://bugs.webkit.org/show_bug.cgi?id=172545
1659 http://trac.webkit.org/changeset/219334
1661 2017-08-09 Dave Hyatt <hyatt@apple.com>
1663 [Repaint from Layout Removal] Move layer repaint rects into a map
1664 https://bugs.webkit.org/show_bug.cgi?id=175393
1666 Reviewed by Zalan Bujtas.
1668 Move the two repaint rects held by RenderLayer into a RenderLayerModelObject -> RepaintLayoutRects hash map.
1669 RepaintLayoutRects is a new struct that holds both rects.
1671 Eventually more objects than just self painting layers will be caching repaint rects, so this takes a first
1672 step towards having a common cache for these repaint rects. In addition this change saves memory, since
1673 layers that aren't self-painting no longer have empty repaint rects taking up space in RenderLayer.
1675 * rendering/RenderBlockLineLayout.cpp:
1676 (WebCore::RenderBlockFlow::layoutRunsAndFloats):
1677 * rendering/RenderLayer.cpp:
1678 (WebCore::RenderLayer::RenderLayer):
1679 (WebCore::RenderLayer::updateLayerPositions):
1680 (WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants):
1681 (WebCore::RenderLayer::computeRepaintRects):
1682 (WebCore::RenderLayer::clearRepaintRects):
1683 (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
1684 (WebCore::RenderLayer::scrollTo):
1685 * rendering/RenderLayer.h:
1686 * rendering/RenderLayerModelObject.cpp:
1687 (WebCore::RepaintLayoutRects::RepaintLayoutRects):
1688 (WebCore::RenderLayerModelObject::willBeDestroyed):
1689 (WebCore::RenderLayerModelObject::destroyLayer):
1690 (WebCore::RenderLayerModelObject::styleDidChange):
1691 (WebCore::RenderLayerModelObject::hasRepaintLayoutRects):
1692 (WebCore::RenderLayerModelObject::setRepaintLayoutRects):
1693 (WebCore::RenderLayerModelObject::clearRepaintLayoutRects):
1694 (WebCore::RenderLayerModelObject::repaintLayoutRects):
1695 (WebCore::RenderLayerModelObject::computeRepaintLayoutRects):
1696 * rendering/RenderLayerModelObject.h:
1697 (WebCore::RepaintLayoutRects::RepaintLayoutRects):
1699 2017-08-09 Sam Weinig <sam@webkit.org>
1701 WTF::Function does not allow for reference / non-default constructible return types
1702 https://bugs.webkit.org/show_bug.cgi?id=175244
1704 Reviewed by Chris Dumez.
1706 * bindings/js/JSCustomElementInterface.h:
1707 (WebCore::JSCustomElementInterface::invokeCallback):
1708 Update the default value for the addArguments parameter to be an empty lambda, rather than
1709 default initialization, which leads to a null WTF::Function. This allows us to remove support
1710 for calling null WTF::Function. No change in behavior.
1712 2017-08-09 Brady Eidson <beidson@apple.com>
1714 Teach ScriptExecutionContexts about their SessionID.
1715 https://bugs.webkit.org/show_bug.cgi?id=175391
1717 Reviewed by Andy Estes.
1719 No new tests (No current change in behavior).
1721 Turns out that Workers need to know their SessionID for future feature development.
1722 So let's teach it to them.
1724 * dom/ScriptExecutionContext.h: Expose a pure virtual SessionID accessor.
1727 (WebCore::Document::sessionID const):
1730 * page/SessionID.cpp:
1731 (WebCore::SessionID::isolatedCopy const):
1734 * workers/DedicatedWorkerGlobalScope.cpp:
1735 (WebCore::DedicatedWorkerGlobalScope::create):
1736 (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
1737 * workers/DedicatedWorkerGlobalScope.h:
1739 * workers/DedicatedWorkerThread.cpp:
1740 (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
1741 (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
1742 * workers/DedicatedWorkerThread.h:
1744 * workers/Worker.cpp:
1745 (WebCore::Worker::notifyFinished):
1747 * workers/WorkerGlobalScope.cpp:
1748 (WebCore::WorkerGlobalScope::WorkerGlobalScope):
1749 * workers/WorkerGlobalScope.h:
1751 * workers/WorkerGlobalScopeProxy.h:
1753 * workers/WorkerMessagingProxy.cpp:
1754 (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
1755 * workers/WorkerMessagingProxy.h:
1757 * workers/WorkerThread.cpp:
1758 (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
1759 (WebCore::WorkerThread::WorkerThread):
1760 (WebCore::WorkerThread::workerThread):
1761 * workers/WorkerThread.h:
1763 2017-08-09 Wenson Hsieh <wenson_hsieh@apple.com>
1765 [iOS DnD] ENABLE_DRAG_SUPPORT should be turned off for iOS 10 and enabled by default
1766 https://bugs.webkit.org/show_bug.cgi?id=175392
1767 <rdar://problem/33783207>
1769 Reviewed by Tim Horton and Megan Gardner.
1771 Tweak FeatureDefines to enable drag and drop by default, and disable only on unsupported platforms (i.e. iOS 10).
1772 No change in behavior.
1774 * Configurations/FeatureDefines.xcconfig:
1776 2017-08-09 Kirill Ovchinnikov <kirill.ovchinnikov@lge.com>
1778 Old subtitle track is not deleted on 'src' attribute change event
1779 https://bugs.webkit.org/show_bug.cgi?id=175031
1781 Reviewed by Eric Carlson.
1783 Test: media/track/text-track-src-change.html
1785 * html/HTMLMediaElement.cpp:
1786 (WebCore::HTMLMediaElement::textTrackReadyStateChanged):
1787 * html/HTMLTrackElement.cpp:
1788 (WebCore::HTMLTrackElement::loadTimerFired):
1789 * html/shadow/MediaControls.cpp:
1790 (WebCore::MediaControls::clearTextDisplayContainer):
1791 * html/shadow/MediaControls.h:
1793 2017-08-09 Ryan Haddad <ryanhaddad@apple.com>
1795 Unreviewed, rolling out r220457.
1797 This change introduced API test failures.
1801 "WTF::Function does not allow for reference / non-default
1802 constructible return types"
1803 https://bugs.webkit.org/show_bug.cgi?id=175244
1804 http://trac.webkit.org/changeset/220457
1806 2017-08-09 Don Olmstead <don.olmstead@sony.com>
1808 [WinCairo] Fix build after rev 220399
1809 https://bugs.webkit.org/show_bug.cgi?id=175360
1811 Reviewed by Žan Doberšek.
1813 No new tests. No change in behavior.
1815 * platform/graphics/texmap/TextureMapperGLHeaders.h:
1817 2017-08-09 Nan Wang <n_wang@apple.com>
1819 AX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
1820 https://bugs.webkit.org/show_bug.cgi?id=175340
1821 <rdar://problem/33782159>
1823 Reviewed by Chris Fleizach.
1825 When adding a psuedo element child to a RenderBlockFlow element, there might be a chance where
1826 the element has already been layed out but we are still holding onto its stale children. Fixed it
1827 by notifying AX correctly when inserting/removing children during layout.
1829 Test: accessibility/add-children-pseudo-element.html
1831 * rendering/RenderBlockFlow.cpp:
1832 (WebCore::RenderBlockFlow::insertFloatingObject):
1833 (WebCore::RenderBlockFlow::removeFloatingObject):
1835 2017-08-09 Charlie Turner <cturner@igalia.com>
1837 [GStreamer][MSE] Add missing lock around getStreamByTrackId
1838 https://bugs.webkit.org/show_bug.cgi?id=175323
1840 Reviewed by Xabier Rodriguez-Calvar.
1842 Covered by existing tests.
1844 * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
1845 (WebCore::PlaybackPipeline::enqueueSample): Ensure the media source
1846 lock is taken before modifiying the track queues indirectly via the
1847 iterator use in getTrackId.
1849 2017-08-09 Daniel Bates <dabates@apple.com>
1851 REGRESSION (r219013): OAuth flows are broken when redirecting back to application after authentication
1852 https://bugs.webkit.org/show_bug.cgi?id=175247
1853 <rdar://problem/33679804>
1855 Reviewed by Brady Eidson.
1857 Add SPI so that Safari can differentiate between a form submission and a redirected form submission
1858 and have PolicyCheck notify the frame loader client if the navigation was in response to receiving a
1859 redirect response. This is the WebKit portion to fix an issue when a native app makes use of an OAuth
1860 OAuth flow that bounces to Safari for user login and then bounce back to the app. Microsoft Graph's
1861 OAuth flow is one example.
1863 Safari was differentiating between a form submission and a redirected form submission based on the
1864 nullity of WKNavigationAction.sourceFrame because in both cases the navigation type was WKNavigationTypeFormSubmitted.
1865 The navigation type is the same for both navigations because WebKit always used the navigation
1866 action from the original request for the redirect request when the original request redirected.
1867 Prior to r219013, WKNavigationAction.sourceFrame would be nil for a form submission that redirects.
1868 Following r219013, WKNavigationAction.sourceFrame is non-nil unless the navigation was initiated by
1869 API. In particular, WKNavigationAction.sourceFrame is non-nil for the redirect navigation corresponding
1870 to a form submission that redirects.
1872 * loader/EmptyClients.cpp:
1873 (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1874 * loader/FrameLoaderClient.h:
1875 Have dispatchDecidePolicyForNavigationAction() take a boolean as to whether the navigation was in
1876 response to receiving a redirect response.
1877 * loader/PolicyChecker.cpp:
1878 (WebCore::PolicyChecker::checkNavigationPolicy): Notify the frame loader client whether the navigation
1879 is in response to receiving a redirect response.
1881 2017-08-09 Sam Weinig <sam@webkit.org>
1883 WTF::Function does not allow for reference / non-default constructible return types
1884 https://bugs.webkit.org/show_bug.cgi?id=175244
1886 Reviewed by Chris Dumez.
1888 * bindings/js/JSCustomElementInterface.h:
1889 (WebCore::JSCustomElementInterface::invokeCallback):
1890 Update the default value for the addArguments parameter to be an empty lambda, rather than
1891 default initialization, which leads to a null WTF::Function. This allows us to remove support
1892 for calling null WTF::Function. No change in behavior.
1894 2017-08-09 Andy Estes <aestes@apple.com>
1896 [QuickLook] Use case-insensitive comparison of preview MIME types
1897 https://bugs.webkit.org/show_bug.cgi?id=175350
1898 <rdar://problem/33761159>
1900 Reviewed by Brady Eidson.
1902 MIME types are case-insensitive, but PreviewLoader was using a case-sensitive comparison to
1903 determine if a MIME type was supported by QLPreviewConverter. As a result we would fail to
1904 preview Excel macro-enabled workbooks, since CFNetwork would sniff a MIME type of
1905 "application/vnd.ms-excel.sheet.macroEnabled.12" but QuickLook contained
1906 "application/vnd.ms-excel.sheet.macroenabled.12" in its set of supported MIME type strings.
1908 Fix this by copying the QuickLook supported MIME type set into a HashSet using
1909 ASCIICaseInsensitiveHash and using that HashSet for MIME type checks.
1911 Test: quicklook/excel-macro-enabled.html
1913 * loader/ios/PreviewLoader.mm:
1914 (WebCore::PreviewLoader::shouldCreateForMIMEType):
1916 2017-08-09 Ms2ger <Ms2ger@igalia.com>
1918 Remove unnecessary copies of PlatformMediaSessionManager::m_sessions
1919 https://bugs.webkit.org/show_bug.cgi?id=175375
1921 Reviewed by Sam Weinig.
1923 Remove unnecessary copies of PlatformMediaSessionManager::m_sessions.
1925 These should have been removed in r207688.
1927 No new tests: no behavior change.
1929 * platform/audio/PlatformMediaSessionManager.cpp:
1930 (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive const):
1931 (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const):
1932 (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground const):
1933 (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground const):
1935 2017-08-09 Chris Dumez <cdumez@apple.com>
1937 Reinstate active flag for iterators
1938 https://bugs.webkit.org/show_bug.cgi?id=175312
1940 Reviewed by Sam Weinig.
1942 NodeIterator / TreeWalker should no longer allow recursive filters
1943 after the following change to the DOM specification:
1944 - https://github.com/whatwg/dom/pull/359
1946 This patch aligns our behavior with the latest specification.
1948 No new tests, updated existing tests.
1950 * dom/NodeIterator.cpp:
1951 (WebCore::NodeIterator::nextNode):
1952 (WebCore::NodeIterator::previousNode):
1953 Note that we now also call m_candidateNode.clear() before returning an
1954 exception. This was a pre-existing bug that we failed to do so in the
1955 exception case but it became more obvious after this change now that
1956 we throw. This was causing traversal/moz-bug559526.html to fail
1957 otherwise (the filter was called one too many times). The test case
1958 is passing in Firefox (The filter is called 4 times and they throw
1961 * dom/Traversal.cpp:
1962 (WebCore::NodeIteratorBase::NodeIteratorBase):
1963 (WebCore::NodeIteratorBase::acceptNode):
1965 * dom/TreeWalker.cpp:
1967 2017-08-09 Antti Koivisto <antti@apple.com>
1969 RenderQuote should not mutate render tree
1970 https://bugs.webkit.org/show_bug.cgi?id=175328
1972 Reviewed by Zalan Bujtas.
1974 RenderQuote text renderers are currently created and deleted in a quirky fashion using a linked list.
1975 This patch moves to a simpler model that guarantees the mutations are always done in controlled fashion
1976 during render tree update.
1979 (WebCore::Document::updateTextRenderer):
1981 Move text renderer updating to Document so we can set the inRenderTreeUpdate bit for it too.
1985 (WebCore::Text::updateRendererAfterContentChange):
1986 * rendering/RenderDescendantIterator.h:
1987 (WebCore::RenderDescendantIteratorAdapter<T>::at):
1988 (WebCore::RenderDescendantConstIteratorAdapter<T>::at const):
1990 Add at() function for starting iteration from a specified renderer.
1992 * rendering/RenderQuote.cpp:
1993 (WebCore::RenderQuote::insertedIntoTree):
1994 (WebCore::RenderQuote::willBeRemovedFromTree):
1996 Register and unregister quotes to RenderView.
1997 Don't do any mutations.
1999 (WebCore::RenderQuote::styleDidChange):
2001 Invalidate the text renderer but don't mutate it.
2003 (WebCore::RenderQuote::updateTextRenderer):
2004 (WebCore::RenderQuote::computeText const):
2005 (WebCore::RenderQuote::updateRenderers):
2007 Compute depth of all render quotes and update the text renderer as needed.
2009 (WebCore::RenderQuote::willBeDestroyed): Deleted.
2010 (WebCore::RenderQuote::attachQuote): Deleted.
2011 (WebCore::RenderQuote::detachQuote): Deleted.
2012 (WebCore::RenderQuote::updateDepth): Deleted.
2014 Get rid of the linked list.
2016 * rendering/RenderQuote.h:
2017 * rendering/RenderView.cpp:
2018 (WebCore::RenderView::registerQuote):
2019 (WebCore::RenderView::unregisterQuote):
2021 Maintain a render tree order ListHashSet of RenderQuotes.
2023 (WebCore::RenderView::updateSpecialRenderers):
2025 Add a function for making additional render tree mutations at the end of a render tree update.
2026 Currently this just invokes RenderQuote::updateRenderers.
2028 * rendering/RenderView.h:
2029 * style/RenderTreeUpdater.cpp:
2030 (WebCore::RenderTreeUpdater::commit):
2032 Call RenderView::updateSpecialRenderers after committing all other changes.
2034 2017-08-09 Zan Dobersek <zdobersek@igalia.com>
2036 [Soup] Incorrect conversion in msToSoupDate()
2037 https://bugs.webkit.org/show_bug.cgi?id=175320
2039 Reviewed by Carlos Garcia Campos.
2041 Original patch by VaL Doroshchuk.
2043 * platform/network/soup/NetworkStorageSessionSoup.cpp:
2044 (WebCore::msToSoupDate): monthFromDayInYear() returns a value in the [0,11] range,
2045 while soup_date_new() expects a month value in the [1,12] range. The return value
2046 must be thus incremented by one to match that expectation.
2048 2017-08-08 Wenson Hsieh <wenson_hsieh@apple.com>
2050 Unreviewed, rolling out r220393.
2052 This patch regresses the performance of WebPage::editorState.
2056 "[iOS WK2] WKWebView schedules nonstop layout after pressing
2057 cmb+b,i,u inside a contenteditable div"
2058 https://bugs.webkit.org/show_bug.cgi?id=175116
2059 http://trac.webkit.org/changeset/220393
2061 2017-08-08 Chris Dumez <cdumez@apple.com>
2063 [Beacon] Add support for CORS-preflighting for WK2 / NETWORK_SESSION
2064 https://bugs.webkit.org/show_bug.cgi?id=175264
2065 <rdar://problem/33547793>
2067 Reviewed by Youenn Fablet.
2069 Pass additional information when creating a PingHandle so that the PingLoad
2070 can deal with CORS-preflighting on Network process side.
2072 Tests: http/wpt/beacon/cors/cors-preflight-arraybufferview-failure.html
2073 http/wpt/beacon/cors/cors-preflight-arraybufferview-success.html
2074 http/wpt/beacon/cors/cors-preflight-blob-failure.html
2075 http/wpt/beacon/cors/cors-preflight-blob-success.html
2076 http/wpt/beacon/cors/cors-preflight-cookie.html
2078 * WebCore.xcodeproj/project.pbxproj:
2079 * loader/CrossOriginAccessControl.cpp:
2080 (WebCore::validatePreflightResponse):
2081 * loader/CrossOriginAccessControl.h:
2082 * loader/CrossOriginPreflightChecker.cpp:
2083 (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
2084 * loader/CrossOriginPreflightResultCache.h:
2085 * loader/LoaderStrategy.h:
2086 * loader/PingLoader.cpp:
2087 (WebCore::PingLoader::loadImage):
2088 (WebCore::PingLoader::sendPing):
2089 (WebCore::PingLoader::sendViolationReport):
2090 (WebCore::PingLoader::startPingLoad):
2091 * loader/PingLoader.h:
2092 * loader/cache/CachedResource.cpp:
2093 (WebCore::CachedResource::load):
2094 * page/SecurityOrigin.h:
2096 2017-08-08 Sam Weinig <sam@webkit.org>
2098 Address review feedback from https://bugs.webkit.org/show_bug.cgi?id=175246.
2100 * bindings/js/DOMPromiseProxy.h:
2101 * css/FontFaceSet.cpp:
2102 * css/FontFaceSet.h:
2104 2017-08-08 Devin Rousso <drousso@apple.com>
2106 Web Inspector: Canvas: support editing WebGL shaders
2107 https://bugs.webkit.org/show_bug.cgi?id=124211
2108 <rdar://problem/15448958>
2110 Reviewed by Matt Baker.
2112 Test: inspector/canvas/updateShader.html
2114 * inspector/InspectorCanvasAgent.h:
2115 * inspector/InspectorCanvasAgent.cpp:
2116 (WebCore::InspectorCanvasAgent::updateShader):
2118 * html/canvas/WebGLRenderingContextBase.h:
2119 * html/canvas/WebGLRenderingContextBase.cpp:
2120 (WebCore::WebGLRenderingContextBase::linkProgram):
2121 (WebCore::WebGLRenderingContextBase::linkProgramWithoutInvalidatingAttribLocations):
2122 Normally, when a program is linked, it invalidates any WebGLUniformLocation associated with
2123 the program by incrementing its `linkCount`. In order to allow live editing of shaders, we
2124 need to be able to compile and link a shader without invalidating these locations. This
2125 patch moves the shader linking logic to its own function that is called by `linkProgram` so
2126 that InspectorCanvasAgent can compile and link without invalidation.
2128 2017-08-08 Sam Weinig <sam@webkit.org>
2130 [WebIDL] Add support for Promise<> attributes
2131 https://bugs.webkit.org/show_bug.cgi?id=175246
2133 Reviewed by Yusuke Suzuki.
2135 Introduces and adopts DOMPromiseProxy, a new class for binding promises in a more
2136 straightforward and safe (from a wrapper world perspective) way.
2139 * WebCore.xcodeproj/project.pbxproj:
2140 * bindings/js/JSFontFaceCustom.cpp: Removed.
2141 * bindings/js/JSFontFaceSetCustom.cpp: Removed.
2142 * bindings/js/JSMediaKeySessionCustom.cpp: Removed.
2143 * bindings/js/JSServiceWorkerContainerCustom.cpp: Removed.
2144 * bindings/js/JSWebGPUCommandBufferCustom.cpp: Removed.
2146 Remove custom bindings only needed for promise attributes. Add DOMPromiseProxy.h
2148 * Modules/encryptedmedia/MediaKeySession.cpp:
2149 (WebCore::MediaKeySession::sessionClosed):
2150 (WebCore::MediaKeySession::registerClosedPromise): Deleted.
2151 * Modules/encryptedmedia/MediaKeySession.h:
2152 * Modules/encryptedmedia/MediaKeySession.idl:
2154 Replace custom promise code using the registerPromise idiom with DOMPromiseProxy.
2156 * bindings/IDLTypes.h:
2158 Add StorageType type alias to allow specifying a specific form for storage. This allows
2159 use to use Ref<> for interfaces in DOMPromiseProxy.
2161 (WebCore::IDLWrapper::convertToParameterType):
2163 Also add convertToParameterType, an annoying hack to workaround the fact WTF::Function
2164 can't return references / no
2166 * bindings/js/DOMPromiseProxy.h: Added.
2167 (WebCore::DOMPromiseProxy<IDLType>):
2169 DOMPromiseProxy is a new class (set of classes) to represent promises that works with the
2170 standard toJS<> / JSDOMConvert infrastructure used by the bindings generator. From the
2171 implementation perspective, it is similar to DOMPromiseDeferred, but instead of receiving
2172 one as a parameter, you can initialize it directly in your constructor and start using it.
2174 From the bindings perspective, a DOMPromiseProxy can be converted into a JS Promise by calling
2175 its promise function, which will either create a new promise, or return a cached one.
2177 To make this work, DOMPromiseProxy maintains a Vector of DeferredPromises that hold onto those
2178 actualized promises. The reason it has a Vector, is that we need one DeferredPromises per
2179 DOMWrapperWorld, just like we need one wrapper for an interface per DOMWrapperWorld in the
2180 wrapper cache. In most cases, only the normal world will be in play, so the Vector has an inline
2183 In addition, DOMPromiseProxy maintains a Variant of either an Exception or the result value type.
2184 This allows the DOMPromiseProxy to be resolved or rejected at anytime. Then, when the bindings
2185 request the promise, the stored result / exception can be resolved / rejected into the promise.
2187 (WebCore::DOMPromiseProxy<IDLVoid>):
2189 For void promises, we need slightly different semantics (resolve takes no parameters, Value is
2190 a bit indicating resolved state), so it is specialized.
2192 (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>):
2194 In addition to the void specialization, we have DOMPromiseProxyWithResolveCallback. Instead of
2195 storing the value of the resolution directly, this specialization allows the owner to specify
2196 callback to be called when the resolved value is needed. This is needed to avoid reference
2197 cycles when the resolved value is the owner such as is the case with FontFace and FontFaceSet.
2199 * bindings/js/JSDOMConvertPromise.h:
2200 (WebCore::JSConverter<IDLPromise<T>>::convert):
2201 Add converter that calls through to the DOMPromiseProxy function promise.
2203 * bindings/js/JSDOMPromiseDeferred.cpp:
2204 (WebCore::DeferredPromise::callFunction):
2205 (WebCore::DeferredPromise::reject):
2206 * bindings/js/JSDOMPromiseDeferred.h:
2207 (WebCore::DeferredPromise::create):
2208 (WebCore::DeferredPromise::DeferredPromise):
2210 Add a new create function for DeferredPromise that creates the JSPromiseDeferred for you.
2211 Also adds a mode to DeferredPromise to allow keeping the promise after resolution. Maintain
2212 the old behavior as the default.
2214 Change reject to take an Exception as sink rather than an r-value, to allow DOMPromiseProxy
2215 to copy a Exception into multiple DeferredPromises. For callers already moving into reject,
2216 this should be no change.
2218 * bindings/scripts/CodeGeneratorJS.pm:
2219 (AddToIncludesForIDLType):
2220 (GenerateParametersCheck):
2221 (GenerateImplementationFunctionCall):
2222 (NativeToJSValueDOMConvertNeedsState):
2223 (NativeToJSValueDOMConvertNeedsGlobalObject):
2225 Add support DOMPromiseProxy. For now, this means a new extended attribute, [PromiseProxy],
2226 but once I convert all the existing promises over to using DOMPromiseProxy, it will be removed.
2228 Also specify the right #includes for promises and necessary parameters for conversion.
2230 * bindings/scripts/IDLAttributes.json:
2232 Add [PromiseProxy], a temporary extended attribute for using DOMPromiseProxy.
2237 * css/FontFaceSet.cpp:
2238 * css/FontFaceSet.h:
2239 * css/FontFaceSet.idl:
2241 Replace custom promise code using the registerPromise idiom with DOMPromiseProxyWithResolveCallback.
2242 The callback is necessary for these two classes since the value the resolve is themselves, and using
2243 a normal resolve would create a cycle.
2245 * html/canvas/WebGPUCommandBuffer.cpp:
2246 * html/canvas/WebGPUCommandBuffer.h:
2247 * html/canvas/WebGPUCommandBuffer.idl:
2248 * platform/graphics/cocoa/GPUCommandBufferMetal.mm:
2249 * platform/graphics/gpu/GPUCommandBuffer.cpp:
2250 * platform/graphics/gpu/GPUCommandBuffer.h:
2252 Replace custom promise code using the registerPromise idiom with DOMPromiseProxy.
2254 * page/NavigatorBase.cpp:
2255 (WebCore::NavigatorBase::NavigatorBase):
2256 * page/NavigatorBase.h:
2258 Forward declare ServiceWorkerContainer and add an explicit constructor to allow
2259 removing #include of ServiceWorkerContainer.h in the header, avoiding an #include cycle.
2261 * workers/ServiceWorkerContainer.cpp:
2262 * workers/ServiceWorkerContainer.h:
2263 * workers/ServiceWorkerContainer.idl:
2265 Replace custom promise code using the registerPromise idiom with DOMPromiseProxy.
2267 * bindings/scripts/test/JS/JSTestObj.cpp:
2268 * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
2269 * bindings/scripts/test/TestObj.idl:
2273 2017-08-08 John Wilander <wilander@apple.com>
2275 Resource Load Statistics: Merge of dataRecordsRemoved should use std::max()
2276 https://bugs.webkit.org/show_bug.cgi?id=175348
2277 <rdar://problem/33785695>
2279 Reviewed by Chris Dumez.
2281 No new tests. Online change of a statistic that doesn't affect logic flow.
2283 * loader/ResourceLoadStatistics.cpp:
2284 (WebCore::ResourceLoadStatistics::merge):
2285 Now uses std::max() instead of addition.
2287 2017-08-08 Brent Fulgham <bfulgham@apple.com>
2289 Sandbox flags do not support document.domain control
2290 https://bugs.webkit.org/show_bug.cgi?id=175281
2291 <rdar://problem/33778936>
2293 Reviewed by Chris Dumez.
2295 Update the 'setDomain' logic to honor the sandbox properties as defined in the current
2296 HTML5 specification. This brings us in line with how Chrome and other browsers have
2297 worked for some time.
2299 Test: fast/frames/sandboxed-iframe-domain.html
2302 (WebCore::Document::setDomain): Add check for sandbox flag (with appropriate error message)
2303 * dom/SecurityContext.h:
2305 2017-08-08 Jeremy Jones <jeremyj@apple.com>
2307 Change fast seek logic to prevent ping-ponging.
2308 https://bugs.webkit.org/show_bug.cgi?id=175167
2309 rdar://problem/32936116
2311 Reviewed by Jer Noble.
2313 Updated test: media/video-fast-seek.html
2315 Changed fast seek behavior to always seek early than seek time; and after current time when seeking forward.
2316 This prevents ping-ponging, where a fast seek overshoots the target looking for a keyframe.
2317 A subsequent seek will suddenly be on the other side of current time and
2318 will search in the opposite direction for a key frame; repeat.
2320 * html/HTMLMediaElement.cpp:
2321 (WebCore::HTMLMediaElement::fastSeek):
2323 2017-08-08 Ms2ger <Ms2ger@igalia.com>
2325 Unreviewed. Correct the function name in a debug message.
2326 https://bugs.webkit.org/show_bug.cgi?id=175262
2328 No new tests: debug logs are not tested.
2330 * platform/audio/PlatformMediaSessionManager.cpp:
2331 (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const):
2333 2017-08-08 Brent Fulgham <bfulgham@apple.com>
2335 Unreviewed build fix after r220376.
2337 Don't attempt to use isPublicSuffix when building without that
2341 (WebCore::Document::domainIsRegisterable const):
2343 2017-08-08 Michael Catanzaro <mcatanzaro@igalia.com>
2345 [CMake] Properly test if compiler supports compiler flags
2346 https://bugs.webkit.org/show_bug.cgi?id=174490
2348 Reviewed by Konstantin Tokarev.
2351 * PlatformGTK.cmake:
2352 * PlatformWPE.cmake:
2354 2017-08-08 Zan Dobersek <zdobersek@igalia.com>
2356 [GStreamer] Don't use GraphicsContext3D in VideoTextureCoperGStreamer
2357 https://bugs.webkit.org/show_bug.cgi?id=174774
2359 Reviewed by Carlos Garcia Campos.
2361 VideoTextureCoperGStreamer class creates a new GraphicsContext3D internally
2362 that's used to render to whichever OpenGL context is current. Such usage
2363 doesn't add anything to the user since there's no underlying offscreen-based
2364 OpenGL context created, and instead all GraphicsContext3D calls are directly
2365 translated to usual OpenGL API calls. We should avoid using GraphicsContext3D
2366 in such cases and instead use direct OpenGL API calls.
2368 This patch achieves that for the VideoTextureCoperGStreamer class. A
2369 GraphicsContext3D object is still created because it's needed to construct an
2370 instance of the TextureMapperShaderProgram class, but this will be removed as
2371 soon as TextureMapperShaderProgram drops the GraphicsContext3D dependence.
2373 No new tests -- no change in behavior.
2375 * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
2376 (WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
2377 (WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
2378 (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
2379 * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
2380 (WebCore::VideoTextureCopierGStreamer::resultTexture):
2382 2017-08-08 Zan Dobersek <zdobersek@igalia.com>
2384 [TexMap] Drop GC3D* type usage from TextureMapperPlatformLayer{Buffer,Proxy}
2385 https://bugs.webkit.org/show_bug.cgi?id=175314
2387 Reviewed by Carlos Garcia Campos.
2389 Switch to using OpenGL types in the TextureMapperPlatformLayerBuffer and
2390 TextureMapperPlatformLayerProxy classes, instead of the equivalent GC3D*
2391 types provided in the GraphicsTypes3D.h header.
2393 No new tests -- no change in behavior.
2395 * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
2396 (WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
2397 (WebCore::TextureMapperPlatformLayerBuffer::canReuseWithoutReset):
2398 * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
2399 * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
2400 (WebCore::TextureMapperPlatformLayerProxy::getAvailableBuffer):
2401 * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
2403 2017-08-08 Zan Dobersek <zdobersek@igalia.com>
2405 [TexMap] Don't use GraphicsContext3D in ClipStack
2406 https://bugs.webkit.org/show_bug.cgi?id=174776
2408 Reviewed by Carlos Garcia Campos.
2410 Any GraphicsContext3D object that's passed to ClipStack methods is of the
2411 render-to-current-context nature, meaning there's no internally owned GL
2412 context that has to be properly handled and all calls are simply passed to
2413 OpenGL APIs. We should drop such (non-)usage of GraphicsContext3D in favor
2414 of direct OpenGL API invocations.
2416 This patch covers TextureMapper's ClipStack. Call sites to the apply() and
2417 applyIfNeeded() are modified to not pass a reference to any
2418 GraphicsContext3D object. Internally, OpenGL API entrypoints and constants
2419 are used instead of GraphicsContext3D invocations.
2421 No new tests -- no change in behavior.
2423 * platform/graphics/texmap/BitmapTextureGL.cpp:
2424 (WebCore::BitmapTextureGL::clearIfNeeded):
2425 (WebCore::BitmapTextureGL::bindAsSurface):
2426 * platform/graphics/texmap/ClipStack.cpp:
2427 (WebCore::ClipStack::apply):
2428 (WebCore::ClipStack::applyIfNeeded):
2429 * platform/graphics/texmap/ClipStack.h:
2430 * platform/graphics/texmap/TextureMapperGL.cpp:
2431 (WebCore::TextureMapperGL::bindDefaultSurface):
2432 (WebCore::TextureMapperGL::beginScissorClip):
2433 (WebCore::TextureMapperGL::beginClip):
2434 (WebCore::TextureMapperGL::endClip):
2436 2017-08-08 Javier Fernandez <jfernandez@igalia.com>
2438 Not possible to remove the 'li' element inside the table cell
2439 https://bugs.webkit.org/show_bug.cgi?id=173148
2441 Reviewed by Ryosuke Niwa.
2443 We need to add a new case for breaking out empty list items when they are
2444 at the start of an editable area. Since list items can be also inside
2445 table cells, we need to consider this kind of elements as well.
2447 Tests: editing/deleting/delete-list-items-in-table-cell-1.html
2448 editing/deleting/delete-list-items-in-table-cell-2.html
2449 editing/deleting/delete-list-items-in-table-cell-3.html
2450 editing/deleting/delete-list-items-in-table-cell-4.html
2451 editing/deleting/delete-list-items-in-table-cell-5.html
2452 editing/deleting/delete-list-items-in-table-cell-6.html
2453 editing/deleting/delete-list-items-in-table-cell-7.html
2454 editing/deleting/delete-list-items-in-table-cell-8.html
2456 * editing/TypingCommand.cpp:
2457 (WebCore::TypingCommand::deleteKeyPressed):
2459 2017-08-08 Zan Dobersek <zdobersek@igalia.com>
2461 [TexMap] Isolate the TextureMapperPlatformLayerProxyProvider class
2462 https://bugs.webkit.org/show_bug.cgi?id=175316
2464 Reviewed by Carlos Garcia Campos.
2466 Move the TextureMapperPlatformLayerProxyProvider class (which is the type
2467 aliased to PlatformLayer for threaded CoordGraphics) into its own header
2468 file. This prevents including the TextureMapperPlatformLayerProxy.h header
2469 file in MediaPlayerPrivateGStreamerBase.h, avoiding spilling OpenGL types
2470 and function declarations before the GStreamer GL headers include them
2471 later in the MediaPlayerPrivateGStreamerBase implementation file.
2473 In the MediaPlayerPrivateGStreamerBase.h header file, only the new header
2474 is included, and a forward declaration of the TextureMapperPlatformLayerProxy
2475 class is used. proxy() and swapBuffersIfNeeded() methods are moved into
2476 the implementation file to avoid requiring the full definition of the
2477 TextureMapperPlatformLayerProxy class.
2479 Similar is done for the TextureMapperGC3DPlatformLayer class and the
2480 Cairo-specific implementation of the ImageBufferData class. The
2481 CoordinatedGraphicsLayer implementation file also gains an include of the
2482 TextureMapperPlatformLayerProxyProvider.h header since it requires the full
2483 definition of that class.
2485 No new tests -- no change in behavior.
2487 * platform/graphics/cairo/ImageBufferCairo.cpp:
2488 (WebCore::ImageBufferData::proxy const):
2489 * platform/graphics/cairo/ImageBufferDataCairo.h:
2490 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2491 (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
2492 (WebCore::MediaPlayerPrivateGStreamerBase::proxy const):
2493 (WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded):
2494 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2495 * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
2496 * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
2497 * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
2498 * platform/graphics/texmap/TextureMapperPlatformLayerProxyProvider.h: Added.
2499 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2501 2017-08-08 Zan Dobersek <zdobersek@igalia.com>
2503 Unreviewed. Follow-up to r220392 that fixes build on configurations
2504 that disable USE(GSTREAMER_GL).
2506 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2507 (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
2508 When creating the BitmapTextureGL object, also provide an initialized
2509 TextureMapperContextAttributes object.
2511 2017-08-08 Zan Dobersek <zdobersek@igalia.com>
2513 [TexMap] Group GL header file inclusions in a single header file
2514 https://bugs.webkit.org/show_bug.cgi?id=175313
2516 Reviewed by Carlos Garcia Campos.
2518 Add a helper header file to the TextureMapper subsystem that includes
2519 the OpenGL headers, properly addressing the build configuration to
2520 include headers as provided by either libepoxy, the OpenGL ES library,
2521 or the OpenGL library.
2523 TextureMapperContextAttributes implementation file is the only one
2524 that can leverage the header at the moment, but more will follow.
2526 * platform/graphics/texmap/TextureMapperContextAttributes.cpp:
2527 * platform/graphics/texmap/TextureMapperGLHeaders.h: Copied from Source/WebCore/platform/graphics/texmap/TextureMapperContextAttributes.cpp.
2529 2017-08-08 Wenson Hsieh <wenson_hsieh@apple.com>
2531 [iOS WK2] WKWebView schedules nonstop layout after pressing cmb+b,i,u inside a contenteditable div
2532 https://bugs.webkit.org/show_bug.cgi?id=175116
2533 <rdar://problem/28279301>
2535 Reviewed by Darin Adler and Ryosuke Niwa.
2537 WebCore support for WebPage::editorState refactoring. See WebKit ChangeLogs for more detail.
2539 Tests: EditorStateTests.TypingAttributesBold
2540 EditorStateTests.TypingAttributesItalic
2541 EditorStateTests.TypingAttributesUnderline
2542 EditorStateTests.TypingAttributesTextAlignmentAbsoluteAlignmentOptions
2543 EditorStateTests.TypingAttributesTextAlignmentStartEnd
2544 EditorStateTests.TypingAttributesTextAlignmentDirectionalText
2545 EditorStateTests.TypingAttributesTextColor
2546 EditorStateTests.TypingAttributesMixedStyles
2547 EditorStateTests.TypingAttributesLinkColor
2549 * css/StyleProperties.cpp:
2550 (WebCore::StyleProperties::propertyAsColor const):
2551 (WebCore::StyleProperties::propertyAsValueID const):
2553 Introduces some helper functions in StyleProperties to convert CSS property values to Color or a CSSValueID.
2555 * css/StyleProperties.h:
2556 * editing/EditingStyle.cpp:
2557 (WebCore::EditingStyle::hasStyle):
2559 Pull out logic in selectionStartHasStyle that asks for a style TriState into EditingStyle::hasStyle. This is
2560 because WebPage::editorState will now query for multiple styles at the selection start, but
2561 selectionStartHasStyle currently recomputes styleAtSelectionStart every time it is called. To prevent extra work
2562 from being done, we can just call selectionStartHasStyle once and use ask for EditingStyle::hasStyle on the
2563 computed EditingStyle at selection start.
2565 * editing/EditingStyle.h:
2566 * editing/Editor.cpp:
2567 (WebCore::Editor::selectionStartHasStyle const):
2569 2017-08-08 Zan Dobersek <zdobersek@igalia.com>
2571 [TexMap] Add TextureMapperContextAttributes
2572 https://bugs.webkit.org/show_bug.cgi?id=175311
2574 Reviewed by Carlos Garcia Campos.
2576 Add and use TextureMapperContextAttributes, a slim struct that holds
2577 information about the type and extensions supported by the OpenGL
2578 context that's being used for one specific TextureMapperGL instance.
2580 This struct is initialized in the TextureMapperGL constructor for the
2581 OpenGL context that's been made current on that thread, and that will
2582 be used for that TextureMapperGL instance through its lifetime. The
2583 struct is then also copied into any BitmapTextureGL objects that have
2584 been created through this TextureMapperGL (or its texture pool).
2586 The struct is initialized with information about GLES2 support (which
2587 is at this point done through the USE_OPENGL_ES_2 macro) and about
2588 specific OpenGL extensions that are supported. These are then used in
2589 TextureMapperGL (NPOT textures) and BitmapTextureGL (BGRA support,
2590 sub-image unpacking) to deploy specific optimizations or workarounds.
2592 This ultimately serves as a replacement for clunky static functions
2593 that need to operate on GraphicsContext3D objects to retrieve this
2596 No new tests -- no change in behavior.
2598 * platform/TextureMapper.cmake:
2599 * platform/graphics/texmap/BitmapTextureGL.cpp:
2600 (WebCore::BitmapTextureGL::BitmapTextureGL):
2601 (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
2602 (WebCore::BitmapTextureGL::updateContents):
2603 (WebCore::driverSupportsSubImage): Deleted.
2604 * platform/graphics/texmap/BitmapTextureGL.h:
2605 (WebCore::BitmapTextureGL::create):
2606 * platform/graphics/texmap/BitmapTexturePool.cpp:
2607 (WebCore::BitmapTexturePool::BitmapTexturePool):
2608 (WebCore::BitmapTexturePool::createTexture):
2609 * platform/graphics/texmap/BitmapTexturePool.h:
2610 * platform/graphics/texmap/TextureMapperContextAttributes.cpp: Added.
2611 (WebCore::TextureMapperContextAttributes::initialize):
2612 * platform/graphics/texmap/TextureMapperContextAttributes.h: Added.
2613 * platform/graphics/texmap/TextureMapperGL.cpp:
2614 (WebCore::TextureMapperGL::TextureMapperGL):
2615 (WebCore::TextureMapperGL::drawTexture):
2616 (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
2617 (WebCore::TextureMapperGL::createTexture):
2618 (WebCore::driverSupportsNPOTTextures): Deleted.
2619 * platform/graphics/texmap/TextureMapperGL.h:
2621 2017-08-08 Zan Dobersek <zdobersek@igalia.com>
2623 [TexMap] Don't expose GraphicsContext3D object
2624 https://bugs.webkit.org/show_bug.cgi?id=175310
2626 Reviewed by Carlos Garcia Campos.
2628 Remove the GraphicsContext3D getter from the TextureMapperGL class. Instead,
2629 the clearColor() method is added that's to be used by the CoordinatedGraphicsScene
2630 class which was accessing the GraphicsContext3D object for this purpose.
2632 * platform/graphics/texmap/TextureMapper.h:
2633 * platform/graphics/texmap/TextureMapperGL.cpp:
2634 (WebCore::TextureMapperGL::clearColor):
2635 * platform/graphics/texmap/TextureMapperGL.h:
2636 (WebCore::TextureMapperGL::graphicsContext3D const): Deleted.
2638 2017-08-07 Simon Fraser <simon.fraser@apple.com>
2640 RenderStyle:diff() was inadvertently doing deep compares of StyleRareNonInheritedData etc
2641 https://bugs.webkit.org/show_bug.cgi?id=175304
2643 Reviewed by Tim Horton.
2645 r210758 changed DataRef::get() from returning a pointer to a reference. This caused all the places
2646 in RenderStyle::diff() and related functions, where we intended to do a quick pointer comparison,
2647 to doing deep compares via operator!=. This made the code slightly slower.
2649 Fix by exposing ptr() on DataRef and using it wherever we wish to do pointer comparison.
2651 * rendering/style/DataRef.h:
2652 (WebCore::DataRef::ptr const):
2653 * rendering/style/RenderStyle.cpp:
2654 (WebCore::RenderStyle::inheritedDataShared const):
2655 (WebCore::RenderStyle::changeAffectsVisualOverflow const):
2656 (WebCore::RenderStyle::changeRequiresLayout const):
2657 (WebCore::RenderStyle::changeRequiresRecompositeLayer const):
2658 (WebCore::RenderStyle::listStyleImage const): Expand the function onto multiple lines.
2660 2017-08-07 Simon Fraser <simon.fraser@apple.com>
2662 Add a fast path for rotate() and rotateZ() transform parsing
2663 https://bugs.webkit.org/show_bug.cgi?id=175308
2665 Reviewed by Zalan Bujtas.
2667 Fast paths only existed for translate-related functions, matrix3d() and scale3d(). Add
2668 rotate() and rotateX(), which gives a small boost to one of the MotionMark tests.
2670 * css/parser/CSSParserFastPaths.cpp:
2671 (WebCore::parseSimpleAngle):
2672 (WebCore::parseTransformAngleArgument):
2673 (WebCore::parseSimpleTransformValue):
2674 (WebCore::transformCanLikelyUseFastPath):
2676 2017-08-07 Simon Fraser <simon.fraser@apple.com>
2678 Re-order the tests in RenderLayerCompositor::requiresCompositingLayer() for performance
2679 https://bugs.webkit.org/show_bug.cgi?id=175306
2681 Reviewed by Tim Horton.
2683 Re-order the tests for compositing reasons so that reasons more likely to happen are higher in the list.
2685 * rendering/RenderLayerCompositor.cpp:
2686 (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
2687 (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
2689 2017-08-07 Simon Fraser <simon.fraser@apple.com>
2691 Avoid a hash lookup in FilterInfo::remove()
2692 https://bugs.webkit.org/show_bug.cgi?id=175301
2694 Reviewed by Sam Weinig.
2696 FilterInfo::remove() always called map().remove(&layer)), even when layer.m_hasFilterInfo
2697 was false (and even asserted that layer.m_hasFilterInfo == map().contains(&layer)).
2699 So we can early return if layer.m_hasFilterInfo is false.
2701 * rendering/RenderLayerFilterInfo.cpp:
2702 (WebCore::RenderLayer::FilterInfo::getIfExists):
2703 (WebCore::RenderLayer::FilterInfo::remove):
2705 2017-08-07 Simon Fraser <simon.fraser@apple.com>
2707 Make TransformOperation::type() non-virtual
2708 https://bugs.webkit.org/show_bug.cgi?id=175297
2710 Reviewed by Sam Weinig.
2712 Store the OperationType in the base class so that type() and isSameType() can
2715 Small perf win on some benchmarks.
2717 * platform/graphics/transforms/IdentityTransformOperation.h:
2718 * platform/graphics/transforms/Matrix3DTransformOperation.h:
2719 * platform/graphics/transforms/MatrixTransformOperation.h:
2720 * platform/graphics/transforms/PerspectiveTransformOperation.h:
2721 * platform/graphics/transforms/RotateTransformOperation.cpp:
2722 (WebCore::RotateTransformOperation::blend):
2723 * platform/graphics/transforms/RotateTransformOperation.h:
2724 * platform/graphics/transforms/ScaleTransformOperation.cpp:
2725 (WebCore::ScaleTransformOperation::blend):
2726 * platform/graphics/transforms/ScaleTransformOperation.h:
2727 * platform/graphics/transforms/SkewTransformOperation.cpp:
2728 (WebCore::SkewTransformOperation::blend):
2729 * platform/graphics/transforms/SkewTransformOperation.h:
2730 * platform/graphics/transforms/TransformOperation.h:
2731 (WebCore::TransformOperation::TransformOperation):
2732 (WebCore::TransformOperation::type const):
2733 (WebCore::TransformOperation::isSameType const):
2734 * platform/graphics/transforms/TranslateTransformOperation.cpp:
2735 (WebCore::TranslateTransformOperation::blend):
2736 * platform/graphics/transforms/TranslateTransformOperation.h:
2738 2017-08-07 Simon Fraser <simon.fraser@apple.com>
2740 Inline ~Color and Color::isExtended()
2741 https://bugs.webkit.org/show_bug.cgi?id=175293
2743 Reviewed by Zalan Bujtas.
2745 The Color destructor and Color::isExtended() show up on profiles, so inline them.
2746 Before r207265 the destructor was inlined.
2748 Also make sure that LengthSize::operator== is inlined, which it was not (according
2751 * platform/LengthSize.h:
2752 (WebCore::operator==):
2753 * platform/graphics/Color.cpp:
2754 (WebCore::Color::~Color): Deleted.
2755 (WebCore::Color::isExtended const): Deleted.
2756 * platform/graphics/Color.h:
2757 (WebCore::Color::~Color):
2758 (WebCore::Color::isExtended const):
2760 2017-08-04 Brent Fulgham <bfulgham@apple.com>
2762 Implement the HTML5 same-origin restriction specification
2763 https://bugs.webkit.org/show_bug.cgi?id=175226
2764 <rdar://problem/11079948>
2766 Reviewed by Chris Dumez.
2768 Follow the algorithms defined in the HTML5 specification for relaxing
2769 the same-origin restriction. We were missing a few steps related to
2770 checking for public suffix and presence of a browsing context.
2772 Tested by new TestWebKitAPI tests.
2775 (WebCore::Document::domainIsRegisterable): Added helper function.
2776 (WebCore::Document::setDomain):
2778 2017-08-07 Devin Rousso <drousso@apple.com>
2780 Web Inspector: Preview Canvas path when viewing a recording
2781 https://bugs.webkit.org/show_bug.cgi?id=174967
2783 Reviewed by Brian Burg.
2785 Tests: fast/canvas/2d.currentPoint.html
2786 fast/canvas/2d.getPath.modification.html
2787 fast/canvas/2d.getPath.newobject.html
2788 fast/canvas/2d.setPath.html
2790 * html/canvas/CanvasPath.idl:
2791 * html/canvas/CanvasPath.h:
2792 * html/canvas/CanvasPath.cpp:
2793 (WebCore::CanvasPath::currentX const):
2794 (WebCore::CanvasPath::currentY const):
2796 * html/canvas/CanvasRenderingContext2D.idl:
2797 * html/canvas/CanvasRenderingContext2D.h:
2798 * html/canvas/CanvasRenderingContext2D.cpp:
2799 (WebCore::CanvasRenderingContext2D::setPath):
2800 (WebCore::CanvasRenderingContext2D::getPath const):
2802 * page/RuntimeEnabledFeatures.h:
2803 (WebCore::RuntimeEnabledFeatures::setInspectorAdditionsEnabled):
2804 (WebCore::RuntimeEnabledFeatures::inspectorAdditionsEnabled const):
2805 Add runtime flag for added IDL items above so that they are only usable within the inspector
2806 process. The runtime flag is not enabled from anywhere else as of now.
2808 * inspector/InspectorCanvas.cpp:
2809 (WebCore::InspectorCanvas::buildInitialState):
2810 Send current path as part of the InitialState.
2811 Drive-by: deduplicate more string values.
2813 2017-08-07 Chris Dumez <cdumez@apple.com>
2815 Update sendBeacon() to rely on FetchBody instead of the whole FetchRequest
2816 https://bugs.webkit.org/show_bug.cgi?id=175280
2818 Reviewed by Youenn Fablet.
2820 Update sendBeacon() to rely on FetchBody instead of the whole FetchRequest. FetchBody
2821 for data extraction is really the only thing we need at the moment.
2822 The new code also properly sets the CORS mode, which will be needed for Bug 175264.
2824 * Modules/beacon/NavigatorBeacon.cpp:
2825 (WebCore::NavigatorBeacon::sendBeacon):
2827 2017-08-07 Michael Catanzaro <mcatanzaro@igalia.com>
2829 -Wimplicit-fallthrough warning in ComputedStyleExtractor::propertyValue
2830 https://bugs.webkit.org/show_bug.cgi?id=174469
2831 <rdar://problem/33311638>
2833 Reviewed by Simon Fraser.
2835 Add a RELEASE_ASSERT_NOT_REACHED to silence this warning.
2837 * css/CSSComputedStyleDeclaration.cpp:
2838 (WebCore::ComputedStyleExtractor::propertyValue):
2840 2017-08-06 Filip Pizlo <fpizlo@apple.com>
2842 Primitive auxiliaries and JSValue auxiliaries should have separate gigacages
2843 https://bugs.webkit.org/show_bug.cgi?id=174919
2845 Reviewed by Keith Miller.
2847 No new tests because no change in behavior.
2849 Adapting to API changes - we now specify the AlignedMemoryAllocator differently and we need to be
2850 specific about which Gigacage we're using.
2852 * bindings/js/WebCoreJSClientData.cpp:
2853 (WebCore::JSVMClientData::JSVMClientData):
2854 * platform/graphics/cocoa/GPUBufferMetal.mm:
2855 (WebCore::GPUBuffer::GPUBuffer):
2857 2017-08-07 Basuke Suzuki <Basuke.Suzuki@sony.com>
2859 [Curl] Add abstraction layer of cookie jar implementation for Curl port
2860 https://bugs.webkit.org/show_bug.cgi?id=174943
2862 Reviewed by Brent Fulgham.
2864 * platform/network/curl/CookieJarCurl.cpp:
2865 (WebCore::CookieJarCurlFileSystem::setCookiesFromDOM):
2866 (WebCore::CookieJarCurlFileSystem::cookiesForDOM):
2867 (WebCore::CookieJarCurlFileSystem::cookieRequestHeaderFieldValue):
2868 (WebCore::CookieJarCurlFileSystem::cookiesEnabled):
2869 (WebCore::CookieJarCurlFileSystem::getRawCookies):
2870 (WebCore::CookieJarCurlFileSystem::deleteCookie):
2871 (WebCore::CookieJarCurlFileSystem::getHostnamesWithCookies):
2872 (WebCore::CookieJarCurlFileSystem::deleteCookiesForHostnames):
2873 (WebCore::CookieJarCurlFileSystem::deleteAllCookies):
2874 (WebCore::CookieJarCurlFileSystem::deleteAllCookiesModifiedSince):
2875 (WebCore::cookiesForDOM):
2876 (WebCore::setCookiesFromDOM):
2877 (WebCore::cookieRequestHeaderFieldValue):
2878 (WebCore::cookiesEnabled):
2879 (WebCore::getRawCookies):
2880 (WebCore::deleteCookie):
2881 (WebCore::getHostnamesWithCookies):
2882 (WebCore::deleteCookiesForHostnames):
2883 (WebCore::deleteAllCookies):
2884 (WebCore::deleteAllCookiesModifiedSince):
2885 * platform/network/curl/CookieJarCurl.h: Added.
2886 * platform/network/curl/CurlContext.cpp:
2887 * platform/network/curl/CurlContext.h:
2888 (WebCore::CurlContext::cookieJar):
2890 2017-08-07 Brady Eidson <beidson@apple.com>
2892 Implement most of ServiceWorkerContainer::addRegistration.
2893 https://bugs.webkit.org/show_bug.cgi?id=175237
2895 Reviewed by Andy Estes.
2897 No new tests (Covered by changes to existing tests).
2899 There's still so much supporting infrastructure to add with these early patches
2900 that I'm still moving them in baby steps for now, hence not implementing
2901 register() all in one shot.
2903 Things will start moving very quickly once we no longer need to add lots of new
2904 primitives in each change.
2907 * DerivedSources.make:
2908 * WebCore.xcodeproj/project.pbxproj:
2910 * page/DOMWindow.cpp:
2911 (WebCore::DOMWindow::navigator const):
2913 * page/Navigator.cpp:
2914 (WebCore::Navigator::Navigator): Make the constructor take a ScriptExecutionContext for
2915 creation of objects where its import (e.g. ServiceWorkerContainer).
2918 * page/WorkerNavigator.cpp:
2919 (WebCore::WorkerNavigator::WorkerNavigator): Ditto.
2920 * page/WorkerNavigator.h:
2922 * page/NavigatorBase.cpp:
2923 (WebCore::NavigatorBase::NavigatorBase): Create the ServiceWorkerContainer upfront with
2924 the passed-in ScriptExecutionContext.
2925 (WebCore::NavigatorBase::serviceWorker):
2926 * page/NavigatorBase.h:
2928 Make ServiceWorkerContainer into an ActiveDOMObject. This will eventually be necessary for
2929 Document suspension reasons, but is also necessary because it also needs to be a
2930 ContextDestructionObserver (which ActiveDOMObject is):
2931 * workers/ServiceWorkerContainer.cpp:
2932 (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
2933 (WebCore::ServiceWorkerContainer::ready):
2934 (WebCore::ServiceWorkerContainer::addRegistration):
2935 (WebCore::ServiceWorkerContainer::getRegistration):
2936 (WebCore::ServiceWorkerContainer::getRegistrations):
2937 (WebCore::ServiceWorkerContainer::activeDOMObjectName const):
2938 (WebCore::ServiceWorkerContainer::canSuspendForDocumentSuspension const):
2939 (WebCore::rejectLater): Deleted.
2940 (WebCore::ServiceWorkerContainer::eventTargetInterface const): Deleted.
2941 (WebCore::ServiceWorkerContainer::scriptExecutionContext const): Deleted.
2942 * workers/ServiceWorkerContainer.h:
2943 * workers/ServiceWorkerContainer.idl:
2945 Add updateViaCache, etc:
2946 * workers/ServiceWorkerRegistration.cpp:
2947 (WebCore::ServiceWorkerRegistration::updateViaCache const):
2948 (WebCore::ServiceWorkerRegistration::update):
2949 (WebCore::ServiceWorkerRegistration::unregister):
2950 * workers/ServiceWorkerRegistration.h:
2951 * workers/ServiceWorkerRegistration.idl:
2953 * workers/ServiceWorkerUpdateViaCache.h: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
2954 * workers/ServiceWorkerUpdateViaCache.idl: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
2956 * workers/WorkerGlobalScope.cpp:
2957 (WebCore::WorkerGlobalScope::navigator):
2958 (WebCore::WorkerGlobalScope::navigator const): Deleted.
2959 * workers/WorkerGlobalScope.h:
2961 * workers/WorkerType.h: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
2962 * workers/WorkerType.idl: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
2964 2017-08-07 Ryan Haddad <ryanhaddad@apple.com>
2966 Unreviewed, rolling out r220299.
2968 This change caused LayoutTest inspector/dom-debugger/dom-
2969 breakpoints.html to fail.
2973 "Web Inspector: capture async stack trace when workers/main
2974 context posts a message"
2975 https://bugs.webkit.org/show_bug.cgi?id=167084
2976 http://trac.webkit.org/changeset/220299
2978 2017-08-07 Brian Burg <bburg@apple.com>
2980 Cleanup: simplify WebSockets code for RuntimeEnabledFeatures
2981 https://bugs.webkit.org/show_bug.cgi?id=175190
2983 Reviewed by Sam Weinig.
2985 This runtime enabled flag is not used by anything. It was added
2986 for V8 in <https://bugs.webkit.org/show_bug.cgi?id=29896>.
2988 * Modules/websockets/WebSocket.cpp:
2989 (WebCore::WebSocket::setIsAvailable): Deleted.
2990 (WebCore::WebSocket::isAvailable): Deleted.
2991 * Modules/websockets/WebSocket.h:
2992 * Modules/websockets/WebSocket.idl:
2993 * page/RuntimeEnabledFeatures.cpp:
2994 (WebCore::RuntimeEnabledFeatures::webSocketEnabled const): Deleted.
2995 * page/RuntimeEnabledFeatures.h:
2997 2017-08-07 Brian Burg <bburg@apple.com>
2999 Remove CANVAS_PATH compilation guard
3000 https://bugs.webkit.org/show_bug.cgi?id=175207
3002 Reviewed by Sam Weinig.
3004 * Configurations/FeatureDefines.xcconfig:
3005 * html/canvas/DOMPath.h:
3006 * html/canvas/DOMPath.idl:
3008 2017-08-07 Carlos Alberto Lopez Perez <clopez@igalia.com>
3010 [WPE][CMake] Only pass pkg-config CFLAGS from (E)GL when not using libepoxy.
3011 https://bugs.webkit.org/show_bug.cgi?id=175125
3013 Reviewed by Michael Catanzaro.
3015 No change of behavior, covered by existing tests.
3017 * CMakeLists.txt: Instead of negating 3 times the use of libepoxy
3018 move the logic for (E)GL detection inside an else() block.
3020 2017-08-07 Antti Koivisto <antti@apple.com>
3022 REGRESSION (r219121): Airmail 3 prints header part only.
3023 https://bugs.webkit.org/show_bug.cgi?id=175258
3024 <rdar://problem/33601173>
3026 Reviewed by Andreas Kling.
3028 When a WK1 WebViw is printed via AppKit view hierarchy it won't explictly set the page width
3029 but uses the existing width. r219121 assumes that all printing code paths set the page width.
3031 No test, there appears to be no good way to test AppKit printing behaviors without adding complicated
3032 new testing infrastructure.
3034 * rendering/RenderView.cpp:
3035 (WebCore::RenderView::layout):
3037 If we are in printing layout and don't have page width set yet then use the current view width.
3038 This matches the behavior prior r219121.
3040 2017-08-05 Youenn Fablet <youenn@apple.com>
3042 [Fetch API] Response should keep all ResourceResponse information
3043 https://bugs.webkit.org/show_bug.cgi?id=175099
3045 Reviewed by Sam Weinig.
3047 No change of behavior, covered by existing tests.
3049 Disabling filtering of resource response at DocumentThreadableLoader for fetch API and doing the filtering at FetchResponse level.
3050 This requires passing the tainting parameter to FetchResponse. For that purpose, we store the tainting on the ResourceResponse itself.
3051 This allows mimicking the concept of internal response from the fetch spec.
3052 This might be useful for future developments related to caching the responses.
3054 The body is now also stored in FetchResponse so a flag is added to ensure we only expose the body if allowed.
3056 Changing storage of opaque redirect information to keep the redirection information in the response.
3058 * Modules/fetch/FetchBodyOwner.cpp:
3059 (WebCore::FetchBodyOwner::blob):
3060 (WebCore::FetchBodyOwner::consumeNullBody):
3061 * Modules/fetch/FetchBodyOwner.h:
3062 * Modules/fetch/FetchLoader.cpp:
3063 (WebCore::FetchLoader::start):
3064 * Modules/fetch/FetchResponse.cpp:
3065 (WebCore::FetchResponse::BodyLoader::didReceiveResponse):
3066 (WebCore::FetchResponse::consume):
3067 (WebCore::FetchResponse::consumeBodyAsStream):
3068 (WebCore::FetchResponse::createReadableStreamSource):
3069 * Modules/fetch/FetchResponse.h:
3070 * loader/DocumentThreadableLoader.cpp:
3071 (WebCore::DocumentThreadableLoader::responseReceived):
3072 (WebCore::DocumentThreadableLoader::didReceiveResponse):
3073 (WebCore::DocumentThreadableLoader::didFinishLoading):
3074 (WebCore::DocumentThreadableLoader::loadRequest):
3075 * loader/DocumentThreadableLoader.h:
3076 * loader/SubresourceLoader.cpp:
3077 (WebCore::SubresourceLoader::willSendRequestInternal):
3078 * loader/cache/CachedResource.cpp:
3079 (WebCore::CachedResource::setBodyDataFrom):
3080 (WebCore::CachedResource::setResponse):
3081 * platform/network/ResourceResponseBase.cpp:
3082 (WebCore::ResourceResponseBase::crossThreadData const):
3083 (WebCore::ResourceResponseBase::fromCrossThreadData):
3084 (WebCore::ResourceResponseBase::filter):
3085 * platform/network/ResourceResponseBase.h:
3086 (WebCore::ResourceResponseBase::setTainting):
3087 (WebCore::ResourceResponseBase::tainting const):
3088 (WebCore::ResourceResponseBase::encode const):
3089 (WebCore::ResourceResponseBase::decode):
3091 2017-08-05 Carlos Garcia Campos <cgarcia@igalia.com>
3093 WebDriver: use in-view center point for clicks instead of bounding box center point
3094 https://bugs.webkit.org/show_bug.cgi?id=174863
3096 Reviewed by Simon Fraser.
3098 Make DOMRect, and FloatPoint::narrowPrecision() available to WebKit layer. Also add
3099 FrameView::clientToDocumentPoint().
3101 * WebCore.xcodeproj/project.pbxproj:
3104 * platform/graphics/FloatPoint.h:
3106 2017-08-05 Carlos Garcia Campos <cgarcia@igalia.com>
3108 getClientRects doesn't work with list box option elements
3109 https://bugs.webkit.org/show_bug.cgi?id=175016
3111 Reviewed by Darin Adler.
3113 Since HTMLOptionElement and HTMLOptGroupElement don't have a renderer, we are always returning an empty list
3114 from getClientRects. This is working fine in both chromium and firefox, option elements return its own bounding
3115 box and group elements return the bounding box of the group label and all its children items.
3117 Test: fast/dom/HTMLSelectElement/listbox-items-client-rects.html
3120 (WebCore::listBoxElementBoundingBox): Helper function to return the bounding box of a HTMLOptionElement or
3121 HTMLOptGroupElement element.
3122 (WebCore::Element::getClientRects): Use listBoxElementBoundingBox() in case of HTMLOptionElement or
3123 HTMLOptGroupElement.
3124 (WebCore::Element::boundingClientRect): Ditto.
3126 2017-08-04 Youenn Fablet <youenn@apple.com>
3128 [Cache API] Add Cache and CacheStorage IDL definitions
3129 https://bugs.webkit.org/show_bug.cgi?id=175201
3131 Reviewed by Brady Eidson.
3133 Covered by activated tests.
3134 Adding IDLs as per https://www.w3.org/TR/service-workers-1/#idl-index.
3135 Implementation is guarded by a runtime flag which is off by default.
3136 It is off for DRT but on for WTR.
3139 * DerivedSources.make:
3140 * Modules/cache/Cache.cpp: Added.
3141 (WebCore::Cache::match):
3142 (WebCore::Cache::matchAll):
3143 (WebCore::Cache::add):
3144 (WebCore::Cache::addAll):
3145 (WebCore::Cache::put):
3146 (WebCore::Cache::remove):
3147 (WebCore::Cache::keys):
3148 * Modules/cache/Cache.h: Added.
3149 (WebCore::Cache::create):
3150 (WebCore::Cache::Cache):
3151 * Modules/cache/Cache.idl: Added.
3152 * Modules/cache/CacheQueryOptions.h: Added.
3153 * Modules/cache/CacheQueryOptions.idl: Added.
3154 * Modules/cache/CacheStorage.cpp: Added.
3155 (WebCore::CacheStorage::match):
3156 (WebCore::CacheStorage::has):
3157 (WebCore::CacheStorage::open):
3158 (WebCore::CacheStorage::remove):
3159 (WebCore::CacheStorage::keys):
3160 * Modules/cache/CacheStorage.h: Added.
3161 (WebCore::CacheStorage::create):
3162 * Modules/cache/CacheStorage.idl: Added.
3163 * Modules/cache/DOMWindowCaches.cpp: Added.
3164 (WebCore::DOMWindowCaches::DOMWindowCaches):
3165 (WebCore::DOMWindowCaches::supplementName):
3166 (WebCore::DOMWindowCaches::from):
3167 (WebCore::DOMWindowCaches::caches):
3168 (WebCore::DOMWindowCaches::caches const):
3169 * Modules/cache/DOMWindowCaches.h: Added.
3170 * Modules/cache/DOMWindowCaches.idl: Added.
3171 * Modules/cache/WorkerGlobalScopeCaches.cpp: Added.
3172 (WebCore::WorkerGlobalScopeCaches::supplementName):
3173 (WebCore::WorkerGlobalScopeCaches::from):
3174 (WebCore::WorkerGlobalScopeCaches::caches):
3175 (WebCore::WorkerGlobalScopeCaches::caches const):
3176 * Modules/cache/WorkerGlobalScopeCaches.h: Added.
3177 * Modules/cache/WorkerGlobalScopeCaches.idl: Added.
3178 * WebCore.xcodeproj/project.pbxproj:
3179 * page/RuntimeEnabledFeatures.h:
3180 (WebCore::RuntimeEnabledFeatures::setCacheAPIEnabled):
3181 (WebCore::RuntimeEnabledFeatures::cacheAPIEnabled const):
3183 2017-08-04 Brady Eidson <beidson@apple.com>
3185 Have navigator.serviceWorker() actually return a ServiceWorkerContainer object.
3186 https://bugs.webkit.org/show_bug.cgi?id=175215
3188 Reviewed by Youenn Fablet.
3190 * page/NavigatorBase.cpp:
3191 (WebCore::NavigatorBase::serviceWorker): Actually create and remember an object.
3192 * page/NavigatorBase.h:
3194 * workers/ServiceWorkerContainer.cpp:
3195 (WebCore::rejectLater): Asynchronously reject the given promise with an error message.
3196 (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
3197 (WebCore::ServiceWorkerContainer::refEventTarget): Ref the underlying Navigator.
3198 (WebCore::ServiceWorkerContainer::derefEventTarget): Deref the underlying Navigator.
3199 (WebCore::ServiceWorkerContainer::ready): rejectLater the promise.
3200 (WebCore::ServiceWorkerContainer::addRegistration): Ditto.
3201 (WebCore::ServiceWorkerContainer::getRegistration): Ditto.
3202 (WebCore::ServiceWorkerContainer::getRegistrations): Ditto.
3203 * workers/ServiceWorkerContainer.h:
3205 2017-08-04 Chris Dumez <cdumez@apple.com>
3207 [Beacon] Update sendBeacon to use the CachedResourceLoader
3208 https://bugs.webkit.org/show_bug.cgi?id=175192
3209 <rdar://problem/33725923>
3211 Reviewed by Youenn Fablet.
3213 Update sendBeacon to use the FetchRequest / CachedResourceLoader instead of
3214 the PingLoader. This gets us closer to the specification which is based on
3215 Fetch and reduces code duplication. This also fixes an issue where our
3216 Origin header was not properly set on Beacon resquests.
3218 In a follow-up, we will implement in CachedResourceLoader Fetch's quota for
3219 inflight keepalive requests which is needed to fully support sendBeacon().
3221 * Modules/beacon/NavigatorBeacon.cpp:
3222 (WebCore::NavigatorBeacon::sendBeacon):
3223 * Modules/beacon/NavigatorBeacon.h:
3224 * loader/LinkLoader.cpp:
3225 (WebCore::createLinkPreloadResourceClient):
3226 * loader/PingLoader.cpp:
3227 * loader/PingLoader.h:
3228 * loader/ResourceLoadInfo.cpp:
3229 (WebCore::toResourceType):
3230 * loader/SubresourceLoader.cpp:
3231 (WebCore::logResourceLoaded):
3232 * loader/cache/CachedResource.cpp:
3233 (WebCore::CachedResource::defaultPriorityForResourceType):
3234 (WebCore::CachedResource::load):
3235 * loader/cache/CachedResource.h:
3236 * loader/cache/CachedResourceLoader.cpp:
3237 (WebCore::createResource):
3238 (WebCore::CachedResourceLoader::requestBeaconResource):
3239 (WebCore::contentTypeFromResourceType):
3240 (WebCore::CachedResourceLoader::checkInsecureContent const):
3241 (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
3242 (WebCore::isResourceSuitableForDirectReuse):
3243 * loader/cache/CachedResourceLoader.h:
3245 2017-08-04 John Wilander <wilander@apple.com>
3247 Resource Load Statistics: Report user interaction immediately, but only when needed
3248 https://bugs.webkit.org/show_bug.cgi?id=175090
3249 <rdar://problem/33685546>
3251 Reviewed by Chris Dumez.
3253 Test: http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html
3255 * loader/ResourceLoadObserver.cpp:
3256 (WebCore::ResourceLoadObserver::ResourceLoadObserver):
3257 (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
3258 Now tells the UI process immediately but also records that it has
3259 done so to avoid doing it when not needed.
3260 (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
3261 Conditional throttling gone, now always throttles.
3262 (WebCore::ResourceLoadObserver::notifyObserver):
3263 Renamed from ResourceLoadObserver::notificationTimerFired().
3264 (WebCore::ResourceLoadObserver::clearState):
3265 New function to allow the test runner to reset the web process'
3266 statistics state now that we keep track of whether or not we've
3267 reported user interaction to the UI process.
3268 (WebCore::ResourceLoadObserver::setShouldThrottleObserverNotifications): Deleted.
3269 (WebCore::ResourceLoadObserver::notificationTimerFired): Deleted.
3270 * loader/ResourceLoadObserver.h:
3272 * testing/Internals.cpp:
3273 (WebCore::Internals::resetToConsistentState):
3274 (WebCore::Internals::setResourceLoadStatisticsShouldThrottleObserverNotifications): Deleted.
3275 No longer needed since user interaction is always communicated
3277 * testing/Internals.h:
3278 * testing/Internals.idl:
3280 2017-08-04 Matt Baker <mattbaker@apple.com>
3282 Web Inspector: capture async stack trace when workers/main context posts a message
3283 https://bugs.webkit.org/show_bug.cgi?id=167084
3284 <rdar://problem/30033673>
3286 Reviewed by Brian Burg.
3288 Add instrumentation to DOMWindow to support showing asynchronous
3289 stack traces when the debugger pauses in a MessageEvent handler.
3291 Test: inspector/debugger/async-stack-trace.html
3293 * inspector/InspectorInstrumentation.cpp:
3294 (WebCore::InspectorInstrumentation::didPostMessageImpl):
3295 (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
3296 (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
3297 (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
3299 * inspector/InspectorInstrumentation.h:
3300 (WebCore::InspectorInstrumentation::didPostMessage):
3301 (WebCore::InspectorInstrumentation::didFailPostMessage):
3302 (WebCore::InspectorInstrumentation::willDispatchPostMessage):
3303 (WebCore::InspectorInstrumentation::didDispatchPostMessage):
3305 * inspector/PageDebuggerAgent.cpp:
3306 (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
3307 (WebCore::PageDebuggerAgent::didPostMessage):
3308 (WebCore::PageDebuggerAgent::didFailPostMessage):
3309 (WebCore::PageDebuggerAgent::willDispatchPostMessage):
3310 (WebCore::PageDebuggerAgent::didDispatchPostMessage):
3311 * inspector/PageDebuggerAgent.h:
3313 * page/DOMWindow.cpp:
3314 (WebCore::DOMWindow::postMessage):
3315 (WebCore::DOMWindow::postMessageTimerFired):
3317 2017-08-04 Devin Rousso <drousso@apple.com>
3319 Web Inspector: add source view for WebGL shader programs
3320 https://bugs.webkit.org/show_bug.cgi?id=138593
3321 <rdar://problem/18936194>
3323 Reviewed by Matt Baker.
3325 Test: inspector/canvas/requestShaderSource.html
3327 * inspector/InspectorCanvasAgent.h:
3328 * inspector/InspectorCanvasAgent.cpp:
3329 (WebCore::InspectorCanvasAgent::requestShaderSource):
3331 * inspector/InspectorShaderProgram.h:
3332 * inspector/InspectorShaderProgram.cpp:
3333 (WebCore::InspectorShaderProgram::shaderForType):
3335 2017-08-04 Matt Lewis <jlewis3@apple.com>
3337 Unreviewed, rolling out r220288.
3339 This broke multiple builds.
3343 "Use MPAVRoutingController instead of deprecated versions."
3344 https://bugs.webkit.org/show_bug.cgi?id=175063
3345 http://trac.webkit.org/changeset/220288
3347 2017-08-03 Filip Pizlo <fpizlo@apple.com>
3349 The allocator used to allocate memory for MarkedBlocks and LargeAllocations should not be the Subspace itself
3350 https://bugs.webkit.org/show_bug.cgi?id=175141
3352 Reviewed by Mark Lam.
3354 No new tests because no new behavior.
3356 Just adapting to an API change.
3358 * ForwardingHeaders/heap/FastMallocAlignedMemoryAllocator.h: Added.
3359 * bindings/js/WebCoreJSClientData.cpp:
3360 (WebCore::JSVMClientData::JSVMClientData):
3362 2017-08-04 Chris Dumez <cdumez@apple.com>
3364 Match newly-clarified spec on textarea defaultValue/value/child text content
3365 https://bugs.webkit.org/show_bug.cgi?id=173878
3367 Reviewed by Darin Adler.
3369 Update HTMLTextArea.defaultValue to match align with other browsers and match the
3370 latest HTML specification:
3371 - https://html.spec.whatwg.org/#dom-textarea-defaultvalue
3373 The defaultValue getter should return the child text content:
3374 - https://dom.spec.whatwg.org/#concept-child-text-content
3375 Our code was traversing all Text descendants, not just the children.
3377 The defaultValue setter should act as the setter of the Element's textContent
3378 IDL attribute. Previously, we had a custom logic that was only removing the
3381 Test: imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html
3383 * dom/ScriptElement.cpp:
3384 (WebCore::ScriptElement::scriptContent const):
3385 * dom/TextNodeTraversal.cpp:
3386 (WebCore::TextNodeTraversal::childTextContent):
3387 * dom/TextNodeTraversal.h:
3388 * html/HTMLTextAreaElement.cpp:
3389 (WebCore::HTMLTextAreaElement::defaultValue const):
3390 (WebCore::HTMLTextAreaElement::setDefaultValue):
3391 * html/HTMLTitleElement.cpp:
3392 (WebCore::HTMLTitleElement::text const):
3394 2017-08-04 Said Abou-Hallawa <sabouhallawa@apple.com>
3396 RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available
3397 https://bugs.webkit.org/show_bug.cgi?id=174874
3398 <rdar://problem/33530130>
3400 Reviewed by Simon Fraser.
3402 If an <img> element has a non-CachedImage content data, e.g. -webkit-named-image,
3403 RenderImageResourceStyleImage will be created and attached to the RenderImage.
3404 RenderImageResourceStyleImage::m_cachedImage will be set to null at the
3405 beginning because the m_styleImage->isCachedImage() is false in this case.
3406 When ImageLoader finishes loading the url of the src attribute,
3407 RenderImageResource::setCachedImage() will be called to set m_cachedImage.
3409 A crash will happen when the RenderImage is destroyed. Destroying the
3410 RenderImage calls RenderImageResourceStyleImage::shutdown() which checks
3411 m_cachedImage and finds it not null, so it calls RenderImageResourceStyleImage::image()
3412 which ends up calling CSSNamedImageValue::image() which returns a null pointer
3413 because the size is empty. RenderImageResourceStyleImage::shutdown() calls
3414 image()->stopAnimation() without checking the return value of image().
3416 Another crash will happen later when deleting the CachedImage from the memory
3417 cache if CachedImage::canDestroyDecodedData() is called because the client
3418 it gets from m_clients is a freed pointer. This happens because RenderImageResourceStyleImage
3419 has m_styleImage of type StyleGeneratedImage but its m_cachedImage is set
3420 by RenderImageResource::setCachedImage(). When RenderImageResourceStyleImage::shutdown()
3421 is called, it calls StyleGeneratedImage::removeClient() which does not
3422 know anything about RenderImageResourceStyleImage::m_cachedImage. So we
3423 end up having a freed pointer in the m_clients of the CachedImage.
3425 Test: fast/images/image-element-image-content-data.html
3427 * rendering/RenderImageResourceStyleImage.cpp:
3428 (WebCore::RenderImageResourceStyleImage::shutdown): Revert back the changes
3429 of r208511 in this function. Add a call to image()->stopAnimation() without
3430 checking the return of image() since it will return the nullImage() if
3431 the image not available. There is no need to check m_cachedImage before
3432 calling image() because image() does not check or access m_cachedImage.
3434 If m_styleImage is not a CachedStyleImage but m_cachedImage is not null,
3435 we need to remove m_renderer from the set of the clients of this m_cachedImage.
3437 (WebCore::RenderImageResourceStyleImage::image const): The base class method
3438 RenderImageResource::image() returns the nullImage() if the image not
3439 available. This is because CachedImage::imageForRenderer() returns
3440 the nullImage() if the image is not available; see CachedImage.h. We should
3441 do the same for the derived class for consistency.
3443 2017-08-04 Jeremy Jones <jeremyj@apple.com>
3445 Use MPAVRoutingController instead of deprecated versions.
3446 https://bugs.webkit.org/show_bug.cgi?id=175063
3448 Reviewed by Tim Horton.
3450 No new tests because no behavior change. This uses a different platform class to present
3453 Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
3454 Add MPMediaControlsViewController.
3456 * platform/spi/ios/MediaPlayerSPI.h:
3458 2017-08-04 Matt Baker <mattbaker@apple.com>
3460 Web Inspector: REGRESSION (r220233): Check for null pointer passed to WebGLRenderingContextBase::deleteProgram
3461 https://bugs.webkit.org/show_bug.cgi?id=175196
3462 <rdar://problem/33727603>
3464 Reviewed by Devin Rousso.
3466 * html/canvas/WebGLRenderingContextBase.cpp:
3467 (WebCore::WebGLRenderingContextBase::deleteProgram):
3469 2017-08-04 Matt Lewis <jlewis3@apple.com>
3471 Unreviewed, rolling out r220271.
3473 Rolling out due to Layout Test failing on iOS Simulator.
3477 "Remove STREAMS_API compilation guard"
3478 https://bugs.webkit.org/show_bug.cgi?id=175165
3479 http://trac.webkit.org/changeset/220271
3481 2017-08-03 Sam Weinig <sam@webkit.org>
3483 [Cleanup] Remove ScriptGlobalObject
3484 https://bugs.webkit.org/show_bug.cgi?id=175173
3486 Reviewed by Darin Adler.
3488 ScriptGlobalObject's two functions were only being used in
3489 four places. Three of those uses (ScriptGlobalObject::set in
3490 InspectorFrontendClientLocal, WebInspectorUI, and RemoteWebInspectorUI)
3491 were merged into the new function addSelfToGlobalObjectInWorld on
3492 InspectorFrontendHost. The remaining function (ScriptGlobalObject::get
3493 in InspectorFrontendHost) was easily inlined.
3496 * WebCore.xcodeproj/project.pbxproj:
3497 * bindings/js/JSBindingsAllInOne.cpp:
3498 * bindings/js/ScriptGlobalObject.cpp: Removed.
3499 * bindings/js/ScriptGlobalObject.h: Removed.
3500 Removed ScriptGlobalObject.
3502 * inspector/InspectorFrontendClientLocal.cpp:
3503 (WebCore::InspectorFrontendClientLocal::windowObjectCleared):
3504 Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.
3506 * inspector/InspectorFrontendHost.h:
3507 * inspector/InspectorFrontendHost.cpp:
3508 (WebCore::InspectorFrontendHost::showContextMenu):
3509 Inline ScriptGlobalObject::get.
3511 (WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld):
3512 Add helper which inlines ScriptGlobalObject::set and works
3513 as a helper for the three inspector frontends.
3515 2017-08-04 Ryan Haddad <ryanhaddad@apple.com>
3517 Unreviewed, rolling out r220268.
3519 This change caused assertion failures on macOS and iOS Debug
3524 "Resource Load Statistics: Report user interaction
3525 immediately, but only when needed"
3526 https://bugs.webkit.org/show_bug.cgi?id=175090
3527 http://trac.webkit.org/changeset/220268
3529 2017-08-04 Youenn Fablet <youenn@apple.com>
3531 Remove STREAMS_API compilation guard
3532 https://bugs.webkit.org/show_bug.cgi?id=175165
3534 Reviewed by Darin Adler.
3536 No change of behavior.
3538 * Configurations/FeatureDefines.xcconfig:
3539 * Modules/fetch/FetchBody.cpp:
3540 (WebCore::FetchBody::consumeAsStream):
3541 * Modules/fetch/FetchBody.h:
3542 * Modules/fetch/FetchBodyOwner.cpp:
3543 (WebCore::FetchBodyOwner::isDisturbedOrLocked const):
3544 (WebCore::FetchBodyOwner::blobLoadingSucceeded):
3545 (WebCore::FetchBodyOwner::blobLoadingFailed):
3546 (WebCore::FetchBodyOwner::blobChunk):
3547 * Modules/fetch/FetchBodyOwner.h:
3548 * Modules/fetch/FetchResponse.cpp:
3549 (WebCore::FetchResponse::BodyLoader::didSucceed):
3550 (WebCore::FetchResponse::BodyLoader::didFail):
3551 (WebCore::FetchResponse::BodyLoader::didReceiveData):
3552 * Modules/fetch/FetchResponse.h:
3553 * Modules/fetch/FetchResponse.idl:
3554 * Modules/fetch/FetchResponse.js:
3555 (initializeFetchResponse):
3556 * Modules/fetch/FetchResponseSource.cpp:
3557 * Modules/fetch/FetchResponseSource.h:
3558 * Modules/streams/ByteLengthQueuingStrategy.idl:
3559 * Modules/streams/ByteLengthQueuingStrategy.js:
3560 * Modules/streams/CountQueuingStrategy.idl:
3561 * Modules/streams/CountQueuingStrategy.js:
3562 * Modules/streams/ReadableByteStreamController.idl:
3563 * Modules/streams/ReadableByteStreamController.js:
3564 * Modules/streams/ReadableByteStreamInternals.js:
3565 * Modules/streams/ReadableStream.idl:
3566 * Modules/streams/ReadableStream.js:
3567 * Modules/streams/ReadableStreamBYOBReader.idl:
3568 * Modules/streams/ReadableStreamBYOBReader.js:
3569 * Modules/streams/ReadableStreamBYOBRequest.idl:
3570 * Modules/streams/ReadableStreamBYOBRequest.js:
3571 * Modules/streams/ReadableStreamDefaultController.idl:
3572 * Modules/streams/ReadableStreamDefaultController.js:
3573 * Modules/streams/ReadableStreamDefaultReader.idl:
3574 * Modules/streams/ReadableStreamDefaultReader.js:
3575 * Modules/streams/ReadableStreamInternals.js:
3576 * Modules/streams/ReadableStreamSource.h:
3577 * Modules/streams/ReadableStreamSource.idl:
3578 * Modules/streams/StreamInternals.js:
3579 * Modules/streams/WritableStream.idl:
3580 * Modules/streams/WritableStream.js:
3581 * Modules/streams/WritableStreamInternals.js:
3582 * bindings/js/JSDOMGlobalObject.cpp:
3583 (WebCore::isReadableByteStreamAPIEnabled):
3584 (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
3585 * bindings/js/JSReadableStreamPrivateConstructors.cpp:
3586 * bindings/js/JSReadableStreamPrivateConstructors.h:
3587 * bindings/js/JSReadableStreamSourceCustom.cpp:
3588 * bindings/js/ReadableStreamDefaultController.cpp:
3589 * bindings/js/ReadableStreamDefaultController.h:
3590 * page/RuntimeEnabledFeatures.h:
3591 * testing/Internals.cpp:
3592 * testing/Internals.h:
3593 * testing/Internals.idl:
3595 2017-08-04 Zan Dobersek <zdobersek@igalia.com>
3597 [EME][GStreamer] Register ClearKey CDMFactory
3598 https://bugs.webkit.org/show_bug.cgi?id=175136
3600 Reviewed by Xabier Rodriguez-Calvar.
3602 Register the ClearKey CDM factory in CDMFactoryGStreamer. A CDMFactoryClearKey
3603 singleton object is introduced and used for that registration.
3605 The basic CDMFactoryClearKey and CDMPrivateClearKey methods are implemented,
3606 marking `org.w3.clearkey` as the supported key system and `keyids` as the
3607 supported init data type. Additional logic around key system configurations,
3608 distinctive identifiers, persistent state and related restrictions and
3609 requirements is implemented.
3611 This improves the ClearKey EME tests a bit, now progressing to the point of
3612 failing with a NotAllowedError exception due to the CDMInstance object failing
3613 to properly initialize because of missing implementation.
3615 No new tests -- relevant tests have underlying baselines updated to reflect
3616 changes in behavior.
3618 * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
3619 (WebCore::CDMFactoryClearKey::singleton):
3620 (WebCore::CDMFactoryClearKey::supportsKeySystem):
3621 (WebCore::CDMPrivateClearKey::supportsInitDataType const):
3622 (WebCore::CDMPrivateClearKey::supportsConfiguration const):
3623 (WebCore::CDMPrivateClearKey::supportsConfigurationWithRestrictions const):
3624 (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration const):
3625 (WebCore::CDMPrivateClearKey::supportsRobustness const):
3626 (WebCore::CDMPrivateClearKey::distinctiveIdentifiersRequirement const):
3627 (WebCore::CDMPrivateClearKey::persistentStateRequirement const):
3628 * platform/encryptedmedia/clearkey/CDMClearKey.h:
3629 * platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp:
3630 (WebCore::CDMFactory::platformRegisterFactories):
3632 2017-08-04 John Wilander <wilander@apple.com>
3634 Resource Load Statistics: Report user interaction immediately, but only when needed
3635 https://bugs.webkit.org/show_bug.cgi?id=175090
3636 <rdar://problem/33685546>
3638 Reviewed by Chris Dumez.
3640 Test: http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html
3642 * loader/ResourceLoadObserver.cpp:
3643 (WebCore::ResourceLoadObserver::ResourceLoadObserver):
3644 (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
3645 Now tells the UI process immediately but also records that it has
3646 done so to avoid doing it when not needed.
3647 (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
3648 Conditional throttling gone, now always throttles.
3649 (WebCore::ResourceLoadObserver::notifyObserver):
3650 Renamed from ResourceLoadObserver::notificationTimerFired().
3651 (WebCore::ResourceLoadObserver::clearState):
3652 New function to allow the test runner to reset the web process'
3653 statistics state now that we keep track of whether or not we've
3654 reported user interaction to the UI process.
3655 (WebCore::ResourceLoadObserver::setShouldThrottleObserverNotifications): Deleted.
3656 (WebCore::ResourceLoadObserver::notificationTimerFired): Deleted.
3657 * loader/ResourceLoadObserver.h:
3659 * testing/Internals.cpp:
3660 (WebCore::Internals::resetToConsistentState):
3661 (WebCore::Internals::setResourceLoadStatisticsShouldThrottleObserverNotifications): Deleted.
3662 No longer needed since user interaction is always communicated
3664 * testing/Internals.h:
3665 * testing/Internals.idl:
3667 2017-08-04 Zan Dobersek <zdobersek@igalia.com>
3669 [EME] Push CDMFactory into the platform layer
3670 https://bugs.webkit.org/show_bug.cgi?id=175129
3672 Reviewed by Xabier Rodriguez-Calvar.
3674 This is a follow-up to r219678 that moved the majority of CDM abstraction
3675 classes into the platform layer, but missed the CDMFactory class.
3677 The CDMFactory abstraction is now also placed in the platform layer. Only
3678 change to the interface is that the createCDM() method can't accept a CDM
3679 object reference anymore since that class is cemented into the WebCore
3680 layer, and no current implementation used it anyway.
3682 Additionally, the static Vector object of registered factories is moved
3683 under the CDMFactory class, along with the register and unregister
3684 functions. The platformRegisterFactories() function is added to allow for
3685 platform-specific factory registrations to occur when the registered
3686 factories are queried for the first time. Empty implementation for this
3687 function is provided for non-GStreamer platforms, while for GStreamer
3688 the implementation is kept in CDMFactoryGStreamer.cpp. It's still empty
3689 for now, but it will register the ClearKey factory there in the near
3692 No new tests -- none affected, only refactoring.
3695 * Modules/encryptedmedia/CDM.cpp:
3696 (WebCore::createCDMPrivateForKeySystem):
3697 (WebCore::CDM::supportsKeySystem):
3698 (WebCore::CDM::CDM):
3700 (WebCore::CDM::registerCDMFactory): Deleted.
3701 (WebCore::CDM::unregisterCDMFactory): Deleted.
3702 * Modules/encryptedmedia/CDM.h:
3703 (WebCore::CDMFactory::~CDMFactory): Deleted.
3704 * PlatformWPE.cmake:
3705 * platform/GStreamer.cmake:
3706 * platform/encryptedmedia/CDMFactory.cpp: Added.
3707 (WebCore::CDMFactory::registerFactory):
3708 (WebCore::CDMFactory::unregisterFactory):
3709 (WebCore::CDMFactory::platformRegisterFactories):
3710 * platform/encryptedmedia/CDMFactory.h: Added.
3711 (WebCore::CDMFactory::~CDMFactory):
3712 * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
3713 (WebCore::CDMFactoryClearKey::createCDM):
3714 * platform/encryptedmedia/clearkey/CDMClearKey.h:
3715 * platform/encryptedmedia/gstreamer/CDMFactoryGStreamer.cpp: Added.
3716 (WebCore::CDMFactory::platformRegisterFactories):
3717 * testing/MockCDMFactory.cpp:
3718 (WebCore::m_weakPtrFactory):
3719 (WebCore::MockCDMFactory::unregister):
3720 (WebCore::MockCDMFactory::createCDM):
3721 * testing/MockCDMFactory.h:
3723 2017-08-04 Frederic Wang <fwang@igalia.com>
3725 ScrollingTreeOverflowScrollingNodeIOS uses the wrong fixed position rectangle
3726 https://bugs.webkit.org/show_bug.cgi?id=175135
3728 Reviewed by Simon Fraser.
3730 This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
3731 that it uses the fixed position rectangle relative of the first frame ancestor instead of
3732 the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
3733 and RenderLayerCompositor. This fixes some flickering issues on iOS.
3735 Test: fast/scrolling/ios/fixed-inside-overflow-inside-iframe.html
3737 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
3738 (WebCore::ScrollingTreeFrameScrollingNode::fixedPositionRect): Helper function to get the
3739 fixed position rect to use for that frame.
3740 * page/scrolling/ScrollingTreeNode.cpp:
3741 (WebCore::ScrollingTreeNode::enclosingFrameNode const): Helper function to get the enclosing
3742 frame for this scrolling node or null if there is none.
3743 * page/scrolling/ScrollingTreeNode.h: Declare enclosingFrameNode.
3745 2017-08-04 Zan Dobersek <zdobersek@igalia.com>
3747 Unreviewed. Removing redundant NotImplemented.h header inclusions
3748 and cleaning up whitespace issues in libgcrypt-specific CryptoKeyEC
3749 and CryptoKeyRSA implementation files.
3751 * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
3752 * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
3754 2017-08-04 Jeremy Jones <jeremyj@apple.com>
3756 Remove unnecesary call to status bar SPI.
3757 https://bugs.webkit.org/show_bug.cgi?id=175176
3758 rdar://problem/20887306
3760 Reviewed by Darin Adler.
3762 No new tests because no behavior change.
3764 This removes an obsolete call to SPI.
3766 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3767 (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
3769 2017-08-03 Zan Dobersek <zdobersek@igalia.com>
3771 [GCrypt] Implement CryptoKeyEC PKCS#8 imports
3772 https://bugs.webkit.org/show_bug.cgi?id=173647
3774 Reviewed by Jiewen Tan.
3776 No new tests -- affected tests are now passing and are unskipped.
3778 Implement libgcrypt-based support for PKCS#8 imports of EC keys.
3780 Existing libtasn1 utilities are used to achieve this. First, the provided key data
3781 is decoded against the PrivateKeyInfo ASN.1 definition. First, the version member
3782 of that structure is validated, followed by the algorithm member. The latter is
3783 also properly tested depending on this being an import of an ECDSA or ECDH key.
3785 Data of the parameters member is decoded against the ECParameters ASN.1 definition,
3786 and the namedCurve object identifier is validated, making sure it represents a
3787 valid EC curve and that this curve maches the one specified for the import
3790 Data of the privateKey member is decoded against the ECPrivateKey ASN.1 definition.
3791 The version member of that structure is properly validated. The optional parameters
3792 member of that structure is already decoded against the ECParameters ASN.1
3793 definition. If present, it is checked to contain a valid EC curve identifier that
3794 matches the specified curve.
3796 The optional publicKey member of the ECPrivateKey structure is validated, testing
3797 that its data matches in size an uncompressed EC point, and that the first byte
3798 of this data is 0x04, as expected for an uncompressed EC point.
3800 What's left is the private key data on the initial ECPrivateKey structure. That
3801 data is retrieved and validated, making sure its size matches the size of the
3802 specified curve. The `private-key` s-expression is then constructed, embedding
3803 the curve name and the validated private key data. This s-expression is then used
3804 to construct an EC context.
3806 If the optional publicKey data was provided, it's used to set the `q` parameter
3807 for this EC context. Otherwise, the value for `q` is computed on-the-fly for the
3808 specified EC and the provided private key. The `q` point is then tested through
3809 the gcry_mpi_ec_curve_point() function, making sure that the derived point is
3810 indeed located on the given EC.
3812 Finally, with the private key properly validated, a new CryptoKeyEC object is
3813 constructed, using the `private-key` s-expression and the parameters that were
3814 specified for this import operation.
3816 * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
3817 (WebCore::CryptoKeyEC::platformImportPkcs8):
3818 * crypto/gcrypt/GCryptUtilities.h:
3820 2017-08-03 Chris Dumez <cdumez@apple.com>
3822 Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.' without a leading 0
3823 https://bugs.webkit.org/show_bug.cgi?id=175132
3825 Reviewed by Darin Adler.
3827 Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.', without
3828 a leading 0. This is as per https://github.com/whatwg/html/pull/2852.
3830 The latest spec is at:
3831 - https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh
3833 Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
3835 * html/parser/HTMLParserIdioms.cpp:
3836 (WebCore::parseHTTPRefreshInternal):
3838 2017-08-03 Brian Burg <bburg@apple.com>
3840 Remove ENABLE(WEB_SOCKET) guards
3841 https://bugs.webkit.org/show_bug.cgi?id=167044
3843 Reviewed by Joseph Pecoraro.
3845 * Configurations/FeatureDefines.xcconfig:
3846 * Modules/websockets/ThreadableWebSocketChannel.cpp:
3847 * Modules/websockets/ThreadableWebSocketChannel.h:
3848 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3849 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
3850 * Modules/websockets/WebSocket.cpp:
3851 * Modules/websockets/WebSocket.h:
3852 * Modules/websockets/WebSocket.idl:
3853 * Modules/websockets/WebSocketChannel.cpp:
3854 * Modules/websockets/WebSocketChannel.h:
3855 * Modules/websockets/WebSocketChannelClient.h:
3856 * Modules/websockets/WebSocketDeflateFramer.cpp:
3857 * Modules/websockets/WebSocketDeflateFramer.h:
3858 * Modules/websockets/WebSocketDeflater.cpp:
3859 * Modules/websockets/WebSocketDeflater.h:
3860 * Modules/websockets/WebSocketExtensionDispatcher.cpp:
3861 * Modules/websockets/WebSocketExtensionDispatcher.h:
3862 * Modules/websockets/WebSocketExtensionParser.cpp:
3863 * Modules/websockets/WebSocketExtensionParser.h:
3864 * Modules/websockets/WebSocketExtensionProcessor.h:
3865 * Modules/websockets/WebSocketFrame.cpp:
3866 * Modules/websockets/WebSocketFrame.h:
3867 * Modules/websockets/WebSocketHandshake.cpp:
3868 * Modules/websockets/WebSocketHandshake.h:
3869 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3870 * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3872 (WebCore::Document::Document):
3873 (WebCore::Document::idbConnectionProxy):
3874 (WebCore::Document::socketProvider):
3876 * dom/ScriptExecutionContext.h:
3877 * inspector/InspectorInstrumentation.cpp:
3878 (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
3879 * inspector/InspectorInstrumentation.h:
3880 (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
3881 * inspector/InspectorNetworkAgent.cpp:
3882 * inspector/InspectorNetworkAgent.h:
3883 * page/RuntimeEnabledFeatures.cpp:
3884 (WebCore::RuntimeEnabledFeatures::webSocketEnabled const):
3885 * page/RuntimeEnabledFeatures.h:
3886 * page/SocketProvider.cpp:
3887 * page/SocketProvider.h:
3888 * workers/WorkerGlobalScope.cpp:
3889 (WebCore::WorkerGlobalScope::WorkerGlobalScope):
3890 * workers/WorkerGlobalScope.h:
3891 * workers/WorkerMessagingProxy.cpp:
3892 (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
3893 * workers/WorkerThread.cpp:
3894 (WebCore::WorkerThread::WorkerThread):
3895 (WebCore::WorkerThread::socketProvider):
3896 * workers/WorkerThread.h:
3898 2017-08-03 Don Olmstead <don.olmstead@sony.com>
3900 Remove LayoutUnit dependency in TextStream
3901 https://bugs.webkit.org/show_bug.cgi?id=175110
3903 Reviewed by Zalan Bujtas.
3905 No new tests. No change in behavior.
3908 * WebCore.xcodeproj/project.pbxproj:
3909 * platform/LayoutUnit.cpp: Added.
3910 (WebCore::operator<<):
3911 * platform/LayoutUnit.h:
3912 * platform/text/TextStream.cpp:
3913 * platform/text/TextStream.h:
3915 2017-08-03 Jeremy Jones <jeremyj@apple.com>
3917 Improve WebKitLegacy video fullscreen animation begin and end rects.
3918 https://bugs.webkit.org/show_bug.cgi?id=175152
3919 rdar://problem/32840576
3921 Reviewed by Eric Carlson.
3923 No new tests, becuase this change has no effect on the DOM.
3925 This change uses different rects for fullscreen animation to prevent the animation
3926 from failing, and to improve the aesthetics of the animation.
3928 * platform/mac/WebVideoFullscreenController.mm:
3929 (frameExpandedToRatioOfFrame):
3930 (-[WebVideoFullscreenController enterFullscreen:]):
3931 (-[WebVideoFullscreenController exitFullscreen]):
3932 (-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]):
3933 (constrainFrameToRatioOfFrame): Deleted.
3935 2017-08-03 Jer Noble <jer.noble@apple.com>
3937 [EME][Mac] SecureStop left on disk in Private Browsing mode.
3938 https://bugs.webkit.org/show_bug.cgi?id=175162
3940 Reviewed by Eric Carlson.
3942 Return an empty string from mediaKeysStorageDirectory() when the page indicates that storage should
3943 be ephemeral(). Previously, an empty string in this case would be treated as an error. Instead, treat
3944 an empty string as valid, and do not try to store or retrieve session information to disk in that case.
3946 * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
3947 (WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory const):
3948 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
3949 (WebCore::CDMSessionAVContentKeySession::releaseKeys):
3950 (WebCore::CDMSessionAVContentKeySession::update):
3951 (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
3952 (WebCore::CDMSessionAVContentKeySession::contentKeySession):
3953 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3954 (WebCore::CDMSessionMediaSourceAVFObjC::storagePath const):
3956 2017-08-03 Youenn Fablet <youenn@apple.com>
3958 [Fetch API] Add support for Request keepalive getter
3959 https://bugs.webkit.org/show_bug.cgi?id=175151
3961 Reviewed by Chris Dumez.
3963 Test: imported/w3c/web-platform-tests/fetch/api/request/request-keepalive.html
3965 Adding keepalive as a fetch option.
3966 Adding initialization and getter of keepalive into FetchRequest.
3968 * Modules/fetch/FetchRequest.cpp:
3969 (WebCore::buildOptions):
3970 * Modules/fetch/FetchRequest.h:
3971 * Modules/fetch/FetchRequest.idl:
3972 * loader/FetchOptions.h:
3974 2017-08-03 Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp>
3976 [PAL] Move spi/cf directory into PAL
3977 https://bugs.webkit.org/show_bug.cgi?id=175057
3979 Reviewed by Antti Koivisto.
3981 * WebCore.xcodeproj/project.pbxproj:
3982 * loader/cocoa/DiskCacheMonitorCocoa.mm:
3983 * loader/cocoa/SubresourceLoaderCocoa.mm:
3984 * loader/mac/ResourceLoaderMac.mm:
3985 * platform/cf/CoreMediaSoftLink.cpp:
3986 * platform/cf/CoreMediaSoftLink.h:
3987 * platform/mac/PluginBlacklist.mm:
3988 * platform/mac/WebCoreNSStringExtras.mm:
3989 * platform/mac/WebGLBlacklist.mm:
3990 * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
3991 * platform/network/NetworkStorageSession.h:
3992 * platform/network/cf/CookieJarCFNet.cpp:
3993 * platform/network/cf/CredentialStorageCFNet.cpp:
3994 * platform/network/cf/ResourceHandleCFNet.cpp:
3995 * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
3996 * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
3997 * platform/network/cf/ResourceRequestCFNet.cpp:
3998 * platform/network/cf/ResourceRequestCFNet.h:
3999 * platform/network/cf/ResourceResponse.h:
4000 * platform/network/cf/ResourceResponseCFNet.cpp:
4001 * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
4002 * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
4003 * platform/network/cocoa/CookieStorageObserver.h:
4004 * platform/network/cocoa/CredentialCocoa.h:
4005 * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
4006 * platform/network/cocoa/ResourceRequestCocoa.mm:
4007 * platform/network/cocoa/ResourceResponseCocoa.mm:
4008 * platform/network/ios/ResourceRequestIOS.mm:
4009 * platform/network/mac/CookieJarMac.mm:
4010 * platform/network/mac/FormDataStreamMac.mm:
4011 * platform/network/mac/ResourceHandleMac.mm:
4012 * platform/network/mac/ResourceRequestMac.mm:
4013 * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
4014 * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
4015 * platform/network/mac/WebCoreURLResponse.h:
4016 * testing/cocoa/WebArchiveDumpSupport.mm:
4018 2017-08-03 Youenn Fablet <youenn@apple.com>
4020 Remove FETCH_API compilation guard
4021 https://bugs.webkit.org/show_bug.cgi?id=175154
4023 Reviewed by Chris Dumez.
4025 No change of behavior.
4027 * Configurations/FeatureDefines.xcconfig: