1 2016-03-21 Chris Dumez <cdumez@apple.com>
3 Unreviewed, rolling out r197552.
5 May have caused a ~2% PLT regression on iOS
9 "Drop DocumentSharedObjectPool immediately when going into
11 https://bugs.webkit.org/show_bug.cgi?id=154986
12 http://trac.webkit.org/changeset/197552
14 2016-03-21 Simon Fraser <simon.fraser@apple.com>
16 Very flashy scrolling on http://quellish.tumblr.com page
17 https://bugs.webkit.org/show_bug.cgi?id=155728
18 rdar://problem/22299375
20 Reviewed by Zalan Bujtas.
22 http://quellish.tumblr.com/post/126712999812/how-on-earth-the-facebook-ios-application-is-so
23 has many elements that are nested inside elements with non-equal corner radius clipping.
24 This requires building bezier paths for the rounded-rect clip which is expensive.
26 For many rows of the table, we can avoid the rounded-rect clipping because the intersection
27 of the paintDirtyRect and the clip is actually rectangular.
29 * platform/graphics/FloatRoundedRect.cpp:
30 (WebCore::FloatRoundedRect::intersectionIsRectangular):
31 * platform/graphics/FloatRoundedRect.h:
32 * rendering/RenderLayer.cpp:
33 (WebCore::RenderLayer::clipToRect):
35 2016-03-21 Zalan Bujtas <zalan@apple.com>
37 Web Inspector search icon does not fit when zoomed in.
38 https://bugs.webkit.org/show_bug.cgi?id=155708
40 Reviewed by Simon Fraser.
42 Adjusts the paint rect for the magnifier icon so that it fits even when zoomed in.
44 Covered by existing tests.
46 * rendering/RenderThemeMac.mm:
47 (WebCore::RenderThemeMac::resultsButtonSizes):
48 (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
50 2016-03-21 Per Arne Vollan <peavo@outlook.com>
52 [WinCairo][MediaFoundation] Crash when media player is destroyed.
53 https://bugs.webkit.org/show_bug.cgi?id=155716
55 Reviewed by Alex Christensen.
57 Increase the reference count on the video presenter object in the ActivateObject method
58 to avoid referencing a deleted object when the media player is destroyed.
60 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
61 (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ActivateObject):
63 2016-03-21 Eric Carlson <eric.carlson@apple.com>
65 Add a WebRTC specific compile flag
66 https://bugs.webkit.org/show_bug.cgi?id=155663
68 Guard WebRTC-only files with ENABLE(WEB_RTC) rather than ENABLE(MEDIA_STREAM).
70 Reviewed by Jer Noble.
72 * Modules/mediastream/MediaEndpointPeerConnection.cpp:
73 * Modules/mediastream/MediaEndpointPeerConnection.h:
74 * Modules/mediastream/PeerConnectionBackend.h:
75 * Modules/mediastream/PeerConnectionStates.h:
76 * Modules/mediastream/RTCConfiguration.cpp:
77 * Modules/mediastream/RTCConfiguration.h:
78 * Modules/mediastream/RTCConfiguration.idl:
79 * Modules/mediastream/RTCDTMFSender.cpp:
80 * Modules/mediastream/RTCDTMFSender.h:
81 * Modules/mediastream/RTCDTMFSender.idl:
82 * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
83 * Modules/mediastream/RTCDTMFToneChangeEvent.h:
84 * Modules/mediastream/RTCDTMFToneChangeEvent.idl:
85 * Modules/mediastream/RTCDataChannel.cpp:
86 * Modules/mediastream/RTCDataChannel.h:
87 * Modules/mediastream/RTCDataChannel.idl:
88 * Modules/mediastream/RTCDataChannelEvent.cpp:
89 * Modules/mediastream/RTCDataChannelEvent.h:
90 * Modules/mediastream/RTCDataChannelEvent.idl:
91 * Modules/mediastream/RTCIceCandidate.cpp:
92 * Modules/mediastream/RTCIceCandidate.h:
93 * Modules/mediastream/RTCIceCandidate.idl:
94 * Modules/mediastream/RTCIceCandidateEvent.cpp:
95 * Modules/mediastream/RTCIceCandidateEvent.h:
96 * Modules/mediastream/RTCIceCandidateEvent.idl:
97 * Modules/mediastream/RTCIceServer.h:
98 * Modules/mediastream/RTCIceServer.idl:
99 * Modules/mediastream/RTCOfferAnswerOptions.cpp:
100 * Modules/mediastream/RTCOfferAnswerOptions.h:
101 * Modules/mediastream/RTCPeerConnection.cpp:
102 * Modules/mediastream/RTCPeerConnection.h:
103 * Modules/mediastream/RTCPeerConnection.idl:
104 * Modules/mediastream/RTCPeerConnection.js:
106 * Modules/mediastream/RTCPeerConnectionInternals.js:
107 * Modules/mediastream/RTCRtpReceiver.cpp:
108 * Modules/mediastream/RTCRtpReceiver.h:
109 * Modules/mediastream/RTCRtpReceiver.idl:
110 * Modules/mediastream/RTCRtpSender.cpp:
111 * Modules/mediastream/RTCRtpSender.h:
112 * Modules/mediastream/RTCRtpSender.idl:
113 * Modules/mediastream/RTCRtpSenderReceiverBase.h:
114 * Modules/mediastream/RTCSessionDescription.cpp:
115 * Modules/mediastream/RTCSessionDescription.h:
116 * Modules/mediastream/RTCSessionDescription.idl:
117 * Modules/mediastream/RTCStatsReport.cpp:
118 * Modules/mediastream/RTCStatsReport.idl:
119 * Modules/mediastream/RTCStatsResponse.cpp:
120 * Modules/mediastream/RTCStatsResponse.idl:
121 * Modules/mediastream/RTCTrackEvent.cpp:
122 * Modules/mediastream/RTCTrackEvent.h:
123 * Modules/mediastream/RTCTrackEvent.idl:
124 * Modules/mediastream/SDPProcessor.cpp:
125 * Modules/mediastream/SDPProcessor.h:
126 * bindings/generic/RuntimeEnabledFeatures.cpp:
127 (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
128 * bindings/generic/RuntimeEnabledFeatures.h:
129 (WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
130 (WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled):
131 (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
132 (WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
133 (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
134 (WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
135 * bindings/js/JSDOMGlobalObject.cpp:
136 (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
137 * bindings/js/JSDictionary.cpp:
138 (WebCore::JSDictionary::convertValue):
139 * bindings/js/JSDictionary.h:
140 * bindings/js/JSRTCIceCandidateCustom.cpp:
141 * bindings/js/JSRTCPeerConnectionCustom.cpp:
142 * bindings/js/JSRTCSessionDescriptionCustom.cpp:
143 * bindings/js/JSRTCStatsResponseCustom.cpp:
144 * bindings/js/WebCoreJSBuiltinInternals.cpp:
145 (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
146 (WebCore::JSBuiltinInternalFunctions::visit):
147 (WebCore::JSBuiltinInternalFunctions::initialize):
148 * bindings/js/WebCoreJSBuiltinInternals.h:
149 (WebCore::JSBuiltinInternalFunctions::rtcPeerConnectionInternals):
150 * bindings/js/WebCoreJSBuiltins.h:
151 (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
152 (WebCore::JSBuiltinFunctions::mediaDevicesBuiltins):
153 (WebCore::JSBuiltinFunctions::navigatorUserMediaBuiltins):
154 (WebCore::JSBuiltinFunctions::rtcPeerConnectionBuiltins):
155 (WebCore::JSBuiltinFunctions::rtcPeerConnectionInternalsBuiltins):
157 * dom/EventTargetFactory.in:
158 * loader/FrameLoaderClient.h:
159 * platform/mediastream/IceCandidate.h:
160 * platform/mediastream/MediaEndpoint.cpp:
161 * platform/mediastream/MediaEndpoint.h:
162 * platform/mediastream/MediaEndpointConfiguration.cpp:
163 * platform/mediastream/MediaEndpointConfiguration.h:
164 * platform/mediastream/MediaEndpointSessionConfiguration.h:
165 * platform/mediastream/MediaPayload.h:
166 * platform/mediastream/PeerMediaDescription.h:
167 * platform/mediastream/RTCConfigurationPrivate.h:
168 * platform/mediastream/RTCDTMFSenderHandler.h:
169 * platform/mediastream/RTCDTMFSenderHandlerClient.h:
170 * platform/mediastream/RTCDataChannelHandler.h:
171 * platform/mediastream/RTCDataChannelHandlerClient.h:
172 * platform/mediastream/RTCIceCandidateDescriptor.cpp:
173 * platform/mediastream/RTCIceCandidateDescriptor.h:
174 * platform/mediastream/RTCIceServerPrivate.h:
175 * platform/mediastream/RTCPeerConnectionHandler.cpp:
176 * platform/mediastream/RTCPeerConnectionHandler.h:
177 * platform/mediastream/RTCPeerConnectionHandlerClient.h:
178 * platform/mediastream/RTCSessionDescriptionDescriptor.cpp:
179 * platform/mediastream/RTCSessionDescriptionDescriptor.h:
180 * platform/mediastream/RTCSessionDescriptionRequest.h:
181 * platform/mediastream/RTCStatsRequest.h:
182 * platform/mediastream/RTCStatsResponseBase.h:
183 * platform/mediastream/RTCVoidRequest.h:
184 * platform/mediastream/SDPProcessorScriptResource.cpp:
185 * platform/mediastream/SDPProcessorScriptResource.h:
186 * platform/mock/MockMediaEndpoint.cpp:
187 * platform/mock/MockMediaEndpoint.h:
188 * platform/mock/RTCDTMFSenderHandlerMock.cpp:
189 * platform/mock/RTCDTMFSenderHandlerMock.h:
190 * platform/mock/RTCDataChannelHandlerMock.cpp:
191 * platform/mock/RTCDataChannelHandlerMock.h:
192 * platform/mock/RTCNotifiersMock.cpp:
193 * platform/mock/RTCNotifiersMock.h:
194 * platform/mock/RTCPeerConnectionHandlerMock.cpp:
195 * platform/mock/RTCPeerConnectionHandlerMock.h:
196 * platform/mock/TimerEventBasedMock.h:
197 (WebCore::RenderLayerBacking::paintIntoLayer):
198 * testing/Internals.cpp:
199 (WebCore::Internals::Internals):
200 (WebCore::Internals::enableMockSpeechSynthesizer):
201 (WebCore::Internals::enableMockMediaEndpoint):
202 (WebCore::Internals::enableMockRTCPeerConnectionHandler):
203 (WebCore::Internals::setMockMediaCaptureDevicesEnabled):
204 * testing/Internals.h:
206 2016-03-21 Joonghun Park <jh718.park@samsung.com>
208 [JSC] Add ArrayBuffer::tryCreate and change the callsites where it is needed
209 https://bugs.webkit.org/show_bug.cgi?id=155328
211 Reviewed by Darin Adler.
213 No new tests, no new behaviours.
215 * Modules/fetch/FetchBody.cpp:
216 (WebCore::FetchBody::processIfEmptyOrDisturbed):
217 (WebCore::FetchBody::consumeText):
218 * Modules/fetch/FetchLoader.cpp:
219 (WebCore::FetchLoader::didFinishLoading):
220 * bindings/js/JSDOMPromise.h:
222 * dom/MessageEvent.cpp:
223 (WebCore::MessageEvent::MessageEvent):
224 * dom/MessageEvent.h:
225 * fileapi/FileReaderLoader.cpp:
226 (WebCore::FileReaderLoader::didReceiveResponse):
227 (WebCore::FileReaderLoader::didReceiveData):
228 (WebCore::FileReaderLoader::arrayBufferResult):
229 * html/canvas/WebGLBuffer.cpp:
230 (WebCore::WebGLBuffer::associateBufferDataImpl):
231 * html/track/DataCue.cpp:
232 (WebCore::DataCue::DataCue):
233 (WebCore::DataCue::data):
234 (WebCore::DataCue::setData):
235 (WebCore::DataCue::cueContentsMatch):
236 * html/track/DataCue.h:
237 * html/track/InbandDataTextTrack.cpp:
238 (WebCore::InbandDataTextTrack::addDataCue):
239 (WebCore::InbandDataTextTrack::removeCue):
240 * platform/mac/SerializedPlatformRepresentationMac.mm:
241 (WebCore::jsValueWithDataInContext):
243 2016-02-03 Sergio Villar Senin <svillar@igalia.com>
245 [css-grid] Fix percentage tracks' size computation in grids with gutters
246 https://bugs.webkit.org/show_bug.cgi?id=153825
248 Reviewed by Darin Adler.
250 The track sizing algorithm is passed an available size
251 (freeSpace in the code) where to size the tracks. The total size of the grid
252 gutters was pre-removed from that available size because we cannot use it to size
253 the tracks. However that available size is also used to compute the size of
254 percentage tracks. As we're removing the size of the gutters, the base size for
255 percentage computations is smaller than it should be.
257 * rendering/RenderGrid.cpp:
258 (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
260 2016-03-21 Carlos Garcia Campos <cgarcia@igalia.com>
262 [GTK] scrollbar thumb clipped in 2.11.92
263 https://bugs.webkit.org/show_bug.cgi?id=155586
265 Reviewed by Michael Catanzaro.
267 In the current version of Adwaita, the scrollbar itself also has a
268 one pixel border that we are not taking into account.
270 * platform/gtk/ScrollbarThemeGtk.cpp:
271 (WebCore::ScrollbarThemeGtk::paintThumb): Use the scrollbar size
272 in indicator mode, instead of only the thumb size, to correctly
273 position the thumb in indicator mode.
275 2016-03-20 Gyuyoung Kim <gyuyoung.kim@webkit.org>
277 Reduce uses of PassRefPtr in WebCore/dom - 6
278 https://bugs.webkit.org/show_bug.cgi?id=155579
280 Reviewed by Darin Adler.
282 * dom/MessagePortChannel.h:
283 * dom/default/PlatformMessagePortChannel.cpp:
284 (WebCore::PlatformMessagePortChannel::EventData::EventData):
285 (WebCore::MessagePortChannel::createChannel):
286 (WebCore::MessagePortChannel::MessagePortChannel):
287 (WebCore::MessagePortChannel::postMessageToRemote):
288 (WebCore::PlatformMessagePortChannel::create):
289 (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
290 * dom/default/PlatformMessagePortChannel.h:
291 (WebCore::PlatformMessagePortChannel::EventData::message):
293 2016-03-20 Jinwoo Jeong <jw00.jeong@samsung.com>
295 The setter of binaryType attribute in WebSocket should raise the exception.
296 https://bugs.webkit.org/show_bug.cgi?id=135874
298 Reviewed by Antonio Gomes.
300 According to W3C WebSocket Specification, <https://www.w3.org/TR/2012/CR-websockets-20120920/>
301 when an invalid value is set on binaryType of WebSocket, a SyntaxError should be raised.
303 * Modules/websockets/WebSocket.cpp:
304 (WebCore::WebSocket::setBinaryType): Add a parameter to set an exception.
305 * Modules/websockets/WebSocket.h: Ditto.
306 * Modules/websockets/WebSocket.idl: Update that setter of binaryType could raise an exception.
308 2016-03-20 Dan Bernstein <mitz@apple.com>
310 [Mac] Determine TARGET_MAC_OS_X_VERSION_MAJOR from MACOSX_DEPLOYMENT_TARGET rather than from MAC_OS_X_VERSION_MAJOR
311 https://bugs.webkit.org/show_bug.cgi?id=155707
312 <rdar://problem/24980691>
314 Reviewed by Darin Adler.
316 * Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
317 component of MACOSX_DEPLOYMENT_TARGET.
318 * Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
319 TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.
321 2016-03-20 Konstantin Tokarev <annulen@yandex.ru>
323 Added implementations of AXObjectCache methods for !HAVE(ACCESSIBILITY).
324 https://bugs.webkit.org/show_bug.cgi?id=155697
326 Reviewed by Darin Adler.
330 * accessibility/AXObjectCache.h:
331 (WebCore::AXObjectCache::rangeForUnorderedCharacterOffsets):
332 (WebCore::AXObjectCache::absoluteCaretBoundsForCharacterOffset):
333 (WebCore::AXObjectCache::characterOffsetForIndex):
334 (WebCore::AXObjectCache::startOrEndCharacterOffsetForRange):
335 (WebCore::AXObjectCache::endCharacterOffsetOfLine):
336 (WebCore::AXObjectCache::nextCharacterOffset):
337 (WebCore::AXObjectCache::previousCharacterOffset):
339 2016-03-20 Darin Adler <darin@apple.com>
341 Disable Caches in Safari's Develop menu does not disable caches.
342 https://bugs.webkit.org/show_bug.cgi?id=64483
344 Reviewed by Antti Koivisto.
346 Moved feature from Settings to Page.
348 * history/PageCache.cpp:
349 (WebCore::canCachePage): Use function on Page instead of Settings.
350 (WebCore::PageCache::take): Ditto.
351 (WebCore::PageCache::get): Ditto.
352 * loader/FrameLoader.cpp:
353 (WebCore::FrameLoader::subresourceCachePolicy): Ditto.
354 (WebCore::FrameLoader::addExtraFieldsToRequest): Ditto.
355 * loader/cache/CachedResourceLoader.cpp:
356 (WebCore::CachedResourceLoader::cachePolicy): Ditto.
359 (WebCore::Page::isResourceCachingDisabled): Added.
360 (WebCore::Page::setResourceCachingDisabled): Added.
362 * page/Settings.in: Removed resourceCachingDisabled.
364 2016-03-20 Dan Bernstein <mitz@apple.com>
366 Update build settings
368 Rubber-stamped by Andy Estes.
370 * Configurations/DebugRelease.xcconfig:
371 * Configurations/FeatureDefines.xcconfig:
372 * Configurations/Version.xcconfig:
374 2016-03-20 Chris Fleizach <cfleizach@apple.com>
376 AX: Radio button members are not identified together in all cases
377 https://bugs.webkit.org/show_bug.cgi?id=155604
378 <rdar://problem/21186992>
380 Reviewed by Darin Adler.
382 Allow aria radio buttons to be grouped together as linked ui elements even if they're not input types of radio button.
384 Modified test: accessibility/radio-button-group-members.html
386 * accessibility/AccessibilityRenderObject.cpp:
387 (WebCore::AccessibilityRenderObject::speakProperty):
388 (WebCore::AccessibilityRenderObject::addRadioButtonGroupChildren):
389 (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
390 * accessibility/AccessibilityRenderObject.h:
392 2016-03-19 Joonghun Park <jh718.park@samsung.com>
394 Purge PassRefPtr from WebCore/html/shadow
395 https://bugs.webkit.org/show_bug.cgi?id=155681
397 Reviewed by Darin Adler.
399 No new tests, no new behaviours.
401 * html/HTMLImageElement.cpp:
402 (WebCore::HTMLImageElement::updateImageControls):
403 (WebCore::HTMLImageElement::tryCreateImageControls):
404 (WebCore::HTMLImageElement::createImageControls): Deleted.
405 * html/HTMLImageElement.h:
406 * html/shadow/ImageControlsRootElement.h:
407 * html/shadow/MediaControls.h:
408 * html/shadow/MediaControlsApple.cpp:
409 (WebCore::MediaControls::tryCreate):
410 (WebCore::MediaControlsApple::tryCreateControls):
411 (WebCore::MediaControlsApple::showClosedCaptionTrackList):
412 (WebCore::MediaControlsApple::hideClosedCaptionTrackList):
413 (WebCore::MediaControlsApple::eventListener):
414 (WebCore::MediaControls::create): Deleted.
415 (WebCore::MediaControlsApple::createControls): Deleted.
416 * html/shadow/MediaControlsApple.h:
417 * html/shadow/mac/ImageControlsButtonElementMac.cpp:
418 (WebCore::ImageControlsButtonElementMac::tryCreate):
419 (WebCore::ImageControlsButtonElementMac::maybeCreate): Deleted.
420 * html/shadow/mac/ImageControlsButtonElementMac.h:
421 * html/shadow/mac/ImageControlsRootElementMac.cpp:
422 (WebCore::ImageControlsRootElement::tryCreate):
423 (WebCore::ImageControlsRootElement::maybeCreate): Deleted.
425 2016-03-19 Antti Koivisto <antti@apple.com>
427 Data URL DecodeTask may get deleted outside main thread
428 https://bugs.webkit.org/show_bug.cgi?id=155584
429 rdar://problem/24492104
431 Reviewed by David Kilzer.
433 Follow-up: fix a possible null pointer crash.
435 * platform/network/DataURLDecoder.cpp:
436 (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
438 If timer fires under startOneShot m_decodeTask may become zero before schedule() is called.
439 Fix by copying schedule context to a local before calling startOneShot.
441 2016-03-18 Zhuo Li <zachli@apple.com>
443 Update AutoFill button in input fields.
444 https://bugs.webkit.org/show_bug.cgi?id=155619.
445 rdar://problem/24486939.
447 Reviewed by Daniel Bates.
450 (input::-webkit-contacts-auto-fill-button):
451 Use the new AutoFill button.
453 2016-03-18 Alex Christensen <achristensen@webkit.org>
455 Give NSURLSessionConfiguration information about parent process
456 https://bugs.webkit.org/show_bug.cgi?id=155661
458 Reviewed by Anders Carlsson.
460 * platform/spi/cf/CFNetworkSPI.h:
461 Add newly-used SPI declarations.
463 2016-03-18 Simon Fraser <simon.fraser@apple.com>
465 Sideways-scrollable RTL document has wrong initial and reload offset in WKWebView
466 https://bugs.webkit.org/show_bug.cgi?id=155660
467 rdar://problem/22212662
469 Reviewed by Tim Horton.
471 There were two problems with the scroll position of RTL documents on initial and reload
474 First, in the delegatesScrolling() code path, ScrollView::updateScrollbars() needs to
475 tell someone that the scroll origin changed, to trigger a scroll to the page origin.
477 Secondly, WKWebView had scrollPosition/scrollOffset confusion in various places.
479 Test: fast/scrolling/rtl-initial-scroll-position.html
481 * platform/ScrollView.cpp:
482 (WebCore::ScrollView::updateScrollbars):
484 2016-03-18 Ryan Haddad <ryanhaddad@apple.com>
486 Unreviewed, rolling out r198443.
488 This change caused API test failures on El Capitan
492 "CRASH in WebCore::MediaResourceLoader::requestResource + 698"
493 https://bugs.webkit.org/show_bug.cgi?id=155651
494 http://trac.webkit.org/changeset/198443
496 2016-03-18 Darin Adler <darin@apple.com>
498 ASSERTION FAILED: m_isValid == valid() in WebCore::HTMLFormControlElement::isValidFormControlElement
499 https://bugs.webkit.org/show_bug.cgi?id=139481
501 Reviewed by Daniel Bates.
503 Test: fast/forms/validity-assertion-inserting-into-datalist.html
505 * html/HTMLFormControlElement.cpp:
506 (WebCore::HTMLFormControlElement::insertedInto): Set the flags that will cause
507 "will validate" to be recomputed *before* calling willValidate().
509 2016-03-18 Chris Dumez <cdumez@apple.com>
511 Speculative revalidation requests do not have their HTTP user-agent set
512 https://bugs.webkit.org/show_bug.cgi?id=155620
513 <rdar://problem/24657567>
515 Reviewed by Brady Eidson.
517 Export a couple of symbols so they can be used from WebKit2.
519 Test: http/tests/cache/disk-cache/speculative-validation/validation-request.html
521 * platform/network/ResourceRequestBase.h:
523 2016-03-18 Zhuo Li <zachli@apple.com>
525 Need to forward declare NSScrollerImpSPI::scrollerLayoutDirection.
526 https://bugs.webkit.org/show_bug.cgi?id=155662.
528 Reviewed by Myles C. Maxfield.
530 * platform/spi/mac/NSScrollerImpSPI.h:
531 Forward declare NSScrollerImpSPI::scrollerLayoutDirection.
533 2016-03-18 Myles C. Maxfield <mmaxfield@apple.com>
535 [OS X] Scrollbars are sometimes erroneously reported as overlay
536 https://bugs.webkit.org/show_bug.cgi?id=155630
538 Reviewed by Darin Adler.
540 When AppKit boots up, if the system preference is set to determine at runtime whether
541 scrollbars should be overlay or always-on, AppKit must do some processing to determine
542 this scrollbar state. We listen for the results by using NSScrollerImpPairDelegate's
543 scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle: method.
545 However, our NSScrollerImpPairDelegates are owned by the FrameView, and when loading
546 a page, there is a short amount of time when no FrameViews are alive. This means that
547 there is a point in time when we don't have any NSScrollerImpPairs alive. Unfortunately,
548 the processesing that AppKit does to determine the scrollbar state is done
549 asynchronously, and the results may be reported within this short window. In this case,
550 we don't receive the notification that the scrollbar should be non-overlay, and our
551 internal state (gUsesOverlayScrollbars in ScrollbarThemeMac) becomes stale.
553 The solution is to simply always check what the scrollbar state is upon creation of a
554 NSScrollerImpPair. That way, as soon as the second FrameView is created, the scrollbar
555 state will be correctly updated immediately.
557 An alternative, similar, approach would be for ScrollbarThemeMac to listen to the
558 NSPreferredScrollerStyleDidChangeNotification. This patch doesn't use this approach
559 in order to align with the current division of responsibilities between ScrollAnimator
562 Covered by existing (RTL Scrollbar) tests.
564 * platform/mac/ScrollAnimatorMac.mm:
565 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
567 2016-03-18 Jer Noble <jer.noble@apple.com>
569 CRASH in WebCore::MediaResourceLoader::requestResource + 698
570 https://bugs.webkit.org/show_bug.cgi?id=155651
571 <rdar://problem/25130582>
573 Reviewed by Eric Carlson.
575 No new tests, fixes existing tests running under GuardMalloc.
577 Protect against the Document passed into MediaResourceLoader being destroyed during the MediaResourceLoader's lifetime.
579 * loader/MediaResourceLoader.cpp:
580 (WebCore::MediaResourceLoader::MediaResourceLoader):
581 (WebCore::MediaResourceLoader::contextDestroyed):
582 (WebCore::MediaResourceLoader::requestResource):
583 (WebCore::MediaResource::responseReceived):
584 * loader/MediaResourceLoader.h:
586 2016-03-18 Mark Lam <mark.lam@apple.com>
588 JSDOMGlobalObject.h needs to #include StructureInlines.h.
589 https://bugs.webkit.org/show_bug.cgi?id=155657
591 Reviewed by Filip Pizlo.
593 No new tests needed. This is a build fix for the Win EWS.
595 * bindings/js/JSDOMGlobalObject.h:
597 2016-03-18 Brent Fulgham <bfulgham@apple.com>
599 Local file restrictions should not block sessionStorage access
600 https://bugs.webkit.org/show_bug.cgi?id=155609
601 <rdar://problem/25229461>
603 Reviewed by Andy Estes.
605 Use of 'sesssionStorage' is governed by SecurityOrigin with third party access
606 set to 'ShouldAllowFromThirdParty::AlwaysAllowFromThirdParty'. We should not
607 reject local files for this combination of arguments.
609 Test: storage/domstorage/sessionstorage/blocked-file-access.html
611 * page/SecurityOrigin.cpp:
612 (WebCore::SecurityOrigin::canAccessStorage): For the case of sessionStorage,
613 allow local file access.
615 2016-03-18 Jer Noble <jer.noble@apple.com>
617 CachedResource::MediaResource types shouldn't be blocked due to mixed-content.
618 https://bugs.webkit.org/show_bug.cgi?id=155588
619 <rdar://problem/25177795>
621 Reviewed by Daniel Bates.
623 The Mixed Content spec specifically allows (with certain restrictions) loads of <image>,
624 <video>, and <audio> resources from mixed-content origins, albeit with warnings.
626 No new tests, fixes existing test: http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html
628 * loader/cache/CachedResourceLoader.cpp:
629 (WebCore::contentTypeFromResourceType):
631 2016-03-18 Nan Wang <n_wang@apple.com>
633 AX: AXARIACurrent exposed but not displayed in Accessibility Inspector
634 https://bugs.webkit.org/show_bug.cgi?id=155600
636 Reviewed by Chris Fleizach.
638 AXARIACurrent attribute was added to a temporary array that was never returned.
640 Test: accessibility/mac/aria-current-attribute-exposed.html
642 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
643 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
645 2016-03-18 Nan Wang <n_wang@apple.com>
647 AX: Typing broken on form input field while using VoiceOver
648 https://bugs.webkit.org/show_bug.cgi?id=155613
650 Reviewed by Chris Fleizach.
652 The div element inside the INPUT element gives a collapsed TextMarkerRange which then creates
653 a collapsed Range. Fixed it by using the parent node to create the Range when the div node has
656 Test: accessibility/mac/text-marker-range-for-node-without-children.html
658 * accessibility/AXObjectCache.cpp:
659 (WebCore::setRangeStartOrEndWithCharacterOffset):
661 2016-03-18 Chris Fleizach <cfleizach@apple.com>
663 AX: Implement AutoFill Available attribute for a text field
664 https://bugs.webkit.org/show_bug.cgi?id=155567
666 Reviewed by Darin Adler.
668 This file was left out of original commit accidentally.
670 * accessibility/AccessibilityRenderObject.cpp:
671 (WebCore::AccessibilityRenderObject::addTextFieldChildren):
673 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
675 [Mac][cmake] Unreviewed speculative buildfix after r197956. Just for fun.
679 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
681 [Mac][cmake] Unreviewed speculative buildfix after r197628. Just for fun.
685 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
687 [Mac][cmake] One more attempt to try to fix the build after r197633.
691 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
693 [Mac][cmake] One more attempt to try to fix the build after r197633.
697 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
699 [Mac][cmake] One more attempt to try to fix the build after r197633.
701 * PlatformMac.cmake: Revert r198398, which was incorrect.
703 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
705 [Mac][cmake] Last attempt to try to fix the build after r197633.
709 2016-03-18 Manuel Rego Casasnovas <rego@igalia.com>
711 [css-grid] Rename GridSpan properties
712 https://bugs.webkit.org/show_bug.cgi?id=155636
714 Reviewed by Sergio Villar Senin.
716 GridSpan was using old names initialResolvedPosition and
717 finalResolvedPosition.
718 This patch rename them to startLine and endLine.
720 Some reasons for this refactoring:
721 - "position" is a vague term not defined in the spec.
722 - GridSpan is currently storing grid lines. A grid "line" is defined
723 in the spec: https://drafts.csswg.org/css-grid/#grid-line-concept
724 - The spec uses the concepts "start" and "end" lines too.
726 No new tests, no change of behavior.
728 * css/CSSGridTemplateAreasValue.cpp:
729 (WebCore::stringForPosition):
731 (WebCore::CSSParser::parseGridTemplateAreasRow):
732 * css/StyleBuilderConverter.h:
733 (WebCore::StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea):
734 * rendering/RenderGrid.cpp:
735 (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
736 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
737 (WebCore::RenderGrid::insertItemIntoGrid):
738 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
739 (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
740 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
741 (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
742 (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
743 (WebCore::RenderGrid::columnAxisOffsetForChild):
744 (WebCore::RenderGrid::rowAxisOffsetForChild):
745 * rendering/style/GridArea.h:
746 (WebCore::GridSpan::untranslatedDefiniteGridSpan):
747 (WebCore::GridSpan::translatedDefiniteGridSpan):
748 (WebCore::GridSpan::operator==):
749 (WebCore::GridSpan::integerSpan):
750 (WebCore::GridSpan::untranslatedStartLine):
751 (WebCore::GridSpan::untranslatedEndLine):
752 (WebCore::GridSpan::startLine):
753 (WebCore::GridSpan::endLine):
754 (WebCore::GridSpan::begin):
755 (WebCore::GridSpan::end):
756 (WebCore::GridSpan::translate):
757 (WebCore::GridSpan::GridSpan):
758 (WebCore::GridSpan::untranslatedResolvedInitialPosition): Deleted.
759 (WebCore::GridSpan::untranslatedResolvedFinalPosition): Deleted.
760 (WebCore::GridSpan::resolvedInitialPosition): Deleted.
761 (WebCore::GridSpan::resolvedFinalPosition): Deleted.
762 * rendering/style/GridPositionsResolver.cpp:
763 (WebCore::definiteGridSpanWithNamedLineSpanAgainstOpposite):
764 (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
765 (WebCore::resolveGridPositionAgainstOppositePosition):
766 (WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
768 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
770 [Mac][cmake] One more unreviewed speculative buildfix after r197633. Just for fun.
774 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
776 [Mac][cmake] Unreviewed speculative buildfix after r197633. Just for fun.
780 2016-03-18 Youenn Fablet <youenn.fablet@crf.canon.fr>
782 crossorigin element resource loading should check HTTP redirection
783 https://bugs.webkit.org/show_bug.cgi?id=130578
785 Reviewed by Daniel Bates and Brent Fulgham.
787 Moved part of DocumentThreadableLoader redirection cross origin control code
788 into functions in CrossOriginAccessControl.cpp. Added cross origin control for
789 redirections in SubResourceLoader when policy is set to PotentiallyCrossOriginEnabled
790 using CrossOriginAccessControl.cpp new functions. Added a new test that checks that
791 cross-origin redirections are checked against CORS.
793 Test: http/tests/security/shape-image-cors-redirect.html
795 * loader/CrossOriginAccessControl.cpp:
796 (WebCore::isValidCrossOriginRedirectionURL): Returns true if the redirected URL is a valid URL for cross-origin requests.
797 (WebCore::cleanRedirectedRequestForAccessControl): Removes all headers added by the network backend that may cause the response CORS validation to fail.
798 * loader/CrossOriginAccessControl.h: Added above function prototypes.
799 * loader/DocumentThreadableLoader.cpp:
800 (WebCore::DocumentThreadableLoader::redirectReceived): Used new CORS redirection methods of CrossOriginAccessControl.cpp.
801 * loader/SubresourceLoader.cpp:
802 (WebCore::SubresourceLoader::init): Initialize the SecurityOrigin to be used for loading the resource.
803 (WebCore::SubresourceLoader::willSendRequest): Added cross-origin redirection response check.
804 (WebCore::SubresourceLoader::checkCrossOriginAccessControl): Checks CORS and update request if needed. Returns true if control checks passed.
805 * loader/SubresourceLoader.h: Added checkCrossOriginAccessControl declaration and m_origin declaration.
807 2016-03-18 Darin Adler <darin@apple.com>
809 Disable Caches in Safari's Develop menu does not disable caches.
810 https://bugs.webkit.org/show_bug.cgi?id=64483
812 Reviewed by Antti Koivisto.
814 Add a new setting, ResourceCachingDisabled, for use in future versions of Safari.
816 * history/PageCache.cpp:
817 (WebCore::canCachePage): Check resourceCachingDisabled and return false.
818 (WebCore::PageCache::take): Check resourceCachingDisabled, and return null.
819 (WebCore::PageCache::get): Ditto.
821 * loader/FrameLoader.cpp:
822 (WebCore::FrameLoader::subresourceCachePolicy): Check resourceCachingDisabled, and
824 (WebCore::FrameLoader::addExtraFieldsToRequest): Check resourceCachingDisabled, and
825 set the cache policy to trigger a reload.
826 * loader/cache/CachedResourceLoader.cpp:
827 (WebCore::CachedResourceLoader::cachePolicy): Check resourceCachingDisabled, and
830 * page/Settings.in: Added resourceCachingDisabled.
832 2016-03-18 Csaba Osztrogonác <ossy@webkit.org>
834 [Mac][cmake] Unreviewed speculative buildfix. Just for fun.
836 * loader/EmptyClients.cpp:
838 2016-03-17 Antti Koivisto <antti@apple.com>
840 Data URL DecodeTask may get deleted outside main thread
841 https://bugs.webkit.org/show_bug.cgi?id=155584
842 rdar://problem/24492104
844 Reviewed by Darin Adler.
846 This is unsafe as it owns strings and other types that are only safe to delete in the main thread.
848 There is a race between deref in dispatch() and deref in timerFired(). If the timer fires before dispatch()
849 exits the implicit deref will trigger deletion of DecodingResultDispatcher in the dispatching thread.
851 (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
853 Fix by clearing m_decodeTask when the timer fires.
855 2016-03-17 Carlos Garcia Campos <cgarcia@igalia.com>
857 REGRESSION(r195661): [GTK] very slow scrolling
858 https://bugs.webkit.org/show_bug.cgi?id=155334
860 Reviewed by Michael Catanzaro.
862 We need to also restore the PerAxisData visible length when it's
863 reset because of a non animated scroll. To prevent making the same
864 mistake in the future, the current position and visible lengths
865 members are now required to construct PerAxisData. This also
866 simplifies the code and ensures that when the ScrollAnimatorSmooth
867 is created, it's updated to the current position.
869 * platform/ScrollAnimationSmooth.cpp:
870 (WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
871 Initialize PerAxisData members.
872 (WebCore::ScrollAnimationSmooth::setCurrentPosition): Pass the
873 current position and visible length as parameters to the
874 PerAxisData constructor.
875 (WebCore::ScrollAnimationSmooth::animateScroll): Ditto.
876 * platform/ScrollAnimationSmooth.h: Add a PerAxisData constructor
877 that receives current position and visible length and disallow to
878 use the default constructor.
879 * platform/ScrollAnimatorSmooth.cpp:
880 (WebCore::ScrollAnimatorSmooth::ScrollAnimatorSmooth): Pass the
881 current position to the ScrollAnimationSmooth constructor.
882 * platform/gtk/ScrollAnimatorGtk.cpp:
883 (WebCore::ScrollAnimatorGtk::ensureSmoothScrollingAnimation): Ditto.
885 2016-03-17 Chris Fleizach <cfleizach@apple.com>
887 AX: WEB: VoiceOver does not announce some WAI-ARIA document structures
888 https://bugs.webkit.org/show_bug.cgi?id=155603
889 <rdar://problem/25227385>
891 Reviewed by Darin Adler.
893 Expose more ARIA landmark type roles on iOS for accessibility.
895 Updated test: accessibility/ios-simulator/landmark-type.html
897 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
898 (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
899 (-[WebAccessibilityObjectWrapper accessibilityLabel]):
900 * platform/LocalizedStrings.cpp:
901 (WebCore::searchMenuClearRecentSearchesText):
902 (WebCore::AXWebAreaText):
903 (WebCore::AXListItemActionVerb):
904 (WebCore::AXAutoFillCredentialsLabel):
905 * platform/LocalizedStrings.h:
907 2016-03-17 Daniel Bates <dabates@apple.com>
909 Cleanup: Remove the need to pass reporting status to ContentSecurityPolicy functions
910 https://bugs.webkit.org/show_bug.cgi?id=155623
912 Reviewed by Andy Estes and Alex Christensen.
914 ScriptController::initScript() is the only function that passes ContentSecurityPolicy::ReportingStatus::SuppressReport
915 following the removal of the SecurityPolicy script interface in <http://trac.webkit.org/changeset/197142>. It
916 passes this reporting status to prevent sending a violation report when determining whether the CSP policy allows
917 use of the JavaScript eval()/operator eval so that it enable or disable this capability as appropriate. We
918 should teach ScriptController::initScript() to delegate the responsibility of enabling/disabling this capability
919 to the ContentSecurityPolicy. Then we can remove the need to expose ContentSecurityPolicy::ReportingStatus as
920 part of the ContentSecurityPolicy interface.
922 No functionality changed. So, no new tests.
924 * bindings/js/ScriptController.cpp:
925 (WebCore::ScriptController::createWindowShell): Return a reference to a JSDOMWindowShell object
926 instead of a pointer as the pointer is always non-null.
927 (WebCore::ScriptController::initScript): Updated as needed now that ScriptController::createWindowShell()
928 returns a reference. Moved logic to enable/disable JavaScript eval() and operator eval from here into
929 ContentSecurityPolicy::didCreateWindowShell() and make use of this member function.
930 * bindings/js/ScriptController.h:
931 * page/csp/ContentSecurityPolicy.cpp:
932 (WebCore::ContentSecurityPolicy::didCreateWindowShell): Added. Moved logic from to enable/disable JavaScript
933 eval() and operator eval from ScriptController::initScript() to here.
934 (WebCore::ContentSecurityPolicy::didReceiveHeader): Substitute ContentSecurityPolicyDirectiveList::ReportingStatus::SuppressReport
935 for ContentSecurityPolicy::ReportingStatus::SuppressReport as the enum has moved from class ContentSecurityPolicy
936 to ContentSecurityPolicyDirectiveList. Fix minor code style nit; substitute nullptr for 0 in the first argument
937 to ContentSecurityPolicyDirectiveList::allowEval().
938 (WebCore::isAllowedByAllWithFrame): Substitute ContentSecurityPolicyDirectiveList::ReportingStatus::SuppressReport
939 for ContentSecurityPolicy::ReportingStatus::SuppressReport as the enum has moved from class ContentSecurityPolicy
940 to ContentSecurityPolicyDirectiveList.
941 (WebCore::isAllowedByAll): Substitute ContentSecurityPolicyDirectiveList::ReportingStatus::SuppressReport
942 for ContentSecurityPolicy::ReportingStatus::SuppressReport as the enum has moved from class ContentSecurityPolicy
943 to ContentSecurityPolicyDirectiveList. Also make this function static so that it has internal linkage.
944 (WebCore::isAllowedByAllWithState): Ditto.
945 (WebCore::isAllowedByAllWithContext): Ditto.
946 (WebCore::isAllowedByAllWithHashFromContent): Ditto.
947 (WebCore::isAllowedByAllWithURL): Ditto.
948 (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Remove argument reportingStatus and always pass
949 ContentSecurityPolicyDirectiveList::ReportingStatus::SendReport to the directive list member function. In a
950 subsequent patch we will remove the need to pass the reporting status to the directive list member function.
951 (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Ditto.
952 (WebCore::ContentSecurityPolicy::allowInlineScript): Ditto.
953 (WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
954 (WebCore::ContentSecurityPolicy::allowEval): Ditto.
955 (WebCore::ContentSecurityPolicy::allowFrameAncestors): Ditto.
956 (WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
957 (WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
958 (WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
959 (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
960 (WebCore::ContentSecurityPolicy::allowChildContextFromSource): Ditto.
961 (WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
962 (WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
963 (WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
964 (WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
965 (WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
966 (WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
967 (WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
968 (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage): Deleted.
969 * page/csp/ContentSecurityPolicy.h:
970 * page/csp/ContentSecurityPolicyDirectiveList.cpp:
971 (WebCore::ContentSecurityPolicyDirectiveList::allowJavaScriptURLs): Substitute ReportingStatus for
972 ContentSecurityPolicy::ReportingStatus as the enum has moved from class ContentSecurityPolicy to this class.
973 (WebCore::ContentSecurityPolicyDirectiveList::allowInlineEventHandlers): Ditto.
974 (WebCore::ContentSecurityPolicyDirectiveList::allowInlineScript): Ditto.
975 (WebCore::ContentSecurityPolicyDirectiveList::allowInlineStyle): Ditto.
976 (WebCore::ContentSecurityPolicyDirectiveList::allowEval): Ditto.
977 (WebCore::ContentSecurityPolicyDirectiveList::allowPluginType): Ditto.
978 (WebCore::ContentSecurityPolicyDirectiveList::allowScriptFromSource): Ditto.
979 (WebCore::ContentSecurityPolicyDirectiveList::allowObjectFromSource): Ditto.
980 (WebCore::ContentSecurityPolicyDirectiveList::allowChildContextFromSource): Ditto.
981 (WebCore::ContentSecurityPolicyDirectiveList::allowChildFrameFromSource): Ditto.
982 (WebCore::ContentSecurityPolicyDirectiveList::allowImageFromSource): Ditto.
983 (WebCore::ContentSecurityPolicyDirectiveList::allowStyleFromSource): Ditto.
984 (WebCore::ContentSecurityPolicyDirectiveList::allowFontFromSource): Ditto.
985 (WebCore::ContentSecurityPolicyDirectiveList::allowMediaFromSource): Ditto.
986 (WebCore::ContentSecurityPolicyDirectiveList::allowConnectToSource): Ditto.
987 (WebCore::ContentSecurityPolicyDirectiveList::allowFormAction): Ditto.
988 (WebCore::ContentSecurityPolicyDirectiveList::allowBaseURI): Ditto.
989 (WebCore::ContentSecurityPolicyDirectiveList::allowFrameAncestors): Ditto.
990 * page/csp/ContentSecurityPolicyDirectiveList.h:
992 2016-03-17 Brent Fulgham <bfulgham@apple.com>
994 [XSS Auditor] Off by one in XSSAuditor::canonicalizedSnippetForJavaScript()
995 https://bugs.webkit.org/show_bug.cgi?id=155624
996 <rdar://problem/25219962>
998 Unreviewed merge from Blink (patch by Tom Sepez <tsepez@chromium.org>):
999 <https://src.chromium.org/viewvc/blink?revision=201803&view=revision>
1001 Test: http/tests/security/xssAuditor/script-tag-with-trailing-script-and-urlencode.html
1003 * html/parser/XSSAuditor.cpp:
1004 (WebCore::XSSAuditor::canonicalizedSnippetForJavaScript): Correct off-by-one error.
1006 2016-03-17 Zalan Bujtas <zalan@apple.com>
1008 Images in feed on ebay.com jiggle when one is hovered
1009 https://bugs.webkit.org/show_bug.cgi?id=155608
1010 <rdar://problem/25160681>
1012 The content offset in compositing layer = subpixel gap between the graphics layer and the layer bounds + layer bounds top left.
1014 Reviewed by Simon Fraser.
1016 Test: compositing/hidpi-viewport-clipping-on-composited-content.html
1018 * rendering/RenderLayerBacking.cpp:
1019 (WebCore::RenderLayerBacking::updateGeometry):
1020 (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
1021 * rendering/RenderLayerBacking.h:
1023 2016-03-17 Zalan Bujtas <zalan@apple.com>
1025 Don't initiate a style recall while drawing text
1026 https://bugs.webkit.org/show_bug.cgi?id=155618
1028 Reviewed by Simon Fraser.
1030 This patch ensures that we don't initiate a style recalc while in the middle of text drawing.
1032 Test: fast/canvas/crash-while-resizing-canvas.html
1034 * html/canvas/CanvasRenderingContext2D.cpp:
1035 (WebCore::CanvasRenderingContext2D::drawTextInternal):
1037 2016-03-17 Commit Queue <commit-queue@webkit.org>
1039 Unreviewed, rolling out r198335.
1040 https://bugs.webkit.org/show_bug.cgi?id=155617
1042 This change caused existing LayoutTests to crash
1043 intermittently (Requested by ryan|afk on #webkit).
1047 "DataURLDecoder::DecodingResultDispatcher may get deleted
1048 outside main thread"
1049 https://bugs.webkit.org/show_bug.cgi?id=155584
1050 http://trac.webkit.org/changeset/198335
1052 2016-03-17 Eric Carlson <eric.carlson@apple.com>
1054 Improve some metadata tests
1055 https://bugs.webkit.org/show_bug.cgi?id=155616
1057 Reviewed by Saam Barati.
1059 * html/track/DataCue.cpp:
1060 (WebCore::DataCue::DataCue):
1061 (WebCore::DataCue::setData):
1063 2016-03-17 Myles C. Maxfield <mmaxfield@apple.com>
1065 [RTL Scrollbars] Position: absolute divs are covered by vertical scrollbar
1066 https://bugs.webkit.org/show_bug.cgi?id=155531
1068 Reviewed by Darin Adler.
1070 This patch updates ScrollView::documentScrollPositionRelativeToViewOrigin(), which is
1071 a helper function primarily used by WebCore::ScrollView::viewToContents() and
1072 WebCore::ScrollView::contentsToView().
1074 Tests: fast/scrolling/rtl-scrollbars-elementFromPoint-static.html
1075 fast/scrolling/rtl-scrollbars-elementFromPoint.html
1076 fast/scrolling/rtl-scrollbars-iframe-offset.html
1077 fast/scrolling/rtl-scrollbars-iframe-position-absolute.html
1078 fast/scrolling/rtl-scrollbars-iframe-scrolled.html
1079 fast/scrolling/rtl-scrollbars-iframe.html
1080 fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html
1081 fast/scrolling/rtl-scrollbars-overflow-position-absolute.html
1082 fast/scrolling/rtl-scrollbars-overflow-text-selection-scrolled.html
1083 fast/scrolling/rtl-scrollbars-position-absolute.html
1084 fast/scrolling/rtl-scrollbars-position-fixed.html
1085 fast/scrolling/rtl-scrollbars-text-selection-scrolled.html
1086 fast/scrolling/rtl-scrollbars-text-selection.html
1088 * platform/ScrollView.cpp:
1089 (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
1091 2016-03-17 Filip Pizlo <fpizlo@apple.com>
1093 Replace all of the various non-working and non-compiling sampling profiler hacks with a single super hack
1094 https://bugs.webkit.org/show_bug.cgi?id=155561
1096 Reviewed by Saam Barati.
1098 No new tests because no new behavior.
1100 * platform/audio/ios/MediaSessionManagerIOS.mm:
1101 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1103 2016-03-17 Brent Fulgham <bfulgham@apple.com>
1105 Some media tests are flaky.
1106 https://bugs.webkit.org/show_bug.cgi?id=155614
1108 Reviewed by Eric Carlson.
1110 * html/track/TextTrack.cpp:
1111 (WebCore::TextTrack::~TextTrack):
1113 2016-03-17 Brady Eidson <beidson@apple.com>
1115 Don't try to restore deleted MemoryIndexes if their owning object store is not restored.
1116 https://bugs.webkit.org/show_bug.cgi?id=155068
1118 Reviewed by Alex Christensen.
1120 Test: storage/indexeddb/modern/deleteindex-4-private.html
1122 * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
1123 (WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
1125 2016-03-17 Doug Russell <d_russell@apple.com>
1127 AX: attributes to retrieve focusable and editable ancestors
1128 https://bugs.webkit.org/show_bug.cgi?id=155554
1130 Reviewed by Chris Fleizach.
1132 Add attributes to help give context to focus changes:
1133 AXFocusableAncestor - nearest accessibility ancestor that returns true for
1134 canSetFocusAttribute().
1135 AXEditableAncestor - nearest accessibility ancestor that returns true for
1137 AXHighestEditableAncestor - highest element in accessibility that returns true
1138 for isTextControl().
1140 Test: accessibility/mac/ancestor-attributes.html
1142 * accessibility/AccessibilityNodeObject.cpp:
1143 * accessibility/AccessibilityObject.cpp:
1144 (WebCore::AccessibilityObject::focusableAncestor):
1145 (WebCore::AccessibilityObject::editableAncestor):
1146 (WebCore::AccessibilityObject::highestEditableAncestor):
1147 * accessibility/AccessibilityObject.h:
1148 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1149 (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1150 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1152 2016-03-17 Sam Weinig <sam@webkit.org>
1154 Implement document.queryCommandSupported("copy")
1155 https://bugs.webkit.org/show_bug.cgi?id=155548
1156 <rdar://problem/25195295>
1158 Reviewed by Enrica Casucci.
1160 - document.queryCommandSupported("copy") and document.queryCommandSupported("cut") need
1161 to return true if the ClipboardAccessPolicy is either Allow or RequiresUserGesture.
1162 But, document.queryCommandEnabled("copy") and document.queryCommandEnabled("cut")
1163 should still return false when there is no user gesture. I also had to maintain a weird
1164 quirk that copy and cut should be allowed to execute, and thus fire the oncopy and oncut
1165 events, even when disabled, if coming from a "MenuOrKeyBinding" source. To do this, I
1166 upgraded the allowExecutionWhenDisabled bit to a function taking a source, and return true
1167 only when the correct source is specified.
1170 * editing/EditorCommand.cpp:
1171 (WebCore::defaultValueForSupportedCopyCut):
1172 (WebCore::allowCopyCutFromDOM):
1173 (WebCore::enabledCopy):
1174 (WebCore::enabledCut):
1175 (WebCore::allowExecutionWhenDisabled):
1176 (WebCore::doNotAllowExecutionWhenDisabled):
1177 (WebCore::allowExecutionWhenDisabledCopyCut):
1178 (WebCore::Editor::Command::execute):
1179 (WebCore::Editor::Command::allowExecutionWhenDisabled):
1181 2016-03-17 Antti Koivisto <antti@apple.com>
1183 DataURLDecoder::DecodingResultDispatcher may get deleted outside main thread
1184 https://bugs.webkit.org/show_bug.cgi?id=155584
1185 rdar://problem/24492104
1187 Reviewed by Chris Dumez.
1189 This is unsafe as it owns strings and other types that are only safe to delete in the main thread.
1191 * platform/network/DataURLDecoder.cpp:
1192 (WebCore::DataURLDecoder::DecodingResultDispatcher::dispatch):
1194 The problem is that this was a refcounted type. This created a race. If the timer fired before dispatch()
1195 was exited the implicit deref here would trigger the deletion in the dispatching thread.
1197 Fix by getting rid of the unnecessary refcounting. Timer firing will now delete the instance explicitly.
1199 (WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):
1200 (WebCore::DataURLDecoder::DecodingResultDispatcher::timerFired):
1202 2016-03-17 Commit Queue <commit-queue@webkit.org>
1204 Unreviewed, rolling out r198201.
1205 https://bugs.webkit.org/show_bug.cgi?id=155585
1207 That was not the proper solution (Requested by KaL on
1212 "REGRESSION (r197724): [GTK] Web Inspector: Images being
1214 https://bugs.webkit.org/show_bug.cgi?id=155432
1215 http://trac.webkit.org/changeset/198201
1217 2016-03-16 Chris Fleizach <cfleizach@apple.com>
1219 AX: Implement AutoFill Available attribute for a text field
1220 https://bugs.webkit.org/show_bug.cgi?id=155567
1222 Reviewed by Darin Adler.
1224 Expose the auto fill buttons to the AX hierarchy.
1225 Add an attribute for the textfield to inform when the auto fill button is available.
1227 Test: accessibility/auto-fill-types.html
1229 * English.lproj/Localizable.strings:
1230 * accessibility/AccessibilityObject.cpp:
1231 (WebCore::AccessibilityObject::element):
1232 (WebCore::AccessibilityObject::isValueAutofillAvailable):
1233 (WebCore::AccessibilityObject::isValueAutofilled):
1234 * accessibility/AccessibilityObject.h:
1235 (WebCore::AccessibilityObject::passwordFieldValue):
1236 * accessibility/AccessibilityRenderObject.cpp:
1237 (WebCore::AccessibilityRenderObject::addTextFieldChildren):
1238 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1239 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1240 * html/TextFieldInputType.cpp:
1241 (WebCore::limitLength):
1242 (WebCore::autoFillButtonTypeToAccessibilityLabel):
1243 (WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
1244 (WebCore::TextFieldInputType::createAutoFillButton):
1245 (WebCore::TextFieldInputType::updateAutoFillButton):
1246 * platform/LocalizedStrings.cpp:
1247 (WebCore::AXListItemActionVerb):
1248 (WebCore::AXAutoFillCredentialsLabel):
1249 (WebCore::AXAutoFillContactsLabel):
1250 (WebCore::AXARIAContentGroupText):
1251 * platform/LocalizedStrings.h:
1253 2016-03-17 Csaba Osztrogonác <ossy@webkit.org>
1255 [Mac][cmake] Unreviewed speculative buildfix after r198179. Just for fun.
1257 * PlatformMac.cmake:
1259 2016-03-17 Youenn Fablet <youenn.fablet@crf.canon.fr>
1261 [Fetch API] response-consume.html is crashing on Mac WK1 Debug builds
1262 https://bugs.webkit.org/show_bug.cgi?id=155490
1264 Reviewed by Darin Adler.
1266 Covered by existing tests.
1268 Ensured to lock state before calling JSC:JSONParse.
1269 Adding fulfillPromiseWithJSON routine to handle it.
1270 Applied it to FetchBody.
1272 * Modules/fetch/FetchBody.cpp:
1273 (WebCore::FetchBody::json):
1274 (WebCore::FetchBody::loadedAsText):
1275 (WebCore::FetchBody::resolveAsJSON): Deleted.
1276 * Modules/fetch/FetchBody.h:
1277 * Modules/fetch/FetchBodyOwner.cpp:
1278 (WebCore::FetchBodyOwner::loadedBlobAsText):
1279 * bindings/js/JSDOMPromise.cpp:
1280 (WebCore::parseAsJSON):
1281 (WebCore::fulfillPromiseWithJSON):
1282 * bindings/js/JSDOMPromise.h:
1284 2016-03-17 Adam Bergkvist <adam.bergkvist@ericsson.com>
1286 WebRTC: Update RTCIceCandidate
1287 https://bugs.webkit.org/show_bug.cgi?id=155535
1289 Reviewed by Eric Carlson.
1291 Update the RTCIceCandidate constructor procedure to match the WebRTC 1.0 specification [1].
1292 In short: The "candidate" init dictionary member is required. At least one of the dictionary
1293 members "sdpMid" and "sdpMLine" needs to be present; the corresponding attribute of the
1294 other, is initialized to null.
1296 [1] https://w3c.github.io/webrtc-pc/archives/20160215/webrtc.html
1298 Tests: Updated fast/mediastream/RTCIceCandidate.htm
1300 * Modules/mediastream/RTCIceCandidate.cpp:
1301 (WebCore::RTCIceCandidate::create):
1302 (WebCore::RTCIceCandidate::RTCIceCandidate):
1303 * Modules/mediastream/RTCIceCandidate.h:
1304 (WebCore::RTCIceCandidate::sdpMLineIndex):
1305 (WebCore::RTCIceCandidate::setSdpMLineIndex):
1306 * Modules/mediastream/RTCIceCandidate.idl:
1307 * bindings/js/JSRTCIceCandidateCustom.cpp:
1308 (WebCore::JSRTCIceCandidate::sdpMid):
1309 (WebCore::JSRTCIceCandidate::sdpMLineIndex):
1311 2016-03-16 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au>
1313 SVG tear offs should return a const reference if possible
1314 https://bugs.webkit.org/show_bug.cgi?id=153214
1316 Reviewed by Alex Christensen.
1318 A smaller change than expected because the returned reference is being copied into a value in additional locations that baseVal and animVal are used.
1320 No new tests as there is no change in behaviour.
1322 * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
1323 * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
1324 (WebCore::SVGAnimatedStaticPropertyTearOff::baseVal):
1325 (WebCore::SVGAnimatedStaticPropertyTearOff::animVal):
1327 2016-03-16 Chris Dumez <cdumez@apple.com>
1329 Unreviewed, partial roll out of r197254.
1330 <rdar://problem/25078552>
1332 It caused a ~1.1% PLT regression on iOS.
1334 * loader/FrameLoader.cpp:
1335 (WebCore::FrameLoader::commitProvisionalLoad): Deleted.
1337 2016-03-16 Enrica Casucci <enrica@apple.com>
1339 Recognize mailto and tel url as data detector links.
1340 https://bugs.webkit.org/show_bug.cgi?id=155569
1341 rdar://problem/24836185
1343 Reviewed by Sam Weinig.
1345 When we check if the element is a data detector link,
1346 we should return true also for URLs with mailto: and tel: scheme.
1348 * editing/cocoa/DataDetection.mm:
1349 (WebCore::DataDetection::isDataDetectorLink):
1351 2016-03-16 Zalan Bujtas <zalan@apple.com>
1353 Subpixel rendering: Directly composited image layers need pixelsnapping.
1354 https://bugs.webkit.org/show_bug.cgi?id=155558
1356 Reviewed by Simon Fraser.
1358 In order to match non-composited image size/position, we need to pixelsnap both the contents and the clipping
1359 layer bounds for directly composited images.
1361 Test: fast/images/hidpi-directly-composited-image-on-subpixel-position.html
1363 * rendering/RenderLayerBacking.cpp:
1364 (WebCore::RenderLayerBacking::resetContentsRect):
1365 (WebCore::RenderLayerBacking::updateChildClippingStrategy):
1366 (WebCore::RenderLayerBacking::updateImageContents):
1368 2016-03-16 Beth Dakin <bdakin@apple.com>
1370 Provide NSSpellChecker spellChecking methods with the current insertion point
1371 https://bugs.webkit.org/show_bug.cgi?id=155532
1373 rdar://problem/24066952
1375 Reviewed by Simon Fraser.
1377 Pass the Frame’s selection to a handful of spelling checking methods that
1378 call into WebKit/WebKit2 to ultimately call into NSSpellChecker.
1379 * accessibility/AccessibilityObject.cpp:
1380 (WebCore::AccessibilityObject::hasMisspelling):
1381 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1382 (AXAttributeStringSetSpelling):
1383 * editing/AlternativeTextController.cpp:
1384 (WebCore::AlternativeTextController::timerFired):
1385 * editing/Editor.cpp:
1386 (WebCore::Editor::guessesForMisspelledWord):
1387 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1388 * editing/SpellChecker.cpp:
1389 (WebCore::SpellChecker::invokeRequest):
1390 (WebCore::SpellChecker::enqueueRequest):
1391 * editing/TextCheckingHelper.cpp:
1392 (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
1393 (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
1394 (WebCore::TextCheckingHelper::unifiedTextCheckerEnabled):
1395 (WebCore::checkTextOfParagraph):
1396 * editing/TextCheckingHelper.h:
1397 * loader/EmptyClients.cpp:
1398 (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
1399 (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
1400 * loader/EmptyClients.h:
1401 * platform/text/TextCheckerClient.h:
1402 (WebCore::TextCheckerClient::~TextCheckerClient):
1404 The key needed to include the insertion point.
1405 * platform/spi/mac/NSSpellCheckerSPI.h:
1407 2016-03-16 Alex Christensen <achristensen@webkit.org>
1409 Fix assertion failure on drive.google.com after r196052
1410 https://bugs.webkit.org/show_bug.cgi?id=155562
1412 Reviewed by Jer Noble.
1414 * rendering/RenderGeometryMap.cpp:
1415 (WebCore::RenderGeometryMap::mapToContainer):
1416 Change float equality check to areEssentiallyEqual.
1417 This assertion was failing because rendererMappedResult was (944.335693, 232.047409)
1418 but result was (944.335693, 232.047394). They differ by (0, 0.000015).
1420 2016-03-16 Nan Wang <n_wang@apple.com>
1422 AX: Expose aria-current status to children
1423 https://bugs.webkit.org/show_bug.cgi?id=155469
1425 Reviewed by Chris Fleizach.
1427 Added aria-current to the global ARIA attributes list.
1429 Test: accessibility/aria-current-global-attribute.html
1431 * accessibility/AccessibilityObject.cpp:
1432 (WebCore::AccessibilityObject::supportsARIAAttributes):
1434 2016-03-16 Tim Horton <timothy_horton@apple.com>
1436 [mac] Printing test snapshots are upside-down after r198242
1437 https://bugs.webkit.org/show_bug.cgi?id=155543
1439 Reviewed by Simon Fraser.
1441 * page/PrintContext.cpp:
1442 (WebCore::PrintContext::spoolAllPagesWithBoundaries):
1443 Stop PLATFORM(COCOA)-conditionally flipping here. Just paint.
1444 This function is only used by the test runners so this doesn't have a
1445 huge impact on anything else.
1447 2016-03-16 Daniel Bates <dabates@apple.com>
1449 Update WebKit Feature Status page to include the status of Content Security Policy Level 2 and Level 3
1453 2016-03-16 Daniel Bates <dabates@apple.com>
1455 <video> and <audio> elements do not obey Content Security Policy on redirect
1456 https://bugs.webkit.org/show_bug.cgi?id=155509
1457 <rdar://problem/10234844>
1459 Reviewed by Alex Christensen.
1461 Fixes an issue where the Content Security Policy of the page was not enforced
1462 on redirects when loading a media subresource via an HTML video or HTML audio
1465 Tests: http/tests/security/contentSecurityPolicy/audio-redirect-allowed.html
1466 http/tests/security/contentSecurityPolicy/audio-redirect-blocked.html
1467 http/tests/security/contentSecurityPolicy/font-redirect-allowed.html
1468 http/tests/security/contentSecurityPolicy/font-redirect-blocked.html
1469 http/tests/security/contentSecurityPolicy/image-redirect-allowed.html
1470 http/tests/security/contentSecurityPolicy/image-redirect-blocked.html
1471 http/tests/security/contentSecurityPolicy/script-redirect-allowed.html
1472 http/tests/security/contentSecurityPolicy/script-redirect-blocked.html
1473 http/tests/security/contentSecurityPolicy/stylesheet-redirect-allowed.html
1474 http/tests/security/contentSecurityPolicy/stylesheet-redirect-blocked.html
1475 http/tests/security/contentSecurityPolicy/svg-font-redirect-allowed.html
1476 http/tests/security/contentSecurityPolicy/svg-font-redirect-blocked.html
1477 http/tests/security/contentSecurityPolicy/svg-image-redirect-allowed.html
1478 http/tests/security/contentSecurityPolicy/svg-image-redirect-blocked.html
1479 http/tests/security/contentSecurityPolicy/track-redirect-allowed.html
1480 http/tests/security/contentSecurityPolicy/track-redirect-blocked.html
1481 http/tests/security/contentSecurityPolicy/video-redirect-allowed.html
1482 http/tests/security/contentSecurityPolicy/video-redirect-blocked.html
1483 http/tests/security/contentSecurityPolicy/xsl-redirect-allowed.html
1484 http/tests/security/contentSecurityPolicy/xsl-redirect-blocked.html
1486 * inspector/InspectorPageAgent.cpp:
1487 (WebCore::InspectorPageAgent::cachedResourceContent): Treat media resources as raw resources just as we do currently.
1488 (WebCore::InspectorPageAgent::cachedResourceType): Ditto.
1489 * loader/MediaResourceLoader.cpp:
1490 (WebCore::MediaResourceLoader::requestResource): Modified to use CachedResourceLoader::requestMedia() instead
1491 of CachedResourceLoader::requestRawResource() so that we can differentiate between a media resource and a raw
1492 resource in CachedResourceLoader. Added FIXME comment to skip checking the Content Security Policy for loads
1493 initiated by an element in a user agent shadow tree. See <https://bugs.webkit.org/show_bug.cgi?id=155505> for
1495 * loader/ResourceLoadInfo.cpp:
1496 (WebCore::toResourceType): Treat media resources as raw resources just as we do currently. Also, add cases for
1497 CachedResource::LinkPrefetch and CachedResource::LinkSubresource (when ENABLE(LINK_PREFETCH) is enabled) and
1498 remove the default statement to force a compile-time error when a new CachedResource enumerator is added and
1499 the switch block in this function is not updated.
1500 * loader/SubresourceLoader.cpp:
1501 (WebCore::logResourceLoaded): Ditto.
1502 * loader/cache/CachedRawResource.cpp:
1503 (WebCore::CachedRawResource::CachedRawResource): Substitute CachedResource::isMainOrMediaOrRawResource() for
1504 CachedResource::isMainOrRawResource() as the latter was renamed to the former.
1505 * loader/cache/CachedRawResource.h:
1507 * loader/cache/CachedResource.cpp:
1508 (WebCore::defaultPriorityForResourceType): Use priority ResourceLoadPriority::Medium for media resources just as
1510 * loader/cache/CachedResource.h:
1511 (WebCore::CachedResource::isMainOrMediaOrRawResource): Formerly named isMainOrRawResource. Returns true if the type
1512 of this resource is a main resource, media resource, or raw resource.
1513 (WebCore::CachedResource::isMainOrRawResource): Deleted.
1514 * loader/cache/CachedResourceLoader.cpp:
1515 (WebCore::createResource): Treat media resources as raw resources just as we do currently.
1516 (WebCore::CachedResourceLoader::requestMedia): Added.
1517 (WebCore::contentTypeFromResourceType): Consider media resources as MixedContentChecker::ContentType::Active
1518 just as we do currently.
1519 (WebCore::CachedResourceLoader::checkInsecureContent): Apply the mixed content policy to media resources
1520 just as we do currently.
1521 (WebCore::CachedResourceLoader::canRequest): Apply the Same Origin Policy to media resources just as we
1522 do currently. Query the Content Security Policy of the page to determine if the media resource can be
1524 (WebCore::CachedResourceLoader::determineRevalidationPolicy): Substitute CachedResource::isMainOrMediaOrRawResource()
1525 for CachedResource::isMainOrRawResource() as the latter was renamed to the former.
1526 * loader/cache/CachedResourceLoader.h:
1527 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1528 (WebCore::WebCoreAVFResourceLoader::startLoading): Modified to use CachedResourceLoader::requestMedia() instead
1529 of CachedResourceLoader::requestRawResource() so that we can differentiate between a media resource and a raw
1530 resource in CachedResourceLoader. Added FIXME comment to skip checking the Content Security Policy for loads
1531 initiated by an element in a user agent shadow tree. See <https://bugs.webkit.org/show_bug.cgi?id=155505> for
1532 more details. Additionally, simplified code that determined whether to request the media resource or error out
1533 by coalescing two conditional expressions into one conditional on whether we have a loader and substituted
1536 2016-03-16 Chris Dumez <cdumez@apple.com>
1538 Unreviewed, rolling out r198235, r198240, r198241, and
1541 Causing crashes on ARM
1543 Reverted changesets:
1545 "Remove compile time define for SEPARATED_HEAP"
1546 https://bugs.webkit.org/show_bug.cgi?id=155508
1547 http://trac.webkit.org/changeset/198235
1549 "Gardening: build fix after r198235."
1550 http://trac.webkit.org/changeset/198240
1553 http://trac.webkit.org/changeset/198241
1555 "Rename performJITMemcpy to something more inline with our
1556 normal webkit function names"
1557 https://bugs.webkit.org/show_bug.cgi?id=155525
1558 http://trac.webkit.org/changeset/198252
1560 2016-03-16 Jiewen Tan <jiewen_tan@apple.com>
1562 URL Parsing should signal failure for illegal IDN
1563 https://bugs.webkit.org/show_bug.cgi?id=154945
1564 <rdar://problem/8014795>
1566 Reviewed by Brent Fulgham.
1568 WebCore::URL will now invalidate URLs with illegal IDN. And functions inside WebCoreNSURLExtras.h
1569 that deal with IDN mapping will now return nil to signal error.
1571 Test: fast/url/invalid-idn.html
1574 (WebCore::isSchemeFirstChar):
1575 (WebCore::URL::init):
1576 (WebCore::appendEncodedHostname):
1577 (WebCore::encodeHostnames):
1578 (WebCore::encodeRelativeString):
1579 * platform/mac/WebCoreNSURLExtras.h:
1580 * platform/mac/WebCoreNSURLExtras.mm:
1581 (WebCore::mapHostNameWithRange):
1582 (WebCore::hostNameNeedsDecodingWithRange):
1583 (WebCore::hostNameNeedsEncodingWithRange):
1584 (WebCore::decodeHostNameWithRange):
1585 (WebCore::encodeHostNameWithRange):
1586 (WebCore::decodeHostName):
1587 (WebCore::encodeHostName):
1588 (WebCore::collectRangesThatNeedMapping):
1589 (WebCore::mapHostNames):
1590 (WebCore::URLWithData):
1591 (WebCore::dataWithUserTypedString):
1592 (WebCore::URLWithUserTypedString):
1593 (WebCore::URLWithUserTypedStringDeprecated):
1594 (WebCore::userVisibleString):
1596 2016-03-16 Antti Koivisto <antti@apple.com>
1598 Don't invalidate style unnecessarily when setting inline style cssText
1599 https://bugs.webkit.org/show_bug.cgi?id=155541
1600 rdar://problem/23318893
1602 Reviewed by Simon Fraser.
1604 We currently invalidate style when cssText is set whether the style declaration changed or not.
1606 Based on a patch by Simon.
1608 Test: fast/css/style-invalidation-inline-csstext.html
1610 * css/PropertySetCSSStyleDeclaration.cpp:
1611 (WebCore::PropertySetCSSStyleDeclaration::cssText):
1612 (WebCore::PropertySetCSSStyleDeclaration::setCssText):
1614 Invalidate only if the parsed style changed.
1616 * css/StyleProperties.cpp:
1617 (WebCore::MutableStyleProperties::parseDeclaration):
1619 Compare the original and new style after parsing, return result.
1621 * css/StyleProperties.h:
1623 2016-03-16 Carlos Garcia Campos <cgarcia@igalia.com>
1625 REGRESSION(r195661): [GTK] very slow scrolling
1626 https://bugs.webkit.org/show_bug.cgi?id=155334
1628 Reviewed by Sergio Villar Senin.
1630 Fix smooth scrolling behaviour change after r195661.
1632 * platform/ScrollAnimationSmooth.cpp:
1633 (WebCore::getAnimationParametersForGranularity): Fix a typo,
1634 animationTime for pixel granularity should be 11 * tickTime.
1635 (WebCore::ScrollAnimationSmooth::animateScroll): Previous code
1636 reset all the data except the visibleLenght, so keep it in the
1637 PerAxisData after the reset.
1639 2016-03-16 Commit Queue <commit-queue@webkit.org>
1641 Unreviewed, rolling out r196803.
1642 https://bugs.webkit.org/show_bug.cgi?id=155534
1644 Introduced several rendering issues in popular websites
1645 (Requested by KaL on #webkit).
1649 "[GTK] Limit the number of tiles according to the visible
1651 https://bugs.webkit.org/show_bug.cgi?id=126122
1652 http://trac.webkit.org/changeset/196803
1654 2016-03-15 Zalan Bujtas <zalan@apple.com>
1656 Remove overflow: -webkit-marquee
1657 https://bugs.webkit.org/show_bug.cgi?id=155517
1658 <rdar://problem/25028481>
1660 Reviewed by Simon Fraser.
1662 This patch is based on Blink patch from jchaffraix@chromium.org (https://src.chromium.org/viewvc/blink?revision=151756&view=revision)
1664 * css/CSSParser.cpp:
1665 (WebCore::isValidKeywordPropertyAndValue):
1666 * css/CSSPrimitiveValueMappings.h:
1667 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted.
1668 (WebCore::CSSPrimitiveValue::operator EOverflow): Deleted.
1669 * css/CSSValueKeywords.in:
1670 * css/StyleResolver.cpp:
1671 (WebCore::StyleResolver::adjustRenderStyle):
1674 * rendering/RenderBox.cpp:
1675 (WebCore::RenderBox::sizesLogicalWidthToFitContent):
1676 * rendering/RenderLayer.cpp:
1677 (WebCore::RenderLayer::scrollTo):
1678 (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1679 (WebCore::RenderLayer::calculateClipRects):
1680 * rendering/RenderLayer.h:
1681 * rendering/RenderMarquee.h:
1682 * rendering/style/RenderStyleConstants.h:
1684 2016-03-15 Joanmarie Diggs <jdiggs@igalia.com>
1686 AX: Expose pointers to SVG elements referenced by aria-labelledby
1687 https://bugs.webkit.org/show_bug.cgi?id=155481
1689 Reviewed by Chris Fleizach.
1691 Expose elements referenced by aria-labelledby via ATK_RELATION_LABELLED_BY.
1692 Stop calling the supportsARIA* methods before getting the elements referred
1693 to by the associated ARIA property in the accessible wrapper for ATK and
1694 the inspector: Getting the elements will be just as fast when there are no
1695 such elements, and faster when there are.
1697 Modified the w3c-svg-name-calculation.html test to include AXTitleUIElement
1700 * accessibility/AccessibilityObject.cpp:
1701 (WebCore::AccessibilityObject::supportsARIAAttributes):
1702 (WebCore::AccessibilityObject::ariaElementsFromAttribute): Added.
1703 (WebCore::AccessibilityObject::ariaControlsElements): Added.
1704 (WebCore::AccessibilityObject::ariaDescribedByElements): Added.
1705 (WebCore::AccessibilityObject::ariaFlowToElements): Added.
1706 (WebCore::AccessibilityObject::ariaLabelledByElements): Added.
1707 (WebCore::AccessibilityObject::ariaOwnsElements): Added.
1708 * accessibility/AccessibilityObject.h:
1709 (WebCore::AccessibilityObject::ariaOwnsElements): No longer virtual.
1710 (WebCore::AccessibilityObject::supportsARIAFlowTo): Deleted.
1711 (WebCore::AccessibilityObject::ariaFlowToElements): No longer virtual.
1712 (WebCore::AccessibilityObject::supportsARIADescribedBy): Deleted.
1713 (WebCore::AccessibilityObject::ariaDescribedByElements): No longer virtual.
1714 (WebCore::AccessibilityObject::supportsARIAControls): Deleted.
1715 (WebCore::AccessibilityObject::ariaControlsElements): No longer virtual.
1716 * accessibility/AccessibilityRenderObject.cpp:
1717 (WebCore::AccessibilityRenderObject::ariaElementsFromAttribute): Moved to AccessibilityObject.
1718 (WebCore::AccessibilityRenderObject::supportsARIAFlowTo): Deleted.
1719 (WebCore::AccessibilityRenderObject::ariaFlowToElements): Moved to AccessibilityObject.
1720 (WebCore::AccessibilityRenderObject::supportsARIADescribedBy): Deleted.
1721 (WebCore::AccessibilityRenderObject::ariaDescribedByElements): Moved to AccessibilityObject.
1722 (WebCore::AccessibilityRenderObject::supportsARIAControls): Deleted.
1723 (WebCore::AccessibilityRenderObject::ariaControlsElements): Moved to AccessibilityObject.
1724 (WebCore::AccessibilityRenderObject::ariaOwnsElements): Moved to AccessibilityObject.
1725 * accessibility/AccessibilityRenderObject.h:
1726 * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1727 (setAtkRelationSetFromCoreObject):
1728 * inspector/InspectorDOMAgent.cpp:
1729 (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1731 2016-03-15 Simon Fraser <simon.fraser@apple.com>
1733 Occasional crash under GraphicsContext::platformContext when dragging Google maps
1734 https://bugs.webkit.org/show_bug.cgi?id=155521
1735 rdar://problem/24357307
1737 Reviewed by Tim Horton.
1739 It's possible for createDragImageForSelection() to return a null image, if the bounds
1740 of the selection are an empty rect. That would cause a crash under convertImageToBitmap()
1741 because a zero-sized ShareableBitmap will return a null GraphicsContext.
1743 To avoid this, early return from DragController::startDrag() if the dragImage is null.
1745 I wasn't able to come up with a test for this.
1747 * page/DragController.cpp:
1748 (WebCore::DragController::startDrag):
1750 2016-03-15 Tim Horton <timothy_horton@apple.com>
1752 iOS <attachment> element should allow customization of action text color
1753 https://bugs.webkit.org/show_bug.cgi?id=155513
1754 <rdar://problem/24805991>
1756 Reviewed by Simon Fraser.
1758 Test: fast/attachment/attachment-action.html
1762 On iOS (the only place it is used), <attachment> color should default to system blue.
1764 * rendering/RenderThemeIOS.mm:
1765 (WebCore::attachmentActionColor):
1766 (WebCore::AttachmentInfo::AttachmentInfo):
1767 Make use of the <attachment>'s CSS color for the action text.
1768 This is a little weird because there are multiple bits of text in an
1769 <attachment>, but only the action text ever changes color.
1771 2016-03-15 Zalan Bujtas <zalan@apple.com>
1773 Delay HTMLFormControlElement::focus() call until after layout is finished.
1774 https://bugs.webkit.org/show_bug.cgi?id=155503
1775 <rdar://problem/24046635>
1777 Reviewed by Simon Fraser.
1779 Calling focus on a form element can trigger arbitrary JS code which could interfere with
1781 This patch delays HTMLFormControlElement::focus() call until after layout is finished.
1782 If we are currently not in the middle of a layout, HTMLFormControlElement::focus() is delayed until
1783 after style resolution is done.
1785 Covered by LayoutTests/fast/dom/adopt-node-crash-2.html
1787 * accessibility/AccessibilityObject.cpp:
1788 (WebCore::AccessibilityObject::updateBackingStore):
1790 (WebCore::Document::updateStyleIfNeeded):
1791 (WebCore::Document::updateLayout):
1792 (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1793 * html/HTMLEmbedElement.cpp:
1794 (WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin):
1795 * html/HTMLFormControlElement.cpp:
1796 (WebCore::HTMLFormControlElement::didAttachRenderers):
1797 * page/FrameView.cpp:
1798 (WebCore::FrameView::layout):
1799 (WebCore::FrameView::queuePostLayoutCallback):
1800 (WebCore::FrameView::flushPostLayoutTasksQueue):
1801 (WebCore::FrameView::performPostLayoutTasks):
1802 (WebCore::FrameView::sendResizeEventIfNeeded):
1804 * rendering/RenderBox.cpp:
1805 (WebCore::RenderBox::imageChanged):
1806 * rendering/RenderLayer.cpp:
1807 (WebCore::RenderLayer::scrollTo):
1809 2016-03-15 Oliver Hunt <oliver@apple.com>
1811 Remove compile time define for SEPARATED_HEAP
1812 https://bugs.webkit.org/show_bug.cgi?id=155508
1814 Reviewed by Mark Lam.
1816 Remove the feature define.
1818 * Configurations/FeatureDefines.xcconfig:
1820 2016-03-15 Chris Dumez <cdumez@apple.com>
1822 Restore pre-r197244 behavior on Mac
1823 https://bugs.webkit.org/show_bug.cgi?id=155507
1824 <rdar://problem/25174132>
1826 Reviewed by Gavin Barraclough.
1828 <http://trac.webkit.org/changeset/197244> changed the session restore
1829 behavior to disallow stale content on all platforms except iOS.
1830 We would also like to maintain the behavior on Mac for performance
1831 reasons and consistency between iOS and Mac.
1833 * loader/FrameLoader.cpp:
1834 (WebCore::FrameLoader::loadDifferentDocumentItem):
1836 2016-03-15 Tim Horton <timothy_horton@apple.com>
1838 <attachment> on iOS isn't quite vertically centered
1839 https://bugs.webkit.org/show_bug.cgi?id=155502
1840 <rdar://problem/24805991>
1842 Reviewed by Beth Dakin.
1844 No new tests; there are existing tests that will be enabled shortly.
1846 * rendering/RenderThemeIOS.mm:
1847 (WebCore::AttachmentInfo::AttachmentInfo):
1848 We were overcounting the total height of the attachment content by one margin, because each item
1849 would add in its margin, including the last one. Remove one margin.
1851 2016-03-15 Chris Fleizach <cfleizach@apple.com>
1853 AX: certain elements not included in accessibility tree
1854 https://bugs.webkit.org/show_bug.cgi?id=155480
1856 Reviewed by Beth Dakin.
1858 This test case exposed a hole in the nextSibling logic where you can get into a state where we skip content.
1859 The fix is to check if an inline element continuation has no sibling, to fall back on to the parent case to see if that has a sibling.
1861 Test: accessibility/double-nested-inline-element-missing-from-tree.html
1863 * accessibility/AccessibilityRenderObject.cpp:
1864 (WebCore::AccessibilityRenderObject::nextSibling):
1866 2016-03-15 Chris Dumez <cdumez@apple.com>
1868 Unreviewed, rolling out r198203.
1870 Favorites view is no longer loading on iOS
1874 "URL Parsing should signal failure for illegal IDN"
1875 https://bugs.webkit.org/show_bug.cgi?id=154945
1876 http://trac.webkit.org/changeset/198203
1878 2016-03-15 Tim Horton <timothy_horton@apple.com>
1880 <attachment> on iOS should use short and emphasized fonts
1881 https://bugs.webkit.org/show_bug.cgi?id=155485
1882 <rdar://problem/24805991>
1884 Reviewed by Simon Fraser.
1886 No new tests; there are existing tests that will be enabled shortly.
1888 * rendering/RenderThemeIOS.mm:
1889 (WebCore::attachmentActionFont):
1890 (WebCore::attachmentTitleFont):
1891 (WebCore::attachmentSubtitleFont):
1892 (WebCore::AttachmentInfo::buildTitleLines):
1893 (WebCore::AttachmentInfo::buildSingleLine):
1894 (WebCore::AttachmentInfo::AttachmentInfo):
1895 No need for UIFonts, we can use CoreText, and that allows us to ask for the
1896 correct Short and Emphasized variants that we need.
1898 2016-03-15 Antti Koivisto <antti@apple.com>
1900 REGRESSION (196383): Class change invalidation does not handle :not correctly
1901 https://bugs.webkit.org/show_bug.cgi?id=155493
1902 <rdar://problem/24846762>
1904 Reviewed by Andreas Kling.
1906 We fail to invalidate bar style in
1910 when class foo is added or removed.
1912 There is a logic error in the invalidation code. It assumes that class addition can only make new selectors match
1913 and removal make them not match. This is not true when :not is present.
1915 * style/AttributeChangeInvalidation.h:
1916 (WebCore::Style::AttributeChangeInvalidation::AttributeChangeInvalidation):
1917 * style/ClassChangeInvalidation.cpp:
1918 (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
1920 Invalidate style and collect full set of rules that may affect descendant style.
1922 (WebCore::Style::ClassChangeInvalidation::invalidateDescendantStyle):
1924 Invalidate with this set both before and after committing the changes.
1926 (WebCore::Style::ClassChangeInvalidation::computeClassChange): Deleted.
1927 * style/ClassChangeInvalidation.h:
1928 (WebCore::Style::ClassChangeInvalidation::ClassChangeInvalidation):
1929 (WebCore::Style::ClassChangeInvalidation::~ClassChangeInvalidation):
1931 2016-03-14 Jer Noble <jer.noble@apple.com>
1933 Video elements with autoplay do not begin playing when scrolling into view if InvisibleAutoplayNotPermitted is set.
1934 https://bugs.webkit.org/show_bug.cgi?id=155468
1936 Reviewed by Eric Carlson.
1938 Test: media/video-restricted-invisible-autoplay-allowed-when-visible.html
1940 A few bugs came together to cause this behavior. We were not telling the media session that we were going to begin
1941 the autoplaying state, we were not restoring the correct state when the interruption ended, and we were not checking
1942 to see if we could actually play correctly when the interruption ended.
1944 * html/HTMLMediaElement.cpp:
1945 (WebCore::HTMLMediaElement::prepareForLoad):
1946 (WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay):
1947 (WebCore::HTMLMediaElement::setReadyState):
1948 (WebCore::HTMLMediaElement::resumeAutoplaying):
1949 (WebCore::HTMLMediaElement::updateShouldPlay):
1950 (WebCore::elementCanTransitionFromAutoplayToPlay): Deleted.
1951 * html/HTMLMediaElement.h:
1952 * platform/audio/PlatformMediaSession.cpp:
1953 (WebCore::PlatformMediaSession::endInterruption):
1955 2016-03-15 Manuel Rego Casasnovas <rego@igalia.com>
1957 [css-grid] Rename GridCoordinate to GridArea
1958 https://bugs.webkit.org/show_bug.cgi?id=155489
1960 Reviewed by Sergio Villar Senin.
1962 As the comment in GridCoordinate states,
1963 it actually represents a grid area as it stores
1964 the initial and final positions in both axis (columns and rows).
1966 Someone can think about a grid coordinate just like a single cell.
1967 However this class was representing an area of several cells.
1969 On top of that the "grid area" concept is defined in the spec:
1970 https://drafts.csswg.org/css-grid/#grid-area-concept
1972 No new tests, no change of behavior.
1974 * WebCore.xcodeproj/project.pbxproj:
1975 * css/CSSGridTemplateAreasValue.cpp:
1976 (WebCore::stringForPosition):
1977 * css/CSSGridTemplateAreasValue.h:
1978 * css/CSSParser.cpp:
1979 (WebCore::CSSParser::parseGridTemplateAreasRow):
1981 * rendering/RenderGrid.cpp:
1982 (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
1983 (WebCore::RenderGrid::insertItemIntoGrid):
1984 (WebCore::RenderGrid::placeItemsOnGrid):
1985 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
1986 (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
1987 (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
1988 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
1989 (WebCore::RenderGrid::clearGrid):
1990 (WebCore::RenderGrid::cachedGridArea):
1991 (WebCore::RenderGrid::cachedGridSpan):
1992 * rendering/RenderGrid.h:
1993 * rendering/style/GridArea.h: Renamed from Source/WebCore/rendering/style/GridCoordinate.h.
1994 (WebCore::GridSpan::untranslatedDefiniteGridSpan):
1995 (WebCore::GridSpan::translatedDefiniteGridSpan):
1996 (WebCore::GridSpan::indefiniteGridSpan):
1997 (WebCore::GridSpan::operator==):
1998 (WebCore::GridSpan::integerSpan):
1999 (WebCore::GridSpan::untranslatedResolvedInitialPosition):
2000 (WebCore::GridSpan::untranslatedResolvedFinalPosition):
2001 (WebCore::GridSpan::resolvedInitialPosition):
2002 (WebCore::GridSpan::resolvedFinalPosition):
2003 (WebCore::GridSpan::GridSpanIterator::GridSpanIterator):
2004 (WebCore::GridSpan::GridSpanIterator::operator unsigned&):
2005 (WebCore::GridSpan::GridSpanIterator::operator*):
2006 (WebCore::GridSpan::begin):
2007 (WebCore::GridSpan::end):
2008 (WebCore::GridSpan::isTranslatedDefinite):
2009 (WebCore::GridSpan::isIndefinite):
2010 (WebCore::GridSpan::translate):
2011 (WebCore::GridSpan::GridSpan):
2012 (WebCore::GridArea::GridArea):
2013 (WebCore::GridArea::operator==):
2014 (WebCore::GridArea::operator!=):
2015 * rendering/style/GridPositionsResolver.cpp:
2016 * rendering/style/StyleGridData.h:
2018 2016-03-15 Joonghun Park <jh718.park@samsung.com>
2020 [GTK] Remove duplicate HashMap traversal and unneeded reference count churn in DataObjectGtk::forClipboard
2021 https://bugs.webkit.org/show_bug.cgi?id=155470
2023 Reviewed by Carlos Garcia Campos.
2025 No new tests, no new behaviours.
2027 * platform/gtk/DataObjectGtk.cpp:
2028 (WebCore::DataObjectGtk::forClipboard):
2030 2016-03-15 Manuel Rego Casasnovas <rego@igalia.com>
2032 [css-grid] Rename GridResolvedPosition to GridPositionsResolver
2033 https://bugs.webkit.org/show_bug.cgi?id=155486
2035 Reviewed by Sergio Villar Senin.
2037 GridResolvedPosition is not storing a position (track or line) anymore.
2038 Currently it's just a class wrapping the methods to resolve
2039 grid positions from style.
2040 Renamed the class to avoid confusions.
2042 No new tests, no change of behavior.
2045 * WebCore.xcodeproj/project.pbxproj:
2046 * rendering/RenderGrid.cpp:
2047 (WebCore::RenderGrid::placeItemsOnGrid):
2048 (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
2049 (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
2050 (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
2051 (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2052 (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
2053 * rendering/RenderGrid.h:
2054 * rendering/style/GridCoordinate.h:
2055 * rendering/style/GridPositionsResolver.cpp: Renamed from Source/WebCore/rendering/style/GridResolvedPosition.cpp.
2056 (WebCore::isColumnSide):
2057 (WebCore::isStartSide):
2058 (WebCore::initialPositionSide):
2059 (WebCore::finalPositionSide):
2060 (WebCore::gridLinesForSide):
2061 (WebCore::implicitNamedGridLineForSide):
2062 (WebCore::GridPositionsResolver::isNonExistentNamedLineOrArea):
2063 (WebCore::adjustGridPositionsFromStyle):
2064 (WebCore::GridPositionsResolver::explicitGridColumnCount):
2065 (WebCore::GridPositionsResolver::explicitGridRowCount):
2066 (WebCore::explicitGridSizeForSide):
2067 (WebCore::lookAheadForNamedGridLine):
2068 (WebCore::lookBackForNamedGridLine):
2069 (WebCore::resolveNamedGridLinePositionFromStyle):
2070 (WebCore::definiteGridSpanWithNamedLineSpanAgainstOpposite):
2071 (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
2072 (WebCore::resolveGridPositionAgainstOppositePosition):
2073 (WebCore::GridPositionsResolver::spanSizeForAutoPlacedItem):
2074 (WebCore::resolveGridPositionFromStyle):
2075 (WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
2076 * rendering/style/GridPositionsResolver.h: Renamed from Source/WebCore/rendering/style/GridResolvedPosition.h.
2077 * rendering/style/StyleAllInOne.cpp:
2079 2016-03-15 Miguel Gomez <magomez@igalia.com>
2081 Leak: Accelerated ImageBufferCairo doesn't destroy the used textures
2082 https://bugs.webkit.org/show_bug.cgi?id=155431
2084 Reviewed by Žan Doberšek.
2086 When using the Cairo backend, add a destructor to ImageBufferData and use it to destroy the
2087 textures created if the buffer is being accelerated.
2089 No new tests, already covered by existing ones.
2091 * platform/graphics/cairo/ImageBufferCairo.cpp:
2092 (WebCore::ImageBufferData::ImageBufferData):
2093 Store the renderingMode flag.
2094 (WebCore::ImageBufferData::~ImageBufferData):
2095 Destroy gl resources if renderingMode is accelerated.
2096 (WebCore::ImageBuffer::ImageBuffer):
2097 Pass renderingMode to the data class and use it fro checks instead of the function parameter.
2098 * platform/graphics/cairo/ImageBufferDataCairo.h:
2099 Add destructor and a renderingMode flag.
2101 2016-03-15 Jiewen Tan <jiewen_tan@apple.com>
2103 URL Parsing should signal failure for illegal IDN
2104 https://bugs.webkit.org/show_bug.cgi?id=154945
2105 <rdar://problem/8014795>
2107 Reviewed by Brent Fulgham.
2109 WebCore::URL will now invalidate URLs with illegal IDN. And functions inside WebCoreNSURLExtras.h
2110 that deal with IDN mapping will now return nil to signal error.
2112 Test: fast/url/invalid-idn.html
2115 (WebCore::isSchemeFirstChar):
2116 (WebCore::URL::init):
2117 (WebCore::appendEncodedHostname):
2118 (WebCore::encodeHostnames):
2119 (WebCore::encodeRelativeString):
2120 * platform/mac/WebCoreNSURLExtras.h:
2121 * platform/mac/WebCoreNSURLExtras.mm:
2122 (WebCore::mapHostNameWithRange):
2123 (WebCore::hostNameNeedsDecodingWithRange):
2124 (WebCore::hostNameNeedsEncodingWithRange):
2125 (WebCore::decodeHostNameWithRange):
2126 (WebCore::encodeHostNameWithRange):
2127 (WebCore::decodeHostName):
2128 (WebCore::encodeHostName):
2129 (WebCore::collectRangesThatNeedMapping):
2130 (WebCore::mapHostNames):
2131 (WebCore::URLWithData):
2132 (WebCore::dataWithUserTypedString):
2133 (WebCore::URLWithUserTypedString):
2134 (WebCore::URLWithUserTypedStringDeprecated):
2135 (WebCore::userVisibleString):
2137 2016-03-15 Carlos Garcia Campos <cgarcia@igalia.com>
2139 REGRESSION (r197724): [GTK] Web Inspector: Images being blocked by CSP 2.0
2140 https://bugs.webkit.org/show_bug.cgi?id=155432
2142 Reviewed by Darin Adler.
2144 The GTK+ port Web Inspector uses GResources for all internal
2145 resources (images, fonts, scripts, etc.) that are now blocked by
2146 the CSP. GResouces are like data URLs in practice, so we should
2149 * page/csp/ContentSecurityPolicySourceList.cpp:
2150 (WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar):
2152 2016-03-14 Alex Christensen <achristensen@webkit.org>
2154 Fix WinCairo build after r198195.
2156 * platform/network/NetworkingContext.h:
2157 curl networking now uses NetworkingContext::storageSession. That's everybody!
2159 2016-03-14 Per Arne Vollan <peavo@outlook.com>
2161 [WinCairo] Compile fix.
2162 https://bugs.webkit.org/show_bug.cgi?id=155463
2164 Reviewed by Alex Christensen.
2166 Get the NetworkStorageSession object from the document in the same way as other platforms do.
2168 * loader/CookieJar.cpp:
2169 (WebCore::storageSession):
2171 2016-03-14 Tim Horton <timothy_horton@apple.com>
2173 <attachment> on iOS should paint its progress indicator instead of a green square
2174 https://bugs.webkit.org/show_bug.cgi?id=155482
2175 <rdar://problem/24805991>
2177 Reviewed by Simon Fraser.
2179 No new tests; there are existing tests that will be enabled shortly.
2181 * rendering/RenderThemeIOS.mm:
2182 (WebCore::getAttachmentProgress):
2183 Clamp progress to 0-1.
2185 (WebCore::paintAttachmentProgress):
2188 2016-03-14 Chris Dumez <cdumez@apple.com>
2190 Unreviewed, rolling out r197981.
2192 Caused a massive PLT regression on Mac.
2196 "Font antialiasing (smoothing) changes when elements are
2197 rendered into compositing layers"
2198 https://bugs.webkit.org/show_bug.cgi?id=23364
2199 http://trac.webkit.org/changeset/197981
2201 2016-03-14 Chris Dumez <cdumez@apple.com>
2203 Unreviewed, rolling out r198145.
2205 This attempt to disable the feature did not fix the PLT
2210 "Regression(r197981): Huge regression on Mac PLT"
2211 https://bugs.webkit.org/show_bug.cgi?id=155443
2212 http://trac.webkit.org/changeset/198145
2214 2016-03-14 Sam Weinig <sam@webkit.org>
2216 Remove errant space.
2218 * page/UserContentController.cpp:
2220 2016-03-14 Sam Weinig <sam@webkit.org>
2222 Fix the windows build.
2224 * page/UserContentController.cpp:
2226 2016-03-14 Sam Weinig <sam@webkit.org>
2228 Add a baseURL parameter to _WKUserStyleSheet
2229 https://bugs.webkit.org/show_bug.cgi?id=155219
2231 Reviewed by Tim Horton.
2233 - Moves to a model for user content where instead of each page having a WebCore::UserContentController
2234 object, we have an abstract WebCore::UserContentProvider interface that can be implemented at the WebKit
2235 level. For now, legacy WebKit continues to use the old UserContentController, which implements
2236 WebCore::UserContentProvider, and WebKit2 implements its own implementation so it can store additional
2239 * WebCore.xcodeproj/project.pbxproj:
2242 * dom/ExtensionStyleSheets.cpp:
2243 (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):
2244 Switch to using forEachUserStyleSheet on the UserContentProvider.
2246 * html/HTMLMediaElement.cpp:
2247 (WebCore::HTMLMediaElement::loadResource):
2248 Remove null check now that we always have a UserContentProvider.
2250 * loader/EmptyClients.cpp:
2251 (WebCore::fillWithEmptyClients):
2252 * loader/EmptyClients.h:
2253 Add new EmptyClients.
2255 * loader/FrameLoader.cpp:
2256 (WebCore::FrameLoader::loadResourceSynchronously):
2257 Remove null check now that we always have a UserContentProvider.
2259 * loader/PingLoader.cpp:
2260 (WebCore::processContentExtensionRulesForLoad):
2261 Remove null check now that we always have a UserContentProvider.
2263 * loader/ResourceLoader.cpp:
2264 (WebCore::ResourceLoader::willSendRequestInternal):
2265 Remove null check now that we always have a UserContentProvider.
2267 * loader/cache/CachedResourceLoader.cpp:
2268 (WebCore::CachedResourceLoader::requestResource):
2269 Remove null check now that we always have a UserContentProvider.
2271 * page/DOMWindow.cpp:
2272 (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
2273 Remove null checks now that we always have a UserContentProvider, and userMessageHandlerDescriptors
2274 returns a reference.
2276 (WebCore::DOMWindow::open):
2277 Remove null check now that we always have a UserContentProvider.
2280 (WebCore::Frame::injectUserScripts):
2281 Simplify by lifting document check out of the main loop and using forEachUserScript.
2284 (WebCore::Page::Page):
2285 (WebCore::Page::~Page):
2286 (WebCore::Page::userContentProvider):
2287 (WebCore::Page::setUserContentProvider):
2288 (WebCore::Page::setUserContentController): Deleted.
2290 (WebCore::Page::userContentController): Deleted.
2291 * page/PageConfiguration.h:
2292 Store the UserContentProvider in a Ref, and require PageConfigurations to provide one. This
2293 removes a bunch of null checks and simplifies the code.
2295 * page/UserContentController.cpp:
2296 (WebCore::UserContentController::~UserContentController):
2297 (WebCore::UserContentController::forEachUserScript):
2298 (WebCore::UserContentController::forEachUserStyleSheet):
2299 (WebCore::UserContentController::addUserScript):
2300 (WebCore::UserContentController::removeUserScript):
2301 (WebCore::UserContentController::removeUserScripts):
2302 (WebCore::UserContentController::addUserStyleSheet):
2303 (WebCore::UserContentController::removeUserStyleSheet):
2304 (WebCore::UserContentController::removeUserStyleSheets):
2305 (WebCore::UserContentController::addUserMessageHandlerDescriptor):
2306 (WebCore::UserContentController::removeUserMessageHandlerDescriptor):
2307 (WebCore::UserContentController::addUserContentExtension):
2308 (WebCore::UserContentController::removeUserContentExtension):
2309 (WebCore::UserContentController::removeAllUserContentExtensions):
2310 (WebCore::UserContentController::removeAllUserContent):
2311 (WebCore::UserContentController::addPage): Deleted.
2312 (WebCore::UserContentController::removePage): Deleted.
2313 (WebCore::contentExtensionsEnabled): Deleted.
2314 (WebCore::UserContentController::processContentExtensionRulesForLoad): Deleted.
2315 (WebCore::UserContentController::actionsForResourceLoad): Deleted.
2316 * page/UserContentController.h:
2317 (WebCore::UserContentController::userScripts): Deleted.
2318 (WebCore::UserContentController::userStyleSheets): Deleted.
2319 (WebCore::UserContentController::userMessageHandlerDescriptors): Deleted.
2320 Add inheritance from UserContentProvider and simplify things by removing unique_ptrs
2321 that were holding the member variables. There is usually only one UserContentController
2322 so having these in unique_ptrs doesn't make much sense.
2324 * page/UserContentProvider.cpp: Added.
2325 (WebCore::UserContentProvider::UserContentProvider):
2326 (WebCore::UserContentProvider::~UserContentProvider):
2327 (WebCore::UserContentProvider::addPage):
2328 (WebCore::UserContentProvider::removePage):
2329 (WebCore::UserContentProvider::invalidateInjectedStyleSheetCacheInAllFramesInAllPages):
2330 (WebCore::contentExtensionsEnabled):
2331 (WebCore::UserContentProvider::processContentExtensionRulesForLoad):
2332 (WebCore::UserContentProvider::actionsForResourceLoad):
2333 * page/UserContentProvider.h: Added.
2334 Add abstract class for providing user content and add some helpers on it.
2336 * page/UserMessageHandlerDescriptor.h:
2337 (WebCore::UserMessageHandlerDescriptor::create):
2338 (WebCore::UserMessageHandlerDescriptor::client):
2339 (WebCore::UserMessageHandlerDescriptor::invalidateClient):
2340 * page/UserMessageHandlersNamespace.cpp:
2341 (WebCore::UserMessageHandlersNamespace::handler):
2342 Simplify now that userContentProvider() and userMessageHandlerDescriptors() are references.
2344 2016-03-14 Enrica Casucci <enrica@apple.com>
2346 iOS: RTFD format is not available in the pasteboard after copy/cut.
2347 https://bugs.webkit.org/show_bug.cgi?id=155477
2348 rdar://problem/23500600
2350 Reviewed by Tim Horton.
2352 WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the
2353 proper RTFD format for pastedboard. I also discovered that, when
2354 we create the NSTextAttachment in the NSAttributedString we produce
2355 from the DOM range, we are not generating a file name with the
2356 appropriate extension for the MIME type. The iOS specific implementation
2357 of the MIMETypeRegistry functions were empty.
2358 There is no need to have a differentiation between OS X and iOS, so
2359 we now have only one file called MIMETypeRegistryCocoa.mm.
2361 * WebCore.xcodeproj/project.pbxproj:
2362 * platform/cocoa/MIMETypeRegistryCocoa.mm: Added.
2363 (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2364 (WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
2365 (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2366 (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
2367 * platform/ios/MIMETypeRegistryIOS.mm: Removed.
2368 * platform/ios/PasteboardIOS.mm:
2369 (WebCore::Pasteboard::read):
2370 (WebCore::Pasteboard::supportedPasteboardTypes):
2371 (WebCore::Pasteboard::hasData):
2372 * platform/ios/PlatformPasteboardIOS.mm:
2373 (WebCore::PlatformPasteboard::write):
2374 * platform/mac/MIMETypeRegistryMac.mm: Removed.
2376 2016-03-14 Daniel Bates <dabates@apple.com>
2378 Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements
2379 https://bugs.webkit.org/show_bug.cgi?id=155466
2380 <rdar://problem/25152480>
2382 Reviewed by Joseph Pecoraro and Timothy Hatcher.
2384 For convenience, display the SHA-256 Content Security Policy (CSP) hash in the node details
2385 sidebar for the selected HTML script element or HTML style element. A CSP script hash is
2386 only applicable to inline JavaScript scripts. Therefore, we will display a hash for HTML
2387 script elements only if they do not have a src attribute.
2389 Tests: inspector/dom/csp-big5-hash.html
2390 inspector/dom/csp-hash.html
2392 * inspector/InspectorDOMAgent.cpp:
2393 (WebCore::computeContentSecurityPolicySHA256Hash): Added.
2394 (WebCore::InspectorDOMAgent::buildObjectForNode): For an applicable HTML script- or style-
2395 element, pass the computed SHA-256 CSP hash to the Inspector front end.
2397 2016-03-14 Joonghun Park <jh718.park@samsung.com>
2399 Purge PassRefPtr from ArrayBuffer, ArchiveResource, Pasteboard, LegacyWebArchive and DataObjectGtk
2400 https://bugs.webkit.org/show_bug.cgi?id=150497
2402 Reviewed by Darin Adler.
2404 No new tests, no new behaviours.
2406 * Modules/indexeddb/IDBGetResult.h:
2407 (WebCore::IDBGetResult::IDBGetResult):
2408 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2409 (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
2410 * Modules/mediastream/RTCDataChannel.cpp:
2411 (WebCore::RTCDataChannel::didReceiveRawData):
2412 * dom/MessageEvent.cpp:
2413 (WebCore::MessageEvent::MessageEvent):
2414 * dom/MessageEvent.h:
2415 * editing/Editor.cpp:
2416 (WebCore::Editor::selectedRange):
2418 * editing/FrameSelection.h:
2419 (WebCore::FrameSelection::toNormalizedRange):
2420 * editing/VisiblePosition.cpp:
2421 (WebCore::makeRange):
2422 * editing/VisiblePosition.h:
2423 * editing/VisibleSelection.cpp:
2424 (WebCore::VisibleSelection::toNormalizedRange):
2425 * editing/VisibleSelection.h:
2426 * editing/VisibleUnits.cpp:
2427 (WebCore::enclosingTextUnitOfGranularity):
2428 (WebCore::wordRangeFromPosition):
2429 (WebCore::rangeExpandedByCharactersInDirectionAtWordBoundary):
2430 (WebCore::rangeExpandedAroundPositionByCharacters):
2431 * editing/VisibleUnits.h:
2432 * editing/cocoa/HTMLConverter.mm:
2433 (HTMLConverter::_addAttachmentForElement):
2434 (fileWrapperForURL):
2435 * editing/efl/EditorEfl.cpp:
2436 (WebCore::Editor::webContentFromPasteboard):
2437 * editing/gtk/EditorGtk.cpp:
2438 (WebCore::createFragmentFromPasteboardData):
2439 (WebCore::Editor::webContentFromPasteboard):
2440 * editing/ios/EditorIOS.mm:
2441 (WebCore::dataInRTFDFormat):
2442 (WebCore::dataInRTFFormat):
2443 (WebCore::Editor::selectionInWebArchiveFormat):
2444 (WebCore::Editor::WebContentReader::addFragment):
2445 (WebCore::Editor::WebContentReader::readWebArchive):
2446 (WebCore::Editor::WebContentReader::readRTFD):
2447 (WebCore::Editor::WebContentReader::readRTF):
2448 (WebCore::Editor::WebContentReader::readImage):
2449 (WebCore::Editor::WebContentReader::readURL):
2450 (WebCore::Editor::webContentFromPasteboard):
2451 (WebCore::Editor::pasteWithPasteboard):
2452 (WebCore::Editor::createFragmentAndAddResources):
2453 (WebCore::Editor::createFragmentForImageResourceAndAddResource):
2454 * editing/mac/EditorMac.mm:
2455 (WebCore::Editor::selectionInWebArchiveFormat):
2456 (WebCore::Editor::adjustedSelectionRange):
2457 (WebCore::dataInRTFDFormat):
2458 (WebCore::dataInRTFFormat):
2459 (WebCore::Editor::dataSelectionForPasteboard):
2460 (WebCore::Editor::WebContentReader::readWebArchive):
2461 (WebCore::Editor::WebContentReader::readRTFD):
2462 (WebCore::Editor::WebContentReader::readRTF):
2463 (WebCore::Editor::WebContentReader::readImage):
2464 (WebCore::Editor::WebContentReader::readURL):
2465 (WebCore::Editor::webContentFromPasteboard):
2466 (WebCore::Editor::createFragmentForImageResourceAndAddResource):
2467 (WebCore::Editor::createFragmentAndAddResources):
2468 * editing/win/EditorWin.cpp:
2469 (WebCore::createFragmentFromPlatformData):
2470 (WebCore::Editor::webContentFromPasteboard):
2471 * inspector/InspectorPageAgent.cpp:
2472 (WebCore::InspectorPageAgent::archive):
2473 * loader/DocumentLoader.cpp:
2474 (WebCore::DocumentLoader::mainResourceData):
2475 (WebCore::DocumentLoader::maybeCreateArchive):
2476 (WebCore::DocumentLoader::addArchiveResource):
2477 (WebCore::DocumentLoader::mainResource):
2478 * loader/DocumentLoader.h:
2479 * loader/FrameLoader.cpp:
2480 (WebCore::FrameLoader::loadArchive):
2481 * loader/SubstituteData.h:
2482 (WebCore::SubstituteData::SubstituteData):
2483 (WebCore::SubstituteData::isValid):
2484 * loader/SubstituteResource.h:
2485 (WebCore::SubstituteResource::data):
2486 (WebCore::SubstituteResource::SubstituteResource):
2487 * loader/appcache/ApplicationCacheGroup.cpp:
2488 (WebCore::ApplicationCacheGroup::didReceiveResponse):
2489 (WebCore::ApplicationCacheGroup::didReceiveData):
2490 (WebCore::ApplicationCacheGroup::didFail):
2491 (WebCore::ApplicationCacheGroup::didReceiveManifestData):
2492 (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2493 * loader/appcache/ApplicationCacheHost.cpp:
2494 (WebCore::ApplicationCacheHost::maybeLoadMainResource):
2495 (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
2496 (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
2497 * loader/appcache/ApplicationCacheResource.cpp:
2498 (WebCore::ApplicationCacheResource::ApplicationCacheResource):
2499 (WebCore::ApplicationCacheResource::deliver):
2500 (WebCore::ApplicationCacheResource::estimatedSizeInStorage):
2501 * loader/appcache/ApplicationCacheResource.h:
2502 (WebCore::ApplicationCacheResource::create):
2503 * loader/appcache/ApplicationCacheStorage.cpp:
2504 (WebCore::ApplicationCacheStorage::store):
2505 (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):
2506 * loader/appcache/ApplicationCacheStorage.h:
2507 * loader/archive/ArchiveFactory.cpp:
2508 (WebCore::archiveFactoryCreate):
2509 (WebCore::ArchiveFactory::create):
2510 * loader/archive/ArchiveFactory.h:
2511 * loader/archive/ArchiveResource.cpp:
2512 (WebCore::ArchiveResource::ArchiveResource):
2513 (WebCore::ArchiveResource::create):
2514 * loader/archive/ArchiveResource.h:
2515 * loader/archive/ArchiveResourceCollection.cpp:
2516 (WebCore::ArchiveResourceCollection::addResource):
2517 * loader/archive/ArchiveResourceCollection.h:
2518 * loader/archive/cf/LegacyWebArchive.cpp:
2519 (WebCore::LegacyWebArchive::createPropertyListRepresentation):
2520 (WebCore::LegacyWebArchive::createResource):
2521 (WebCore::LegacyWebArchive::create):
2522 (WebCore::LegacyWebArchive::createFromSelection):
2523 * loader/archive/cf/LegacyWebArchive.h:
2524 * loader/archive/mhtml/MHTMLArchive.cpp:
2525 (WebCore::MHTMLArchive::create):
2526 * loader/archive/mhtml/MHTMLArchive.h:
2527 * loader/archive/mhtml/MHTMLParser.cpp:
2528 (WebCore::MHTMLParser::parseArchive):
2529 (WebCore::MHTMLParser::parseArchiveWithHeader):
2530 (WebCore::MHTMLParser::parseNextPart):
2531 * loader/archive/mhtml/MHTMLParser.h:
2532 * loader/cache/CachedImage.cpp:
2533 (WebCore::CachedImage::didAddClient):
2534 * loader/icon/IconDatabase.cpp:
2535 (WebCore::loadDefaultIconRecord):
2536 * loader/icon/IconRecord.cpp:
2537 (WebCore::IconRecord::setImageData):
2538 * loader/icon/IconRecord.h:
2539 * platform/Pasteboard.h:
2540 * platform/PasteboardStrategy.h:
2541 * platform/PlatformPasteboard.h:
2542 * platform/SharedBuffer.cpp:
2543 (WebCore::SharedBuffer::createArrayBuffer):
2544 (WebCore::utf8Buffer):
2545 * platform/SharedBuffer.h:
2546 (WebCore::SharedBuffer::create):
2547 * platform/cf/SharedBufferCF.cpp:
2548 (WebCore::SharedBuffer::wrapCFData):
2549 * platform/cocoa/NetworkExtensionContentFilter.mm:
2550 (WebCore::NetworkExtensionContentFilter::replacementData):
2551 * platform/cocoa/ParentalControlsContentFilter.mm:
2552 (WebCore::ParentalControlsContentFilter::replacementData):
2553 * platform/graphics/Image.cpp:
2554 (WebCore::Image::setData):
2555 * platform/graphics/Image.h:
2556 * platform/gtk/DataObjectGtk.cpp:
2557 (WebCore::DataObjectGtk::forClipboard):
2558 * platform/gtk/DataObjectGtk.h:
2559 (WebCore::DataObjectGtk::create):
2560 * platform/gtk/PasteboardGtk.cpp:
2561 (WebCore::Pasteboard::Pasteboard):
2562 (WebCore::Pasteboard::dataObject):
2563 * platform/ios/PasteboardIOS.mm:
2564 (WebCore::Pasteboard::read):
2565 * platform/ios/PlatformPasteboardIOS.mm:
2566 (WebCore::PlatformPasteboard::bufferForType):
2567 (WebCore::PlatformPasteboard::readBuffer):
2568 * platform/mac/PasteboardMac.mm:
2569 (WebCore::writeFileWrapperAsRTFDAttachment):
2570 (WebCore::Pasteboard::read):
2571 * platform/mac/PlatformPasteboardMac.mm:
2572 (WebCore::PlatformPasteboard::bufferForType):
2573 * platform/mac/SharedBufferMac.mm:
2574 (WebCore::SharedBuffer::wrapNSData):
2575 (WebCore::SharedBuffer::createFromReadingFile):
2576 * platform/network/MIMEHeader.cpp:
2577 (WebCore::retrieveKeyValuePairs):
2578 (WebCore::MIMEHeader::parseHeader):
2579 * platform/network/MIMEHeader.h:
2580 * platform/soup/SharedBufferSoup.cpp:
2581 (WebCore::SharedBuffer::wrapSoupBuffer):
2582 * platform/win/ClipboardUtilitiesWin.cpp:
2583 (WebCore::fragmentFromFilenames):
2584 (WebCore::fragmentFromCFHTML):
2585 (WebCore::fragmentFromHTML):
2586 * platform/win/ClipboardUtilitiesWin.h:
2587 * platform/win/PasteboardWin.cpp:
2588 (WebCore::Pasteboard::documentFragment):
2590 2016-03-14 Oliver Hunt <oliver@apple.com>
2592 Temporarily disable the separated heap.
2593 https://bugs.webkit.org/show_bug.cgi?id=155472
2595 Reviewed by Geoffrey Garen.
2597 Temporarily disable this.
2599 * Configurations/FeatureDefines.xcconfig:
2601 2016-03-10 Antonio Gomes <tonikitoo@webkit.org>
2603 Selecting with shift+drag results in unexpected drag-n-drop
2604 https://bugs.webkit.org/show_bug.cgi?id=155314
2606 Reviewed by Darin Adler.
2608 Test: editing/selection/shift-drag-selection-no-drag-n-drop.html
2610 Whenever user tries to extend an existing text selection by dragging the mouse
2611 (left button hold) with shift key pressed, WebKit enters drag-n-drop mode.
2612 This behavior does not match common editing behavior out there, including other
2613 browsers' (Firefox, Opera/Presto and IE).
2615 Patch changes WebKit so that whenever one extends a selection with mouse
2616 and shift key pressed off of a #text node, it does not enter drag-n-drop mode.
2618 Additionally, patch also adds some further tests to ensure that when
2619 selection is extended off of either a link or an image, drag-n-drop does
2620 get triggered, no matter if shift key is pressed.
2622 * page/EventHandler.cpp:
2623 (WebCore::EventHandler::handleMousePressEvent):
2625 2016-03-14 Brent Fulgham <bfulgham@apple.com>
2627 REGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
2628 https://bugs.webkit.org/show_bug.cgi?id=155453
2629 <rdar://problem/24879447>
2631 Reviewed by Daniel Bates.
2633 Tested by fast/mediastream/enumerating-crash.html.
2635 * Modules/mediastream/MediaDevicesRequest.cpp:
2636 (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Prevent UserMediaPermissionCheck object from being
2637 destroyed before the method completes.
2639 2016-03-14 Simon Fraser <simon.fraser@apple.com>
2641 Fix crash when reloading a page using requestAnimationFrame on iOS
2642 https://bugs.webkit.org/show_bug.cgi?id=155465
2643 rdar://problem/25100202
2645 Reviewed by Tim Horton.
2647 On iOS, it's possible for all clients for a DisplayRefreshMonitor
2648 to be unregistered, but still get a subsequent displayDidRefresh() for that monitor.
2649 In this case, we would remove(notFound) which release-asserts.
2651 Fix by just checking for notFound.
2653 Unable to test because requestAnimationFrame doesn't work in the simulator.
2655 * platform/graphics/DisplayRefreshMonitorManager.cpp:
2656 (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
2658 2016-03-14 Per Arne Vollan <peavo@outlook.com>
2660 [WinCairo][MediaFoundation] Implement float versions of MediaPlayer methods.
2661 https://bugs.webkit.org/show_bug.cgi?id=155357
2663 Reviewed by Brent Fulgham.
2665 It is better to implement the float versions of some of the MediaPlayer methods,
2666 since the default implementation of the double versions is to call the float version.
2667 Also added override keyword to overridden methods.
2669 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2670 (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
2671 (WebCore::MediaPlayerPrivateMediaFoundation::seek):
2672 (WebCore::MediaPlayerPrivateMediaFoundation::setRate):
2673 (WebCore::MediaPlayerPrivateMediaFoundation::duration):
2674 (WebCore::MediaPlayerPrivateMediaFoundation::currentTime):
2675 (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble): Deleted.
2676 (WebCore::MediaPlayerPrivateMediaFoundation::setRateDouble): Deleted.
2677 (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble): Deleted.
2678 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2680 2016-03-14 Tim Horton <timothy_horton@apple.com>
2682 Revert r194125 and r194186: We're going to fix this a different way.
2684 * page/EventHandler.cpp:
2685 (WebCore::EventHandler::clear):
2686 * page/EventHandler.h:
2688 2016-03-14 Youenn Fablet <youenn.fablet@crf.canon.fr>
2690 [Fetch API] FetchLoader should check for empty bodies
2691 https://bugs.webkit.org/show_bug.cgi?id=155440
2693 Reviewed by Darin Adler.
2695 Covered by added tests.
2697 * Modules/fetch/FetchLoader.cpp:
2698 (WebCore::FetchLoader::didFinishLoading): returning empty array buffer/empty string if no data received during loading.
2700 2016-03-14 Chris Dumez <cdumez@apple.com>
2702 Regression(r197981): Huge regression on Mac PLT
2703 https://bugs.webkit.org/show_bug.cgi?id=155443
2704 <rdar://problem/25113391>
2706 Reviewed by Gavin Barraclough.
2708 We have experience a huge regression on Mac PLT after r197981, so
2709 disable the feature until the performance issue is resolved.
2711 * platform/graphics/ca/GraphicsLayerCA.cpp:
2712 (WebCore::GraphicsLayer::supportsSmoothedLayerText):
2714 2016-03-14 Chris Vienneau <chris.vno@outlook.com>
2716 PingHandle delete's itself but pointer is still used by handleDataURL
2717 https://bugs.webkit.org/show_bug.cgi?id=154752
2718 <rdar://problem/24872347>
2720 Reviewed by Alex Christensen.
2722 When a PingHandle is destroyed, we should tell its client so that the client can clear the pointer it
2723 holds to the element to avoid accidentally attempting to use deallocated memory.
2725 The ResourceHandle's client member may be null after "didReceiveResponse" is called. We should confirm
2726 the client is still valid after these calls.
2728 * platform/network/DataURL.cpp:
2729 (WebCore::handleDataURL): Check the client pointer before using it.
2730 * platform/network/PingHandle.h:
2731 (WebCore::PingHandle::~PingHandle): Notify the client we are being destroyed.
2732 * platform/platform/network/ResourceHandle.h:
2734 2016-03-14 Zalan Bujtas <zalan@apple.com>
2736 Negative outline offset could break curved outline-style: auto
2737 https://bugs.webkit.org/show_bug.cgi?id=155416
2739 Reviewed by Tim Horton.
2741 When radius becomes negative the rounded rect could end up being un-renderable -> no rounded corners at all.
2743 Test: fast/inline/hidpi-outline-auto-negative-offset-with-border-radius.html
2745 * platform/graphics/PathUtilities.cpp:
2746 (WebCore::adjustedtRadiiForHuggingCurve):
2748 2016-03-14 Zalan Bujtas <zalan@apple.com>
2750 [Outline: auto] Fractional radius value could result in non-renderable rounded border.
2751 https://bugs.webkit.org/show_bug.cgi?id=155420
2753 Reviewed by Tim Horton.
2755 RoundedRect::pixelSnappedRoundedRectForPainting ensures that the rounded rect is always renderable.
2757 Test: fast/inline/hidpi-outline-auto-with-fractional-radius.html
2759 * platform/graphics/PathUtilities.cpp:
2760 (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
2761 * platform/graphics/PathUtilities.h:
2762 * rendering/RenderElement.cpp:
2763 (WebCore::RenderElement::paintFocusRing):
2765 2016-03-14 Zalan Bujtas <zalan@apple.com>
2767 Outline: auto has sharp corners with single line contenteditable.
2768 https://bugs.webkit.org/show_bug.cgi?id=155418
2770 Reviewed by Tim Horton.
2772 Multiple rectangles assumed multiline content and it broke bottomLeft and bottomRight corner check.
2773 This patch adds fast path for polygons with 4 corners.
2775 Test: fast/inline/hidpi-outline-auto-with-one-focusring-rect.html
2777 * platform/graphics/PathUtilities.cpp:
2778 (WebCore::cornerType):
2779 (WebCore::cornerTypeForMultiline):
2780 (WebCore::rectFromPolygon):
2781 (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
2783 2016-03-14 Joanmarie Diggs <jdiggs@igalia.com>
2785 [AX] SVG element with child desc not exposed
2786 https://bugs.webkit.org/show_bug.cgi?id=155374
2788 Reviewed by Darin Adler.
2790 Covered by the accessibility/w3c-svg-roles.html test, which was updated.
2792 AccessibilitySVGRoot is now a subclass of AccessibilitySVGElement, which
2793 exposes SVG elements with a child desc element as per the specification.
2794 Also made existing protected methods private.
2796 * accessibility/AccessibilitySVGElement.h:
2797 * accessibility/AccessibilitySVGRoot.cpp:
2798 (WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
2799 (WebCore::AccessibilitySVGRoot::parentObject):
2800 * accessibility/AccessibilitySVGRoot.h:
2802 2016-03-14 Alexey Proskuryakov <ap@apple.com>
2806 * Modules/fetch/FetchBodyOwner.cpp:
2807 (WebCore::FetchBodyOwner::loadedBlobAsText):
2809 2016-03-14 Youenn Fablet <youenn.fablet@crf.canon.fr>
2811 [Fetch API] Implement data resolution for blob stored in Body
2812 https://bugs.webkit.org/show_bug.cgi?id=155359
2814 Reviewed by Darin Adler.
2816 Introducing FetchLoader as a wrapper around ThreadableLoader to load resources.
2817 FetchLoader can retrieve data as text or array buffer. It only supports blob currently.
2819 Introducing FetchLoaderClient interface and FetchBodyOwner::BlobLoader as specifc blob loader client.
2821 Covered by existing rebased tests.
2824 * Modules/fetch/FetchBody.cpp:
2825 (WebCore::FetchBody::loadingType):
2826 (WebCore::FetchBody::loadedAsArrayBuffer):
2827 (WebCore::FetchBody::loadedAsText):
2828 * Modules/fetch/FetchBody.h:
2829 * Modules/fetch/FetchBodyOwner.cpp: Added.
2830 (WebCore::FetchBodyOwner::FetchBodyOwner):
2831 (WebCore::FetchBodyOwner::loadBlob):
2832 (WebCore::FetchBodyOwner::finishBlobLoading):
2833 (WebCore::FetchBodyOwner::blobLoadingFailed):
2834 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
2835 * Modules/fetch/FetchBodyOwner.h:
2836 (WebCore::FetchBodyOwner::loadedBlobAsText):
2837 (WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer):
2838 (WebCore::FetchBodyOwner::blobLoadingSucceeded):
2839 * Modules/fetch/FetchLoader.cpp: Added.
2840 (WebCore::FetchLoader::start):
2841 (WebCore::FetchLoader::FetchLoader):
2842 (WebCore::FetchLoader::stop):
2843 (WebCore::FetchLoader::didReceiveResponse):
2844 (WebCore::FetchLoader::didReceiveData):
2845 (WebCore::FetchLoader::didFinishLoading):
2846 (WebCore::FetchLoader::didFail):
2847 * Modules/fetch/FetchLoader.h: Added.
2848 * Modules/fetch/FetchLoaderClient.h: Added.
2849 (WebCore::FetchLoaderClient::~FetchLoaderClient):
2850 (WebCore::FetchLoaderClient::didReceiveResponse):
2851 (WebCore::FetchLoaderClient::didFinishLoadingAsText):
2852 (WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer):
2853 * WebCore.xcodeproj/project.pbxproj:
2855 2016-03-14 Frederic Wang <fwang@igalia.com>
2857 Make MathML colspan/rowspan consistent with HTML table cells.
2858 https://bugs.webkit.org/show_bug.cgi?id=150253
2860 Reviewed by Martin Robinson.
2862 Test: mathml/rowspan-crash.xhtml
2864 We make MathMLElement::colSpan and MathMLElement::rowSpan consistent with the corresponding functions in HTMLTableCellElement.cpp.
2865 These functions now return unsigned integers, use the same parsing functions and set a maximum for rowspan.
2866 This latter change fixes crash/timeout with large values of rowspan.
2868 * mathml/MathMLElement.cpp: Include HTMLParserIdioms to use limitToOnlyHTMLNonNegative.
2869 (WebCore::MathMLElement::colSpan): Use unsigned integer and limitToOnlyHTMLNonNegative.
2870 (WebCore::MathMLElement::rowSpan): ditto. We also use the same maximum limit as HTMLTableCellElement.
2871 * mathml/MathMLElement.h: Make colSpan and rowSpan return unsigned integers.
2873 2016-03-14 Tomas Popela <tpopela@redhat.com>
2875 Enable GSS-Negotiate support in libsoup
2876 https://bugs.webkit.org/show_bug.cgi?id=155354
2878 Reviewed by Carlos Garcia Campos.
2880 Enable the SOUP_TYPE_AUTH_NEGOTIATE feature if libsoup was compiled
2881 with the GSS-Negotiate support.
2883 * platform/network/soup/SoupNetworkSession.cpp:
2884 (WebCore::SoupNetworkSession::SoupNetworkSession):
2886 2016-03-14 Ryosuke Niwa <rniwa@webkit.org>
2888 Add slotchange event
2889 https://bugs.webkit.org/show_bug.cgi?id=155424
2890 <rdar://problem/24997534>
2892 Reviewed by Antti Koivisto.
2894 Added `slotchange` event as discussed on https://github.com/w3c/webcomponents/issues/288.
2896 While the exact semantics of it could still evolve over time, this patch implements as
2897 an asynchronous event that fires on a slot element whenever its distributed nodes change
2898 (flattened assigned nodes):
2899 http://w3c.github.io/webcomponents/spec/shadow/#dfn-distributed-nodes
2901 Since inserting or removing an element from a shadow host could needs to enqueue this event
2902 on the right slot element, this patch moves the invalidation point of element removals and
2903 insertions from Element::childrenChanged to Element::insertedInto and Element::removedFrom.
2904 Text nodes are still invalidated at Element::childrenChanged for performance reasons
2905 since it could only appear within a default slot element.
2907 Because this more fine-grained invalidation needs to be overridden by HTMLDetailsElement,
2908 we now subclass SlotAssignment in HTMLDetailsElement instead of passing in a std::function.
2910 Test: fast/shadow-dom/slotchange-event.html
2913 (WebCore::Document::enqueueSlotchangeEvent): Added.
2916 (WebCore::Element::attributeChanged): Call hostChildElementDidChangeSlotAttr.
2917 (WebCore::Element::insertedInto): Call hostChildElementDidChange.
2918 (WebCore::Element::removedFrom): Ditto.
2919 (WebCore::Element::childrenChanged): Don't invalidate the slots on ElementInserted and
2920 ElementRemoved since they're now done in Element::insertedInto and Element::removedFrom.
2922 (WebCore::Event::scoped): slotchange event is scoped.
2923 * dom/EventNames.h: Added eventNames().slotchange.
2924 * dom/ShadowRoot.cpp:
2925 (WebCore::ShadowRoot::invalidateSlotAssignments): Deleted.
2926 (WebCore::ShadowRoot::invalidateDefaultSlotAssignments): Deleted.
2928 (ShadowRoot): Added more fine-grained invalidators, mirroring changes to SlotAssignment.
2929 * dom/SlotAssignment.cpp:
2930 (WebCore::SlotAssignment::SlotAssignment): Removed a variant that takes SlotNameFunction
2931 since HTMLDetailsElement now subclasses SlotAssignment.
2932 (WebCore::SlotAssignment::~SlotAssignment): Added now that the class is virtual.
2933 (WebCore::recursivelyFireSlotChangeEvent): Added.
2934 (WebCore::SlotAssignment::didChangeSlot): Added. Invalidates the style tree only if there
2935 is a corresponding slot element, and fires slotchange event. When the slot element we found
2936 in this shadow tree is assigned to a slot element inside an inner shadow tree, recursively
2937 fire slotchange event on each such inner slots.
2938 (WebCore::SlotAssignment::hostChildElementDidChange): Added. Update the matching slot when
2939 an element is inserted or removed under a shadow host.
2940 (WebCore::SlotAssignment::assignedNodesForSlot): Removed the superfluous early exit to an
2941 release assert since addSlotElementByName should always create a SlotInfo for each element.
2942 (WebCore::SlotAssignment::slotNameForHostChild): Added. This is the equivalent of old
2943 m_slotNameFunction which DetailsSlotAssignment overrides.
2944 (WebCore::SlotAssignment::invalidateDefaultSlot): Deleted.
2945 (WebCore::SlotAssignment::findFirstSlotElement): Added an assertion. slotInfo.element must
2946 be nullptr if elementCount is 0, and elementCount must be 0 if slotInfo.element is nullptr
2947 after calling resolveAllSlotElements, which traverses the entire shadow tree to find all
2949 (WebCore::SlotAssignment::assignSlots):
2950 * dom/SlotAssignment.h: Implemented inline functions of ShadowRoot here to avoid including
2951 SlotAssignment.h in ShadowRoot.h. Not inlining them results in extra function calls for all
2952 builtin elements with shadow root without slot elements, which impacts performance.
2953 (WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost): Added.
2954 (WebCore::ShadowRoot::didChangeDefaultSlot): Added.
2955 (WebCore::ShadowRoot::hostChildElementDidChange): Added.
2956 (WebCore::ShadowRoot::hostChildElementDidChangeSlotAttribute): Added.
2957 (WebCore::ShadowRoot::innerSlotDidChange):
2958 * html/HTMLDetailsElement.cpp:
2959 (WebCore::DetailsSlotAssignment): Added. Subclasses SlotAssignment to override
2960 hostChildElementDidChange and slotNameForHostChild.
2961 (WebCore::DetailsSlotAssignment::hostChildElementDidChange): Added. We don't check if this
2962 is the first summary element since we don't know the answer when this function is called
2963 inside Element::removedFrom.
2964 (WebCore::DetailsSlotAssignment::slotNameForHostChild): Renamed from slotNameFunction. Also
2965 removed the code to return nullAtom when details element is not open as that messes up new
2966 fine-grained invalidation. Insert/remove the slot element in parseAttribute instead.
2967 (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot): Don't insert the slot element for
2968 the summary since the details element is not open now.
2969 (WebCore::HTMLDetailsElement::parseAttribute): Remove and insert the slot element for the
2970 summary here instead of changing the behavior of slotNameForHostChild.
2971 * html/HTMLDetailsElement.h:
2972 * html/HTMLSlotElement.cpp:
2973 (WebCore::HTMLSlotElement::enqueueSlotChangeEvent): Added. Enqueues a new slotchange event
2974 if we haven't done so for this element yet.
2975 (WebCore::HTMLSlotElement::dispatchEvent): Added. Clear m_hasEnqueuedSlotChangeEvent when
2976 dispatching a slotchange event so that a subsequent call to enqueueSlotChangeEvent would
2977 enqueue a new event. Note scripts call EventTarget::dispatchEventForBindings instead.
2978 * html/HTMLSlotElement.h:
2980 2016-03-14 Youenn Fablet <youenn.fablet@crf.canon.fr>
2982 Introduce CallWith=Document in binding generator
2983 https://bugs.webkit.org/show_bug.cgi?id=155358
2985 Reviewed by Darin Adler.
2987 Covered by existing tests and binding test.
2989 * Modules/notifications/Notification.cpp:
2990 (WebCore::Notification::permission): Taking a Document& instead of ScriptExecutionContext&.
2991 (WebCore::Notification::requestPermission): Ditto.
2992 * Modules/notifications/Notification.h:
2993 * Modules/notifications/Notification.idl: Using CallWith=Document.
2994 * bindings/scripts/CodeGeneratorJS.pm: Adding support for CallWith=Document and changed name from scriptContext to context.
2996 (GenerateConstructorDefinition):
2997 * bindings/scripts/IDLAttributes.txt: Adding support for CallWith=Document.
2998 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2999 (webkit_dom_test_obj_with_document_argument):
3000 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3001 * bindings/scripts/test/JS/JSTestInterface.cpp:
3002 (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
3003 (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
3004 * bindings/scripts/test/JS/JSTestObj.cpp:
3005 (WebCore::jsTestObjWithScriptExecutionContextAttribute):
3006 (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
3007 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
3008 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3009 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3010 (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3011 (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3012 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3013 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3014 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3015 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
3016 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
3017 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
3018 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
3019 (WebCore::jsTestObjPrototypeFunctionWithDocumentArgument):
3020 * bindings/scripts/test/ObjC/DOMTestObj.h:
3021 * bindings/scripts/test/ObjC/DOMTestObj.mm:
3022 (-[DOMTestObj withDocumentArgument]):
3023 * bindings/scripts/test/TestObj.idl: Adding binding test.
3024 * page/DOMWindow.cpp:
3025 (WebCore::DOMWindow::focus): Taking a Document& instead of ScriptExecutionContext&.
3026 (WebCore::DOMWindow::close): Ditto.
3028 * page/DOMWindow.idl:
3030 (WebCore::History::back): Ditto.
3031 (WebCore::History::forward): Ditto.
3032 (WebCore::History::go): Ditto.
3035 * testing/Internals.cpp:
3036 (WebCore::InspectorStubFrontend::closeWindow): Calling DOMWindow::close() directly.
3038 2016-03-13 Joseph Pecoraro <pecoraro@apple.com>
3040 Remove ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX) guards
3041 https://bugs.webkit.org/show_bug.cgi?id=155417
3043 Reviewed by Yusuke Suzuki.
3045 * Configurations/FeatureDefines.xcconfig:
3047 2016-03-13 Sam Weinig <sam@webkit.org>
3049 Implement unprivileged execCommand("copy") and execCommand("cut")
3050 <rdar://problem/24354406>
3051 https://bugs.webkit.org/show_bug.cgi?id=146336
3053 Reviewed by Dean Jackson.
3055 Test: editing/execCommand/clipboard-access-with-user-gesture.html
3057 * WebCore.xcodeproj/project.pbxproj:
3060 * editing/ClipboardAccessPolicy.h:
3063 * editing/EditorCommand.cpp:
3064 (WebCore::defaultValueForSupportedCopyCut):
3065 (WebCore::supportedCopyCut):
3066 Match other browsers and allow the copy and cut commands
3067 to be executed when there is a user gesture.
3070 Add include of ClipboardAccessPolicy.h.
3073 Add new setting for ClipboardAccessPolicy
3075 2016-03-13 Ryosuke Niwa <rniwa@webkit.org>
3077 REGRESSION (r190840): crash inside details element's slotNameFunction
3078 https://bugs.webkit.org/show_bug.cgi?id=155388
3080 Reviewed by Antti Koivisto.
3082 The bug was caused by HTMLDetailsElement::isActiveSummary calling findAssignedSlot with a summary element
3083 inside the shadow tree of the detials element. Fixed it by existing early when the summary element passed
3084 to isActiveSummary is not a direct child of the details element.
3086 Test: fast/html/details-summary-tabindex-crash.html
3088 * dom/ShadowRoot.cpp:
3089 (WebCore::ShadowRoot::findAssignedSlot): Added an assertion for regression testing.
3090 * dom/SlotAssignment.cpp:
3091 (WebCore::SlotAssignment::findAssignedSlot): Removed the superfluous call to assignSlots added in r190840.
3092 There is no need to update the slot assignments here (entires in m_slots are added or removed by
3093 addSlotElementByName or removeSlotElementByName and assignSlots only updates assignedNodes in each SlotInfo
3094 which is never used in this function or findFirstSlotElement.
3095 * html/HTMLDetailsElement.cpp:
3096 (WebCore::HTMLDetailsElement::isActiveSummary): Fixed the bug.
3098 2016-03-13 Antti Koivisto <antti@apple.com>
3100 ComposedTreeIterator fails to traverse slots if root is shadow host
3101 https://bugs.webkit.org/show_bug.cgi?id=155407
3103 Reviewed by Darin Adler.
3105 Test: fast/shadow-dom/composed-tree-shadow-subtree.html
3107 * dom/ComposedTreeIterator.cpp:
3108 (WebCore::ComposedTreeIterator::ComposedTreeIterator):
3110 Traversal functions assume m_contextStack is deeper than 1 before they need to enter slot traversal code paths.
3111 Call initializeContextStack in case of shadow host which does the right thing.
3113 (WebCore::ComposedTreeIterator::traverseSiblingInSlot):
3114 (WebCore::composedTreeAsText):
3116 Add option to include pointers as debugging aid.
3118 * dom/ComposedTreeIterator.h:
3119 (WebCore::composedTreeChildren):
3121 2016-03-12 Sam Weinig <sam@webkit.org>
3123 WebKit can easily crash below NetworkSession::dataTaskForIdentifier() with NSURLSession enabled
3124 <rdar://problem/25129946>
3125 https://bugs.webkit.org/show_bug.cgi?id=155401
3127 Reviewed by Alex Christensen.
3129 Add a SessionID as a member of NetworkStorageSession. This allows us to avoid having HashMaps
3130 to map between the two types.
3132 * platform/network/NetworkStorageSession.h:
3133 (WebCore::NetworkStorageSession::sessionID):
3134 (WebCore::NetworkStorageSession::credentialStorage):
3135 (WebCore::NetworkStorageSession::platformSession):
3136 * platform/network/NetworkStorageSessionStub.cpp:
3137 (WebCore::NetworkStorageSession::NetworkStorageSession):
3138 (WebCore::NetworkStorageSession::context):
3139 (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
3140 (WebCore::defaultSession):
3141 (WebCore::NetworkStorageSession::defaultStorageSession):
3142 (WebCore::NetworkStorageSession::switchToNewTestingSession):
3143 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3144 (WebCore::NetworkStorageSession::NetworkStorageSession):
3145 (WebCore::NetworkStorageSession::switchToNewTestingSession):
3146 (WebCore::NetworkStorageSession::defaultStorageSession):
3147 (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
3148 * platform/network/soup/NetworkStorageSessionSoup.cpp:
3149 (WebCore::NetworkStorageSession::NetworkStorageSession):
3150 (WebCore::NetworkStorageSession::defaultStorageSession):
3151 (WebCore::NetworkStorageSession::createPrivateBrowsingSession):
3152 (WebCore::NetworkStorageSession::switchToNewTestingSession):
3153 (WebCore::NetworkStorageSession::soupNetworkSession):
3155 2016-03-13 Jon Lee <jonlee@apple.com>
3157 getUserMedia requests from the main frame should be treated the same as requests from an iframe with the same origin
3158 https://bugs.webkit.org/show_bug.cgi?id=155405
3159 <rdar://problem/25131007>
3161 Reviewed by Eric Carlson.
3163 When gUM is called from the main frame, or from a subframe with the same origin, the
3164 top level document origin should be the same.
3166 * Modules/mediastream/UserMediaRequest.cpp:
3167 (WebCore::UserMediaRequest::userMediaDocumentOrigin): Reverse the logic so that it is similar
3168 to topLevelDocumentOrigin.
3169 (WebCore::UserMediaRequest::topLevelDocumentOrigin): Return the top origin always.
3171 2016-03-13 David Kilzer <ddkilzer@apple.com>
3173 REGRESSION (r198079): Windows build broke because of "%PRId64" format specifier
3175 * platform/network/ParsedContentRange.cpp: Add #include
3176 <wtf/StdLibExtras.h> and remove local definition of "PRId64".
3178 2016-03-13 Joonghun Park <jh718.park@samsung.com>
3180 [EFL] Fix debug build error since r197690. Unreviewed.
3181 https://bugs.webkit.org/show_bug.cgi?id=155408
3183 Unreviewed. Change %lld to %PRId instead to correct the error below.
3184 error: format ‘%lld’ expects argument of type ‘long long int’,
3185 but argument 5 has type ‘std::chrono::duration<long int, std::ratio<1l, 1000l> >::rep
3186 {aka long int}’ [-Werror=format=]
3188 * page/DOMTimer.cpp:
3189 (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
3191 2016-03-12 Myles C. Maxfield <mmaxfield@apple.com>
3193 [Cocoa] Remove typedef from NSScrollerImp to ScrollbarPainter
3194 https://bugs.webkit.org/show_bug.cgi?id=155379
3196 Reviewed by Beth Dakin.
3198 There's no reason to not call them what they are.
3200 No new tests because there is no behavior change.
3202 * page/scrolling/AsyncScrollingCoordinator.cpp:
3203 (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
3204 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
3205 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
3206 (WebCore::ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars):
3207 (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
3208 * page/scrolling/ScrollingStateFrameScrollingNode.h:
3209 * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
3210 (WebCore::ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars):
3211 (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
3212 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3213 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3214 (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
3215 (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac):
3216 (WebCore::ScrollingTreeFrameScrollingNodeMac::releaseReferencesToScrollerImpsOnTheMainThread):
3217 (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
3218 (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
3219 (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
3220 (WebCore::ScrollingTreeFrameScrollingNodeMac::releaseReferencesToScrollbarPaintersOnTheMainThread): Deleted.
3221 * platform/ScrollbarThemeComposite.h:
3222 * platform/mac/ScrollAnimatorMac.h:
3223 * platform/mac/ScrollAnimatorMac.mm:
3224 (scrollbarPainterForScrollbar):
3225 (-[WebScrollerImpDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
3226 (-[WebScrollerImpDelegate scrollerImp:animateKnobAlphaTo:duration:]):
3227 (-[WebScrollerImpDelegate scrollerImp:animateTrackAlphaTo:duration:]):
3228 (-[WebScrollerImpDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
3229 (-[WebScrollerImpDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
3230 (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3231 (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
3232 (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
3233 (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
3234 (WebCore::ScrollAnimatorMac::mouseIsDownInScrollbar):
3235 (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
3236 (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
3237 (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
3238 (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
3239 (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
3240 (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
3241 (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
3242 (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
3243 (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
3244 (WebCore::ScrollAnimatorMac::cancelAnimations):
3245 (WebCore::ScrollAnimatorMac::updateScrollerStyle):
3246 (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
3247 (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]): Deleted.
3248 (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): Deleted.
3249 (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): Deleted.
3250 (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): Deleted.
3251 (-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]): Deleted.
3252 * platform/mac/ScrollbarThemeMac.h:
3253 * platform/mac/ScrollbarThemeMac.mm:
3254 (WebCore::scrollbarMap):
3255 (+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
3256 (WebCore::ScrollbarThemeMac::registerScrollbar):
3257 (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
3258 (WebCore::ScrollbarThemeMac::painterForScrollbar):
3259 (WebCore::ScrollbarThemeMac::scrollbarThickness):
3260 (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
3261 (WebCore::ScrollbarThemeMac::hasThumb):
3262 (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
3263 (WebCore::scrollbarPainterPaint):
3265 2016-03-12 Dean Jackson <dino@apple.com>
3267 REGRESSION (r188647): Teamtreehouse website sidebar buttons are not rendered
3268 https://bugs.webkit.org/show_bug.cgi?id=155400
3269 <rdar://problem/24818602>
3271 Reviewed by Anders Carlsson.
3273 When we unprefixed CSS filters we accidentally
3274 stopped SVG elements that use the CSS filter shorthands
3275 from rendering. We still don't actually support
3276 the shorthands in this case, but we should render
3277 the element without the filter.
3279 Tests: css3/filters/filters-on-svg-element.html
3280 css3/filters/filters-on-svg-root.html
3282 * rendering/style/RenderStyle.cpp:
3283 (WebCore::RenderStyle::hasReferenceFilterOnly): Add
3284 this new function that tells us if we have the
3285 style of filter that we can handle in SVG content.
3286 * rendering/style/RenderStyle.h:
3287 * rendering/svg/SVGRenderingContext.cpp:
3288 (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3289 We can mark an element as ready to render if it
3290 has a shorthand filter.
3292 2016-03-12 Myles C. Maxfield <mmaxfield@apple.com>
3294 Delete dead SVG Font code
3295 https://bugs.webkit.org/show_bug.cgi?id=154718
3297 Reviewed by Antti Koivisto.
3299 All the ports have adopted the SVG -> OTF Font Converter, so there will never
3300 be an instantiation of a font backed by a DOM subtree. We can remove all the
3301 infrastructure used to support that.
3303 No new tests because there is no behavior change.
3306 * Configurations/FeatureDefines.xcconfig:
3308 * WebCore.xcodeproj/project.pbxproj:
3309 * css/CSSFontFaceSource.cpp:
3310 (WebCore::CSSFontFaceSource::CSSFontFaceSource): Deleted.
3311 (WebCore::CSSFontFaceSource::font): Deleted.
3312 * css/CSSFontFaceSource.h:
3313 * loader/cache/CachedFont.cpp:
3314 * loader/cache/CachedSVGFont.cpp:
3315 (WebCore::CachedSVGFont::createFont): Deleted.
3316 (WebCore::CachedSVGFont::ensureCustomFontData): Deleted.
3317 * loader/cache/CachedSVGFont.h:
3318 * platform/graphics/Font.cpp:
3319 (WebCore::Font::Font):
3320 (WebCore::fillGlyphPage):
3321 (WebCore::Font::description): Deleted.
3322 (WebCore::Font::createScaledFont): Deleted.
3323 (WebCore::Font::applyTransforms): Deleted.
3324 * platform/graphics/Font.h:
3325 (WebCore::Font::widthForGlyph):
3326 (WebCore::Font::SVGData::~SVGData): Deleted.
3327 (WebCore::Font::create): Deleted.
3328 (WebCore::Font::svgData): Deleted.
3329 (WebCore::Font::isSVGFont): Deleted.
3330 * platform/graphics/win/FontWin.cpp:
3331 * platform/graphics/FontCascade.cpp:
3332 (WebCore::FontCascade::drawText):
3333 (WebCore::FontCascade::drawEmphasisMarks):
3334 (WebCore::FontCascade::glyphDataForCharacter):
3335 (WebCore::FontCascade::adjustSelectionRectForText):
3336 (WebCore::FontCascade::offsetForPosition):
3337 (WebCore::FontCascade::drawEmphasisMarksForSimpleText):
3338 (WebCore::FontCascade::drawGlyphBuffer):
3339 (WebCore::isDrawnWithSVGFont): Deleted.
3340 (WebCore::FontCascade::width): Deleted.
3341 (WebCore::FontCascade::codePath): Deleted.
3342 * platform/graphics/FontCascade.h:
3343 * platform/graphics/GraphicsContext.h:
3344 * platform/graphics/SVGGlyph.cpp: Removed.
3345 (WebCore::processArabicFormDetection): Deleted.
3346 (WebCore::charactersWithArabicForm): Deleted.
3347 (WebCore::isCompatibleArabicForm): Deleted.
3348 (WebCore::isCompatibleGlyph): Deleted.
3349 * platform/graphics/SVGGlyph.h: Removed.
3350 (WebCore::SVGGlyph::SVGGlyph): Deleted.
3351 (WebCore::SVGGlyph::inheritedValue): Deleted.
3352 (WebCore::SVGGlyph::operator==): Deleted.
3353 * platform/graphics/TextRun.cpp:
3354 * platform/graphics/TextRun.h:
3355 (WebCore::TextRun::RenderingContext::~RenderingContext): Deleted.
3356 (WebCore::TextRun::renderingContext): Deleted.
3357 (WebCore::TextRun::setRenderingContext): Deleted.
3358 * platform/graphics/WidthIterator.cpp:
3359 (WebCore::WidthIterator::applyFontTransforms):
3360 (WebCore::WidthIterator::advanceInternal):
3361 (WebCore::WidthIterator::glyphDataForCharacter): Deleted.
3362 * platform/graphics/WidthIterator.h:
3363 (WebCore::WidthIterator::lastGlyphName): Deleted.
3364 (WebCore::WidthIterator::setLastGlyphName): Deleted.
3365 (WebCore::WidthIterator::arabicForms): Deleted.
3366 * platform/graphics/cairo/FontCairo.cpp:
3367 (WebCore::CairoGlyphToPathTranslator::advance):
3368 (WebCore::FontCascade::dashesForIntersectionsWithRect):
3369 (WebCore::CairoGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
3370 * platform/graphics/cocoa/FontCascadeCocoa.mm:
3371 (WebCore::MacGlyphToPathTranslator::advance):
3372 (WebCore::FontCascade::dashesForIntersectionsWithRect):
3373 (WebCore::FontCascade::primaryFontIsSystemFont):
3374 (WebCore::FontCascade::drawEmphasisMarksForComplexText):
3375 (WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
3376 * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
3377 (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Deleted.
3378 * platform/graphics/mac/ComplexTextController.cpp:
3379 (WebCore::TextLayout::isNeeded):
3380 (WebCore::TextLayout::TextLayout):
3381 (WebCore::TextLayout::constructTextRun):
3382 * rendering/EllipsisBox.cpp:
3383 (WebCore::EllipsisBox::paint):
3384 (WebCore::EllipsisBox::selectionRect):
3385 (WebCore::EllipsisBox::paintSelection):
3386 * rendering/InlineTextBox.cpp:
3387 (WebCore::InlineTextBox::localSelectionRect):
3388 (WebCore::InlineTextBox::paint):
3389 (WebCore::InlineTextBox::paintSelection):
3390 (WebCore::InlineTextBox::paintCompositionBackground):
3391 (WebCore::InlineTextBox::paintDocumentMarker):
3392 (WebCore::InlineTextBox::paintTextMatchMarker):
3393 (WebCore::InlineTextBox::offsetForPosition):
3394 (WebCore::InlineTextBox::positionForOffset):
3395 (WebCore::InlineTextBox::constructTextRun):
3396 * rendering/InlineTextBox.h:
3397 * rendering/RenderBlock.cpp:
3398 (WebCore::RenderBlock::constructTextRun):
3399 * rendering/RenderBlock.h:
3400 * rendering/RenderBlockFlow.cpp:
3401 (WebCore::stripTrailingSpace):
3402 * rendering/RenderBlockLineLayout.cpp:
3403 (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
3404 * rendering/RenderDeprecatedFlexibleBox.cpp:
3405 (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3406 * rendering/RenderFileUploadControl.cpp:
3407 (WebCore::RenderFileUploadControl::paintObject):
3408 (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
3409 * rendering/RenderImage.cpp:
3410 (WebCore::RenderImage::setImageSizeForAltText):
3411 (WebCore::RenderImage::paintReplaced):
3412 * rendering/RenderListBox.cpp:
3413 (WebCore::RenderListBox::updateFromElement):
3414 * rendering/RenderListMarker.cpp:
3415 (WebCore::RenderListMarker::paint):
3416 (WebCore::RenderListMarker::computePreferredLogicalWidths):
3417 (WebCore::RenderListMarker::getRelativeMarkerRect):
3418 * rendering/RenderMenuList.cpp:
3419 (RenderMenuList::updateOptionsWidth):
3420 * rendering/RenderText.cpp:
3421 (WebCore::RenderText::widthFromCache):
3422 (WebCore::RenderText::trimmedPrefWidths):
3423 (WebCore::hyphenWidth):
3424 (WebCore::maxWordFragmentWidth):
3425 (WebCore::RenderText::computePreferredLogicalWidths):
3426 (WebCore::RenderText::width):
3427 * rendering/RenderTextControl.cpp:
3428 (WebCore::RenderTextControl::getAverageCharWidth):
3429 * rendering/RenderThemeIOS.mm:
3430 (WebCore::RenderThemeMeasureTextClient::RenderThemeMeasureTextClient):
3431 (WebCore::adjustInputElementButtonStyle):
3432 * rendering/SimpleLineLayout.cpp:
3433 (WebCore::SimpleLineLayout::canUseForFontAndText): Deleted.
3434 * rendering/line/BreakingContext.h:
3435 (WebCore::WordTrailingSpace::WordTrailingSpace):
3436 (WebCore::WordTrailingSpace::width):
3437 (WebCore::measureHyphenWidth):
3438 (WebCore::textWidth):
3439 (WebCore::tryHyphenating):
3440 (WebCore::BreakingContext::handleText):
3441 * rendering/svg/RenderSVGAllInOne.cpp:
3442 * rendering/svg/RenderSVGText.cpp:
3443 * rendering/svg/SVGInlineTextBox.cpp:
3444 (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
3445 (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
3446 (WebCore::SVGInlineTextBox::paintTextWithShadows):
3447 (WebCore::SVGInlineTextBox::constructTextRun): Deleted.
3448 * rendering/svg/SVGInlineTextBox.h:
3449 * rendering/svg/SVGTextLayoutEngine.cpp:
3450 (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
3451 * rendering/svg/SVGTextLayoutEngineSpacing.cpp:
3452 (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning): Deleted.
3453 * rendering/svg/SVGTextLayoutEngineSpacing.h:
3454 * rendering/svg/SVGTextMetrics.cpp:
3455 (WebCore::SVGTextMetrics::SVGTextMetrics):
3456 (WebCore::SVGTextMetrics::constructTextRun): Deleted.
3457 * rendering/svg/SVGTextMetrics.h:
3458 * rendering/svg/SVGTextMetricsBuilder.cpp:
3459 (WebCore::SVGTextMetricsBuilder::advanceSimpleText):
3460 * rendering/svg/SVGTextRunRenderingContext.cpp: Removed.
3461 (WebCore::svgFontAndFontFaceElementForFontData): Deleted.
3462 (WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont): Deleted.
3463 (WebCore::SVGTextRunRenderingContext::applySVGKerning): Deleted.
3464 (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator): Deleted.
3465 (WebCore::SVGGlyphToPathTranslator::transform): Deleted.
3466 (WebCore::SVGGlyphToPathTranslator::path): Deleted.
3467 (WebCore::SVGGlyphToPathTranslator::extents): Deleted.
3468 (WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
3469 (WebCore::SVGGlyphToPathTranslator::advance): Deleted.
3470 (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator): Deleted.
3471 (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Deleted.
3472 (WebCore::missingGlyphForFont): Deleted.
3473 (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Deleted.
3474 * rendering/svg/SVGTextRunRenderingContext.h: Removed.
3475 * svg/SVGAllInOne.cpp:
3476 * svg/SVGFontData.cpp: Removed.
3477 (WebCore::SVGFontData::SVGFontData): Deleted.
3478 (WebCore::SVGFontData::initializeFont): Deleted.
3479 (WebCore::SVGFontData::widthForSVGGlyph): Deleted.
3480 (WebCore::SVGFontData::applySVGGlyphSelection): Deleted.
3481 (WebCore::SVGFontData::fillSVGGlyphPage): Deleted.
3482 (WebCore::SVGFontData::fillBMPGlyphs): Deleted.
3483 (WebCore::SVGFontData::fillNonBMPGlyphs): Deleted.
3484 (WebCore::computeNormalizedSpaces): Deleted.
3485 (WebCore::createStringWithMirroredCharacters): Deleted.
3486 * svg/SVGFontData.h: Removed.
3487 (WebCore::SVGFontData::~SVGFontData): Deleted.
3488 (WebCore::SVGFontData::svgFontFaceElement): Deleted.
3489 (WebCore::SVGFontData::horizontalOriginX): Deleted.
3490 (WebCore::SVGFontData::horizontalOriginY): Deleted.
3491 (WebCore::SVGFontData::horizontalAdvanceX): Deleted.
3492 (WebCore::SVGFontData::verticalOriginX): Deleted.
3493 (WebCore::SVGFontData::verticalOriginY): Deleted.
3494 (WebCore::SVGFontData::verticalAdvanceY): Deleted.
3495 * svg/SVGFontElement.cpp:
3496 (WebCore::SVGFontElement::SVGFontElement): Deleted.
3497 (WebCore::SVGFontElement::invalidateGlyphCache): Deleted.
3498 (WebCore::SVGFontElement::firstMissingGlyphElement): Deleted.
3499 (WebCore::SVGFontElement::registerLigaturesInGlyphCache): Deleted.
3500 (WebCore::SVGFontElement::ensureGlyphCache): Deleted.
3501 (WebCore::SVGKerningMap::clear): Deleted.
3502 (WebCore::SVGKerningMap::insert): Deleted.
3503 (WebCore::stringMatchesUnicodeRange): Deleted.
3504 (WebCore::stringMatchesGlyphName): Deleted.
3505 (WebCore::stringMatchesUnicodeName): Deleted.
3506 (WebCore::matches): Deleted.
3507 (WebCore::kerningForPairOfStringsAndGlyphs): Deleted.
3508 (WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs): Deleted.
3509 (WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs): Deleted.
3510 (WebCore::SVGFontElement::collectGlyphsForString): Deleted.
3511 (WebCore::SVGFontElement::collectGlyphsForGlyphName): Deleted.
3512 (WebCore::SVGFontElement::svgGlyphForGlyph): Deleted.
3513 (WebCore::SVGFontElement::missingGlyph): Deleted.
3514 * svg/SVGFontElement.h:
3515 (WebCore::SVGKerning::SVGKerning): Deleted.
3516 (WebCore::SVGKerningMap::isEmpty): Deleted.
3517 * svg/SVGGlyphElement.cpp:
3518 (WebCore::SVGGlyphElement::invalidateGlyphCache): Deleted.
3519 (WebCore::SVGGlyphElement::parseAttribute): Deleted.
3520 (WebCore::SVGGlyphElement::insertedInto): Deleted.
3521 (WebCore::SVGGlyphElement::removedFrom): Deleted.
3522 (WebCore::parseArabicForm): Deleted.
3523 (WebCore::parseOrientation): Deleted.
3524 (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes): Deleted.
3525 (WebCore::parseSVGGlyphAttribute): Deleted.
3526 (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier): Deleted.
3527 (WebCore::SVGGlyphElement::buildGlyphIdentifier): Deleted.
3528 * svg/SVGGlyphElement.h:
3529 * svg/SVGGlyphMap.h: Removed.
3530 (WebCore::GlyphMapNode::GlyphMapNode): Deleted.
3531 (WebCore::GlyphMapNode::create): Deleted.
3532 (WebCore::SVGGlyphMap::SVGGlyphMap): Deleted.
3533 (WebCore::SVGGlyphMap::addGlyph): Deleted.
3534 (WebCore::SVGGlyphMap::appendToGlyphTable): Deleted.
3535 (WebCore::SVGGlyphMap::compareGlyphPriority): Deleted.
3536 (WebCore::SVGGlyphMap::collectGlyphsForString): Deleted.
3537 (WebCore::SVGGlyphMap::clear): Deleted.
3538 (WebCore::SVGGlyphMap::svgGlyphForGlyph): Deleted.
3539 (WebCore::SVGGlyphMap::glyphIdentifierForGlyphName): Deleted.
3540 * svg/SVGHKernElement.cpp:
3541 (WebCore::SVGHKernElement::insertedInto): Deleted.
3542 (WebCore::SVGHKernElement::removedFrom): Deleted.
3543 * svg/SVGHKernElement.h:
3544 * svg/SVGToOTFFontConversion.cpp:
3545 * svg/SVGToOTFFontConversion.h:
3546 * svg/SVGVKernElement.cpp:
3547 (WebCore::SVGVKernElement::insertedInto): Deleted.
3548 (WebCore::SVGVKernElement::removedFrom): Deleted.
3549 * svg/SVGVKernElement.h:
3551 2016-03-12 Myles C. Maxfield <mmaxfield@apple.com>
3553 [OS X] Scrollbars of overflow:scroll divs should appear on the left on RTL systems
3554 https://bugs.webkit.org/show_bug.cgi?id=155385
3556 Reviewed by Simon Fraser.
3558 There is already some existing setup for RTL scrollbars. This patch hooks up this
3559 existing support to the OS X triggering mechanism introduced in r197956. It also
3560 fixes up the existing support to function even when the direction of the
3561 RTL-scrollbar div is LTR (this means the contents of the div must be pushed
3562 over by the width of the scrollbar).
3564 Tests: fast/scrolling/rtl-scrollbars-overflow-contents.html
3565 fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html
3566 fast/scrolling/rtl-scrollbars-overflow-padding.html
3567 fast/scrolling/rtl-scrollbars-overflow-simple.html
3568 fast/scrolling/rtl-scrollbars-overflow.html
3570 * rendering/RenderBlock.cpp:
3571 (WebCore::RenderBlock::addOverflowFromPositionedObjects):
3572 (WebCore::RenderBlock::logicalLeftOffsetForContent):
3573 (WebCore::RenderBlock::logicalRightOffsetForContent):
3574 * rendering/RenderBlockFlow.cpp:
3575 (WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
3576 * rendering/RenderBox.cpp:
3577 (WebCore::RenderBox::overflowClipRect):
3578 (WebCore::RenderBox::layoutOverflowRectForPropagation):
3579 * rendering/RenderLayer.cpp:
3580 (WebCore::RenderLayer::computeScrollDimensions):
3581 * rendering/style/RenderStyle.cpp:
3582 (WebCore::RenderStyle::shouldPlaceBlockDirectionScrollbarOnLogicalLeft):
3583 * rendering/style/RenderStyle.h:
3585 2016-03-12 Zalan Bujtas <zalan@apple.com>
3587 [Forms: focus] focus rings around text fields do not follow contour (border-radius)
3588 https://bugs.webkit.org/show_bug.cgi?id=154099
3589 rdar://problem/9988429
3591 Reviewed by Tim Horton.
3593 This patch enables outline-style: auto to follow the curve of border-radius.
3594 When both border-radius and outline-style: auto are set, the native focusring painting will take the border-radius values
3595 into account. This is only for outline-style: auto, other non-auto outline styles paint as if there
3596 was no border-radius set.
3597 It supports both single and multiline content with joint rectangles.
3598 However in case of disjoint rectangles, we fallback to the non-radius drawing.
3600 Tests: fast/inline/hidpi-outline-auto-with-border-radius-horizontal-ltr.html
3601 fast/inline/hidpi-outline-auto-with-border-radius-horizontal-rtl.html
3602 fast/inline/hidpi-outline-auto-with-border-radius-vertical-ltr.html
3603 fast/inline/hidpi-outline-auto-with-border-radius-vertical-rtl.html
3605 * platform/graphics/GraphicsContext.h:
3606 * platform/graphics/Path.cpp:
3607 (WebCore::Path::addBeziersForRoundedRect):
3608 * platform/graphics/Path.h:
3609 (WebCore::Path::circleControlPoint):
3610 * platform/graphics/PathUtilities.cpp:
3611 (WebCore::polygonsForRect):
3612 (WebCore::PathUtilities::pathsWithShrinkWrappedRects):
3613 (WebCore::startAndEndPointsForCorner):
3614 (WebCore::cornerType):
3615 (WebCore::controlPointsForBezierCurve):
3616 (WebCore::adjustedtRadiiForHuggingCurve):
3617 (WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
3618 * platform/graphics/PathUtilities.h:
3619 * platform/graphics/mac/GraphicsContextMac.mm:
3620 (WebCore::GraphicsContext::drawFocusRing):
3621 * rendering/RenderElement.cpp:
3622 (WebCore::RenderElement::paintFocusRing):
3624 2016-03-11 Ryosuke Niwa <rniwa@webkit.org>
3626 Add Event.deepPath() and Event.scoped
3627 https://bugs.webkit.org/show_bug.cgi?id=153538
3628 <rdar://problem/24363836>
3630 Reviewed by Darin Adler.
3632 Added the support for deepPath(), scoped, and relatedTargetScoped on Event.prototype for shadow DOM:
3633 http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-event-interface
3634 and updated the EventPath class to respect scoped and relatedTargetScoped flags as specified at:
3635 http://w3c.github.io/webcomponents/spec/shadow/#get-the-parent
3637 Tests: fast/shadow-dom/Extensions-to-Event-Interface.html
3638 fast/shadow-dom/trusted-event-scoped-flags.html
3640 * bindings/scripts/CodeGeneratorJS.pm:
3641 (GenerateConstructorDefinition): Added the support for Conditional for InitializedByEventConstructor.
3642 * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
3643 * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
3644 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3645 * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
3646 * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
3647 * bindings/scripts/test/TestEventConstructor.idl: Added a test case for using InitializedByEventConstructor
3650 (WebCore::Event::Event): Initialize m_scoped and m_relatedTargetScoped from EventInit dictionary.
3651 (WebCore::Event::scoped): Added. Implements http://w3c.github.io/webcomponents/spec/shadow/#scoped-flag
3652 (WebCore::Event::deepPath): Added.
3654 (WebCore::Event::relatedTargetScoped): Added. Overridden by FocusEvent and MouseEvent to implement
3655 http://w3c.github.io/webcomponents/spec/shadow/#relatedtargetscoped-flag
3656 (WebCore::Event::setEventPath): Added.
3657 (WebCore::Event::clearEventPath): Added.
3658 * dom/Event.idl: Added scoped, relatedTargetScoped, and deepPath() conditionally enabled for shadow DOM.
3659 * dom/EventContext.h:
3660 (WebCore::EventContext::currentTarget):
3661 * dom/EventDispatcher.cpp:
3662 (WebCore::EventDispatcher::dispatchEvent): Set the event path while the event is being dispatched.
3663 * dom/EventPath.cpp:
3664 (WebCore::shouldEventCrossShadowBoundary): Check event.scoped flag instead of hard-coding a list of events here
3665 which has been moved to Event::scoped. See above.
3666 (WebCore::EventPath::setRelatedTarget): Check m_event.relatedTargetScoped() instead of hard-coding a list of
3667 events here. relatedTargetScoped is overridden by FocusEvent and MouseEvent.
3668 (WebCore::EventPath::hasEventListeners): Fixed the misleading variable name.
3669 (WebCore::isUnclosedNodeOf): Added. Implements http://w3c.github.io/webcomponents/spec/shadow/#dfn-unclosed-node
3670 (WebCore::EventPath::computePathDisclosedToTarget): Added. Implements the algorithm to filter event targets:
3671 http://w3c.github.io/webcomponents/spec/shadow/#widl-Event-deepPath-sequence-EventTarget
3673 * dom/FocusEvent.cpp:
3674 (WebCore::FocusEvent::relatedTargetScoped): Returns true when this is a trusted event per:
3675 http://w3c.github.io/webcomponents/spec/shadow/#relatedtargetscoped-flag
3677 * dom/MouseEvent.cpp:
3678 (WebCore::MouseEvent::relatedTargetScoped): Ditto.
3681 2016-03-11 John Wilander <wilander@apple.com>
3683 Move prevalent resource classifier from WebCore to WebKit.
3684 https://bugs.webkit.org/show_bug.cgi?id=155242
3685 <rdar://problem/24913272>
3687 Reviewed by Andy Estes.
3689 No new tests since we have yet to decide how to set up tests for prevalent resources.
3691 * loader/ResourceLoadObserver.cpp:
3692 (WebCore::ResourceLoadObserver::logFrameNavigation):
3693 (WebCore::ResourceLoadObserver::logSubresourceLoading):
3694 - Removed calls to old classifier in WebCore.
3695 * loader/ResourceLoadStatistics.cpp:
3696 (WebCore::encodeHashCountedSet):
3697 (WebCore::ResourceLoadStatistics::checkAndSetAsPrevalentResourceIfNecessary): Deleted.
3698 (WebCore::ResourceLoadStatistics::hasPrevalentResourceCharacteristics): Deleted.
3699 * loader/ResourceLoadStatistics.h:
3700 - Deleted old classification functions.
3701 * loader/ResourceLoadStatisticsStore.cpp:
3702 (WebCore::ResourceLoadStatisticsStore::create):
3703 (WebCore::ResourceLoadStatisticsStore::fireDataModificationHandler):
3704 (WebCore::ResourceLoadStatisticsStore::hasEnoughDataForStatisticsProcessing):
3705 - New function to allow for checks before calls to processStatistics.
3706 (WebCore::ResourceLoadStatisticsStore::processStatistics):
3707 - New function that receives a lamda and executes it on every entry in its statistics map.
3708 * loader/ResourceLoadStatisticsStore.h:
3710 2016-03-11 Jiewen Tan <jiewen_tan@apple.com>
3712 WebKit should not be redirected to an invalid URL
3713 https://bugs.webkit.org/show_bug.cgi?id=155263
3714 <rdar://problem/22820172>
3716 Reviewed by Brent Fulgham.
3718 Test: http/tests/navigation/redirect-to-invalid-url.html
3720 * loader/SubresourceLoader.cpp:
3721 (WebCore::SubresourceLoader::willSendRequestInternal):
3723 2016-03-10 Maksim Kisilev <mkisilev@yandex-team.ru>
3725 Fix typo in StyleTreeResolver.cpp
3726 https://bugs.webkit.org/show_bug.cgi?id=139946
3728 Reviewed by Andy Estes.
3730 The constructor for CheckForVisibilityChangeOnRecalcStyle was improperly comparing the
3731 result of WKContentChange() (which is not a function) to WKContentVisibilityChange. I
3732 believe the above cast would implicitly resolve to WKContentNoChange in all cases,
3733 whether a visibility change had been observed or not.
3735 This patch corrects this problem. I would expect that this might affect some content
3736 visibility change behavior, but I'm not sure what the appropriate test case would be
3737 since this was apparently found through code inspection.
3739 * style/StyleTreeResolver.cpp:
3740 (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle):
3742 2016-03-11 Chris Dumez <cdumez@apple.com>
3744 iOS-sim debug: WebCoreNSURLSessionTest.BasicOperation and WebCoreNSURLSessionTest.InvalidateEmpty asserting
3745 https://bugs.webkit.org/show_bug.cgi?id=155256
3747 Reviewed by Alexey Proskuryakov.
3749 r197628 consolidated the runtime application checking code for iOS and
3750 Mac. However, while the new code works fine for WebKit2, it is unsafe
3751 on WebKit1 / iOS and hits assertion in debug. The reason is that
3752 applicationBundleIdentifier() for getting called from several threads
3753 (WebThread, UIThread).
3755 To address the problem, this patch renames applicationBundleIdentifier()
3756 to applicationBundleIdentifierOverride() and only initializes the
3757 override upon WebProcess and Network process initialization. We therefore
3758 do not initialize the override in WebKit1 or in the WebKit2 UIProcess.
3759 When the override is not set, we fall back to using the main bundle
3760 identifier (which does the right thing for WebKit1 / WebKit2 UIProcess)
3761 but without caching it to avoid thread safety issues.
3763 No new tests, already covered by API tests currently crashing.
3765 * platform/RuntimeApplicationChecks.mm:
3766 (WebCore::applicationBundleIdentifierOverride):
3767 - Renamed applicationBundleIdentifier() to applicationBundleIdentifierOverride()
3768 and only initialize upon initialization of the WebProcess or the Network
3770 - In debug, set a flag to indicate that the override was already queried.
3772 (WebCore::applicationBundleIdentifier):
3773 New utility function that is returns the application bundle override if it is
3774 set and fallback to calling [[NSBundle mainBundle] bundleIdentifier] otherwise.
3776 (WebCore::setApplicationBundleIdentifier):
3777 Add assertions to make sure that:
3778 1. This is always called from the main thread.
3779 2. The application bundle identifier has not been queried *before* getting
3780 overriden as this would indicate a bug in our code and we would have wrongly
3781 returned the main bundle identifier in such case.
3783 (WebCore::MacApplication::isAppleMail):
3784 (WebCore::MacApplication::isIBooks):
3785 (WebCore::MacApplication::isITunes):
3786 (WebCore::MacApplication::isMicrosoftMessenger):
3787 (WebCore::MacApplication::isAdobeInstaller):
3788 (WebCore::MacApplication::isMicrosoftOutlook):
3789 (WebCore::MacApplication::isQuickenEssentials):
3790 (WebCore::MacApplication::isAperture):
3791 (WebCore::MacApplication::isVersions):
3792 (WebCore::MacApplication::isHRBlock):
3793 (WebCore::MacApplication::isHipChat):
3794 (WebCore::IOSApplication::isMobileSafari):
3795 (WebCore::IOSApplication::isDumpRenderTree):
3796 (WebCore::IOSApplication::isMobileStore):
3797 (WebCore::IOSApplication::isFacebook):
3798 (WebCore::IOSApplication::isDaijisenDictionary):
3799 (WebCore::IOSApplication::isNASAHD):
3800 (WebCore::IOSApplication::isTheEconomistOnIphone):
3801 (WebCore::IOSApplication::isWebProcess):
3802 (WebCore::IOSApplication::isIBooks):
3803 Drop assertions making sure the cached flag is correct. We now have
3804 an assertion to detect this earlier in setApplicationBundleIdentifier().
3806 2016-03-10 Jer Noble <jer.noble@apple.com>
3808 Web Audio becomes distorted after sample rate changes
3809 https://bugs.webkit.org/show_bug.cgi?id=154538
3810 <rdar://problem/24771292>
3812 Reviewed by Darin Adler.
3814 When the underlying audio hardware sample rate changes, the AudioUnit render callback will begin asking
3815 for fewer or more frames. For example, when the sample rate goes from 44.1kHz to 48kHz, it will ask for
3816 118 samples instead of 128. (And vice-versa, 140 samples instead of 128.) But the Web Audio engine can only
3817 really handle requests in multiples of 128 samples. In the case where there are requests for < 128 samples,
3818 actually render 128, but save off the unrequested samples in a separate bus. Then fill that bus during the
3821 * platform/audio/AudioBus.cpp:
3822 (WebCore::AudioBus::copyFromRange): Added utility method.
3823 * platform/audio/AudioBus.h:
3824 * platform/audio/ios/AudioDestinationIOS.cpp:
3825 (WebCore::AudioDestinationIOS::AudioDestinationIOS): Create a "spare" bus.
3826 (WebCore::assignAudioBuffersToBus): Moved from inside render.
3827 (WebCore::AudioDestinationIOS::render): Save off extra samples to the "spare" bus.
3828 * platform/audio/ios/AudioDestinationIOS.h:
3830 2016-03-11 Yusuke Suzuki <utatane.tea@gmail.com>
3832 Unreviewed build fix after r198023.
3833 https://bugs.webkit.org/show_bug.cgi?id=155024
3835 Reviewed by Geoffrey Garen.
3837 Update binding test results.
3839 * bindings/scripts/test/JS/JSTestObj.cpp:
3840 (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3841 (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3842 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3843 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3844 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3846 2016-03-11 Ryan Haddad <ryanhaddad@apple.com>
3848 Unreviewed, rolling out r197984.
3850 This change caused an existing LayoutTest to fail
3854 "WebKit should not be redirected to an invalid URL"
3855 https://bugs.webkit.org/show_bug.cgi?id=155263
3856 http://trac.webkit.org/changeset/197984
3858 2016-03-11 Yusuke Suzuki <utatane.tea@gmail.com>
3860 [ES6] Implement Reflect.set without receiver support
3861 https://bugs.webkit.org/show_bug.cgi?id=155024
3863 Reviewed by Geoffrey Garen.
3865 CustomSetter returns boolean value that indicates the result of [[Set]].
3866 According to this change, this patch modifies the CodeGeneratorJS and test results.
3868 Currently, DOM elements' [[Set]] return true when the setter is found.
3869 This is good for the first step.
3871 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3872 (WebCore::JSCSSStyleDeclaration::putDelegate):
3873 * bindings/js/JSDOMBinding.cpp:
3874 (WebCore::throwSetterTypeError):
3875 * bindings/js/JSDOMBinding.h:
3876 * bindings/js/JSDOMStringMapCustom.cpp:
3877 (WebCore::JSDOMStringMap::putDelegate):
3878 * bindings/js/JSDOMWindowBase.cpp:
3879 (WebCore::JSDOMWindowBase::updateDocument):
3880 * bindings/js/JSDOMWindowCustom.cpp:
3881 (WebCore::JSDOMWindow::put):
3882 (WebCore::JSDOMWindow::putByIndex):
3883 * bindings/js/JSHTMLAppletElementCustom.cpp:
3884 (WebCore::JSHTMLAppletElement::putDelegate):
3885 * bindings/js/JSHTMLEmbedElementCustom.cpp:
3886 (WebCore::JSHTMLEmbedElement::putDelegate):
3887 * bindings/js/JSHTMLObjectElementCustom.cpp:
3888 (WebCore::JSHTMLObjectElement::putDelegate):
3889 * bindings/js/JSLocationCustom.cpp:
3890 (WebCore::JSLocation::putDelegate):
3891 (WebCore::JSLocationPrototype::putDelegate):
3892 * bindings/js/JSPluginElementFunctions.cpp:
3893 (WebCore::pluginElementCustomPut):
3894 * bindings/js/JSPluginElementFunctions.h:
3895 * bindings/js/JSStorageCustom.cpp:
3896 (WebCore::JSStorage::putDelegate):
3897 * bindings/scripts/CodeGeneratorJS.pm:
3899 (GenerateImplementation):
3900 (GeneratePrototypeDeclaration):
3901 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3902 (WebCore::setJSTestActiveDOMObjectConstructor):
3903 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
3904 (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
3905 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3906 (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):
3907 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3908 (WebCore::setJSTestCustomNamedGetterConstructor):
3909 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3910 (WebCore::setJSTestEventConstructorConstructor):
3911 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3912 (WebCore::setJSTestEventTargetConstructor):
3913 * bindings/scripts/test/JS/JSTestException.cpp:
3914 (WebCore::setJSTestExceptionConstructor):
3915 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3916 (WebCore::setJSTestGenerateIsReachableConstructor):
3917 * bindings/scripts/test/JS/JSTestInterface.cpp:
3918 (WebCore::setJSTestInterfaceConstructor):
3919 (WebCore::JSTestInterface::put):
3920 (WebCore::JSTestInterface::putByIndex):
3921 (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
3922 (WebCore::setJSTestInterfaceImplementsStr2):
3923 (WebCore::setJSTestInterfaceImplementsStr3):
3924 (WebCore::setJSTestInterfaceImplementsNode):
3925 (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
3926 (WebCore::setJSTestInterfaceSupplementalStr2):
3927 (WebCore::setJSTestInterfaceSupplementalStr3):
3928 (WebCore::setJSTestInterfaceSupplementalNode):
3929 * bindings/scripts/test/JS/JSTestInterface.h:
3930 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3931 (WebCore::setJSTestJSBuiltinConstructorConstructor):
3932 (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
3933 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3934 (WebCore::setJSTestMediaQueryListListenerConstructor):
3935 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3936 (WebCore::setJSTestNamedConstructorConstructor):
3937 * bindings/scripts/test/JS/JSTestNode.cpp:
3938 (WebCore::setJSTestNodeConstructor):
3939 (WebCore::setJSTestNodeName):
3940 * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3941 (WebCore::setJSTestNondeterministicConstructor):
3942 (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
3943 (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
3944 (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
3945 (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
3946 * bindings/scripts/test/JS/JSTestObj.cpp:
3947 (WebCore::setJSTestObjConstructor):
3948 (WebCore::setJSTestObjConstructorStaticStringAttr):
3949 (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
3950 (WebCore::setJSTestObjEnumAttr):
3951 (WebCore::setJSTestObjByteAttr):
3952 (WebCore::setJSTestObjOctetAttr):
3953 (WebCore::setJSTestObjShortAttr):
3954 (WebCore::setJSTestObjUnsignedShortAttr):
3955 (WebCore::setJSTestObjLongAttr):
3956 (WebCore::setJSTestObjLongLongAttr):
3957 (WebCore::setJSTestObjUnsignedLongLongAttr):
3958 (WebCore::setJSTestObjStringAttr):
3959 (WebCore::setJSTestObjTestObjAttr):
3960 (WebCore::setJSTestObjLenientTestObjAttr):
3961 (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyString):
3962 (WebCore::setJSTestObjXMLObjAttr):
3963 (WebCore::setJSTestObjCreate):
3964 (WebCore::setJSTestObjReflectedStringAttr):
3965 (WebCore::setJSTestObjReflectedIntegralAttr):
3966 (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
3967 (WebCore::setJSTestObjReflectedBooleanAttr):
3968 (WebCore::setJSTestObjReflectedURLAttr):
3969 (WebCore::setJSTestObjReflectedCustomIntegralAttr):
3970 (WebCore::setJSTestObjReflectedCustomBooleanAttr):
3971 (WebCore::setJSTestObjReflectedCustomURLAttr):
3972 (WebCore::setJSTestObjTypedArrayAttr):
3973 (WebCore::setJSTestObjAttrWithGetterException):
3974 (WebCore::setJSTestObjAttrWithGetterExceptionWithMessage):
3975 (WebCore::setJSTestObjAttrWithSetterException):
3976 (WebCore::setJSTestObjAttrWithSetterExceptionWithMessage):
3977 (WebCore::setJSTestObjStringAttrWithGetterException):
3978 (WebCore::setJSTestObjStringAttrWithSetterException):
3979 (WebCore::setJSTestObjStrictTypeCheckingAttribute):
3980 (WebCore::setJSTestObjCustomAttr):
3981 (WebCore::setJSTestObjOnfoo):
3982 (WebCore::setJSTestObjWithScriptStateAttribute):
3983 (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
3984 (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
3985 (WebCore::setJSTestObjWithScriptStateAttributeRaises):
3986 (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
3987 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
3988 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3989 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3990 (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
3991 (WebCore::setJSTestObjConditionalAttr1):
3992 (WebCore::setJSTestObjConditionalAttr2):
3993 (WebCore::setJSTestObjConditionalAttr3):
3994 (WebCore::setJSTestObjConditionalAttr4Constructor):
3995 (WebCore::setJSTestObjConditionalAttr5Constructor):
3996 (WebCore::setJSTestObjConditionalAttr6Constructor):
3997 (WebCore::setJSTestObjAnyAttribute):
3998 (WebCore::setJSTestObjMutablePoint):
3999 (WebCore::setJSTestObjImmutablePoint):
4000 (WebCore::setJSTestObjStrawberry):
4001 (WebCore::setJSTestObjStrictFloat):
4002 (WebCore::setJSTestObjId):
4003 (WebCore::setJSTestObjReplaceableAttribute):
4004 (WebCore::setJSTestObjNullableLongSettableAttribute):
4005 (WebCore::setJSTestObjNullableStringSettableAttribute):
4006 (WebCore::setJSTestObjNullableStringValue):
4007 (WebCore::setJSTestObjAttributeWithReservedEnumType):
4008 (WebCore::setJSTestObjPutForwardsAttribute):
4009 (WebCore::setJSTestObjPutForwardsNullableAttribute):
4010 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
4011 (WebCore::setJSTestOverloadedConstructorsConstructor):
4012 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
4013 (WebCore::setJSTestOverrideBuiltinsConstructor):
4014 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
4015 (WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
4016 (WebCore::setJSTestSerializedScriptValueInterfaceValue):
4017 (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
4018 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
4019 (WebCore::setJSTestTypedefsConstructor):
4020 (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
4021 (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
4022 (WebCore::setJSTestTypedefsAttrWithGetterException):
4023 (WebCore::setJSTestTypedefsAttrWithSetterException):
4024 (WebCore::setJSTestTypedefsStringAttrWithGetterException):
4025 (WebCore::setJSTestTypedefsStringAttrWithSetterException):
4026 * bindings/scripts/test/JS/JSattribute.cpp:
4027 (WebCore::setJSattributeConstructor):
4028 * bindings/scripts/test/JS/JSreadonly.cpp:
4029 (WebCore::setJSreadonlyConstructor):
4030 * bridge/c/c_runtime.cpp:
4031 (JSC::Bindings::CField::setValueToInstance):
4032 * bridge/c/c_runtime.h:
4033 * bridge/jsc/BridgeJSC.h:
4034 (JSC::Bindings::Instance::put):
4035 * bridge/objc/objc_runtime.h:
4036 * bridge/objc/objc_runtime.mm:
4037 (JSC::Bindings::ObjcField::setValueToInstance):
4038 (JSC::Bindings::ObjcArray::setValueAt):
4039 (JSC::Bindings::ObjcFallbackObjectImp::put):
4040 * bridge/runtime_array.cpp:
4041 (JSC::RuntimeArray::put):
4042 (JSC::RuntimeArray::putByIndex):
4043 * bridge/runtime_array.h:
4044 * bridge/runtime_object.cpp:
4045 (JSC::Bindings::RuntimeObject::put):
4046 * bridge/runtime_object.h:
4048 2016-03-11 David Kilzer <ddkilzer@apple.com>
4050 REGRESSION (r197956): WebContent process crashes on launch due to unrecognized selector
4051 <http://webkit.org/b/155356>
4053 Reviewed by Alexey Proskuryakov.
4055 * platform/mac/ScrollableAreaMac.mm:
4056 (WebCore::ScrollableArea::systemLanguageIsRTL): Add
4057 -respondsToSelector: check.
4059 2016-03-11 Youenn Fablet <youenn.fablet@crf.canon.fr>
4061 WTF should have a similar function as equalLettersIgnoringASCIICase to match beginning of strings
4062 https://bugs.webkit.org/show_bug.cgi?id=153419
4064 Reviewed by Darin Adler.
4066 Covered by added unint tests.
4068 * Modules/fetch/FetchHeaders.cpp:
4069 (WebCore::isForbiddenHeaderName): Using startsWithLettersIgnoringASCIICase.
4071 2016-03-11 Youenn Fablet <youenn.fablet@crf.canon.fr>
4073 [Fetch API] Use DeferredWrapper directly in FetchBody promise handling
4074 https://bugs.webkit.org/show_bug.cgi?id=155291
4076 Reviewed by Darin Adler.
4078 Moved from typed DOMPromise to DeferredWrapper as there can only be one promise resolved.
4079 Started preparing the handling of blobs translation to other resolved types.
4081 Fixed the case of empty body, in which case promises should resolve with empty objects (strings, buffers...) and not null.
4083 Added Consumer structure to handle asynchronous resolution/rejection of promises.
4084 Added preliminary API to resolve promises based on data stored as a Blob.
4085 FetchBodyOwner will be responsible to do/stop blob loading.
4087 Tests: imported/w3c/web-platform-tests/fetch/api/request/request-consume-empty.html
4088 imported/w3c/web-platform-tests/fetch/api/response/response-consume-empty.html
4090 * Modules/fetch/FetchBody.cpp:
4091 (WebCore::FetchBody::processIfEmptyOrDisturbed): Fixed empty body case.
4092 (WebCore::FetchBody::arrayBuffer):
4093 (WebCore::FetchBody::blob):
4094 (WebCore::FetchBody::json):
4095 (WebCore::FetchBody::text):
4096 (WebCore::FetchBody::consume):
4097 (WebCore::FetchBody::consumeText):
4098 (WebCore::FetchBody::loadingType):
4099 (WebCore::FetchBody::consumeBlob):
4100 (WebCore::FetchBody::resolveAsJSON):
4101 (WebCore::FetchBody::loadingFailed):
4102 (WebCore::FetchBody::loadedAsBlob):
4103 * Modules/fetch/FetchBody.h:
4104 (WebCore::FetchBody::formData):
4105 (WebCore::FetchBody::Consumer::Consumer):
4106 * Modules/fetch/FetchBody.idl:
4107 * Modules/fetch/FetchBodyOwner.h:
4108 (WebCore::FetchBodyOwner::arrayBuffer):
4109 (WebCore::FetchBodyOwner::blob):
4110 (WebCore::FetchBodyOwner::formData):
4111 (WebCore::FetchBodyOwner::json):
4112 (WebCore::FetchBodyOwner::text):
4113 (WebCore::FetchBodyOwner::loadBlob):
4115 2016-03-11 Yoav Weiss <yoav@yoav.ws>