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