Add test to verify certain child processes are not launched as a side effect of enabl...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-07-26  Brian Burg  <bburg@apple.com>
2
3         Remove WEB_TIMING feature flag
4         https://bugs.webkit.org/show_bug.cgi?id=174795
5
6         Reviewed by Alex Christensen.
7
8         * Configurations/FeatureDefines.xcconfig:
9         * bindings/js/JSPerformanceEntryCustom.cpp:
10         * dom/Document.cpp:
11         (WebCore::Document::setReadyState):
12         (WebCore::Document::finishedParsing):
13         * dom/Document.h:
14         (WebCore::Document::timing):
15         * dom/DocumentTiming.h:
16         * dom/EventTargetFactory.in:
17         * loader/DocumentThreadableLoader.cpp:
18         (WebCore::DocumentThreadableLoader::finishedTimingForWorkerLoad):
19         (WebCore::DocumentThreadableLoader::loadRequest):
20         * loader/DocumentThreadableLoader.h:
21         * loader/ResourceTimingInformation.cpp:
22         * loader/ResourceTimingInformation.h:
23         * loader/SubresourceLoader.cpp:
24         (WebCore::SubresourceLoader::didFinishLoading):
25         (WebCore::SubresourceLoader::reportResourceTiming):
26         * loader/SubresourceLoader.h:
27         * loader/ThreadableLoaderClient.h:
28         (WebCore::ThreadableLoaderClient::didFail):
29         (WebCore::ThreadableLoaderClient::didFinishTiming):
30         * loader/WorkerThreadableLoader.cpp:
31         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishTiming):
32         * loader/WorkerThreadableLoader.h:
33         * loader/cache/CachedResourceLoader.cpp:
34         (WebCore::CachedResourceLoader::requestResource):
35         (WebCore::CachedResourceLoader::revalidateResource):
36         (WebCore::CachedResourceLoader::loadResource):
37         * loader/cache/CachedResourceLoader.h:
38         (WebCore::CachedResourceLoader::resourceTimingInformation):
39         * page/DOMWindow.cpp:
40         (WebCore::DOMWindow::~DOMWindow):
41         (WebCore::DOMWindow::resetDOMWindowProperties):
42         (WebCore::DOMWindow::nowTimestamp):
43         (WebCore::DOMWindow::removeAllEventListeners):
44         * page/DOMWindow.h:
45         * page/GlobalPerformance.idl:
46         * page/Performance.cpp:
47         * page/Performance.h:
48         * page/Performance.idl:
49         * page/PerformanceEntry.cpp:
50         * page/PerformanceEntry.h:
51         * page/PerformanceEntry.idl:
52         * page/PerformanceMark.h:
53         * page/PerformanceMark.idl:
54         * page/PerformanceMeasure.h:
55         * page/PerformanceMeasure.idl:
56         * page/PerformanceNavigation.cpp:
57         * page/PerformanceNavigation.h:
58         * page/PerformanceNavigation.idl:
59         * page/PerformanceObserver.cpp:
60         * page/PerformanceObserver.h:
61         * page/PerformanceObserver.idl:
62         * page/PerformanceObserverCallback.h:
63         * page/PerformanceObserverCallback.idl:
64         * page/PerformanceObserverEntryList.cpp:
65         * page/PerformanceObserverEntryList.h:
66         * page/PerformanceObserverEntryList.idl:
67         * page/PerformanceResourceTiming.cpp:
68         * page/PerformanceResourceTiming.h:
69         * page/PerformanceResourceTiming.idl:
70         * page/PerformanceTiming.cpp:
71         * page/PerformanceTiming.h:
72         * page/PerformanceTiming.idl:
73         * page/PerformanceUserTiming.cpp:
74         * page/PerformanceUserTiming.h:
75         * platform/network/ResourceHandle.h:
76         * platform/network/ResourceHandleInternal.h:
77         * platform/network/cf/ResourceHandleCFNet.cpp:
78         (WebCore::ResourceHandle::start):
79         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
80         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
81         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
82         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
83         * platform/network/curl/ResourceHandleCurl.cpp:
84         (WebCore::ResourceHandleInternal::didFinish):
85         (WebCore::ResourceHandleInternal::calculateWebTimingInformations):
86         (WebCore::ResourceHandleInternal::dispatchSynchronousJob):
87         * platform/network/mac/ResourceHandleMac.mm:
88         (WebCore::ResourceHandle::createNSURLConnection):
89         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
90         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
91         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
92         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
93         * platform/network/soup/ResourceHandleSoup.cpp:
94         (WebCore::restartedCallback):
95         (WebCore::sendRequestCallback):
96         (WebCore::createSoupMessageForHandleAndRequest):
97         (WebCore::ResourceHandle::sendPendingRequest):
98         * platform/network/soup/SoupNetworkSession.cpp:
99         (WebCore::SoupNetworkSession::SoupNetworkSession):
100         * workers/WorkerGlobalScope.cpp:
101         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
102         (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
103         (WebCore::WorkerGlobalScope::removeAllEventListeners):
104         * workers/WorkerGlobalScope.h:
105
106 2017-07-26  Chris Dumez  <cdumez@apple.com>
107
108         Pressing the Escape key should not be a valid user gesture to enter fullscreen
109         https://bugs.webkit.org/show_bug.cgi?id=174864
110         <rdar://problem/33009088>
111
112         Reviewed by Geoffrey Garen.
113
114         Pressing the Escape key should not be a valid user gesture to enter fullscreen since this
115         is the gesture to exit fullscreen already.
116
117         Test: fullscreen/requestFullscreen-escape-key.html
118
119         * dom/Document.cpp:
120         (WebCore::Document::requestFullScreenForElement):
121         * dom/UserGestureIndicator.cpp:
122         (WebCore::UserGestureIndicator::UserGestureIndicator):
123         * dom/UserGestureIndicator.h:
124         (WebCore::UserGestureToken::create):
125         (WebCore::UserGestureToken::gestureType):
126         (WebCore::UserGestureToken::UserGestureToken):
127         * page/EventHandler.cpp:
128         (WebCore::EventHandler::internalKeyEvent):
129
130 2017-07-26  Nan Wang  <n_wang@apple.com>
131
132         AX: Incorrect range from index and length in contenteditable with <p> tags
133         https://bugs.webkit.org/show_bug.cgi?id=174856
134
135         Reviewed by Chris Fleizach.
136
137         When asking for the string inside a text control with a given range, we sometimes get
138         a wrong string at the line boundary due to a bad plain range to text marker conversion.
139         To fix this, we should use the exsisting method on text controls to avoid this issue. 
140
141         Updated the test to test the problematic case.
142
143         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
144         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
145
146 2017-07-26  Daewoong Jang  <daewoong.jang@navercorp.com>
147
148         [Curl] Bug fix after r219606
149         https://bugs.webkit.org/show_bug.cgi?id=174845
150
151         Reviewed by Alex Christensen.
152
153         * platform/network/curl/CurlContext.h:
154         (WebCore::CurlSList::isEmpty):
155         * platform/network/curl/ResourceHandleCurl.cpp:
156         (WebCore::ResourceHandleInternal::didReceiveHeaderLine):
157         (WebCore::ResourceHandleInternal::headerCallback):
158
159 2017-07-26  Zan Dobersek  <zdobersek@igalia.com>
160
161         [EME][GStreamer] Multi-key support in the GStreamer ClearKey decryptor
162         https://bugs.webkit.org/show_bug.cgi?id=174779
163
164         Reviewed by Xabier Rodriguez-Calvar.
165
166         In the CENC decryptor, the key ID value is retrieved from the info structure
167         on the GstProtectionMeta object. GstBuffer for that value is retrieved and
168         passed to the setupCipher() function.
169
170         In the ClearKey decryptor (which extends the CENC decryptor), the single
171         GstBuffer object on the private instance that holds the key value is replaced
172         with a Vector object that holds pairs of key ID and value GstBuffers. In the
173         handleKeyResponse() implementation that Vector is emptied and then refilled
174         with key ID and value pairs that are passed in through the drm-cipher-clearkey
175         structure that's attached to the GstEvent that signalled new key information.
176
177         In the ClearKey decryptor's setupCipher() implementation the passed-in key ID
178         buffer is used to find a matching key ID and value pair stored on the private
179         instance. If not found, an error is thrown. If found, the matching key value
180         is used for decryption.
181
182         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
183         (webKitMediaClearKeyDecryptorHandleKeyResponse):
184         (webKitMediaClearKeyDecryptorSetupCipher):
185         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
186         (webkitMediaCommonEncryptionDecryptTransformInPlace):
187         (webKitMediaCommonEncryptionDecryptDefaultSetupCipher):
188         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
189
190 2017-07-26  Zan Dobersek  <zdobersek@igalia.com>
191
192         [EME][GStreamer] Handle ClearKey as a supported key system
193         https://bugs.webkit.org/show_bug.cgi?id=174778
194
195         Reviewed by Xabier Rodriguez-Calvar.
196
197         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
198         (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
199         Return true for the 'org.w3.clearkey' key system when building with
200         ENCRYPTED_MEDIA enabled. The underlying implementation will follow.
201
202 2017-07-26  Claudio Saavedra  <csaavedra@igalia.com>
203
204         [WPE] Fix a potential crash in the platform pasteboard when reading a string
205         https://bugs.webkit.org/show_bug.cgi?id=174859
206
207         Reviewed by Žan Doberšek.
208
209         We shouldn't assume that the wpe_pasteboard_string struct will be
210         filled in, so initialize it.
211
212         * platform/wpe/PlatformPasteboardWPE.cpp:
213         (WebCore::PlatformPasteboard::readString): Initialize the struct
214         before passing it to wpe and early return if it's still empty.
215
216 2017-07-26  Javier Fernandez  <jfernandez@igalia.com>
217
218         InsertOrderedList command applied to table cells inserts an extra BR before the table
219         https://bugs.webkit.org/show_bug.cgi?id=174593
220
221         Reviewed by Darin Adler.
222
223         Don't add BR when pruning empty blocks if it's the start of a paragraph.
224
225         The function MoveParagraph is used for several operations and editing
226         commands, like 'insertOrderedList'. When moving paragraphs we check out
227         whether we should add a 'br' element to avoid undesired block collapse.
228
229         However, we shouldn't do this when destination is the start of a
230         paragraph.
231
232         Tests: editing/inserting/insert-list-in-table-cell-01.html
233                editing/inserting/insert-list-in-table-cell-02.html
234                editing/inserting/insert-list-in-table-cell-03.html
235                editing/inserting/insert-list-in-table-cell-04.html
236                editing/inserting/insert-list-in-table-cell-05.html
237                editing/inserting/insert-list-in-table-cell-06.html
238                editing/inserting/insert-list-in-table-cell-07.html
239                editing/inserting/insert-list-in-table-cell-08.html
240
241         * editing/CompositeEditCommand.cpp:
242         (WebCore::CompositeEditCommand::moveParagraphs):
243
244 2017-07-26  Zan Dobersek  <zdobersek@igalia.com>
245
246         [WPE] WebGL2 support
247         https://bugs.webkit.org/show_bug.cgi?id=174249
248
249         Reviewed by Alex Christensen.
250
251         Implement WebGL2 support in GraphicsContext3DCairo for the WPE port, but keep
252         the implementation specific to libepoxy (which WPE leverages by default).
253
254         In the GraphicsContext3D::create() method, we first construct the
255         GraphicsContext3D object that also ensures a current GL context on this thread.
256         Only then can we determine through libepoxy whether the underlying GL library
257         is able to support WebGL2.
258
259         For WebGL2, the GLES3 support is required. The initial libepoxy implementation
260         ensures this only in case of 'non-desktop GL' library of minimum version 3.0.
261         This effectively translates to the only supported configuration being the
262         EGL and OpenGL ES 3.0 (or higher) combination. If this cannot be ensured, we
263         discard the existing GraphicsContext3D object and return null.
264
265         WebGL2 can also be supported via OpenGL (i.e. 'desktop GL'), but this hasn't
266         been tested yet. Implementation will in the future be extended to support that
267         as required.
268
269         In the GraphicsContext3D constructor itself, the ANGLEWebKitBridge constructor
270         has to now receive the second argument, the desired shader specification that's
271         used when parsing the provided shaders. This should be SH_WEBGL_SPEC for WebGL1,
272         and SH_WEBGL2_SPEC for WebGL2.
273
274         No new tests -- a small set of existing WebGL2 tests is unskipped and passing.
275
276         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
277         (WebCore::GraphicsContext3D::create):
278         (WebCore::GraphicsContext3D::GraphicsContext3D):
279         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
280         Add WebGL2-specific methods to the build.
281
282 2017-07-26  Nan Wang  <n_wang@apple.com>
283
284         AX: should dispatch accessibilityPerformPressAction async on MacOS
285         https://bugs.webkit.org/show_bug.cgi?id=174849
286
287         Reviewed by Chris Fleizach.
288
289         If performing the accessibility press action results in a modal alert being displayed,
290         it can cause VoiceOver to hang. To fix it, we should dispatch the action asynchronously.
291
292         Updated tests to adapt to this change.
293
294         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
295         (-[WebAccessibilityObjectWrapper accessibilityPerformPressAction]):
296         (-[WebAccessibilityObjectWrapper _accessibilityPerformPressAction]):
297
298 2017-07-25  Carlos Garcia Campos  <cgarcia@igalia.com>
299
300         Icon loader error on startup
301         https://bugs.webkit.org/show_bug.cgi?id=174787
302
303         Reviewed by Brady Eidson.
304
305         This is a regression of the new icon loading, it happens with pages that shouldn't have a favicon, like about
306         pages. IconController::startLoader() did several checks before starting the load that
307         DocumentLoader::startIconLoading() is not doing. It checked that the frame is the main one, the document can have
308         an icon (document url is not empty and not about:blank) and that favicon url is in HTTP family. We should do the
309         same checks now before starting to load icons.
310
311         * loader/DocumentLoader.cpp:
312         (WebCore::DocumentLoader::startIconLoading):
313
314 2017-07-25  Sam Weinig  <sam@webkit.org>
315
316         [WebIDL] Remove custom bindings for HTMLCanvasElement
317         https://bugs.webkit.org/show_bug.cgi?id=174847
318
319         Reviewed by Darin Adler.
320
321         * CMakeLists.txt:
322         * WebCore.xcodeproj/project.pbxproj:
323         * bindings/js/JSBindingsAllInOne.cpp:
324         * bindings/js/JSHTMLCanvasElementCustom.cpp: Removed.
325         Remove JSHTMLCanvasElementCustom.
326
327         * html/HTMLCanvasElement.cpp:
328         (WebCore::HTMLCanvasElement::getContext):
329         (WebCore::HTMLCanvasElement::getContext2d):
330         (WebCore::HTMLCanvasElement::getContextWebGL):
331         (WebCore::HTMLCanvasElement::getContextWebGPU):
332         * html/HTMLCanvasElement.h:
333         * html/HTMLCanvasElement.idl:
334         Move context picking code to HTMLCanvasElement. Give more
335         exact types to remaining context getters.
336
337 2017-07-25  Chris Dumez  <cdumez@apple.com>
338
339         Clean up ExceptionCode enumeration
340         https://bugs.webkit.org/show_bug.cgi?id=174812
341
342         Reviewed by Darin Adler.
343
344         Clean up ExceptionCode enumeration:
345         - Updated comments to reflect the latest WebIDL specification
346         - Drop special values given to some exception codes. Those legacy codes are already in the
347           table inside DOMException.cpp. This also allows us to drop empty rows in the DOMException
348           table
349         - Drop NoException value in the enumeration and use std::optional<ExceptionCode> when needed
350           instead.
351
352         * Modules/indexeddb/shared/IDBError.cpp:
353         (WebCore::IDBError::IDBError):
354         (WebCore::IDBError::name):
355         (WebCore::IDBError::message):
356         * Modules/indexeddb/shared/IDBError.h:
357         (WebCore::IDBError::code):
358         (WebCore::IDBError::encode):
359         (WebCore::IDBError::decode):
360         * dom/DOMException.cpp:
361         * dom/ExceptionCode.h:
362         * fileapi/FileReaderSync.cpp:
363         (WebCore::errorCodeToException):
364         (WebCore::FileReaderSync::startLoading):
365         * xml/XMLHttpRequest.cpp:
366         (WebCore::XMLHttpRequest::createRequest):
367         * xml/XMLHttpRequest.h:
368
369 2017-07-25  Andy Estes  <aestes@apple.com>
370
371         [Apple Pay] Add "carteBancaire" as a supported payment network
372         https://bugs.webkit.org/show_bug.cgi?id=174841
373         <rdar://problem/31935596>
374
375         Reviewed by Alex Christensen.
376
377         Tests: http/tests/ssl/applepay/ApplePaySession.html
378                http/tests/ssl/applepay/ApplePaySessionV3.html
379
380         * Modules/applepay/PaymentRequest.cpp:
381         (WebCore::PaymentRequest::isValidSupportedNetwork):
382
383 2017-07-25  Daniel Bates  <dabates@apple.com>
384
385         Make StyleResolver::isValid{Cue, Region}StyleProperty() static, inline, non-member functions
386         https://bugs.webkit.org/show_bug.cgi?id=174827
387
388         Reviewed by Simon Fraser.
389
390         StyleResolver::isValid{Cue, Region}StyleProperty() access neither instance nor
391         class data. Moreover, they are private member functions and hence cannot be
392         used outside of StyleResolver's implementation. So, make these static, inline,
393         non-member functions.
394
395         * css/StyleResolver.cpp:
396         (WebCore::isValidRegionStyleProperty):
397         (WebCore::isValidCueStyleProperty):
398         (WebCore::StyleResolver::CascadedProperties::addMatch):
399         (WebCore::StyleResolver::isValidRegionStyleProperty): Deleted.
400         (WebCore::StyleResolver::isValidCueStyleProperty): Deleted.
401         * css/StyleResolver.h:
402
403 2017-07-25  Per Arne Vollan  <pvollan@apple.com>
404
405         Dragged links are blurry on 1x displays.
406         https://bugs.webkit.org/show_bug.cgi?id=174831
407         <rdar://problem/33519698>
408
409         Reviewed by Simon Fraser.
410
411         When the width and height of the drag image is a multiple of 2, the drag image is not blurry
412         on a 1x display. This is a workaround which should be removed when <rdar://problem/33059739>
413         is fixed.
414
415         No new tests, since this is not straightforward to test with a layout test.
416
417         * platform/mac/DragImageMac.mm:
418         (WebCore::LinkImageLayout::LinkImageLayout):
419
420 2017-07-25  Matt Baker  <mattbaker@apple.com>
421
422         Web Inspector: Refactoring: extract async stack trace logic from InspectorInstrumentation
423         https://bugs.webkit.org/show_bug.cgi?id=174738
424
425         Reviewed by Brian Burg.
426
427         Relocate AsyncCallType from InspectorInstrumentation to the debugger
428         agent. Plumbing for `requestAnimationFrame` notifications has been added
429         to PageDebuggerAgent, which is responsible for managing async stack traces. 
430
431         * dom/ScriptedAnimationController.cpp:
432         (WebCore::ScriptedAnimationController::registerCallback):
433         (WebCore::ScriptedAnimationController::cancelCallback):
434         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
435
436         * inspector/InspectorInstrumentation.cpp:
437         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
438         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
439         (WebCore::InspectorInstrumentation::willFireTimerImpl):
440         (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
441         (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
442         (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
443         (): Deleted.
444         (WebCore::didScheduleAsyncCall): Deleted.
445
446         * inspector/InspectorInstrumentation.h:
447         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
448         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
449         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
450         Replaced Frame and Document pointers with references and moved
451         pointer validation upstream.
452
453         * inspector/PageDebuggerAgent.cpp:
454         (WebCore::PageDebuggerAgent::didRequestAnimationFrame):
455         (WebCore::PageDebuggerAgent::willFireAnimationFrame):
456         (WebCore::PageDebuggerAgent::didCancelAnimationFrame):
457         * inspector/PageDebuggerAgent.h:
458
459 2017-07-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
460
461         Async image decoding for large images should be disabled after the first time a tile is painted
462         https://bugs.webkit.org/show_bug.cgi?id=174451
463         <rdar://problem/31246421>
464
465         Reviewed by Simon Fraser.
466
467         Flashing because of DOM mutation can be fixed by disabling the asynchronous
468         image decoding after the first time a tile was painted.
469
470         We can detect this by consulting the tile repaintCount. If it is zero, then
471         it is safe to use asynchronous image decoded. If the tile repaintCount is
472         greater than zero, we are not sure if the renderer rectangle has an image
473         drawn in it already or not. In this case we have to use the synchronous
474         image decoding to avoid causing a flash.
475
476         Tests: fast/images/async-image-background-change.html
477                fast/images/async-image-src-change.html
478                http/tests/multipart/multipart-async-image.html
479
480         * html/shadow/MediaControlElements.cpp:
481         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
482         * page/FrameView.cpp:
483         (WebCore::FrameView::willPaintContents):
484         (WebCore::FrameView::paintContentsForSnapshot):
485         * page/PageOverlayController.cpp:
486         (WebCore::PageOverlayController::paintContents):
487         * page/PageOverlayController.h:
488         * page/linux/ResourceUsageOverlayLinux.cpp:
489         * page/mac/ServicesOverlayController.h:
490         * page/mac/ServicesOverlayController.mm:
491         (WebCore::ServicesOverlayController::Highlight::paintContents):
492         * platform/graphics/BitmapImage.cpp:
493         (WebCore::BitmapImage::draw):
494         * platform/graphics/BitmapImage.h:
495         * platform/graphics/GraphicsLayer.cpp:
496         (WebCore::GraphicsLayer::paintGraphicsLayerContents):
497         * platform/graphics/GraphicsLayer.h:
498         * platform/graphics/GraphicsLayerClient.h:
499         (WebCore::GraphicsLayerClient::paintContents):
500         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
501         (WebCore::LayerClient::platformCALayerPaintContents):
502         * platform/graphics/ca/GraphicsLayerCA.cpp:
503         (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
504         * platform/graphics/ca/GraphicsLayerCA.h:
505         * platform/graphics/ca/PlatformCALayer.h:
506         * platform/graphics/ca/PlatformCALayerClient.h:
507         (WebCore::PlatformCALayerClient::platformCALayerRepaintCount):
508         * platform/graphics/ca/TileCoverageMap.cpp:
509         (WebCore::TileCoverageMap::platformCALayerPaintContents):
510         * platform/graphics/ca/TileCoverageMap.h:
511         * platform/graphics/ca/TileGrid.cpp:
512         (WebCore::TileGrid::platformCALayerPaintContents):
513         (WebCore::TileGrid::platformCALayerRepaintCount):
514         * platform/graphics/ca/TileGrid.h:
515         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
516         (PlatformCALayer::drawLayerContents):
517         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
518         (PlatformCALayer::drawLayerContents):
519         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
520         (PlatformCALayerWinInternal::displayCallback):
521         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
522         (WebTiledBackingLayerWin::displayCallback):
523         * platform/graphics/mac/WebLayer.mm:
524         (-[WebLayer drawInContext:]):
525         (-[WebSimpleLayer drawInContext:]):
526         * rendering/PaintPhase.h:
527         * rendering/RenderBoxModelObject.cpp:
528         (WebCore::RenderBoxModelObject::decodingModeForImageDraw):
529         * rendering/RenderElement.h:
530         * rendering/RenderLayer.cpp:
531         (WebCore::RenderLayer::paintLayerContents):
532         (WebCore::RenderLayer::paintForegroundForFragments):
533         * rendering/RenderLayerBacking.cpp:
534         (WebCore::RenderLayerBacking::paintContents):
535         * rendering/RenderLayerBacking.h:
536         * rendering/RenderLayerCompositor.cpp:
537         (WebCore::RenderLayerCompositor::paintContents):
538         * rendering/RenderLayerCompositor.h:
539         * rendering/RenderWidget.cpp:
540         (WebCore::RenderWidget::paintContents):
541         * testing/Internals.cpp:
542         (WebCore::imageFromImageElement):
543         (WebCore::bitmapImageFromImageElement):
544         (WebCore::Internals::imageFrameIndex):
545         (WebCore::Internals::setImageFrameDecodingDuration):
546         (WebCore::Internals::resetImageAnimation):
547         (WebCore::Internals::isImageAnimating):
548         (WebCore::Internals::setClearDecoderAfterAsyncFrameRequestForTesting):
549         (WebCore::Internals::imageDecodeCount):
550         (WebCore::Internals::setLargeImageAsyncDecodingEnabledForTesting):
551         * testing/Internals.h:
552         * testing/Internals.idl:
553
554 2017-07-23  Sam Weinig  <sam@webkit.org>
555
556         [WebIDL] Add support for generating timer bindings
557         https://bugs.webkit.org/show_bug.cgi?id=174766
558
559         Reviewed by Darin Adler.
560
561         Adds a new non-standard type, ScheduledAction, which stands in for the
562         standard (DOMString or Function). It would be good to move to that in
563         future, but for now, this allows for forward momentum on removing custom
564         bindings.
565
566         * WebCore.xcodeproj/project.pbxproj:
567         Add JSDOMConvertScheduledAction.h.
568
569         * bindings/IDLTypes.h:
570         Add IDLScheduledAction.
571
572         * bindings/js/JSDOMConvertScheduledAction.h: Added.
573         (WebCore::Converter<IDLScheduledAction>::convert):
574         Add conversion from JSValue -> ScheduledAction. This is moved from the old ScheduledAction
575         create function.
576
577         * bindings/js/JSDOMConvertVariadic.h:
578         (WebCore::convertVariadicArguments):
579         (WebCore::Detail::VariadicConverterBase::convert): Deleted.
580         (WebCore::Detail::VariadicConverterBase<IDLInterface<T>>::convert): Deleted.
581         * bindings/js/JSDOMConvertBase.h:
582         * bindings/js/JSDOMConvertAny.h:
583         (WebCore::VariadicConverter<IDLAny>::convert):
584         * bindings/js/JSDOMConvertInterface.h:
585         (WebCore::VariadicConverter<IDLInterface<T>>::convert):
586         Rename VariadicConverter to VariadicConverterDetails, and remove base class. Rename 
587         VariadicConverterBase to VariadicConverter, and move specializations to the file
588         containing the base converter for that IDL type 
589
590         * bindings/js/JSDOMWindowCustom.cpp:
591         (WebCore::JSDOMWindow::setTimeout): Deleted.
592         (WebCore::JSDOMWindow::setInterval): Deleted.
593         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
594         (WebCore::JSWorkerGlobalScope::setTimeout): Deleted.
595         (WebCore::JSWorkerGlobalScope::setInterval): Deleted.
596         Remove custom implementations of setTimeout and setInterval.
597
598         * bindings/js/ScheduledAction.cpp:
599         (WebCore::ScheduledAction::create):
600         (WebCore::ScheduledAction::ScheduledAction):
601         (WebCore::ScheduledAction::~ScheduledAction):
602         (WebCore::ScheduledAction::addArguments):
603         (WebCore::ScheduledAction::executeFunctionInContext):
604         * bindings/js/ScheduledAction.h:
605         (WebCore::ScheduledAction::ScheduledAction): Deleted.
606         Rework ScheduledAction. Now has two create functions, one for the function
607         form, one for the string form. These are now called by the Converter. Also,
608         rather than extracting the arguments directly from the ExecState, allow the
609         bindings to work as designed, and have the arguments come in as variadic 
610         arguments to setTimeout/setInterval and get added to the ScheduledAction if
611         needed. Also, move ContentSecurityPolicy check out of construction, and into
612         setTimeout/setInterval.
613
614         * bindings/scripts/CodeGenerator.pm:
615         (IsBuiltinType):
616         Add ScheduledAction to the builtin list.
617
618         * bindings/scripts/CodeGeneratorJS.pm:
619         (AddToIncludesForIDLType):
620         Add the correct include when ScheduledAction is used.
621
622         (GenerateParametersCheck):
623         Remove rule disallowing optional arguments before variadic arguments. That works
624         just fine.
625
626         (GetBaseIDLType):
627         Add mapping of ScheduledAction -> IDLScheduledAction.
628
629         (JSValueToNativeDOMConvertNeedsGlobalObject):
630         Add ScheduledAction to the list of types that need a global object
631         for conversion.
632
633         * page/WindowOrWorkerGlobalScope.idl:
634         Update interface to match spec and add FIXMEs for moving to TimerHandler.
635
636         * page/DOMWindow.cpp:
637         (WebCore::DOMWindow::setTimeout):
638         (WebCore::DOMWindow::setInterval):
639         * page/DOMWindow.h:
640         * workers/WorkerGlobalScope.cpp:
641         (WebCore::WorkerGlobalScope::setTimeout):
642         (WebCore::WorkerGlobalScope::setInterval):
643         * workers/WorkerGlobalScope.h:
644         Update for new signatures. WorkerGlobalScope now has to return ExceptionOr<int>
645         even though it never throws, due to having one IDL file defining these. This is 
646         unfortunate and something we should look at addressing the future.
647
648 2017-07-25  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
649
650         [WinCairo] Fix build with AllInOnes disabled
651         https://bugs.webkit.org/show_bug.cgi?id=174784
652         <rdar://problem/33488914>
653
654         Reviewed by Alex Christensen.
655
656         * PlatformWin.cmake:
657         Add RenderThemeWin.cpp to WebCore_SOURCES
658
659         * rendering/RenderingAllInOne.cpp:
660         Remove #include "RenderThemeWin.cpp"
661
662         * testing/MemoryInfo.h:
663         Remove #include "JSDomWindow.h"
664
665         * bindings/js/JSDOMGlobalObject.cpp:
666         * bindings/js/JSDOMPromiseDeferred.cpp:
667         * bindings/js/JSDOMWrapper.cpp:
668         * bindings/js/JSImageDataCustom.cpp:
669         * bindings/scripts/CodeGeneratorJS.pm:
670         (GenerateCallWith):
671         * dom/ScriptExecutionContext.cpp:
672         * inspector/InspectorController.cpp:
673         * inspector/InspectorTimelineAgent.cpp:
674         * rendering/RenderMediaControls.cpp:
675         * rendering/RenderMediaControls.h:
676         * rendering/RenderThemeWin.cpp:
677
678         * bindings/scripts/test/JS/JSTestObj.cpp:
679         Update test results.
680
681 2017-07-25  Konstantin Tokarev  <annulen@yandex.ru>
682
683         Unreviewed, fix Mac CMake build after r219567
684
685         * PlatformMac.cmake:
686
687 2017-07-23  Darin Adler  <darin@apple.com>
688
689         More NeverDestroyed and related cleanup
690         https://bugs.webkit.org/show_bug.cgi?id=174745
691
692         Reviewed by Alex Christensen.
693
694         * bindings/js/JSCustomElementInterface.cpp:
695         (WebCore::JSCustomElementInterface::constructElementWithFallback):
696         Use isNull() rather than comparing against nullAtom() since it's
697         slightly more efficient.
698
699         * css/MediaQueryEvaluator.cpp:
700         (WebCore::prefersReducedMotionEvaluate): Use a switch statement for the
701         three states of forcedPrefersReducedMotionAccessibilityValue. Also update
702         to use Theme::singleton() instead of platformTheme().
703
704         * dom/QualifiedName.h: Removed some unneeded includes, minor style tweaks,
705         and use isNull() rather than comparing against nullAtom() since it's
706         slightly more efficient.
707
708         * html/Autofill.cpp:
709         (WebCore::AutofillData::createFromHTMLFormControlElement): Use isNull()
710         rather than comparing against nullAtom() since it's slightly more efficient.
711
712         * html/HTMLDocument.cpp:
713         (WebCore::addLocalNameToSet): Deleted.
714         (WebCore::createHtmlCaseInsensitiveAttributesSet): Deleted.
715         (WebCore::HTMLDocument::isCaseSensitiveAttribute): Moved the case-sensitive
716         attribute set in here and made it use makeNeverDestroyed.
717
718         * html/HTMLNameCollection.cpp:
719         (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
720         Formatted vertically and sorted so it's easier to see what it does.
721         (WebCore::WindowNameCollection::elementMatches): Use boolean logic instead
722         of multiple return statements to make this a little more straightforward.
723         (WebCore::isObjectElementForDocumentNameCollection): Added. Calls the new
724         isExposed function. The old code called this isDocNamedItem.
725         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
726         Use isObjectElementForDocumentNameCollection to clean up logic. Also
727         sorted classes.
728         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
729         Use isObjectElementForDocumentNameCollection to clean up logic. Also
730         sorted classes and formatted vertically.
731         (WebCore::DocumentNameCollection::elementMatches): Write in terms of
732         above functions for clarity. Efficiency is roughly the same.
733
734         * html/HTMLObjectElement.cpp:
735         (WebCore::HTMLObjectElement::HTMLObjectElement): Initialize data members
736         in class definition instead of here.
737         (WebCore::HTMLObjectElement::childrenChanged): Update for name change;
738         function is now called updateExposedState rather than updateDocNamedItem.
739         Also use m_useFallbackContent directly instead of through a function.
740         (WebCore::HTMLObjectElement::renderFallbackContent): Ditto.
741         (WebCore::preventsParentObjectFromExposure): Added. Replaces the old
742         isRecognizedTagName function, and does almost the same thing, but the
743         argument type is different and the param tag is now one of the tags
744         exempted here. Also broke up into two overloads so we can handle the
745         Element, Text, and other Node cases.
746         (WebCore::shouldBeExposed): Added. Helper for the updateExposedState
747         function that handles the logic of when the element should be exposed,
748         separating it from what to do when the state changes.
749         (WebCore::HTMLObjectElement::updateExposedState): Renamed from
750         updateDocNamedItem.
751
752         * html/HTMLObjectElement.h: Renamed isDocNamedItem -> isExposed,
753         m_docNamedItem -> m_isExposed, updateDocNamedItem -> updateExposedState,
754         stopped using bit fields for the two boolean data members, and
755         initialized those data members here in the class definition.
756
757         * platform/Theme.cpp:
758         (WebCore::Theme::baselinePositionAdjustment): Moved here from header.
759         (WebCore::Theme::controlFont): Ditto.
760         (WebCore::Theme::controlSize): Ditto.
761         (WebCore::Theme::minimumControlSize): Ditto.
762         (WebCore::Theme::controlRequiresPreWhiteSpace): Ditto.
763         (WebCore::Theme::paint): Ditto.
764         (WebCore::Theme::inflateControlPaintRect): Ditto.
765         (WebCore::Theme::userPrefersReducedMotion): Ditto.
766         (WebCore::Theme::controlBorder): Fixed switch statement indentation.
767         (WebCore::Theme::controlPadding): Ditto.
768
769         * platform/Theme.h: Removed the many unnecessary includes. The one
770         I was really after here was FontCascade.h. Replaced the platformTheme
771         function with a singleton function, following our normal style. Also
772         changed the return type to a reference rather than a pointer.
773         Removed many unused function and data members.
774
775         * platform/cocoa/ThemeCocoa.h: Tightened up implementation, removing
776         unnecessary members and making overrides private.
777         * platform/cocoa/ThemeCocoa.mm: Moved include in here.
778
779         * platform/gamepad/glib/GamepadsGlib.cpp:
780         (WebCore::sampleGamepads): Use NeverDestroyed instead of
781         DEPRECATED_DEFINE_STATIC_LOCAL.
782
783         * platform/graphics/FontCascade.cpp:
784         (WebCore::useBackslashAsYenSignForFamily): Build the set in a cleaner
785         way and use a NeverDestroyed set instead of a heap-allocated one.
786         (WebCore::FontCascade::FontCascade): Moved initialization of data members
787         to the class definition.
788
789         * platform/graphics/FontCascade.h: Initialize GlyphOverflow and
790         FonstCascade data members in the class definition. Remove the constructor
791         for GlyphOverflow entirely. Added FIXME about the peculiar != operator we
792         defined for GlyphOverflow.
793
794         * platform/graphics/NamedImageGeneratedImage.cpp:
795         (WebCore::NamedImageGeneratedImage::draw): Use Theme::singleton() instead
796         of platformTheme().
797         (WebCore::NamedImageGeneratedImage::drawPattern): Ditto.
798
799         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
800         (WebCore::CMTimeRangeStartKey): Use CFSTR directly instead of using
801         DEPRECATED_DEFINE_STATIC_LOCAL.
802         (WebCore::CMTimeRangeDurationKey): Ditto.
803         (WebCore::CACFContextNeedsFlushNotification): Ditto.
804
805         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
806         (WebCore::LayerChangesFlusher::singleton): Use NeverDestroyed instead of
807         DEPRECATED_DEFINE_STATIC_LOCAL.
808         * platform/graphics/ca/win/LayerChangesFlusher.h: Ditto.
809
810         * platform/graphics/cg/ImageSourceCGWin.cpp:
811         (WebCore::preferredExtensionForImageSourceType): Use HashMap constructor
812         instead of writing out a lot of add calls.
813
814         * platform/graphics/harfbuzz/HarfBuzzFace.cpp:
815         (WebCore::harfBuzzFaceCache): Use NeverDestroyed instead of
816         DEPRECATED_DEFINE_STATIC_LOCAL.
817         * platform/graphics/win/FontCacheWin.cpp:
818         (WebCore::FontCache::lastResortFallbackFont): Ditto.
819
820         * platform/ios/ThemeIOS.h: Tightened up implementation, removing
821         unnecessary members and making overrides private.
822         * platform/ios/ThemeIOS.mm:
823         (WebCore::Theme::singleton): Renamed from platformTheme.
824
825         * platform/mac/ThemeMac.h: Tightened up implementation, removing
826         unnecessary members and making overrides private. Removed unneeded
827         WTF_MAKE_FAST_ALLOCATED since this is never allocated on the heap.
828         Removed unused -[NSFont webCoreFamilyName] method.
829         * platform/mac/ThemeMac.mm:
830         (-[NSFont webCoreFamilyName]): Deleted.
831         (WebCore::Theme::singleton): Renamed from platformTheme.
832
833         * platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
834         Removed unneeded include of FontCascade.h.
835         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
836         Ditto.
837         * platform/mock/MockRealtimeAudioSource.h: Ditto.
838
839         * platform/network/win/DownloadBundleWin.cpp:
840         (WebCore::DownloadBundle::fileExtension): Use NeverDestroyed
841         instead of DEPRECATED_DEFINE_STATIC_LOCAL.
842
843         * platform/win/ClipboardUtilitiesWin.cpp:
844         (WebCore::replaceNewlinesWithWindowsStyleNewlines): Use
845         appendLiteral instead of DEPRECATED_DEFINE_STATIC_LOCAL.
846
847         * platform/win/FileSystemWin.cpp:
848         (WebCore::bundleName): Use NeverDestroyed instead of
849         DEPRECATED_DEFINE_STATIC_LOCAL, and used a lambda to initialize
850         rather than a boolean to control one-time code.
851         (WebCore::storageDirectory): Removed unneeded use of
852         DEPRECATED_DEFINE_STATIC_LOCAL for a prefix we are appending to
853         a String. The + operator can handle a literal just as efficiently
854         without first storing it in a String.
855
856         * platform/wpe/ThemeWPE.cpp:
857         (WebCore::Theme::singleton): Renamed from platformTheme.
858         * platform/wpe/ThemeWPE.h: Tightened up implementation, removing
859         unnecessary members and making overrides private.
860
861         * rendering/RenderTheme.cpp:
862         (WebCore::RenderTheme::RenderTheme): No need to initialize m_theme.
863         (WebCore::RenderTheme::adjustStyle): Use Theme::singleton() instead
864         of accessing it through m_theme.
865         (WebCore::RenderTheme::paint): Ditto.
866         (WebCore::RenderTheme::baselinePosition): Ditto.
867         (WebCore::RenderTheme::adjustRepaintRect): Ditto.
868         (WebCore::RenderTheme::setCustomFocusRingColor): Ditto.
869         (WebCore::RenderTheme::platformTapHighlightColor): Ditto.
870
871         * rendering/RenderTheme.h: Removed unneded m_theme and unneeded
872         inclusion of Theme.h.
873
874         * rendering/line/LineBreaker.h: Removed unneeded include of
875         FontCascade.h.
876
877 2017-07-24  Chris Dumez  <cdumez@apple.com>
878
879         ExceptionCode enumeration should use modern exception names
880         https://bugs.webkit.org/show_bug.cgi?id=174794
881
882         Reviewed by Geoffrey Garen.
883
884         ExceptionCode enumeration should use modern exception names consistently.
885         This makes the code nicer and closer to the text of the specification.
886
887 2017-07-24  Andy Estes  <aestes@apple.com>
888
889         Consider implementing W3C Payment Request API
890         https://bugs.webkit.org/show_bug.cgi?id=174796
891
892         Reviewed by Daniel Bates.
893
894         Add Payment Request to features.json as "Under Consideration".
895
896         * features.json:
897
898 2017-07-24  Konstantin Tokarev  <annulen@yandex.ru>
899
900         Unreviewed attempt to fix Mac cmake build
901
902         * PlatformMac.cmake:
903
904 2017-07-24  Chris Dumez  <cdumez@apple.com>
905
906         Make ExceptionCode a proper enumeration
907         https://bugs.webkit.org/show_bug.cgi?id=174771
908
909         Reviewed by Sam Weinig.
910
911         Make ExceptionCode a proper enumeration instead of a typedef to uint8_t.
912
913         * Modules/fetch/FetchBody.h:
914         (WebCore::FetchBody::formData):
915         * Modules/indexeddb/shared/IDBError.h:
916         (WebCore::IDBError::encode):
917         (WebCore::IDBError::decode):
918         * bindings/js/JSSubtleCryptoCustom.cpp:
919         (WebCore::rejectWithException):
920         * dom/Exception.h:
921         * dom/ExceptionCode.h:
922         * fileapi/FileReaderSync.cpp:
923         (WebCore::errorCodeToExceptionCode):
924         * html/canvas/WebGLRenderingContextBase.cpp:
925         (WebCore::WebGLRenderingContextBase::texSubImage2D):
926         (WebCore::WebGLRenderingContextBase::texImage2D):
927         * xml/XMLHttpRequest.cpp:
928         (WebCore::XMLHttpRequest::createRequest):
929         * xml/XMLHttpRequest.h:
930
931 2017-07-24  Simon Fraser  <simon.fraser@apple.com>
932
933         Change "client" coordinates back to match scrolling coordinates
934         https://bugs.webkit.org/show_bug.cgi?id=174734
935         rdar://problem/33336930
936
937         Reviewed by Tim Horton.
938
939         Baidu.com (which uses jQuery), and various iOS apps make the assumption that getBoundingClientRect() returns a rectangle
940         that can be used to set or compare with the scroll position. With visual viewports, that assumption is no longer valid
941         when the page is zoomed, or when the keyboard has caused the visual viewport to detach from the layout viewport.
942
943         At this point the compatibility cost of shipping layout viewport-based client rects seems higher than the gain, so revert
944         to the shipping behavior. This reverts r216803, and will re-introduce bugs that occurred on zoomed pages on macOS,
945         many of which are noted in webkit.org/b/170981.
946
947         * page/FrameView.cpp:
948         (WebCore::FrameView::documentToClientOffset):
949
950 2017-07-24  Zan Dobersek  <zdobersek@igalia.com>
951
952         [WPE] libepoxy headers can use EGL_CAST, which might not be defined by eglplatform.h
953         https://bugs.webkit.org/show_bug.cgi?id=174780
954
955         Reviewed by Carlos Garcia Campos.
956
957         Newer versions of libepoxy provide EGL definitions that already use the EGL_CAST macro.
958         We'd like to compile on systems where the eglplatform.h header doesn't yet provide
959         that macro that was added only recently (e.g. it's available in Mesa 17.1, but not
960         before).
961
962         To address that, the EpoxyEGL.h header is added that first includes the libepoxy's EGL
963         header and then provides the EGL_CAST definition in case the eglplatform.h header doesn't.
964         This header should be included in place of <epoxy/egl.h> (which is included in this new
965         header).
966
967         The EpoxyEGL.h and EpoxyShims.h headers are also moved under the platform/graphics/epoxy/
968         directory, with the new directory added to the list of inclusion paths for WPE.
969
970         * PlatformWPE.cmake:
971         * platform/graphics/PlatformDisplay.cpp:
972         * platform/graphics/cairo/CairoUtilities.cpp:
973         * platform/graphics/cairo/ImageBufferCairo.cpp:
974         * platform/graphics/egl/GLContextEGL.cpp:
975         * platform/graphics/egl/GLContextEGLWPE.cpp:
976         * platform/graphics/epoxy/EpoxyEGL.h: Added.
977         * platform/graphics/epoxy/EpoxyShims.h: Renamed from Source/WebCore/platform/graphics/EpoxyShims.h.
978         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
979         * platform/graphics/wpe/PlatformDisplayWPE.cpp:
980
981 2017-07-24  Zan Dobersek  <zdobersek@igalia.com>
982
983         [CoordinatedGraphics] Remove unused GLDefs.h header
984         https://bugs.webkit.org/show_bug.cgi?id=174712
985
986         Reviewed by Michael Catanzaro.
987
988         * platform/graphics/opengl/GLDefs.h: Remove this unused header.
989         As far as my recollection goes it was used in the IPC-based
990         CoordinatedGraphics subsystem, which has been removed already.
991
992 2017-07-11  Frederic Wang  <fwang@igalia.com>
993
994         Add attribute allow-top-navigation-by-user-activation to iframe sandbox
995         https://bugs.webkit.org/show_bug.cgi?id=171327
996
997         Reviewed by Chris Dumez.
998
999         Tests: http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-1.html
1000                http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-2.html
1001                imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture-expected.txt
1002                imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-3-expected.txt
1003
1004         * dom/Document.cpp:
1005         (WebCore::Document::canNavigate): Case 2 of conformance verification is refined to match the
1006         current specification: Top navigation is allowed when it is triggered by user activation and
1007         when allow-top-navigation-by-user-activation is set. Because we have additional "security
1008         origin" rules with respect to the specification we also add some early return to ensure that
1009         navigation is really allowed for this new case.
1010         * dom/SecurityContext.cpp:
1011         (WebCore::SecurityContext::isSupportedSandboxPolicy): Add allow-top-navigation-by-user-activation flag.
1012         (WebCore::SecurityContext::parseSandboxPolicy): Parse the new flag to allow top user
1013         navigation by user activation. Also, make sure that allow-top-navigation allows such
1014         navigation as defined by the specification.
1015         * dom/SecurityContext.h: Declare new sandboxing flag.
1016
1017 2017-07-23  Wenson Hsieh  <wenson_hsieh@apple.com>
1018
1019         [iOS WK2] 5 DataInteractionTests are failing: observed selection rects after dropping don't match expected values
1020         https://bugs.webkit.org/show_bug.cgi?id=174769
1021         <rdar://problem/33478864>
1022
1023         Reviewed by Tim Horton.
1024
1025         These tests began failing after r219541, due to a change in behavior of whether or not we call
1026         setIgnoreSelectionChanges(false, RevealSelection::No) or setIgnoreSelectionChanges(false, RevealSelection::Yes)
1027         when performing a text editing drop.
1028
1029         Before r219541, we would not reveal the selection when performing an edit drag operation. This is because in
1030         WebPage::performDragControllerAction, we would begin ignoring selection changes by calling
1031         setIgnoreSelectionChanges(true). However, while taking a text indicator snapshot, we would stop ignoring
1032         selection in TextIndicator::createWithRange due to us calling setIgnoreSelectionChanges(false,
1033         RevealSelection::No) at the end of the function. Then, when we return to the scope of
1034         WebPage::performDragControllerAction and try to setIgnoreSelectionChanges(false), this is a no-op because we've
1035         already stopped ignoring selection changes.
1036
1037         After r219541, switching to using TemporarySelectionChange means that TextIndicator::createWithRange now means
1038         we respect whether or not we were already ignoring selection before taking the snapshot, so we won't always
1039         setIgnoreSelectionChanges(false) at the end. This means that selection changes will now be correctly ignored
1040         when performing a drag operation, but this also means that we'll try to reveal the selection, since
1041         WebPage::performDragControllerAction calls setIgnoreSelectionChanges(false), for which RevealSelection::Yes
1042         is used by default.
1043
1044         Revealing the selection in WebPage::performDragControllerAction was unintended in the first place, so we should
1045         revert to calling setIgnoreSelectionChanges(false, RevealSelection::No). To ensure this, we adopt
1046         TemporarySelectionChange here and pass only TemporarySelectionOptionIgnoreSelectionChanges, so that we won't
1047         additionally try to reveal selection after the drop. This is consistent with behavior prior to macOS 10.13 and
1048         iOS 11. Additionally, this patch also moves the call to ignore selection change from WebKit into WebCore, so
1049         that whether we ignore selection is consistent across both WebKit1 and WebKit2.
1050
1051         * page/DragController.cpp:
1052         (WebCore::DragController::performDragOperation):
1053
1054 2017-07-23  Chris Dumez  <cdumez@apple.com>
1055
1056         Drop ExceptionCodeDescription class
1057         https://bugs.webkit.org/show_bug.cgi?id=174757
1058
1059         Reviewed by Darin Adler.
1060
1061         Drop ExceptionCodeDescription class now that there is only one exception
1062         type: DOMException. Instead, we now have static methods on DOMException
1063         to get the name / message for a given exception code.
1064
1065         * CMakeLists.txt:
1066         * Modules/indexeddb/shared/IDBError.cpp:
1067         (WebCore::IDBError::name):
1068         (WebCore::IDBError::message):
1069         * Modules/quota/StorageErrorCallback.cpp:
1070         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
1071         * WebCore.xcodeproj/project.pbxproj:
1072         * bindings/js/JSDOMExceptionHandling.cpp:
1073         (WebCore::createDOMException):
1074         * dom/DOMAllInOne.cpp:
1075         * dom/DOMException.cpp:
1076         (WebCore::errorCodeFromName):
1077         (WebCore::DOMException::create):
1078         (WebCore::DOMException::DOMException):
1079         (WebCore::DOMException::name):
1080         (WebCore::DOMException::message):
1081         * dom/DOMException.h:
1082         * dom/ExceptionCodeDescription.cpp: Removed.
1083         * dom/ExceptionCodeDescription.h: Removed.
1084         * inspector/DOMEditor.cpp:
1085         (WebCore::populateErrorString):
1086         * inspector/InspectorDOMAgent.cpp:
1087         (WebCore::InspectorDOMAgent::toErrorString):
1088         * inspector/InspectorDOMStorageAgent.cpp:
1089         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
1090
1091 2017-07-22  Dan Bernstein  <mitz@apple.com>
1092
1093         Fixed building for macOS 10.12 with the macOS 10.13 SDK after r219644.
1094
1095         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
1096         (WebCore::CDMSessionAVStreamSession::update): Suppress the objc-literal-conversion warning
1097           in one place where we are calling a class method on a Class and the compiler can’t tell
1098           which class it is, so it chooses wrong and emits a warning.
1099
1100 2017-07-22  Chris Dumez  <cdumez@apple.com>
1101
1102         Merge ExceptionBase into DOMException and drop custom toString
1103         https://bugs.webkit.org/show_bug.cgi?id=174755
1104
1105         Reviewed by Sam Weinig.
1106
1107         Merge ExceptionBase into DOMException and drop custom toString, now that DOMException
1108         is the only remaining exception type.
1109
1110         * CMakeLists.txt:
1111         * Modules/mediastream/MediaStream.h:
1112         * WebCore.xcodeproj/project.pbxproj:
1113         * bindings/js/JSDOMExceptionHandling.cpp:
1114         (WebCore::retrieveErrorMessage):
1115         * dom/DOMAllInOne.cpp:
1116         * dom/DOMException.cpp:
1117         (WebCore::DOMException::DOMException):
1118         (WebCore::DOMException::initializeDescription):
1119         * dom/DOMException.h:
1120         (WebCore::DOMException::code):
1121         (WebCore::DOMException::name):
1122         (WebCore::DOMException::message):
1123         * dom/ExceptionBase.cpp: Removed.
1124         * dom/ExceptionBase.h: Removed.
1125
1126 2017-07-14  Filip Pizlo  <fpizlo@apple.com>
1127
1128         It should be easy to decide how WebKit yields
1129         https://bugs.webkit.org/show_bug.cgi?id=174298
1130
1131         Reviewed by Saam Barati.
1132
1133         No new tests because the WebCore change is just a change to how we #include things.
1134
1135         * inspector/InspectorPageAgent.h:
1136         * inspector/TimelineRecordFactory.h:
1137         * workers/Worker.h:
1138         * workers/WorkerGlobalScopeProxy.h:
1139         * workers/WorkerMessagingProxy.h:
1140
1141 2017-07-22  Said Abou-Hallawa  <sabouhallawa@apple.com>
1142
1143         REGRESSION(r219045): A partially loaded image may not be repainted when its complete frame finishes decoding
1144         https://bugs.webkit.org/show_bug.cgi?id=174230
1145
1146         Reviewed by Simon Fraser.
1147
1148         Because of r219045, we now only repaint the CachedImageClinets which tried
1149         to draw the image but they could not because they have to wait for the image
1150         decoding to finish. This was done by keeping a HashSet of these clients 
1151         and make CachedImage own it. This HashSet is cleared once the image frame
1152         finishes decoding and all the waited clients are repainted.
1153
1154         But Multiple asynchronous image decoding requests are allowed for the same
1155         frame if new data is added to the image source. If we tried to draw the 
1156         same image twice before it finishes decoding the first request, we will
1157         not be to record this second request since the HashSet will not add the
1158         same client twice. When he second request finishes decoding, CachedImage
1159         will not repaint any client since its HashSet is empty.
1160
1161         To fix this problem we can do the following. When an image frame finishes
1162         decoding, CachedImage will keep its HashSet of pending drawing clients as
1163         long as the image frame is a partially loaded frame.
1164
1165         * loader/cache/CachedImage.cpp:
1166         (WebCore::CachedImage::CachedImageObserver::imageFrameAvailable):
1167         (WebCore::CachedImage::imageFrameAvailable):
1168         * loader/cache/CachedImage.h:
1169         * platform/graphics/BitmapImage.cpp:
1170         (WebCore::BitmapImage::destroyDecodedData):
1171         (WebCore::BitmapImage::dataChanged):
1172         (WebCore::BitmapImage::setCurrentFrameDecodingStatusIfNecessary):
1173         (WebCore::BitmapImage::draw):
1174         (WebCore::BitmapImage::internalStartAnimation):
1175         (WebCore::BitmapImage::internalAdvanceAnimation):
1176         (WebCore::BitmapImage::imageFrameAvailableAtIndex):
1177         * platform/graphics/BitmapImage.h:
1178         * platform/graphics/ImageFrame.cpp:
1179         (WebCore::ImageFrame::decodingStatus):
1180         * platform/graphics/ImageFrame.h: Move DecodingStatus out of this class
1181         to ImageTypes.h to avoid adding other header files to ImageObvsever.h
1182         * platform/graphics/ImageFrameCache.cpp:
1183         (WebCore::ImageFrameCache::setNativeImage):
1184         (WebCore::ImageFrameCache::cacheMetadataAtIndex):
1185         (WebCore::ImageFrameCache::cacheNativeImageAtIndex):
1186         (WebCore::ImageFrameCache::cacheNativeImageAtIndexAsync):
1187         (WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
1188         (WebCore::ImageFrameCache::frameDecodingStatusAtIndex):
1189         * platform/graphics/ImageFrameCache.h:
1190         * platform/graphics/ImageObserver.h:
1191         * platform/graphics/ImageSource.h:
1192         (WebCore::ImageSource::frameDecodingStatusAtIndex):
1193         * platform/graphics/ImageTypes.h:
1194         * platform/image-decoders/bmp/BMPImageReader.cpp:
1195         (WebCore::BMPImageReader::decodeBMP):
1196         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1197         (WebCore::GIFImageDecoder::frameComplete):
1198         (WebCore::GIFImageDecoder::initFrameBuffer):
1199         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1200         (WebCore::JPEGImageDecoder::outputScanlines):
1201         (WebCore::JPEGImageDecoder::jpegComplete):
1202         * platform/image-decoders/png/PNGImageDecoder.cpp:
1203         (WebCore::PNGImageDecoder::rowAvailable):
1204         (WebCore::PNGImageDecoder::pngComplete):
1205         (WebCore::PNGImageDecoder::frameComplete):
1206         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1207         (WebCore::WEBPImageDecoder::decode):
1208         * rendering/RenderBoxModelObject.cpp:
1209         (WebCore::RenderBoxModelObject::decodingModeForImageDraw):
1210
1211 2017-07-22  Timothy Horton  <timothy_horton@apple.com>
1212
1213         Drag and Drop preview image for Twitter link is the wrong shape
1214         ​https://bugs.webkit.org/show_bug.cgi?id=174731
1215         <rdar://problem/33335616>
1216
1217         * dom/Range.cpp:
1218         (WebCore::Range::absoluteRectsForRangeInText):
1219         * page/TextIndicator.cpp:
1220         (WebCore::initializeIndicator):
1221         Apply some post-landing review feedback for r219756.
1222
1223 2017-07-21  Chris Dumez  <cdumez@apple.com>
1224
1225         Drop IDBDatabaseException class
1226         https://bugs.webkit.org/show_bug.cgi?id=174743
1227
1228         Reviewed by Darin Adler.
1229
1230         Drop IDBDatabaseException class and use DOMException directly. IDBDatabaseException was
1231         only an internal concept and was already exposed to the Web as a DOMException. This
1232         simplifies the code a bit and will allow for further simplification in a follow-up patch.
1233
1234         No new tests, no Web-facing behavior change, except for some exception messages
1235         being slightly different.
1236
1237         * CMakeLists.txt:
1238         * Modules/indexeddb/IDBCursor.cpp:
1239         (WebCore::IDBCursor::update):
1240         (WebCore::IDBCursor::advance):
1241         (WebCore::IDBCursor::continuePrimaryKey):
1242         (WebCore::IDBCursor::continueFunction):
1243         (WebCore::IDBCursor::deleteFunction):
1244         * Modules/indexeddb/IDBDatabase.cpp:
1245         (WebCore::IDBDatabase::createObjectStore):
1246         (WebCore::IDBDatabase::transaction):
1247         (WebCore::IDBDatabase::deleteObjectStore):
1248         * Modules/indexeddb/IDBDatabaseError.h: Removed.
1249         * Modules/indexeddb/IDBDatabaseException.cpp: Removed.
1250         * Modules/indexeddb/IDBDatabaseException.h: Removed.
1251         * Modules/indexeddb/IDBFactory.cpp:
1252         (WebCore::IDBFactory::cmp):
1253         * Modules/indexeddb/IDBIndex.cpp:
1254         (WebCore::IDBIndex::setName):
1255         (WebCore::IDBIndex::openCursor):
1256         (WebCore::IDBIndex::openKeyCursor):
1257         (WebCore::IDBIndex::count):
1258         (WebCore::IDBIndex::doCount):
1259         (WebCore::IDBIndex::get):
1260         (WebCore::IDBIndex::doGet):
1261         (WebCore::IDBIndex::getKey):
1262         (WebCore::IDBIndex::doGetKey):
1263         (WebCore::IDBIndex::getAll):
1264         (WebCore::IDBIndex::getAllKeys):
1265         * Modules/indexeddb/IDBKeyRange.cpp:
1266         (WebCore::IDBKeyRange::only):
1267         (WebCore::IDBKeyRange::lowerBound):
1268         (WebCore::IDBKeyRange::upperBound):
1269         (WebCore::IDBKeyRange::bound):
1270         (WebCore::IDBKeyRange::includes):
1271         * Modules/indexeddb/IDBObjectStore.cpp:
1272         (WebCore::IDBObjectStore::setName):
1273         (WebCore::IDBObjectStore::openCursor):
1274         (WebCore::IDBObjectStore::openKeyCursor):
1275         (WebCore::IDBObjectStore::get):
1276         (WebCore::IDBObjectStore::getKey):
1277         (WebCore::IDBObjectStore::putOrAdd):
1278         (WebCore::IDBObjectStore::doDelete):
1279         (WebCore::IDBObjectStore::deleteFunction):
1280         (WebCore::IDBObjectStore::clear):
1281         (WebCore::IDBObjectStore::createIndex):
1282         (WebCore::IDBObjectStore::index):
1283         (WebCore::IDBObjectStore::deleteIndex):
1284         (WebCore::IDBObjectStore::count):
1285         (WebCore::IDBObjectStore::doCount):
1286         (WebCore::IDBObjectStore::getAll):
1287         (WebCore::IDBObjectStore::getAllKeys):
1288         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1289         (WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
1290         * Modules/indexeddb/IDBRequest.cpp:
1291         (WebCore::IDBRequest::result):
1292         (WebCore::IDBRequest::error):
1293         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
1294         * Modules/indexeddb/IDBTransaction.cpp:
1295         (WebCore::IDBTransaction::objectStore):
1296         (WebCore::IDBTransaction::abort):
1297         (WebCore::IDBTransaction::abortOnServerAndCancelRequests):
1298         (WebCore::IDBTransaction::didCreateIndexOnServer):
1299         (WebCore::IDBTransaction::putOrAddOnServer):
1300         * Modules/indexeddb/server/IndexValueStore.cpp:
1301         (WebCore::IDBServer::IndexValueStore::addRecord):
1302         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1303         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
1304         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
1305         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
1306         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
1307         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
1308         (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
1309         (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
1310         (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
1311         (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
1312         (WebCore::IDBServer::MemoryIDBBackingStore::renameIndex):
1313         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
1314         (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
1315         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
1316         (WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords):
1317         (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
1318         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
1319         (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber):
1320         (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
1321         (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
1322         * Modules/indexeddb/server/MemoryIndex.cpp:
1323         (WebCore::IDBServer::MemoryIndex::putIndexKey):
1324         * Modules/indexeddb/server/MemoryObjectStore.cpp:
1325         (WebCore::IDBServer::MemoryObjectStore::createIndex):
1326         (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
1327         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1328         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
1329         (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
1330         (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
1331         (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
1332         (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
1333         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
1334         (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
1335         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
1336         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
1337         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
1338         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
1339         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
1340         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
1341         (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
1342         (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
1343         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords):
1344         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
1345         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
1346         (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
1347         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
1348         (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
1349         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
1350         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
1351         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
1352         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
1353         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
1354         (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
1355         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
1356         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
1357         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
1358         (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
1359         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
1360         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
1361         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
1362         * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
1363         (WebCore::IDBServer::SQLiteIDBTransaction::begin):
1364         (WebCore::IDBServer::SQLiteIDBTransaction::commit):
1365         (WebCore::IDBServer::SQLiteIDBTransaction::abort):
1366         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1367         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
1368         (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
1369         (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
1370         (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
1371         (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
1372         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
1373         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
1374         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
1375         * Modules/indexeddb/shared/IDBError.cpp:
1376         (WebCore::IDBError::name):
1377         (WebCore::IDBError::message):
1378         (WebCore::IDBError::toDOMError):
1379         * Modules/indexeddb/shared/IDBError.h:
1380         (WebCore::IDBError::userDeleteError):
1381         (WebCore::IDBError::isNull):
1382         * WebCore.xcodeproj/project.pbxproj:
1383         * bindings/js/JSDOMExceptionHandling.cpp:
1384         (WebCore::createDOMException):
1385
1386         * dom/DOMException.cpp:
1387         (WebCore::DOMException::initializeDescription):
1388         Initialize description->code from using the actual error codes in the
1389         coreExceptions table, instead of initializing it using |ec|. |ec| is
1390         the index in the ExceptionCode enumeration and it matches the error
1391         code only for legacy exceptions. New exceptions such as DataError
1392         should have a code of 0. Without this change, w3c for IDB would start
1393         failing.
1394
1395         * dom/ExceptionCodeDescription.cpp:
1396         (WebCore::ExceptionCodeDescription::ExceptionCodeDescription):
1397         * dom/ExceptionCodeDescription.h:
1398
1399 2017-07-21  Sam Weinig  <sam@webkit.org>
1400
1401         [WebIDL] Simplify XMLHttpRequest bindings by removing built-ins
1402         https://bugs.webkit.org/show_bug.cgi?id=174740
1403
1404         Reviewed by Chris Dumez.
1405
1406         The behavior we were getting from XMLHttpRequest.js can be implemented
1407         with the [CachedAttribute] extended attribute. This reduces the number
1408         of JS -> C++ jumps required and makes the code more similar to other
1409         bindings that need caching of an IDL any value.
1410
1411         * CMakeLists.txt:
1412         * DerivedSources.make:
1413         * xml/XMLHttpRequest.js: Removed.
1414         Remove XMLHttpRequest.js.
1415
1416         * bindings/js/JSXMLHttpRequestCustom.cpp:
1417         (WebCore::JSXMLHttpRequest::response):
1418         (WebCore::JSXMLHttpRequest::retrieveResponse): Deleted.
1419         * xml/XMLHttpRequest.idl:
1420         Replace builtin with a [CachedAttribute] and [CustomGetter]
1421         for the response property.
1422
1423 2017-07-21  Timothy Horton  <timothy_horton@apple.com>
1424
1425         Drag and Drop preview image for Twitter link is the wrong shape
1426         https://bugs.webkit.org/show_bug.cgi?id=174731
1427         <rdar://problem/33335616>
1428
1429         Reviewed by Zalan Bujtas.
1430
1431         TextIndicator uses Range::borderAndTextQuads and ::absoluteTextRects
1432         in order to get the rects of the indicated text. Currently, these
1433         functions do not respect clipping, so clipped-out text (e.g. as seen
1434         inside links on Twitter) generates lots of meaningless indicated rects.
1435
1436         * page/TextIndicator.cpp:
1437         (WebCore::estimatedBackgroundColorForRange):
1438         (WebCore::hasAnyIllegibleColors):
1439         Change adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary
1440         to instead be hasAnyIllegibleColors, and referred to in the same place
1441         as hasNonInlineOrReplacedElements, so that it follows the same
1442         upgrade path (leaving textRects empty, so that it is later filled in
1443         with the absoluteBoundingRect). This was a mistake in r219033, which
1444         instead would end up painting all content, but filling in textRects
1445         with the actual individual text rects.
1446
1447         This alone changes the behavior on Twitter from lots of jagged misplaced
1448         rects to a too-large bounding rect. Combined with the following changes,
1449         the bounding rect is reduced to the right size:
1450
1451         (WebCore::initializeIndicator):
1452         Adopt the new Range::borderAndTextQuads and ::absoluteTextRects parameter
1453         and opt-in to respecting clipping for text rects.
1454
1455         * dom/DOMRectList.cpp:
1456         (WebCore::DOMRectList::DOMRectList):
1457         * dom/DOMRectList.h:
1458         (WebCore::DOMRectList::create):
1459         Add a DOMRectList constructor and create() that take FloatRects, similar
1460         to the one that takes FloatQuads, but without the boundingRect() calls.
1461
1462         * dom/Document.h:
1463         * dom/Document.cpp:
1464         (WebCore::Document::convertAbsoluteToClientRects):
1465         Add convertAbsoluteToClientRects, similar to covertAbsoluteToClientQuads,
1466         except acting on rects instead of quads.
1467
1468         * dom/Range.cpp:
1469         (WebCore::Range::absoluteRectsForRangeInText):
1470         (WebCore::Range::absoluteTextRects):
1471         (WebCore::Range::getClientRects):
1472         (WebCore::Range::borderAndTextRects):
1473         (WebCore::Range::boundingRect):
1474         (WebCore::Range::absoluteBoundingRect):
1475         (WebCore::Range::borderAndTextQuads): Deleted.
1476         * dom/Range.h:
1477         Replace borderAndTextQuads with borderAndTextRects, because all callers
1478         just ended up calling boundingBox() on the quads.
1479
1480         Factor absoluteRectsForRangeInText out of absoluteTextRects and
1481         borderAndTextQuads, and teach it to optionally intersect the text rects
1482         with their renderer's absoluteClippedOverflowRect.
1483
1484 2017-07-21  Per Arne Vollan  <pvollan@apple.com>
1485
1486         Round-tripping stroke-width styles through getComputedStyle cause the text to gain a stroke.
1487         https://bugs.webkit.org/show_bug.cgi?id=174701
1488         <rdar://problem/32903679>
1489
1490         Reviewed by Simon Fraser.
1491
1492         The initial value of stroke-color should be transparent, see https://www.w3.org/TR/fill-stroke-3/#stroke-color.
1493         Also, there is no need to set the graphics context in text stroke mode, if the stroke color is not visible.
1494
1495         Test: fast/css/round-trip-stroke-width-using-computed-style.html
1496
1497         * rendering/TextPaintStyle.cpp:
1498         (WebCore::updateGraphicsContext):
1499         * rendering/style/RenderStyle.h:
1500         (WebCore::RenderStyle::initialStrokeWidth):
1501         (WebCore::RenderStyle::initialStrokeColor):
1502         * rendering/style/StyleRareInheritedData.cpp:
1503         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1504
1505 2017-07-21  Timothy Horton  <timothy_horton@apple.com>
1506
1507         Remove an inaccurate comment from RenderTextLineBoxes
1508
1509         * rendering/RenderTextLineBoxes.cpp:
1510         (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
1511         This comment has been wrong for at least 4 years.
1512
1513 2017-07-21  Timothy Horton  <timothy_horton@apple.com>
1514
1515         TextIndicator::estimatedTextColorsForRange asserts inside HashSet code (inserting reserved value)
1516         https://bugs.webkit.org/show_bug.cgi?id=174733
1517
1518         Reviewed by Wenson Hsieh.
1519
1520         * page/TextIndicator.cpp:
1521         (WebCore::estimatedTextColorsForRange):
1522         (WebCore::adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary):
1523         RGBA32 isn't a valid hash key, because we have no traits that define the
1524         empty or deleted values, nor do we have any bits we could feasibly
1525         use -- the full range of RGBA32 is easy to reach with various colors.
1526
1527         Instead, hash Color directly.
1528
1529 2017-07-21  Nan Wang  <n_wang@apple.com>
1530
1531         AX: Expose form validation on iOS as hint
1532         https://bugs.webkit.org/show_bug.cgi?id=174722
1533         <rdar://problem/33459761>
1534
1535         Reviewed by Chris Fleizach.
1536
1537         Adding the validation message to the hint of the form control element.
1538
1539         Test: accessibility/ios-simulator/form-control-validation-message.html
1540
1541         * accessibility/AccessibilityObject.cpp:
1542         (WebCore::AccessibilityObject::isShowingValidationMessage):
1543         (WebCore::AccessibilityObject::validationMessage):
1544         * accessibility/AccessibilityObject.h:
1545         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1546         (-[WebAccessibilityObjectWrapper accessibilityHint]):
1547         (-[WebAccessibilityObjectWrapper accessibilityIsShowingValidationMessage]):
1548         * html/HTMLFormControlElement.cpp:
1549         (WebCore::HTMLFormControlElement::isShowingValidationMessage):
1550         * html/HTMLFormControlElement.h:
1551
1552 2017-07-21  Konstantin Tokarev  <annulen@yandex.ru>
1553
1554         [cmake][Mac] Unreviewed, fix linking WebKitSystemInterface
1555
1556         After r219560 link_directories() in PlatformXXX.cmake files does not
1557         affect corresponding targets.
1558
1559         * PlatformMac.cmake:
1560
1561 2017-07-21  Sam Weinig  <sam@webkit.org>
1562
1563         [WebIDL] Remove the need for the side map of DeprecatedCSSOMValue roots
1564         https://bugs.webkit.org/show_bug.cgi?id=174713
1565
1566         Reviewed by Andreas Kling.
1567
1568         We used to not want to bloat the size of CSSValues with a pointer to the
1569         owner CSSStyleDeclaration, so, for GC purposes we need kept a mapping of
1570         them on DOMWrapperWorld that only got set if a wrapper was made. Now that
1571         we have DeprecatedCSSOMValue, a wrapper for CSSValue that only gets created
1572         for the bindings, we no longer need the side table, and simply have the
1573         DeprecatedCSSOMValue maintain a reference to the CSSStyleDeclaration.
1574
1575         * bindings/js/DOMWrapperWorld.h:
1576         (WebCore::DOMWrapperWorld::wrappers):
1577         Remove m_deprecatedCSSOMValueRoots and make m_wrappers private with a getter.
1578
1579         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1580         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Deleted.
1581         Remove custom implementation of getPropertyCSSValue, now that it no longer
1582         needs to update m_deprecatedCSSOMValueRoots.
1583
1584         * bindings/js/JSDOMWindowBase.cpp:
1585         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
1586         * bindings/js/JSDOMWrapperCache.h:
1587         (WebCore::getCachedWrapper):
1588         (WebCore::cacheWrapper):
1589         (WebCore::uncacheWrapper):
1590         * bindings/js/JSNodeCustom.cpp:
1591         (WebCore::getOutOfLineCachedWrapper):
1592         Use wrappers getter rather than direct member variable.
1593
1594         * bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
1595         (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
1596         Rather than checking the side table for roots, now get the root
1597         via the reference CSSStyleDeclaration.
1598
1599         (WebCore::JSDeprecatedCSSOMValueOwner::finalize): Deleted.
1600         Remove custom finalize now that we don't have to remove ourself
1601         from m_deprecatedCSSOMValueRoots.
1602
1603         * css/CSSStyleDeclaration.idl:
1604         Remove [Custom] from getPropertyCSSValue.
1605
1606         * css/DeprecatedCSSOMValue.idl:
1607         Remove [JSCustomFinalize].
1608
1609         * css/CSSComputedStyleDeclaration.cpp:
1610         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1611         * css/CSSImageValue.cpp:
1612         (WebCore::CSSImageValue::createDeprecatedCSSOMWrapper):
1613         * css/CSSImageValue.h:
1614         * css/CSSPrimitiveValue.cpp:
1615         (WebCore::CSSPrimitiveValue::createDeprecatedCSSOMPrimitiveWrapper):
1616         * css/CSSPrimitiveValue.h:
1617         * css/CSSStyleDeclaration.h:
1618         * css/CSSValue.cpp:
1619         (WebCore::CSSValue::createDeprecatedCSSOMWrapper):
1620         * css/CSSValue.h:
1621         * css/DeprecatedCSSOMCounter.h:
1622         * css/DeprecatedCSSOMPrimitiveValue.cpp:
1623         (WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue):
1624         (WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue):
1625         (WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue):
1626         * css/DeprecatedCSSOMPrimitiveValue.h:
1627         (WebCore::DeprecatedCSSOMPrimitiveValue::create):
1628         (WebCore::DeprecatedCSSOMPrimitiveValue::DeprecatedCSSOMPrimitiveValue):
1629         * css/DeprecatedCSSOMRGBColor.h:
1630         * css/DeprecatedCSSOMRect.h:
1631         * css/DeprecatedCSSOMValue.h:
1632         (WebCore::DeprecatedCSSOMValue::owner):
1633         (WebCore::DeprecatedCSSOMValue::DeprecatedCSSOMValue):
1634         (WebCore::DeprecatedCSSOMComplexValue::create):
1635         (WebCore::DeprecatedCSSOMComplexValue::DeprecatedCSSOMComplexValue):
1636         * css/DeprecatedCSSOMValueList.h:
1637         (WebCore::DeprecatedCSSOMValueList::create):
1638         (WebCore::DeprecatedCSSOMValueList::DeprecatedCSSOMValueList):
1639         * css/PropertySetCSSStyleDeclaration.cpp:
1640         (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM):
1641         * css/PropertySetCSSStyleDeclaration.h:
1642         * svg/SVGElement.cpp:
1643         (WebCore::SVGElement::getPresentationAttribute):
1644         Pass owning CSSStyleDeclaration to DeprecatedCSSOMValue and derived classes.
1645
1646 2017-07-21  Andreas Kling  <akling@apple.com>
1647
1648         Use more references in event dispatch code
1649         https://bugs.webkit.org/show_bug.cgi?id=174681
1650
1651         Reviewed by Geoffrey Garen.
1652
1653         Make EventListener::handleEvent() take a ScriptExecutionContext&, Event&.
1654         Then make everything build again. Various null checks and assertions
1655         disappear in the process.
1656
1657         * bindings/js/JSErrorHandler.cpp:
1658         (WebCore::JSErrorHandler::handleEvent):
1659         * bindings/js/JSErrorHandler.h:
1660         * bindings/js/JSEventListener.cpp:
1661         (WebCore::JSEventListener::initializeJSFunction):
1662         (WebCore::JSEventListener::handleEvent):
1663         (WebCore::eventHandlerAttribute):
1664         * bindings/js/JSEventListener.h:
1665         (WebCore::JSEventListener::jsFunction):
1666         * bindings/js/JSLazyEventListener.cpp:
1667         (WebCore::JSLazyEventListener::initializeJSFunction):
1668         * bindings/js/JSLazyEventListener.h:
1669         * dom/EventListener.h:
1670         * dom/EventTarget.cpp:
1671         (WebCore::EventTarget::fireEventListeners):
1672         * html/HTMLPlugInElement.cpp:
1673         (WebCore::HTMLPlugInElement::defaultEventHandler):
1674         * html/ImageDocument.cpp:
1675         (WebCore::ImageEventListener::handleEvent):
1676         * inspector/CommandLineAPIHost.cpp:
1677         (WebCore::listenerEntriesFromListenerInfo):
1678         * inspector/InspectorDOMAgent.cpp:
1679         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1680         * inspector/InspectorIndexedDBAgent.cpp:
1681         * platform/Widget.h:
1682         (WebCore::Widget::handleEvent):
1683         * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
1684         * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
1685         (WebCore::WebPlaybackSessionModelMediaElement::handleEvent):
1686         * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
1687         * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
1688         (WebVideoFullscreenModelVideoElement::handleEvent):
1689         * svg/SVGTRefElement.cpp:
1690         (WebCore::SVGTRefTargetEventListener::handleEvent):
1691         * svg/animation/SVGSMILElement.cpp:
1692         (WebCore::ConditionEventListener::handleEvent):
1693         (WebCore::SVGSMILElement::handleConditionEvent):
1694         * svg/animation/SVGSMILElement.h:
1695
1696 2017-07-21  Zalan Bujtas  <zalan@apple.com>
1697
1698         iBooks: Overlapping/missing content at beginning/end of paragraph.
1699         https://bugs.webkit.org/show_bug.cgi?id=174717
1700         <rdar://problem/33117912>
1701
1702         Reviewed by Simon Fraser.
1703
1704         By definiton simple and normal line layout should always produce the exact same lineboxes. It enables us not
1705         to force repaint while swapping between these 2 line layouts.
1706         However in certain cases (font size pixel rounding as an example) they don't agree on how much content fits the line and
1707         that could result in missing/overlapping content due to the lack of repaint. 
1708
1709         Unable to test.
1710
1711         * rendering/RenderBlockFlow.cpp:
1712         (WebCore::RenderBlockFlow::ensureLineBoxes):
1713
1714 2017-07-21  Chris Dumez  <cdumez@apple.com>
1715
1716         Drop make_dom_exceptions.pl script that we only have DOMException
1717         https://bugs.webkit.org/show_bug.cgi?id=174699
1718
1719         Reviewed by Darin Adler.
1720
1721         Drop make_dom_exceptions.pl script that we only have DOMException.
1722
1723         * CMakeLists.txt:
1724         * DerivedSources.make:
1725         * WebCore.xcodeproj/project.pbxproj:
1726         * WebCoreMacros.cmake:
1727         * bindings/js/JSDOMExceptionHandling.cpp:
1728         * css/FontFaceSet.cpp:
1729         * dom/DOMAllInOne.cpp:
1730         * dom/DOMExceptions.in: Removed.
1731         * dom/ExceptionCodeDescription.cpp: Added.
1732         (WebCore::ExceptionCodeDescription::ExceptionCodeDescription):
1733         * dom/ExceptionCodeDescription.h: Added.
1734         * dom/make_dom_exceptions.pl: Removed.
1735         * inspector/WebInjectedScriptHost.cpp:
1736         (WebCore::WebInjectedScriptHost::subtype):
1737
1738 2017-07-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
1739
1740         [CG] An image should not invoke many system calls before confirming its format is supported
1741         https://bugs.webkit.org/show_bug.cgi?id=174692
1742
1743         Reviewed by Tim Horton.
1744
1745         We should be careful when invoking system calls before confirming that the
1746         image type is available and it is one of the whitelist formats. Otherwise
1747         we will be calling the parsers of the unsupported formats.
1748
1749         * loader/cache/CachedImage.cpp:
1750         (WebCore::CachedImage::setImageDataBuffer): The check isAllowedImageUTI()
1751         is now done in ImageDecoder::encodedDataStatus() which will return Error
1752         if there is an error in the data or "isAllowedImageUTI() returns false."
1753
1754         * platform/graphics/BitmapImage.cpp:
1755         (WebCore::BitmapImage::dataChanged): Avoid calling canUseAsyncDecodingForLargeImages()
1756         before confirming the image type is available and it's supported by WebKit.
1757         canUseAsyncDecodingForLargeImages() tries to cache the first frame of the
1758         image to know its size. Asking the ImageFrameCache to destroy its decoded
1759         frames is not needed unless ImageFrameCache::decodedSize() is not zero.
1760
1761         * platform/graphics/cg/ImageDecoderCG.cpp:
1762         (WebCore::ImageDecoder::encodedDataStatus): Avoid calling CGImageSourceGetStatus()
1763         before knowing the UTI of the image. When knowing it, we call CGImageSourceGetStatus()
1764         and if it returns kCGImageStatusIncomplete or kCGImageStatusComplete, we
1765         check whether isAllowedImageUTI() or not. If isAllowedImageUTI() returns
1766         false, return Error which will make the CachedImage cancel loading the 
1767         rest of the image.
1768
1769 2017-07-21  Jeremy Jones  <jeremyj@apple.com>
1770
1771         AudioTrackPrivateMediaStreamCocoa shouldn't set AudioSession::setPreferredBufferSize
1772         https://bugs.webkit.org/show_bug.cgi?id=174707
1773         rdar://problem/33446809
1774
1775         Reviewed by Eric Carlson.
1776
1777         Manually tested for audio side effects.
1778
1779         AudioChannel::copyFrom fails when AudioChannel lengths don't match.
1780
1781         This happens because PlatformMediaSessionManager::updateSessionState() owns and sets
1782         AudioSession::setPreferredBufferSize().
1783
1784         However, AudioTrackPrivateMediaStreamCocoa::createAudioUnit, when it creates an input
1785         audio unit is setting AudioSession::setPreferredBufferSize() directly to its own arbitrary value.
1786
1787         AudioSession::setPreferredBufferSize() should be managed by the higher level 
1788         PlatformMediaSessionManager, and not modified by audio unit creation, in order to keep harmony
1789         within the audio pipeline.
1790
1791         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
1792         (WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit):
1793
1794 2017-07-21  Jeremy Jones  <jeremyj@apple.com>
1795
1796         Noise when AudioChannel lengths don't match.
1797         https://bugs.webkit.org/show_bug.cgi?id=174706
1798         rdar://problem/33389856
1799
1800         Reviewed by Eric Carlson.
1801
1802         When AudioChannel lengths don't match, copyFrom() returns early leaving uninitialized data in the audio buffer.
1803         This change zeros out the data, so there isn't objectionable noise sent to the speaker.
1804
1805         * platform/audio/AudioChannel.cpp:
1806         (WebCore::AudioChannel::copyFrom):
1807
1808 2017-07-21  Sam Weinig  <sam@webkit.org>
1809
1810         [WebIDL] Make a few parameters non-nullable in inspector IDL files
1811         https://bugs.webkit.org/show_bug.cgi?id=174719
1812
1813         Reviewed by Joseph Pecoraro.
1814
1815         * inspector/CommandLineAPIHost.cpp:
1816         (WebCore::CommandLineAPIHost::databaseId):
1817         (WebCore::CommandLineAPIHost::storageId):
1818         * inspector/CommandLineAPIHost.h:
1819         * inspector/CommandLineAPIHost.idl:
1820         * inspector/InspectorDOMStorageAgent.cpp:
1821         (WebCore::InspectorDOMStorageAgent::storageId):
1822         * inspector/InspectorDOMStorageAgent.h:
1823         * inspector/InspectorDatabaseAgent.cpp:
1824         (WebCore::InspectorDatabaseAgent::databaseId):
1825         * inspector/InspectorDatabaseAgent.h:
1826         * inspector/InspectorFrontendHost.cpp:
1827         (WebCore::InspectorFrontendHost::showContextMenu):
1828         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
1829         * inspector/InspectorFrontendHost.h:
1830         * inspector/InspectorFrontendHost.idl:
1831         Remove nullability from arguments that should never be null.
1832
1833 2017-07-21  Brady Eidson  <beidson@apple.com>
1834
1835         Get rid of WebCore IconDatabase code.
1836         https://bugs.webkit.org/show_bug.cgi?id=174700
1837
1838         Reviewed by Tim Horton.
1839
1840         No new tests (No behavior change).
1841         
1842         Tons of red.
1843         Very little green.
1844         No further explanation.
1845
1846         * CMakeLists.txt:
1847         * WebCore.xcodeproj/project.pbxproj:
1848         * dom/Document.cpp:
1849         (WebCore::Document::implicitClose):
1850         * history/HistoryItem.cpp:
1851         (WebCore::HistoryItem::HistoryItem):
1852         (WebCore::HistoryItem::~HistoryItem):
1853         (WebCore::HistoryItem::reset):
1854         (WebCore::HistoryItem::setURLString):
1855         * inspector/InspectorNetworkAgent.cpp:
1856         (WebCore::InspectorNetworkAgent::willSendRequest):
1857         * loader/DocumentLoader.cpp:
1858         (WebCore::DocumentLoader::~DocumentLoader):
1859         (WebCore::DocumentLoader::startIconLoading):
1860         (WebCore::DocumentLoader::iconLoadDecisionAvailable): Deleted.
1861         (WebCore::iconLoadDecisionCallback): Deleted.
1862         (WebCore::DocumentLoader::getIconLoadDecisionForIconURL): Deleted.
1863         (WebCore::DocumentLoader::continueIconLoadWithDecision): Deleted.
1864         (WebCore::iconDataCallback): Deleted.
1865         (WebCore::DocumentLoader::getIconDataForIconURL): Deleted.
1866         * loader/DocumentLoader.h:
1867         (WebCore::DocumentLoader::linkIcons):
1868         * loader/FrameLoader.cpp:
1869         (WebCore::FrameLoader::FrameLoader):
1870         (WebCore::FrameLoader::stop):
1871         * loader/FrameLoader.h:
1872         (WebCore::FrameLoader::subframeLoader):
1873         (WebCore::FrameLoader::icon): Deleted.
1874         * loader/FrameLoaderClient.h:
1875         * loader/archive/cf/LegacyWebArchive.cpp:
1876         (WebCore::LegacyWebArchive::create):
1877         * loader/icon/IconController.cpp: Removed.
1878         * loader/icon/IconController.h: Removed.
1879         * loader/icon/IconDatabase.cpp: Removed.
1880         * loader/icon/IconDatabase.h: Removed.
1881         * loader/icon/IconDatabaseBase.cpp: Removed.
1882         * loader/icon/IconDatabaseBase.h: Removed.
1883         * loader/icon/IconDatabaseClient.h: Removed.
1884         * loader/icon/IconLoader.cpp:
1885         (WebCore::IconLoader::IconLoader):
1886         (WebCore::IconLoader::startLoading):
1887         (WebCore::IconLoader::notifyFinished):
1888         * loader/icon/IconLoader.h:
1889         * loader/icon/IconRecord.cpp: Removed.
1890         * loader/icon/IconRecord.h: Removed.
1891         * loader/icon/PageURLRecord.cpp: Removed.
1892         * loader/icon/PageURLRecord.h: Removed.
1893         * testing/Internals.cpp:
1894         (WebCore::Internals::shortcutIconURLs):
1895
1896 2017-07-21  Chris Dumez  <cdumez@apple.com>
1897
1898         Rename DOMCoreException class to DOMException
1899         https://bugs.webkit.org/show_bug.cgi?id=174698
1900
1901         Reviewed by Darin Adler.
1902
1903         Rename DOMCoreException class to DOMException to match its Web-exposed name.
1904
1905         * CMakeLists.txt:
1906         * DerivedSources.cpp:
1907         * DerivedSources.make:
1908         * Modules/quota/StorageErrorCallback.cpp:
1909         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
1910         * Modules/quota/StorageErrorCallback.h:
1911         * Modules/quota/StorageErrorCallback.idl:
1912         * WebCore.xcodeproj/project.pbxproj:
1913         * bindings/js/JSDOMExceptionHandling.cpp:
1914         (WebCore::retrieveErrorMessage):
1915         (WebCore::createDOMException):
1916         * bindings/scripts/CodeGeneratorJS.pm:
1917         (GenerateOverloadDispatcher):
1918         * css/FontFaceSet.cpp:
1919         * css/FontFaceSet.h:
1920         * dom/DOMAllInOne.cpp:
1921         * dom/DOMException.cpp: Renamed from Source/WebCore/dom/DOMCoreException.cpp.
1922         (WebCore::DOMException::create):
1923         (WebCore::DOMException::DOMException):
1924         (WebCore::DOMException::initializeDescription):
1925         * dom/DOMException.h: Renamed from Source/WebCore/dom/DOMCoreException.h.
1926         (WebCore::DOMException::create):
1927         (WebCore::DOMException::DOMException):
1928         * dom/DOMException.idl: Renamed from Source/WebCore/dom/DOMCoreException.idl.
1929         * dom/DOMExceptions.in:
1930         * dom/make_dom_exceptions.pl:
1931         (generateImplementation):
1932
1933 2017-07-21  Sam Weinig  <sam@webkit.org>
1934
1935         Follow up to https://bugs.webkit.org/show_bug.cgi?id=174659.
1936
1937         * inspector/InspectorFrontendHost.idl:
1938         Remove unnecessary JSGenerateToJSObject noticed in review.
1939
1940 2017-07-20  Chris Dumez  <cdumez@apple.com>
1941
1942         Drop legacy SVGException type
1943         https://bugs.webkit.org/show_bug.cgi?id=174695
1944
1945         Reviewed by Darin Adler.
1946
1947         Drop legacy SVGException type and use DOMException instead, as per the latest
1948         SVG specification. Both Chrome and Firefox no longer expose the SVGException
1949         type.
1950
1951         * CMakeLists.txt:
1952         * DerivedSources.cpp:
1953         * DerivedSources.make:
1954         * WebCore.xcodeproj/project.pbxproj:
1955         * bindings/js/JSDOMExceptionHandling.cpp:
1956         (WebCore::createDOMException):
1957         * bindings/js/JSExceptionBase.cpp:
1958         (WebCore::toExceptionBase):
1959         * dom/DOMExceptions.in:
1960         * svg/SVGAllInOne.cpp:
1961         * svg/SVGCircleElement.cpp:
1962         * svg/SVGException.cpp: Removed.
1963         * svg/SVGException.h: Removed.
1964         * svg/SVGException.idl: Removed.
1965         * svg/SVGGraphicsElement.idl:
1966         * svg/SVGLocatable.cpp:
1967         (WebCore::SVGLocatable::getTransformToElement):
1968         * svg/SVGMatrixValue.h:
1969         * svg/SVGPathSegList.cpp:
1970         (WebCore::SVGPathSegList::getItem):
1971         (WebCore::SVGPathSegList::replaceItem):
1972         (WebCore::SVGPathSegList::removeItem):
1973         * svg/SVGPathSegList.h:
1974         * svg/SVGPathSegList.idl:
1975         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
1976         * svg/properties/SVGListProperty.h:
1977
1978 2017-07-20  Chris Dumez  <cdumez@apple.com>
1979
1980         Hook up ITP quirks to the needsSiteSpecificQuirks setting
1981         https://bugs.webkit.org/show_bug.cgi?id=174691
1982
1983         Reviewed by Darin Adler.
1984
1985         Hook up ITP quirks to the needsSiteSpecificQuirks setting to make it easier for
1986         Web-developers to test their fixes.
1987
1988         * loader/ResourceLoadObserver.cpp:
1989         (WebCore::shouldEnableSiteSpecificQuirks):
1990         (WebCore::areDomainsAssociated):
1991         (WebCore::ResourceLoadObserver::logFrameNavigation):
1992         (WebCore::resourceNeedsSSOQuirk):
1993         (WebCore::ResourceLoadObserver::logSubresourceLoading):
1994         (WebCore::ResourceLoadObserver::logWebSocketLoading):
1995
1996 2017-07-20  Matt Lewis  <jlewis3@apple.com>
1997
1998         Unreviewed, rolling out r219700.
1999
2000         This revision caused consistent timouts on iOS.
2001
2002         Reverted changeset:
2003
2004         "Turn tests at media/modern-media-controls/start-support back
2005         on"
2006         https://bugs.webkit.org/show_bug.cgi?id=174683
2007         http://trac.webkit.org/changeset/219700
2008
2009 2017-07-20  David Quesada  <david_quesada@apple.com>
2010
2011         Add SPI to notify WKNavigationDelegate about client redirects
2012         https://bugs.webkit.org/show_bug.cgi?id=174680
2013         rdar://problem/33184886
2014
2015         Reviewed by Brady Eidson.
2016
2017         * loader/FrameLoader.cpp:
2018         (WebCore::FrameLoader::performClientRedirect):
2019         * loader/FrameLoader.h:
2020         Add a convenience method for NavigationScheduler that handles a FrameLoadRequest
2021         as a client redirect. Currently this means loading the request and informing the
2022         client about it.
2023
2024         * loader/FrameLoaderClient.h:
2025         Add FrameLoaderClient::dispatchDidPerformClientRedirect() to inform the client when
2026         a client redirect occurs.
2027
2028         * loader/NavigationScheduler.cpp:
2029         Removed ScheduledURLNavigation::fire(). This class was never instantiated directly,
2030         and all subclasses override fire(), so this was unused code.
2031         For ScheduledRedirects and ScheduledLocationChange, use FrameLoader's new method to
2032         load the request as a client redirect.
2033
2034 2017-07-20  Chris Dumez  <cdumez@apple.com>
2035
2036         Drop legacy XPathException type
2037         https://bugs.webkit.org/show_bug.cgi?id=174679
2038
2039         Reviewed by Sam Weinig.
2040
2041         Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
2042         no longer expose XPathException.
2043
2044         Test: fast/dom/DOMException/XPathException-obsolete.html
2045
2046         * CMakeLists.txt:
2047         * DerivedSources.cpp:
2048         * DerivedSources.make:
2049         * WebCore.xcodeproj/project.pbxproj:
2050         * bindings/js/JSDOMExceptionHandling.cpp:
2051         (WebCore::createDOMException):
2052         * bindings/js/JSExceptionBase.cpp:
2053         (WebCore::toExceptionBase):
2054         * dom/DOMExceptions.in:
2055         * xml/XPathException.cpp: Removed.
2056         * xml/XPathException.h: Removed.
2057         * xml/XPathException.idl: Removed.
2058         * xml/XPathExpression.cpp:
2059         (WebCore::XPathExpression::evaluate):
2060         * xml/XPathParser.cpp:
2061         (WebCore::XPath::Parser::parseStatement):
2062         * xml/XPathResult.cpp:
2063         (WebCore::XPathResult::convertTo):
2064         (WebCore::XPathResult::numberValue):
2065         (WebCore::XPathResult::stringValue):
2066         (WebCore::XPathResult::booleanValue):
2067         (WebCore::XPathResult::singleNodeValue):
2068         (WebCore::XPathResult::snapshotLength):
2069         (WebCore::XPathResult::iterateNext):
2070         (WebCore::XPathResult::snapshotItem):
2071
2072 2017-07-20  Chris Dumez  <cdumez@apple.com>
2073
2074         Unreviewed, rolling out r219706.
2075
2076         Broke iOS build
2077
2078         Reverted changeset:
2079
2080         "Drop legacy XPathException type"
2081         https://bugs.webkit.org/show_bug.cgi?id=174679
2082         http://trac.webkit.org/changeset/219706
2083
2084 2017-07-20  Chris Dumez  <cdumez@apple.com>
2085
2086         Drop legacy XPathException type
2087         https://bugs.webkit.org/show_bug.cgi?id=174679
2088
2089         Reviewed by Sam Weinig.
2090
2091         Drop legacy XPathException type and use DOMException instead. Both Firefox and Chrome
2092         no longer expose XPathException.
2093
2094         Test: fast/dom/DOMException/XPathException-obsolete.html
2095
2096         * CMakeLists.txt:
2097         * DerivedSources.cpp:
2098         * DerivedSources.make:
2099         * WebCore.xcodeproj/project.pbxproj:
2100         * bindings/js/JSDOMExceptionHandling.cpp:
2101         (WebCore::createDOMException):
2102         * bindings/js/JSExceptionBase.cpp:
2103         (WebCore::toExceptionBase):
2104         * dom/DOMExceptions.in:
2105         * xml/XPathException.cpp: Removed.
2106         * xml/XPathException.h: Removed.
2107         * xml/XPathException.idl: Removed.
2108         * xml/XPathExpression.cpp:
2109         (WebCore::XPathExpression::evaluate):
2110         * xml/XPathParser.cpp:
2111         (WebCore::XPath::Parser::parseStatement):
2112         * xml/XPathResult.cpp:
2113         (WebCore::XPathResult::convertTo):
2114         (WebCore::XPathResult::numberValue):
2115         (WebCore::XPathResult::stringValue):
2116         (WebCore::XPathResult::booleanValue):
2117         (WebCore::XPathResult::singleNodeValue):
2118         (WebCore::XPathResult::snapshotLength):
2119         (WebCore::XPathResult::iterateNext):
2120         (WebCore::XPathResult::snapshotItem):
2121
2122 2017-07-20  Chris Dumez  <cdumez@apple.com>
2123
2124         Regression(ITP): May get frequently logged out of wsj.com
2125         https://bugs.webkit.org/show_bug.cgi?id=174661
2126         <rdar://problem/32343256>
2127
2128         Reviewed by Geoffrey Garen.
2129
2130         Add the concept of associated domains in the ResourceLoadObserver. We
2131         previously ignore loads to and from the same domains. We now do the same
2132         if the to and from domains are associated (i.e. owned by the same entity).
2133
2134         For now, only add domains owned by Dow Jones & Company, Inc. to the list,
2135         to address login issues on wsj.com.
2136
2137         No new tests, verified manually on wsj.com.
2138
2139         * loader/ResourceLoadObserver.cpp:
2140         (WebCore::areDomainsAssociated):
2141         (WebCore::ResourceLoadObserver::logFrameNavigation):
2142         (WebCore::ResourceLoadObserver::logSubresourceLoading):
2143         (WebCore::ResourceLoadObserver::logWebSocketLoading):
2144
2145 2017-07-20  Chris Dumez  <cdumez@apple.com>
2146
2147         Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable
2148         https://bugs.webkit.org/show_bug.cgi?id=174660
2149
2150         Reviewed by Geoffrey Garen.
2151
2152         Replace calls to Vector::resize() with calls to more efficient shrink() / grow() when applicable.
2153         This essentially replaces a branch to figure out if the new size is less or greater than the
2154         current size by an assertion.
2155
2156         * Modules/gamepad/Gamepad.cpp:
2157         (WebCore::Gamepad::Gamepad):
2158         * Modules/webaudio/AudioContext.cpp:
2159         (WebCore::AudioContext::addReaction):
2160         * Modules/websockets/WebSocketChannel.cpp:
2161         (WebCore::WebSocketChannel::skipBuffer):
2162         * Modules/websockets/WebSocketDeflater.cpp:
2163         (WebCore::WebSocketDeflater::finish):
2164         * contentextensions/ContentExtensionCompiler.cpp:
2165         (WebCore::ContentExtensions::serializeSelector):
2166         * contentextensions/DFABytecodeCompiler.cpp:
2167         (WebCore::ContentExtensions::append):
2168         * crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:
2169         (WebCore::gcryptEncrypt):
2170         (WebCore::gcryptDecrypt):
2171         * crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp:
2172         (WebCore::gcryptDerive):
2173         * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
2174         (WebCore::GameControllerGamepadProvider::controllerDidConnect):
2175         * platform/gamepad/mac/HIDGamepadProvider.cpp:
2176         (WebCore::HIDGamepadProvider::deviceAdded):
2177         * platform/graphics/ImageBackingStore.h:
2178         (WebCore::ImageBackingStore::setSize):
2179         * platform/graphics/WOFFFileFormat.cpp:
2180         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
2181         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
2182         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
2183         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2184         (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
2185         (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer):
2186         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
2187         (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer):
2188         * platform/graphics/cg/ImageBufferCG.cpp:
2189         (WebCore::cfData):
2190         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
2191         (WebCore::BMPImageDecoder::frameBufferAtIndex):
2192         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2193         (WebCore::ICOImageDecoder::decode):
2194         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2195         (WebCore::JPEGImageDecoder::frameBufferAtIndex):
2196         * platform/image-decoders/png/PNGImageDecoder.cpp:
2197         (WebCore::PNGImageDecoder::frameBufferAtIndex):
2198         (WebCore::PNGImageDecoder::readChunks):
2199         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
2200         (WebCore::WEBPImageDecoder::frameBufferAtIndex):
2201         * platform/image-encoders/JPEGImageEncoder.cpp:
2202         (WebCore::compressRGBABigEndianToJPEG):
2203         * platform/text/DecodeEscapeSequences.h:
2204         (WebCore::URLEscapeSequence::decodeRun):
2205         * platform/text/SuffixTree.h:
2206         (WebCore::SuffixTree::Node::Node):
2207         * rendering/Grid.cpp:
2208         (WebCore::Grid::setNeedsItemsPlacement):
2209         * rendering/RenderTable.cpp:
2210         (WebCore::RenderTable::invalidateCachedColumns):
2211
2212 2017-07-20  Chris Dumez  <cdumez@apple.com>
2213
2214         Regression(ITP): Can no longer log in on abc.go.com
2215         https://bugs.webkit.org/show_bug.cgi?id=174533
2216         <rdar://problem/33325881>
2217
2218         Reviewed by Geoffrey Garen.
2219
2220         Add quirk for sp.auth.adobe.com which is used for SSO by web sites such as
2221         abc.go.com. This would otherwise cause adobe.com to be identified as a
2222         tracker and log in on abc.go.com would break.
2223
2224         No new tests, tested manually on abc.go.com.
2225
2226         * loader/ResourceLoadObserver.cpp:
2227         (WebCore::resourceNeedsSSOQuirk):
2228         (WebCore::ResourceLoadObserver::logSubresourceLoading):
2229
2230 2017-07-20  Antoine Quint  <graouts@apple.com>
2231
2232         Turn tests at media/modern-media-controls/start-support back on
2233         https://bugs.webkit.org/show_bug.cgi?id=174683
2234
2235         Reviewed by Dean Jackson.
2236
2237         Turning those tests back on revealed a small bug that is unlikely to really affect content
2238         on the Web. In the case where the size of the video is known right away, without the need
2239         for loading its metadata, as is the case in the start-support-click-to-start.html test with
2240         a local media resource, all queued layouts are flushed at once and we may call the layout()
2241         method of the left ButtonsContainer which originally is set to contain the play/pause button,
2242         which would remove the play/pause button from the center of the media. So before we potentially
2243         set the play/pause button as the central button, we first assign the default button set for
2244         the two ButtonsContainer instances and only add the play/pause button when we're not showing
2245         the prominent play/pause button.
2246
2247         * Modules/modern-media-controls/controls/inline-media-controls.js:
2248         (InlineMediaControls.prototype.layout):
2249         (InlineMediaControls.prototype._leftContainerButtons):
2250
2251 2017-07-20  Chris Dumez  <cdumez@apple.com>
2252
2253         Drop legacy FileException type
2254         https://bugs.webkit.org/show_bug.cgi?id=174676
2255
2256         Reviewed by Alex Christensen.
2257
2258         Drop legacy FileException type and use DOMException instead, as per the latest
2259         File API specification:
2260         - https://w3c.github.io/FileAPI/#ErrorAndException
2261
2262         Both Firefox and Chrome no longer expose FileException.
2263
2264         * CMakeLists.txt:
2265         * DerivedSources.cpp:
2266         * DerivedSources.make:
2267         * WebCore.xcodeproj/project.pbxproj:
2268         * bindings/js/JSDOMExceptionHandling.cpp:
2269         (WebCore::createDOMException):
2270         * dom/DOMExceptions.in:
2271         * fileapi/FileException.cpp: Removed.
2272         * fileapi/FileException.h: Removed.
2273         * fileapi/FileException.idl: Removed.
2274         * fileapi/FileReaderLoader.cpp:
2275         (WebCore::FileReaderLoader::FileReaderLoader):
2276         (WebCore::FileReaderLoader::failed):
2277         * fileapi/FileReaderLoader.h:
2278         (WebCore::FileReaderLoader::errorCode):
2279         * fileapi/FileReaderSync.cpp:
2280         (WebCore::errorCodeToExceptionCode):
2281         (WebCore::FileReaderSync::startLoading):
2282
2283 2017-07-20  Sam Weinig  <sam@webkit.org>
2284
2285         [WebIDL] Remove custom bindings for InspectorFrontendHost
2286         https://bugs.webkit.org/show_bug.cgi?id=174659
2287
2288         Reviewed by Chris Dumez.
2289
2290         * CMakeLists.txt:
2291         * WebCore.xcodeproj/project.pbxproj:
2292         * bindings/js/JSBindingsAllInOne.cpp:
2293         * bindings/js/JSInspectorFrontendHostCustom.cpp: Removed.
2294         Remove JSInspectorFrontendHostCustom.cpp.
2295
2296         * inspector/InspectorFrontendHost.cpp:
2297         (WebCore::populateContextMenu):
2298         (WebCore::InspectorFrontendHost::showContextMenu):
2299         * inspector/InspectorFrontendHost.h:
2300         * inspector/InspectorFrontendHost.idl:
2301         Re-implement showContextMenu by using an IDL defined ContextMenuItem dictionary
2302         and converting from that to a WebCore::ContextMenu in the implementation.
2303
2304 2017-07-20  Charlie Turner  <cturner@igalia.com>
2305
2306         [GTK] Layout Test http/tests/media/hls/hls-progress.html is failing
2307         https://bugs.webkit.org/show_bug.cgi?id=141469
2308
2309         Reviewed by Xabier Rodriguez-Calvar.
2310
2311         A work-around for getting progress information in a timely manner from
2312         live pipelines. We cannot rely on getting BUFFERING messages within
2313         the stalled time window (3s), so we have to poll for progress
2314         information somehow.
2315
2316         Makes the following pass reliably
2317          http/tests/media/hls/hls-audio-tracks-has-audio.html passed unexpectedly
2318          http/tests/media/hls/hls-audio-tracks.html passed unexpectedly
2319          http/tests/media/hls/hls-progress.html passed unexpectedly
2320
2321         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2322         (WebCore::findHLSQueue):
2323         (WebCore::isHLSProgressing):
2324         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
2325
2326 2017-07-20  Andreas Kling  <akling@apple.com>
2327
2328         Minor Node->Element type tightening fixes
2329         https://bugs.webkit.org/show_bug.cgi?id=174651
2330
2331         Reviewed by Sam Weinig.
2332
2333         Tighten up some Node* into Element* or even better, Element&.
2334
2335         * dom/Document.cpp:
2336         (WebCore::acceptsEditingFocus): Take a const Element&.
2337         (WebCore::Document::setFocusedElement):
2338         * editing/Editor.cpp:
2339         (WebCore::Editor::findEventTargetFrom): Return an Element*.
2340         (WebCore::Editor::findEventTargetFromSelection): Ditto.
2341         (WebCore::Editor::pasteAsPlainText):
2342         (WebCore::Editor::pasteAsFragment):
2343         (WebCore::Editor::dispatchCPPEvent):
2344         * editing/Editor.h:
2345         * page/DragController.cpp:
2346         (WebCore::DragController::dispatchTextInputEventFor):
2347
2348 2017-07-20  Brady Eidson  <beidson@apple.com>
2349
2350         WKHTTPCookieStore API tests fail on High Sierra.
2351         <rdar://problem/33410271> and https://bugs.webkit.org/show_bug.cgi?id=174666
2352
2353         Reviewed by Andy Estes.
2354
2355         Covered by existing API tests.
2356
2357         In r219567 I'd moved cookie storage observation off of NSHTTPCookieStorage and NSNotificationCenter
2358         to CFHTTPCookieStorage observation callbacks.
2359         
2360         This is because notifications were only sent for the default [NSHTTPCookieStorage sharedHTTPCookieStorage]
2361         and not any of the other ones we keep in flight.
2362         
2363         Unfortunately that SPI has been disabled in High Sierra.
2364         Fortunately we found a way we can get non-shared NSHTTPCookieStorages to send notifications that works everywhere.
2365         
2366         * platform/network/cocoa/CookieStorageObserver.h:
2367         * platform/network/cocoa/CookieStorageObserver.mm:
2368         (-[WebCookieObserverAdapter initWithObserver:]):
2369         (-[WebCookieObserverAdapter cookiesChangedNotificationHandler:]):
2370         (WebCore::CookieStorageObserver::create):
2371         (WebCore::CookieStorageObserver::CookieStorageObserver):
2372         (WebCore::CookieStorageObserver::~CookieStorageObserver):
2373         (WebCore::CookieStorageObserver::startObserving): Use a trick to call some SPI on non-shared NSHTTPCookieStorages
2374           to get them to send notifications.
2375         (WebCore::CookieStorageObserver::stopObserving):
2376         (WebCore::cookiesChanged): Deleted.
2377
2378         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
2379         (WebCore::NetworkStorageSession::cookieStorageObserver):
2380
2381 2017-07-20  Miguel Gomez  <magomez@igalia.com>
2382
2383         [GStreamer] Some layout tests issue "g_mutex_clear() called on uninitialised or locked mutex" and flaky crash in ~MediaPlayerPrivateGStreamerBase
2384         https://bugs.webkit.org/show_bug.cgi?id=173952
2385
2386         Reviewed by Carlos Garcia Campos.
2387
2388         Adjust MediaPlayerPrivateGStreamerBase to avoid concurrence problems with the GStreamer thread when
2389         destroying the object.
2390
2391         Covered by existent tests.
2392
2393         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2394         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
2395         (WebCore::MediaPlayerPrivateGStreamerBase::repaint):
2396         (WebCore::MediaPlayerPrivateGStreamerBase::cancelRepaint):
2397
2398 2017-07-19  Zan Dobersek  <zdobersek@igalia.com>
2399
2400         [EME] Push CDMInstance, CDMPrivate and associated types into the Platform layer
2401         https://bugs.webkit.org/show_bug.cgi?id=174496
2402
2403         Reviewed by Xabier Rodriguez-Calvar.
2404
2405         Move the CDMInstance and CDMPrivate interfaces into the platform layer, enabling
2406         implementations of specific key systems at that level, as well as integration with
2407         the MediaPlayerPrivate stack without any layering violations.
2408
2409         While the platform layer still uses the WebCore namespace, the two interface files
2410         have now been moved under the platform/encryptedmedia/ directory and out of the
2411         Modules/encryptedmedia/ directory where the Web-facing API implementation resides.
2412
2413         The two interfaces integrated closely with the Web-facing enumerations and
2414         dictionaries: MediaKeyMessageType, MediaKeySessionType, MediaKeyStatus,
2415         MediaKeySystemConfiguration, MediaKeySystemCapability, MediaKeysRequirement
2416         and MediaKeysRestrictions. Definitions of these types are also moved to the
2417         platform layer without any changes (apart from renaming), and the previous
2418         types now alias against the types now located in the platform layer.
2419
2420         No new tests -- no change in behavior.
2421
2422         * CMakeLists.txt:
2423         * Modules/encryptedmedia/CDM.cpp:
2424         * Modules/encryptedmedia/CDM.h:
2425         * Modules/encryptedmedia/MediaKeyMessageType.h:
2426         * Modules/encryptedmedia/MediaKeySessionType.h:
2427         * Modules/encryptedmedia/MediaKeyStatus.h:
2428         * Modules/encryptedmedia/MediaKeySystemAccess.cpp:
2429         * Modules/encryptedmedia/MediaKeySystemAccess.h:
2430         * Modules/encryptedmedia/MediaKeySystemConfiguration.h:
2431         * Modules/encryptedmedia/MediaKeySystemMediaCapability.h:
2432         * Modules/encryptedmedia/MediaKeysRequirement.h:
2433         * Modules/encryptedmedia/MediaKeysRestrictions.h:
2434         * platform/encryptedmedia/CDMInstance.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMInstance.h.
2435         * platform/encryptedmedia/CDMKeyStatus.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyStatus.h.
2436         * platform/encryptedmedia/CDMKeySystemConfiguration.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeySystemConfiguration.h.
2437         * platform/encryptedmedia/CDMMediaCapability.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeySystemMediaCapability.h.
2438         * platform/encryptedmedia/CDMMessageType.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageType.h.
2439         * platform/encryptedmedia/CDMPrivate.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivate.h.
2440         * platform/encryptedmedia/CDMRequirement.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeysRequirement.h.
2441         * platform/encryptedmedia/CDMRestrictions.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeysRestrictions.h.
2442         * platform/encryptedmedia/CDMSessionType.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeySessionType.h.
2443
2444 2017-07-19  Zan Dobersek  <zdobersek@igalia.com>
2445
2446         Unreviewed follow-up to r219674.
2447
2448         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
2449         Remove the AsyncScrollingCoordinator.h header include that was added by accident.
2450
2451 2017-07-19  Zan Dobersek  <zdobersek@igalia.com>
2452
2453         [CMake] Clean up Web Crypto build targets
2454         https://bugs.webkit.org/show_bug.cgi?id=174253
2455
2456         Reviewed by Alex Christensen.
2457
2458         Gather the common WebCrypto source files in CMakeLists.txt, including them
2459         in the build unconditionally and instead relying on ENABLE_SUBTLE_CRYPTO
2460         build guards to exclude the code from compilation if the feature is disabled.
2461
2462         PlatformGTK.cmake, PlatformMac.cmake and PlatformWPE.cmake can then remove
2463         duplicated build targets. PlatformMac.cmake still lists all the Mac-specific
2464         Web Crypto build targets.
2465
2466         PlatformGTK.cmake and PlatformWPE.cmake now include GCrypt.cmake if the
2467         USE_GCRYPT variable is enabled. Both ports at the moment enable that variable
2468         though as they by default leverage a libgcrypt-based CrpytoDigest implementation
2469         in the PAL library.
2470
2471         The new GCrypt.cmake file adds the libgcrypt-specific Web Crypto build targets to
2472         the build and also sets up libgcrypt include directiories and libraries.
2473
2474         No new tests -- no change in behavior.
2475
2476         * CMakeLists.txt:
2477         * PlatformGTK.cmake:
2478         * PlatformMac.cmake:
2479         * PlatformWPE.cmake:
2480         * platform/GCrypt.cmake: Added.
2481
2482 2017-07-19  Sam Weinig  <sam@webkit.org>
2483
2484         [WebIDL] Remove custom bindings for CommandLineAPIHost
2485         https://bugs.webkit.org/show_bug.cgi?id=174642
2486
2487         Reviewed by Joseph Pecoraro.
2488
2489         * CMakeLists.txt:
2490         * WebCore.xcodeproj/project.pbxproj:
2491         * bindings/js/JSBindingsAllInOne.cpp:
2492         * bindings/js/JSCommandLineAPIHostCustom.cpp: Removed.
2493         Remove JSCommandLineAPIHostCustom.cpp.
2494
2495         * bindings/js/JSDOMConvertObject.h:
2496         (WebCore::JSConverter<IDLObject>::convert):
2497         Add missing JSConverter specialization for IDLObject.
2498
2499         * inspector/CommandLineAPIHost.cpp:
2500         (WebCore::CommandLineAPIHost::inspect):
2501         (WebCore::listenerEntriesFromListenerInfo):
2502         (WebCore::CommandLineAPIHost::inspectedObject):
2503         (WebCore::CommandLineAPIHost::databaseId):
2504         (WebCore::CommandLineAPIHost::storageId):
2505         (WebCore::CommandLineAPIHost::inspectImpl): Deleted.
2506         (WebCore::CommandLineAPIHost::getEventListenersImpl): Deleted.
2507         (WebCore::CommandLineAPIHost::databaseIdImpl): Deleted.
2508         (WebCore::CommandLineAPIHost::storageIdImpl): Deleted.
2509         * inspector/CommandLineAPIHost.h:
2510         * inspector/CommandLineAPIHost.idl:
2511         Replace custom bindings with modern bindings affordances: dictionaries, records and sequences.
2512
2513 2017-07-19  Zan Dobersek  <zdobersek@igalia.com>
2514
2515         Unreviewed CoordGraphics build fix.
2516
2517         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
2518         (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateNodeViewportConstraints):
2519         This should be defined for the ScrollingCoordinatorCoordinatedGraphics class.
2520         Also fix the setFixedToViewport() call, fishing out the GraphicsLayer object from
2521         the ScrollingStateNode's LayerRepresentation.
2522         (WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints): Deleted.
2523
2524 2017-07-19  Chris Dumez  <cdumez@apple.com>
2525
2526         Drop SQLException type
2527         https://bugs.webkit.org/show_bug.cgi?id=174665
2528
2529         Reviewed by Sam Weinig.
2530
2531         Drop SQLException type. We never throw such exception. Also, Firefox
2532         and Chrome no longer expose this type.
2533
2534         * CMakeLists.txt:
2535         * DerivedSources.cpp:
2536         * DerivedSources.make:
2537         * Modules/webdatabase/SQLException.cpp: Removed.
2538         * Modules/webdatabase/SQLException.h: Removed.
2539         * Modules/webdatabase/SQLException.idl: Removed.
2540         * WebCore.xcodeproj/project.pbxproj:
2541         * bindings/js/JSDOMExceptionHandling.cpp:
2542         (WebCore::createDOMException):
2543         * bindings/js/JSExceptionBase.cpp:
2544         (WebCore::toExceptionBase):
2545         * dom/DOMExceptions.in:
2546
2547 2017-07-19  Wenson Hsieh  <wenson_hsieh@apple.com>
2548
2549         Unreviewed, tweak a comment above TemporarySelectionOptionIgnoreSelectionChanges in Editor.cpp.
2550
2551         The comment references the UI process, but it describes an entity in WebCore. This should have been generalized
2552         to instead refer to the client layer in general (i.e. WebKit1 or WebKit2).
2553
2554         * editing/Editor.h:
2555
2556 2017-07-19  Simon Fraser  <simon.fraser@apple.com>
2557
2558         getBoundingClientRects not updated for programmatic scrolls
2559         https://bugs.webkit.org/show_bug.cgi?id=174538
2560         rdar://problem/33049012
2561
2562         Reviewed by Tim Horton.
2563
2564         Baidu.com has two event handlers on its <input>, and both query the input location with getBoundingClientRect()
2565         and the current pageYOffset (via jQuery), then try to scroll the input to the top of the screen. The bug is that
2566         programmatic scrolls did not immediately update the layout viewport rect, so the second call to
2567         getBoundingClientRect() would return stale coordinates, triggering an extra scroll.
2568
2569         To fix this, undo the fix for r219320 which tried to keep getBoundingClientRect() current during unstable scroll
2570         updates by adding a shadow layout viewport rect. Instead, almost always update the layout viewport rect on
2571         FrameView, even during unstable visible rect updates, but not if content insets are being changed interactively,
2572         since changing viewport heights cause problems with bottom-fixed elements. Also, we need to compute a new layout
2573         viewport rect in FrameView::updateLayoutViewport() for programmatic scrolls.
2574
2575         However, always updating the layout viewport triggered issues with the scrolling tree. The scrolling state tree
2576         fossilizes layer positions relative to a specific viewport rect, and that relationship has to be maintained.
2577         There are code paths that recompute fixed/sticky viewport constraints when the layout viewport has changed but
2578         we haven't done layout or recomputed layer positions (e.g. updating viewport-constrained layers via
2579         updateScrollCoordinatedLayersAfterFlush()) and in these cases using a new layout viewport for those computations
2580         results in an inconsistent scrolling tree.
2581
2582         Fix this by not updating scrolling constraints every time we have to re-register scrolling nodes.
2583         updateScrollCoordinatedLayersAfterFlush() only needs to update the layer on the scrolling node (to handle
2584         tiled/non-tiled switches), so make updateScrollCoordinatedLayer() a little more fine-grained, and only update
2585         constraints when we've just computed layer geometry. This allows for different scrolling nodes to have
2586         constraints computed at different times, with different layout viewports, which happens.
2587
2588         Two additional fixes were required to make bottom-fixed bars behave correctly.
2589
2590         First, FrameView::computeLayoutViewportOrigin() had a bug where rounding of half-pixel values would cause it to
2591         fall into the if (visualViewport.height() > layoutViewport.height()) clause, but then fail to clamp for
2592         rubber-banding.
2593         
2594         Second, the FrameView::unscaledMaximumScrollPosition() was wrong after zooming on iOS, since it uses visibleSize()
2595         which is affected by page scale on iOS only (and the function wants scale-independent values). Fix with a hack that
2596         should be cleaned up via webkit.org/b/174648.
2597
2598         Tested by existing tests.
2599
2600         * page/FrameView.cpp:
2601         (WebCore::FrameView::computeUpdatedLayoutViewportRect):
2602         (WebCore::FrameView::computeLayoutViewportOrigin):
2603         (WebCore::FrameView::setLayoutViewportOverrideRect):
2604         (WebCore::FrameView::updateLayoutViewport):
2605         (WebCore::FrameView::unscaledMaximumScrollPosition):
2606         (WebCore::FrameView::documentToClientOffset):
2607         (WebCore::FrameView::setUnstableLayoutViewportRect): Deleted.
2608         * page/FrameView.h:
2609         * page/scrolling/AsyncScrollingCoordinator.cpp:
2610         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2611         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
2612         (WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
2613         (WebCore::AsyncScrollingCoordinator::updateNodeLayer):
2614         (WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints):
2615         (WebCore::AsyncScrollingCoordinator::updateViewportConstrainedNode): Deleted.
2616         * page/scrolling/AsyncScrollingCoordinator.h:
2617         * page/scrolling/ScrollingCoordinator.cpp:
2618         (WebCore::operator<<):
2619         * page/scrolling/ScrollingCoordinator.h:
2620         (WebCore::ScrollingCoordinator::reconcileScrollingState):
2621         (WebCore::ScrollingCoordinator::updateNodeLayer):
2622         (WebCore::ScrollingCoordinator::updateNodeViewportConstraints):
2623         (WebCore::ScrollingCoordinator::updateViewportConstrainedNode): Deleted.
2624         * page/scrolling/ScrollingStateFixedNode.cpp:
2625         (WebCore::ScrollingStateFixedNode::updateConstraints):
2626         * page/scrolling/ScrollingStateStickyNode.cpp:
2627         (WebCore::ScrollingStateStickyNode::updateConstraints):
2628         (WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect):
2629         * page/scrolling/ScrollingTree.cpp:
2630         (WebCore::ScrollingTree::commitTreeState):
2631         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
2632         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
2633         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
2634         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
2635         * rendering/RenderLayerBacking.cpp:
2636         (WebCore::RenderLayerBacking::updateGeometry):
2637         * rendering/RenderLayerCompositor.cpp:
2638         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
2639         (WebCore::RenderLayerCompositor::updateBacking):
2640         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
2641         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2642         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
2643         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
2644         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2645         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2646         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
2647         * rendering/RenderLayerCompositor.h:
2648
2649 2017-07-19  Megan Gardner  <megan_gardner@apple.com>
2650
2651         Don't write file URLs to iOS Pasteboard
2652         https://bugs.webkit.org/show_bug.cgi?id=174647
2653         <rdar://problem/33199730>
2654
2655         Reviewed by Wenson Hsieh.
2656
2657         Tests updated to reflect the changes. We are no longer vending file URLs in Drag & Drop and Copy/Paste.
2658
2659         * editing/ios/EditorIOS.mm:
2660         (WebCore::Editor::writeImageToPasteboard):
2661         * platform/ios/PlatformPasteboardIOS.mm:
2662         (WebCore::PlatformPasteboard::write):
2663
2664 2017-07-19  Myles C. Maxfield  <mmaxfield@apple.com>
2665
2666         Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap
2667         https://bugs.webkit.org/show_bug.cgi?id=174406
2668
2669         Reviewed by Simon Fraser.
2670         <rdar://problem/10139227>
2671
2672         Reviewed by NOBODY.
2673
2674         When the minimumFontSize API preference is set, we will increase the font size without increasing
2675         the line height. If the content specifies line-height as an absolute value, there can be two
2676         unfortunate results:
2677
2678         - Adjacent lines in a paragraph can overlap
2679         - If the paragraph (or containin block or whatever) uses overflow: hidden, the first and last lines
2680         can be cut off and potentially indecipherable.
2681
2682         Instead, we should use the minimum font size preference as a signal that we should increase the
2683         line-height as well as the font-size. Eventually, we will want to increase it by an amount
2684         proportional to the increase in font-size (which can be due to minimumFontSize, minimumLogicalFontSize,
2685         text autosizing, etc.). However, because minimumLogicalFontSize is on by default, this would cause
2686         a behavior change on many webpages which use small text, so such a change would be too risky right now.
2687         Instead, we can pretend that minimumFontSize is the only cause that text increases, and use this as the
2688         only signal to boost the corresponding line-height.
2689
2690         Tests: fast/text/line-height-minimumFontSize-text-zoom.html
2691                fast/text/line-height-minimumFontSize-visual.html
2692                fast/text/line-height-minimumFontSize-zoom.html
2693                fast/text/line-height-minimumFontSize.html
2694                fast/text/line-height-minimumFontSize-autosize.html
2695
2696         * css/StyleBuilderCustom.h:
2697         (WebCore::computeBaseSpecifiedFontSize):
2698         (WebCore::computeLineHeightMultiplierDueToFontSize):
2699         (WebCore::StyleBuilderCustom::applyValueLineHeight):
2700         (WebCore::StyleBuilderCustom::applyValueFill):
2701         (WebCore::StyleBuilderCustom::applyValueStroke):
2702         (WebCore::StyleBuilderCustom::applyValueContent):
2703         * rendering/TextAutoSizing.cpp:
2704
2705 2017-07-18  Myles C. Maxfield  <mmaxfield@apple.com>
2706
2707         Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap
2708         https://bugs.webkit.org/show_bug.cgi?id=174406
2709         <rdar://problem/10139227>
2710
2711         Reviewed by Simon Fraser.
2712
2713         When the minimumFontSize API preference is set, we will increase the font size without increasing
2714         the line height. If the content specifies line-height as an absolute value, there can be two
2715         unfortunate results:
2716
2717         - Adjacent lines in a paragraph can overlap
2718         - If the paragraph (or containin block or whatever) uses overflow: hidden, the first and last lines
2719         can be cut off and potentially indecipherable.
2720
2721         Instead, we should use the minimum font size preference as a signal that we should increase the
2722         line-height as well as the font-size. Eventually, we will want to increase it by an amount
2723         proportional to the increase in font-size (which can be due to minimumFontSize, minimumLogicalFontSize,
2724         text autosizing, etc.). However, because minimumLogicalFontSize is on by default, this would cause
2725         a behavior change on many webpages which use small text, so such a change would be too risky right now.
2726         Instead, we can pretend that minimumFontSize is the only cause that text increases, and use this as the
2727         only signal to boost the corresponding line-height.
2728
2729         Tests: fast/text/line-height-minimumFontSize-text-zoom.html
2730                fast/text/line-height-minimumFontSize-visual.html
2731                fast/text/line-height-minimumFontSize-zoom.html
2732                fast/text/line-height-minimumFontSize.html
2733                fast/text/line-height-minimumFontSize-autosize.html
2734
2735         * css/StyleBuilderCustom.h:
2736         (WebCore::computeBaseSpecifiedFontSize):
2737         (WebCore::computeLineHeightMultiplierDueToFontSize):
2738         (WebCore::StyleBuilderCustom::applyValueLineHeight):
2739         (WebCore::StyleBuilderCustom::applyValueFill):
2740         (WebCore::StyleBuilderCustom::applyValueStroke):
2741         (WebCore::StyleBuilderCustom::applyValueContent):
2742         * rendering/TextAutoSizing.cpp:
2743
2744 2017-07-19  Chris Dumez  <cdumez@apple.com>
2745
2746         DOMException should not have its own toString()
2747         https://bugs.webkit.org/show_bug.cgi?id=174630
2748
2749         Reviewed by Sam Weinig.
2750
2751         DOMException should not have its own toString() and should use the one from Error.prototype.toString()
2752         instead:
2753         - https://heycam.github.io/webidl/#idl-DOMException
2754
2755         No new tests, rebaselined existing tests.
2756
2757         * dom/DOMCoreException.idl:
2758
2759 2017-07-19  Antoine Quint  <graouts@apple.com>
2760
2761         [iOS] REGRESSION: Scrubbing media using built-in controls does not pause media
2762         https://bugs.webkit.org/show_bug.cgi?id=174650
2763         <rdar://problem/33401877>
2764
2765         Reviewed by Dean Jackson.
2766
2767         We would only pause when scrubbing on macOS because we only listened to "mousedown" events on the
2768         scrubber's backing <input> element to identify that the user had started interacting with the
2769         scrubber.
2770
2771         Implementing the same technique on iOS required a little more work than just listening to "touchstart"
2772         events on the same element. On top of that, we needed to make sure that we would only respond to
2773         "touchstart" events on the slider's thumb, and not on the track, since only on macOS should the user
2774         be able to click anywhere on the track to scrub. So we turn off pointer-events for the <input> on iOS
2775         only, and turn them back on specifically for the thumb.
2776
2777         There is also some finessing when dealing with touch events where we need to track the identifier of
2778         the touch that started the user interaction. So we keep track of it in an ivar and wait until we get
2779         a "touchend" event where the changedTouches list contains a touch with that same identifier to ensure
2780         the same touch that initiates and ends the scrubbing interaction.
2781
2782         Finally, we fix another issue that was uncovered while turning back on the ScrubbingSupport tests
2783         where we would not trash the cached _value ivar when we initiated scrubbing, which was important since
2784         we would mistakenly use the pre-srubbing value during a scrub.
2785
2786         * Modules/modern-media-controls/controls/slider.css:
2787         (.ios .slider > input):
2788         (.slider > input::-webkit-slider-thumb):
2789         * Modules/modern-media-controls/controls/slider.js:
2790         (Slider.prototype.handleEvent):
2791         (Slider.prototype._handleMousedownEvent):
2792         (Slider.prototype._interactionEndTarget):
2793         (Slider.prototype._handleTouchstartEvent):
2794         (Slider.prototype._valueWillStartChanging):
2795         (Slider.prototype._valueDidStopChanging):
2796         (Slider.prototype._handleMouseupEvent):
2797         (Slider.prototype._handleTouchendEvent):
2798
2799 2017-07-19  Nan Wang  <n_wang@apple.com>
2800
2801         AX: Web page reloaded when a node is labelling multiple childnodes
2802         https://bugs.webkit.org/show_bug.cgi?id=174655
2803
2804         Reviewed by Chris Fleizach.
2805
2806         When we are asking for the aria-labelledby attribute of a node and its
2807         sibling is also labelled by the same node, we get into an infinite loop
2808         in textUnderElement since we only ignore one child. Added checks for 
2809         siblings to avoid such loop.
2810
2811         Test: accessibility/mac/aria-labelledby-multiple-child-crash.html
2812
2813         * accessibility/AccessibilityNodeObject.cpp:
2814         (WebCore::AccessibilityNodeObject::textUnderElement):
2815
2816 2017-07-19  Andy Estes  <aestes@apple.com>
2817
2818         Use a cast to work around clang's false -Wobjc-literal-conversion warnings
2819         https://bugs.webkit.org/show_bug.cgi?id=174631
2820
2821         Reviewed by Dan Bernstein.
2822
2823         Instead of ignoring -Wobjc-literal-conversion, use a cast to work around rdar://problem/33383354.
2824
2825         * platform/ios/PlatformPasteboardIOS.mm:
2826         (WebCore::PlatformPasteboard::write):
2827
2828 2017-07-19  Chris Dumez  <cdumez@apple.com>
2829
2830         Make cross-origin properties enumerable
2831         https://bugs.webkit.org/show_bug.cgi?id=174576
2832
2833         Reviewed by Darin Adler.
2834
2835         Makes cross-origin properties enumerable on Window and Location objects
2836         as per:
2837         - https://github.com/whatwg/html/pull/2777
2838
2839         This simplifies our code quite a bit.
2840
2841         No new tests, updated existing tests.
2842
2843         * bindings/js/JSDOMWindowCustom.cpp:
2844         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
2845         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2846         (WebCore::JSDOMWindow::getOwnPropertyNames):
2847         * bindings/js/JSLocationCustom.cpp:
2848         (WebCore::getOwnPropertySlotCommon):
2849         (WebCore::JSLocation::getOwnPropertyNames):
2850         * bindings/scripts/CodeGeneratorJS.pm:
2851         (GenerateHeader):
2852
2853 2017-07-18  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2854
2855         [EME] Build failure with Clang-3.8 on InitDataRegistry.cpp
2856         https://bugs.webkit.org/show_bug.cgi?id=174628
2857
2858         Reviewed by Žan Doberšek.
2859
2860         * Modules/encryptedmedia/InitDataRegistry.cpp:
2861         (WebCore::extractKeyIDsKeyids): Add an explicit cast to unsigned.
2862
2863 2017-07-19  Matt Lewis  <jlewis3@apple.com>
2864
2865         Unreviewed, rolling out r219646.
2866
2867         The test added are failing on all platforms
2868
2869         Reverted changeset:
2870
2871         "Setting the minimum font size preference doesn’t affect
2872         absolute line-height values, so lines overlap"
2873         https://bugs.webkit.org/show_bug.cgi?id=174406
2874         http://trac.webkit.org/changeset/219646
2875
2876 2017-07-19  Yusuke Suzuki  <utatane.tea@gmail.com>
2877
2878         [WTF] Implement WTF::ThreadGroup
2879         https://bugs.webkit.org/show_bug.cgi?id=174081
2880
2881         Reviewed by Mark Lam.
2882
2883         * page/ResourceUsageThread.h:
2884
2885 2017-07-18  Andy Estes  <aestes@apple.com>
2886
2887         [Xcode] Enable CLANG_WARN_RANGE_LOOP_ANALYSIS
2888         https://bugs.webkit.org/show_bug.cgi?id=174631
2889
2890         Reviewed by Tim Horton.
2891
2892         * Configurations/Base.xcconfig:
2893         * rendering/Grid.cpp:
2894         (WebCore::Grid::insert):
2895         * rendering/RenderTreeAsText.cpp:
2896         (WebCore::write):
2897         * rendering/SimpleLineLayoutCoverage.cpp:
2898         (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
2899
2900 2017-07-18  Yusuke Suzuki  <utatane.tea@gmail.com>
2901
2902         WTF::Thread should have the threads stack bounds.
2903         https://bugs.webkit.org/show_bug.cgi?id=173975
2904
2905         Reviewed by Mark Lam.
2906
2907         When creating WebThread, we first allocate WebCore::ThreadGlobalData in UI thread
2908         and share it with WebThread.
2909         The problem is that WebCore::ThreadGlobalData has CachedResourceRequestInitiators.
2910         It allocates AtomicString, which requires WTFThreadData.
2911
2912         In this patch, we call WTF::initializeThreading() before allocating WebCore::ThreadGlobalData.
2913         And we also call AtomicString::init() before calling WebCore::ThreadGlobalData since
2914         WebCore::ThreadGlobalData allocates AtomicString.
2915
2916         * platform/ios/wak/WebCoreThread.mm:
2917         (StartWebThread):
2918
2919 2017-07-18  Myles C. Maxfield  <mmaxfield@apple.com>
2920
2921         Setting the minimum font size preference doesn’t affect absolute line-height values, so lines overlap
2922         https://bugs.webkit.org/show_bug.cgi?id=174406
2923         <rdar://problem/10139227>
2924
2925         Reviewed by Simon Fraser.
2926
2927         When the minimumFontSize API preference is set, we will increase the font size without increasing
2928         the line height. If the content specifies line-height as an absolute value, there can be two
2929         unfortunate results:
2930
2931         - Adjacent lines in a paragraph can overlap
2932         - If the paragraph (or containin block or whatever) uses overflow: hidden, the first and last lines
2933         can be cut off and potentially indecipherable.
2934
2935         Instead, we should use the minimum font size preference as a signal that we should increase the
2936         line-height as well as the font-size. Eventually, we will want to increase it by an amount
2937         proportional to the increase in font-size (which can be due to minimumFontSize, minimumLogicalFontSize,
2938         text autosizing, etc.). However, because minimumLogicalFontSize is on by default, this would cause
2939         a behavior change on many webpages which use small text, so such a change would be too risky right now.
2940         Instead, we can pretend that minimumFontSize is the only cause that text increases, and use this as the
2941         only signal to boost the corresponding line-height.
2942
2943         Tests: fast/text/line-height-minimumFontSize-text-zoom.html
2944                fast/text/line-height-minimumFontSize-visual.html
2945                fast/text/line-height-minimumFontSize-zoom.html
2946                fast/text/line-height-minimumFontSize.html
2947                fast/text/line-height-minimumFontSize-autosize.html
2948
2949         * css/StyleBuilderCustom.h:
2950         (WebCore::computeBaseSpecifiedFontSize):
2951         (WebCore::computeLineHeightMultiplierDueToFontSize):
2952         (WebCore::StyleBuilderCustom::applyValueLineHeight):
2953         (WebCore::StyleBuilderCustom::applyValueFill):
2954         (WebCore::StyleBuilderCustom::applyValueStroke):
2955         (WebCore::StyleBuilderCustom::applyValueContent):
2956         * rendering/TextAutoSizing.cpp:
2957
2958 2017-07-18  Zalan Bujtas  <zalan@apple.com>
2959
2960         Media controls are missing content in fullscreen when document has scroll offset.
2961         https://bugs.webkit.org/show_bug.cgi?id=174644
2962         <rdar://problem/32415323>
2963
2964         Reviewed by Simon Fraser.
2965
2966         If a non-user initiated scrolling (result of resize for example) is processed asynchronously, it might
2967         leapfrog other, programatic scrollings and trigger unintentional scroll offsets (and turn into unwanted clippings). 
2968         This patch ensures that both resize and top content inset change are translated into programatic scrolling. 
2969
2970         Unable to test full screen video.
2971
2972         * page/FrameView.cpp:
2973         (WebCore::FrameView::setFrameRect):
2974         (WebCore::FrameView::topContentInsetDidChange):
2975
2976 2017-07-18  Andy Estes  <aestes@apple.com>
2977
2978         [Xcode] Enable CLANG_WARN_OBJC_LITERAL_CONVERSION
2979         https://bugs.webkit.org/show_bug.cgi?id=174631
2980
2981         Reviewed by Sam Weinig.
2982
2983         * Configurations/Base.xcconfig:
2984         * platform/ios/PlatformPasteboardIOS.mm:
2985         (WebCore::PlatformPasteboard::write):
2986
2987 2017-07-18  Ali Juma  <ajuma@chromium.org>
2988
2989         Align quirky number parsing with other browsers
2990         https://bugs.webkit.org/show_bug.cgi?id=155874
2991
2992         Reviewed by Simon Fraser.
2993
2994         Parse unit-less non-zero values for animation-duration and transition-duration
2995         as invalid time values in quirks mode.
2996
2997         Test: fast/css/animation-transition-duration-quirksmode.html
2998
2999         * css/parser/CSSPropertyParser.cpp:
3000         (WebCore::consumeAnimationValue):
3001
3002 2017-07-18  Chris Dumez  <cdumez@apple.com>
3003
3004         HysteresisActivity cannot be used in the UIProcess
3005         https://bugs.webkit.org/show_bug.cgi?id=174643
3006         <rdar://problem/33086442>
3007
3008         Reviewed by Tim Horton.
3009
3010         Port HysteresisActivity to RunLoop::Timer so that it can safely be used in
3011         the UIProcess as well.
3012
3013         * platform/HysteresisActivity.h:
3014
3015 2017-07-18  Joseph Pecoraro  <pecoraro@apple.com>
3016
3017         Web Inspector: Modernize InjectedScriptSource
3018         https://bugs.webkit.org/show_bug.cgi?id=173890
3019
3020         Reviewed by Brian Burg.
3021
3022         Covered by existing tests.
3023
3024         * inspector/CommandLineAPIModuleSource.js:
3025         (CommandLineAPIImpl.prototype.copy):
3026         (CommandLineAPIImpl.prototype._inspect):
3027         Use RemoteObject, a new parameter.
3028
3029 2017-07-18  Ryosuke Niwa  <rniwa@webkit.org>
3030
3031         REGRESSION(r218910): Crash when password field changes to text field
3032         https://bugs.webkit.org/show_bug.cgi?id=174560
3033
3034         Reviewed by Zalan Bujtas.
3035
3036         The crash was caused by textMarkerDataForFirstPositionInTextControl accessing a nullptr returned by getOrCreate.
3037         Unfortunately, in order to this fix bug while preserving the exact behavior would require synchronously creating
3038         a renderer for the editing host when the input type changed since we can't create an accessbility object out of
3039         a renderer-less node.
3040
3041         Instead, revert back to pre-r218910 behavior of always using the text control element's axID when notifying
3042         the value change. While this is inconsistent with the way editing commands report content changes, I've since
3043         learned that VoiceOver has code to deal with this exact situation.
3044
3045         Test: accessibility/mac/input-type-change-crash-2.html
3046
3047         * accessibility/AXObjectCache.cpp:
3048         (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
3049
3050 2017-07-18  Matt Baker  <mattbaker@apple.com>
3051
3052         Web Inspector: Refactoring: replace InspectorCanvasAgent::CanvasEntry with a helper class
3053         https://bugs.webkit.org/show_bug.cgi?id=174311
3054
3055         Reviewed by Devin Rousso.
3056
3057         This patch adds a helper class for tracking canvases and their data. The
3058         current approach of defining a helper structure in the agent's header is
3059         awkward to use and maintain, and won't scale well as more canvas instrumentation
3060         points and data are added.
3061
3062         * CMakeLists.txt:
3063         * WebCore.xcodeproj/project.pbxproj:
3064         New file.
3065
3066         * inspector/InspectorCanvas.cpp: Added.
3067         (WebCore::InspectorCanvas::create):
3068         (WebCore::InspectorCanvas::InspectorCanvas):
3069         (WebCore::InspectorCanvas::buildObjectForCanvas):
3070         * inspector/InspectorCanvas.h: Added.
3071
3072         * inspector/InspectorCanvasAgent.cpp:
3073         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
3074         (WebCore::InspectorCanvasAgent::enable):
3075         (WebCore::InspectorCanvasAgent::requestNode):
3076         (WebCore::InspectorCanvasAgent::requestContent):
3077         (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes):
3078         (WebCore::InspectorCanvasAgent::resolveCanvasContext):
3079         (WebCore::InspectorCanvasAgent::frameNavigated):
3080         (WebCore::InspectorCanvasAgent::didCreateCSSCanvas):
3081         (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
3082         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
3083         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
3084         (WebCore::InspectorCanvasAgent::canvasDestroyed):
3085         (WebCore::InspectorCanvasAgent::canvasDestroyedTimerFired):
3086         (WebCore::InspectorCanvasAgent::clearCanvasData):
3087         (WebCore::InspectorCanvasAgent::unbindCanvas):
3088         (WebCore::InspectorCanvasAgent::assertInspectorCanvas):
3089         (WebCore::InspectorCanvasAgent::findInspectorCanvas):
3090         (WebCore::InspectorCanvasAgent::getCanvasEntry): Deleted.
3091         (WebCore::InspectorCanvasAgent::buildObjectForCanvas): Deleted.
3092         * inspector/InspectorCanvasAgent.h:
3093
3094         * inspector/InspectorController.cpp:
3095         (WebCore::InspectorController::InspectorController):
3096         Remove unused constructor argument.
3097
3098 2017-07-18  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3099
3100         [Curl] Move detail implementation from ResourceHandle to ResourceHandleInternal
3101         https://bugs.webkit.org/show_bug.cgi?id=174641
3102
3103         After moving stuff from ResourceHandleManager to ResourceHandle on 
3104         https://bugs.webkit.org/show_bug.cgi?id=173630, still there're many violation
3105         remains between ResourceHandle and ResourceHandleInternal classes.
3106         Many of implementation detail should be move to ResourceHandleInternal
3107         to improve build speed.
3108
3109         Reviewed by Alex Christensen.
3110
3111         * platform/network/ResourceHandle.h:
3112         * platform/network/ResourceHandleInternal.h:
3113         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3114         * platform/network/curl/ResourceHandleCurl.cpp:
3115         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
3116         (WebCore::ResourceHandle::start):
3117         (WebCore::ResourceHandle::cancel):
3118         (WebCore::ResourceHandleInternal::initialize):
3119         (WebCore::ResourceHandleInternal::applyAuthentication):
3120         (WebCore::ResourceHandleInternal::setupPUT):
3121         (WebCore::ResourceHandleInternal::setupPOST):
3122         (WebCore::ResourceHandleInternal::setupFormData):
3123         (WebCore::ResourceHandle::platformSetDefersLoading):
3124         (WebCore::ResourceHandleInternal::didFinish):
3125         (WebCore::ResourceHandleInternal::didFail):
3126         (WebCore::ResourceHandleInternal::calculateWebTimingInformations):
3127         (WebCore::ResourceHandleInternal::handleLocalReceiveResponse):
3128         (WebCore::ResourceHandleInternal::willPrepareSendData):
3129         (WebCore::ResourceHandleInternal::didReceiveHeaderLine):
3130         (WebCore::ResourceHandleInternal::didReceiveAllHeaders):
3131         (WebCore::ResourceHandleInternal::didReceiveContentData):
3132         (WebCore::ResourceHandleInternal::readCallback):
3133         (WebCore::ResourceHandleInternal::headerCallback):
3134         (WebCore::ResourceHandleInternal::writeCallback):
3135         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
3136         (WebCore::ResourceHandleInternal::dispatchSynchronousJob):
3137         (WebCore::ResourceHandleInternal::handleDataURL):
3138         (WebCore::ResourceHandle::initialize): Deleted.
3139         (WebCore::ResourceHandle::applyAuthentication): Deleted.
3140         (WebCore::ResourceHandle::setupPUT): Deleted.
3141         (WebCore::ResourceHandle::setupPOST): Deleted.
3142         (WebCore::ResourceHandle::setupFormData): Deleted.
3143         (WebCore::ResourceHandle::didFinish): Deleted.
3144         (WebCore::ResourceHandle::didFail): Deleted.
3145         (WebCore::ResourceHandle::calculateWebTimingInformations): Deleted.
3146         (WebCore::ResourceHandle::handleLocalReceiveResponse): Deleted.
3147         (WebCore::ResourceHandle::willPrepareSendData): Deleted.
3148         (WebCore::ResourceHandle::didReceiveHeaderLine): Deleted.
3149         (WebCore::ResourceHandle::didReceiveAllHeaders): Deleted.
3150         (WebCore::ResourceHandle::didReceiveContentData): Deleted.
3151         (WebCore::ResourceHandle::readCallback): Deleted.
3152         (WebCore::ResourceHandle::headerCallback): Deleted.
3153         (WebCore::ResourceHandle::writeCallback): Deleted.
3154         (WebCore::ResourceHandle::dispatchSynchronousJob): Deleted.
3155         (WebCore::ResourceHandle::handleDataURL): Deleted.
3156
3157 2017-07-18  Andy Estes  <aestes@apple.com>
3158
3159         [Xcode] Enable CLANG_WARN_NON_LITERAL_NULL_CONVERSION
3160         https://bugs.webkit.org/show_bug.cgi?id=174631
3161
3162         Reviewed by Dan Bernstein.
3163
3164         * Configurations/Base.xcconfig:
3165
3166 2017-07-18  Antoine Quint  <graouts@apple.com>
3167
3168         [macOS] Mouse pointer does not hide during fullscreen playback
3169         https://bugs.webkit.org/show_bug.cgi?id=174638
3170         <rdar://problem/33244399>
3171
3172         Reviewed by Dean Jackson.
3173
3174         Test: media/modern-media-controls/css/webkit-cursor-visibility-auto-hide.html
3175
3176         The user-agent stylesheet sets the "-webkit-cursor-visibility" to "auto-hide" for fullscreen <video>
3177         elements. Since we reset the page styles, including UA styles, on .media-controls-container, we need
3178         to explicitly inherit this style property from the page to ensure the mouse pointer automatically
3179         hides in fullscreen.
3180
3181         * Modules/modern-media-controls/controls/media-controls.css:
3182         (.media-controls-container):
3183
3184 2017-07-18  Sam Weinig  <sam@webkit.org>
3185
3186         [WebIDL] Remove custom bindings for MockContentFilterSettings
3187         https://bugs.webkit.org/show_bug.cgi?id=174606
3188
3189         Reviewed by Andy Estes.
3190
3191         * PlatformMac.cmake:
3192         * WebCore.xcodeproj/project.pbxproj:
3193         * bindings/js/JSMockContentFilterSettingsCustom.cpp: Removed.
3194         Remove JSMockContentFilterSettingsCustom.
3195
3196         * testing/MockContentFilterSettings.h:
3197         * testing/MockContentFilterSettings.idl:
3198         Switch from constants to IDL enums to make the bindings and tests simpler.
3199
3200 2017-07-18  Sam Weinig  <sam@webkit.org>
3201
3202         [WebIDL] Replace some custom bindings code in JSCSSStyleDeclarationCustom.cpp with named getters/setters
3203         https://bugs.webkit.org/show_bug.cgi?id=174529
3204
3205         Reviewed by Chris Dumez.
3206
3207         * CMakeLists.txt:
3208         * WebCore.xcodeproj/project.pbxproj:
3209         * css/CSSAllInOne.cpp:
3210         Add CSSStyleDeclaration.cpp
3211
3212         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3213         Move getter / setter / getOwnProperties logic from here to CSSStyleDeclaration.cpp.
3214
3215         * bindings/scripts/CodeGeneratorJS.pm:
3216         (GenerateGetOwnPropertySlot):
3217         (GenerateGetOwnPropertySlotByIndex):
3218         (InstanceOverridesGetOwnPropertySlot):
3219         (GenerateHeader):
3220         Remove support for no longer needed [CustomGetOwnPropertySlotAndDescriptor].
3221         Add support for [PutOnlyForSupportedProperties], which allows named setters to behave
3222         a bit more like normal setters by allowing the implementation to note which properties
3223         are supported which in turn, allows the bindings to continue down the normal put path
3224         for unsupported properties. This is necessary to mimic the behavior of CSSStyleDeclaration
3225         which is using named setters in place hundreds of additional properties.
3226
3227         (InstanceOverridesDefineOwnProperty):
3228         Add [DefaultDefineOwnProperty] to allow disabling defineOwnProperty overriding that comes
3229         automatically with named setters. We need this for CSSStyleDeclaration since the named
3230         setter usage modeling real properties, not a dictionary style setter. We may want to 
3231         revisit this, and add support for DefineOwnProperty here, but this allows us to maintain
3232         the status quo.
3233
3234         (GenerateDefineOwnProperty):
3235         Fix the case when you have a named setter, an indexed getter, but no indexed setter. In that
3236         case, we would get a compile error, due to the index variable being unused.
3237
3238         * bindings/scripts/IDLAttributes.json:
3239         Remove support for no longer needed [CustomGetOwnPropertySlotAndDescriptor], add
3240         [PutOnlyForSupportedProperties] and [DefaultDefineOwnProperty].
3241
3242         * css/CSSStyleDeclaration.h:
3243         * css/CSSStyleDeclaration.cpp: Added.
3244         (WebCore::CSSStyleDeclaration::namedItem):
3245         (WebCore::CSSStyleDeclaration::setNamedItem):
3246         (WebCore::CSSStyleDeclaration::isSupportedPropertyName):
3247         (WebCore::CSSStyleDeclaration::supportedPropertyNames):
3248         Use standard getter / setter functions to implement CSS property name getting and setting.
3249         Convert from Identifier to AtomicString, which are now bridgeable.
3250
3251         * css/CSSStyleDeclaration.idl:
3252         Add named getter and setter. Remove [CustomGetOwnPropertyNames], [CustomGetOwnPropertySlotAndDescriptor]
3253         and [CustomPut], add [DefaultDefineOwnProperty].
3254
3255         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: Added.
3256         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h: Added.
3257         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: Added.
3258         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h: Added.
3259         * bindings/scripts/test/TestNamedSetterWithIndexedGetter.idl: Added.
3260         * bindings/scripts/test/TestNamedSetterWithIndexedGetterAndSetter.idl: Added.
3261         Add tests for improved behavior when using named setters with variations of indexed getters and setters as well.
3262
3263 2017-07-18  Antoine Quint  <graouts@apple.com>
3264
3265         [iOS] WebKit media controls are sometimes shown after exiting full screen on vimeo.com
3266         https://bugs.webkit.org/show_bug.cgi?id=174627
3267         <rdar://problem/33301005>
3268
3269         Reviewed by Dean Jackson, provisionally reviewed by Jeremy Jones.
3270
3271         On iOS 11, both the WebKit media controls and the Vimeo custom controls would appear sometimes when exiting
3272         from fullscreen when the video was playing and the user would tap the X button, which would pause the video
3273         as well as exit fullscreen.
3274
3275         The reason this happens is that the ControlsVisibilitySupport object, which governs whether the WebKit media
3276         controls should be displayed for a given video, woud listen to "pause" and "webkitfullscreenchange" events
3277         and determine whether to show the WebKit media controls. We listen to the "pause" event because when media
3278         pauses, and the video has the "controls" attribute set, we should show the controls and suspend the controls
3279         auto-hide timer. And we're interested in knowing when we enter and exit fullscreen because we want to override
3280         the "controls" attribute not being set when we enter fullscreen.
3281
3282         However, on iOS 11, it appears that the "webkitfullscreenchange" event is not reliably fired as the user enters
3283         and exits fullscreen, which is tracked by webkit.org/b/174626. So, when the user exits fullscreen, we would be
3284         informed of the video being paused via a "pause" event, but not of the video exiting fullscreen. And because
3285         media events are asynchronous, the "pause" event would sometimes be fired before we exited fullscreen, and when
3286         the _updateControls() would run, we would sometimes determine that we are in fullscreen still and determine
3287         that the WebKit media controls should be shown.
3288
3289         Of course, on iOS, the WebKit media controls are not shown and instead we delegate to AVKit to display media controls.
3290         So we could simply disregard this whole logic in iOS. But we choose to instead use the "webkitpresentationmodechanged"
3291         when the presentation mode API is supported, as is the case on iOS 11, to determine changes of media fullscreen state.
3292         This way, should we ever choose to support fullscreen media controls provided by WebKit on iOS, this logic is already
3293         correct and we write less platform-specific code.
3294
3295         This, alas, cannot be tested since we can't force the X button to be tapped within the AVKit fullscreen controls.
3296
3297         * Modules/modern-media-controls/media/controls-visibility-support.js:
3298         (ControlsVisibilitySupport.prototype.get mediaEvents):
3299         * Modules/modern-media-controls/media/media-controller.js:
3300         (MediaController):
3301         * Modules/modern-media-controls/media/start-support.js:
3302         (StartSupport.prototype.get mediaEvents):
3303
3304 2017-07-18  Matt Lewis  <jlewis3@apple.com>
3305
3306         Unreviewed, rolling out r219610.
3307
3308         This caused an api failure on all platforms for the test
3309         SnapshotImageLargeAsyncDecoding
3310
3311         Reverted changeset:
3312
3313         "Async image decoding for large images should be disabled
3314         after the first time a tile is painted"
3315         https://bugs.webkit.org/show_bug.cgi?id=174451
3316         http://trac.webkit.org/changeset/219610
3317
3318 2017-07-18  Devin Rousso  <drousso@apple.com>
3319
3320         Add CanvasRenderingContext2D::getTransform
3321         https://bugs.webkit.org/show_bug.cgi?id=174278
3322
3323         Reviewed by Dean Jackson.
3324
3325         Tests: fast/canvas/2d.getTransform.modification.html
3326                fast/canvas/2d.getTransform.newobject.html
3327                fast/canvas/2d.setTransform.matrix.html
3328
3329         * css/DOMMatrixReadOnly.h:
3330         Make DOMMatrixReadOnly::validateAndFixup public so that values of DOMMatrixInit are still
3331         usable without having to construct a DOMMatrixReadOnly. This is beneficial in the case that
3332         an exception is thrown, as the validateAndFixup check can happen without any allocations.
3333
3334         * html/canvas/CanvasRenderingContext2D.idl:
3335         * html/canvas/CanvasRenderingContext2D.h:
3336         * html/canvas/CanvasRenderingContext2D.cpp:
3337         (WebCore::CanvasRenderingContext2D::getTransform):
3338         (WebCore::CanvasRenderingContext2D::setTransform):
3339
3340 2017-07-18  Andy Estes  <aestes@apple.com>
3341
3342         [Xcode] Enable CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING
3343         https://bugs.webkit.org/show_bug.cgi?id=174631
3344
3345         Reviewed by Darin Adler.
3346
3347         * Configurations/Base.xcconfig:
3348
3349 2017-07-18  Jonathan Bedard  <jbedard@apple.com>
3350
3351         Unreviewed build fix after r219595
3352
3353         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
3354         (WebCore::makeNeverDestroyed): Remove duplicate makeNeverDestroyed definition.
3355         * platform/ios/DragImageIOS.mm:
3356         (WebCore::cascadeForSystemFont): Return correct FontCascade object.
3357         (WebCore::createDragImageForLink): Fix compiler error.
3358
3359 2017-07-18  Daniel Bates  <dabates@apple.com>
3360
3361         Cleanup: Remove AlternativeTextInfo and use Variant to represent alternative text info details
3362         https://bugs.webkit.org/show_bug.cgi?id=174604
3363
3364         I inadvertently did not commit some of my local changes.
3365
3366         * editing/AlternativeTextController.cpp:
3367         (WebCore::AlternativeTextController::startAlternativeTextUITimer):
3368         (WebCore::AlternativeTextController::stopAlternativeTextUITimer):
3369         (WebCore::AlternativeTextController::applyPendingCorrection):
3370         (WebCore::AlternativeTextController::hasPendingCorrection):
3371         (WebCore::AlternativeTextController::show):
3372         (WebCore::AlternativeTextController::handleCancelOperation):
3373         (WebCore::AlternativeTextController::dismiss):
3374         (WebCore::AlternativeTextController::dismissSoon):
3375         (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
3376         (WebCore::AlternativeTextController::timerFired):
3377         (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
3378         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
3379         (WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText):
3380
3381 2017-07-17  Daniel Bates  <dabates@apple.com>
3382
3383         Cleanup: Remove AlternativeTextInfo and use Variant to represent alternative text info details
3384         https://bugs.webkit.org/show_bug.cgi?id=174604
3385
3386         Reviewed by Darin Adler.
3387
3388         Remove struct AlternativeTextInfo and represent the alternative text info as instance variables
3389         using Variant to hold either an autocorrection replacement string or the alternative dictation
3390         context.
3391
3392         Not functionality changed. So, no new tests.
3393
3394         * editing/AlternativeTextController.cpp: Remove header Event.h as it is ultimately included by TextEvent.h.
3395         (WebCore::AlternativeTextController::show): Update code as needed.
3396         (WebCore::AlternativeTextController::timerFired): Ditto.
3397         (WebCore::AlternativeTextController::alternativeTextClient): Substitute nullptr for 0.
3398         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord): Update code as needed.
3399         (WebCore::AutocorrectionAlternativeDetails::create): Deleted.
3400         (WebCore::AutocorrectionAlternativeDetails::replacementString): Deleted.
3401         (WebCore::AutocorrectionAlternativeDetails::AutocorrectionAlternativeDetails): Deleted.
3402         (WebCore::DictationAlternativeDetails::create): Deleted.
3403         (WebCore::DictationAlternativeDetails::dictationContext): Deleted.
3404         (WebCore::DictationAlternativeDetails::DictationAlternativeDetails): Deleted.
3405         * editing/AlternativeTextController.h: Remove header Range.h and forward declare Range. Include header
3406         Position.h and wtf/Variant.h. Sort forward declarations.