[iOS WK2] Tiled layer content missing on pages with animated tiled layers
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-05-02  Simon Fraser  <simon.fraser@apple.com>
2
3         [iOS WK2] Tiled layer content missing on pages with animated tiled layers
4         https://bugs.webkit.org/show_bug.cgi?id=132507
5         <rdar://problem/16765740>
6
7         Reviewed by Tim Horton.
8
9         Updating the tiling area of content TileControllers while
10         CSS animations are running depends on GraphicsLayerUpdater
11         triggering repeated layer flushes. With UI-side compositing, those
12         flushes were happening, but nothing triggered RemoteLayerTreeDrawingArea
13         to flush changes to the UI process.
14         
15         Fix by having RenderLayerCompositor schedule a flush, rather
16         than just doing a flush, in response to GraphicsLayerUpdater.
17         
18         Also change the name of the GraphicsLayerUpdaterClient function
19         to indicate that it suggests that a flush is required soon, rather than
20         that the flushing has to be synchronous.
21
22         * platform/graphics/GraphicsLayerUpdater.cpp:
23         (WebCore::GraphicsLayerUpdater::displayRefreshFired):
24         * platform/graphics/GraphicsLayerUpdater.h:
25         * rendering/RenderLayerCompositor.cpp:
26         (WebCore::RenderLayerCompositor::flushLayersSoon):
27         (WebCore::RenderLayerCompositor::flushLayers): Deleted.
28         * rendering/RenderLayerCompositor.h:
29
30 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
31
32         Use displayNameForTrack instead of textTrack->label() for captions.
33         https://bugs.webkit.org/show_bug.cgi?id=131311
34
35         Reviewed by Darin Adler.
36
37         Use the same mechanism as the desktop to build the captions list so it has the correct
38         names in the correct order including none and automatic.
39
40         * platform/ios/WebVideoFullscreenModelMediaElement.h:
41         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
42         (WebVideoFullscreenModelMediaElement::setMediaElement):
43         move legible track code into updateLegibleOptions()
44
45         (WebVideoFullscreenModelMediaElement::handleEvent):
46         updateLegibleOptions on addTrack and removeTrack
47
48         (WebVideoFullscreenModelMediaElement::selectLegibleMediaOption):
49         select the corresponding TextTrack on HTMLMediaElement.
50
51         (WebVideoFullscreenModelMediaElement::updateLegibleOptions):
52         use the same mechanism as desktop to build the captions menu.
53
54 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
55
56         CSS-based Media Controls Show Different times content longer than 1 hour.
57         https://bugs.webkit.org/show_bug.cgi?id=132443
58
59         Reviewed by Jer Noble.
60
61         * Modules/mediacontrols/mediaControlsApple.css:
62         (audio::-webkit-media-controls-timeline-container .hour-long-time):
63         This class has a wider width for longer duration times.
64
65         * Modules/mediacontrols/mediaControlsApple.js:
66         (Controller.prototype.updateDuration):
67         Apply .hour-long-time class as appropriate.
68
69         (Controller.prototype.formatTime):
70         More robust formatting to handle hours.
71
72         * Modules/mediacontrols/mediaControlsiOS.css:
73         (audio::-webkit-media-controls-timeline-container .hour-long-time):
74         This class has a wider width for longer duration times.
75
76         * Modules/mediacontrols/mediaControlsiOS.js:
77         (ControllerIOS.prototype.formatTime):
78         More robust formatting to handle hours.
79
80 2014-05-02  Jer Noble  <jer.noble@apple.com>
81
82         [MSE][Mac] AVAssetTrack returns incorrect track size
83         https://bugs.webkit.org/show_bug.cgi?id=132469
84
85         Reviewed by Brent Fulgham.
86
87         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
88         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
89         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):  Remove the sizeChanged() notification.
90         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): Cache the last parsed video frame size.
91         (WebCore::SourceBufferPrivateAVFObjC::naturalSize): Return the cached value.
92
93 2014-05-02  Zalan Bujtas  <zalan@apple.com>
94
95         Subpixel rendering[iOS]: Use pixelSnappedRoundedRectForPainting() to clip text area rect.
96         https://bugs.webkit.org/show_bug.cgi?id=132499
97         <rdar://problem/16631050>
98
99         Reviewed by Simon Fraser.
100
101         Snap to device pixels properly instead of relying on float arithmetics while converting from RoundedRect
102         to FloatRoundedRect. This is the second, cleanup part of the text-area decoration is off-by-one painting issue.
103
104         Currently not testable.
105
106         * rendering/RenderThemeIOS.mm:
107         (WebCore::RenderThemeIOS::paintTextFieldDecorations):
108
109 2014-05-02  Andreas Kling  <akling@apple.com>
110
111         Remove HistogramSupport.
112         <https://webkit.org/b/132354>
113
114         Prune some leftover Chromium gunk that no other ports ever used.
115
116         Reviewed by Simon Fraser.
117
118         * CMakeLists.txt:
119         * Modules/indexeddb/IDBDatabase.cpp:
120         (WebCore::IDBDatabase::createObjectStore):
121         (WebCore::IDBDatabase::deleteObjectStore):
122         (WebCore::IDBDatabase::transaction):
123         * Modules/indexeddb/IDBFactory.cpp:
124         (WebCore::IDBFactory::openInternal):
125         (WebCore::IDBFactory::deleteDatabase):
126         * Modules/indexeddb/IDBHistograms.h: Removed.
127         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
128         (WebCore::IDBBackingStoreLevelDB::open):
129         (WebCore::IDBBackingStoreLevelDB::openInMemory):
130         (WebCore::recordInternalError): Deleted.
131         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp:
132         * WebCore.vcxproj/WebCore.vcxproj:
133         * WebCore.vcxproj/WebCore.vcxproj.filters:
134         * WebCore.xcodeproj/project.pbxproj:
135         * css/CSSParser.cpp:
136         (WebCore::cssPropertyID):
137         * dom/Document.cpp:
138         (WebCore::Document::~Document):
139         (WebCore::histogramMutationEventUsage): Deleted.
140         * dom/ShadowRoot.cpp:
141         * fileapi/Blob.cpp:
142         * fileapi/WebKitBlobBuilder.cpp:
143         (WebCore::BlobBuilder::append):
144         * history/PageCache.cpp:
145         (WebCore::logCanCacheFrameDecision):
146         (WebCore::logCanCachePageDecision):
147         * platform/HistogramSupport.cpp: Removed.
148         * platform/HistogramSupport.h: Removed.
149         * platform/leveldb/LevelDBDatabase.cpp:
150         (WebCore::LevelDBDatabase::open):
151         (WebCore::histogramLevelDBError): Deleted.
152         * rendering/RenderLayer.cpp:
153         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
154         * xml/XMLHttpRequest.cpp:
155         (WebCore::XMLHttpRequest::send):
156
157 2014-05-02  Brady Eidson  <beidson@apple.com>
158
159         Stop flipping the ImageControlsButton
160         <rdar://problem/16773238> and https://bugs.webkit.org/show_bug.cgi?id=132502
161
162         Reviewed by Tim Horton.
163
164         * rendering/RenderThemeMac.mm:
165         (WebCore::RenderThemeMac::paintImageControlsButton):
166
167 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
168
169         Fullscreen UI does not appear after WebProcess has crashed
170         https://bugs.webkit.org/show_bug.cgi?id=132442
171
172         Reviewed by Darin Adler.
173
174         Clean up immediately when there is a WebProcess crash.
175
176         * WebCore.exp.in:
177         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
178         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
179         (WebVideoFullscreenInterfaceAVKit::invalidate):
180         Clean-up resources immediately.
181
182 2014-05-02  Commit Queue  <commit-queue@webkit.org>
183
184         Unreviewed, rolling out r168192.
185         https://bugs.webkit.org/show_bug.cgi?id=132498
186
187         Was not the correct fix (blurry!) (Requested by bfulgham_ on
188         #webkit).
189
190         Reverted changeset:
191
192         "[iOS] deviceScaleFactor is being double-applied when
193         rendering captions in full screen mode"
194         https://bugs.webkit.org/show_bug.cgi?id=132481
195         http://trac.webkit.org/changeset/168192
196
197 2014-05-02  Alexey Proskuryakov  <ap@apple.com>
198
199         Remove Blob contentDisposition handling
200         https://bugs.webkit.org/show_bug.cgi?id=132490
201
202         Reviewed by Sam Weinig.
203
204         Dead code.
205
206         * platform/network/BlobData.h:
207         (WebCore::BlobData::contentDisposition): Deleted.
208         (WebCore::BlobData::setContentDisposition): Deleted.
209         * platform/network/BlobRegistryImpl.cpp:
210         (WebCore::BlobRegistryImpl::registerBlobURL):
211         (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
212         * platform/network/BlobResourceHandle.cpp:
213         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
214         * platform/network/BlobStorageData.h:
215         (WebCore::BlobStorageData::create):
216         (WebCore::BlobStorageData::contentType):
217         (WebCore::BlobStorageData::BlobStorageData):
218         (WebCore::BlobStorageData::contentDisposition): Deleted.
219
220 2014-05-02  Anders Carlsson  <andersca@apple.com>
221
222         Implement FormData decoding using KeyedDecoder
223         https://bugs.webkit.org/show_bug.cgi?id=132494
224
225         Reviewed by Tim Horton.
226
227         * platform/KeyedCoding.h:
228         (WebCore::KeyedDecoder::decodeEnum):
229         * platform/network/FormData.cpp:
230         (WebCore::decodeElement):
231         (WebCore::FormData::decode):
232         * platform/network/FormData.h:
233
234 2014-05-02  Brent Fulgham  <bfulgham@apple.com>
235
236         [iOS] deviceScaleFactor is being double-applied when rendering captions in full screen mode
237         https://bugs.webkit.org/show_bug.cgi?id=132481
238
239         Reviewed by Jer Noble.
240
241         * html/shadow/MediaControlElements.cpp:
242         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Don't set the platform scale factor here. It is already
243         being accounted for in the createTextTrackRepresentationImage method.
244
245 2014-05-02  Simon Fraser  <simon.fraser@apple.com>
246
247         [iOS WK2] Don't create backing store for -webkit-overflow-scrolling:touch that can't scroll
248         https://bugs.webkit.org/show_bug.cgi?id=132487
249         <rdar://problem/16758041>
250
251         Reviewed by Sam Weinig.
252
253         Previously, -webkit-overflow-scrolling:touch would cause us to make compositing
254         layers for any element that had overflow: auto or scroll on either axis. This
255         created lots of backing store when not required.
256         
257         Improve this to only create compositing for scrolling when there is actually
258         scrollable overflow. This makes things slightly more complex, because we can
259         only know when layout is up to date.
260
261         * rendering/RenderBox.cpp:
262         (WebCore::RenderBox::computeRectForRepaint): usesCompositedScrolling() tells
263         us if we're actually doing composited overflow.
264         * rendering/RenderLayer.cpp:
265         (WebCore::RenderLayer::hasTouchScrollableOverflow):
266         (WebCore::RenderLayer::handleTouchEvent):
267         * rendering/RenderLayer.h:
268         * rendering/RenderLayerBacking.cpp:
269         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
270         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Only update
271         scrolling and clipping layers if layout is not pending.
272         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
273         (WebCore::RenderLayerBacking::updateScrollingLayers): The caller calls
274         updateInternalHierarchy(), so no need to do it here.
275         * rendering/RenderLayerCompositor.cpp:
276         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling): We
277         can only determine that we're scrollable after layout.
278         (WebCore::isStickyInAcceleratedScrollingLayerOrViewport):
279         (WebCore::isMainFrameScrollingOrOverflowScrolling):
280
281 2014-05-02  Anders Carlsson  <andersca@apple.com>
282
283         Clean up FormDataElement
284         https://bugs.webkit.org/show_bug.cgi?id=132483
285
286         Reviewed by Sam Weinig.
287
288         * platform/network/FormData.cpp:
289         (WebCore::FormData::FormData):
290         (WebCore::FormData::deepCopy):
291         (WebCore::FormData::expandDataStore):
292         (WebCore::FormData::flatten):
293         (WebCore::FormData::resolveBlobReferences):
294         (WebCore::FormData::generateFiles):
295         (WebCore::FormData::hasGeneratedFiles):
296         (WebCore::FormData::hasOwnedGeneratedFiles):
297         (WebCore::FormData::removeGeneratedFilesIfNeeded):
298         (WebCore::encodeElement):
299         (WebCore::decodeElement):
300         * platform/network/FormData.h:
301         (WebCore::FormDataElement::FormDataElement):
302         (WebCore::operator==):
303         * platform/network/cf/FormDataStreamCFNet.cpp:
304         (WebCore::advanceCurrentStream):
305         (WebCore::setHTTPBody):
306         * platform/network/curl/FormDataStreamCurl.cpp:
307         (WebCore::FormDataStream::read):
308         * platform/network/curl/ResourceHandleManager.cpp:
309         (WebCore::setupFormData):
310         * platform/network/soup/ResourceHandleSoup.cpp:
311         (WebCore::addFormElementsToSoupMessage):
312
313 2014-05-02  Jer Noble  <jer.noble@apple.com>
314
315         [iOS] Wireless playback button not blue when active
316         https://bugs.webkit.org/show_bug.cgi?id=132473
317
318         Reviewed by Simon Fraser.
319
320         The playback button's class was being set to 'undefined', due to Controller.ClassNames.active being undefined.
321
322         * Modules/mediacontrols/mediaControlsApple.js:
323
324 2014-05-02  Alexey Proskuryakov  <ap@apple.com>
325
326         Don't abuse Blob deserialization constructor in WebSocket
327         https://bugs.webkit.org/show_bug.cgi?id=132478
328
329         Reviewed by Sam Weinig.
330
331         * Modules/websockets/WebSocketChannel.cpp:
332         (WebCore::WebSocketChannel::send):
333         (WebCore::WebSocketChannel::enqueueBlobFrame): This is the important change -
334         Blob::create was called for no reason. If the blob came from a worker, it was
335         already cloned for cross-thread messaging, otherwise there is no reason to make
336         a new one.
337
338         * fileapi/Blob.h:
339         (WebCore::Blob::deserialize):
340         (WebCore::Blob::create): Deleted.
341         * fileapi/File.h:
342         (WebCore::File::deserialize):
343         (WebCore::File::create): Deleted.
344         Renamed a special case of "create" function to avoid explaining what it is for.
345
346         * Modules/websockets/ThreadableWebSocketChannel.h:
347         * Modules/websockets/WebSocket.cpp:
348         (WebCore::WebSocket::send):
349         * Modules/websockets/WebSocketChannel.h:
350         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
351         (WebCore::WorkerThreadableWebSocketChannel::send): Print a full URL in LOG(),
352         not one shortened to 1024 characters.
353         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
354         (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob):
355         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
356         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
357         * bindings/js/SerializedScriptValue.cpp:
358         (WebCore::CloneDeserializer::readFile):
359         (WebCore::CloneDeserializer::readTerminal):
360
361 2014-05-02  Anders Carlsson  <andersca@apple.com>
362
363         Add and implement KeyedDecoder::decodeBytes
364         https://bugs.webkit.org/show_bug.cgi?id=132479
365
366         Reviewed by Tim Horton.
367
368         * platform/KeyedCoding.h:
369         (WebCore::KeyedDecoder::decodeBytes):
370
371 2014-05-02  Joseph Pecoraro  <pecoraro@apple.com>
372
373         [iOS] WebKit2 File Upload Support
374         https://bugs.webkit.org/show_bug.cgi?id=132024
375
376         Reviewed by Enrica Casucci.
377
378         * English.lproj/Localizable.strings:
379         New localized strings for <input type="file"> on iOS.
380
381 2014-05-02  Chris Fleizach  <cfleizach@apple.com>
382
383         AX: WK2: iOS web page scrolling doesn't work with VoiceOver
384         https://bugs.webkit.org/show_bug.cgi?id=132028
385
386         Reviewed by Mario Sanchez Prada.
387
388         With the AX tree residing in the WebProcess, scrolling needs to be implemented in
389         WebCore using accessibilityScroll: in order for accessibility clients to scroll through the AX API.
390
391         * accessibility/AccessibilityObject.cpp:
392         (WebCore::AccessibilityObject::scrollViewAncestor):
393         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
394         * accessibility/AccessibilityObject.h:
395         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
396         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
397         (-[WebAccessibilityObjectWrapper _accessibilityConvertPointToViewSpace:]):
398         (-[WebAccessibilityObjectWrapper _accessibilityScrollToVisible]):
399         (-[WebAccessibilityObjectWrapper accessibilityScroll:]):
400         (-[WebAccessibilityObjectWrapper postScrollStatusChangeNotification]):
401         (-[WebAccessibilityObjectWrapper _accessibilityScrollPosition]):
402         (-[WebAccessibilityObjectWrapper _accessibilityScrollSize]):
403         (-[WebAccessibilityObjectWrapper _accessibilityScrollVisibleRect]):
404
405 2014-05-02  Jeremy Jones  <jeremyj@apple.com>
406
407         Pause playback on exit fullscreen when inline playback not allowed.
408         https://bugs.webkit.org/show_bug.cgi?id=132450
409
410         Reviewed by Jer Noble.
411
412         Use correct method of determining if inline playback is allowed.
413
414         * html/HTMLMediaElement.cpp:
415         (WebCore::HTMLMediaElement::parseAttribute):
416         Use m_mediaSession->requiresFullscreenForVideoPlayback to detect if inline playback is allowed.
417
418         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
419         (WebVideoFullscreenModelMediaElement::requestExitFullscreen):
420         Prevent duplicate exit requests.
421
422 2014-05-02  Ion Rosca  <rosca@adobe.com>
423
424         [CSS Blending] Remove support for non-separable blend modes from background-blend-mode
425         https://bugs.webkit.org/show_bug.cgi?id=132327
426
427         Reviewed by Dean Jackson.
428
429         Removed support for non-separable background blend modes from the CSS parser.
430         Covered by existing tests.
431
432         * css/CSSParser.cpp:
433         (WebCore::CSSParser::parseFillProperty):
434
435 2014-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
436
437         Clean up #include <OwnPtr.h>|<PassOwnPtr.h> in Supplementable classes
438         https://bugs.webkit.org/show_bug.cgi?id=132466
439
440         Reviewed by Tim Horton.
441
442         Since r168144, Supplementable classes don't need to include OwnPtr.h or PassOwnPtr.h.
443         Clean up those inclusions.
444
445         No new tests, just clean up patch.
446
447         * Modules/encryptedmedia/CDMPrivate.h:
448         * Modules/gamepad/NavigatorGamepad.cpp:
449         * Modules/geolocation/GeolocationController.cpp:
450         (WebCore::GeolocationController::create): Deleted. Don't need to have a factory function.
451         * Modules/geolocation/GeolocationController.h:
452         * Modules/mediasource/MediaSource.h:
453         * Modules/mediastream/UserMediaController.h:
454         * Modules/notifications/NotificationCenter.h:
455         * Modules/notifications/NotificationController.cpp:
456         * Modules/quota/StorageErrorCallback.h:
457         * Modules/vibration/Vibration.h:
458         * Modules/webdatabase/Database.cpp:
459         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
460         * Modules/websockets/WebSocket.cpp:
461         * Modules/websockets/WebSocket.h:
462
463 2014-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
464
465         Remove TiledBackingStore stuff from Frame
466         https://bugs.webkit.org/show_bug.cgi?id=132458
467
468         Reviewed by Andreas Kling.
469
470         Although TiledBackingStore is using for the CoordinatedGraphics,
471         CoordinatedGraphics does not use tiledBackingStore of Frame.
472
473         This patch removed TiledBackingStore related code of the Frame.
474
475         * page/Frame.cpp:
476         (WebCore::Frame::Frame):
477         (WebCore::Frame::setView):
478         (WebCore::Frame::setTiledBackingStoreEnabled): Deleted.
479         (WebCore::Frame::tiledBackingStorePaintBegin): Deleted.
480         (WebCore::Frame::tiledBackingStorePaint): Deleted.
481         (WebCore::Frame::tiledBackingStorePaintEnd): Deleted.
482         (WebCore::Frame::tiledBackingStoreContentsRect): Deleted.
483         (WebCore::Frame::tiledBackingStoreVisibleRect): Deleted.
484         (WebCore::Frame::tiledBackingStoreBackgroundColor): Deleted.
485         * page/Frame.h:
486         (WebCore::Frame::tiledBackingStore): Deleted.
487         * page/FrameView.cpp:
488         (WebCore::FrameView::repaintContentRectangle):
489         * page/Settings.cpp:
490         (WebCore::Settings::Settings):
491         (WebCore::Settings::setTiledBackingStoreEnabled): Deleted.
492         * page/Settings.h:
493         (WebCore::Settings::tiledBackingStoreEnabled): Deleted.
494
495 2014-05-01  Myles C. Maxfield  <mmaxfield@apple.com>
496
497         Migrate all uses of DeviceMotionController and DeviceOrientationController to std::unique_ptr
498         https://bugs.webkit.org/show_bug.cgi?id=132461
499
500         Unreviewed build fix.
501
502         No new tests.
503
504         * dom/Document.cpp:
505         (WebCore::Document::Document):
506         * dom/Document.h:
507         * platform/ios/DeviceMotionClientIOS.h:
508         (WebCore::DeviceMotionClientIOS::create): Deleted.
509         * platform/ios/DeviceOrientationClientIOS.h:
510         (WebCore::DeviceOrientationClientIOS::create): Deleted.
511
512 2014-05-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
513
514         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr in Supplement
515         https://bugs.webkit.org/show_bug.cgi?id=132165
516
517         Reviewed by Darin Adler.
518
519         According to convert from PassOwnPtr to std::unique_ptr, provideTo() callers also begin
520         to use std::make_unique.
521
522         * Modules/battery/BatteryController.cpp:
523         (WebCore::provideBatteryTo):
524         * Modules/battery/BatteryController.h:
525         * Modules/battery/NavigatorBattery.cpp:
526         (WebCore::NavigatorBattery::from):
527         * Modules/gamepad/NavigatorGamepad.cpp:
528         (WebCore::NavigatorGamepad::from):
529         * Modules/geolocation/GeolocationController.cpp:
530         (WebCore::provideGeolocationTo):
531         * Modules/geolocation/GeolocationController.h:
532         * Modules/geolocation/NavigatorGeolocation.cpp:
533         (WebCore::NavigatorGeolocation::from):
534         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
535         (WebCore::DOMWindowIndexedDatabase::from):
536         * Modules/indexeddb/PageGroupIndexedDatabase.cpp:
537         (WebCore::PageGroupIndexedDatabase::from):
538         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
539         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
540         * Modules/mediastream/UserMediaController.cpp:
541         (WebCore::provideUserMediaTo):
542         (WebCore::UserMediaController::create): Deleted.
543         * Modules/mediastream/UserMediaController.h:
544         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
545         (WebCore::provideNavigatorContentUtilsTo):
546         (WebCore::NavigatorContentUtils::create): Deleted.
547         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
548         * Modules/notifications/DOMWindowNotifications.cpp:
549         (WebCore::DOMWindowNotifications::from):
550         * Modules/notifications/NotificationController.cpp:
551         (WebCore::provideNotification):
552         (WebCore::NotificationController::create): Deleted.
553         * Modules/notifications/NotificationController.h:
554         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
555         (WebCore::WorkerGlobalScopeNotifications::from):
556         * Modules/proximity/DeviceProximityController.cpp:
557         (WebCore::provideDeviceProximityTo):
558         (WebCore::DeviceProximityController::create): Deleted.
559         * Modules/proximity/DeviceProximityController.h:
560         * Modules/quota/DOMWindowQuota.cpp:
561         (WebCore::DOMWindowQuota::from):
562         * Modules/quota/NavigatorStorageQuota.cpp:
563         (WebCore::NavigatorStorageQuota::from):
564         * Modules/quota/WorkerNavigatorStorageQuota.cpp:
565         (WebCore::WorkerNavigatorStorageQuota::from):
566         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
567         (WebCore::DOMWindowSpeechSynthesis::from):
568         * Modules/speech/SpeechRecognitionController.cpp:
569         (WebCore::provideSpeechRecognitionTo):
570         * Modules/vibration/Vibration.cpp:
571         (WebCore::provideVibrationTo):
572         (WebCore::Vibration::create): Deleted.
573         * Modules/vibration/Vibration.h:
574         * dom/DeviceMotionController.cpp:
575         (WebCore::provideDeviceMotionTo):
576         (WebCore::DeviceMotionController::create): Deleted.
577         * dom/DeviceMotionController.h:
578         * dom/DeviceOrientationController.cpp:
579         (WebCore::provideDeviceOrientationTo):
580         (WebCore::DeviceOrientationController::create): Deleted.
581         * dom/DeviceOrientationController.h:
582         * page/SpeechInput.cpp:
583         (WebCore::provideSpeechInputTo):
584         (WebCore::SpeechInput::create): Deleted.
585         * page/SpeechInput.h:
586         * platform/Supplementable.h:
587         (WebCore::Supplement::provideTo):
588         (WebCore::Supplementable::provideSupplement):
589         * testing/InternalSettings.cpp:
590         (WebCore::InternalSettings::from):
591
592 2014-05-01  Andreas Kling  <akling@apple.com>
593
594         HTMLMediaElement: Remove two unnecessary virtual overrides.
595         <https://webkit.org/b/132445>
596
597         Now that ENABLE_PLUGIN_PROXY_FOR_VIDEO is gone, we can remove
598         these overrides:
599
600             - defaultEventHandler()
601             - willRespondToMouseClickEvents()
602
603         Reviewed by Darin Adler.
604
605         * html/HTMLMediaElement.cpp:
606         * html/HTMLMediaElement.h:
607
608 2014-05-01  Benjamin Poulain  <bpoulain@apple.com>
609
610         ViewportConfiguration::minimumScale() uses the initial scale as initial value
611         https://bugs.webkit.org/show_bug.cgi?id=132451
612         <rdar://problem/16780111>
613
614         Reviewed by Enrica Casucci.
615
616         * page/ViewportConfiguration.cpp:
617         (WebCore::ViewportConfiguration::minimumScale):
618         The initial minimum scale was set to the initial scale, preventing some pages from zooming
619         out.
620
621 2014-05-01  Alexey Proskuryakov  <ap@apple.com>
622
623         Build fix for !ENABLE(BLOB) builds.
624
625         * fileapi/ThreadableBlobRegistry.cpp:
626         (WebCore::ThreadableBlobRegistry::registerBlobURL):
627         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
628
629 2014-05-01  Alexey Proskuryakov  <ap@apple.com>
630
631         Move size computation for Blob constructor into BlobRegistryImpl
632         https://bugs.webkit.org/show_bug.cgi?id=132439
633
634         Reviewed by Sam Weinig.
635
636         * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData):
637         Don't pass the size, anyone who cares can get it from BlobData.
638
639         * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob):
640         Updated for BlobBuilder changes.
641
642         * fileapi/Blob.cpp: (WebCore::Blob::Blob):
643         * fileapi/Blob.h: (WebCore::Blob::create):
644         No longer take a precomputed size with BlobData, BlobRegistry will compute it as
645         part of registration.
646
647         * fileapi/File.h:
648         * fileapi/File.cpp:
649         (WebCore::File::File): Don't pass a size (that's unknown anyway).
650         (WebCore::File::captureSnapshot): Deleted. Finally, only the registry is responsible
651         for snapshot tracking now (I doubt that either new or old code is particularly compliant).
652
653         * fileapi/ThreadableBlobRegistry.cpp:
654         (WebCore::ThreadableBlobRegistry::registerBlobURL):
655         * fileapi/ThreadableBlobRegistry.h:
656         Plumbing to make this version of registerBlobURL return a size. I may make size
657         calculation lazy and the function async later, but this is needed to move the behavior
658         to the right place first.
659
660         * fileapi/WebKitBlobBuilder.h:
661         * fileapi/WebKitBlobBuilder.cpp:
662         (WebCore::BlobBuilder::BlobBuilder):
663         (WebCore::BlobBuilder::append):
664         (WebCore::BlobBuilder::appendBytesData):
665         (WebCore::BlobBuilder::finalize):
666         (WebCore::BlobBuilder::getBlob): Deleted.
667         Don't track sizes or modification times, registry will do that with appropriate laziness.
668         Cleaned up the API - now that BlobBuilder is not exposed to JS as an object, it
669         does not need to be reusable.
670
671         * platform/network/BlobRegistry.h: Made this version of registerBlobURL return a size.
672         * platform/network/BlobRegistryImpl.h:
673         * platform/network/BlobRegistryImpl.cpp:
674         (WebCore::BlobRegistryImpl::appendStorageItems): Assert that length computations are accurate.
675         (WebCore::BlobRegistryImpl::registerBlobURL): Compute a size to return, and record
676         modification time as necessary.
677
678         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob): Don't pass the
679         size, which can be computed from data. Soon, I want to add a constructor that doesn't
680         require wrapping a single Vector as BlobData to construct a Blob.
681
682 2014-05-01  Eric Carlson  <eric.carlson@apple.com>
683
684         [iOS] audio and video should automatically play to active external device
685         https://bugs.webkit.org/show_bug.cgi?id=132428
686
687         Reviewed by Jer Noble.
688
689         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
690         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Set 
691             AVPlayer.usesExternalPlaybackWhileExternalScreenIsActive.
692
693 2014-05-01  David Hyatt  <hyatt@apple.com>
694
695         REGRESSION (r168046): [New Multicolumn] Selection into and out of column-span elements doesn't work
696         https://bugs.webkit.org/show_bug.cgi?id=132066
697
698         Reviewed by Oliver Hunt.
699
700         Make a new SelectionIterator struct that knows how to drill into and out of
701         column span placeholders. Also change spans to be selection roots (in the painting
702         sense).
703
704         * rendering/RenderBlock.cpp:
705         (WebCore::RenderBlock::isSelectionRoot):
706         (WebCore::RenderBlock::selectionGaps):
707         * rendering/RenderView.cpp:
708         (WebCore::SelectionIterator::SelectionIterator):
709         (WebCore::SelectionIterator::checkForSpanner):
710         (WebCore::SelectionIterator::current):
711         (WebCore::SelectionIterator::next):
712         (WebCore::RenderView::subtreeSelectionBounds):
713         (WebCore::RenderView::repaintSubtreeSelection):
714         (WebCore::RenderView::setSubtreeSelection):
715
716 2014-05-01  Simon Fraser  <simon.fraser@apple.com>
717
718         Don't always make backing store for -webkit-backface-visibility:hidden
719         https://bugs.webkit.org/show_bug.cgi?id=132420
720
721         Reviewed by Sam Weinig.
722         
723         Previously, -webkit-backface-visibility:hidden unconditionally created
724         compositing layers with backing store. This results in high memory use
725         on pages with this style applied to many elements (a cargo-cult "optimization").
726         
727         Fix by only having -webkit-backface-visibility:hidden create compositing layers
728         if some ancestor has a 3D transform. That's the only scenario in which the
729         element can be flipped around to reveal the back side, so the only time we need
730         to do compositing for this property. In future, we could be smarter, and only
731         consider 3D transforms in the current preserve-3d context.
732
733         Tests: compositing/backing/backface-visibility-in-3dtransformed.html
734                compositing/backing/backface-visibility-in-transformed.html
735                compositing/backing/backface-visibility.html
736
737         * rendering/RenderLayer.cpp:
738         (WebCore::RenderLayer::RenderLayer):
739         (WebCore::RenderLayer::updateLayerPositions):
740         (WebCore::RenderLayer::hitTestLayer):
741         * rendering/RenderLayer.h:
742         * rendering/RenderLayerCompositor.cpp:
743         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
744         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
745         (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility):
746         * rendering/RenderLayerCompositor.h:
747
748 2014-05-01  Alex Christensen  <achristensen@webkit.org>
749
750         Finish updating ANGLE.
751         https://bugs.webkit.org/show_bug.cgi?id=132434
752
753         Reviewed by Dean Jackson.
754
755         * CMakeLists.txt:
756         Removed Uniform.cpp which is no longer in ANGLE.
757
758 2014-05-01  David Hyatt  <hyatt@apple.com>
759
760         REGRESSION (new multi-column): WebKit2.ResizeReversePaginatedWebView fails on debug bots
761         https://bugs.webkit.org/show_bug.cgi?id=132429
762
763         Reviewed by Alexey Proskuryakov.
764         
765         Make sure to get the column count directly from the column set.
766         I was returning the theoretical column count from the flow thread,
767         and that wasn't the right value.
768
769         * rendering/RenderMultiColumnSet.h:
770         * rendering/RenderView.cpp:
771         (WebCore::RenderView::pageCount):
772
773 2014-05-01  Brent Fulgham  <bfulgham@apple.com>
774
775         Fix handling of attributes prior to compiling shader
776         https://bugs.webkit.org/show_bug.cgi?id=132430
777
778         Reviewed by Dean Jackson.
779
780         WebGL programs that called bindAttribLocations prior to compiling shader sources
781         would perform the bind using the non-hashed symbol name, but would later create
782         the attributes as hashed names. Consequently, the program would refer to
783         attributes that were never actually part of any shader, resulting in some amazing
784         display artifacts.
785
786         This patch adds a dictionary of hashed symbol names so that we can tell the WebGL
787         program the proper name that will be used when the shader is eventually compiled,
788         allowing the WebGL program to link against the proper symbol after compiling and
789         linking completes.
790
791         * platform/graphics/GraphicsContext3D.h:
792         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
793         (WebCore::generateHashedName): Function uses the ANGLE hashing
794         function to generate correct symbol.
795         (WebCore::GraphicsContext3D::mappedSymbolName): If we haven't compiled shaders yet, look
796         in our set of potentially unused attributes.
797         (WebCore::GraphicsContext3D::originalSymbolName): Ditto, for reverse lookup.
798
799 2014-05-01  Zalan Bujtas  <zalan@apple.com>
800
801         Subpixel rendering: Make selection gaps painting subpixel aware.
802         https://bugs.webkit.org/show_bug.cgi?id=132169
803
804         Reviewed by Simon Fraser.
805
806         Push selection gaps painting to device pixel boundaries instead of integral CSS pixel positions.
807
808         Test: fast/inline/hidpi-selection-gap-on-subpixel-position.html
809
810         * rendering/RenderBlock.cpp:
811         (WebCore::RenderBlock::blockSelectionGap):
812         (WebCore::RenderBlock::logicalLeftSelectionGap):
813         (WebCore::RenderBlock::logicalRightSelectionGap):
814
815 2014-05-01  David Kilzer  <ddkilzer@apple.com>
816
817         Really remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
818         <http://webkit.org/b/132432>
819
820         Reviewed by Tim Horton.
821
822         * platform/graphics/wince/MediaPlayerPrivateWinCE.h: Remove
823         methods and ivar in ENABLE(PLUGIN_PROXY_FOR_VIDEO).
824
825 2014-05-01  Javier Fernandez  <jfernandez@igalia.com>
826
827         [CSS Grid Layout] Clamping the number of repetitions in repeat()
828         https://bugs.webkit.org/show_bug.cgi?id=131023
829
830         Reviewed by Brent Fulgham.
831
832         The ED suggests now to be able to clamp the number of repetitions when
833         using the repeat() function, taking precautions about excessive memory
834         usage.
835
836         The implemented max repetitions is 10K.
837
838         Test: fast/css-grid-layout/grid-element-repeat-max-repetitions.html
839
840         * css/CSSParser.cpp:
841         (WebCore::CSSParser::parseGridTrackRepeatFunction):
842
843 2014-04-30  Jer Noble  <jer.noble@apple.com>
844
845         [MSE] Seeking between two buffered ranges enquues incorrect buffers.
846         https://bugs.webkit.org/show_bug.cgi?id=132416
847
848         Reviewed by Eric Carlson.
849
850         std::equal_range(begin, end, value) will return an empty range if equal values cannot
851         be found. But the range is not necessarily [end, end).  It may be some other value n,
852         such that the empty range is [n, n). Check to see if the returned range is empty in
853         findSampleContainingPresentationTime() and its reverse version, and if so, explicitly
854         return presentationEnd() or reversePresentationEnd() respectively.
855
856         Drive-by fix: make the comparator functions take const& arguments to minimize object
857         creation.
858
859         * Modules/mediasource/SampleMap.cpp:
860         (WebCore::SampleIsLessThanMediaTimeComparator::operator()):
861         (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()):
862         (WebCore::SampleMap::findSampleContainingPresentationTime):
863         (WebCore::SampleMap::reverseFindSampleContainingPresentationTime):
864
865 2014-05-01  Zalan Bujtas  <zalan@apple.com>
866
867         Subpixel rendering: Inline text selection painting should not snap to integral CSS pixel position.
868         https://bugs.webkit.org/show_bug.cgi?id=132164
869
870         Reviewed by Darin Adler.
871
872         Inline text selection painting now snaps to device pixels. It uses the same rounding logic as
873         other painting functions.
874
875         Test: fast/inline/hidpi-select-inline-on-subpixel-position.html
876
877         * rendering/EllipsisBox.cpp:
878         (WebCore::EllipsisBox::paintSelection):
879         * rendering/InlineTextBox.cpp:
880         (WebCore::InlineTextBox::paintSelection):
881         (WebCore::alignSelectionRectToDevicePixels): Deleted.
882         * rendering/InlineTextBox.h:
883
884 2014-05-01  Ryuan Choi  <ryuan.choi@samsung.com>
885
886         [EFL] There are many warnings with software backend
887         https://bugs.webkit.org/show_bug.cgi?id=132422
888
889         Reviewed by Gyuyoung Kim.
890
891         ecore_evas_gl_x11_window_get should be called when only engine is opengl_x11.
892
893         This patch refactors not to call unnecessary API by checking engine type.
894         In addition, removed unnecessary isUsingEcoreX().
895
896         * platform/efl/EflScreenUtilities.cpp:
897         (WebCore::applyFallbackCursor):
898         (WebCore::getEcoreXWindow):
899         (WebCore::isUsingEcoreX): Deleted.
900         * platform/efl/EflScreenUtilities.h:
901
902 2014-05-01  Rik Cabanier  <cabanier@adobe.com>
903
904         Calling createPattern with a broken image must throw an invalidstate error
905         https://bugs.webkit.org/show_bug.cgi?id=132407
906
907         Reviewed by Dirk Schulze.
908
909         Per the WebIDL spec, passing non-finite parameter to a method that
910         takes doubles, should generate a type error.
911
912         Tests:
913         * canvas/philip/tests/2d.imageData.create2.nonfinite.html:
914         * fast/canvas/canvas-2d-imageData-create-nonfinite.html:
915
916         * html/canvas/CanvasRenderingContext2D.cpp:
917         (WebCore::CanvasRenderingContext2D::createImageData):
918
919 2014-04-30  David Hyatt  <hyatt@apple.com>
920
921         REGRESSION (r168046): [New Multicolumn] LeftToRight-rl.html (and all the other reversed/block-axis pagination tests) fail
922         https://bugs.webkit.org/show_bug.cgi?id=132419
923
924         Reviewed by Andreas Kling.
925
926         * rendering/RenderMultiColumnSet.cpp:
927         (WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting):
928         Don't flip here. The old code needed to do that, but the new code doesn't.
929
930 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
931
932         Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
933         Clean up unnecessary methods in the BackForwardClient interface
934
935         It broke a regression test and an API test.
936
937         * WebCore.exp.in:
938         * history/BackForwardClient.h:
939         (WebCore::BackForwardClient::backItem):
940         (WebCore::BackForwardClient::currentItem):
941         (WebCore::BackForwardClient::forwardItem):
942         * history/BackForwardController.cpp:
943         (WebCore::BackForwardController::BackForwardController):
944         * history/BackForwardController.h:
945         (WebCore::BackForwardController::client):
946         * history/BackForwardList.cpp:
947         (WebCore::BackForwardList::BackForwardList):
948         (WebCore::BackForwardList::close):
949         * history/BackForwardList.h:
950         (WebCore::BackForwardList::create):
951         (WebCore::BackForwardList::page):
952         * page/Page.cpp:
953         (WebCore::Page::Page):
954         (WebCore::Page::PageClients::PageClients):
955         * page/Page.h:
956
957 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
958
959         More iOS build fixing. MediaPlayerPrivateIOS is defunct and can be removed.
960         Fix some build errors in other media files.
961
962         * WebCore.xcodeproj/project.pbxproj:
963         * platform/graphics/MediaPlayer.cpp:
964         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
965         * platform/graphics/ios/MediaPlayerPrivateIOS.h: Removed.
966         * platform/graphics/ios/MediaPlayerPrivateIOS.mm: Removed.
967
968 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
969
970         Fix the iOS build, which no longer needs these calls
971         to enter/exitFullscreen.
972
973         * html/HTMLMediaElement.cpp:
974         (WebCore::HTMLMediaElement::parseAttribute):
975
976 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
977
978         Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
979         https://bugs.webkit.org/show_bug.cgi?id=132396
980
981         Reviewed by Eric Carlson.
982
983         Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.
984
985         * Configurations/FeatureDefines.xcconfig:
986         * WebCore.exp.in:
987         * css/StyleResolver.cpp:
988         (WebCore::StyleResolver::canShareStyleWithElement):
989         * dom/DOMImplementation.cpp:
990         (WebCore::DOMImplementation::createDocument):
991         * editing/TextIterator.cpp:
992         (WebCore::isRendererReplacedElement):
993         * html/HTMLMediaElement.cpp:
994         (WebCore::HTMLMediaElement::HTMLMediaElement):
995         (WebCore::HTMLMediaElement::parseAttribute):
996         * html/HTMLMediaElement.h:
997         (WebCore::HTMLMediaElement::setNeedWidgetUpdate): Deleted.
998         * html/HTMLMediaSession.cpp:
999         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
1000         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
1001         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
1002         * html/HTMLVideoElement.cpp:
1003         (WebCore::HTMLVideoElement::createElementRenderer):
1004         (WebCore::HTMLVideoElement::didAttachRenderers):
1005         (WebCore::HTMLVideoElement::parseAttribute):
1006         (WebCore::HTMLVideoElement::setDisplayMode):
1007         * html/shadow/MediaControlElements.cpp:
1008         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
1009         * loader/EmptyClients.cpp:
1010         (WebCore::EmptyFrameLoaderClient::createMediaPlayerProxyPlugin): Deleted.
1011         * loader/EmptyClients.h:
1012         * loader/FrameLoaderClient.h:
1013         * loader/SubframeLoader.cpp:
1014         (WebCore::SubframeLoader::loadPlugin):
1015         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin): Deleted.
1016         * loader/SubframeLoader.h:
1017         * page/FrameView.cpp:
1018         (WebCore::FrameView::updateEmbeddedObject):
1019         * page/Settings.cpp:
1020         (WebCore::Settings::setVideoPluginProxyEnabled): Deleted.
1021         * page/Settings.h:
1022         (WebCore::Settings::isVideoPluginProxyEnabled): Deleted.
1023         * platform/graphics/GraphicsLayerClient.h:
1024         (WebCore::GraphicsLayerClient::mediaLayerMustBeUpdatedOnMainThread): Deleted.
1025         * platform/graphics/MediaPlayer.cpp:
1026         (WebCore::installedMediaEngines):
1027         (WebCore::MediaPlayer::MediaPlayer):
1028         (WebCore::MediaPlayer::loadWithNextMediaEngine):
1029         (WebCore::NullMediaPlayerPrivate::deliverNotification): Deleted.
1030         (WebCore::NullMediaPlayerPrivate::setMediaPlayerProxy): Deleted.
1031         (WebCore::NullMediaPlayerPrivate::setControls): Deleted.
1032         (WebCore::MediaPlayer::deliverNotification): Deleted.
1033         (WebCore::MediaPlayer::setMediaPlayerProxy): Deleted.
1034         (WebCore::MediaPlayer::setControls): Deleted.
1035         * platform/graphics/MediaPlayer.h:
1036         * platform/graphics/MediaPlayerPrivate.h:
1037         (WebCore::MediaPlayerPrivateInterface::deliverNotification): Deleted.
1038         (WebCore::MediaPlayerPrivateInterface::setMediaPlayerProxy): Deleted.
1039         (WebCore::MediaPlayerPrivateInterface::setControls): Deleted.
1040         * platform/graphics/ca/GraphicsLayerCA.cpp:
1041         (WebCore::GraphicsLayerCA::updateGeometry):
1042         (WebCore::GraphicsLayerCA::updateContentsRects):
1043         (WebCore::GraphicsLayerCA::mediaLayerMustBeUpdatedOnMainThread): Deleted.
1044         * platform/graphics/ca/GraphicsLayerCA.h:
1045         * rendering/RenderEmbeddedObject.cpp:
1046         (WebCore::RenderEmbeddedObject::canHaveChildren):
1047         * rendering/RenderLayerBacking.cpp:
1048         (WebCore::RenderLayerBacking::mediaLayerMustBeUpdatedOnMainThread): Deleted.
1049         * rendering/RenderLayerBacking.h:
1050         * rendering/RenderLayerCompositor.cpp:
1051         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
1052
1053 2014-04-30  Simon Fraser  <simon.fraser@apple.com>
1054
1055         [iOS WK2] Some accerated overflow-scroll doesn't scroll correctly
1056         https://bugs.webkit.org/show_bug.cgi?id=132375
1057
1058         Reviewed by Tim Horton.
1059         
1060         We set the size of the scrolling layer (which becomes the bounds of
1061         the UIScrollView) to a non-pixel-snapped padding box size, but the
1062         size of the contents layer is an integral-snapped scroll size.
1063         This would result in a fractional difference between the two, which
1064         makes us thing that the element is scrollable when it really is not.
1065         
1066         Fix by setting the size of the scroll layer to pixel snapped client size,
1067         which is what we also use for scrollability computation.
1068         
1069         Added some FIXMEs in code that requires pixel snapping.
1070         
1071         Also use #if PLATFORM(IOS)/#else to bracket some code that never runs on iOS
1072         but tries to do something similar to iOS-only code.
1073
1074         * rendering/RenderLayerBacking.cpp:
1075         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1076
1077 2014-04-30  David Hyatt  <hyatt@apple.com>
1078
1079         REGRESSION (r168046): [New Multicolumn] Painting order is wrong for columns and fixed positioned elements
1080         https://bugs.webkit.org/show_bug.cgi?id=132377
1081
1082         Reviewed by Simon Fraser.
1083
1084         Added fast/multicol/fixed-stack.html
1085
1086         * rendering/RenderLayer.cpp:
1087         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
1088         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1089         Change the flow thread layer for multicolumn layout to be normal flow only and to
1090         stay self-painting. This has the effect of keeping the flow thread layer grouped
1091         with the enclosing multicolumn layer, and this keeps the paint order correct when
1092         compositing kicks in (or when something would otherwise try to get between the
1093         two layers).
1094
1095 2014-04-30  Eric Carlson  <eric.carlson@apple.com>
1096
1097         [iOS] do not pause video when entering background while playing to external device
1098         https://bugs.webkit.org/show_bug.cgi?id=132374
1099
1100         Reviewed by Jer Noble.
1101
1102         * WebCore.exp.in: Update beginInterruption signature.
1103
1104         * html/HTMLMediaElement.cpp:
1105         (WebCore::HTMLMediaElement::canOverrideBackgroundPlaybackRestriction): New, return true when
1106             playing to external device.
1107         * html/HTMLMediaElement.h:
1108
1109         * platform/audio/MediaSession.cpp:
1110         (WebCore::MediaSession::beginInterruption): Add interruption type to beginInterruption.
1111         * platform/audio/MediaSession.h:
1112
1113         * platform/audio/MediaSessionManager.cpp:
1114         (WebCore::MediaSessionManager::beginInterruption): Ditto.
1115         (WebCore::MediaSessionManager::applicationWillEnterBackground): Ditto.
1116         (WebCore::MediaSessionManager::systemWillSleep): Ditto.
1117         * platform/audio/MediaSessionManager.h:
1118
1119         * platform/audio/ios/AudioDestinationIOS.h:
1120         * platform/audio/ios/MediaSessionManagerIOS.mm:
1121         (-[WebMediaSessionHelper interruption:]): Ditto.
1122
1123         * platform/audio/mac/AudioDestinationMac.h: Make most methods private. Add 
1124             canOverrideBackgroundPlaybackRestriction. Add missing overrides.
1125         * testing/Internals.cpp:
1126         (WebCore::Internals::beginMediaSessionInterruption): Pass interruption type.
1127
1128 2014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
1129
1130         Unreviewed, rolling out r167879 and r167942.
1131         https://bugs.webkit.org/show_bug.cgi?id=132408
1132
1133         OrderIterator changes caused regressions in flexbox (Requested
1134         by rego on #webkit).
1135
1136         We're keeping the new layout test introduced in r167942
1137         (fast/flexbox/order-iterator-crash.html) to avoid similar
1138         regressions in the future.
1139
1140         Reverted changesets:
1141
1142         "OrderIterator refactoring to avoid extra loops"
1143         https://bugs.webkit.org/show_bug.cgi?id=119061
1144         http://trac.webkit.org/changeset/167879
1145
1146         "REGRESSION (r167879): Heap-use-after-free in
1147         WebCore::RenderFlexibleBox"
1148         https://bugs.webkit.org/show_bug.cgi?id=132337
1149         http://trac.webkit.org/changeset/167942
1150
1151 2014-04-30  Enrica Casucci  <enrica@apple.com>
1152
1153         Cursor gets thinner on empty lines.
1154         https://bugs.webkit.org/show_bug.cgi?id=132411
1155         <rdar://problem/15994556>
1156
1157         Reviewed by Benjamin Poulain.
1158
1159         RenderLineBreak::localCaretRect should not define
1160         locally the constant caretWidth, but use the one from
1161         RenderObject.h which knows about the differences between
1162         iOS and the other platforms.
1163
1164         * rendering/RenderLineBreak.cpp:
1165         (WebCore::RenderLineBreak::localCaretRect):
1166
1167 2014-04-30  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1168
1169         [GStreamer] Use GstMetaVideo
1170         https://bugs.webkit.org/show_bug.cgi?id=132247
1171
1172         Reviewed by Philippe Normand.
1173
1174         In WebKitVideoSink we announce the usage of GstMetaVideo, but we do
1175         not use it when handling the video frames. This might break
1176         some decoders and filters that rely on buffer's meta, rather
1177         that in the caps structures.
1178
1179         This patch enables the use of GstMetaVideo through the GstVideoFrame
1180         API. And it is used everywhere the buffer mapping is required.
1181
1182         Also this patch changes to nullptr where zeros were used.
1183
1184         Also, compile conditionally the video buffer conversion when it is
1185         ARGB/BGRA, since it is only required for the Cairo backend.
1186
1187         No new tests, already covered by current tests.
1188
1189         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
1190         (WebCore::getVideoSizeAndFormatFromCaps): init the GstVideoInfo before
1191         used and remove caps fixate check since it is done by
1192         gst_video_info_from_caps().
1193         * platform/graphics/gstreamer/ImageGStreamer.h:
1194         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
1195         (ImageGStreamer::ImageGStreamer): use GstVideoFrame for buffer mapping
1196         and unmapping.
1197         (ImageGStreamer::~ImageGStreamer): ditto.
1198         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1199         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): ditto.
1200         (WebCore::MediaPlayerPrivateGStreamerBase::currentVideoSinkCaps):
1201         return nullptr if failed.
1202         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1203         (webkitVideoSinkRender): rely on GstVideoInfo rather than on the
1204         caps. Use GstVideoFrame for buffer mapping and unmapping. Add guards
1205         for buffer transformation, since it's only used by Cairo.
1206         (webkitVideoSinkDispose): remove glib version guards.
1207         (webkitVideoSinkSetCaps): update the value of the private
1208         GstVideoInfo.
1209
1210 2014-04-30  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1211
1212         [GTK][GStreamer] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
1213         https://bugs.webkit.org/show_bug.cgi?id=132390
1214
1215         Reviewed by Philippe Normand.
1216
1217         Since EFL port use GLib 2.38 and GTK+, 2.33.2, I assume it is OK
1218         remove, in GTK+ and GST, the existing glib version guards.
1219
1220         No new tests, already covered by current tests.
1221
1222         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1223         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
1224         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
1225         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1226         (webkitVideoSinkDispose):
1227         (webkitVideoSinkFinalize): Deleted.
1228
1229 2014-04-30  Alex Christensen  <achristensen@webkit.org>
1230
1231         Updated ANGLE.
1232         https://bugs.webkit.org/show_bug.cgi?id=132367
1233         <rdar://problem/16211451>
1234
1235         Reviewed by Dean Jackson.
1236
1237         * CMakeLists.txt
1238         Fixed ANGLE compiling with the update.
1239         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1240         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
1241         Removed SH_MAP_LONG_VARIABLE_NAMES which is no longer defined in ANGLE.
1242         See https://chromium.googlesource.com/angle/angle/+/3cdfcce86b38ef31a0afd71855887193a7924468
1243         * platform/graphics/opengl/Extensions3DOpenGLES.h:
1244         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
1245         Updated type names from ANGLE.
1246
1247 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
1248
1249         Move Blob.slice() implementation into BlobRegistryImpl
1250         https://bugs.webkit.org/show_bug.cgi?id=132402
1251
1252         Reviewed by Anders Carlsson.
1253
1254         Part or centralizing the responsibility for file size tracking.
1255
1256         * fileapi/Blob.cpp:
1257         (WebCore::Blob::Blob):
1258         (WebCore::Blob::slice): Deleted.
1259         * fileapi/Blob.h:
1260         (WebCore::Blob::slice):
1261         * fileapi/ThreadableBlobRegistry.cpp:
1262         (WebCore::ThreadableBlobRegistry::registerBlobURL):
1263         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
1264         (WebCore::registerBlobURLTask): Deleted.
1265         (WebCore::registerBlobURLFromTask): Deleted.
1266         * fileapi/ThreadableBlobRegistry.h:
1267         * platform/network/BlobRegistry.h:
1268         * platform/network/BlobRegistryImpl.cpp:
1269         (WebCore::BlobRegistryImpl::appendStorageItems):
1270         (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
1271         (WebCore::BlobRegistryImpl::blobSize):
1272         * platform/network/BlobRegistryImpl.h:
1273
1274 2014-04-30  Brent Fulgham  <bfulgham@apple.com>
1275
1276         Unreviewed build fix after r168041.
1277
1278         * WebCore.exp.in: Add missing iOS exports.
1279
1280 2014-04-30  Beth Dakin  <bdakin@apple.com>
1281
1282         Always-visible scrollbars continuously repaint after non-momentum scrollling
1283         https://bugs.webkit.org/show_bug.cgi?id=132403
1284         -and corresponding-
1285         <rdar://problem/16553878>
1286
1287         Reviewed by Simon Fraser.
1288
1289         No longer universally opt into presentation value mode whenever the scroll 
1290         position changes on the scrolling thread. We really only want it for momentum 
1291         scrolls, and this will ensure that we always set it to NO once we have set it to 
1292         YES.
1293         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1294         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
1295         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1296
1297         Expose shouldUsePresentationValue.
1298         * platform/mac/NSScrollerImpDetails.h:
1299
1300 2014-04-30  Anders Carlsson  <andersca@apple.com>
1301
1302         Move the legacy WebKit API into WebKitLegacy.framework and move it inside WebKit.framework
1303         https://bugs.webkit.org/show_bug.cgi?id=132399
1304         <rdar://problem/15920046>
1305
1306         Reviewed by Dan Bernstein.
1307
1308         Allow WebKitLegacy to link against WebCore.
1309
1310         * Configurations/WebCore.xcconfig:
1311
1312 2014-04-30  David Hyatt  <hyatt@apple.com>
1313
1314         [New Multicolumn] ASSERTs in fast/dynamic/continuation-detach-crash.html
1315         https://bugs.webkit.org/show_bug.cgi?id=132392
1316
1317         Reviewed by Dean Jackson.
1318
1319         * rendering/RenderFlowThread.cpp:
1320         (WebCore::RenderFlowThread::setRegionRangeForBox):
1321         Add ASSERTs in case we ever try to set regions from the wrong flow thread
1322         as part of the box's region range.
1323
1324         * rendering/RenderMultiColumnFlowThread.cpp:
1325         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
1326         Add a bunch of code that handles the discovery of a span from an outer flow thread
1327         being inserted into an inner flow thread. This forces us to delete that placeholder
1328         and shift the outer spanning content into the inner flow thread in order to get a new
1329         mapping/placeholder created in the inner flow thread.
1330
1331         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
1332         Tighten this code to use the parent() just in case we change the invariant of
1333         parent = containingBlock later.
1334
1335         * rendering/RenderMultiColumnFlowThread.h:
1336         Add a static guard when shifting a spanner to prevent the outer flow thread from
1337         thinking the spanner belongs to it when it gets punted out of the inner flow thread.
1338         A better long-term solution might be to make the spanner map global instead of
1339         per-flow thread.
1340
1341         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
1342         (WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
1343         * rendering/RenderMultiColumnSpannerPlaceholder.h:
1344         Cache the flow thread so that we can get back to it in order to detect if the
1345         placeholder belongs to us or not.
1346
1347         * rendering/RenderObject.cpp:
1348         (WebCore::RenderObject::insertedIntoTree):
1349         Notifications from insertedIntoTree are problematic, since this can be called during
1350         the layout of the outer flow thread for content inside an inner flow thread that is
1351         not getting a layout yet. This makes the currentFlowThread in the flow thread controller
1352         inaccurate, so we have to add code to clear it out and put it back.
1353
1354 2014-04-29  Chris Fleizach  <cfleizach@apple.com>
1355
1356         AX: Make "contenteditable" regions into AXTextAreas
1357         https://bugs.webkit.org/show_bug.cgi?id=132379
1358
1359         Reviewed by Mario Sanchez Prada.
1360
1361         Make contenteditable regions into AXTextAreas. This will allow for a more standardized
1362         interface for interaction with assistive technologies.
1363
1364         Test: accessibility/content-editable-as-textarea.html
1365
1366         * accessibility/AccessibilityNodeObject.cpp:
1367         (WebCore::AccessibilityNodeObject::hasContentEditableAttributeSet):
1368         * accessibility/AccessibilityObject.cpp:
1369         (WebCore::AccessibilityObject::contentEditableAttributeIsEnabled):
1370         * accessibility/AccessibilityObject.h:
1371         * accessibility/AccessibilityRenderObject.cpp:
1372         (WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange):
1373         (WebCore::AccessibilityRenderObject::selectedText):
1374         (WebCore::AccessibilityRenderObject::selectedTextRange):
1375         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
1376         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1377         (WebCore::AccessibilityRenderObject::ariaSelectedTextRange): Deleted.
1378         * accessibility/AccessibilityRenderObject.h:
1379
1380 2014-04-30  Brian J. Burg  <burg@cs.washington.edu>
1381
1382         Clean up unnecessary methods in the BackForwardClient interface
1383         https://bugs.webkit.org/show_bug.cgi?id=131637
1384
1385         Reviewed by Andreas Kling.
1386
1387         Demote back/current/forwardItem and iOS-specific methods from the
1388         BackForwardClient interface. Convert the class to not be refcounted.
1389
1390         No new tests, no behavior was changed.
1391
1392         * WebCore.exp.in:
1393         * history/BackForwardClient.h:
1394         (WebCore::BackForwardClient::~BackForwardClient): Deleted.
1395         (WebCore::BackForwardClient::backItem): Deleted.
1396         (WebCore::BackForwardClient::currentItem): Deleted.
1397         (WebCore::BackForwardClient::forwardItem): Deleted.
1398         * history/BackForwardController.cpp:
1399         (WebCore::BackForwardController::BackForwardController):
1400         * history/BackForwardController.h: Take ownership of the passed BackForwardClient.
1401         (WebCore::BackForwardController::client): Return a reference.
1402         * history/BackForwardList.h: Remove the Page field, since it isn't used any more.
1403         (WebCore::BackForwardList::create): Deleted.
1404         * page/Page.h: Remove RefPtr from PageClient.
1405         * page/Page.cpp:
1406         (WebCore::PageClients::PageClients): Initialize client to nullptr.
1407
1408 2014-04-30  Brent Fulgham  <bfulgham@apple.com>
1409
1410         [Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
1411         https://bugs.webkit.org/show_bug.cgi?id=132320
1412
1413         Reviewed by Eric Carlson.
1414
1415         * Modules/mediacontrols/mediaControlsApple.css:
1416         (video::-webkit-media-text-track-container .hidden): Added.
1417         * html/HTMLMediaElement.cpp:
1418         (WebCore::HTMLMediaElement::configureTextTrackGroup): Added call to
1419         new 'updateCaptionsContainer'.
1420         (WebCore::HTMLMediaElement::updateCaptionContainer): Added.
1421         * html/HTMLMediaElement.h:
1422
1423 2014-04-30  Alexey Proskuryakov  <ap@apple.com>
1424
1425         https://bugs.webkit.org/show_bug.cgi?id=132363
1426         Make Blob RawData immutable
1427
1428         Reviewed by Anders Carlsson.
1429
1430         * Modules/websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData):
1431         Create RawData in one step.
1432
1433         * WebCore.exp.in: Don't export a constructor that we no longer have (and the new one is inline).
1434
1435         * fileapi/Blob.cpp: Removed entirely dead code.
1436
1437         * fileapi/WebKitBlobBuilder.cpp:
1438         * fileapi/WebKitBlobBuilder.h:
1439         Updated to collect data in a plain Vector, so that we don't have to modify RawData.
1440         Removed FIXMEs about renaming - there used to be a BlobBuilder exposed to JS, but
1441         now this is just a helper to implement JS Blob constructor. We should probably
1442         still rename it, but not how the FIXME suggested.
1443
1444         * platform/network/BlobData.cpp:
1445         (WebCore::BlobDataItem::detachFromCurrentThread): RawData::detachFromCurrentThread()
1446         was a no-op.
1447         (WebCore::BlobDataHandle::BlobDataHandle): Deleted. This was entirely dead code.
1448         (WebCore::BlobDataHandle::~BlobDataHandle): Ditto.
1449
1450         * platform/network/BlobData.h: Made RawData immutable.
1451
1452         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob):
1453         Create RawData in one step.
1454
1455 2014-04-30  David Hyatt  <hyatt@apple.com>
1456
1457         [New Multicolumn] Region offset not factored in when mapping to local coords
1458         https://bugs.webkit.org/show_bug.cgi?id=132383
1459
1460         Reviewed by Anders Carlsson.
1461
1462         Make sure to cache the offset of the multicolumn set from its parent and then
1463         add that in to the translation offset.
1464
1465         * rendering/RenderMultiColumnFlowThread.cpp:
1466         (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
1467
1468 2014-04-30  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
1469
1470         Move removeEquivalentProperties functions to EditingStyle
1471         https://bugs.webkit.org/show_bug.cgi?id=131093
1472
1473         Reviewed by Csaba Osztrogonác.
1474
1475         A follow-up to r167967. Use single line declaration for template methods.
1476
1477         * editing/EditingStyle.h:
1478
1479 2014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
1480
1481         [CSS Grid Layout] Enable runtime feature by default
1482         https://bugs.webkit.org/show_bug.cgi?id=132189
1483
1484         Reviewed by Benjamin Poulain.
1485
1486         * page/Settings.in: Set cssGridLayoutEnabled to true.
1487
1488 2014-04-30  Manuel Rego Casasnovas  <rego@igalia.com>
1489
1490         [CSS Grid Layout] Wrap some specific grid code under compilation flag
1491         https://bugs.webkit.org/show_bug.cgi?id=132341
1492
1493         Reviewed by Benjamin Poulain.
1494
1495         Some static variables in RenderBox are only used for CSS Grid Layout code. Wrap them and the related methods
1496         under ENABLE_CSS_GRID_LAYOUT compilation flag.
1497
1498         * rendering/RenderBox.cpp:
1499         (WebCore::RenderBox::willBeDestroyed):
1500         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
1501         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
1502         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
1503         (WebCore::RenderBox::computePercentageLogicalHeight):
1504         * rendering/RenderBox.h:
1505
1506 2014-04-29  Commit Queue  <commit-queue@webkit.org>
1507
1508         Unreviewed, rolling out r167962 and r167975.
1509         https://bugs.webkit.org/show_bug.cgi?id=132376
1510
1511         Mysteriously broke many tests (Requested by ap on #webkit).
1512
1513         Reverted changesets:
1514
1515         "[Mac, iOS] Support caption activation via JS
1516         webkitHasClosedCaptions method"
1517         https://bugs.webkit.org/show_bug.cgi?id=132320
1518         http://trac.webkit.org/changeset/167962
1519
1520         "Unreviewed test fix after r167962."
1521         http://trac.webkit.org/changeset/167975
1522
1523 2014-04-29  David Hyatt  <hyatt@apple.com>
1524
1525         [New Multicolumn] Multiple tests assert in RenderGeometryMap
1526         https://bugs.webkit.org/show_bug.cgi?id=132285
1527
1528         Reviewed by Simon Fraser.
1529
1530         Implement offsetFromContainer for RenderMultiColumnFlowThread so that the
1531         geometry map gets the right offsets. This is really only relevant for the 
1532         geometry map, since I already overrode mapAbsoluteToLocalPoint and multicolumn
1533         flow threads are repaint containers (so mapLocalToAbsolute never needs offsetFromContainer).
1534
1535         * rendering/RenderMultiColumnFlowThread.cpp:
1536         (WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
1537         * rendering/RenderMultiColumnFlowThread.h:
1538
1539 2014-04-29  Benjamin Poulain  <bpoulain@apple.com>
1540
1541         [iOS][WK2] When pageScaleFactor * deviceScaleFactor = 1, the tile grid is completely messed up
1542         https://bugs.webkit.org/show_bug.cgi?id=132368
1543
1544         Reviewed by Simon Fraser.
1545
1546         * platform/graphics/ca/mac/TileController.mm:
1547         (WebCore::TileController::TileController):
1548         The initial device scale factor was initialized to 1. We were returning the wrong zoomedOutContentsScale() and
1549         contentsScale() on retina devices until the next successful scale update.
1550
1551 2014-04-29  Alexey Proskuryakov  <ap@apple.com>
1552
1553         Remove an unused override of BlobRegistryImpl::appendStorageItems
1554         https://bugs.webkit.org/show_bug.cgi?id=132365
1555
1556         Reviewed by Andreas Kling.
1557
1558         * platform/network/BlobRegistryImpl.cpp:
1559         (WebCore::BlobRegistryImpl::appendStorageItems): Deleted.
1560         * platform/network/BlobRegistryImpl.h:
1561
1562 2014-04-29  Eric Carlson  <eric.carlson@apple.com>
1563
1564         [Mac] tag the video layers with descriptive name to aid debugging
1565         https://bugs.webkit.org/show_bug.cgi?id=132371
1566
1567         Reviewed by Darin Adler.
1568
1569         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1570         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Set the AVPlayerLayer
1571             name in a debug build.
1572
1573 2014-04-29  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
1574
1575         [GTK][cmake] CMake variable (non)expansion causing 'File name too long' build error.
1576         https://bugs.webkit.org/show_bug.cgi?id=132244
1577
1578         Reviewed by Martin Robinson.
1579
1580         Removing quotes around include directory variable ${WebCore_INCLUDE_DIRECTORIES} in
1581         the include_directories cmake macro enables the variable to be expanded correctly.
1582
1583         No tests created as this fixes a platform specific build issue.
1584
1585         * PlatformGTK.cmake:
1586
1587 2014-04-29  Brent Fulgham  <bfulgham@apple.com>
1588
1589         Unreviewed test fix after r167962.
1590         * Modules/mediacontrols/mediaControlsApple.css:
1591         (.hidden): Use common '.hidden' class for controls.
1592         (video::-webkit-media-text-track-container .hidden): Deleted.
1593
1594 2014-04-29  Brady Eidson  <beidson@apple.com>
1595
1596         Handle selection services menu.
1597         <rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362
1598
1599         Reviewed by Tim Horton.
1600
1601         * WebCore.exp.in:
1602
1603 2014-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
1604
1605         Removing unused argument in InlineFlowBox::placeBoxesInInlineDirection()
1606         https://bugs.webkit.org/show_bug.cgi?id=132369
1607
1608         Reviewed by Darin Adler.
1609
1610         This was not caught by our compiler because placeBoxesInInlineDirection()
1611         is mutually-recursive with placeBoxRangeInInlineDirection().
1612
1613         No new tests are necessary because there should be no behavior change.
1614
1615         * rendering/InlineFlowBox.cpp:
1616         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
1617         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
1618         * rendering/InlineFlowBox.h:
1619         * rendering/RenderBlockLineLayout.cpp:
1620         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
1621
1622 2014-04-29  Alex Christensen  <achristensen@webkit.org>
1623
1624         [WinCairo] Switch video from GStreamer to Media Foundation.
1625         https://bugs.webkit.org/show_bug.cgi?id=132358
1626
1627         Reviewed by Brent Fulgham.
1628
1629         * WebCore.vcxproj/WebCore.vcxproj:
1630         Removed dependencies on GStreamer.
1631
1632 2014-04-29  Simon Fraser  <simon.fraser@apple.com>
1633
1634         Remove some PLATFORM(IOS) #ifdefs related to hasAcceleratedTouchScrolling()
1635         https://bugs.webkit.org/show_bug.cgi?id=132353
1636
1637         Reviewed by Tim Horton & Darin Adler.
1638
1639         Minor cleanup and refactoring to remove #idefs.
1640
1641         * rendering/RenderLayer.cpp:
1642         (WebCore::RenderLayer::scrollTo): No need for this #ifdef, usesCompositedScrolling()
1643         gives the right answser already.
1644         (WebCore::RenderLayer::visibleContentRectInternal): Use showsOverflowControls() to
1645         avoid #ifdef.
1646         (WebCore::RenderLayer::invalidateScrollbarRect): Ditto.
1647         (WebCore::RenderLayer::invalidateScrollCornerRect): Ditto.
1648         (WebCore::RenderLayer::verticalScrollbarWidth): Ditto.
1649         (WebCore::RenderLayer::horizontalScrollbarHeight): Ditto.
1650         (WebCore::RenderLayer::showsOverflowControls): Return false on iOS.
1651         (WebCore::RenderLayer::paintOverflowControls): Ditto.
1652         (WebCore::RenderLayer::calculateClipRects): Ditto.
1653         * rendering/RenderLayer.h:
1654         * rendering/RenderLayerBacking.cpp:
1655         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
1656         Just #ifdef in side of this function rather than having two similar functions.
1657         (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
1658         (WebCore::hasNonZeroTransformOrigin):
1659         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Use a local bool
1660         to reduce #ifdefs.
1661         (WebCore::layerOrAncestorIsTransformedOrScrolling): Deleted.
1662
1663 2014-04-29  Simon Fraser  <simon.fraser@apple.com>
1664
1665         Remove Settings::compositedScrollingForFramesEnabled
1666         https://bugs.webkit.org/show_bug.cgi?id=132352
1667
1668         Reviewed by Andreas Kling.
1669
1670         The usesCompositedScrolling setting was only used by Chromium, so
1671         remove it and associated code.
1672
1673         * page/FrameView.cpp:
1674         (WebCore::FrameView::usesCompositedScrolling): Deleted.
1675         * page/FrameView.h:
1676         * page/Settings.in:
1677         * rendering/RenderLayerCompositor.cpp:
1678         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
1679
1680 2014-04-29  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
1681
1682         Move removeEquivalentProperties functions to EditingStyle
1683         https://bugs.webkit.org/show_bug.cgi?id=131093
1684
1685         Reviewed by Darin Adler.
1686
1687         Moved the removeEquivalentProperties functions
1688         from StyleProperties to EditingStyle class.
1689
1690         * css/StyleProperties.cpp:
1691         (WebCore::MutableStyleProperties::removeEquivalentProperties): Deleted.
1692         * css/StyleProperties.h:
1693         * editing/EditingStyle.cpp:
1694         (WebCore::EditingStyle::removeStyleAddedByNode):
1695         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
1696         (WebCore::EditingStyle::prepareToApplyAt):
1697         (WebCore::EditingStyle::removeEquivalentProperties):
1698         (WebCore::extractPropertiesNotIn):
1699         * editing/EditingStyle.h:
1700
1701 2014-04-29  David Hyatt  <hyatt@apple.com>
1702
1703         [New Multicolumn] Implement support for compositing
1704         https://bugs.webkit.org/show_bug.cgi?id=132298
1705
1706         Reviewed by Simon Fraser.
1707
1708         * rendering/RenderLayer.cpp:
1709         (WebCore::accumulateOffsetTowardsAncestor):
1710         Add in a case for the new columns that calls into the multi-column flow thread
1711         to get an offset to adjust by.
1712
1713         * rendering/RenderLayerBacking.cpp:
1714         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
1715         Make sure this code only runs for named flow threads.
1716
1717         * rendering/RenderLayerCompositor.cpp:
1718         (WebCore::RenderLayerCompositor::canBeComposited):
1719         Turn on compositing support for in-flow RenderFlowThreads instead of always returning
1720         false
1721
1722         * rendering/RenderMultiColumnFlowThread.cpp:
1723         (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion):
1724         Changed this function to fix a couple of bugs exposed by compositing/columns tests. Its
1725         end goal is the same, but the approach is improved.
1726
1727         * rendering/RenderMultiColumnSet.cpp:
1728         (WebCore::RenderMultiColumnSet::endFlow):
1729         Don't pad out to a multiple of column height. You can't flip around a flow thread
1730         to get back to accurate physical coordinates if bogus padding is introduced. This
1731         seemed to have no effect on any layout tests when removed, so I don't think it 
1732         was really serving any useful purpose.
1733
1734         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
1735         Don't factor in the overall flow thread portion, since this is handled by the callers
1736         now.
1737
1738         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
1739         * rendering/RenderMultiColumnSet.h:
1740         Change this function to be ASSERT_NOT_REACHED(), since we want to know if someone calls
1741         it. It only runs for named flow thread compositing code, so it would be a mistake if
1742         this ever gets invoked.
1743
1744 2014-04-29  Mark Hahnenberg  <mhahnenberg@apple.com>
1745
1746         JSProxies should be cacheable
1747         https://bugs.webkit.org/show_bug.cgi?id=132351
1748
1749         Reviewed by Geoffrey Garen.
1750
1751         No new tests.
1752
1753         Whenever we encounter a proxy in an inline cache we should try to cache on the 
1754         proxy's target instead of giving up.
1755
1756         This patch adds support for a simple "recursive" inline cache if the base object
1757         we're accessing is a pure forwarding proxy. JSGlobalObject and its subclasses 
1758         are the only ones to benefit from this right now.
1759
1760         This is performance neutral on the benchmarks we track. Currently we won't
1761         cache on JSDOMWindow due to HasImpureGetOwnPropertySlot, but this issue will be fixed soon.
1762
1763         * bindings/js/JSDOMWindowShell.h:
1764         (WebCore::JSDOMWindowShell::createStructure):
1765
1766 2014-04-29  Brent Fulgham  <bfulgham@apple.com>
1767
1768         [Mac, iOS] Support caption activation via JS webkitHasClosedCaptions method
1769         https://bugs.webkit.org/show_bug.cgi?id=132320
1770
1771         Reviewed by Eric Carlson.
1772
1773         * Modules/mediacontrols/mediaControlsApple.css:
1774         (video::-webkit-media-text-track-container .hidden): Added.
1775         * html/HTMLMediaElement.cpp:
1776         (WebCore::HTMLMediaElement::configureTextTrackGroup): Added call to
1777         new 'updateCaptionsContainer'.
1778         (WebCore::HTMLMediaElement::updateCaptionContainer): Added.
1779         * html/HTMLMediaElement.h:
1780         * html/shadow/MediaControlElements.cpp:
1781         (WebCore::MediaControlTextTrackContainerElement::hide): Use CSS class .hidden instead of
1782         hard-coded "display:none".
1783         (WebCore::MediaControlTextTrackContainerElement::show): Ditto.
1784         * html/shadow/MediaControlElements.h:
1785
1786 2014-04-28  Roger Fong  <roger_fong@apple.com>
1787
1788         Plugins hidden by images should autoplay.
1789         https://bugs.webkit.org/show_bug.cgi?id=132222.
1790         <rdar://problem/16653536>
1791
1792         Reviewed by Jon Lee and Darin Adler.
1793
1794         * WebCore.exp.in: Add exports needed by WK2.
1795
1796 2014-04-29  Filip Pizlo  <fpizlo@apple.com>
1797
1798         Use LLVM as a backend for the fourth-tier DFG JIT (a.k.a. the FTL JIT)
1799         https://bugs.webkit.org/show_bug.cgi?id=112840
1800
1801         Rubber stamped by Geoffrey Garen.
1802
1803         It already has a lot of tests.
1804
1805         * Configurations/FeatureDefines.xcconfig:
1806
1807 2014-04-29  Brady Eidson  <beidson@apple.com>
1808
1809         Change Image Controls replacement to use selection and paste
1810         <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
1811
1812         Reviewed by Tim Horton.
1813
1814         * WebCore.exp.in: Remove deleted symbol.
1815
1816         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
1817         (WebCore::ImageControlsButtonElementMac::defaultEventHandler):
1818
1819         * page/ContextMenuController.cpp:
1820         (WebCore::ContextMenuController::showImageControlsMenu): Select the image element
1821           before showing the menu.
1822         (WebCore::ContextMenuController::replaceControlledImage): Deleted.
1823         * page/ContextMenuController.h:
1824
1825 2014-04-29  Jer Noble  <jer.noble@apple.com>
1826
1827         [iOS] Remove workaround for <rdar://problem/16578727>.
1828         https://bugs.webkit.org/show_bug.cgi?id=132338
1829
1830         Reviewed by Darin Adler.
1831
1832         Now that <rdar://problem/16578727> is fixed, remove the workaround by replacing the
1833         call to -_updatePlaybackControlsViewController with one to -layoutIfNeeded.
1834
1835         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1836         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
1837
1838 2014-04-29  Zan Dobersek  <zdobersek@igalia.com>
1839
1840         ScriptExecutionContext::Task should work well with C++11 lambdas
1841         https://bugs.webkit.org/show_bug.cgi?id=129795
1842
1843         Reviewed by Darin Adler.
1844
1845         Instead of having classes that subclass ScriptExecutionContext::Task and override
1846         the performTask(ScriptExecutionContext*) method, have the ScriptExecutionContext::Task
1847         take in a std::function<void (ScriptExecutionContext*)>-like object trough the constructor
1848         which would contain the code currently kept in the performTask() methods.
1849
1850         This enables inlining C++11 lambdas into ScriptExecutionContext::postTask() calls. For
1851         cleanup tasks, the Task object can be implicitly constructed by using the initializer list
1852         constructor with the first argument being the ScriptExecutionContext::Task::CleanupTask tag.
1853         The ScriptExecutionContext class remains non-copyable and now stores the passed-in invokable
1854         object in the std::function wrapper, along with a boolean member that indicates whether the
1855         task is of cleanup nature.
1856
1857         * Modules/quota/StorageErrorCallback.cpp:
1858         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
1859         (WebCore::StorageErrorCallback::CallbackTask::performTask): Deleted.
1860         * Modules/quota/StorageErrorCallback.h:
1861         (WebCore::StorageErrorCallback::CallbackTask::create): Deleted.
1862         * Modules/webdatabase/Database.cpp:
1863         (WebCore::Database::~Database):
1864         (WebCore::Database::runTransaction):
1865         (WebCore::Database::scheduleTransactionCallback):
1866         (WebCore::DerefContextTask::create): Deleted.
1867         (WebCore::DerefContextTask::performTask): Deleted.
1868         (WebCore::DerefContextTask::isCleanupTask): Deleted.
1869         (WebCore::DerefContextTask::DerefContextTask): Deleted.
1870         (WebCore::callTransactionErrorCallback): Deleted.
1871         (WebCore::DeliverPendingCallbackTask::create): Deleted.
1872         (WebCore::DeliverPendingCallbackTask::performTask): Deleted.
1873         (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask): Deleted.
1874         * Modules/webdatabase/DatabaseManager.cpp:
1875         (WebCore::DatabaseManager::openDatabase):
1876         (WebCore::DatabaseCreationCallbackTask::create): Deleted.
1877         (WebCore::DatabaseCreationCallbackTask::performTask): Deleted.
1878         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask): Deleted.
1879         * Modules/webdatabase/DatabaseSync.cpp:
1880         (WebCore::CloseSyncDatabaseOnContextThreadTask::create): Deleted.
1881         (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask): Deleted.
1882         (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask): Deleted.
1883         * Modules/webdatabase/SQLCallbackWrapper.h:
1884         (WebCore::SQLCallbackWrapper::clear):
1885         (WebCore::SQLCallbackWrapper::SafeReleaseTask::create): Deleted.
1886         (WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask): Deleted.
1887         (WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask): Deleted.
1888         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask): Deleted.
1889         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1890         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
1891         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
1892         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
1893         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
1894         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
1895         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
1896         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
1897         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
1898         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1899         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1900         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
1901         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
1902         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
1903         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create): Deleted.
1904         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask): Deleted.
1905         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask): Deleted.
1906         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1907         * bindings/js/JSCallbackData.h:
1908         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
1909         (WebCore::DeleteCallbackDataTask::create): Deleted.
1910         (WebCore::DeleteCallbackDataTask::performTask): Deleted.
1911         (WebCore::DeleteCallbackDataTask::isCleanupTask): Deleted.
1912         * bindings/js/JSDOMGlobalObjectTask.cpp:
1913         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
1914         (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask): Deleted.
1915         (WebCore::JSGlobalObjectTask::performTask): Deleted.
1916         * bindings/js/JSDOMGlobalObjectTask.h:
1917         * bindings/js/JSDOMWindowBase.cpp:
1918         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1919         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1920         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1921         * bindings/scripts/CodeGeneratorJS.pm:
1922         * bindings/scripts/test/JS/JSTestCallback.cpp:
1923         (WebCore::JSTestCallback::~JSTestCallback):
1924         (GenerateCallbackImplementation):
1925         * dom/CrossThreadTask.h:
1926         (WebCore::CrossThreadTask1::performTask):
1927         (WebCore::CrossThreadTask2::performTask):
1928         (WebCore::CrossThreadTask3::performTask):
1929         (WebCore::CrossThreadTask4::performTask):
1930         (WebCore::CrossThreadTask5::performTask):
1931         (WebCore::CrossThreadTask6::performTask):
1932         (WebCore::CrossThreadTask7::performTask):
1933         (WebCore::CrossThreadTask8::performTask):
1934         (WebCore::createCallbackTask):
1935         (WebCore::CrossThreadTask1::create): Deleted.
1936         (WebCore::CrossThreadTask2::create): Deleted.
1937         (WebCore::CrossThreadTask3::create): Deleted.
1938         (WebCore::CrossThreadTask4::create): Deleted.
1939         (WebCore::CrossThreadTask5::create): Deleted.
1940         (WebCore::CrossThreadTask6::create): Deleted.
1941         (WebCore::CrossThreadTask7::create): Deleted.
1942         (WebCore::CrossThreadTask8::create): Deleted.
1943         * dom/Document.cpp:
1944         (WebCore::Document::addConsoleMessage):
1945         (WebCore::Document::addMessage):
1946         (WebCore::Document::postTask):
1947         (WebCore::Document::pendingTasksTimerFired):
1948         (WebCore::PerformTaskContext::PerformTaskContext): Deleted.
1949         (WebCore::Document::didReceiveTask): Deleted.
1950         * dom/Document.h:
1951         * dom/ScriptExecutionContext.cpp:
1952         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
1953         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1954         (WebCore::ProcessMessagesSoonTask::create): Deleted.
1955         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask): Deleted.
1956         (WebCore::ScriptExecutionContext::Task::~Task): Deleted.
1957         * dom/ScriptExecutionContext.h:
1958         (WebCore::ScriptExecutionContext::Task::Task):
1959         (WebCore::ScriptExecutionContext::Task::performTask):
1960         (WebCore::ScriptExecutionContext::Task::isCleanupTask):
1961         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
1962         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create): Deleted.
1963         * dom/StringCallback.cpp:
1964         (WebCore::StringCallback::scheduleCallback):
1965         * loader/appcache/ApplicationCacheGroup.cpp:
1966         (WebCore::ApplicationCacheGroup::postListenerTask):
1967         (WebCore::CallCacheListenerTask::create): Deleted.
1968         (WebCore::CallCacheListenerTask::CallCacheListenerTask): Deleted.
1969         * workers/DefaultSharedWorkerRepository.cpp:
1970         (WebCore::SharedWorkerProxy::postTaskToLoader):
1971         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
1972         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
1973         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
1974         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
1975         (WebCore::SharedWorkerConnectTask::create): Deleted.
1976         (WebCore::SharedWorkerConnectTask::performTask): Deleted.
1977         * workers/WorkerEventQueue.cpp:
1978         (WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher):
1979         (WebCore::WorkerEventQueue::EventDispatcher::~EventDispatcher):
1980         (WebCore::WorkerEventQueue::EventDispatcher::dispatch):
1981         (WebCore::WorkerEventQueue::enqueueEvent):
1982         (WebCore::WorkerEventQueue::cancelEvent):
1983         (WebCore::WorkerEventQueue::close):
1984         * workers/WorkerEventQueue.h:
1985         * workers/WorkerGlobalScope.cpp:
1986         (WebCore::WorkerGlobalScope::close):
1987         (WebCore::WorkerGlobalScope::postTask):
1988         (WebCore::WorkerGlobalScope::addConsoleMessage):
1989         (WebCore::WorkerGlobalScope::addMessage):
1990         (WebCore::CloseWorkerGlobalScopeTask::create): Deleted.
1991         (WebCore::CloseWorkerGlobalScopeTask::performTask): Deleted.
1992         (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask): Deleted.
1993         * workers/WorkerGlobalScope.h:
1994         * workers/WorkerLoaderProxy.h:
1995         * workers/WorkerMessagingProxy.cpp:
1996         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
1997         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
1998         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
1999         (WebCore::WorkerMessagingProxy::postTaskToLoader):
2000         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
2001         (WebCore::WorkerMessagingProxy::workerThreadCreated):
2002         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
2003         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
2004         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
2005         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2006         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
2007         (WebCore::WorkerMessagingProxy::reportPendingActivity):
2008         (WebCore::MessageWorkerGlobalScopeTask::create): Deleted.
2009         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask): Deleted.
2010         (WebCore::MessageWorkerGlobalScopeTask::performTask): Deleted.
2011         (WebCore::MessageWorkerTask::create): Deleted.
2012         (WebCore::MessageWorkerTask::MessageWorkerTask): Deleted.
2013         (WebCore::MessageWorkerTask::performTask): Deleted.
2014         (WebCore::WorkerExceptionTask::create): Deleted.
2015         (WebCore::WorkerExceptionTask::WorkerExceptionTask): Deleted.
2016         (WebCore::WorkerExceptionTask::performTask): Deleted.
2017         (WebCore::WorkerGlobalScopeDestroyedTask::create): Deleted.
2018         (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask): Deleted.
2019         (WebCore::WorkerGlobalScopeDestroyedTask::performTask): Deleted.
2020         (WebCore::WorkerTerminateTask::create): Deleted.
2021         (WebCore::WorkerTerminateTask::WorkerTerminateTask): Deleted.
2022         (WebCore::WorkerTerminateTask::performTask): Deleted.
2023         (WebCore::WorkerThreadActivityReportTask::create): Deleted.
2024         (WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask): Deleted.
2025         (WebCore::WorkerThreadActivityReportTask::performTask): Deleted.
2026         (WebCore::PostMessageToPageInspectorTask::create): Deleted.
2027         (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): Deleted.
2028         (WebCore::PostMessageToPageInspectorTask::performTask): Deleted.
2029         (WebCore::NotifyNetworkStateChangeTask::create): Deleted.
2030         (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask): Deleted.
2031         (WebCore::NotifyNetworkStateChangeTask::performTask): Deleted.
2032         * workers/WorkerMessagingProxy.h:
2033         * workers/WorkerRunLoop.cpp:
2034         (WebCore::WorkerRunLoop::postTask):
2035         (WebCore::WorkerRunLoop::postTaskAndTerminate):
2036         (WebCore::WorkerRunLoop::postTaskForMode):
2037         (WebCore::WorkerRunLoop::Task::create):
2038         (WebCore::WorkerRunLoop::Task::performTask):
2039         (WebCore::WorkerRunLoop::Task::Task):
2040         * workers/WorkerRunLoop.h:
2041         * workers/WorkerThread.cpp:
2042         (WebCore::WorkerThread::stop):
2043         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
2044         (WebCore::WorkerThreadShutdownFinishTask::create): Deleted.
2045         (WebCore::WorkerThreadShutdownFinishTask::performTask): Deleted.
2046         (WebCore::WorkerThreadShutdownFinishTask::isCleanupTask): Deleted.
2047         (WebCore::WorkerThreadShutdownStartTask::create): Deleted.
2048         (WebCore::WorkerThreadShutdownStartTask::performTask): Deleted.
2049         (WebCore::WorkerThreadShutdownStartTask::isCleanupTask): Deleted.
2050
2051 2014-04-29  Manuel Rego Casasnovas  <rego@igalia.com>
2052
2053         REGRESSION (r167879): Heap-use-after-free in WebCore::RenderFlexibleBox
2054         https://bugs.webkit.org/show_bug.cgi?id=132337
2055
2056         Reviewed by Simon Fraser.
2057
2058         From Blink r154582 by <jchaffraix@chromium.org>
2059
2060         This is a regression from the changes in OrderIterator. The issue is
2061         that we don't invalidate our iterator when a child is removed. This
2062         means that we could hold onto free'd memory until the next layout
2063         when we will recompute the iterator.
2064
2065         The solution is simple: just clear the memory when we remove a child.
2066
2067         Note that RenderGrid is not impacted by this bug as we don't use the
2068         iterator outside layout yet, but if we do it at some point the very same
2069         problem will arise, so the same treatment was applied to the class.
2070
2071         Test: fast/flexbox/order-iterator-crash.html
2072
2073         * rendering/OrderIterator.cpp:
2074         (WebCore::OrderIterator::invalidate): Clear m_children Vector.
2075         * rendering/OrderIterator.h:
2076         (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): Use
2077         invalidate() method.
2078         * rendering/RenderFlexibleBox.cpp:
2079         (WebCore::RenderFlexibleBox::removeChild): Invalidate m_orderIterator.
2080         * rendering/RenderFlexibleBox.h: Add removeChild() signature.
2081         * rendering/RenderGrid.cpp: Invalidate m_orderIterator.
2082         (WebCore::RenderGrid::removeChild):
2083         * rendering/RenderGrid.h: Add removeChild() header.
2084
2085 2014-04-29  Enrica Casucci  <enrica@apple.com>
2086
2087         iOS build fix after http://trac.webkit.org/changeset/167937.
2088         Unreviewed.
2089
2090         * rendering/RenderThemeIOS.mm:
2091         (WebCore::RenderThemeIOS::adjustButtonStyle):
2092
2093 2014-04-29  Hans Muller  <hmuller@adobe.com>
2094
2095         [CSS Shapes] off-by-one error in Shape::createRasterShape()
2096         https://bugs.webkit.org/show_bug.cgi?id=132154
2097
2098         Reviewed by Bem Jones-Bey.
2099
2100         This is a port of a patch for a bug that was reported by and fixed in Blink by
2101         David Vest: https://codereview.chromium.org/237123002/.  Shape::createRasterShape()
2102         now consistently reports "end-point exclusive" intervals. Before the patch
2103         an entire row of pixels was above the shape-image-threshold, the interval's end
2104         index was reported as image.width. Now it's image.width + 1, which is consistent
2105         with the way the end index is reported if the last above threshold pixel is within
2106         an image row.
2107
2108         Two existing tests were revised to account for this change.
2109
2110         * rendering/shapes/RasterShape.cpp:
2111         (WebCore::RasterShape::getExcludedIntervals):
2112         * rendering/shapes/Shape.cpp:
2113         (WebCore::Shape::createRasterShape):
2114
2115 2014-04-29  Bem Jones-Bey  <bjonesbe@adobe.com>
2116
2117         Wrap CSS length conversion arguments in an object
2118         https://bugs.webkit.org/show_bug.cgi?id=131552
2119
2120         Reviewed by Andreas Kling.
2121
2122         This patch introduces a class CSSToLengthConversionData to wrap the
2123         data required to convert CSS lengths to Lengths. This simplifies the
2124         plumbing that goes on whenever we need to resolve CSS lengths and
2125         makes it easier to update the arguments needed for resolving these (in
2126         particular adding a RenderView for resolving viewport units at style
2127         recalc time; removing the computingFontSize bool also appears
2128         possible).
2129
2130         Note that the zoom argument, which was previously a float in some
2131         places and a double in others is now a float.
2132
2133         This is a port of a Blink patch by timloh@chromium.org.
2134
2135         No new tests, no behavior change.
2136
2137         * CMakeLists.txt:
2138         * WebCore.vcxproj/WebCore.vcxproj:
2139         * WebCore.xcodeproj/project.pbxproj:
2140         * css/BasicShapeFunctions.cpp:
2141         (WebCore::convertToLength):
2142         (WebCore::convertToLengthSize):
2143         (WebCore::convertToCenterCoordinate):
2144         (WebCore::cssValueToBasicShapeRadius):
2145         (WebCore::basicShapeForValue):
2146         * css/BasicShapeFunctions.h:
2147         * css/CSSCalculationValue.cpp:
2148         (WebCore::CSSCalcValue::computeLengthPx):
2149         (WebCore::determineCategory):
2150         * css/CSSCalculationValue.h:
2151         (WebCore::CSSCalcValue::createCalculationValue):
2152         * css/CSSGradientValue.cpp:
2153         (WebCore::CSSGradientValue::addStops):
2154         (WebCore::positionFromValue):
2155         (WebCore::CSSGradientValue::computeEndPoint):
2156         (WebCore::CSSLinearGradientValue::createGradient):
2157         (WebCore::CSSRadialGradientValue::resolveRadius):
2158         (WebCore::CSSRadialGradientValue::createGradient):
2159         * css/CSSGradientValue.h:
2160         * css/CSSPrimitiveValue.cpp:
2161         (WebCore::CSSPrimitiveValue::computeLength):
2162         (WebCore::CSSPrimitiveValue::computeLengthDouble):
2163         * css/CSSPrimitiveValue.h:
2164         * css/CSSPrimitiveValueMappings.h:
2165         (WebCore::CSSPrimitiveValue::convertToLength):
2166         * css/CSSToLengthConversionData.cpp: Added.
2167         (WebCore::CSSToLengthConversionData::zoom):
2168         * css/CSSToLengthConversionData.h: Added.
2169         (WebCore::CSSToLengthConversionData::CSSToLengthConversionData):
2170         (WebCore::CSSToLengthConversionData::style):
2171         (WebCore::CSSToLengthConversionData::rootStyle):
2172         (WebCore::CSSToLengthConversionData::computingFontSize):
2173         (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom):
2174         * css/CSSToStyleMap.cpp:
2175         (WebCore::CSSToStyleMap::CSSToStyleMap):
2176         (WebCore::CSSToStyleMap::mapFillSize):
2177         (WebCore::CSSToStyleMap::mapFillXPosition):
2178         (WebCore::CSSToStyleMap::mapFillYPosition):
2179         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
2180         * css/CSSToStyleMap.h:
2181         (WebCore::CSSToStyleMap::CSSToStyleMap): Deleted.
2182         * css/DeprecatedStyleBuilder.cpp:
2183         (WebCore::ApplyPropertyAuto::applyValue):
2184         (WebCore::ApplyPropertyClip::convertToLength):
2185         (WebCore::ApplyPropertyLength::applyValue):
2186         (WebCore::ApplyPropertyBorderRadius::applyValue):
2187         (WebCore::ApplyPropertyComputeLength::applyValue):
2188         (WebCore::ApplyPropertyFontSize::applyValue):
2189         (WebCore::csstoLengthConversionDataWithTextZoomFactor):
2190         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
2191         (WebCore::ApplyPropertyLineHeight::applyValue):
2192         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue):
2193         (WebCore::ApplyPropertyWordSpacing::applyValue):
2194         (WebCore::ApplyPropertyPageSize::mmLength):
2195         (WebCore::ApplyPropertyPageSize::inchLength):
2196         (WebCore::ApplyPropertyPageSize::applyValue):
2197         (WebCore::ApplyPropertyVerticalAlign::applyValue):
2198         (WebCore::ApplyPropertyClipPath::applyValue):
2199         (WebCore::ApplyPropertyShape::applyValue):
2200         (WebCore::ApplyPropertyTextIndent::applyValue):
2201         * css/MediaQueryEvaluator.cpp:
2202         (WebCore::colorMediaFeatureEval):
2203         (WebCore::color_indexMediaFeatureEval):
2204         (WebCore::monochromeMediaFeatureEval):
2205         (WebCore::orientationMediaFeatureEval):
2206         (WebCore::aspect_ratioMediaFeatureEval):
2207         (WebCore::device_aspect_ratioMediaFeatureEval):
2208         (WebCore::device_pixel_ratioMediaFeatureEval):
2209         (WebCore::resolutionMediaFeatureEval):
2210         (WebCore::gridMediaFeatureEval):
2211         (WebCore::computeLength):
2212         (WebCore::device_heightMediaFeatureEval):
2213         (WebCore::device_widthMediaFeatureEval):
2214         (WebCore::heightMediaFeatureEval):
2215         (WebCore::widthMediaFeatureEval):
2216         (WebCore::min_colorMediaFeatureEval):
2217         (WebCore::max_colorMediaFeatureEval):
2218         (WebCore::min_color_indexMediaFeatureEval):
2219         (WebCore::max_color_indexMediaFeatureEval):
2220         (WebCore::min_monochromeMediaFeatureEval):
2221         (WebCore::max_monochromeMediaFeatureEval):
2222         (WebCore::min_aspect_ratioMediaFeatureEval):
2223         (WebCore::max_aspect_ratioMediaFeatureEval):
2224         (WebCore::min_device_aspect_ratioMediaFeatureEval):
2225         (WebCore::max_device_aspect_ratioMediaFeatureEval):
2226         (WebCore::min_device_pixel_ratioMediaFeatureEval):
2227         (WebCore::max_device_pixel_ratioMediaFeatureEval):
2228         (WebCore::min_heightMediaFeatureEval):
2229         (WebCore::max_heightMediaFeatureEval):
2230         (WebCore::min_widthMediaFeatureEval):
2231         (WebCore::max_widthMediaFeatureEval):
2232         (WebCore::min_device_heightMediaFeatureEval):
2233         (WebCore::max_device_heightMediaFeatureEval):
2234         (WebCore::min_device_widthMediaFeatureEval):
2235         (WebCore::max_device_widthMediaFeatureEval):
2236         (WebCore::min_resolutionMediaFeatureEval):
2237         (WebCore::max_resolutionMediaFeatureEval):
2238         (WebCore::animationMediaFeatureEval):
2239         (WebCore::transitionMediaFeatureEval):
2240         (WebCore::transform_2dMediaFeatureEval):
2241         (WebCore::transform_3dMediaFeatureEval):
2242         (WebCore::view_modeMediaFeatureEval):
2243         (WebCore::video_playable_inlineMediaFeatureEval):
2244         (WebCore::hoverMediaFeatureEval):
2245         (WebCore::pointerMediaFeatureEval):
2246         (WebCore::MediaQueryEvaluator::eval):
2247         * css/SVGCSSStyleSelector.cpp:
2248         (WebCore::StyleResolver::applySVGProperty):
2249         * css/StyleResolver.cpp:
2250         (WebCore::StyleResolver::State::clear):
2251         (WebCore::StyleResolver::State::initForStyleResolve):
2252         (WebCore::StyleResolver::convertToIntLength):
2253         (WebCore::StyleResolver::convertToFloatLength):
2254         (WebCore::createGridTrackBreadth):
2255         (WebCore::StyleResolver::applyProperty):
2256         (WebCore::StyleResolver::createFilterOperations):
2257         * css/StyleResolver.h:
2258         (WebCore::StyleResolver::State::setStyle):
2259         (WebCore::StyleResolver::State::cssToLengthConversionData):
2260         * css/TransformFunctions.cpp:
2261         (WebCore::convertToFloatLength):
2262         (WebCore::transformsForValue):
2263         * css/TransformFunctions.h:
2264         * css/WebKitCSSMatrix.cpp:
2265         (WebCore::WebKitCSSMatrix::setMatrixValue):
2266         * rendering/RenderThemeIOS.mm:
2267         (WebCore::applyCommonButtonPaddingToStyle):
2268         (WebCore::RenderThemeIOS::adjustButtonStyle):
2269
2270 2014-04-29  Zoltan Horvath  <zoltan@webkit.org>
2271
2272         [CSS Shapes] complex calc args for inset round vanish
2273         https://bugs.webkit.org/show_bug.cgi?id=132293
2274
2275         Reviewed by Bem Jones-Bey.
2276
2277         In order to use calc in the rounded parameters for inset shapes, we need
2278         to pass RenderStyle for the value creation as we did for the width arguments.
2279         Without taking RenderStyle into account, we hit an assert not reache
2280         in CSSPrimitiveValue::init in the debug builds.
2281
2282         I've added new parsing test.
2283
2284         * css/BasicShapeFunctions.cpp:
2285         (WebCore::valueForBasicShape):
2286         * css/CSSPrimitiveValue.cpp:
2287         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2288         (WebCore::CSSPrimitiveValue::init):
2289         * css/CSSPrimitiveValue.h:
2290         (WebCore::CSSPrimitiveValue::create):
2291         * css/CSSValuePool.h:
2292         (WebCore::CSSValuePool::createValue):
2293
2294 2014-04-29  Zoltan Horvath  <zoltan@webkit.org>
2295
2296         [CSS Shapes] complex calc values for shape-margin return null for computed style
2297         https://bugs.webkit.org/show_bug.cgi?id=132313
2298
2299         Reviewed by Bem Jones-Bey.
2300
2301         We need to pass RenderStyle* to the cssValuePool when parsing
2302         shape-margin in order to use calc() as a parameter.
2303
2304         I've added the new test case to parsing-shape-margin.html
2305
2306         * css/CSSComputedStyleDeclaration.cpp:
2307         (WebCore::ComputedStyleExtractor::propertyValue):
2308
2309 2014-04-29  Chris Fleizach  <cfleizach@apple.com>
2310
2311         AX: Row span info is wrong for table cells when a footer section is placed above a body section
2312         https://bugs.webkit.org/show_bug.cgi?id=131832
2313
2314         Reviewed by Mario Sanchez Prada.
2315
2316         If a <footer> section is placed before the body, it renders AX row information and order incorrectly.
2317         This also affects ARIA tables because they add their children by looking at renderer children, instead
2318         interrogating the RenderTable directly.
2319
2320         Test: accessibility/table-with-footer-section-above-body.html
2321
2322         * accessibility/AccessibilityARIAGrid.cpp:
2323         (WebCore::AccessibilityARIAGrid::addTableCellChild):
2324         (WebCore::AccessibilityARIAGrid::addChildren):
2325         * accessibility/AccessibilityTable.cpp:
2326         (WebCore::AccessibilityTable::addChildren):
2327         (WebCore::AccessibilityTable::addChildrenFromSection):
2328         * accessibility/AccessibilityTable.h:
2329         * accessibility/AccessibilityTableCell.cpp:
2330         (WebCore::AccessibilityTableCell::rowIndexRange):
2331         (WebCore::AccessibilityTableCell::columnIndexRange):
2332
2333 2014-04-29  Chris Fleizach  <cfleizach@apple.com>
2334
2335         AX: SpeechSynthesisUtterance cannot addEventListener
2336         https://bugs.webkit.org/show_bug.cgi?id=132321
2337
2338         Reviewed by Mario Sanchez Prada.
2339
2340         Modified an existing test (speech-synthesis-speak.html) to use addEventTarget.
2341
2342         * Modules/speech/SpeechSynthesisUtterance.idl:
2343
2344 2014-04-29  Hans Muller  <hmuller@adobe.com>
2345
2346         [CSS Shapes] shape-outside polygon fails when first vertex is 0,0
2347         https://bugs.webkit.org/show_bug.cgi?id=132132
2348
2349         Reviewed by Bem Jones-Bey.
2350
2351         ShapeInterval now distinguishes between x1==x2 - isEmpty() and x1,x2 haven't been
2352         set yet - isUndefined(). Removed the ShapeInterval setX1() and setX2() methods, since
2353         they're no longer used.
2354
2355         The polygon algorithm for computing excluded intervals now ignores horizontal
2356         edges. It also ignores edges whose lower vertex matches the top of the line, if
2357         the edge's Y direction is upwards (away from the top of the line). The rationale
2358         for this was explained here:
2359         http://hansmuller-webkit.blogspot.com/2012/11/revised-horizontal-box-algorithm.html
2360
2361         Test: fast/shapes/shape-outside-floats/shape-outside-polygon-zero-vertex.html
2362
2363         * rendering/shapes/PolygonShape.cpp:
2364         (WebCore::OffsetPolygonEdge::clippedEdgeXRange):
2365         (WebCore::PolygonShape::getExcludedIntervals):
2366         * rendering/shapes/ShapeInterval.h:
2367         (WebCore::ShapeInterval::ShapeInterval):
2368         (WebCore::ShapeInterval::isUndefined):
2369         (WebCore::ShapeInterval::x1):
2370         (WebCore::ShapeInterval::x2):
2371         (WebCore::ShapeInterval::width):
2372         (WebCore::ShapeInterval::isEmpty):
2373         (WebCore::ShapeInterval::setX1):
2374         (WebCore::ShapeInterval::setX2):
2375         (WebCore::ShapeInterval::overlaps):
2376         (WebCore::ShapeInterval::contains):
2377         (WebCore::ShapeInterval::unite):
2378
2379 2014-04-29  Andrei Bucur  <abucur@adobe.com>
2380
2381         [CSS Regions] Fix getClientRects() for content nodes
2382         https://bugs.webkit.org/show_bug.cgi?id=117407
2383
2384         Reviewed by David Hyatt.
2385
2386         This patch modifies getClientRects() to return a list of fragments
2387         for a fragmented box instead of a single rectangle positioned inside
2388         the region where the box center would appear.
2389
2390         The approach is to split the border box of the element in regions using
2391         the layout positioning. Then each fragment is mapped to the view coordinates
2392         and the result added to the list of rectangles. To preserve the originating
2393         region when mapping the fragment through the ancestor tree I've introduced
2394         the concept of a current region. The current region is stored inside a
2395         CurrentRenderRegionMaintainer object, created whenever an algorithm needing
2396         it needs to run. When the maintainer is destroyed, the cleanup is made
2397         automatically. The RenderFlowThread holds a pointer to this structure for
2398         easy access.
2399
2400         Tests: fast/regions/cssom/client-rects-fixed-content.html
2401                fast/regions/cssom/client-rects-forced-breaks.html
2402                fast/regions/cssom/client-rects-inline-complex.html
2403                fast/regions/cssom/client-rects-inline.html
2404                fast/regions/cssom/client-rects-nested-regions.html
2405                fast/regions/cssom/client-rects-positioned.html
2406                fast/regions/cssom/client-rects-relative-position.html
2407                fast/regions/cssom/client-rects-simple-block.html
2408                fast/regions/cssom/client-rects-transforms.html
2409                fast/regions/cssom/client-rects-unsplittable-float.html
2410
2411         * rendering/RenderBlock.cpp:
2412         (WebCore::RenderBlock::absoluteQuads): Split the box in fragments.
2413         * rendering/RenderBox.cpp:
2414         (WebCore::RenderBox::absoluteQuads): Split the box in fragments.
2415         * rendering/RenderFlowThread.cpp:
2416         (WebCore::RenderFlowThread::RenderFlowThread):
2417         (WebCore::RenderFlowThread::mapFromFlowToRegion):
2418         (WebCore::RenderFlowThread::mapLocalToContainer):
2419         (WebCore::RenderFlowThread::currentRegion):
2420         * rendering/RenderFlowThread.h:
2421         * rendering/RenderNamedFlowFragment.cpp:
2422         (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion): Get
2423         the fragments for this box in the region.
2424         * rendering/RenderNamedFlowFragment.h:
2425         * rendering/RenderNamedFlowThread.cpp:
2426         (WebCore::RenderNamedFlowThread::absoluteQuadsForBox): Virtual function
2427         that can be used to implement fragments to client rects mapping.
2428         * rendering/RenderNamedFlowThread.h:
2429         * rendering/RenderRegion.cpp:
2430         (WebCore::RenderRegion::rectFlowPortionForBox): Small change to correctly
2431         map empty rectangles to containers.
2432         (WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer):
2433         (WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer):
2434         * rendering/RenderRegion.h:
2435         (WebCore::RenderRegion::absoluteQuadsForBoxInRegion):
2436         (WebCore::CurrentRenderRegionMaintainer::region):
2437
2438 2014-04-29  Andrei Bucur  <abucur@adobe.com>
2439
2440         Store the containing region map inside the flow thread
2441         https://bugs.webkit.org/show_bug.cgi?id=131647
2442
2443         Reviewed by Mihnea Ovidenie.
2444
2445         The patch moves the containing region map inside the flow thread where
2446         it can be better handled in case the region chain changes and the map
2447         needs to be cleared.
2448
2449         As a result of this move we are able to also cleanup the lines region
2450         information of a block flow when it is removed from the tree.
2451
2452         Test: fast/regions/inline-strike-through.html
2453
2454         * rendering/InlineFlowBox.h:
2455         (WebCore::InlineFlowBox::InlineFlowBox):
2456         * rendering/RenderBlockLineLayout.cpp:
2457         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
2458         * rendering/RenderFlowThread.cpp:
2459         (WebCore::RenderFlowThread::removeFlowChildInfo):
2460         (WebCore::RenderFlowThread::invalidateRegions):
2461         (WebCore::RenderFlowThread::removeLineRegionInfo):
2462         (WebCore::RenderFlowThread::checkLinesConsistency):
2463         (WebCore::RenderFlowThread::containingRegionMap):
2464         * rendering/RenderFlowThread.h:
2465         * rendering/RootInlineBox.cpp:
2466         (WebCore::containingRegionMap):
2467         (WebCore::RootInlineBox::~RootInlineBox):
2468         (WebCore::RootInlineBox::paint):
2469         (WebCore::RootInlineBox::containingRegion):
2470         (WebCore::RootInlineBox::clearContainingRegion):
2471         (WebCore::RootInlineBox::setContainingRegion):
2472
2473 2014-04-28  Benjamin Poulain  <benjamin@webkit.org>
2474
2475         SelectorCodeGenerator::generateElementIsNthChild() leaks the parent register :nth-child() is non-filtering
2476         https://bugs.webkit.org/show_bug.cgi?id=132311
2477
2478         Reviewed by Andreas Kling.
2479
2480         In two cases, the parent register was never returned to the register allocator:
2481         -Non filtering selectors (the early return).
2482         -Non marking selectors (at the moment: only querySelector API).
2483
2484         Unfortunately, generateElementIsNthChild() makes function call, which forces us to do this manual allocation
2485         of the parentElement register. Long term, I want RegisterAllocator and FunctionCall to have a special type for that.
2486
2487         Test: fast/selectors/several-nth-child.html
2488
2489         * cssjit/SelectorCompiler.cpp:
2490         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2491
2492 2014-04-28  Yusuke Suzuki  <utatane.tea@gmail.com>
2493
2494         CSS JIT: backtracking with current / parent element for child
2495         https://bugs.webkit.org/show_bug.cgi?id=132057
2496
2497         Reviewed by Benjamin Poulain.
2498
2499         Calculate appropriate backtracking start height from the closest
2500         descendant. And at first, we use it for a simple optimization.
2501
2502         1. When backtracking start height equals to current height, we
2503         can simply jump to a descendant element check phase.
2504         2. When backtracking start height equals to current height + 1, we
2505         can simply jump to a descendant element traversing phase.
2506
2507         We can apply this optimization to fragments with adjacent combinators.
2508         But, in the meantime, we start to implement it for a fragment with
2509         child combinator.
2510
2511         * cssjit/SelectorCompiler.cpp:
2512         (WebCore::SelectorCompiler::SelectorFragment::SelectorFragment):
2513         (WebCore::SelectorCompiler::TagNamePattern::TagNamePattern):
2514         (WebCore::SelectorCompiler::solveDescendantBacktrackingActionForChild):
2515         (WebCore::SelectorCompiler::solveBacktrackingAction):
2516         (WebCore::SelectorCompiler::equalTagNames):
2517         (WebCore::SelectorCompiler::equalTagNamePatterns):
2518         (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant):
2519         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
2520         (WebCore::SelectorCompiler::requiresAdjacentTail):
2521         (WebCore::SelectorCompiler::requiresDescendantTail):
2522         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
2523         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2524         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentNode):
2525         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElement):
2526         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
2527         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAncestorTreeWalker):
2528         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
2529         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
2530         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2531
2532 2014-04-28  Benjamin Poulain  <bpoulain@apple.com>
2533
2534         [iOS][WK2] Restore the scroll position and scale from the HistoryItem (mostly)
2535         https://bugs.webkit.org/show_bug.cgi?id=132307
2536
2537         Reviewed by Simon Fraser.
2538
2539         * WebCore.exp.in:
2540
2541 2014-04-28  Beth Dakin  <bdakin@apple.com>
2542
2543         Scrollbars do not update properly when topContentInset changes dynamically
2544         https://bugs.webkit.org/show_bug.cgi?id=132309
2545         -and corresponding-
2546         <rdar://problem/16642232>
2547
2548         Reviewed by Tim Horton.
2549
2550         It is not sufficient to do a layout and call updateScrollbars(). We must also call 
2551         RenderLayerCompositor::frameViewDidChangeSize() in order to properly adjust the 
2552         size and position of all of the scrolling-related layers.
2553         * page/FrameView.cpp:
2554         (WebCore::FrameView::topContentInsetDidChange):
2555
2556 2014-04-28  David Hyatt  <hyatt@apple.com>
2557
2558         [New Multicolumn] event.offsetX/offsetY don't work correctly
2559         https://bugs.webkit.org/show_bug.cgi?id=132284
2560
2561         Reviewed by Simon Fraser.
2562
2563         * rendering/RenderBoxModelObject.cpp:
2564         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2565         Change the code here to only trigger for CSS Regions and not for
2566         multi-column. Add a FIXME pointing out that the code is broken even for
2567         CSS regions.
2568
2569          * rendering/RenderMultiColumnFlowThread.cpp:
2570         (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint):
2571         Override mapAbsoluteToLocalPoint in order to guess a region and attempt
2572         to translate the point from that region to the flow thread local coordinate
2573         space.
2574
2575         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromRegionToFlow):
2576         * rendering/RenderMultiColumnFlowThread.h:
2577         New helper function that just wraps calling the region's logical translation
2578         function and converting to/from physical coordinates.
2579
2580 2014-04-28  Commit Queue  <commit-queue@webkit.org>
2581
2582         Unreviewed, rolling out r167857.
2583         https://bugs.webkit.org/show_bug.cgi?id=132305
2584
2585         the change was rolled out, roll out the new expectations as
2586         well (Requested by thorton on #webkit).
2587
2588         Reverted changeset:
2589
2590         "Unreviewed. Updating one bindings test baseline after
2591         r167855."
2592         http://trac.webkit.org/changeset/167857
2593
2594 2014-04-28  Dean Jackson  <dino@apple.com>
2595
2596         [Mac] Use the animated version of setHighlighted on NSButtonCell where available
2597         https://bugs.webkit.org/show_bug.cgi?id=132295
2598         <rdar://problem/16747240>
2599
2600         Reviewed by Beth Dakin.
2601
2602         Like setState, there is an animated version of setHighlighted available.
2603
2604         * platform/mac/ThemeMac.mm:
2605         (WebCore::updateStates): Use private version of _setHighlighted where possible.
2606
2607 2014-04-28  Commit Queue  <commit-queue@webkit.org>
2608
2609         Unreviewed, rolling out r167855.
2610         https://bugs.webkit.org/show_bug.cgi?id=132301
2611
2612         Broke the windows build (Requested by bfulgham on #webkit).
2613
2614         Reverted changeset:
2615
2616         "ScriptExecutionContext::Task should work well with C++11
2617         lambdas"
2618         https://bugs.webkit.org/show_bug.cgi?id=129795
2619         http://trac.webkit.org/changeset/167855
2620
2621 2014-04-24  Andy Estes  <aestes@apple.com>
2622
2623         [iOS] Implement WebQuickLookHandleClient for WebKit2
2624         https://bugs.webkit.org/show_bug.cgi?id=132157
2625
2626         Reviewed by Darin Adler.
2627
2628         * WebCore.exp.in: Exported QuickLookHandle::previewUTI().
2629         * platform/network/ios/QuickLook.h:
2630         * platform/network/ios/QuickLook.mm:
2631         (WebCore::QuickLookHandle::previewFileName): Changed to return a WTF::String.
2632         (WebCore::QuickLookHandle::previewUTI): Added.
2633
2634 2014-04-28  Chris Fleizach  <cfleizach@apple.com>
2635
2636         REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
2637         https://bugs.webkit.org/show_bug.cgi?id=111613
2638
2639         Reviewed by Mark Lam.
2640
2641         I think it's possible that didFinishSpeaking ends up calling directly back into start speaking, and the utterance reference
2642         we were holding can get cleared, so protecting this should avoid a few asserts.
2643
2644         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
2645         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
2646
2647 2014-04-28  Commit Queue  <commit-queue@webkit.org>
2648
2649         Unreviewed, rolling out r167871.
2650         https://bugs.webkit.org/show_bug.cgi?id=132290
2651
2652         broke a newmulticol test (spanner-nested-dynamic) (Requested
2653         by thorton on #webkit).
2654
2655         Reverted changeset:
2656
2657         "Store the containing region map inside the flow thread"
2658         https://bugs.webkit.org/show_bug.cgi?id=131647
2659         http://trac.webkit.org/changeset/167871
2660
2661 2014-04-28  Commit Queue  <commit-queue@webkit.org>
2662
2663         Unreviewed, rolling out r167853.
2664         https://bugs.webkit.org/show_bug.cgi?id=132288
2665
2666         caused crashes+timeouts+layout test failures described in the
2667         bug (Requested by thorton on #webkit).
2668
2669         Reverted changeset:
2670
2671         "Coalesce responses on network process side"
2672         https://bugs.webkit.org/show_bug.cgi?id=132229
2673         http://trac.webkit.org/changeset/167853
2674
2675 2014-04-24  Simon Fraser  <simon.fraser@apple.com>
2676
2677         [iOS WK2] flickery scrolling with overflow-scrolling:touch
2678         https://bugs.webkit.org/show_bug.cgi?id=132150
2679
2680         Reviewed by Tim Horton.
2681
2682         Fix typo in a comment.
2683
2684         * page/scrolling/AsyncScrollingCoordinator.cpp:
2685         (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll):
2686
2687 2014-04-28  Martin Robinson  <mrobinson@igalia.com>
2688
2689         [GTK] Builtin cursors do not properly handle transparency
2690         https://bugs.webkit.org/show_bug.cgi?id=131866
2691
2692         Reviewed by Gustavo Noronha Silva.
2693
2694         Tested by ManualTests/cursor.html.
2695
2696         * platform/gtk/CursorGtk.cpp:
2697         (WebCore::createNamedCursor): Instead of interpreting the source bitmap as an A1 image, use
2698         it as a 1-bit black and white image. We do this by:
2699             1. Painting the result to a full color image with transparency instead of an alpha-only surface.
2700             2. Masking a white background using the cursor alpha surface.
2701             3. Painting the black parts of the cursor by painting the source surface, where black pixels
2702             will be interpreted as full opaque pixels.
2703
2704 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2705
2706         Unreviewed. Update GObject DOM bindings symbols file.
2707
2708         * bindings/gobject/webkitdom.symbols: Add missing symbols.
2709
2710 2014-04-28  Manuel Rego Casasnovas  <rego@igalia.com>
2711
2712         OrderIterator refactoring to avoid extra loops
2713         https://bugs.webkit.org/show_bug.cgi?id=119061
2714
2715         Reviewed by Darin Adler.
2716
2717         This patch removes order values Vector and use a Vector of pairs instead. The pairs are formed by a child
2718         (RenderBox) and the index of this child. In addition, OrderIterator code is simplified.
2719
2720         It provides a helper class OrderIteratorPopulator, used for manipulating the Vector directly. Which allows to
2721         consolidate the code into a single implementation across flexbox and grid. OrderIteratorPopulator part is based
2722         on a patch from Blink r153971 by <jchaffraix@chromium.org>.
2723
2724         Current implementation is O(number of children * number of order values). Now it will just do a sort operation
2725         and then a regular loop. So if you have different order values in a flexbox or grid the performance will
2726         improve.
2727
2728         Comparing results of perf-tests:
2729         * Layout/auto-grid-lots-of-data: ~0.5% worse.
2730         * Layout/fixed-grid-lots-of-data: ~0.5% worse.
2731         * Layout/fixed-grid-lots-of-data (setting 100 different order values): ~50% better.
2732         * Layout/flexbox-lots-of-data: ~5% better.
2733
2734         No new tests, already covered by current tests.
2735
2736         * rendering/OrderIterator.cpp:
2737         (WebCore::OrderIterator::currentChild): Return current child according to m_childrenIndex.
2738         (WebCore::OrderIterator::first): Initialize m_childrenIndex and return current child.
2739         (WebCore::OrderIterator::next): Increase m_childrenIndex and return current child.
2740         (WebCore::compareByOrderValueAndIndex): Sorts the Vector by order value and index.
2741         (WebCore::OrderIteratorPopulator::~OrderIteratorPopulator): Calls compareByOrderValueAndIndex() if there is any
2742         child with non default order value.
2743         (WebCore::OrderIteratorPopulator::collectChild): Adds the child and index to the Vector. Update
2744         m_allChildrenHaveDefaultOrderValue accordingly.
2745         (WebCore::OrderIterator::OrderIterator): Deleted.
2746         (WebCore::OrderIterator::setOrderValues): Deleted.
2747         (WebCore::OrderIterator::reset): Deleted.
2748         * rendering/OrderIterator.h:
2749         (WebCore::OrderIteratorPopulator::OrderIteratorPopulator): New helper class to manipulate the Vector.
2750         (WebCore::OrderIterator::currentChild): Deleted.
2751         * rendering/RenderFlexibleBox.cpp:
2752         (WebCore::RenderFlexibleBox::RenderFlexibleBox): Remove OrderIterator intialization.
2753         (WebCore::RenderFlexibleBox::layoutBlock): Remove unneeded code related to old OrderValues vector.
2754         (WebCore::RenderFlexibleBox::prepareOrderIteratorAndMargins): Populate OrderIterator using collectChild().
2755         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): Deleted.
2756         * rendering/RenderFlexibleBox.h: Rename computeMainAxisPreferredSizes() to prepareOrderIteratorAndMargins().
2757         * rendering/RenderGrid.cpp:
2758         (WebCore::RenderGrid::RenderGrid): Remove OrderIterator initialization.
2759         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Populate OrderIterator using collectChild().
2760
2761 2014-04-28  Zan Dobersek  <zdobersek@igalia.com>
2762
2763         std::bitset<>::test() does unnecessary bounds checks on CSSPropertyID bitsets
2764         https://bugs.webkit.org/show_bug.cgi?id=131685
2765
2766         Reviewed by Darin Adler.
2767
2768         Use std::bitset<>::operator[]() instead of std::bitset<>::test() to avoid
2769         bounds checks which are not necessary as long as a CSSPropertyID value is used.
2770
2771         * css/CSSParser.cpp:
2772         (WebCore::filterProperties):
2773         * css/StyleProperties.cpp:
2774         (WebCore::StyleProperties::asText):
2775         * css/StyleResolver.cpp:
2776         (WebCore::StyleResolver::CascadedProperties::hasProperty):
2777         (WebCore::StyleResolver::CascadedProperties::set):
2778
2779 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2780
2781         [GTK] TextTrack kind and mode attributes are enums since r166180
2782         https://bugs.webkit.org/show_bug.cgi?id=132228
2783
2784         Reviewed by Martin Robinson.
2785
2786         Improve coding style according to review comments, that I forgot
2787         to do before landing previous commit.
2788
2789         * bindings/gobject/WebKitDOMCustom.cpp:
2790         (webkit_dom_text_track_get_kind):
2791         (webkit_dom_text_track_get_mode):
2792         (webkit_dom_text_track_set_mode):
2793
2794 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2795
2796         [GTK] TextTrack kind and mode attributes are enums since r166180
2797         https://bugs.webkit.org/show_bug.cgi?id=132228
2798
2799         Reviewed by Martin Robinson.
2800
2801         We don't support enum values yet in GObject DOM bindings, but they
2802         are internally strings anyway, so we can keep the old
2803         implementations using strings as custom functions until we
2804         properly support enums.
2805
2806         * bindings/gobject/WebKitDOMCustom.cpp:
2807         (webkit_dom_text_track_get_kind):
2808         (webkit_dom_text_track_get_mode):
2809         (webkit_dom_text_track_set_mode):
2810         * bindings/gobject/WebKitDOMCustom.h:
2811         * bindings/gobject/WebKitDOMCustom.symbols:
2812
2813 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2814
2815         [GTK] TextTrack::addCue can raise an exception since r163974
2816         https://bugs.webkit.org/show_bug.cgi?id=132227
2817
2818         Reviewed by Martin Robinson.
2819
2820         webkit_dom_text_track_add_cue() now receives a GError paramater
2821         which is an API break. Add
2822         webkit_dom_text_track_add_cue_with_error and keep
2823         webkit_dom_text_track_add_cue as deprecated to keep API
2824         compatibility.
2825
2826         * bindings/gobject/WebKitDOMDeprecated.cpp:
2827         (webkit_dom_text_track_add_cue):
2828         * bindings/gobject/WebKitDOMDeprecated.h:
2829         * bindings/gobject/WebKitDOMDeprecated.symbols:
2830         * bindings/gobject/webkitdom.symbols:
2831         * bindings/scripts/CodeGeneratorGObject.pm:
2832         (GetEffectiveFunctionName):
2833
2834 2014-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2835
2836         [GTK] TextTrackCue API changed in r163649
2837         https://bugs.webkit.org/show_bug.cgi?id=132226
2838
2839         Reviewed by Martin Robinson.
2840
2841         TextTrackCue is now a base class and part of its API was moved to
2842         the derived class VTTCue. Update the GObject DOM bindings to keep
2843         backwards compatibility.
2844
2845         * PlatformGTK.cmake: Generate bindings for DataCue and VTTCue.
2846         * bindings/gobject/WebKitDOMDeprecated.cpp:
2847         (webkit_dom_text_track_cue_get_cue_as_html): Mark as deprecated in
2848         favor of VTTCue API.
2849         (webkit_dom_text_track_cue_get_vertical): Ditto.
2850         (webkit_dom_text_track_cue_set_vertical): Ditto.
2851         (webkit_dom_text_track_cue_get_snap_to_lines): Ditto.
2852         (webkit_dom_text_track_cue_set_snap_to_lines): Ditto.
2853         (webkit_dom_text_track_cue_get_line): Ditto.
2854         (webkit_dom_text_track_cue_set_line): Ditto.
2855         (webkit_dom_text_track_cue_get_position): Ditto.
2856         (webkit_dom_text_track_cue_set_position): Ditto.
2857         (webkit_dom_text_track_cue_get_size): Ditto.
2858         (webkit_dom_text_track_cue_set_size): Ditto.
2859         (webkit_dom_text_track_cue_get_align): Ditto.
2860         (webkit_dom_text_track_cue_set_align): Ditto.
2861         (webkit_dom_text_track_cue_get_text): Ditto.
2862         (webkit_dom_text_track_cue_set_text): Ditto.
2863         * bindings/gobject/WebKitDOMDeprecated.h:
2864         * bindings/gobject/WebKitDOMDeprecated.symbols: Add new deprecated symbols.
2865         * bindings/gobject/WebKitDOMPrivate.cpp:
2866         (WebKit::wrap): Add generic wrap for TextTrackCue now that it's a
2867         base class to generate DataCue or VTTCue objects.
2868         * bindings/gobject/WebKitDOMPrivate.h:
2869         * bindings/gobject/webkitdom.symbols: Add DataCue symbols.
2870         * bindings/scripts/CodeGeneratorGObject.pm:
2871         (IsPolymorphic): Add TextTrackCue to the list of polymorphic classes.
2872
2873 2014-04-27  Andrei Bucur  <abucur@adobe.com>
2874
2875         Store the containing region map inside the flow thread
2876         https://bugs.webkit.org/show_bug.cgi?id=131647
2877
2878         Reviewed by Mihnea Ovidenie.
2879
2880         The patch moves the containing region map inside the flow thread where
2881         it can be better handled in case the region chain changes and the map
2882         needs to be cleared.
2883
2884         As a result of this move we are able to also cleanup the lines region
2885         information of a block flow when it is removed from the tree.
2886
2887         Test: fast/regions/inline-strike-through.html
2888
2889         * rendering/InlineFlowBox.h:
2890         (WebCore::InlineFlowBox::InlineFlowBox):
2891         * rendering/RenderBlockLineLayout.cpp:
2892         (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
2893         * rendering/RenderFlowThread.cpp:
2894         (WebCore::RenderFlowThread::removeFlowChildInfo):
2895         (WebCore::RenderFlowThread::invalidateRegions):
2896         (WebCore::RenderFlowThread::removeLineRegionInfo):
2897         (WebCore::RenderFlowThread::checkLinesConsistency):
2898         (WebCore::RenderFlowThread::containingRegionMap):
2899         * rendering/RenderFlowThread.h:
2900         * rendering/RootInlineBox.cpp:
2901         (WebCore::containingRegionMap):
2902         (WebCore::RootInlineBox::~RootInlineBox):
2903         (WebCore::RootInlineBox::paint):
2904         (WebCore::RootInlineBox::containingRegion):
2905         (WebCore::RootInlineBox::clearContainingRegion):
2906         (WebCore::RootInlineBox::setContainingRegion):
2907
2908 2014-04-27  Darin Adler  <darin@apple.com>
2909
2910         REGRESSION (r159345): The hover state for links in the top navigation of Yahoo.com doesn't work
2911         https://bugs.webkit.org/show_bug.cgi?id=132241
2912         rdar://problem/16501924
2913
2914         Reviewed by Andreas Kling.
2915
2916         Test: fast/text/simple-lines-hover-underline.html
2917
2918         Checked that this does not hurt performance by running the
2919         run-perf-tests PerformanceTests/Layout/line-layout.html command before and after.
2920
2921         * rendering/RenderBlockFlow.cpp:
2922         (WebCore::RenderBlockFlow::hitTestInlineChildren): Use simpleLineLayout function rather than
2923         getting at the data member directly.
2924         (WebCore::RenderBlockFlow::firstLineBaseline): Ditto.
2925         (WebCore::RenderBlockFlow::inlineBlockBaseline): Ditto.
2926         (WebCore::RenderBlockFlow::lineCount): Ditto.
2927         (WebCore::RenderBlockFlow::paintInlineChildren): Ditto.
2928         (WebCore::RenderBlockFlow::hasLines): Ditto.
2929         (WebCore::RenderBlockFlow::simpleLineLayout): Added logic to determine which path to use if
2930         m_lineLayoutPath is undetermined, and call createLineBoxes if it's not simple.
2931         (WebCore::RenderBlockFlow::ensureLineBoxes): Factored out most of the code into a new
2932         createLineBoxes function.
2933         (WebCore::RenderBlockFlow::createLineBoxes): Ditto.
2934
2935         * rendering/RenderBlockFlow.h: Made simpleLineLayout function no longer an inline.
2936         Added a private createLineBoxes function.
2937
2938 2014-04-27  Praveen R Jadhav  <praveen.j@samsung.com>
2939
2940         [MediaStream] .ended shouldn't be part of MediaStream IDL
2941         https://bugs.webkit.org/show_bug.cgi?id=132104
2942
2943         Reviewed by Eric Carlson.
2944
2945         .ended attribute is spec'ed out of MediaStream IDL. Instead, .active
2946         is introduced to handle more scenarios. This patch replaces all 'ended'
2947         attribute calls with corresponding 'active' attributes. 
2948
2949         MediaStream-add-remove-tracks.html is updated.
2950
2951         * Modules/mediastream/MediaStream.cpp:
2952         (WebCore::MediaStream::addTrack): Replaced ended() with active().
2953         (WebCore::MediaStream::removeTrack): setEnded() isn't called. setActive()
2954         is retained which propagates oninactive event.
2955         (WebCore::MediaStream::trackDidEnd): setEnded() isn't called.
2956         (WebCore::MediaStream::removeRemoteSource): Replaced ended() with active().
2957         (WebCore::MediaStream::addRemoteTrack): Replaced ended() with active().
2958         (WebCore::MediaStream::removeRemoteTrack): Replaced ended() with active().
2959         (WebCore::MediaStream::ended): Deleted.
2960         (WebCore::MediaStream::setEnded): Deleted.
2961         (WebCore::MediaStream::streamDidEnd): Deleted.
2962         * Modules/mediastream/MediaStream.h:
2963         * Modules/mediastream/MediaStream.idl:
2964         * Modules/mediastream/RTCPeerConnection.cpp:
2965         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Replaced setEnded()
2966         with setActive().
2967         * platform/mediastream/MediaStreamPrivate.cpp:
2968         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
2969         (WebCore::MediaStreamPrivate::setActive): Updated comment from bug 
2970         https://bugs.webkit.org/show_bug.cgi?id=131973
2971         (WebCore::MediaStreamPrivate::setEnded): Deleted.
2972         * platform/mediastream/MediaStreamPrivate.h:
2973         (WebCore::MediaStreamPrivate::ended): Deleted.
2974
2975 2014-04-25  Andy Estes  <aestes@apple.com>
2976
2977         [iOS] Stop creating a WKWebResourceQuickLookDelegate for every WebResourceLoader
2978         https://bugs.webkit.org/show_bug.cgi?id=132215
2979
2980         Reviewed by Dan Bernstein.
2981
2982         * WebCore.exp.in: Moved QuickLook symbols to the USE(QUICK_LOOK) stanza.
2983         * platform/network/ios/QuickLook.h: Changed one of the create() overloads to no longer take a delegate argument.
2984         * platform/network/ios/QuickLook.mm: Moved WKWebResourceQuickLookDelegate to here and renamed to WebResourceLoaderQuickLookDelegate.
2985         (WebCore::QuickLookHandle::create): Created a WebResourceLoaderQuickLookDelegate only if QuickLook can handle the response.
2986
2987 2014-04-27  Sam Weinig  <sam@webkit.org>
2988
2989         [iOS WebKit2] Add support for text autosizing
2990         <rdar://problem/16545245>
2991         https://bugs.webkit.org/show_bug.cgi?id=132237
2992
2993         Reviewed by Tim Horton.
2994
2995         Move text autosizing width from Frame to Page, as it is a Page level concept.
2996
2997         * WebCore.exp.in:
2998         * page/Frame.cpp:
2999         (WebCore::Frame::textAutosizingWidth): Deleted.
3000         (WebCore::Frame::setTextAutosizingWidth): Deleted.
3001         * page/Frame.h:
3002         * page/FrameView.cpp:
3003         (WebCore::FrameView::layout):
3004         * page/Page.cpp:
3005         (WebCore::Page::Page):
3006         * page/Page.h:
3007         (WebCore::Page::textAutosizingWidth):
3008         (WebCore::Page::setTextAutosizingWidth):
3009
3010 2014-04-27  Zan Dobersek  <zdobersek@igalia.com>
3011
3012         Unreviewed. Updating one bindings test baseline after r167855.
3013
3014         * bindings/scripts/test/JS/JSTestCallback.cpp:
3015         (WebCore::JSTestCallback::~JSTestCallback):
3016
3017 2014-04-27  Darin Adler  <darin@apple.com>
3018
3019         Webpages can trigger loads with invalid URLs
3020         https://bugs.webkit.org/show_bug.cgi?id=132224
3021         rdar://problem/16697142
3022
3023         Reviewed by Alexey Proskuryakov.
3024
3025         Invalid URLs can be a way to trick the user about what website they
3026         are looking at.  Still trying to figure out a good way to regression-test this.
3027
3028         * dom/Document.cpp:
3029         (WebCore::Document::processHttpEquiv): Pass a URL rather than a String to
3030         the navigation scheduler.
3031         * loader/FrameLoader.cpp:
3032         (WebCore::FrameLoader::receivedFirstData): Ditto.
3033
3034         * loader/NavigationScheduler.cpp:
3035         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Take a URL rather
3036         than a string.
3037         (WebCore::ScheduledURLNavigation::url): Ditto.
3038         (WebCore::ScheduledRedirect::ScheduledRedirect): Ditto.
3039         (WebCore::ScheduledLocationChange::ScheduledLocationChange): Ditto.
3040         (WebCore::ScheduledRefresh::ScheduledRefresh): Ditto.
3041         (WebCore::NavigationScheduler::shouldScheduleNavigation): Added a check that
3042         prevents navigation to any URL that is invalid, except for JavaScript URLs,
3043         which need not be valid.
3044         (WebCore::NavigationScheduler::scheduleRedirect): Use URL instead of String.
3045         (WebCore::NavigationScheduler::scheduleLocationChange): Use URL instead of
3046         String. Also got rid of empty string check since empty URLs are also invalid,
3047         and so shouldScheduleNavigation will take care of it.
3048         (WebCore::NavigationScheduler::scheduleRefresh): Use URL instead of String.
3049
3050         * loader/NavigationScheduler.h: Take URL instead of String. Also removed some
3051         unneeded incldues and uses of WTF_MAKE_NONCOPYABLE. NavigationScheduler is
3052         already noncopyable because it has a reference for a data member, and the
3053         disabler doesn't have any real reason to be noncopyable.
3054
3055         * loader/SubframeLoader.cpp:
3056         (WebCore::SubframeLoader::loadOrRedirectSubframe): Pass a URL rather than a
3057         String to the NavigationScheduler.
3058         * page/DOMWindow.cpp:
3059         (WebCore::DOMWindow::createWindow): Ditto.
3060
3061         * page/SecurityOrigin.cpp:
3062         (WebCore::SecurityOrigin::urlWithUniqueSecurityOrigin): Return a URL instead
3063         of a String.
3064         * page/SecurityOrigin.h: Updated for above change.
3065
3066 2014-04-27  Zan Dobersek  <zdobersek@igalia.com>
3067
3068         ScriptExecutionContext::Task should work well with C++11 lambdas
3069         https://bugs.webkit.org/show_bug.cgi?id=129795
3070
3071         Reviewed by Darin Adler.
3072
3073         Instead of having classes that subclass ScriptExecutionContext::Task and override
3074         the performTask(ScriptExecutionContext*) method, have the ScriptExecutionContext::Task
3075         take in a std::function<void (ScriptExecutionContext*)>-like object trough the constructor
3076         which would contain the code currently kept in the performTask() methods.
3077
3078         This enables inlining C++11 lambdas into ScriptExecutionContext::postTask() calls. For
3079         cleanup tasks, the Task object can be implicitly constructed by using the initializer list
3080         constructor with the first argument being the ScriptExecutionContext::Task::CleanupTask tag.
3081         The ScriptExecutionContext class remains non-copyable and now stores the passed-in invokable
3082         object in the std::function wrapper, along with a boolean member that indicates whether the
3083         task is of cleanup nature.
3084
3085         * Modules/quota/StorageErrorCallback.cpp:
3086         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
3087         (WebCore::StorageErrorCallback::CallbackTask::performTask): Deleted.
3088         * Modules/quota/StorageErrorCallback.h:
3089         (WebCore::StorageErrorCallback::CallbackTask::create): Deleted.
3090         * Modules/webdatabase/Database.cpp:
3091         (WebCore::Database::~Database):
3092         (WebCore::Database::runTransaction):
3093         (WebCore::Database::scheduleTransactionCallback):
3094         (WebCore::DerefContextTask::create): Deleted.
3095         (WebCore::DerefContextTask::performTask): Deleted.
3096         (WebCore::DerefContextTask::isCleanupTask): Deleted.
3097         (WebCore::DerefContextTask::DerefContextTask): Deleted.
3098         (WebCore::callTransactionErrorCallback): Deleted.
3099         (WebCore::DeliverPendingCallbackTask::create): Deleted.
3100         (WebCore::DeliverPendingCallbackTask::performTask): Deleted.
3101         (WebCore::DeliverPendingCallbackTask::DeliverPendingCallbackTask): Deleted.
3102         * Modules/webdatabase/DatabaseManager.cpp:
3103         (WebCore::DatabaseManager::openDatabase):
3104         (WebCore::DatabaseCreationCallbackTask::create): Deleted.
3105         (WebCore::DatabaseCreationCallbackTask::performTask): Deleted.
3106         (WebCore::DatabaseCreationCallbackTask::DatabaseCreationCallbackTask): Deleted.
3107         * Modules/webdatabase/DatabaseSync.cpp:
3108         (WebCore::CloseSyncDatabaseOnContextThreadTask::create): Deleted.
3109         (WebCore::CloseSyncDatabaseOnContextThreadTask::performTask): Deleted.
3110         (WebCore::CloseSyncDatabaseOnContextThreadTask::CloseSyncDatabaseOnContextThreadTask): Deleted.
3111         * Modules/webdatabase/SQLCallbackWrapper.h:
3112         (WebCore::SQLCallbackWrapper::clear):
3113         (WebCore::SQLCallbackWrapper::SafeReleaseTask::create): Deleted.
3114         (WebCore::SQLCallbackWrapper::SafeReleaseTask::performTask): Deleted.
3115         (WebCore::SQLCallbackWrapper::SafeReleaseTask::isCleanupTask): Deleted.
3116         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask): Deleted.
3117         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3118         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
3119         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
3120         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3121         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
3122         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3123         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3124         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
3125         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
3126         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
3127         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3128         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
3129         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
3130         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
3131         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create): Deleted.
3132         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask): Deleted.
3133         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask): Deleted.
3134         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3135         * bindings/js/JSCallbackData.h:
3136         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
3137         (WebCore::DeleteCallbackDataTask::create): Deleted.
3138         (WebCore::DeleteCallbackDataTask::performTask): Deleted.
3139         (WebCore::DeleteCallbackDataTask::isCleanupTask): Deleted.
3140         * bindings/js/JSDOMGlobalObjectTask.cpp:
3141         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
3142         (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask): Deleted.
3143         (WebCore::JSGlobalObjectTask::performTask): Deleted.
3144         * bindings/js/JSDOMGlobalObjectTask.h:
3145         * bindings/js/JSDOMWindowBase.cpp:
3146         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
3147         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3148         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
3149         * bindings/scripts/CodeGeneratorJS.pm:
3150         (GenerateCallbackImplementation):
3151         * dom/CrossThreadTask.h:
3152         (WebCore::CrossThreadTask1::performTask):
3153         (WebCore::CrossThreadTask2::performTask):
3154         (WebCore::CrossThreadTask3::performTask):
3155         (WebCore::CrossThreadTask4::performTask):
3156         (WebCore::CrossThreadTask5::performTask):
3157         (WebCore::CrossThreadTask6::performTask):
3158         (WebCore::CrossThreadTask7::performTask):
3159         (WebCore::CrossThreadTask8::performTask):
3160         (WebCore::createCallbackTask):
3161         (WebCore::CrossThreadTask1::create): Deleted.
3162         (WebCore::CrossThreadTask2::create): Deleted.
3163         (WebCore::CrossThreadTask3::create): Deleted.
3164         (WebCore::CrossThreadTask4::create): Deleted.
3165         (WebCore::CrossThreadTask5::create): Deleted.
3166         (WebCore::CrossThreadTask6::create): Deleted.
3167         (WebCore::CrossThreadTask7::create): Deleted.
3168         (WebCore::CrossThreadTask8::create): Deleted.
3169         * dom/Document.cpp:
3170         (WebCore::Document::addConsoleMessage):
3171         (WebCore::Document::addMessage):
3172         (WebCore::Document::postTask):
3173         (WebCore::Document::pendingTasksTimerFired):
3174         (WebCore::PerformTaskContext::PerformTaskContext): Deleted.
3175         (WebCore::Document::didReceiveTask): Deleted.
3176         * dom/Document.h:
3177         * dom/ScriptExecutionContext.cpp:
3178         (WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
3179         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
3180         (WebCore::ProcessMessagesSoonTask::create): Deleted.
3181         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask): Deleted.
3182         (WebCore::ScriptExecutionContext::Task::~Task): Deleted.
3183         * dom/ScriptExecutionContext.h:
3184         (WebCore::ScriptExecutionContext::Task::Task):
3185         (WebCore::ScriptExecutionContext::Task::performTask):
3186         (WebCore::ScriptExecutionContext::Task::isCleanupTask):
3187         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
3188         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create): Deleted.
3189         * dom/StringCallback.cpp:
3190         (WebCore::StringCallback::scheduleCallback):
3191         * loader/appcache/ApplicationCacheGroup.cpp:
3192         (WebCore::ApplicationCacheGroup::postListenerTask):
3193         (WebCore::CallCacheListenerTask::create): Deleted.
3194         (WebCore::CallCacheListenerTask::CallCacheListenerTask): Deleted.
3195         * workers/DefaultSharedWorkerRepository.cpp:
3196         (WebCore::SharedWorkerProxy::postTaskToLoader):
3197         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
3198         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
3199         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
3200         (WebCore::DefaultSharedWorkerRepository::connectToWorker):
3201         (WebCore::SharedWorkerConnectTask::create): Deleted.
3202         (WebCore::SharedWorkerConnectTask::performTask): Deleted.
3203         * workers/WorkerEventQueue.cpp:
3204         (WebCore::WorkerEventQueue::EventDispatcher::EventDispatcher):
3205         (WebCore::WorkerEventQueue::EventDispatcher::~EventDispatcher):
3206         (WebCore::WorkerEventQueue::EventDispatcher::dispatch):
3207         (WebCore::WorkerEventQueue::enqueueEvent):
3208         (WebCore::WorkerEventQueue::cancelEvent):
3209         (WebCore::WorkerEventQueue::close):
3210         * workers/WorkerEventQueue.h:
3211         * workers/WorkerGlobalScope.cpp:
3212         (WebCore::WorkerGlobalScope::close):
3213         (WebCore::WorkerGlobalScope::postTask):
3214         (WebCore::WorkerGlobalScope::addConsoleMessage):
3215         (WebCore::WorkerGlobalScope::addMessage):
3216         (WebCore::CloseWorkerGlobalScopeTask::create): Deleted.
3217         (WebCore::CloseWorkerGlobalScopeTask::performTask): Deleted.
3218         (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask): Deleted.
3219         * workers/WorkerGlobalScope.h:
3220         * workers/WorkerLoaderProxy.h:
3221         * workers/WorkerMessagingProxy.cpp:
3222         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
3223         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
3224         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
3225         (WebCore::WorkerMessagingProxy::postTaskToLoader):
3226         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
3227         (WebCore::WorkerMessagingProxy::workerThreadCreated):
3228         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
3229         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
3230         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
3231         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
3232         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
3233         (WebCore::WorkerMessagingProxy::reportPendingActivity):
3234         (WebCore::MessageWorkerGlobalScopeTask::create): Deleted.
3235         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask): Deleted.
3236         (WebCore::MessageWorkerGlobalScopeTask::performTask): Deleted.
3237         (WebCore::MessageWorkerTask::create): Deleted.
3238         (WebCore::MessageWorkerTask::MessageWorkerTask): Deleted.
3239         (WebCore::MessageWorkerTask::performTask): Deleted.
3240         (WebCore::WorkerExceptionTask::create): Deleted.
3241         (WebCore::WorkerExceptionTask::WorkerExceptionTask): Deleted.
3242         (WebCore::WorkerExceptionTask::performTask): Deleted.
3243         (WebCore::WorkerGlobalScopeDestroyedTask::create): Deleted.
3244         (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask): Deleted.
3245         (WebCore::WorkerGlobalScopeDestroyedTask::performTask): Deleted.
3246         (WebCore::WorkerTerminateTask::create): Deleted.
3247         (WebCore::WorkerTerminateTask::WorkerTerminateTask): Deleted.
3248         (WebCore::WorkerTerminateTask::performTask): Deleted.
3249         (WebCore::WorkerThreadActivityReportTask::create): Deleted.
3250         (WebCore::WorkerThreadActivityReportTask::WorkerThreadActivityReportTask): Deleted.
3251         (WebCore::WorkerThreadActivityReportTask::performTask): Deleted.
3252         (WebCore::PostMessageToPageInspectorTask::create): Deleted.
3253         (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): Deleted.
3254         (WebCore::PostMessageToPageInspectorTask::performTask): Deleted.
3255         (WebCore::NotifyNetworkStateChangeTask::create): Deleted.
3256         (WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask): Deleted.
3257         (WebCore::NotifyNetworkStateChangeTask::performTask): Deleted.
3258         * workers/WorkerMessagingProxy.h:
3259         * workers/WorkerRunLoop.cpp:
3260         (WebCore::WorkerRunLoop::postTask):
3261         (WebCore::WorkerRunLoop::postTaskAndTerminate):
3262         (WebCore::WorkerRunLoop::postTaskForMode):
3263         (WebCore::WorkerRunLoop::Task::create):
3264         (WebCore::WorkerRunLoop::Task::performTask):
3265         (WebCore::WorkerRunLoop::Task::Task):
3266         * workers/WorkerRunLoop.h:
3267         * workers/WorkerThread.cpp:
3268         (WebCore::WorkerThread::stop):
3269         (WebCore::WorkerThread::releaseFastMallocFreeMemoryInAllThreads):
3270         (WebCore::WorkerThreadShutdownFinishTask::create): Deleted.
3271         (WebCore::WorkerThreadShutdownFinishTask::performTask): Deleted.
3272         (WebCore::WorkerThreadShutdownFinishTask::isCleanupTask): Deleted.
3273         (WebCore::WorkerThreadShutdownStartTask::create): Deleted.
3274         (WebCore::WorkerThreadShutdownStartTask::performTask): Deleted.
3275         (WebCore::WorkerThreadShutdownStartTask::isCleanupTask): Deleted.
3276
3277 2014-04-27  Antti Koivisto  <antti@apple.com>
3278
3279         Coalesce responses on network process side
3280         https://bugs.webkit.org/show_bug.cgi?id=132229
3281
3282         Reviewed by Andreas Kling.
3283
3284         * WebCore.exp.in:
3285
3286 2014-04-27  David Kilzer  <ddkilzer@apple.com>
3287
3288         Roll out changes not part of the patch reviewed for Bug 132089
3289         <http://webkit.org/b/132089>
3290
3291         * loader/SubframeLoader.cpp:
3292         (WebCore::SubframeLoader::loadOrRedirectSubframe):
3293         * page/DOMWindow.cpp:
3294         (WebCore::DOMWindow::setLocation):
3295         (WebCore::DOMWindow::createWindow):
3296         (WebCore::DOMWindow::open):
3297
3298 2014-04-26  Darin Adler  <darin@apple.com>
3299
3300         Frame and page lifetime fixes in WebCore::createWindow
3301         https://bugs.webkit.org/show_bug.cgi?id=132089
3302
3303         Reviewed by Sam Weinig.
3304
3305         Speculative fix because I was unable to reproduce the crash that was
3306         reported with the test case attached to this bug.
3307
3308         * loader/FrameLoader.cpp:
3309         (WebCore::createWindow): Changed code to remove the assumption that calls
3310         out will not destroy the page or frame. Use RefPtr for the frame, and
3311         added early exits if frame->page() becomes null at any point before we
3312         use a page pointer.
3313
3314 2014-04-26  Alexey Proskuryakov  <ap@apple.com>
3315
3316         Local files should not be allowed to read pasteboard data during drag
3317         https://bugs.webkit.org/show_bug.cgi?id=131767
3318
3319         Reviewed by Sam Weinig.
3320
3321         Test: fast/files/local-file-drag-security.html
3322
3323         * page/DragController.cpp:
3324         (WebCore::DragController::dragExited):
3325         (WebCore::DragController::tryDHTMLDrag):
3326         Make an old Dashboard quirk really Dashboard only.
3327
3328 2014-04-24  Darin Adler  <darin@apple.com>
3329
3330         REGRESSION (r164133): Selection doesn't paint when scrolling some pages
3331         https://bugs.webkit.org/show_bug.cgi?id=132172
3332         rdar://problem/16719473
3333
3334         Reviewed by Brent Fulgham.
3335
3336         Tests: fast/dynamic/remove-invisible-node-inside-selection.html
3337                fast/dynamic/remove-node-inside-selection.html
3338
3339         * editing/FrameSelection.cpp:
3340         (WebCore::clearRenderViewSelection): Changed to take a Node& because having
3341         this take a Position& was unnecessary and strange, when really it just needs
3342         to take a document as an argument.
3343         (WebCore::DragCaretController::nodeWillBeRemoved): Updated for the above.
3344         (WebCore::FrameSelection::respondToNodeModification): Added code to set the
3345         m_pendingSelectionUpdate flag and call RenderView::setNeedsLayout so the
3346         selection will be recomputed after it's temporarily cleared when one of
3347         the selected nodes is removed.
3348
3349 2014-04-25  Ryosuke Niwa  <rniwa@webkit.org>
3350
3351         REGRESSION (r167689): Hovering file name in a file input causes a crash
3352         https://bugs.webkit.org/show_bug.cgi?id=132214
3353
3354         Reviewed by Andreas Kling.
3355
3356         The bug was caused by callDefaultEventHandlersInTheBubblingOrder unconditionally
3357         accessing path.contextAt(0) even if the event path was empty.
3358
3359         Fixed the bug by exiting early when the event path is empty.
3360
3361         Test: fast/events/shadow-event-path-2.html
3362
3363         * dom/EventDispatcher.cpp:
3364         (WebCore::callDefaultEventHandlersInTheBubblingOrder):
3365
3366 2014-04-25  Tim Horton  <timothy_horton@apple.com>
3367
3368         REGRESSION (r167828): http/tests/media/hls/video-controls-live-stream.html fails
3369
3370         * English.lproj/mediaControlsLocalizedStrings.js:
3371         Add 'Live Broadcast' to the localized strings list.
3372
3373 2014-04-25  Brady Eidson  <beidson@apple.com>
3374
3375         Add a selection overlay.
3376         <rdar://problem/16727797> and https://bugs.webkit.org/show_bug.cgi?id=132200
3377
3378         Reviewed by David Hyatt.
3379
3380         No new tests (WK2 feature in development).
3381
3382         * WebCore.xcodeproj/project.pbxproj:
3383
3384         Add a SelectionRectGathterer class.
3385         It creates a Notifier (given a RenderView) then accepts Rects from the RenderView.
3386         When the Notifier is destroyed, the appropriate EditorClient is notified of the gathered rects.
3387         * editing/SelectionRectGatherer.cpp: Added.
3388         (WebCore::SelectionRectGatherer::SelectionRectGatherer):
3389         (WebCore::SelectionRectGatherer::addRect):
3390         (WebCore::SelectionRectGatherer::addRects):
3391         (WebCore::SelectionRectGatherer::Notifier::Notifier):
3392         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
3393         (WebCore::SelectionRectGatherer::clearAndCreateNotifier):
3394         * editing/SelectionRectGatherer.h: Added.
3395
3396         * page/EditorClient.h:
3397         (WebCore::EditorClient::selectionRectsDidChange):
3398
3399         * rendering/RenderView.cpp:
3400         (WebCore::RenderView::RenderView):
3401         (WebCore::RenderView::setSelection): Clear the gatherer’s rects then create a Notifier.
3402         (WebCore::RenderView::setSubtreeSelection): Give all the selection rects to be painted to
3403           the SelectionRectGatherer.
3404         * rendering/RenderView.h:
3405
3406 2014-04-08  Jer Noble  <jer.noble@apple.com>
3407
3408         Support "Live" streams in media controls.
3409         https://bugs.webkit.org/show_bug.cgi?id=131390
3410
3411         Reviewed by Brent Fulgham.
3412
3413         Test: http/tests/media/hls/video-controls-live-stream.html
3414
3415         Support "Live" streams by adding an isLive property to our media controls.
3416
3417         * Modules/mediacontrols/mediaControlsApple.css:
3418         (audio::-webkit-media-controls-status-display):
3419         (video:-webkit-full-screen::-webkit-media-controls-status-display):
3420         * Modules/mediacontrols/mediaControlsApple.js:
3421         (Controller): isLive defaults to false.
3422         (Controller.prototype.setIsLive): Set the isLive property and conditionally reconfigure the controls.
3423         (Controller.prototype.configureInlineControls): Don't add the timeline if we are live.
3424         (Controller.prototype.configureFullScreenControls): Ditto.
3425         (Controller.prototype.updateStatusDisplay): Added.
3426         (Controller.prototype.handleLoadStart): Call updateStatusDisplay().
3427         (Controller.prototype.handleError): Ditto.
3428         (Controller.prototype.handleAbort): Ditto.
3429         (Controller.prototype.handleSuspend): Ditto.
3430         (Controller.prototype.handleStalled): Ditto.
3431         (Controller.prototype.handleWaiting): Ditto.
3432         (Controller.prototype.updateDuration): Ditto.
3433         (Controller.prototype.updateReadyState): Ditto.
3434
3435 2014-04-25  Dean Jackson  <dino@apple.com>
3436
3437         Allow a platform-specific size enumeration to be passed into popup-menu display
3438         https://bugs.webkit.org/show_bug.cgi?id=132195
3439
3440         Reviewed by Brent Fulgham. With some in-person review comments from Sam Weinig.
3441
3442         Platforms like OS X use a set of predefined sizes for built-in controls
3443         used for <select>: normal, small and mini. Expose that information to
3444         the PopupMenuClient via the PopupMenuStyle, allowing it to be passed
3445         into the platform code in WebKitSystemInterface.
3446
3447         * platform/PopupMenuStyle.h: Add a menu size enum.
3448         (WebCore::PopupMenuStyle::PopupMenuStyle):
3449         (WebCore::PopupMenuStyle::menuSize):
3450         * platform/mac/WebCoreSystemInterface.h: Pass in NSControlSize as a parameter
3451         to WKPopupMenu.
3452         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3453         * rendering/RenderMenuList.cpp: