1 2016-12-23 Ryosuke Niwa <rniwa@webkit.org>
3 Eliminate the use of lastChild in TextIterator
4 https://bugs.webkit.org/show_bug.cgi?id=166456
6 Reviewed by Antti Koivisto.
8 Just use the node we just existed in TextIterator::exitNode and in emitting additional new line
9 to eliminate the use of Node::lastChild.
11 Also initialize member variables in the declaration instead of the constructor to modernize the code.
13 * editing/TextIterator.cpp:
14 (WebCore::TextIterator::TextIterator):
15 (WebCore::TextIterator::advance):
16 (WebCore::TextIterator::exitNode):
17 * editing/TextIterator.h:
19 2016-12-22 Andy Estes <aestes@apple.com>
21 Reduce QuickLook.h include overhead
22 https://bugs.webkit.org/show_bug.cgi?id=166454
24 Reviewed by Andreas Kling.
26 * dom/Document.cpp: Included QuickLook.h for QLPreviewProtocol().
27 * loader/DocumentLoader.cpp:
28 (WebCore::DocumentLoader::setQuickLookHandle): Moved from DocumentLoader.h to here.
29 * loader/DocumentLoader.h: Stopped including QuickLook.h and forward-declared
31 (WebCore::DocumentLoader::setQuickLookHandle): Moved definition out-of-line since it
32 requires QuickLookHandle to be a complete type.
33 * loader/ios/QuickLook.h: Updated to use #pragma once. Cleaned up includes and forward
35 * platform/network/ResourceHandle.cpp: Included QuickLook.h so that QuickLookHandle is a
36 complete type in the ResourceHandle constructor.
37 * platform/network/ResourceHandle.h: Stopped including QuickLook.h and forward-declared
39 (WebCore::ResourceHandle::setQuickLookHandle): Moved definition out-of-line since it
40 requires QuickLookHandle to be a complete type.
41 * platform/network/mac/ResourceHandleMac.mm:
42 (WebCore::ResourceHandle::setQuickLookHandle): Moved from ResourceHandle.h to here.
43 * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Included QuickLook.h for
46 2016-12-22 Andy Estes <aestes@apple.com>
48 [iOS] Move QuickLook from WebCore/platform to WebCore/loader
49 https://bugs.webkit.org/show_bug.cgi?id=166449
51 Reviewed by Darin Adler.
53 QuickLook.mm knows about ResourceLoader, so it's a layering violation to have it in
54 platform/. Move it to loader/ios/.
56 * WebCore.xcodeproj/project.pbxproj:
57 * loader/ios/QuickLook.h: Renamed from Source/WebCore/platform/network/ios/QuickLook.h.
58 * loader/ios/QuickLook.mm: Renamed from Source/WebCore/platform/network/ios/QuickLook.mm.
60 2016-12-22 Michael Catanzaro <mcatanzaro@igalia.com>
62 Unreviewed, fix unused parameter warning in GLES build
64 Looks like it's been here since 2012. Impressive!
66 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
67 (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
69 2016-12-22 Alex Christensen <achristensen@webkit.org>
71 Move GraphicsContext3DWin to GraphicsContext3DOpenGLES
72 https://bugs.webkit.org/show_bug.cgi?id=166425
74 Reviewed by Tim Horton.
76 Move code which is GLES-specific not Windows-specific to the GLES-specific file
77 so I can use it on Cocoa, with a temporary PLATFORM macro that I plan to remove once
78 all platforms use ANGLE's GLES implementation. There is another copy of this code in
79 GraphicsContext3DCairo, which will also be united with this code here soon.
80 Also remove the PlatformCALayerWin, which was never used for anything.
82 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
83 (WebCore::GraphicsContext3D::create):
84 (WebCore::GraphicsContext3D::GraphicsContext3D):
85 (WebCore::GraphicsContext3D::~GraphicsContext3D):
86 (WebCore::GraphicsContext3D::setContextLostCallback):
87 (WebCore::GraphicsContext3D::setErrorMessageCallback):
88 (WebCore::GraphicsContext3D::makeContextCurrent):
89 (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):
90 (WebCore::GraphicsContext3D::platformGraphicsContext3D):
91 (WebCore::GraphicsContext3D::platformTexture):
92 (WebCore::GraphicsContext3D::isGLES2Compliant):
93 (WebCore::GraphicsContext3D::platformLayer):
94 * platform/graphics/win/GraphicsContext3DWin.cpp: Removed.
96 Include the egl directory. I'll need this, too, once Mac starts using ANGLE's EGL implementation.
98 2016-12-22 Brent Fulgham <bfulgham@apple.com>
100 Nested calls to setDocument can omit firing 'unload' events
101 https://bugs.webkit.org/show_bug.cgi?id=166422
102 <rdar://problem/29763012>
104 Reviewed by Alex Christensen.
106 Test: fast/loader/nested-document-handling.html
108 Only allow a single document change to be taking place during a given runloop cycle.
110 * bindings/js/ScriptController.cpp:
111 (WebCore::ScriptController::executeIfJavaScriptURL): Block script changing the document
112 when we are in the middle of changing the document.
114 (WebCore::Frame::setDocument): Keep track of document change state.
117 2016-12-22 Tim Horton <timothy_horton@apple.com>
119 TileGrid creates new cohorts even when not using temporarilyRetainTileCohorts mode
120 https://bugs.webkit.org/show_bug.cgi?id=166440
122 Reviewed by Simon Fraser.
126 * platform/graphics/ca/TileGrid.cpp:
127 (WebCore::TileGrid::revalidateTiles):
128 If we are not temporarily retaining unparented tile cohorts (e.g. on
129 iOS WebKit2), instead immediately removing all tiles that would go into
130 the new cohort, avoid starting the cohort at all.
132 2016-12-22 Zalan Bujtas <zalan@apple.com>
134 Do not destroy the RenderNamedFlowFragment as leftover anonymous block.
135 https://bugs.webkit.org/show_bug.cgi?id=166436
136 rdar://problem/29772233
138 Reviewed by Simon Fraser.
140 When as the result of certain style change, the generated anonymous block is not needed anymore, we
141 move its descendants up to the parent and destroy the generated box. While RenderNamedFlowFragment is a generated
142 block, the cleanup code should just ignore it the same way we ignore boxes like multicolumn, mathml etc.
144 Test: fast/regions/flow-fragment-as-anonymous-block-crash.html
146 * rendering/RenderObject.h:
147 (WebCore::RenderObject::isAnonymousBlock):
149 2016-12-22 Wenson Hsieh <wenson_hsieh@apple.com>
151 CSS Scroll Snap does not work if scrollbar is hidden
152 https://bugs.webkit.org/show_bug.cgi?id=160442
153 <rdar://problem/23317034>
155 Reviewed by Simon Fraser.
157 Currently, the only reason scroll snapping works in overflow scrolling containers without forcing layout is
158 because we would initialize the scrolling container's ScrollAnimator in the process of updating scrollbars. If
159 there are no scrollbars to render, we won't bother creating a ScrollAnimator. Without an existing
160 ScrollAnimator, ScrollableArea::updateScrollSnapState will simply bail instead of setting up the scroll snap
161 state. Instead, we should take setting a non-empty vector of scroll offsets on the ScrollableArea as a cue that
162 the ScrollableArea also needs a ScrollAnimator, and initialize it there if necessary.
164 Test: tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-hidden-scrollbars.html
166 * platform/ScrollableArea.cpp:
167 (WebCore::ScrollableArea::setHorizontalSnapOffsets):
168 (WebCore::ScrollableArea::setVerticalSnapOffsets):
170 2016-12-22 Daniel Bates <dabates@apple.com>
172 Bypass pop-up blocker from cross-origin or sandboxed frame
173 https://bugs.webkit.org/show_bug.cgi?id=166290
174 <rdar://problem/29742039>
176 Reviewed by Darin Adler.
178 Tests: fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame.html
179 fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2.html
180 fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html
182 * page/DOMWindow.cpp:
183 (WebCore::DOMWindow::open): Use FrameLoader::findFrameForNavigation() to find the
184 target frame to navigate with respect to the active document just as we do in WebCore::createWindow().
186 2016-12-22 Andy Estes <aestes@apple.com>
188 Make WebCore::EditorInsertAction an enum class
189 https://bugs.webkit.org/show_bug.cgi?id=166424
191 Reviewed by Brent Fulgham.
193 * editing/AlternativeTextController.cpp:
194 (WebCore::AlternativeTextController::applyDictationAlternative):
195 * editing/Editor.cpp:
196 (WebCore::Editor::pasteAsPlainTextWithPasteboard):
197 (WebCore::Editor::shouldInsertText):
198 (WebCore::Editor::insertTextWithoutSendingTextEvent):
199 (WebCore::Editor::insertLineBreak):
200 (WebCore::Editor::insertParagraphSeparator):
201 (WebCore::Editor::markMisspellingsAfterTypingToWord):
202 (WebCore::Editor::markAndReplaceFor):
203 (WebCore::Editor::changeBackToReplacedString):
204 (WebCore::Editor::transpose):
205 (WebCore::Editor::handleAcceptedCandidate):
206 * editing/EditorInsertAction.h:
208 * editing/gtk/EditorGtk.cpp:
209 (WebCore::Editor::pasteWithPasteboard):
210 * editing/ios/EditorIOS.mm:
211 (WebCore::Editor::pasteWithPasteboard):
212 (WebCore::Editor::replaceSelectionWithAttributedString):
213 * editing/mac/EditorMac.mm:
214 (WebCore::Editor::pasteWithPasteboard):
215 (WebCore::Editor::replaceNodeFromPasteboard):
216 (WebCore::Editor::replaceSelectionWithAttributedString):
217 * editing/win/EditorWin.cpp:
218 (WebCore::Editor::pasteWithPasteboard):
219 * page/ContextMenuController.cpp:
220 (WebCore::insertUnicodeCharacter):
221 (WebCore::ContextMenuController::contextMenuItemSelected):
222 * page/DragController.cpp:
223 (WebCore::DragController::concludeEditDrag):
225 2016-12-22 Jer Noble <jer.noble@apple.com>
227 Only include those parts of AVFoundation.framework which are strictly needed.
228 https://bugs.webkit.org/show_bug.cgi?id=166423
230 Reviewed by Eric Carlson.
232 * Modules/plugins/QuickTimePluginReplacement.mm:
233 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
234 * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
235 * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
236 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
237 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
238 * platform/mac/SerializedPlatformRepresentationMac.mm:
239 * platform/mac/WebPlaybackSessionInterfaceMac.mm:
240 * platform/mac/WebVideoFullscreenController.mm:
241 * platform/mediastream/mac/AVAudioCaptureSource.mm:
242 * platform/mediastream/mac/AVCaptureDeviceManager.mm:
243 * platform/mediastream/mac/AVMediaCaptureSource.mm:
244 * platform/mediastream/mac/AVVideoCaptureSource.mm:
246 2016-12-22 Jer Noble <jer.noble@apple.com>
248 NULL-deref CRASH in WebCore::PlatformMediaSession::mediaType
249 https://bugs.webkit.org/show_bug.cgi?id=166407
251 Reviewed by Darin Adler.
253 In r207688, we added a facility in PlatformMediaSessionManager for safely walking through a
254 list of PlatformMediaSessions by replacing entries of deleted sessions with nullptr. We now
255 need to use those new iteration falicities in MediaSessionManageriOS.
257 In addition to the existing iterators, add one which takes a predicate, and returns the first
258 session which matches the predicate, or nullptr, if none do.
260 * platform/audio/PlatformMediaSessionManager.cpp:
261 (WebCore::PlatformMediaSessionManager::findSession):
262 (WebCore::PlatformMediaSessionManager::anyOfSessions):
263 * platform/audio/PlatformMediaSessionManager.h:
264 (WebCore::PlatformMediaSessionManager::sessions): Deleted.
265 * platform/audio/ios/MediaSessionManagerIOS.mm:
266 (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):
267 (WebCore::MediaSessionManageriOS::nowPlayingEligibleSession):
268 (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
269 (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
270 (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
272 2016-12-22 Jer Noble <jer.noble@apple.com>
274 Muted media element playback should not interrupt other audio playback
275 https://bugs.webkit.org/show_bug.cgi?id=166347
277 Reviewed by Eric Carlson.
279 Test: TestWebKitAPI/WebKit/ios/AudioSessionCategoryIOS.mm
281 * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
282 (PlatformMediaSessionManager::updateSessionState):
284 2016-12-22 Jer Noble <jer.noble@apple.com>
286 Check for the existence of AVSampleBufferAudioRenderer.h before redeclaring AVSampleBufferAudioRenderer
287 https://bugs.webkit.org/show_bug.cgi?id=166421
289 Reviewed by Eric Carlson.
291 * platform/spi/mac/AVFoundationSPI.h:
293 2016-12-22 Eric Carlson <eric.carlson@apple.com>
295 AVPlayerLayer isn't available on every system
296 https://bugs.webkit.org/show_bug.cgi?id=166399
298 Reviewed by Jer Noble.
300 No new tests, prevents a crash that can't be reproduced on a test system.
302 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Use SOFT_LINK_CLASS_OPTIONAL.
304 2016-12-21 Tim Horton <timothy_horton@apple.com>
306 TileGrid revalidates tiles twice during flush, first with wrong visible rect
307 https://bugs.webkit.org/show_bug.cgi?id=166406
309 Reviewed by Simon Fraser.
311 No new tests; existing tests cover this code, this is just a perf win,
312 specifically reducing the amount of layer churn during zooming.
314 * platform/graphics/ca/TileGrid.cpp:
315 (WebCore::TileGrid::setScale):
316 Schedule a revalidation, which will happen later in the same flush,
317 instead of doing it immediately. Doing it immediately is problematic,
318 because we're currently in the middle of a GraphicsLayer tree flush,
319 and don't have the complete picture of the new state yet. We're guaranteed
320 to get the new scale *before* the flush calls revalidateTiles.
322 2016-12-21 Tim Horton <timothy_horton@apple.com>
324 TileGrid creates new tiles when there are recyclable tiles about to be removed
325 https://bugs.webkit.org/show_bug.cgi?id=166408
327 Reviewed by Simon Fraser.
329 No new tests; existing tests cover this code, this is just a perf win,
330 specifically reducing the amount of layer churn during zooming.
332 * platform/graphics/ca/TileGrid.cpp:
333 (WebCore::TileGrid::revalidateTiles):
334 Remove all the tiles that will be removed first, then add new tiles.
335 Strictly ordering it this way means that tiles will be removed, go into
336 the LayerPool, then be pulled back out of the LayerPool to sit in the
337 newly-covered areas. Previously, we would sometimes make new layers
338 for newly-covered areas, and then remove unneeded but otherwise recyclable
339 tiles, which would then just go sit in the LayerPool (and often get
342 2016-12-21 Eric Carlson <eric.carlson@apple.com>
344 [MediaStream] Update media-stream-event-constructor test
345 https://bugs.webkit.org/show_bug.cgi?id=166398
347 Reviewed by Jer Noble.
349 No new tests, updated existing test.
351 * Modules/mediastream/MediaStreamEvent.idl: Mark eventInitDict as optional.
353 2016-12-21 Jiewen Tan <jiewen_tan@apple.com>
355 WebKit should set Original URL of a download request correctly
356 https://bugs.webkit.org/show_bug.cgi?id=166394
357 <rdar://problem/25391382>
359 Reviewed by Alex Christensen.
361 WebKit should set Original URL of a download request correctly if the download
362 is initiated by clicking on a link with target=_blank.
364 Manually tested as the requested test infrastructure doesn't exist yet. We need actual
365 loading process for API test such that we could simulate the real situation which
366 PolicyDownload is only set when we receive responds. Currently we can only set
367 PolicyDownload in a NavigationDelegate when the load starts. Hence we cannot simulate
368 the following process: load starts -> PolicyUse -> creates a new WebView ->
369 respond receives -> PolicyDownload -> downloads.
371 * loader/FrameLoader.cpp:
372 (WebCore::FrameLoader::setOriginalURLForDownloadRequest):
374 2016-12-21 Sam Weinig <sam@webkit.org>
376 [WebIDL] Remove custom binding for ErrorEvent
377 https://bugs.webkit.org/show_bug.cgi?id=166345
379 Reviewed by Anders Carlsson.
382 * WebCore.xcodeproj/project.pbxproj:
383 * bindings/js/JSBindingsAllInOne.cpp:
384 * bindings/js/JSErrorEventCustom.cpp: Removed.
385 Remove JSErrorEventCustom.cpp
387 * ForwardingHeaders/heap/HandleTypes.h: Added.
388 Add forwarding header for HandleTypes.h
390 * bindings/js/JSErrorHandler.cpp:
391 (WebCore::JSErrorHandler::handleEvent):
392 Switch to using JSDOMConvert and call the updated name for the error getter.
394 * bindings/js/ScriptController.h:
395 * bindings/js/SerializedScriptValue.h:
396 Remove unnecessary forward declaration of ScriptValue.
398 * bindings/js/WorkerScriptController.cpp:
399 (WebCore::WorkerScriptController::evaluate):
400 * dom/ScriptExecutionContext.cpp:
401 (WebCore::ScriptExecutionContext::sanitizeScriptError):
402 (WebCore::ScriptExecutionContext::dispatchErrorEvent):
403 * dom/ScriptExecutionContext.h:
404 * workers/WorkerMessagingProxy.cpp:
405 (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
406 Update type that sanitizeScriptError takes from a ScriptValue to a Strong<Unknown>.
408 * bindings/scripts/CodeGeneratorJS.pm:
410 * bindings/scripts/IDLAttributes.txt:
411 Add a new extended attributes option for the CallWith, GlobalObject, that passes the global object.
413 * dom/ErrorEvent.cpp:
414 (WebCore::ErrorEvent::ErrorEvent):
415 (WebCore::ErrorEvent::error):
416 (WebCore::ErrorEvent::trySerializeError):
417 (WebCore::ErrorEvent::sanitizedErrorValue): Deleted.
419 Store a Strong<Unknown> directly, rather than a ScriptValue. Rename sanitizedErrorValue to
420 just error to match the IDL.
422 * dom/ErrorEvent.idl:
425 2016-12-21 Ryosuke Niwa <rniwa@webkit.org>
427 Modernize findPlainText
428 https://bugs.webkit.org/show_bug.cgi?id=166299
430 Reviewed by Sam Weinig.
432 Modernized findPlainText by merging the static version of it into it
433 and extracting the main nested loop out as findPlainTextOffset.
435 No new tests since there should be no behavioral change.
437 * editing/TextIterator.cpp:
438 (WebCore::findPlainTextOffset):
439 (WebCore::findPlainText):
441 2016-12-21 John Wilander <wilander@apple.com>
443 Switch to a blacklist model for restricted Accept headers in simple CORS requests
444 https://bugs.webkit.org/show_bug.cgi?id=166363
446 Reviewed by Alex Christensen.
448 Updated existing tests.
450 * platform/network/HTTPParsers.cpp:
451 (WebCore::isDelimiterCharacter):
452 Convenience function for checking delimiter characters according to:
453 https://tools.ietf.org/html/rfc7230#section-3.2.6
454 (WebCore::isValidAcceptHeaderValue):
455 Now uses WebCore::isDelimiterCharacter() to blacklist delimiter characters
456 instead of a whitelist of accepted non-alphanumeric characters.
458 2016-12-21 Beth Dakin <bdakin@apple.com>
460 Holding down on candidates in the TouchBar should show panel on screen
461 https://bugs.webkit.org/show_bug.cgi?id=166367
463 <rdar://problem/28479236>
465 Reviewed by Tim Horton.
467 Expose the version of setCandidates: that takes a rect.
468 * platform/spi/cocoa/NSTouchBarSPI.h:
470 2016-12-21 Michael Catanzaro <mcatanzaro@igalia.com>
472 Extensions3DOpenGL[ES] constructor should not be explicit
473 https://bugs.webkit.org/show_bug.cgi?id=166296
475 Reviewed by Darin Adler.
477 These constructors used to only have one parameter. Now they have two and they're both
480 * platform/graphics/opengl/Extensions3DOpenGL.h:
481 * platform/graphics/opengl/Extensions3DOpenGLES.h:
483 2016-12-21 Eric Carlson <eric.carlson@apple.com>
485 [MediaStream] MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer can be called before it has a media stream
486 https://bugs.webkit.org/show_bug.cgi?id=166344
487 <rdar://problem/29763143>
489 Reviewed by Jer Noble.
491 There is a very narrow window during which a MediaStream player can be asked for its layer
492 before it has a steam, resulting in a NULL dereference and crash. Don't do that.
496 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
497 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer):
499 2016-12-21 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
501 [Readable Streams API] Fix test in readableByteStreamCallPullIfNeeded
502 https://bugs.webkit.org/show_bug.cgi?id=166312
504 Reviewed by Youenn Fablet.
506 Add a new function to evaluate if calling a pull function is
507 required as per specification.
509 No new test required.
511 * Modules/streams/ReadableByteStreamInternals.js:
512 (readableByteStreamControllerShouldCallPull): Added.
513 (readableByteStreamControllerCallPullIfNeeded):
515 2016-12-21 Simon Fraser <simon.fraser@apple.com>
517 Fixed bars are positioned incorrectly when there are header and footer banners
518 https://bugs.webkit.org/show_bug.cgi?id=166302
519 rdar://problem/29727145
521 Reviewed by Tim Horton.
523 The computation of the visual viewport was wrong in the presence of header and footer
524 banners. It needs to take into account the fact that "visibleContentRect" applies to the
525 scroll view contents, which includes header and footer (unscaled), and the potentially scaled
526 document, and we need to return a rectangle in unscaled document coordinates.
528 Make a static method in FrameView to do this computation, and call it from FrameView::visualViewportRect()
529 and ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition().
531 layoutViewportForScrollPosition() is only called on Mac, so remove the #ifdeffing related to scaling,
532 and pass in an unscaled scroll position.
534 Test: fast/visual-viewport/zoomed-fixed-header-and-footer.html
536 * page/FrameView.cpp:
537 (WebCore::FrameView::updateLayoutViewport):
538 (WebCore::FrameView::maxStableLayoutViewportOrigin):
539 (WebCore::FrameView::visibleDocumentRect):
540 (WebCore::FrameView::visualViewportRect):
542 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
543 (WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition):
544 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
545 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
547 2016-12-21 Carlos Alberto Lopez Perez <clopez@igalia.com>
549 [CMake] Remove remaining INDIE_UI related entries.
550 https://bugs.webkit.org/show_bug.cgi?id=165881
556 2016-12-20 Carlos Garcia Campos <cgarcia@igalia.com>
558 [Cairo] Conditional jump or move depends on uninitialised value(s)
559 https://bugs.webkit.org/show_bug.cgi?id=166058
561 Reviewed by Michael Catanzaro.
563 Initialize x and y members of cairo_glyph_t struct before passing it to cairo_glyph_path.
565 * platform/graphics/cairo/FontCairo.cpp:
566 (WebCore::CairoGlyphToPathTranslator::path):
568 2016-12-20 Myles C. Maxfield <mmaxfield@apple.com>
570 Skia lighter wght variation looks bolder than regular
571 https://bugs.webkit.org/show_bug.cgi?id=165948
573 Reviewed by Antti Koivisto.
575 Test: fast/text/variations/default-value.html
577 This patch inspects the font's information regarding variations. It uses this information
578 to work around a bug in CoreText where default variation values were not getting applied.
579 This workaround is placed behind a version check and the macro name
580 "WORKAROUND_CORETEXT_VARIATIONS_DEFAULT_VALUE_BUG" so we know to delete it whenever
581 possible. It also uses the minimum and maximum supported values for the axis to clamp our
582 variation values to the closest supported point, which is in line with a recent edit to
584 https://github.com/w3c/csswg-drafts/commit/52b802ac38619286a30662dceb71b8a29fa72f42
585 This clamping behavior also revealed another bug in CoreText, which was worked around
586 behind another version check and macro name WORKAROUND_CORETEXT_VARIATIONS_EXTENTS_BUG so
587 we know to delete it whenever possible.
589 * platform/graphics/cocoa/FontCacheCoreText.cpp:
590 (WebCore::defaultVariationValues):
591 (WebCore::preparePlatformFont):
593 2016-12-20 Tim Horton <timothy_horton@apple.com>
595 Remove a duplicate reference to ScrollingMomentumCalculatorMac.h in the Xcode project
597 Rubber-stamped by Sam Weinig.
599 * WebCore.xcodeproj/project.pbxproj:
601 2016-12-20 Tim Horton <timothy_horton@apple.com>
603 Remove a duplicate reference to ScrollingMomentumCalculatorMac.mm in the Xcode project
605 Rubber-stamped by Sam Weinig.
607 * WebCore.xcodeproj/project.pbxproj:
609 2016-12-20 Alex Christensen <achristensen@webkit.org>
611 Remove initEvent quirk
612 https://bugs.webkit.org/show_bug.cgi?id=166284
614 Reviewed by Dan Bernstein.
616 We added this quirk in r207908 and expanded it in r209946 and r210034.
617 Many web compatibility issues have been found, which leads us to believe that many more exist.
618 This reverts the behavior to match how it was before r203848.
619 This change was proposed to the spec in https://github.com/whatwg/dom/issues/387
622 (WebCore::Event::initEventForBindings): Deleted.
625 * platform/RuntimeApplicationChecks.h:
626 * platform/RuntimeApplicationChecks.mm:
627 (WebCore::IOSApplication::isBaiduNuomi): Deleted.
628 (WebCore::IOSApplication::isAutoNaviAMap): Deleted.
629 (WebCore::IOSApplication::isFlipboard): Deleted.
631 2016-12-20 JF Bastien <jfbastien@apple.com>
633 INDIE_UI: fix cmake build
634 https://bugs.webkit.org/show_bug.cgi?id=166288
636 Reviewed by Mark Lam.
638 Bug #165881 didn't remove a file from cmake.
642 2016-12-20 Alex Christensen <achristensen@webkit.org>
644 Fix clean Windows build after r210029
645 https://bugs.webkit.org/show_bug.cgi?id=165881
647 * DerivedSources.cpp:
649 2016-12-20 Brent Fulgham <bfulgham@apple.com>
651 Address some style problems found by static analysis
652 https://bugs.webkit.org/show_bug.cgi?id=165975
654 Reviewed by Alex Christensen.
656 Correct the const-correctness of functions that are implemented using stricter
659 Avoid passing large ANGLE data structures through the ANGLEWebKitBridge methods.
661 * inspector/InspectorCSSAgent.h: Declare the method overrides properly to match
662 the stricter const declarations in the implementation files.
663 * inspector/InspectorDOMAgent.h: Ditto.
664 * inspector/InspectorPageAgent.h: Ditto.
665 * inspector/InspectorTimelineAgent.h: Ditto.
666 * inspector/PageDebuggerAgent.h: Ditto.
667 * platform/graphics/ANGLEWebKitBridge.cpp:
668 (WebCore::ANGLEWebKitBridge::setResources): Pass by const reference.
669 * platform/graphics/ANGLEWebKitBridge.h:
670 (WebCore::ANGLEWebKitBridge::getResources): Return a const reference.
671 * platform/mediastream/RealtimeMediaSource.cpp:
672 (WebCore::RealtimeMediaSource::selectSettings): Use a lambda that takes
673 a const reference, rather than copying the maps while searching.
675 2016-12-20 Sam Weinig <sam@webkit.org>
677 [WebIDL] Remove custom binding for WorkerGlobalScope::importScripts
678 https://bugs.webkit.org/show_bug.cgi?id=166243
680 Reviewed by Alex Christensen.
682 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
683 (WebCore::JSWorkerGlobalScope::importScripts): Deleted.
684 * workers/WorkerGlobalScope.idl:
685 Import scripts can now be trivially generated.
687 2016-12-20 Zalan Bujtas <zalan@apple.com>
689 SVG elements should inherit the root's flow thread state.
690 https://bugs.webkit.org/show_bug.cgi?id=166173
691 rdar://problem/29704862
693 Reviewed by Simon Fraser.
695 When the <svg> is not part of the multicolumn context (out of flow positioning), its descendants should not be in the flow either.
697 Test: fast/multicol/svg-inside-multicolumn.html
699 * rendering/RenderObject.cpp:
700 (WebCore::RenderObject::computedFlowThreadState):
701 * rendering/RenderObject.h:
702 (WebCore::RenderObject::isProgress):
703 (WebCore::RenderObject::isRenderSVGBlock):
704 * rendering/svg/RenderSVGBlock.h:
706 2016-12-20 Alex Christensen <achristensen@webkit.org>
708 Fix yet another app that uses initEvent with fewer than 3 parameters
709 https://bugs.webkit.org/show_bug.cgi?id=166257
710 <rdar://problem/29420268>
712 Reviewed by Sam Weinig.
715 (WebCore::Event::initEventForBindings):
716 * platform/RuntimeApplicationChecks.h:
717 * platform/RuntimeApplicationChecks.mm:
718 (WebCore::IOSApplication::isAutoNaviAMap):
719 AutoNavi amap has content that uses initEvent with one parameter. This quirk is needed here, too.
721 2016-12-20 Dean Jackson <dino@apple.com>
724 https://bugs.webkit.org/show_bug.cgi?id=165881
725 <rdar://problem/29672532>
727 Reviewed by Simon Fraser.
729 The Indie UI work has been discontinued.
731 * Configurations/FeatureDefines.xcconfig:
732 * Modules/indieui/UIRequestEvent.cpp: Removed.
733 * Modules/indieui/UIRequestEvent.h: Removed.
734 * Modules/indieui/UIRequestEvent.idl: Removed.
735 * WebCore.xcodeproj/project.pbxproj:
737 (WebCore::Element::setUIActions): Deleted.
738 (WebCore::Element::UIActions): Deleted.
743 (WebCore::Node::dispatchUIRequestEvent): Deleted.
746 2016-12-20 Romain Bellessort <romain.bellessort@crf.canon.fr>
748 [Readable Streams API] Implement readableByteStreamControllerCallPullIfNeeded()
749 https://bugs.webkit.org/show_bug.cgi?id=166022
751 Reviewed by Youenn Fablet.
753 Implemented readableByteStreamControllerCallPullIfNeeded(). This function is
754 in particular called when a new ReadableByteStreamController is created; hence,
755 ReadableByteStreamController constructor has been updated.
757 Added 3 tests to check behaviour in case of success/failure of the start and pull functions
758 associated to the underlyingByteSource.
760 * Modules/streams/ReadableByteStreamInternals.js:
761 (privateInitializeReadableByteStreamController): Updated handling of underlyingByteSource
762 start function (especially with call to readableByteStreamControllerCallPullIfNeeded).
763 (isReadableStreamBYOBReader): Added.
764 (readableStreamHasBYOBReader): Added.
765 (readableStreamHasDefaultReader): Added.
766 (readableByteStreamControllerCallPullIfNeeded): Added.
767 * Modules/streams/ReadableStreamInternals.js:
768 (privateInitializeReadableStreamDefaultController): Added missing asserts.
769 * bindings/js/WebCoreBuiltinNames.h: Added readIntoRequests.
771 2016-12-20 Sam Weinig <sam@webkit.org>
773 [DataCue] Un-prefix DataCue and remove custom bindings
774 https://bugs.webkit.org/show_bug.cgi?id=166087
776 Reviewed by Eric Carlson.
779 * WebCore.xcodeproj/project.pbxproj:
780 * bindings/js/JSBindingsAllInOne.cpp:
781 * bindings/js/JSDataCueCustom.cpp: Removed.
782 Remove JSDataCueCustom.cpp
784 * bindings/js/JSTextTrackCueCustom.cpp:
785 (WebCore::toJSNewlyCreated):
786 Remove out of date comment.
788 * bindings/scripts/CodeGeneratorJS.pm:
789 (GenerateConstructorDefinition):
790 Update constructor generation code to use JSDOMConvert.
792 * html/track/DataCue.cpp:
793 (WebCore::DataCue::DataCue):
794 (WebCore::DataCue::~DataCue):
795 (WebCore::DataCue::data):
796 (WebCore::DataCue::setData):
797 (WebCore::DataCue::cueContentsMatch):
798 (WebCore::DataCue::value):
799 (WebCore::DataCue::setValue):
800 (WebCore::DataCue::valueOrNull):
801 * html/track/DataCue.h:
802 * html/track/DataCue.idl:
803 * platform/SerializedPlatformRepresentation.h:
804 Remove DATACUE_VALUE define from web exposed classes, so the interface can
805 be the same on all platforms. Platforms that don't support DATACUE_VALUE will
806 just never have any value. Also remove custom annotations.
808 2016-12-20 Wenson Hsieh <wenson_hsieh@apple.com>
810 Implement the updated port/area-based Scroll Snap Module Level 1 Spec
811 https://bugs.webkit.org/show_bug.cgi?id=165317
812 <rdar://problem/29490956>
814 Reviewed by Dean Jackson.
816 Implements the changes drafted in the latest iteration of the Scroll Snap Module Level 1 spec, which uses a
817 snap-area and snap-port-based method for determining snap positions in a scroll snapping container.
818 Additionally, removes the now-obsolete and prefixed implementation of the scroll snap spec and refactors all
819 affected layout tests to use the new CSS properties. Also adds new layout tests covering some behaviors detailed
820 in the new version of the spec, such as scroll snapping with transformed child elements.
822 See below for more detailed descriptions of the changes.
824 Tests: css3/scroll-snap/scroll-snap-2d-change-axis-type.html
825 css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html
826 css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin.html
827 css3/scroll-snap/scroll-snap-children-with-transforms.html
828 css3/scroll-snap/scroll-snap-positions-mainframe.html
829 css3/scroll-snap/scroll-snap-positions-overflow-resize.html
830 css3/scroll-snap/scroll-snap-positions.html
831 css3/scroll-snap/scroll-snap-style-changed-align.html
832 css3/scroll-snap/scroll-snap-with-scroll-padding.html
834 * WebCore.xcodeproj/project.pbxproj:
835 * css/CSSCalculationValue.cpp:
836 (WebCore::hasDoubleValue):
838 Removed use of length repeat.
840 * css/CSSComputedStyleDeclaration.cpp:
841 (WebCore::valueForScrollSnapType):
842 (WebCore::valueForScrollSnapAlignment):
843 (WebCore::ComputedStyleExtractor::propertyValue):
844 (WebCore::scrollSnapDestination): Deleted.
845 (WebCore::scrollSnapPoints): Deleted.
846 (WebCore::scrollSnapCoordinates): Deleted.
848 Removed helper functions used to create CSS values for scroll snap coordinates and destination, and added
849 helpers for computed scroll snap type (a combination of axis and strictness values) as well as scroll snap align
850 (an alignment value per axis).
852 * css/CSSPrimitiveValue.cpp:
853 (WebCore::isValidCSSUnitTypeForDoubleConversion):
854 (WebCore::isStringType):
855 (WebCore::CSSPrimitiveValue::cleanup):
856 (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
857 (WebCore::CSSPrimitiveValue::cloneForCSSOM):
858 (WebCore::CSSPrimitiveValue::equals):
860 Removed usages of the length repeat type, since repeat(*) is no longer being used anywhere.
862 * css/CSSPrimitiveValue.h:
863 * css/CSSPrimitiveValueMappings.h:
864 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
865 (WebCore::CSSPrimitiveValue::operator ScrollSnapStrictness):
866 (WebCore::CSSPrimitiveValue::operator ScrollSnapAxis):
867 (WebCore::CSSPrimitiveValue::operator ScrollSnapAxisAlignType):
868 (WebCore::CSSPrimitiveValue::operator ScrollSnapType): Deleted.
870 Added CSSPrimitiveValue mappings to ScrollSnapAxisAlignType, ScrollSnapStrictness, and ScrollSnapAxis. Removed
871 the old ScrollSnapType mapping.
873 * css/CSSProperties.json:
875 Replaced the old scroll snap CSS properties with the new ones. Note that scroll-snap-margin and scroll-padding
876 have 4 shorthands each, for the individual top/bottom/left/right values.
878 * css/CSSValueKeywords.in:
880 Added CSS keywords {x, y}, which are necessary to support the new scroll snapping properties.
882 * css/LengthRepeat.h: Removed.
884 Removed LengthRepeat entirely. This represented the `repeat(<length>)` CSS value, which was only used for the
885 scroll-snap-points-x and scroll-snap-points-y values.
887 * css/StyleBuilderConverter.h:
888 (WebCore::StyleBuilderConverter::convertScrollSnapType):
889 (WebCore::StyleBuilderConverter::convertScrollSnapAlign):
890 (WebCore::StyleBuilderConverter::parseSnapCoordinate): Deleted.
891 (WebCore::StyleBuilderConverter::convertScrollSnapPoints): Deleted.
892 (WebCore::StyleBuilderConverter::convertSnapCoordinatePair): Deleted.
893 (WebCore::StyleBuilderConverter::convertScrollSnapCoordinates): Deleted.
895 Added helper functions to convert scroll snap type and scroll snap alignment from parsed CSS values to their
896 primary representation in WebCore as ScrollSnapType and ScrollSnapAlign. These methods assume that the given
897 CSS values have successfully cleared the parsing step and are represented as CSSValueLists or length 1 or 2.
899 * css/StyleBuilderCustom.h:
900 (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Deleted.
901 (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Deleted.
902 (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Deleted.
903 (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Deleted.
904 * css/StyleProperties.cpp:
905 (WebCore::StyleProperties::getPropertyValue):
906 (WebCore::StyleProperties::asText):
908 Adds support for the scroll-snap-margin and scroll-padding.
910 * css/parser/CSSParser.cpp:
911 (WebCore::isValidKeywordPropertyAndValue):
912 (WebCore::CSSParser::parseValue):
913 (WebCore::isScrollSnapAxisAlign):
914 (WebCore::isScrollSnapStrictness):
915 (WebCore::CSSParser::parseScrollSnapAlign):
916 (WebCore::CSSParser::parseScrollSnapType):
917 (WebCore::CSSParser::parseNonElementSnapPoints): Deleted.
918 (WebCore::CSSParser::parseScrollSnapPositions): Deleted.
919 (WebCore::CSSParser::parseScrollSnapDestination): Deleted.
920 (WebCore::CSSParser::parseScrollSnapCoordinate): Deleted.
921 * css/parser/CSSParser.h:
923 Removed references to LengthRepeat, and added support for parsing new scroll snapping properties. Scroll snap
924 margin and scroll padding, along with their shorthands, are parsed using the same helper functions as normal
925 margin and padding. For type and align, I added new helper functions that build up lists of 1 or 2
926 CSSPrimitiveValues for each of the properties.
928 Parsing scroll-snap-align is straightforward -- we either have one or two values in the set {none, start,
929 center, end}. For scroll-snap-type, we allow a single axis value {x, y, inline, block, both}, or a single
930 strictness value {none, proximity, mandatory}, or an axis value followed by a non-'none' strictness (i.e. either
931 proximity or mandatory).
933 * css/parser/CSSParserFastPaths.cpp:
934 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
935 (WebCore::CSSParserFastPaths::isKeywordPropertyID):
936 * css/parser/CSSParserValues.cpp:
937 (WebCore::CSSParserValue::createCSSValue):
939 Removed references to LengthRepeat.
941 * css/parser/CSSPropertyParser.cpp:
942 (WebCore::CSSPropertyParser::parseSingleValue):
943 (WebCore::CSSPropertyParser::parseShorthand):
944 (WebCore::consumeSnapPointCoordinateList): Deleted.
945 (WebCore::consumeScrollSnapCoordinate): Deleted.
946 (WebCore::consumeScrollSnapDestination): Deleted.
947 (WebCore::consumeScrollSnapPoints): Deleted.
948 (WebCore::consumeScrollSnapAlign):
949 (WebCore::consumeScrollSnapType):
950 (WebCore::CSSPropertyParser::parseSingleValue):
952 Added parsing for the longhand properties of scroll-snap-margin and scroll-padding, which use the existing
953 consumeLength and consumeLengthOrPercent helpers, respectively. Removed code for parsing scroll snap
954 coordinates, destinations and points. Added parsing logic for align and type.
956 * page/scrolling/AxisScrollSnapOffsets.cpp:
957 (WebCore::computeScrollSnapPortOrAreaRect):
958 (WebCore::computeScrollSnapAlignOffset):
959 (WebCore::snapOffsetsToString):
960 (WebCore::snapPortOrAreaToString):
961 (WebCore::updateSnapOffsetsForScrollableArea):
962 (WebCore::appendChildSnapOffsets): Deleted.
963 (WebCore::destinationOffsetForViewSize): Deleted.
964 (WebCore::updateFromStyle): Deleted.
965 (WebCore::styleUsesElements): Deleted.
967 Overhauled updateSnapOffsetsForScrollableArea to work with the new scroll snapping model. In the new way of
968 computing scroll snap offsets, we:
970 Compute the scroll container's scroll snap port, which is the padding box inset by the scroll padding
971 For each child with snap positions (i.e. scroll-snap-align is not none on both axes)
972 Compute the child's scroll snap area, which is the bounding box of the transformed border box
973 If the container snaps along the horizontal axis and the snap area contributes a horizontal snap offset:
974 Emit the distance from the alignment offset in the horizontal of the snap port to the corresponding offset
975 in the snap area as a snap position.
976 If the container snaps along the vertical axis and the snap area contributes a vertical snap offset:
977 Emit the distance from the alignment offset in the vertical of the snap port to the corresponding offset
978 in the snap area as a snap position.
979 For the snap offsets in each axis, if there is at least one snap offset:
980 Clamp the offsets to the min and max scroll offsets
981 Ensure that the offsets are sorted and do not contain duplicated offsets
983 * platform/cocoa/ScrollController.mm:
984 (WebCore::ScrollController::updateScrollSnapState):
986 Clear out the ScrollController's snap offsets and state along an axis when its ScrollableArea no longer has snap
987 offsets in that axis.
989 * rendering/RenderBox.cpp:
990 (WebCore::RenderBox::styleWillChange):
991 (WebCore::RenderBox::willBeRemovedFromTree):
992 * rendering/RenderLayerModelObject.cpp:
993 (WebCore::scrollSnapContainerRequiresUpdateForStyleUpdate):
994 (WebCore::RenderLayerModelObject::styleDidChange):
995 * rendering/RenderView.cpp:
996 (WebCore::RenderView::registerBoxWithScrollSnapPositions):
997 (WebCore::RenderView::unregisterBoxWithScrollSnapPositions):
998 (WebCore::RenderView::registerBoxWithScrollSnapCoordinates): Deleted.
999 (WebCore::RenderView::unregisterBoxWithScrollSnapCoordinates): Deleted.
1000 * rendering/RenderView.h:
1002 Tweaked the scroll snap child registration logic. registerBoxWithScrollSnapCoordinates is renamed to
1003 unregisterBoxWithScrollSnapPositions, since the notion of scroll snap coordinates no longer exists, and instead
1004 of checking if the list of scroll snap coordinates is empty for the absence of scroll positions, we instead
1005 check for a computed scroll snap align that is not none on both axes.
1007 * rendering/style/RenderStyle.cpp:
1008 (WebCore::RenderStyle::initialScrollSnapType):
1009 (WebCore::RenderStyle::initialScrollSnapAlign):
1010 (WebCore::RenderStyle::scrollSnapArea):
1011 (WebCore::RenderStyle::scrollSnapPort):
1012 (WebCore::RenderStyle::scrollSnapType):
1013 (WebCore::RenderStyle::scrollPadding):
1014 (WebCore::RenderStyle::scrollPaddingTop):
1015 (WebCore::RenderStyle::scrollPaddingBottom):
1016 (WebCore::RenderStyle::scrollPaddingLeft):
1017 (WebCore::RenderStyle::scrollPaddingRight):
1018 (WebCore::RenderStyle::scrollSnapAlign):
1019 (WebCore::RenderStyle::scrollSnapMargin):
1020 (WebCore::RenderStyle::scrollSnapMarginTop):
1021 (WebCore::RenderStyle::scrollSnapMarginBottom):
1022 (WebCore::RenderStyle::scrollSnapMarginLeft):
1023 (WebCore::RenderStyle::scrollSnapMarginRight):
1024 (WebCore::RenderStyle::setScrollSnapType):
1025 (WebCore::RenderStyle::setScrollPaddingTop):
1026 (WebCore::RenderStyle::setScrollPaddingBottom):
1027 (WebCore::RenderStyle::setScrollPaddingLeft):
1028 (WebCore::RenderStyle::setScrollPaddingRight):
1029 (WebCore::RenderStyle::setScrollSnapAlign):
1030 (WebCore::RenderStyle::setScrollSnapMarginTop):
1031 (WebCore::RenderStyle::setScrollSnapMarginBottom):
1032 (WebCore::RenderStyle::setScrollSnapMarginLeft):
1033 (WebCore::RenderStyle::setScrollSnapMarginRight):
1034 (WebCore::RenderStyle::initialScrollSnapDestination): Deleted.
1035 (WebCore::RenderStyle::initialScrollSnapCoordinates): Deleted.
1036 (WebCore::RenderStyle::scrollSnapPointsX): Deleted.
1037 (WebCore::RenderStyle::scrollSnapPointsY): Deleted.
1038 (WebCore::RenderStyle::scrollSnapDestination): Deleted.
1039 (WebCore::RenderStyle::scrollSnapCoordinates): Deleted.
1040 (WebCore::RenderStyle::setScrollSnapPointsX): Deleted.
1041 (WebCore::RenderStyle::setScrollSnapPointsY): Deleted.
1042 (WebCore::RenderStyle::setScrollSnapDestination): Deleted.
1043 (WebCore::RenderStyle::setScrollSnapCoordinates): Deleted.
1044 * rendering/style/RenderStyle.h:
1045 (WebCore::RenderStyle::initialScrollSnapMargin):
1046 (WebCore::RenderStyle::initialScrollPadding):
1047 (WebCore::RenderStyle::scrollSnapType): Deleted.
1048 (WebCore::RenderStyle::setScrollSnapType): Deleted.
1049 (WebCore::RenderStyle::initialScrollSnapType): Deleted.
1050 (WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
1051 (WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
1053 Added boilerplate code for returning various new scroll snap style properties, and removed similar code for
1054 handling the old scroll snap properties.
1056 * rendering/style/RenderStyleConstants.h:
1058 Added three new enum classes:
1059 - ScrollSnapStrictness represents the strictness of scroll snapping along one or both axes
1060 - ScrollSnapAxis designates the axes along which scroll snapping should occur
1061 - ScrollSnapAxisAlignType indicates which offsets along the x or y axes of the snap port and snap area should be
1062 used to compute the snap position emitted by a snap area.
1064 * rendering/style/StyleRareNonInheritedData.cpp:
1065 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1066 (WebCore::StyleRareNonInheritedData::operator==):
1067 * rendering/style/StyleRareNonInheritedData.h:
1069 Replaces the StyleScrollSnapPoints object (which, confusingly, was in charge of storing both the scroll
1070 container's and child elements' scroll snap styles) with StyleScrollSnapPort and StyleScrollSnapArea objects,
1071 which keep track of the style properties on the scroll container and the child element, respectively.
1073 * rendering/style/StyleScrollSnapPoints.h:
1074 (WebCore::operator==):
1075 (WebCore::StyleScrollSnapPort::copy):
1076 (WebCore::StyleScrollSnapPort::StyleScrollSnapPort):
1077 (WebCore::StyleScrollSnapArea::copy):
1078 (WebCore::StyleScrollSnapArea::StyleScrollSnapArea):
1079 * rendering/style/StyleScrollSnapping.h: Added.
1080 (WebCore::operator!=):
1081 (WebCore::StyleScrollSnapPort::create):
1082 (WebCore::StyleScrollSnapArea::create):
1083 (WebCore::StyleScrollSnapArea::hasSnapPosition):
1085 Overhauled StyleScrollSnapPoints, breaking the logic here into two classes: StyleScrollSnapPort for the scroll
1086 container, handling the properties `scroll-snap-type` and `scroll-padding` and StyleScrollSnapArea for child
1087 elements, handling the properties `scroll-snap-align` and `scroll-snap-margin`. The ScrollSnapType itself is
1088 composed of an axis value and a strictness, while a ScrollSnapAlign keeps track of the alignment modes in each
1089 axis. By default, these are initialized to {Both, None} and {None, None}, respectively. The rest of the logic is
1090 boilerplate code for comparing these style objects to one another and copying style representations.
1092 * testing/Internals.cpp:
1093 (WebCore::Internals::scrollSnapOffsets):
1095 Perform a layout on the document if needed before returning the list of computed snap offsets. The absence of
1096 this layout pass was causing some layout tests in css3/scroll-snap/ to flake when testing that programmatic
1097 changes to the scroll snap style properties change the computed snap offsets.
1099 2016-12-19 Dean Jackson <dino@apple.com>
1101 Use ENABLE() in place of ENABLE_CSS_SELECTORS_LEVEL4
1102 https://bugs.webkit.org/show_bug.cgi?id=166043
1103 <rdar://problems/29743655>
1105 Reviewed by Alex Christensen.
1107 This doesn't compile unless the ENABLE_CSS_SELECTORS_LEVEL4 is defined.
1109 * css/SelectorChecker.cpp:
1110 (WebCore::SelectorChecker::matchRecursively):
1111 * css/SelectorFilter.cpp:
1112 (WebCore::SelectorFilter::collectIdentifierHashes):
1113 * css/parser/CSSSelectorParser.cpp:
1114 (WebCore::isOnlyPseudoClassFunction):
1115 (WebCore::CSSSelectorParser::consumePseudo):
1116 (WebCore::CSSSelectorParser::consumeCombinator):
1117 * cssjit/SelectorCompiler.cpp:
1118 (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
1120 2016-12-20 Yusuke Suzuki <utatane.tea@gmail.com>
1122 Unreviewed, attempt to fix Windows Debug build part 2
1123 https://bugs.webkit.org/show_bug.cgi?id=166035
1125 Ensured that this patch passes the build on the GTK port.
1127 * rendering/RenderElement.cpp:
1128 * rendering/RenderElement.h:
1130 2016-12-20 Yusuke Suzuki <utatane.tea@gmail.com>
1132 Unreviewed, fix Windows Debug build
1133 https://bugs.webkit.org/show_bug.cgi?id=166035
1135 The size of SameSizeAsRenderElement should be in sync with sizeof(RenderElement).
1137 * rendering/RenderElement.cpp:
1139 2016-12-20 Nael Ouedraogo <nael.ouedraogo@crf.canon.fr>
1141 WebRTC: RTCPeerConnection constructor argument should be optional
1142 https://bugs.webkit.org/show_bug.cgi?id=164057
1144 Reviewed by Youenn Fablet.
1146 Modify RTCPeerConnection JSBuiltin constructor to allow RTCPeerConfiguration
1147 argument to be optional.
1149 Update existing tests.
1151 * Modules/mediastream/RTCPeerConnection.js:
1152 (initializeRTCPeerConnection):
1154 2016-12-19 Yusuke Suzuki <utatane.tea@gmail.com>
1156 [ES6] Enable ES6 Modules
1157 https://bugs.webkit.org/show_bug.cgi?id=165849
1159 Reviewed by Geoffrey Garen.
1161 * dom/ScriptElement.cpp:
1162 (WebCore::ScriptElement::determineScriptType):
1163 * html/parser/HTMLPreloadScanner.cpp:
1164 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1167 2016-12-17 Sam Weinig <sam@webkit.org>
1169 Remove a few trivial custom bindings
1170 https://bugs.webkit.org/show_bug.cgi?id=165999
1172 Reviewed by Simon Fraser.
1175 * bindings/js/JSBindingsAllInOne.cpp:
1178 * WebCore.xcodeproj/project.pbxproj:
1179 Move custom bindings that only exist for GC or wrapping reasons
1180 to their own group, so we can focus on the ones with custom functions.
1182 * bindings/js/JSDataTransferCustom.cpp: Removed.
1183 * bindings/js/JSTrackEventCustom.cpp: Removed.
1185 * dom/DataTransfer.cpp:
1186 (WebCore::DataTransfer::types):
1187 Remove incorrect comment and use a more concise empty initialization syntax.
1189 * dom/DataTransfer.idl:
1190 Update IDL to remove [Custom] annotation and match spec better.
1192 * html/track/TrackEvent.cpp:
1193 (WebCore::convertToTrackEventTrack):
1194 (WebCore::TrackEvent::TrackEvent):
1195 * html/track/TrackEvent.h:
1196 Switch to store the Track in a Variant to make the binding easier.
1198 * html/track/TrackEvent.idl:
1199 Remove [CustomGetter] annotation.
1201 2016-12-19 Zalan Bujtas <zalan@apple.com>
1203 Do not position detached list item marker.
1204 https://bugs.webkit.org/show_bug.cgi?id=166035
1205 <rdar://problem/29175235>
1207 Reviewed by Simon Fraser.
1209 In certain (non-reproducible) cases, the list item marker can get detached from the tree
1210 during layout and when in RenderListItem::positionListMarker() we dereference the marker's parent, we crash.
1211 In addition to the null check, this patch adds an ASSERTION to catch such cases early on.
1213 Unable to reproduce.
1215 * rendering/RenderBoxModelObject.cpp:
1216 (WebCore::RenderBoxModelObject::moveChildTo):
1217 * rendering/RenderElement.cpp:
1218 (WebCore::RenderElement::removeChildInternal):
1219 * rendering/RenderElement.h:
1220 * rendering/RenderListItem.cpp:
1221 (WebCore::RenderListItem::layout):
1222 (WebCore::RenderListItem::positionListMarker):
1223 * rendering/RenderListItem.h:
1224 * rendering/RenderListMarker.h:
1226 2016-12-19 Gavin Barraclough <barraclough@apple.com>
1228 [CSS Parser] Enable CSS Deferred Parsing
1229 https://bugs.webkit.org/show_bug.cgi?id=165869
1231 Unreviewed rollout – looks like this regressed performance.
1233 * css/parser/CSSParserMode.h:
1236 2016-12-18 Brent Fulgham <bfulgham@apple.com>
1238 Side effects while restting form elements
1239 https://bugs.webkit.org/show_bug.cgi?id=165959
1240 <rdar://problem/29705967>
1242 Reviewed by Anders Carlsson.
1244 JavaScript logic can run while resetting FormElement objects. This can
1245 lead to unintended side-effets and other unwanted behavior. We should
1246 protect these elements during the reset.
1248 Test: fast/html/form-mutate.html
1250 * html/HTMLFormElement.cpp:
1251 (WebCore::HTMLFormElement::HTMLFormElement): Switch to C++11 initialization.
1252 (WebCore::HTMLFormElement::reset): Protect elements until the reset
1253 operation is finished.
1254 (WebCore::HTMLFormElement::resetAssociatedFormControlElements): Added to share
1255 code with 'resumeFromDocument'.
1256 (WebCore::HTMLFormElement::resumeFromDocument): Protect elements until the
1257 reset operation is finished.
1259 2016-12-19 Commit Queue <commit-queue@webkit.org>
1261 Unreviewed, rolling out r209983.
1262 https://bugs.webkit.org/show_bug.cgi?id=166024
1264 There's intent to support persistent-usage-record (Requested
1265 by zdobersek on #webkit).
1269 "[EME] Remove MediaKeySessionType::persistent-usage-record"
1270 https://bugs.webkit.org/show_bug.cgi?id=166012
1271 http://trac.webkit.org/changeset/209983
1273 2016-12-19 Sam Weinig <sam@webkit.org>
1275 Move custom files / callback objects into their respective groups.
1277 Rubber-stamped by Simon Fraser.
1279 * WebCore.xcodeproj/project.pbxproj:
1281 2016-12-19 Sam Weinig <sam@webkit.org>
1283 [WebIDL] Remove custom binding for the named Image constructor
1284 https://bugs.webkit.org/show_bug.cgi?id=166023
1286 Reviewed by Alex Christensen.
1288 * bindings/js/JSBindingsAllInOne.cpp:
1290 * WebCore.xcodeproj/project.pbxproj:
1291 Remove JSImageConstructor.
1293 * bindings/js/JSImageConstructor.cpp: Removed.
1294 * bindings/js/JSImageConstructor.h: Removed.
1296 * bindings/js/JSDOMWindowCustom.cpp:
1297 (WebCore::JSDOMWindow::image): Deleted.
1298 * page/DOMWindow.idl:
1299 Remove custom getter for the constructor.
1301 * html/HTMLImageElement.idl:
1302 Add NamedConstructor annotation.
1304 2016-12-19 Antti Koivisto <antti@apple.com>
1306 Remove RenderObject::requiresForcedStyleRecalcPropagation
1307 https://bugs.webkit.org/show_bug.cgi?id=166021
1309 Reviewed by Andreas Kling.
1311 It is not called. It also makes no sense architecturally.
1313 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
1314 * html/shadow/mac/ImageControlsRootElementMac.cpp:
1315 * rendering/RenderButton.h:
1316 * rendering/RenderFileUploadControl.h:
1317 * rendering/RenderListItem.h:
1318 * rendering/RenderMedia.h:
1319 * rendering/RenderMenuList.h:
1320 * rendering/RenderMeter.h:
1321 * rendering/RenderObject.h:
1322 (WebCore::RenderObject::requiresForcedStyleRecalcPropagation): Deleted.
1323 * rendering/RenderProgress.h:
1324 * rendering/RenderSlider.h:
1325 * rendering/RenderTextControl.h:
1326 * style/RenderTreeUpdater.cpp:
1327 (WebCore::RenderTreeUpdater::updateElementRenderer):
1329 This is the only call site. Combination
1331 update.change == Style::NoChange && parent().styleChange == Style::Force
1333 is impossible ('Force' inherits) so requiresForcedStyleRecalcPropagation doesn't ever even get called.
1335 2016-12-19 Zan Dobersek <zdobersek@igalia.com>
1337 [EME] Remove MediaKeySessionType::persistent-usage-record
1338 https://bugs.webkit.org/show_bug.cgi?id=166012
1340 Reviewed by Xabier Rodriguez-Calvar.
1342 Remove the "persistent-usage-record" value from the MediaKeySessionType.
1343 This was removed from the spec as an at-risk feature.
1344 https://github.com/w3c/encrypted-media/issues/353
1346 No non-imported tests need to be updated. This is still present in the
1347 tests imported from the W3C's web-platform-tests repository, but the
1348 tests haven't yet been updated upstream.
1350 * Modules/encryptedmedia/CDM.cpp:
1351 (WebCore::CDM::isPersistentType):
1352 * Modules/encryptedmedia/MediaKeySessionType.h:
1353 * Modules/encryptedmedia/MediaKeySessionType.idl:
1355 2016-12-19 Miguel Gomez <magomez@igalia.com>
1357 [GTK] GLXBadFBConfig error when creating an OpenGL context
1358 https://bugs.webkit.org/show_bug.cgi?id=165200
1360 Reviewed by Carlos Garcia Campos.
1362 glXCreateContextAttribsARB causes a GLXBadFBConfig X error when it's not able to provide the
1363 OpenGL version >= 3.2 we are requesting. Due to this, the app crashes instead of falling back to
1365 The patch modifies GLX context creation using a XErrorTrapper, so the first time a context is created
1366 we don't crash if OpenGL >= 3.2 is not available.
1367 If the gotten context is not valid, we fall back to whatever version glXCreateContextAttribsARB is
1369 The legacy glXCreateContext is only used if the GLX_ARB_create_context extension is not available.
1371 Covered by existent tests.
1373 * platform/graphics/glx/GLContextGLX.cpp:
1374 (WebCore::tryCreateGLXARBContext):
1375 (WebCore::GLContextGLX::createWindowContext):
1376 (WebCore::GLContextGLX::createPbufferContext):
1378 2016-12-18 Brady Eidson <beidson@apple.com>
1380 IndexedDB 2.0: Prefetch cursor records in the server.
1381 https://bugs.webkit.org/show_bug.cgi?id=166014
1383 Reviewed by Andy Estes.
1385 No new tests (Covered by existing LayoutTests and PerformanceTests).
1387 This patch implements the followng:
1388 1 - After a backing store cursor completes a fetch in the server, it will schedule the next fetch
1389 even before the client requests one. It will do this up to a limited number of prefetches.
1390 2 - Once a client request to advance the cursor comes in, we'll work our way through prefetched
1391 records instead of reading anything from disk, which might then cause us to continue prefetch.
1392 3 - If any changes to the object store occur, it will throw away all previously fetched records
1393 (There's room for future improvement here)
1395 * Modules/indexeddb/server/IDBBackingStore.h:
1397 * Modules/indexeddb/server/IDBServer.cpp:
1398 (WebCore::IDBServer::IDBServer::postDatabaseTask):
1400 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1402 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1403 (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
1404 (WebCore::IDBServer::SQLiteIDBBackingStore::prefetchCursor):
1405 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1407 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1408 (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
1409 (WebCore::IDBServer::SQLiteIDBCursor::prefetch):
1410 (WebCore::IDBServer::SQLiteIDBCursor::advance):
1411 * Modules/indexeddb/server/SQLiteIDBCursor.h:
1413 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1414 (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
1415 (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
1416 (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):
1417 * Modules/indexeddb/server/UniqueIDBDatabase.h:
1419 2016-12-18 Wenson Hsieh <wenson_hsieh@apple.com>
1421 Changing text direction fires input events with null inputTypes and no data
1422 https://bugs.webkit.org/show_bug.cgi?id=166007
1423 <rdar://problem/29557205>
1425 Reviewed by Sam Weinig.
1427 Adds support for the "formatSetInlineTextDirection" input type, triggered when using the context menu on Mac in
1428 an editable area (for both plain and rich text cases) to change paragraph direction. To do this, we add cases
1429 for EditActionSetWritingDirection in inputTypeNameForEditingAction and inputEventDataForEditingStyleAndAction.
1431 When changing text direction for a plaintext editable element, we have logic in Editor::setBaseWritingDirection
1432 that sets the focused element's dir attribute to the requested value (ltr or rtl). We add similar hooks here to
1433 dispatch input events and handle preventing default.
1435 Test: fast/events/before-input-events-prevent-text-direction.html
1437 * editing/EditCommand.cpp:
1438 (WebCore::inputTypeNameForEditingAction):
1440 Handle the EditActionSetWritingDirection case.
1442 * editing/Editor.cpp:
1443 (WebCore::inputEventDataForEditingStyleAndAction):
1444 (WebCore::Editor::applyParagraphStyle):
1446 Include input event data when dispatching an input event here.
1448 (WebCore::Editor::setBaseWritingDirection):
1449 * testing/Internals.cpp:
1450 (WebCore::Internals::setBaseWritingDirection):
1451 * testing/Internals.h:
1452 * testing/Internals.idl:
1454 Introduce an internal testing support hook for setting base writing direction (the same codepath taken when
1455 using the context menu to change paragraph direction). Currently, using testRunner.execCommand creates and
1456 applies style with an additional `unicode-bidi` attribute, and appears to also be intentionally disabled for
1457 plaintext editable elements.
1459 2016-12-17 Simon Fraser <simon.fraser@apple.com>
1461 Build fix: linking WebCore was failing: you can't export inline functions.
1463 * css/DeprecatedCSSOMPrimitiveValue.cpp:
1464 (WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType):
1465 (WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue):
1466 (WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue):
1467 (WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue):
1468 (WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue):
1469 * css/DeprecatedCSSOMPrimitiveValue.h:
1470 (WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType): Deleted.
1471 (WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue): Deleted.
1472 (WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue): Deleted.
1473 (WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue): Deleted.
1474 (WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue): Deleted.
1476 2016-12-16 Dave Hyatt <hyatt@apple.com>
1478 [CSS Values] Make separate wrapper classes for the deprecated CSS Values OM
1479 https://bugs.webkit.org/show_bug.cgi?id=165968
1481 Reviewed by Andreas Kling.
1483 This patch changes the CSS OM for values to use distinct wrapper
1484 classes instead of cloning the existing classes. By actually wrapping
1485 values instead of cloning, we are freed up to change our CSS value hierarchy
1486 however we'd like (such as changing to match the new CSS Values OM that
1489 All of the CSS Values wrapper classes are prefixed with "DeprecatedCSSOM"
1490 to reflect our desire (ultimately) to remove this API from our tree. We're
1491 the only ones that support it, and it's not used on the Web, but it is part
1492 of the WebKitLegacy API and might be used internally.
1495 * DerivedSources.cpp:
1496 * DerivedSources.make:
1497 * WebCore.xcodeproj/project.pbxproj:
1498 * bindings/js/DOMWrapperWorld.h:
1499 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1500 (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
1501 * bindings/js/JSCSSValueCustom.cpp:
1502 (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
1503 (WebCore::JSDeprecatedCSSOMValueOwner::finalize):
1504 (WebCore::toJSNewlyCreated):
1506 (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots): Deleted.
1507 (WebCore::JSCSSValueOwner::finalize): Deleted.
1508 * css/CSSComputedStyleDeclaration.cpp:
1509 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1510 * css/CSSComputedStyleDeclaration.h:
1511 * css/CSSGridLineNamesValue.cpp:
1512 (WebCore::CSSGridLineNamesValue::cloneForCSSOM): Deleted.
1513 * css/CSSGridLineNamesValue.h:
1514 * css/CSSImageSetValue.cpp:
1515 (WebCore::CSSImageSetValue::cloneForCSSOM): Deleted.
1516 * css/CSSImageSetValue.h:
1517 * css/CSSImageValue.cpp:
1518 (WebCore::CSSImageValue::createDeprecatedCSSOMWrapper):
1519 (WebCore::CSSImageValue::cloneForCSSOM): Deleted.
1520 * css/CSSImageValue.h:
1521 * css/CSSPrimitiveValue.cpp:
1522 (WebCore::CSSPrimitiveValue::createDeprecatedCSSOMPrimitiveWrapper):
1523 (WebCore::CSSPrimitiveValue::cloneForCSSOM): Deleted.
1524 * css/CSSPrimitiveValue.h:
1525 * css/CSSPrimitiveValue.idl: Removed.
1526 * css/CSSStyleDeclaration.h:
1527 * css/CSSStyleDeclaration.idl:
1529 (WebCore::CSSValue::traverseSubresources):
1530 (WebCore::CSSValue::equals):
1531 (WebCore::CSSValue::cssText):
1532 (WebCore::CSSValue::destroy):
1533 (WebCore::CSSValue::createDeprecatedCSSOMWrapper):
1535 (WebCore::CSSValue::cloneForCSSOM): Deleted.
1537 (WebCore::CSSValue::CSSValue):
1538 (WebCore::CSSValue::setCssText): Deleted.
1539 (WebCore::CSSValue::isCSSOMSafe): Deleted.
1540 (WebCore::CSSValue::isSubtypeExposedToCSSOM): Deleted.
1541 * css/CSSValue.idl: Removed.
1542 * css/CSSValueList.cpp:
1543 (WebCore::CSSValueList::cloneForCSSOM): Deleted.
1544 * css/CSSValueList.h:
1545 (WebCore::CSSValueList::separator):
1546 * css/CSSValueList.idl: Removed.
1548 * css/Counter.idl: Removed.
1549 * css/DeprecatedCSSOMCounter.h: Added.
1550 * css/DeprecatedCSSOMCounter.idl: Copied from Source/WebCore/css/Counter.idl.
1551 * css/DeprecatedCSSOMPrimitiveValue.cpp: Added.
1552 (WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue):
1553 (WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue):
1554 (WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue):
1555 * css/DeprecatedCSSOMPrimitiveValue.h: Added.
1556 (WebCore::DeprecatedCSSOMPrimitiveValue::create):
1557 (WebCore::DeprecatedCSSOMPrimitiveValue::equals):
1558 (WebCore::DeprecatedCSSOMPrimitiveValue::cssValueType):
1559 (WebCore::DeprecatedCSSOMPrimitiveValue::cssText):
1560 (WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType):
1561 (WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue):
1562 (WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue):
1563 (WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue):
1564 (WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue):
1565 (WebCore::DeprecatedCSSOMPrimitiveValue::stringValue):
1566 (WebCore::DeprecatedCSSOMPrimitiveValue::DeprecatedCSSOMPrimitiveValue):
1567 * css/DeprecatedCSSOMPrimitiveValue.idl: Copied from Source/WebCore/css/CSSPrimitiveValue.idl.
1568 * css/DeprecatedCSSOMRGBColor.h: Added.
1569 * css/DeprecatedCSSOMRGBColor.idl: Copied from Source/WebCore/css/RGBColor.idl.
1570 * css/DeprecatedCSSOMRect.h: Added.
1571 * css/DeprecatedCSSOMRect.idl: Copied from Source/WebCore/css/Rect.idl.
1572 * css/DeprecatedCSSOMValue.cpp: Added.
1573 (WebCore::compareCSSOMValues):
1574 (WebCore::DeprecatedCSSOMValue::equals):
1575 (WebCore::DeprecatedCSSOMValue::destroy):
1576 (WebCore::DeprecatedCSSOMValue::cssValueType):
1577 (WebCore::DeprecatedCSSOMValue::cssText):
1578 * css/DeprecatedCSSOMValue.h: Added.
1579 (WebCore::DeprecatedCSSOMValue::deref):
1580 (WebCore::DeprecatedCSSOMValue::setCssText):
1581 (WebCore::DeprecatedCSSOMValue::operator==):
1582 (WebCore::DeprecatedCSSOMValue::isComplexValue):
1583 (WebCore::DeprecatedCSSOMValue::isPrimitiveValue):
1584 (WebCore::DeprecatedCSSOMValue::isValueList):
1585 (WebCore::DeprecatedCSSOMValue::classType):
1586 (WebCore::DeprecatedCSSOMValue::DeprecatedCSSOMValue):
1587 (WebCore::DeprecatedCSSOMValue::~DeprecatedCSSOMValue):
1588 (WebCore::DeprecatedCSSOMComplexValue::create):
1589 (WebCore::DeprecatedCSSOMComplexValue::equals):
1590 (WebCore::DeprecatedCSSOMComplexValue::cssText):
1591 (WebCore::DeprecatedCSSOMComplexValue::cssValueType):
1592 (WebCore::DeprecatedCSSOMComplexValue::DeprecatedCSSOMComplexValue):
1593 * css/DeprecatedCSSOMValue.idl: Copied from Source/WebCore/css/CSSValue.idl.
1594 * css/DeprecatedCSSOMValueList.cpp: Added.
1595 (WebCore::DeprecatedCSSOMValueList::equals):
1596 (WebCore::DeprecatedCSSOMValueList::cssText):
1597 * css/DeprecatedCSSOMValueList.h: Added.
1598 (WebCore::DeprecatedCSSOMValueList::create):
1599 (WebCore::DeprecatedCSSOMValueList::cssValueType):
1600 (WebCore::DeprecatedCSSOMValueList::length):
1601 (WebCore::DeprecatedCSSOMValueList::item):
1602 (WebCore::DeprecatedCSSOMValueList::DeprecatedCSSOMValueList):
1603 * css/DeprecatedCSSOMValueList.idl: Copied from Source/WebCore/css/CSSValueList.idl.
1604 * css/LengthRepeat.h:
1605 * css/PropertySetCSSStyleDeclaration.cpp:
1606 (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
1607 (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM):
1608 (WebCore::StyleRuleCSSStyleDeclaration::didMutate):
1609 (WebCore::InlineCSSStyleDeclaration::didMutate):
1610 (WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM): Deleted.
1611 * css/PropertySetCSSStyleDeclaration.h:
1613 (WebCore::RGBColor::red): Deleted.
1614 (WebCore::RGBColor::green): Deleted.
1615 (WebCore::RGBColor::blue): Deleted.
1616 (WebCore::RGBColor::alpha): Deleted.
1618 * css/RGBColor.idl: Removed.
1620 (WebCore::RectBase::RectBase):
1621 * css/Rect.idl: Removed.
1622 * svg/SVGElement.cpp:
1623 (WebCore::SVGElement::getPresentationAttribute):
1625 * svg/SVGElement.idl:
1627 2016-12-17 Philippe Normand <pnormand@igalia.com>
1629 Unreviewed, rollout r209860 OWR player shouldn't be selected for normal video playback
1631 * platform/GStreamer.cmake:
1632 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
1633 (WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
1634 (WebCore::MediaPlayerPrivateGStreamerOwr::play):
1635 (WebCore::MediaPlayerPrivateGStreamerOwr::pause):
1636 (WebCore::MediaPlayerPrivateGStreamerOwr::load):
1637 (WebCore::MediaPlayerPrivateGStreamerOwr::stop):
1638 (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded):
1639 (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
1640 (WebCore::MediaPlayerPrivateGStreamerOwr::setSize):
1641 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
1642 * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
1643 (WebCore::MediaEndpointOwr::createMutedRemoteSource):
1644 * platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Removed.
1645 * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
1646 (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
1647 * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Removed.
1648 * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
1649 * platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Removed.
1651 2016-12-17 Michael Catanzaro <mcatanzaro@igalia.com>
1653 warning: the compiler can assume that the address of 'thisObject' will always evaluate to 'true' [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot
1654 https://bugs.webkit.org/show_bug.cgi?id=165987
1656 Reviewed by Mark Lam.
1658 Work around the warning by passing the JSObject pointer this function receives directly to
1659 ASSERT_GC_OBJECT_INHERITS, instead of casting it to a reference and then taking the address
1660 of that, to avoid the -Waddress warning.
1662 * bindings/js/JSHTMLDocumentCustom.cpp:
1663 (WebCore::JSHTMLDocument::getOwnPropertySlot):
1665 2016-12-17 Jer Noble <jer.noble@apple.com>
1667 Add implementation for navigator.requestMediaKeySystemAccess()
1668 https://bugs.webkit.org/show_bug.cgi?id=165850
1670 Reviewed by Eric Carlson.
1672 Test: media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html
1674 Add an implementation of NavigatorEME::requestMediaKeySystemAccess() as well as the CDM
1675 object on which it depends.
1677 * Modules/encryptedmedia/CDM.cpp: Added.
1678 (WebCore::cdmFactories):
1679 (WebCore::createCDMPrivateForKeySystem):
1680 (WebCore::CDM::registerCDMFactory):
1681 (WebCore::CDM::unregisterCDMFactory):
1682 (WebCore::CDM::supportsKeySystem):
1683 (WebCore::CDM::create):
1684 (WebCore::CDM::CDM):
1685 (WebCore::CDM::getSupportedConfiguration):
1686 (WebCore::CDM::doSupportedConfigurationStep):
1687 (WebCore::CDM::isPersistentType):
1688 (WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
1689 (WebCore::CDM::getConsentStatus):
1690 * Modules/encryptedmedia/CDM.h: Added.
1691 (WebCore::CDMFactory::~CDMFactory):
1692 (WebCore::CDM::keySystem):
1693 (WebCore::CDM::createWeakPtr):
1694 * Modules/encryptedmedia/CDMPrivate.h: Added.
1695 (WebCore::CDMPrivate::~CDMPrivate):
1696 * Modules/encryptedmedia/NavigatorEME.cpp:
1697 (WebCore::NavigatorEME::requestMediaKeySystemAccess):
1698 (WebCore::tryNextSupportedConfiguration):
1699 * Modules/encryptedmedia/NavigatorEME.h:
1700 * Modules/encryptedmedia/NavigatorEME.idl:
1702 To aid in testing, a new Internals object is added, MockCDMFactory, which can be
1703 controlled by LayoutTests to change the behavior of the Mock objects it creates.
1705 * testing/Internals.cpp:
1706 (WebCore::Internals::registerMockCDM):
1707 * testing/Internals.h:
1708 * testing/Internals.idl:
1709 * testing/MockCDMFactory.cpp: Added.
1710 (WebCore::MockCDMFactory::MockCDMFactory):
1711 (WebCore::MockCDMFactory::~MockCDMFactory):
1712 (WebCore::MockCDMFactory::unregister):
1713 (WebCore::MockCDMFactory::supportsKeySystem):
1714 (WebCore::MockCDMFactory::createCDM):
1715 (WebCore::MockCDM::MockCDM):
1716 (WebCore::MockCDM::supportsInitDataType):
1717 (WebCore::MockCDM::supportsConfiguration):
1718 (WebCore::MockCDM::supportsConfigurationWithRestrictions):
1719 (WebCore::MockCDM::supportsSessionTypeWithConfiguration):
1720 (WebCore::MockCDM::supportsRobustness):
1721 (WebCore::MockCDM::distinctiveIdentifiersRequirement):
1722 (WebCore::MockCDM::persistentStateRequirement):
1723 (WebCore::MockCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable):
1724 * testing/MockCDMFactory.h: Added.
1725 (WebCore::MockCDMFactory::create):
1726 (WebCore::MockCDMFactory::supportedDataTypes):
1727 (WebCore::MockCDMFactory::setSupportedDataTypes):
1728 (WebCore::MockCDMFactory::supportedRobustness):
1729 (WebCore::MockCDMFactory::setSupportedRobustness):
1730 (WebCore::MockCDMFactory::distinctiveIdentifiersRequirement):
1731 (WebCore::MockCDMFactory::setDistinctiveIdentifiersRequirement):
1732 (WebCore::MockCDMFactory::persistentStateRequirement):
1733 (WebCore::MockCDMFactory::setPersistentStateRequirement):
1734 * testing/MockCDMFactory.idl: Added.
1736 Move the MediaKeySessionType definition out of the MediaKeys.idl file and into its own.
1737 Move the MediaKeysRequiriment definition out of the MediaKeySystemConfiguration.idl file
1738 and into its own. Generally fix up the .idl files so that they properly work with their
1739 implementation files.
1741 * Modules/encryptedmedia/MediaKeySessionType.idl: Added.
1742 * Modules/encryptedmedia/MediaKeySystemAccess.cpp:
1743 (WebCore::MediaKeySystemAccess::create):
1744 (WebCore::MediaKeySystemAccess::MediaKeySystemAccess):
1745 (WebCore::MediaKeySystemAccess::keySystem): Deleted.
1746 (WebCore::MediaKeySystemAccess::getConfiguration): Deleted.
1747 * Modules/encryptedmedia/MediaKeySystemAccess.h:
1748 (WebCore::MediaKeySystemAccess::keySystem):
1749 (WebCore::MediaKeySystemAccess::getConfiguration):
1750 (WebCore::MediaKeySystemAccess::create): Deleted.
1751 * Modules/encryptedmedia/MediaKeySystemAccess.idl:
1752 * Modules/encryptedmedia/MediaKeySystemConfiguration.h:
1753 * Modules/encryptedmedia/MediaKeySystemConfiguration.idl:
1754 * Modules/encryptedmedia/MediaKeySystemMediaCapability.idl:
1755 * Modules/encryptedmedia/MediaKeys.idl:
1756 * Modules/encryptedmedia/MediaKeysRequirement.idl: Added.
1757 * Modules/encryptedmedia/MediaKeysRestrictions.h: Added.
1758 * bindings/js/JSMediaKeySystemAccessCustom.cpp: Removed.
1760 As some of these enums are referenced in the Internals project, they need to be exported
1761 from WebCore correctly. Teach the code generator how to export the symbols generated by
1764 * bindings/scripts/CodeGeneratorJS.pm:
1765 (GenerateEnumerationHeaderContent):
1767 Add new files to the project.
1770 * DerivedSources.make:
1771 * WebCore.xcodeproj/project.pbxproj:
1773 2016-12-17 Darin Adler <darin@apple.com>
1775 Remove WebCore::Dictionary, which is now unused
1776 https://bugs.webkit.org/show_bug.cgi?id=165988
1778 Reviewed by Andreas Kling.
1780 * CMakeLists.txt: Removed the files.
1781 * WebCore.xcodeproj/project.pbxproj: Ditto.
1782 * bindings/js/Dictionary.cpp: Removed.
1783 * bindings/js/Dictionary.h: Removed.
1784 * bindings/js/JSBindingsAllInOne.cpp: Removed include of Dictionary.cpp.
1786 2016-12-17 Youenn Fablet <youenn@apple.com>
1788 Cloned CachedResource should not have an empty response
1789 https://bugs.webkit.org/show_bug.cgi?id=165947
1791 Reviewed by Sam Weinig.
1793 Test: http/tests/loading/reusing-cached-stylesheet-from-different-domain.html
1795 * loader/cache/CachedResource.cpp:
1796 (WebCore::CachedResource::setBodyDataFrom): Copying the response to the cloned resource.
1797 Even though the issue is appearing for stylesheets only, it is safer to do that for all cloned ressources.
1799 2016-12-16 Brady Eidson <beidson@apple.com>
1801 IndexedDB: Refactor SQLiteIDBCursor to prepare for cursor prefetching.
1802 https://bugs.webkit.org/show_bug.cgi?id=165978
1804 Reviewed by Alex Christensen.
1806 No new tests (Refactor, no behavior change).
1808 In preparation for cursor prefetching, we need to shift the cursor off of keeping "the current record"
1809 and onto keeping "a deque of fetched records", the first of which is "the current record".
1811 This patch does just that, but with no behavior change; The deque only ever holds 0 or 1 records.
1813 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1814 (WebCore::IDBServer::SQLiteIDBCursor::currentData):
1815 (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
1816 (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
1817 (WebCore::IDBServer::SQLiteIDBCursor::prefetch):
1818 (WebCore::IDBServer::SQLiteIDBCursor::advance):
1819 (WebCore::IDBServer::SQLiteIDBCursor::fetch):
1820 (WebCore::IDBServer::SQLiteIDBCursor::fetchNextRecord):
1821 (WebCore::IDBServer::SQLiteIDBCursor::markAsErrored):
1822 (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
1823 (WebCore::IDBServer::SQLiteIDBCursor::iterate):
1824 (WebCore::IDBServer::SQLiteIDBCursor::currentKey):
1825 (WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
1826 (WebCore::IDBServer::SQLiteIDBCursor::currentValue):
1827 (WebCore::IDBServer::SQLiteIDBCursor::didComplete):
1828 (WebCore::IDBServer::SQLiteIDBCursor::didError):
1829 (WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID):
1830 (WebCore::IDBServer::SQLiteIDBCursor::advanceUnique): Deleted.
1831 (WebCore::IDBServer::SQLiteIDBCursor::advanceOnce): Deleted.
1832 (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce): Deleted.
1834 * Modules/indexeddb/server/SQLiteIDBCursor.h:
1835 (WebCore::IDBServer::SQLiteIDBCursor::SQLiteCursorRecord::isTerminalRecord):
1836 (WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID): Deleted.
1837 (WebCore::IDBServer::SQLiteIDBCursor::currentKey): Deleted.
1838 (WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey): Deleted.
1839 (WebCore::IDBServer::SQLiteIDBCursor::currentValue): Deleted.
1840 (WebCore::IDBServer::SQLiteIDBCursor::didComplete): Deleted.
1841 (WebCore::IDBServer::SQLiteIDBCursor::didError): Deleted.
1843 2016-12-16 Darin Adler <darin@apple.com>
1845 Remove all custom bindings from media streams, using dictionaries instead
1846 https://bugs.webkit.org/show_bug.cgi?id=165943
1848 Reviewed by Sam Weinig.
1850 * CMakeLists.txt: Added and removed files.
1851 * DerivedSources.make: Ditto.
1853 * Modules/mediastream/DoubleRange.h: Added. Moved dictionary here so it can be shared
1854 by both MediaStreamTrack and MediaTrackSupportedConstraints.
1855 * Modules/mediastream/DoubleRange.idl: Ditto.
1856 * Modules/mediastream/LongRange.h: Ditto.
1857 * Modules/mediastream/LongRange.idl: Ditto.
1859 * Modules/mediastream/MediaDevices.cpp:
1860 (WebCore::MediaDevices::getSupportedConstraints): Changed to return a struct instead
1861 of a reference counted object.
1862 * Modules/mediastream/MediaDevices.h: Updated for the above.
1863 * Modules/mediastream/MediaDevices.idl: Added a conditional on the dictionary in this
1864 file; not needed because the conditional on the interface automatically affects the
1865 entire fiel, but for now the style seems to be to put these on all the dictionaries.
1867 * Modules/mediastream/MediaSourceSettings.cpp: Removed.
1868 * Modules/mediastream/MediaSourceSettings.h: Removed.
1870 * Modules/mediastream/MediaStreamTrack.cpp:
1871 (WebCore::MediaStreamTrack::getSettings): Changed to return a struct instead of a
1872 reference counted object.
1873 (WebCore::capabilityDoubleRange): Added. Helper for getCapabilities.
1874 (WebCore::capabilityIntRange): Ditto.
1875 (WebCore::capabilityStringVector): Ditto.
1876 (WebCore::capabilityBooleanVector): Ditto.
1877 (WebCore::MediaStreamTrack::getCapabilities): Changed to return a struct instead
1878 of a reference counted object.
1879 * Modules/mediastream/MediaStreamTrack.h: Updated for the above changes. Also
1880 defined the structs here in the class.
1881 * Modules/mediastream/MediaStreamTrack.idl: Defined the two dictionaries here and
1882 changed the functions to return them and not use [Custom] any more.
1884 * Modules/mediastream/MediaTrackConstraints.h: Moved DoubleRange and LongRange out
1885 of this file and into their own headers. Also removed the currently unimplemented
1886 latency and channelCount; there are FIXME comments in the IDL file about eventually
1887 adding these to match the specification.
1888 * Modules/mediastream/MediaTrackConstraints.idl: Added conditionals, and removed
1889 the unimplemented latency and channelCount.
1890 style of marking everything consistently.
1892 * Modules/mediastream/MediaTrackSupportedConstraints.h: Replaced this class with
1894 * Modules/mediastream/MediaTrackSupportedConstraints.idl: Replaced this interface
1897 * WebCore.xcodeproj/project.pbxproj: Added and removed files.
1899 * bindings/js/JSMediaStreamTrackCustom.cpp: Removed.
1900 * bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp: Removed.
1902 * platform/mediastream/MediaStreamTrackPrivate.cpp: Removed include of the
1903 MediaSourceSettings.h header.
1904 * platform/mediastream/MediaStreamTrackPrivate.h: Removed forward declaration of
1905 the MediaSourceSettings class.
1907 2016-12-16 Zalan Bujtas <zalan@apple.com>
1909 Possible nullptr dereference when applying pagination to viewport
1910 https://bugs.webkit.org/show_bug.cgi?id=165926
1912 Reviewed by Simon Fraser.
1914 Static analysis found a code path where a null dereference could occur.
1916 * page/FrameView.cpp:
1917 (WebCore::FrameView::applyPaginationToViewport):
1919 2016-12-16 Ryan Haddad <ryanhaddad@apple.com>
1921 Fix the Windows build.
1923 Unreviewed build fix.
1925 * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
1927 2016-12-16 Ryan Haddad <ryanhaddad@apple.com>
1929 Yet another attempt to fix the Windows build after r209936.
1931 Unreviewed build fix.
1933 * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
1935 2016-12-16 Alex Christensen <achristensen@webkit.org>
1937 Use initEvent quirk added in r207908 for Flipboard
1938 https://bugs.webkit.org/show_bug.cgi?id=165974
1939 <rdar://problem/28264190>
1941 Reviewed by Chris Dumez.
1944 (WebCore::Event::initEventForBindings):
1945 * platform/RuntimeApplicationChecks.h:
1946 * platform/RuntimeApplicationChecks.mm:
1947 (WebCore::IOSApplication::isFlipboard):
1948 Flipboard also has JavaScript content that calls initEvent with not enough arguments.
1950 2016-12-16 Chris Dumez <cdumez@apple.com>
1952 [iOS] Align HTML from validation popover style with Copy/Paste callout bar
1953 https://bugs.webkit.org/show_bug.cgi?id=165973
1954 <rdar://problem/29336638>
1956 Reviewed by Simon Fraser.
1958 Tweak font size and padding of the HTML from validation popover to
1959 match the style of the Copy/Paste callout bar on iOS.
1961 * platform/ios/ValidationBubbleIOS.mm:
1962 (WebCore::ValidationBubble::ValidationBubble):
1964 2016-12-16 Ryan Haddad <ryanhaddad@apple.com>
1966 Another attempt to fix the Windows build after r209936.
1968 Unreviewed build fix.
1972 2016-12-16 Andy Estes <aestes@apple.com>
1974 Add a setting to suppress keyboard input during provisional navigation
1975 https://bugs.webkit.org/show_bug.cgi?id=165830
1977 Reviewed by Brent Fulgham.
1979 Added a setting that suppresses keyboard input during provisional navigation. When the
1980 setting is enabled, DOM propogation of keyboard input events (KeyboardEvents,
1981 CompositionEvents, InputEvents, and some TextEvents) is suppressed, and text insertion is
1982 disabled in the editor.
1984 Non-editing default event handling still occurs, for instance keyboard scrolling, access
1985 keys, and focus navigation.
1987 Test: http/tests/navigation/keyboard-events-during-provisional-navigation.html
1989 * dom/CompositionEvent.h: Added a type trait specialization.
1990 * dom/EventDispatcher.cpp:
1991 (WebCore::shouldSuppressEventDispatchInDOM): Added. Returns true if the event is trusted,
1992 FrameLoader::shouldSuppressKeyboardInput() returns true, and the event is a
1993 CompositionEvent, InputEvent, KeyboardEvent, or keyboard/composition TextEvent.
1994 (WebCore::EventDispatcher::dispatchEvent): Called stopPropogation() on the event if
1995 shouldSuppressEventDispatchInDOM() returns true.
1996 * dom/InputEvent.h: Removed the inline no-op destructor so that DataTransfer does not need
1997 to be a complete type in every translation unit that includes this header. Added a type
1998 trait specialization.
1999 * dom/TextEvent.h: Added isKeyboard() to determine if m_inputType is TextEventInputKeyboard.
2000 * editing/Editor.cpp:
2001 (WebCore::Editor::shouldInsertText): Returned false if
2002 FrameLoader::shouldSuppressKeyboardInput() returns true and the action is
2003 EditorInsertActionTyped.
2004 * loader/FrameLoader.cpp:
2005 (WebCore::FrameLoader::shouldSuppressKeyboardInput): Added. Returns true if
2006 Settings::shouldSuppressKeyboardInputDuringProvisionalNavigation() returns true and the
2007 state is FrameStateProvisional.
2008 * loader/FrameLoader.h: Declared shouldSuppressKeyboardInput().
2009 * page/EventHandler.h: Exported accessKeyModifiers().
2010 * page/Settings.in: Defined shouldSuppressKeyboardInputDuringProvisionalNavigation with an
2011 initial value of false.
2012 * testing/Internals.cpp:
2013 (WebCore::Internals::accessKeyModifiers): Added. Returns a vector of strings representing
2014 the access key modifiers.
2015 * testing/Internals.h: Declared accessKeyModifiers().
2016 * testing/Internals.idl: Exposed accessKeyModifiers() on the internals object.
2018 2016-12-16 Brady Eidson <beidson@apple.com>
2020 More SQLiteIDBCursor refactoring.
2021 https://bugs.webkit.org/show_bug.cgi?id=165956
2023 Reviewed by Tim Horton.
2025 No new tests (No behavior change).
2027 This is a simple patch that encapsulates the current state of the cursor in one structure
2028 which will allow for storing multiple-such states in the future (to support prefetching).
2030 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
2031 (WebCore::IDBServer::SQLiteIDBCursor::currentData):
2032 (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
2033 (WebCore::IDBServer::SQLiteIDBCursor::advance):
2034 (WebCore::IDBServer::SQLiteIDBCursor::advanceUnique):
2035 (WebCore::IDBServer::SQLiteIDBCursor::markAsErrored):
2036 (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
2037 (WebCore::IDBServer::SQLiteIDBCursor::iterate):
2039 * Modules/indexeddb/server/SQLiteIDBCursor.h:
2040 (WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID):
2041 (WebCore::IDBServer::SQLiteIDBCursor::currentKey):
2042 (WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
2043 (WebCore::IDBServer::SQLiteIDBCursor::currentValue):
2044 (WebCore::IDBServer::SQLiteIDBCursor::didComplete):
2045 (WebCore::IDBServer::SQLiteIDBCursor::didError):
2047 2016-12-16 Jer Noble <jer.noble@apple.com>
2049 Follow-up build fix after r209936; also rename MockCDM -> LegacyMockCDM in
2054 2016-12-16 Sam Weinig <sam@webkit.org>
2056 [Bindings] Remove use of Dictionary/ArrayValue in CDMSessionClearKey
2057 https://bugs.webkit.org/show_bug.cgi?id=165961
2059 Reviewed by Darin Adler.
2062 * WebCore.xcodeproj/project.pbxproj:
2063 * bindings/js/JSBindingsAllInOne.cpp:
2064 Remove ArrayValue.h/cpp
2066 * bindings/js/ArrayValue.cpp: Removed.
2067 * bindings/js/ArrayValue.h: Removed.
2069 * bindings/js/Dictionary.cpp:
2070 * bindings/js/Dictionary.h:
2071 Remove support for ArrayValue.
2073 * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
2074 (WebCore::CDMSessionClearKey::update):
2075 Replace use of Dictionary/ArrayValue with direct JSObject functions. This
2076 should really be replaced with a JSON parser that does not require round
2077 tripping through JavaScript objects.
2079 2016-12-13 Jer Noble <jer.noble@apple.com>
2081 Move existing CDM* implementations into modules/encryptedmedia/legacy
2082 https://bugs.webkit.org/show_bug.cgi?id=165823
2084 Rubber-stamped by Sam Weinig.
2086 * Modules/encryptedmedia/legacy/LegacyCDM.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDM.cpp.
2087 (WebCore::CDMFactory::CDMFactory):
2088 (WebCore::installedCDMFactories):
2089 (WebCore::CDM::registerCDMFactory):
2090 (WebCore::CDMFactoryForKeySystem):
2091 (WebCore::CDM::supportsKeySystem):
2092 (WebCore::CDM::keySystemSupportsMimeType):
2093 (WebCore::CDM::create):
2094 (WebCore::CDM::CDM):
2095 (WebCore::CDM::~CDM):
2096 (WebCore::CDM::supportsMIMEType):
2097 (WebCore::CDM::createSession):
2098 (WebCore::CDM::mediaPlayer):
2099 * Modules/encryptedmedia/legacy/LegacyCDM.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDM.h.
2100 (WebCore::CDMClient::~CDMClient):
2101 (WebCore::CDM::keySystem):
2102 (WebCore::CDM::client):
2103 (WebCore::CDM::setClient):
2104 * Modules/encryptedmedia/legacy/LegacyCDMPrivate.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivate.h.
2105 (WebCore::CDMPrivateInterface::CDMPrivateInterface):
2106 (WebCore::CDMPrivateInterface::~CDMPrivateInterface):
2107 * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.cpp.
2108 (WebCore::CDMPrivateClearKey::supportsKeySystem):
2109 (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType):
2110 (WebCore::CDMPrivateClearKey::supportsMIMEType):
2111 (WebCore::CDMPrivateClearKey::createSession):
2112 * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.h.
2113 (WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
2114 (WebCore::CDMPrivateClearKey::~CDMPrivateClearKey):
2115 * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp.
2116 (WebCore::CDMPrivateMediaPlayer::supportsKeySystem):
2117 (WebCore::CDMPrivateMediaPlayer::supportsKeySystemAndMimeType):
2118 (WebCore::CDMPrivateMediaPlayer::supportsMIMEType):
2119 (WebCore::CDMPrivateMediaPlayer::createSession):
2120 * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.h.
2121 (WebCore::CDMPrivateMediaPlayer::CDMPrivateMediaPlayer):
2122 (WebCore::CDMPrivateMediaPlayer::~CDMPrivateMediaPlayer):
2123 (WebCore::CDMPrivateMediaPlayer::cdm):
2124 * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp.
2125 (WebCore::clearKeyVM):
2126 (WebCore::CDMSessionClearKey::CDMSessionClearKey):
2127 (WebCore::CDMSessionClearKey::~CDMSessionClearKey):
2128 (WebCore::CDMSessionClearKey::generateKeyRequest):
2129 (WebCore::CDMSessionClearKey::releaseKeys):
2130 (WebCore::CDMSessionClearKey::update):
2131 (WebCore::CDMSessionClearKey::cachedKeyForKeyID):
2132 * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h.
2133 * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
2134 * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
2135 * WebCore.xcodeproj/project.pbxproj:
2136 * platform/graphics/LegacyCDMSession.h: Renamed from Source/WebCore/platform/graphics/CDMSession.h.
2137 (WebCore::CDMSessionClient::~CDMSessionClient):
2138 (WebCore::CDMSession::CDMSession):
2139 (WebCore::CDMSession::~CDMSession):
2140 (WebCore::CDMSession::type):
2141 (WebCore::CDMSession::cachedKeyForKeyID):
2142 * platform/graphics/MediaPlayer.h:
2143 * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
2144 * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2145 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2146 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
2147 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
2148 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2149 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2150 * testing/Internals.cpp:
2151 * testing/LegacyMockCDM.cpp: Renamed from Source/WebCore/testing/MockCDM.cpp.
2152 (WebCore::MockCDMSession::~MockCDMSession):
2153 (WebCore::MockCDM::supportsKeySystem):
2154 (WebCore::MockCDM::supportsKeySystemAndMimeType):
2155 (WebCore::MockCDM::supportsMIMEType):
2156 (WebCore::MockCDM::createSession):
2157 (WebCore::initDataPrefix):
2158 (WebCore::keyPrefix):
2159 (WebCore::keyRequest):
2160 (WebCore::generateSessionId):
2161 (WebCore::MockCDMSession::MockCDMSession):
2162 (WebCore::MockCDMSession::generateKeyRequest):
2163 (WebCore::MockCDMSession::releaseKeys):
2164 (WebCore::MockCDMSession::update):
2165 * testing/LegacyMockCDM.h: Renamed from Source/WebCore/testing/MockCDM.h.
2166 (WebCore::MockCDM::MockCDM):
2167 (WebCore::MockCDM::~MockCDM):
2169 2016-12-16 Andreas Kling <akling@apple.com>
2171 Subframes going into page cache don't need to resetScrollbars().
2172 <https://webkit.org/b/163750>
2173 <rdar://problem/29273020>
2175 Reviewed by Antti Koivisto.
2177 The main frame is the only frame that switches its FrameView when using the page cache,
2178 subframes just suspend their DOM and wait around to be either killed or restored.
2180 Thus there is no reason for subframes to reset their FrameView's scrollbars when going
2181 into page cache, since nothing affects them while cached, and their layout should end up
2182 identical when restoring.
2184 This was causing some flakiness with subframe scrollbars jumping between different sizes
2185 in when restoring from page cache in macOS/WK1. This change makes the behavior consistent
2186 in both WK1 and WK2, and removes the flakiness.
2189 (WebCore::Document::setPageCacheState):
2191 2016-12-16 Wenson Hsieh <wenson_hsieh@apple.com>
2193 Visual viewports: carets and selection UI are incorrectly positioned when editing fixed elements
2194 https://bugs.webkit.org/show_bug.cgi?id=165767
2195 <rdar://problem/29602382>
2197 Reviewed by Simon Fraser.
2199 When changing the layout viewport override, mark viewport-constrained objects as needing layout. If only the
2200 width and height of the old and new layout viewports are compared, EditorState info (namely selection and caret
2201 rects) that depends on the document location of fixed elements may be stale immediately after the layout
2202 viewport override changes and before layout occurs.
2204 This caused one of the tests (fixed-caret-position-after-scroll.html) to occasionally fail.
2206 Tests: editing/caret/ios/absolute-caret-position-after-scroll.html
2207 editing/caret/ios/fixed-caret-position-after-scroll.html
2208 editing/selection/ios/absolute-selection-after-scroll.html
2209 editing/selection/ios/fixed-selection-after-scroll.html
2211 * page/FrameView.cpp:
2212 (WebCore::FrameView::setLayoutViewportOverrideRect):
2214 2016-12-14 Sam Weinig <sam@webkit.org>
2216 [ApplePay] Remove remaining custom bindings from the ApplePay code
2217 https://bugs.webkit.org/show_bug.cgi?id=165860
2219 Reviewed by Darin Adler.
2221 * DerivedSources.make:
2224 * WebCore.xcodeproj/project.pbxproj:
2227 * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: Removed.
2228 * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: Removed.
2229 * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: Removed.
2230 * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: Removed.
2231 Remove custom bindings.
2233 * Modules/applepay/ApplePayLineItem.h: Added.
2234 * Modules/applepay/ApplePayLineItem.idl: Added.
2235 * Modules/applepay/ApplePayPayment.h: Added.
2236 * Modules/applepay/ApplePayPayment.idl: Added.
2237 * Modules/applepay/ApplePayPaymentContact.h: Added.
2238 * Modules/applepay/ApplePayPaymentContact.idl: Added.
2239 * Modules/applepay/ApplePayPaymentMethod.h: Added.
2240 * Modules/applepay/ApplePayPaymentMethod.idl: Added.
2241 * Modules/applepay/ApplePayPaymentPass.h: Added.
2242 * Modules/applepay/ApplePayPaymentPass.idl: Added.
2243 * Modules/applepay/ApplePayPaymentRequest.h: Added.
2244 * Modules/applepay/ApplePayPaymentRequest.idl: Added.
2245 * Modules/applepay/ApplePayShippingMethod.h: Added.
2246 * Modules/applepay/ApplePayShippingMethod.idl: Added.
2247 Split out dictionaries and enums into separate files where needed.
2249 * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
2250 (WebCore::ApplePayPaymentAuthorizedEvent::ApplePayPaymentAuthorizedEvent):
2251 * Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
2252 * Modules/applepay/ApplePayPaymentAuthorizedEvent.idl:
2253 Convert the 'payment' property to return an ApplePayPayment dictionary, removing
2254 the need for custom bindings.
2256 * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
2257 (WebCore::ApplePayPaymentMethodSelectedEvent::ApplePayPaymentMethodSelectedEvent):
2258 * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
2259 * Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl:
2260 Convert the 'paymentMethod' property to return an ApplePayPaymentMethod dictionary, removing
2261 the need for custom bindings.
2263 * Modules/applepay/ApplePaySession.cpp:
2264 (WebCore::convertAndValidate):
2265 (WebCore::ApplePaySession::create):
2266 (WebCore::ApplePaySession::ApplePaySession):
2267 (WebCore::ApplePaySession::completeShippingMethodSelection):
2268 (WebCore::ApplePaySession::completeShippingContactSelection):
2269 (WebCore::ApplePaySession::completePaymentMethodSelection):
2270 (WebCore::ApplePaySession::didSelectShippingMethod):
2271 * Modules/applepay/ApplePaySession.h:
2272 Update for new names, remove need for ExecState in the create function, and simplify
2273 billingContact and shippingContact now that they are strongly typed.
2275 * Modules/applepay/ApplePaySession.idl:
2276 Move dictionaries and enums to their own files.
2278 * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
2279 (WebCore::ApplePayShippingContactSelectedEvent::ApplePayShippingContactSelectedEvent):
2280 * Modules/applepay/ApplePayShippingContactSelectedEvent.h:
2281 * Modules/applepay/ApplePayShippingContactSelectedEvent.idl:
2282 Convert the 'shippingContact' property to return an ApplePayPaymentContact dictionary, removing
2283 the need for custom bindings.
2285 * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
2286 * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
2287 * Modules/applepay/ApplePayShippingMethodSelectedEvent.idl:
2288 Convert the 'shippingMethod' property to return an ApplePayShippingMethod dictionary, removing
2289 the need for custom bindings.
2291 * Modules/applepay/Payment.h:
2292 * Modules/applepay/PaymentContact.h:
2293 * Modules/applepay/PaymentMethod.h:
2294 * Modules/applepay/cocoa/PaymentCocoa.mm:
2295 * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2296 * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
2297 Replace toJS/fromJS functions with ones that convert to/from the associated dictionary type.
2299 * bindings/generic/IDLTypes.h:
2300 (WebCore::IDLJSON::nullValue):
2301 (WebCore::IDLJSON::isNullValue):
2302 (WebCore::IDLJSON::extractValueFromNullable):
2303 * bindings/js/JSDOMConvert.h:
2304 (WebCore::Converter<IDLJSON>::convert):
2305 (WebCore::JSConverter<IDLJSON>::convert):
2306 Add a new custom type, JSON, which converts from a String to a JS object.
2308 * bindings/scripts/CodeGenerator.pm:
2309 * bindings/scripts/CodeGeneratorJS.pm:
2310 Add support for the new JSON type, and improve scoped naming to allow for enums
2311 in dictionary only IDL files.
2313 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
2314 Update test result for improved scoped naming.
2316 2016-12-16 Zalan Bujtas <zalan@apple.com>
2318 Defer certain accessibility callbacks until after layout is finished.
2319 https://bugs.webkit.org/show_bug.cgi?id=165861
2320 rdar://problem/29646301
2322 Reviewed by Chris Fleizach.
2324 Currently with certain AXObjectCache callbacks, we can end up in a layout while the render tree is being mutated.
2325 This patch ensures that such callbacks are deferred until after tree mutation/layout is finished.
2327 Test: accessibility/accessibility-crash-with-dynamic-inline-content.html
2329 * accessibility/AXObjectCache.cpp:
2330 (WebCore::AXObjectCache::remove):
2331 (WebCore::AXObjectCache::performDeferredIsIgnoredChange):
2332 (WebCore::AXObjectCache::insertDeferredIsIgnoredChange):
2333 * accessibility/AXObjectCache.h:
2334 * page/FrameView.cpp:
2335 (WebCore::FrameView::performPostLayoutTasks):
2336 * rendering/RenderBlock.cpp:
2337 (WebCore::RenderBlock::deleteLines):
2338 * rendering/RenderBlockLineLayout.cpp:
2339 (WebCore::RenderBlockFlow::createAndAppendRootInlineBox):
2341 2016-12-16 Ryan Haddad <ryanhaddad@apple.com>
2343 Rebaseline bindings tests after r209897.
2345 Unreviewed test gardening.
2347 * bindings/scripts/test/JS/JSTestObj.cpp:
2348 (WebCore::JSTestObj::visitChildren):
2349 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2350 (WebCore::JSTestSerializedScriptValueInterface::visitChildren):
2352 2016-12-15 Brent Fulgham <bfulgham@apple.com>
2354 Arguments called in wrong order
2355 https://bugs.webkit.org/show_bug.cgi?id=165923
2357 Reviewed by Simon Fraser.
2359 Correct the ordering of several function calls.
2361 * Modules/mediasource/SourceBuffer.cpp:
2362 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): The 'nearestToPresentationStartTime'
2363 argument is being checked for validity, but 'nearestToPresentationEndTime' is being used in the
2364 calculation. This seems like a copy/paste error.
2365 * page/PrintContext.cpp:
2366 (WebCore::PrintContext::outputLinkedDestinations): FloatPoint::expandedTo returns a new object that
2367 has been expanded. This code continued using the 'unexpanded' point.
2368 * platform/graphics/GraphicsContext3D.cpp:
2369 (WebCore::GraphicsContext3D::computeImageSizeInBytes): The 'bytesPerComponent' and 'componentsPerPixel'
2370 variables were being passed in the wrong order.
2371 * platform/network/CacheValidation.cpp: The 'last-modified' header string was being concatenated with
2372 the following string, resulting in an incorrect 'last-modifiedproxy-authenticate' string value.
2373 * svg/SVGToOTFFontConversion.cpp:
2374 (WebCore::SVGToOTFFontConverter::firstGlyph): The ASSERT was assigning to the (by-value) input
2375 parameter 'codePoint', rather than comparing it to the firstGlyph value's codePoint.
2377 2016-12-16 Youenn Fablet <youenn@apple.com>
2379 [Fetch API] Improve resource loading console logging
2380 https://bugs.webkit.org/show_bug.cgi?id=160546
2382 Reviewed by Alex Christensen.
2384 Covered by rebased tests.
2386 Adding support for logging of resource loading failures in ThreadableLoader.
2387 This will allow doing consistent logging for clients such as fetch, XHR, event source...
2389 Doing logging for Fetch API only at the moment in ThreadableLoader.
2390 Future patches should migrate XHR to this logging system.
2392 Logging routine is implemented in ThreadableLoader.
2393 It is used directly by DocumentThreadableLoader before calling didFail client callback.
2394 DocumentThreadableLoader has a new option to not log errors, in the case the client is WorkerThreadableLoader::MainBridge.
2395 In that case, the logging is done in the worker context within WorkerThreadableLoader::MainBridge::didFail
2397 * loader/DocumentThreadableLoader.cpp:
2398 (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Enable logging.
2399 (WebCore::DocumentThreadableLoader::create): Passing logging parameter to constructor.
2400 (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Adding initialization of logging parameter.
2401 (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Making use of the new logErrorAndFail helper routine.
2402 (WebCore::DocumentThreadableLoader::cancel): No need to log error if it is being cancelled.
2403 (WebCore::DocumentThreadableLoader::redirectReceived): Made the reportXX routines methods of DocumentThreadableLoaders and using logErrorAndFail internally.
2404 (WebCore::DocumentThreadableLoader::didFail): Wrapper around logErrorAndFail since cancel is not calling it anymore.
2405 (WebCore::DocumentThreadableLoader::preflightFailure):
2406 (WebCore::DocumentThreadableLoader::loadRequest):
2407 (WebCore::DocumentThreadableLoader::reportRedirectionWithBadScheme):
2408 (WebCore::DocumentThreadableLoader::reportContentSecurityPolicyError):
2409 (WebCore::DocumentThreadableLoader::reportCrossOriginResourceSharingError):
2410 (WebCore::DocumentThreadableLoader::logErrorAndFail):
2411 (WebCore::reportContentSecurityPolicyError): Deleted.
2412 (WebCore::reportCrossOriginResourceSharingError): Deleted.
2413 (WebCore::reportRedirectionWithBadScheme): Deleted.
2414 * loader/DocumentThreadableLoader.h:
2415 * loader/ThreadableLoader.cpp:
2416 (WebCore::ThreadableLoader::logError):
2417 * loader/ThreadableLoader.h:
2418 * loader/ThreadableLoaderClientWrapper.h:
2419 (WebCore::ThreadableLoaderClientWrapper::create):
2420 (WebCore::ThreadableLoaderClientWrapper::initiator):
2421 (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
2422 * loader/WorkerThreadableLoader.cpp:
2423 (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
2424 (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2425 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
2427 2016-12-16 Enrique Ocaña González <eocanha@igalia.com>
2429 [GStreamer][MSE] Fix build warning in MediaPlayerPrivateGStreamer.cpp using gcc 6.2
2430 https://bugs.webkit.org/show_bug.cgi?id=165900
2432 Reviewed by Žan Doberšek.
2434 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2435 (WebCore::MediaPlayerPrivateGStreamerMSE::supportsCodecs):
2436 Move the variable asignation out of the if condition.
2438 2016-12-16 Romain Bellessort <romain.bellessort@crf.canon.fr>
2440 [Readable Streams API] Implement ReadableByteStreamController cancel internal method
2441 https://bugs.webkit.org/show_bug.cgi?id=165798
2443 Reviewed by Youenn Fablet.
2445 Implemented cancel method of ReadableByteStreamController.
2446 Also fixed small inconsistency in readableByteStreamControllerClose.
2448 Added one test to check cancel behaviour. More tests may be added as the API is implemented.
2450 * Modules/streams/ReadableByteStreamInternals.js:
2451 (privateInitializeReadableByteStreamController): Define cancel internal method.
2452 (readableByteStreamControllerCancel): Added.
2453 (readableByteStreamControllerClose): Fixed behaviour (no value should be dequeued).
2454 * bindings/js/WebCoreBuiltinNames.h: Removed bytesFilled (previous addition was not needed).
2456 2016-12-16 Youenn Fablet <youennf@gmail.com>
2458 svg/as-image/svg-image-with-data-uri-use-data-uri.svg is flaky after r207754
2459 https://bugs.webkit.org/show_bug.cgi?id=163887
2460 <rdar://problem/29266436>
2462 Reviewed by Alex Christensen.
2464 Test: http/tests/security/cross-origin-cached-images-with-memory-pressure.html
2466 With the introduction of cached resource cloning, an Image may be referenced by several CachedImage.
2467 This did not work well with Image observer system as it mandates a one-to-one relationship.
2469 Introducing CachedImageObserver to restore the one-to-one relationship between Image and its observer.
2470 CachedImageObserver can keep references for more than one CachedImage.
2472 In the future, it might be better to split more clearly CachedImageObserver and its API from CachedImage.
2473 Or remove the concept of CachedResource cloning and find new ways to provide CachedResource origin information to clients.
2475 * loader/cache/CachedImage.cpp:
2476 (WebCore::CachedImage::load): Moved boolean image observer fields to CachedImageObserver.
2477 (WebCore::CachedImage::setBodyDataFrom): Keeping a reference of the image observer when cloning the resource.
2478 (WebCore::CachedImage::createImage): Creating the observer when creating the image.
2479 (WebCore::CachedImage::CachedImageObserver::CachedImageObserver):
2480 (WebCore::CachedImage::CachedImageObserver::decodedSizeChanged):
2481 (WebCore::CachedImage::CachedImageObserver::didDraw):
2482 (WebCore::CachedImage::CachedImageObserver::animationAdvanced):
2483 (WebCore::CachedImage::CachedImageObserver::changedInRect):
2484 (WebCore::CachedImage::clearImage):
2485 * loader/cache/CachedImage.h:
2486 * loader/cache/CachedResource.cpp:
2487 (WebCore::CachedResource::setBodyDataFrom): Now that each cached image receives decodedSizeChanged callback, we need to set its size correctly.
2489 2016-12-15 Joonghun Park <jh718.park@samsung.com>
2491 [EFL] Fix debug build break since r209873. Unreviewed.
2492 https://bugs.webkit.org/show_bug.cgi?id=165945
2494 No new tests, no new behaviours.
2496 Use Primitive System Data Type uint64_t instead of unsigned long long.
2498 * Modules/indexeddb/IDBFactory.cpp:
2499 (WebCore::IDBFactory::openInternal):
2500 * Modules/indexeddb/IDBFactory.h:
2502 2016-12-15 Zalan Bujtas <zalan@apple.com>
2504 text-align: justify and word-spacing combine to overflow column
2505 https://bugs.webkit.org/show_bug.cgi?id=165796
2506 rdar://problem/29672168
2508 Reviewed by Myles C. Maxfield.
2510 The value of the word-spacing property is not applied on the inline-tree boxes (normal line layout)
2511 with kerning enabled. It causes hittest failures and selection/rendering glitches.
2512 We normally use the pre-computed 'WordMeasurements' values to figure out the run widths. However
2513 with kerning on, in some cases we need to re-measure a certain part of the text by calling RenderText::width().
2514 This function omits the word-spacing value for leading whitespace, so when this text fragment starts with a whitespace,
2515 (while it's not at the beginning of the run) we have to manually add the word-spacing value back.
2516 r146087 added this logic with the restriction of applying it only to whitespace-only runs.
2518 Test: fast/css/word-spacing-with-normal-layout.html
2520 * rendering/RenderBlockLineLayout.cpp:
2521 (WebCore::setLogicalWidthForTextRun):
2523 2016-12-15 Myles C. Maxfield <mmaxfield@apple.com>
2525 Stop reinterpret_casting UBreakIterators to the undefined type TextBreakIterator
2526 https://bugs.webkit.org/show_bug.cgi?id=165931
2528 Reviewed by Alex Christensen.
2530 No new tests because there is no behavior change.
2532 * dom/CharacterData.cpp:
2533 (WebCore::CharacterData::parserAppendData):
2534 * editing/TextCheckingHelper.cpp:
2535 (WebCore::findMisspellings):
2536 * editing/VisibleUnits.cpp:
2537 (WebCore::wordBreakIteratorForMinOffsetBoundary):
2538 (WebCore::wordBreakIteratorForMaxOffsetBoundary):
2539 (WebCore::isLogicalStartOfWord):
2540 (WebCore::islogicalEndOfWord):
2541 (WebCore::visualWordPosition):
2542 (WebCore::startSentenceBoundary):
2543 (WebCore::endSentenceBoundary):
2544 (WebCore::previousSentencePositionBoundary):
2545 (WebCore::nextSentencePositionBoundary):
2546 * html/HTMLInputElement.cpp:
2547 * html/HTMLTextAreaElement.cpp:
2548 * html/InputType.cpp:
2549 * html/TextFieldInputType.cpp:
2550 * html/TextInputType.cpp:
2551 * platform/graphics/StringTruncator.cpp:
2552 (WebCore::textBreakAtOrPreceding):
2553 (WebCore::boundedTextBreakFollowing):
2554 (WebCore::rightClipToWordBuffer):
2555 * platform/graphics/mac/ComplexTextController.cpp:
2556 (WebCore::ComplexTextController::offsetForPosition):
2557 * platform/text/TextBoundaries.cpp:
2558 (WebCore::findNextWordFromIndex):
2559 (WebCore::findWordBoundary):
2560 (WebCore::findEndWordBoundary):
2561 * platform/text/mac/TextBoundaries.mm:
2562 (WebCore::findNextWordFromIndex):
2563 * rendering/BreakLines.h:
2564 (WebCore::nextBreakablePositionNonLoosely):
2565 (WebCore::nextBreakablePositionLoosely):
2566 * rendering/RenderBlock.cpp:
2567 * rendering/RenderText.cpp:
2568 (WebCore::makeCapitalized):
2569 (WebCore::RenderText::previousOffset):
2570 (WebCore::RenderText::previousOffsetForBackwardDeletion):
2571 (WebCore::RenderText::nextOffset):
2572 * rendering/SimpleLineLayoutTextFragmentIterator.h:
2573 * rendering/line/LineBreaker.h:
2575 2016-12-15 Darin Adler <darin@apple.com>
2577 Use asString instead of toWTFString, toString, or getString when we already checked isString
2578 https://bugs.webkit.org/show_bug.cgi?id=165895
2580 Reviewed by Yusuke Suzuki.
2582 * Modules/fetch/FetchBody.cpp:
2583 (WebCore::FetchBody::extract): Use asString/value instead of toWTFString.
2585 * Modules/mediastream/SDPProcessor.cpp:
2586 (WebCore::SDPProcessor::callScript): Use asString/value instead of getString.
2588 * bindings/js/ArrayValue.cpp:
2589 (WebCore::ArrayValue::get): Use asString/value instead of toWTFString.
2591 * bindings/js/IDBBindingUtilities.cpp:
2592 (WebCore::get): Use asString/length instead of toString/length.
2593 (WebCore::createIDBKeyFromValue): Use asString/value instead of toWTFString.
2594 * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2595 (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier): Ditto.
2596 * bindings/js/JSDataCueCustom.cpp:
2597 (WebCore::constructJSDataCue): Use asString/value instead of getString.
2598 * bindings/js/JSInspectorFrontendHostCustom.cpp:
2599 (WebCore::populateContextMenuItems): Use asString/value instead of toWTFString.
2601 * bindings/js/ScriptController.cpp:
2602 (WebCore::jsValueToModuleKey): Use asString/toIdentifier instead of
2603 jsCast<JSString*>/value/Identifier::fromString.
2605 * bindings/js/SerializedScriptValue.cpp:
2606 (WebCore::CloneSerializer::dumpIfTerminal): Streamline by getting rid of local variable.
2608 * contentextensions/ContentExtensionParser.cpp:
2609 (WebCore::ContentExtensions::getDomainList): Use asString instead of jsCast<JSString*>.
2610 (WebCore::ContentExtensions::loadTrigger): Use asString/value instead of toWTFString.
2611 (WebCore::ContentExtensions::loadAction): Ditto.
2614 (WebCore::FontFace::create): Use asString/value instead of getString.
2616 2016-12-15 Zalan Bujtas <zalan@apple.com>
2618 Change ::computeLogicalHeight's computedValues out argument to the return value.
2619 https://bugs.webkit.org/show_bug.cgi?id=165789
2621 Reviewed by Simon Fraser.
2623 No change in functionality.
2625 * html/shadow/SliderThumbElement.cpp:
2626 (WebCore::RenderSliderContainer::computeLogicalHeight):
2627 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
2628 (WebCore::RenderImageControlsButton::computeLogicalHeight):
2629 * html/shadow/mac/ImageControlsRootElementMac.cpp:
2630 (WebCore::RenderImageControls::computeLogicalHeight):
2631 * rendering/RenderBlock.cpp:
2632 (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2633 (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
2634 * rendering/RenderBlockFlow.cpp:
2635 (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
2636 * rendering/RenderBox.cpp:
2637 (WebCore::RenderBox::updateLogicalHeight):
2638 (WebCore::RenderBox::computeLogicalHeight):
2639 (WebCore::RenderBox::computePercentageLogicalHeight):
2640 (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2641 (WebCore::RenderBox::availableLogicalHeightUsing):
2642 * rendering/RenderBox.h:
2643 (WebCore::RenderBox::ComputedMarginValues::ComputedMarginValues): Deleted.
2644 (WebCore::RenderBox::LogicalExtentComputedValues::LogicalExtentComputedValues): Deleted.
2645 * rendering/RenderFlexibleBox.cpp:
2646 (WebCore::RenderFlexibleBox::mainAxisContentExtent):
2647 * rendering/RenderFlowThread.cpp:
2648 (WebCore::RenderFlowThread::computeLogicalHeight):
2649 * rendering/RenderFlowThread.h:
2650 * rendering/RenderListBox.cpp:
2651 (WebCore::RenderListBox::computeLogicalHeight):
2652 * rendering/RenderListBox.h:
2653 * rendering/RenderMeter.cpp:
2654 (WebCore::RenderMeter::computeLogicalHeight):
2655 * rendering/RenderMeter.h:
2656 * rendering/RenderMultiColumnFlowThread.cpp:
2657 (WebCore::RenderMultiColumnFlowThread::computeLogicalHeight):
2658 * rendering/RenderMultiColumnFlowThread.h:
2659 * rendering/RenderMultiColumnSet.cpp:
2660 (WebCore::RenderMultiColumnSet::computeLogicalHeight):
2661 * rendering/RenderMultiColumnSet.h:
2662 * rendering/RenderProgress.cpp:
2663 (WebCore::RenderProgress::computeLogicalHeight):
2664 * rendering/RenderProgress.h:
2665 * rendering/RenderTextControl.cpp:
2666 (WebCore::RenderTextControl::computeLogicalHeight):
2667 * rendering/RenderTextControl.h:
2668 * rendering/RenderView.cpp:
2669 (WebCore::RenderView::computeLogicalHeight):
2670 * rendering/RenderView.h:
2671 * rendering/svg/RenderSVGForeignObject.cpp:
2672 (WebCore::RenderSVGForeignObject::computeLogicalHeight):
2673 * rendering/svg/RenderSVGForeignObject.h:
2675 2016-12-15 Chris Dumez <cdumez@apple.com>
2677 Make sure HTML validation bubble's state is updated after layout
2678 https://bugs.webkit.org/show_bug.cgi?id=165922
2679 <rdar://problem/29694730>
2681 Reviewed by Simon Fraser.
2683 Make sure HTML validation bubble's state is updated after layout.
2684 In particular, if the validation bubble's associated element has
2685 moved or is no longer visible, we now hide the bubble.
2687 Tests: fast/forms/validation-bubble-disappears-when-input-detached.html
2688 fast/forms/validation-bubble-disappears-when-input-moved.html
2689 fast/forms/validation-bubble-disappears-when-input-no-longer-visible.html
2691 * page/FrameView.cpp:
2692 (WebCore::FrameView::viewportContentsChanged):
2694 (WebCore::Page::updateValidationBubbleStateIfNeeded):
2696 * page/ValidationMessageClient.h:
2698 2016-12-15 Sam Weinig <sam@webkit.org>
2700 [WebIDL] Remove use of Dictionary from JSCryptoAlgorithmDictionary
2701 https://bugs.webkit.org/show_bug.cgi?id=165919
2703 Reviewed by Darin Adler.
2705 * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2706 * bindings/js/JSCryptoAlgorithmDictionary.h:
2707 * bindings/js/JSCryptoOperationData.cpp:
2708 * bindings/js/JSCryptoOperationData.h:
2709 * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
2710 Replace simplistic use of Dictionary with simplistic use of direct JSObject
2711 functions. Also, pass the ExecState by reference.
2713 2016-12-15 Filip Pizlo <fpizlo@apple.com>
2715 Get rid of HeapRootVisitor and make SlotVisitor less painful to use
2716 https://bugs.webkit.org/show_bug.cgi?id=165911
2718 Reviewed by Geoffrey Garen.
2720 No new tests because no new behavior.
2722 This updates WebCore code to new JSC API.
2724 * bindings/js/JSDOMBinding.cpp:
2725 (WebCore::DOMConstructorJSBuiltinObject::visitChildren):
2726 * bindings/js/JSDOMGlobalObject.cpp:
2727 (WebCore::JSDOMGlobalObject::visitChildren):
2728 * bindings/js/JSDOMPromise.h:
2729 (WebCore::DeferredPromise::visitAggregate):
2730 * bindings/js/JSEventListener.cpp:
2731 (WebCore::JSEventListener::visitJSFunction):
2732 * bindings/js/JSWorkerGlobalScopeBase.cpp:
2733 (WebCore::JSWorkerGlobalScopeBase::visitChildren):
2734 * bindings/scripts/CodeGeneratorJS.pm:
2735 (GenerateImplementation):
2737 2016-12-15 Myles C. Maxfield <mmaxfield@apple.com>
2739 Sort Xcode project files
2740 https://bugs.webkit.org/show_bug.cgi?id=165937
2742 Reviewed by Simon Fraser.
2744 No new tests because there is no behavior change.
2746 * WebCore.xcodeproj/project.pbxproj:
2748 2016-12-15 Chris Dumez <cdumez@apple.com>
2750 Move charCode / keyCode / which attributes from UIEvent to KeyboardEvent
2751 https://bugs.webkit.org/show_bug.cgi?id=165904
2753 Reviewed by Sam Weinig.
2755 Move 'charCode' / 'keyCode' attributes from UIEvent to KeyboardEvent and add
2756 'which' to KeyboardEvent to match the specification:
2757 - https://w3c.github.io/uievents/#legacy-interface-KeyboardEvent
2759 We keep a 'which' attribute on UIEvent even though the specification does
2760 not say we should because Firefox and Chrome have 'which' on UIEvent still.
2763 - 'charCode' / 'keyCode' / 'which' on KeyboardEvent only
2766 - 'charCode' / 'keyCode' on KeyboardEvent only
2767 - 'which' on UIEvent only
2770 - 'charCode' / 'keyCode' / 'which' on KeyboardEvent
2771 - 'which' on UIEvent as well
2773 Old WebKit behavior:
2774 - 'charCode' / 'keyCode' / 'which' on UIEvent only
2776 New WebKit behavior:
2777 - 'charCode' / 'keyCode' / 'which' on KeyboardEvent
2778 - 'which' on UIEvent as well
2780 Our new behavior is identical to Chrome, much closer to the specification,
2781 and closer to Firefox as well.
2783 No new tests, updated / rebaselined existing tests.
2785 * dom/KeyboardEvent.cpp:
2786 (WebCore::KeyboardEvent::KeyboardEvent):
2787 (WebCore::KeyboardEvent::keyCode):
2788 (WebCore::KeyboardEvent::charCode):
2789 (WebCore::KeyboardEvent::which):
2790 * dom/KeyboardEvent.h:
2791 * dom/KeyboardEvent.idl:
2792 * dom/MouseEvent.cpp:
2793 (WebCore::MouseEvent::which):
2798 2016-12-15 Brady Eidson <beidson@apple.com>
2800 IndexedDB: Add an "IDBCursorRecord" struct.
2801 https://bugs.webkit.org/show_bug.cgi?id=165929
2803 Reviewed by Alex Christensen.
2805 No new tests (Refactor, no behavior change).
2807 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
2808 (WebCore::IDBServer::SQLiteIDBCursor::currentData):
2809 (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
2810 (WebCore::IDBServer::SQLiteIDBCursor::advanceUnique):
2811 (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
2812 (WebCore::IDBServer::SQLiteIDBCursor::iterate):
2814 * Modules/indexeddb/server/SQLiteIDBCursor.h:
2815 (WebCore::IDBServer::SQLiteIDBCursor::currentKey):
2816 (WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
2817 (WebCore::IDBServer::SQLiteIDBCursor::currentValue):
2819 * Modules/indexeddb/shared/IDBCursorRecord.h: Added.
2820 (WebCore::IDBCursorRecord::encode):
2821 (WebCore::IDBCursorRecord::decode):
2823 * WebCore.xcodeproj/project.pbxproj:
2825 2016-12-15 Keith Rollin <krollin@apple.com>
2827 Refactor Document::suspend/resume
2828 https://bugs.webkit.org/show_bug.cgi?id=165921
2830 Reviewed by Chris Dumez.
2832 Update Document::suspend to call Document::suspendScheduledTasks
2833 rather than duplicating the latter's code within itself. Similar
2834 treatment of Document::resume and Document::resumeScheduledTasks.
2836 No new tests -- no new functionality, just refactoring existing code.
2839 (WebCore::Document::suspend):
2840 (WebCore::Document::resume):
2842 2016-12-15 Alex Christensen <achristensen@webkit.org>
2844 Remove flex and bison build dependencies; commit generated XPath parser
2845 https://bugs.webkit.org/show_bug.cgi?id=165783
2847 Reviewed by Brent Fulgham.
2849 flex and bison are annoying to install and use, especially on Windows.
2850 Since only XPathGrammar uses them and that's not actively developed, let's just check in the one generated file
2851 and make building WebKit easier forever!
2854 * DerivedSources.make:
2855 * WebCore.xcodeproj/project.pbxproj:
2856 * css/makegrammar.pl: Removed.
2857 * xml/XPathGrammar.cpp: Added.
2861 * xml/XPathGrammar.h: Added.
2862 * xml/XPathGrammar.y: Rename TEXT to TEXT_ to fix a build error on Windows. TEXT is already defined.
2864 2016-12-15 Brady Eidson <beidson@apple.com>
2866 Enhance some of the logging statements just added for IndexedDB Operation scheduling.
2868 Rubberstamped by Tim Horton.
2870 No new tests (No behavior change).
2872 * Modules/indexeddb/IDBTransaction.cpp:
2873 (WebCore::IDBTransaction::iterateCursor):
2874 (WebCore::IDBTransaction::requestGetRecord):
2875 (WebCore::IDBTransaction::requestIndexRecord):
2876 (WebCore::IDBTransaction::requestPutOrAdd):
2878 * Modules/indexeddb/shared/IDBCursorInfo.cpp:
2879 (WebCore::IDBCursorInfo::loggingString):
2881 * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
2882 (WebCore::IDBIterateCursorData::loggingString):
2884 2016-12-15 Myles C. Maxfield <mmaxfield@apple.com>
2886 [Cocoa] Implement font-synthesis: small-caps
2887 https://bugs.webkit.org/show_bug.cgi?id=165892
2889 Reviewed by David Hyatt.
2891 The CSS Fonts level 4 spec adds a new value to the "font-synthesis"
2892 property which controls whether or not small-caps is allowed to be
2893 synthesized. Luckily, we already have an implementation of this
2894 straightforward, so the implementation is quite simple.
2896 Tests: css3/font-synthesis-small-caps.html
2897 fast/text/font-synthesis-parsing.html
2899 * css/CSSComputedStyleDeclaration.cpp:
2900 (WebCore::fontSynthesisFromStyle):
2901 * css/StyleBuilderConverter.h:
2902 (WebCore::StyleBuilderConverter::convertFontSynthesis):
2903 * css/parser/CSSPropertyParser.cpp:
2904 (WebCore::consumeFontSynthesis):
2905 * platform/graphics/FontCache.h:
2906 (WebCore::FontDescriptionKey::makeFlagsKey):
2907 * platform/graphics/FontDescription.cpp:
2908 (WebCore::FontDescription::FontDescription):
2909 * platform/graphics/FontDescription.h:
2910 (WebCore::FontCascadeDescription::initialFontSynthesis):
2911 * platform/graphics/mac/ComplexTextController.cpp:
2912 (WebCore::shouldSynthesize):
2913 (WebCore::ComplexTextController::collectComplexTextRuns):
2915 2016-12-15 Brady Eidson <beidson@apple.com>
2917 Add a new Logging Channel for IndexedDB Operation scheduling.
2918 https://bugs.webkit.org/show_bug.cgi?id=165912
2920 Reviewed by Alex Christensen.
2922 No new tests (No behavior change).
2924 * Modules/indexeddb/IDBDatabase.cpp:
2925 (WebCore::IDBDatabase::transaction):
2927 * Modules/indexeddb/IDBFactory.cpp:
2928 (WebCore::IDBFactory::openInternal):
2929 (WebCore::IDBFactory::deleteDatabase):
2931 * Modules/indexeddb/IDBTransaction.cpp:
2932 (WebCore::IDBTransaction::internalAbort):
2933 (WebCore::IDBTransaction::commit):
2934 (WebCore::IDBTransaction::createObjectStore):
2935 (WebCore::IDBTransaction::renameObjectStore):
2936 (WebCore::IDBTransaction::createIndex):
2937 (WebCore::IDBTransaction::renameIndex):
2938 (WebCore::IDBTransaction::doRequestOpenCursor):
2939 (WebCore::IDBTransaction::iterateCursor):
2940 (WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
2941 (WebCore::IDBTransaction::requestGetAllIndexRecords):
2942 (WebCore::IDBTransaction::requestGetRecord):
2943 (WebCore::IDBTransaction::requestIndexRecord):
2944 (WebCore::IDBTransaction::requestCount):
2945 (WebCore::IDBTransaction::requestDeleteRecord):
2946 (WebCore::IDBTransaction::requestClearObjectStore):
2947 (WebCore::IDBTransaction::requestPutOrAdd):
2948 (WebCore::IDBTransaction::deleteObjectStore):
2949 (WebCore::IDBTransaction::deleteIndex):
2951 * Modules/indexeddb/shared/IDBCursorInfo.cpp:
2952 (WebCore::IDBCursorInfo::loggingString):
2953 * Modules/indexeddb/shared/IDBCursorInfo.h:
2955 * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
2956 (WebCore::IDBGetAllRecordsData::loggingString):
2957 * Modules/indexeddb/shared/IDBGetAllRecordsData.h:
2959 * Modules/indexeddb/shared/IDBGetRecordData.cpp:
2960 (WebCore::IDBGetRecordData::loggingString):
2961 * Modules/indexeddb/shared/IDBGetRecordData.h:
2963 * Modules/indexeddb/shared/IDBIndexInfo.cpp:
2964 (WebCore::IDBIndexInfo::condensedLoggingString):
2965 * Modules/indexeddb/shared/IDBIndexInfo.h:
2967 * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
2968 (WebCore::IDBIterateCursorData::loggingString):
2969 * Modules/indexeddb/shared/IDBIterateCursorData.h:
2971 * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
2972 (WebCore::IDBObjectStoreInfo::condensedLoggingString):
2973 * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
2975 * platform/Logging.h:
2977 2016-12-15 Konstantin Tokarev <annulen@yandex.ru>
2979 Added missing override and final specifiers
2980 https://bugs.webkit.org/show_bug.cgi?id=165903
2982 Reviewed by Darin Adler.
2984 No new tests needed.
2986 * Modules/mediastream/OverconstrainedErrorEvent.h:
2987 * bindings/js/JSCallbackData.h:
2988 * bindings/js/JSCustomXPathNSResolver.h:
2989 * bindings/js/JSErrorHandler.h:
2990 * css/StyleRuleImport.h:
2991 * dom/SecurityPolicyViolationEvent.h:
2992 * editing/CreateLinkCommand.h:
2993 * editing/DeleteSelectionCommand.h:
2994 * editing/DictationCommand.h:
2995 * editing/Editor.cpp:
2996 * editing/FormatBlockCommand.h:
2997 * editing/IndentOutdentCommand.h:
2998 * editing/InsertLineBreakCommand.h:
2999 * editing/InsertParagraphSeparatorCommand.h:
3000 * editing/ModifySelectionListLevel.h:
3001 * editing/MoveSelectionCommand.h:
3002 * editing/RemoveFormatCommand.h:
3003 * editing/RemoveNodePreservingChildrenCommand.h:
3004 * editing/ReplaceSelectionCommand.h:
3005 * editing/SimplifyMarkupCommand.h:
3006 * editing/SplitTextNodeContainingElementCommand.h:
3007 * editing/UnlinkCommand.h:
3008 * fileapi/FileReaderLoader.h:
3009 * html/canvas/ANGLEInstancedArrays.h:
3010 * html/canvas/WebGLVertexArrayObjectBase.h:
3011 * loader/SinkDocument.h:
3012 * loader/archive/mhtml/MHTMLArchive.h:
3013 * page/animation/CSSPropertyAnimation.cpp:
3014 * platform/audio/MultiChannelResampler.cpp:
3015 * platform/audio/SincResampler.cpp:
3016 * platform/audio/gstreamer/AudioDestinationGStreamer.h:
3017 * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
3018 * platform/graphics/TextTrackRepresentation.cpp:
3019 * platform/graphics/displaylists/DisplayListItems.h:
3020 * platform/graphics/filters/FEBlend.h:
3021 * platform/graphics/filters/FEColorMatrix.h:
3022 * platform/graphics/filters/FEComponentTransfer.h:
3023 * platform/graphics/filters/FEConvolveMatrix.h:
3024 * platform/graphics/filters/FEDiffuseLighting.h:
3025 * platform/graphics/filters/FEDropShadow.h:
3026 * platform/graphics/filters/FEGaussianBlur.h:
3027 * platform/graphics/filters/FELighting.h:
3028 * platform/graphics/filters/FEMerge.h:
3029 * platform/graphics/filters/FEMorphology.h:
3030 * platform/graphics/filters/FEOffset.h:
3031 * platform/graphics/filters/FESpecularLighting.h:
3032 * platform/graphics/filters/FETile.h:
3033 * platform/graphics/filters/FETurbulence.h:
3034 * platform/graphics/filters/SourceAlpha.h:
3035 * platform/graphics/filters/SourceGraphic.h:
3036 * platform/graphics/opengl/Extensions3DOpenGL.h:
3037 * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
3038 * platform/graphics/texmap/TextureMapperBackingStore.h:
3039 * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
3040 * platform/mock/GeolocationClientMock.h:
3041 * platform/text/TextCodecICU.h:
3042 * platform/text/TextCodecLatin1.h:
3043 * platform/text/TextCodecUTF16.h:
3044 * platform/text/TextCodecUTF8.h:
3045 * platform/text/TextCodecUserDefined.h:
3046 * rendering/RenderFullScreen.cpp:
3047 * storage/StorageEvent.h:
3048 * svg/properties/SVGListProperty.h:
3049 * svg/properties/SVGStaticListPropertyTearOff.h:
3050 * svg/properties/SVGStaticPropertyTearOff.h:
3051 * xml/NativeXPathNSResolver.h:
3052 * xml/XMLHttpRequestProgressEvent.h:
3053 * xml/XMLHttpRequestProgressEventThrottle.h:
3054 * xml/XPathVariableReference.h:
3055 * xml/XSLImportRule.h:
3057 2016-12-15 Chris Dumez <cdumez@apple.com>
3059 Inline Document::existingAXObjectCache()
3060 https://bugs.webkit.org/show_bug.cgi?id=165906
3062 Reviewed by Darin Adler.
3064 Inline Document::existingAXObjectCache() to avoid paying function call
3065 cost in the common case where AX is disabled.
3068 (WebCore::Document::existingAXObjectCacheSlow):
3069 (WebCore::Document::existingAXObjectCache): Deleted.
3071 (WebCore::Document::existingAXObjectCache):
3073 2016-12-15 Ryan Haddad <ryanhaddad@apple.com>
3075 Rebaseline bindings tests after r209864.
3077 Unreviewed test gardening.
3079 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
3080 (WebCore::convertDictionary<DictionaryImplName>):
3082 2016-12-15 Andreas Kling <akling@apple.com>
3084 Always clear RenderLayer backing stores when going into page cache.
3085 <https://webkit.org/b/165901>
3087 Reviewed by Simon Fraser.
3089 We were already doing this for the iOS and GTK+ ports, let's do it everywhere
3090 for consistency, and a bit of memory usage improvement.
3092 This patch just removes the setting and always calls FrameView::clearBackingStores()
3093 when there is composited content going into page cache.
3095 * history/CachedFrame.cpp:
3096 (WebCore::CachedFrame::CachedFrame):
3097 * history/PageCache.h:
3098 (WebCore::PageCache::shouldClearBackingStores): Deleted.
3099 (WebCore::PageCache::setShouldClearBackingStores): Deleted.
3101 2016-12-15 Darin Adler <darin@apple.com>
3103 Remove custom binding for MediaDevices
3104 https://bugs.webkit.org/show_bug.cgi?id=165894
3106 Reviewed by Eric Carlson.
3108 Removes the explicit code to parse the MediaStreamConstraints and
3109 MediaTrackConstraints. Next step could be to change the internal
3110 code to use the structs from bindings directly so we don't need
3111 code to convert to an internal format.
3113 * CMakeLists.txt: Added MediaTrackConstraints.idl and MediaTrackConstraints.cpp,
3114 removed JSMediaDevicesCustom.cpp.
3116 * DerivedSources.make: Added MediaTrackConstraints.idl.
3117 Also sorted list of IDL files and fixed use of tabs.
3119 * Modules/mediastream/MediaDevices.cpp:
3120 (WebCore::createMediaConstraintsImpl): Added.
3121 (WebCore::MediaDevices::getUserMedia): Changed this function to take arguments that
3122 are generated by the bindings script, and call createMediaConstraintsImpl to convert
3123 into the internal data structure.
3124 * Modules/mediastream/MediaDevices.h: Added StreamConstraints struct and changed
3125 getUserMedia to take that as specified in the IDL.
3126 * Modules/mediastream/MediaDevices.idl: Added definition of the MediaStreamConstraints
3127 dictionary. Removed [Custom] from getUserMedia.
3129 * Modules/mediastream/MediaStream.cpp:
3130 (WebCore::MediaStream::MediaStream): Pass a reference to addObserver.
3131 (WebCore::MediaStream::~MediaStream): Pass a rference to removeObserver.
3132 (WebCore::MediaStream::internalAddTrack): Ditto.
3133 (WebCore::MediaStream::internalRemoveTrack): Ditto.
3135 * Modules/mediastream/MediaStreamTrack.cpp:
3136 (WebCore::createMediaConstraintsImpl): Added.
3137 (WebCore::MediaStreamTrack::applyConstraints): Changed to take an optional
3138 MediaTrackConstraints argument and call createMediaConstraintsImpl to convert
3139 into the internal data structure. Also merged the multiple overloads of this
3140 all into a single function, used auto to make the code easier to read, and
3141 moved the code that stores new constrains into the success handling, since the
3142 specification says that's the only case where we should store it.
3143 (WebCore::MediaStreamTrack::addObserver): Take a reference instead of a pointer.
3144 (WebCore::MediaStreamTrack::removeObserver): Ditto.
3145 * Modules/mediastream/MediaStreamTrack.h: Removed many unneeded includes.
3146 Changed getConstraints to return const MediaTrackConstraints&, applyConstraints
3147 to take an optional MediaTrackConstraints, add/removeObserver to take a reference
3148 rather than a pointer, and changed m_constraints to be a MediaTrackConstraints
3149 instead of a RefPtr<MediaConstraints>.
3150 * Modules/mediastream/MediaStreamTrack.idl: Removed [Custom] from getConstraints
3151 and applyConstraints.
3153 * Modules/mediastream/MediaTrackConstraints.cpp: Added.
3154 (WebCore::set): Overloaded function to set constriaints in a
3155 MediaTrackConstraintSetMap.
3156 (WebCore::convertToInternalForm): Helper function that takes a
3157 MediaTrackConstraintSet and turns it into a MediaTrackConstraintSetMap.
3158 (WebCore::convertAdvancedToInternalForm): More of the same, but for vectors.
3159 (WebCore::createMediaConstraintsImpl): Top level function. Calls the other
3160 functions and then MediaConstraintsImpl::create.
3161 * Modules/mediastream/MediaTrackConstraints.h: Added. Contains all the structures
3162 and type definitions for the dictionaries defined in the IDL file, and also the
3163 createMediaConstraintsImpl function declaration.
3164 * Modules/mediastream/MediaTrackConstraints.idl: Added. Contains the
3165 MediaTrackConstraints and all the other dictionaries and typedefs that are needed
3166 to define that dictionary.
3167 * Modules/mediastream/UserMediaRequest.cpp:
3168 (WebCore::UserMediaRequest::start): Changed to not depend on MediaDevices::Promise.
3169 (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
3170 (WebCore::isSecure): Rearranged to be easier to understand.
3171 (WebCore::UserMediaRequest::start): Removed a local variable for simplicity.
3172 (WebCore::UserMediaRequest::document): Removed a redundant null check.
3173 * Modules/mediastream/UserMediaRequest.h: Reduced includes, changed to not depend
3174 on MediaDevices::Promise, removing the reason to include MediaDevices.h.
3176 * WebCore.xcodeproj/project.pbxproj: Updated to remove old files and add new ones.
3178 * bindings/js/JSBindingsAllInOne.cpp: Removed JSMediaDevicesCustom.cpp.
3180 * bindings/js/JSMediaDevicesCustom.cpp: Removed.
3181 * bindings/js/JSMediaDevicesCustom.h: Removed.
3183 * bindings/js/JSMediaStreamTrackCustom.cpp:
3184 (WebCore::JSMediaStreamTrack::applyConstraints): Deleted.
3185 (WebCore::JSMediaStreamTrack::getConstraints): Deleted.
3187 * bindings/scripts/CodeGenerator.pm:
3188 (ProcessDocument): Updated to allow multiple standalone dictionaries, as long as
3189 the name of one of the dictionaries matches the name of the file.
3191 * bindings/scripts/CodeGeneratorJS.pm:
3192 (GenerateDictionary): Added "other dictionaries" argument so we can support
3193 files with multiple dictionaries in them.
3194 (GenerateDictionariesHeaderContent): Completed support for dictionaries that
3195 are not named after a top level interface by added one more check for a missing
3196 $interface in a place that otherwise would not handle it correctly.
3197 (GenerateImplementation): Removed code that set $currentCachedAttribute and
3198 $cacheIndex, since no was reading the value of either any longer.
3199 (GenerateDictionaryHeader): Added "other dictionaries".
3200 (GenerateDictionaryImplementation): Ditto.
3201 (WriteData): Removed unnnecessarily indirect code that was using FileNamePrefix
3202 and a local variable named $prefix instead of just writing "JS".
3204 * bindings/scripts/generate-bindings.pl: Corrected the use of the fileparse
3205 function from the Path::Basename module; after reading the documentation for
3206 this it is clear that there is no need to first call basename, and fileparse
3207 should also be used instead of basename.
3209 * platform/mediastream/MediaConstraints.h: Removed unneeded includes.
3210 (WebCore::StringConstraint::appendExact): Removed an incorrect use of clear
3211 here that would mess up cases where there is supposed to be more than one
3214 * platform/mediastream/MediaStreamTrackPrivate.cpp: Remvoed unneeded includes.
3215 (WebCore::MediaStreamTrackPrivate::clone): Removed code to copy m_constraints.
3216 (WebCore::MediaStreamTrackPrivate::constraints): Deleted.
3217 * platform/mediastream/MediaStreamTrackPrivate.h: Removed the constraints
3218 function member and the m_constraints data member.
3220 2016-12-15 Dave Hyatt <hyatt@apple.com>
3222 [CSS Parser] Enable CSS Deferred Parsing
3223 https://bugs.webkit.org/show_bug.cgi?id=165869
3225 Reviewed by Sam Weinig.
3227 Enable CSS deferred parsing once again. It's now behind a pref,
3228 so it's easy to flip off and on.
3230 To address the memory regression that caused the previous rollout,
3231 the tokenizer is no longer retained. Instead the sheet text and escaped
3232 strings are retained by CSSDeferredParser, and then DeferredStyleProperties
3233 and DeferredStyleGroupRuleList make copies of the tokens from the original
3234 tokenization process. As the rules get parsed, these tokens get thrown
3237 This means that instead of the entire set of tokens staying in memory
3238 as long as even one unparsed rule remained, now only the tokens that
3239 still need parsing will remain alive.
3241 Unparsed rules will consume slightly more memory than parsed rules, but
3242 the more unparsed rules you have, the bigger the performance win as
3243 well, so this is a tradeoff. Given that the parsing speed is going up
3244 by anywhere from 25-40% on cold loads of pages (where all stylesheets
3245 have to parse), this seems worth it to me.
3247 * css/parser/CSSParserMode.h:
3250 2016-12-15 Alejandro G. Castro <alex@igalia.com>
3252 [OWR] Unskip fast/mediastream/MediaStream-video-element-track-stop.html
3253 https://bugs.webkit.org/show_bug.cgi?id=165316
3255 Reviewed by Philippe Normand.
3257 Fixed the ended support of the video element in the OWR player and
3258 fixed the videoTracks support. Now the OW player properly adds and
3259 removes the audio and video tracks. Added the getSettings support
3260 to the mediastream interface. Solved also the size handling in
3261 some of the enable/muted situations.
3263 Unskipping fast/mediastream/MediaStream-video-element-track-stop.html.
3265 * platform/GStreamer.cmake: Added the new
3266 RealtimeMediaSourceOwr.cpp with the new code handling the
3268 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
3269 (WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
3270 Release the new video and audio maps that creates a relationship
3271 of the mediastream tracks with the mediatracks of the video element.
3272 (WebCore::MediaPlayerPrivateGStreamerOwr::play): Set ended to
3273 false when we start playing.
3274 (WebCore::MediaPlayerPrivateGStreamerOwr::load): Create the media
3275 tracks to the player so that the videoTracks API returns it, and
3276 add an entry in the map to be able to restore it using the
3278 (WebCore::MediaPlayerPrivateGStreamerOwr::disableMediaTracks):
3279 Move some part of the stop function to this one in order to use it
3280 in pause method and avoid changing the video selection in that
3282 (WebCore::MediaPlayerPrivateGStreamerOwr::stop): Now we call the
3283 function disableMediaTracks and we also change teh selected
3285 (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): For
3286 videoTrack reset the size and the selected element. In case there
3287 is no media playing we Make sure we set the ended variable to true
3288 and call the timeChange to modify the state of the player.
3289 (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
3290 Handle properly the situation when the user changed the enabled
3291 value, we disable the media.
3292 (WebCore::MediaPlayerPrivateGStreamerOwr::setSize): Modify the
3294 (WebCore::MediaPlayerPrivateGStreamerOwr::naturalSize): Overrided
3295 to make sure we return a size even when the sample is not ready
3297 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
3298 Added the ended attribute and the maps.
3299 * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
3300 (WebCore::MediaEndpointOwr::createMutedRemoteSource): Use the new
3301 realtime video and audio sources classes, this new classes
3302 implement the settings of each type of media element.
3303 * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
3304 (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
3305 Use the new audio and video source classes instead of the general
3306 one in order to handle the settings properly.
3307 * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Added
3308 (WebCore::RealtimeMediaSourceOwr::settings): Initialize using the
3309 subclass and return the new currentSettings attribute.
3310 (WebCore::RealtimeMediaSourceOwr::supportedConstraints): Call the
3311 subclass initialization of the supportedSettings.
3312 * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
3313 (WebCore::RealtimeMediaSourceOwr::initializeSettings): Added to
3314 initialize the settings before returning the value. Implemented in
3316 (WebCore::RealtimeMediaSourceOwr::initializeSupportedConstraints):
3317 Added to initialize the supported settings of the
3318 media. Implemented in the subclass.
3319 (WebCore::RealtimeMediaSourceOwr::settings): Moved to the cpp
3320 file, implemented using the initialize functions of the subclass
3321 * platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Added
3322 this new class to handle the settings of the video elements. The
3323 class initializes the settings and the supportedSettings.
3324 * platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Added
3325 this new class to handle the settings of the audio elements. The
3326 class initializes the settings and the supportedSettings.
3329 2016-12-15 Alex Christensen <achristensen@webkit.org>
3331 REGRESSION (r208902) Null pointer dereference in wkIsPublicSuffix
3332 https://bugs.webkit.org/show_bug.cgi?id=165885
3333 <rdar://problem/29476917>
3335 Reviewed by Darin Adler.
3337 wkIsPublicSuffix crashes if you give it a nil NSString*.
3338 This was possible before IDN2008 adoption, but it's more common now
3339 because domains like "r4---asdf.example.com" fail in uidna_nameToASCII but not in uidna_IDNToASCII.
3340 decodeHostName can return a nil NSString. We can't use it unchecked, so instead we use an algorithm that allows
3341 for decoding failures while still finding top privately controlled domains correctly.
3343 Tested by new API tests which crash before this change and verify the behavior matches behavior before r208902.
3345 * platform/mac/PublicSuffixMac.mm:
3346 (WebCore::isPublicSuffix):
3347 (WebCore::topPrivatelyControlledDomain):
3349 2016-12-15 Alex Christensen <achristensen@webkit.org>
3351 Fix Windows WebGL build after r209832
3355 2016-12-14 Hunseop Jeong <hs85.jeong@samsung.com>
3357 Unreviewed build fix after r209832
3359 * platform/graphics/PlatformDisplay.cpp:
3360 (WebCore::PlatformDisplay::sharedDisplay): Added the guard for the clang
3362 2016-12-14 Yusuke Suzuki <utatane.tea@gmail.com>
3364 [GTK] Support latest SubtleCrypto HMAC APIs
3365 https://bugs.webkit.org/show_bug.cgi?id=165863
3367 Reviewed by Sam Weinig.
3369 SubtleCrypto spec is updated, and new delegate implementations are required to support these interfaces.
3370 This patch implements platformSign and platformVerify with WorkQueues for gcrypt backend.
3372 * crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
3373 (WebCore::calculateSignature):
3374 (WebCore::CryptoAlgorithmHMAC::platformSign):
3375 (WebCore::CryptoAlgorithmHMAC::platformVerify):
3377 2016-12-14 Chris Dumez <cdumez@apple.com>
3379 Unreviewed, rolling out r209415.
3381 This workaround is no longer needed now that
3382 <rdar://problem/29518605> has been fixed
3386 "Add HTML interactive form validation blacklist for some
3387 WebKit-specific sites"
3388 https://bugs.webkit.org/show_bug.cgi?id=165470
3389 http://trac.webkit.org/changeset/209415
3391 2016-12-14 Dean Jackson <dino@apple.com>
3393 Update prefers-reduced-motion syntax
3394 https://bugs.webkit.org/show_bug.cgi?id=165880
3395 <rdar://problems/29671807>
3397 Reviewed by Sam Weinig.
3399 After discussion in:
3400 https://github.com/w3c/csswg-drafts/issues/442
3401 ... the syntax of prefers-reduced-motion was changed
3402 to accept "reduce" or "no-preference".
3404 Updated the tests in fast/media.
3406 * css/CSSValueKeywords.in: Add no-preference keyword.
3407 * css/MediaQueryEvaluator.cpp:
3408 (WebCore::prefersReducedMotionEvaluate):
3410 2016-12-14 Sam Weinig <sam@webkit.org>
3412 REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins)
3413 <rdar://problem/29573563>
3414 https://bugs.webkit.org/show_bug.cgi?id=165872
3416 Reviewed by Chris Dumez.
3418 Revert the Location.ancestorOrigins part of r204679 because google.com is relying on
3419 it returning a DOMStringList (or at least something with a .item() function), rather
3420 than a frozen javascript array.
3422 Spec changes are tracked with https://github.com/whatwg/html/issues/2179.