[Mac] Update for output device API change
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-28  Eric Carlson  <eric.carlson@apple.com>
2
3         [Mac] Update for output device API change
4         https://bugs.webkit.org/show_bug.cgi?id=143187
5
6         Reviewed by Zalan Bujtas.
7
8         The API used for output device is being deprecated, update to the replacement.
9
10         * WebCore.xcodeproj/project.pbxproj: Add SPI headers.
11
12         * platform/graphics/MediaPlaybackTarget.h:
13         (WebCore::MediaPlaybackTarget::MediaPlaybackTarget): Update for API change.
14         (WebCore::MediaPlaybackTarget::setDevicePickerContext):
15         (WebCore::MediaPlaybackTarget::devicePickerContext):
16
17         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
18         (WebCore::MediaPlaybackTarget::encode):
19         (WebCore::MediaPlaybackTarget::decode):
20
21         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
22         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
23         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
24         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
25         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired):
26         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
27         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
28         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets):
29         (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
30         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Deleted.
31
32         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
33         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
34         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
35         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
36         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
37         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
38
39         * platform/spi/cocoa/AVKitSPI.h: Copied from Source/WebCore/platform/spi/ios/AVKitSPI.h. Moved
40             from ios directory, added Mac includes and prototypes.
41         * platform/spi/ios/AVKitSPI.h: Removed.
42
43         * platform/spi/mac/AVFoundationSPI.h: Added.
44
45 2015-03-28  Simon Fraser  <simon.fraser@apple.com>
46
47         Optimize RenderLayer::intersectsDamageRect() slightly
48         https://bugs.webkit.org/show_bug.cgi?id=143186
49
50         Reviewed by Zalan Bujtas.
51
52         We can early return from RenderLayer::intersectsDamageRect() if the
53         damageRect is empty, since nothing will intersect with the empty rect.
54         
55         Slight performance gain when scrolling overflow-scroll with lots of nested,
56         clipping layers.
57
58         * rendering/RenderLayer.cpp:
59         (WebCore::RenderLayer::calculateClipRects):
60
61 2015-03-28  Anders Carlsson  <andersca@apple.com>
62
63         Remove an unused SPI method from WebKitLegacy
64         https://bugs.webkit.org/show_bug.cgi?id=143185
65
66         Reviewed by Sam Weinig.
67
68         * loader/appcache/ApplicationCacheStorage.cpp:
69         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Deleted.
70         * loader/appcache/ApplicationCacheStorage.h:
71
72 2015-03-28  Joonghun Park  <jh718.park@samsung.com>
73
74         nullptr cleanup in InlineFooBox classes
75         https://bugs.webkit.org/show_bug.cgi?id=143178
76
77         Reviewed by Csaba Osztrogonác.
78
79         No new tests, no behavior changes
80
81         Replace 0 with nullptr in InlineFooBox classes.
82
83         * rendering/InlineBox.cpp:
84         (WebCore::InlineBox::prevLeafChildIgnoringLineBreak):
85         * rendering/InlineFlowBox.cpp:
86         (WebCore::InlineFlowBox::removeChild):
87         (WebCore::InlineFlowBox::deleteLine):
88         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
89         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
90         * rendering/InlineFlowBox.h:
91         (WebCore::InlineFlowBox::InlineFlowBox):
92         * rendering/InlineTextBox.h:
93         (WebCore::InlineTextBox::InlineTextBox):
94         * rendering/RootInlineBox.cpp:
95         (WebCore::RootInlineBox::getLogicalStartBoxWithNode):
96         (WebCore::RootInlineBox::getLogicalEndBoxWithNode):
97         * rendering/RootInlineBox.h:
98         * rendering/svg/SVGInlineTextBox.cpp:
99         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
100         (WebCore::SVGInlineTextBox::releasePaintingResource):
101         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
102         * rendering/svg/SVGRootInlineBox.cpp:
103         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
104         (WebCore::findFirstAndLastAttributesInVector):
105         * rendering/svg/SVGRootInlineBox.h:
106
107 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
108
109         More modern loops in RenderLayer.cpp
110         https://bugs.webkit.org/show_bug.cgi?id=143175
111
112         Reviewed by Ryosuke Niwa.
113
114         Use modern loops in more places in RenderLayer.app.
115
116         * rendering/RenderLayer.cpp:
117         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
118         (WebCore::RenderLayer::paint):
119         (WebCore::performOverlapTests):
120         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
121         (WebCore::RenderLayer::paintList):
122         (WebCore::RenderLayer::collectFragments):
123         (WebCore::RenderLayer::updatePaintingInfoForFragments):
124         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
125         (WebCore::RenderLayer::calculateClipRects):
126
127 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
128
129         nullptr cleanup in RenderLayer
130         https://bugs.webkit.org/show_bug.cgi?id=143174
131
132         Reviewed by Ryosuke Niwa.
133
134         Replace 0 with nullptr in RenderLayer.cpp.
135
136         * rendering/RenderLayer.cpp:
137         (WebCore::RenderLayer::filterRenderer):
138         (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
139         (WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll):
140         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
141         (WebCore::RenderLayer::enclosingOverflowClipLayer):
142         (WebCore::RenderLayer::enclosingCompositingLayer):
143         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
144         (WebCore::RenderLayer::enclosingFilterLayer):
145         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
146         (WebCore::RenderLayer::clippingRootForPainting):
147         (WebCore::RenderLayer::transparentPaintingAncestor):
148         (WebCore::transparencyClipBox):
149         (WebCore::RenderLayer::removeChild):
150         (WebCore::RenderLayer::removeOnlyThisLayer):
151         (WebCore::RenderLayer::insertOnlyThisLayer):
152         (WebCore::accumulateOffsetTowardsAncestor):
153         (WebCore::RenderLayer::enclosingScrollableArea):
154         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
155         (WebCore::RenderLayer::enclosingElement):
156         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
157         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
158         (WebCore::RenderLayer::hitTestLayer):
159         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
160         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
161         (WebCore::RenderLayer::hitTestList):
162         (WebCore::RenderLayer::updateClipRects):
163         (WebCore::RenderLayer::clipRects):
164         (WebCore::RenderLayer::calculateClipRects):
165
166 2015-03-27  Gwang Yoon Hwang  <yoon@igalia.com>
167
168         [TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
169         https://bugs.webkit.org/show_bug.cgi?id=142386
170
171         Reviewed by Žan Doberšek.
172
173         TextureMapper and TextureMapperGL are bloated and tightly coupled with
174         BitmapTexture. We should move these classes to seperated file of their own.
175         Also, this patch removes friend relationship from TextureMapperGL and  its
176         subsidiary classes.
177
178         The main purpose of this refactoring is to expose BitmapTexturePool to
179         renderers of platformlayers like Video and Canvas. By doing this, each
180         renderer can acquire textures from the global texture pool to paint
181         their contents directly.
182
183         No new tests needed.
184
185         * PlatformEfl.cmake:
186         * PlatformGTK.cmake:
187         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
188         Include BitmapTextureGL and BitmapTexturePool explicitly
189
190         * platform/graphics/texmap/BitmapTexture.cpp: Added.
191         * platform/graphics/texmap/BitmapTexture.h: Added.
192         (WebCore::BitmapTexture::updateContents):
193         Exclude BitmapTexture class from TextureMapper
194
195         * platform/graphics/texmap/BitmapTextureGL.cpp: Added.
196         * platform/graphics/texmap/BitmapTextureGL.h: Added.
197         Exclude BitmapTextureGL class from TextureMapperGL
198         (WebCore::BitmapTextureGL::clipStack): Added.
199         Add the getter for clipStack for TextureMapperGL
200         (WebCore::BitmapTextureGL::Bind): Deleted.
201         (WebCore::BitmapTextureGL::BindAsSurface): Added.
202         Bind used TextureMapperGL's internal data directly to compute projection matrix as a friend class,
203         However, TextureMapperGL can compute projection matrix itself after binding job, so this
204         friend ship is not needed. Also, this patch renames Bind to BindAsSurface to remove ambiguity.
205
206         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Added.
207         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Added.
208         Exclude BitmapTextureImageBuffer class from TextureMapperImageBuffer
209
210         * platform/graphics/texmap/BitmapTexturePool.cpp: Added.
211         * platform/graphics/texmap/BitmapTexturePool.h: Added.
212         Exclude BitmapTexturePool class from TextureMapperGL
213         (WebCore::BitmapTexturePool::acquireTexture):
214         Modified to use passed GraphicsContext3D instead of TextureMapperGL to remove redundant coupling
215
216         * platform/graphics/texmap/TextureMapper.cpp:
217         * platform/graphics/texmap/TextureMapper.h:
218         Remove BitmapTexturePool and BitmapTexture from its implementation.
219
220         * platform/graphics/texmap/TextureMapperGL.cpp:
221         * platform/graphics/texmap/TextureMapperGL.h:
222         Remove BitmapTextureGL from its implementation.
223         (WebCore::TextureMapperGL::TextureMapperGL):
224         (WebCore::TextureMapperGL::clipStack):
225         (WebCore::TextureMapperGL::bindSurface):
226         (WebCore::TextureMapperGL::currentSurface):
227         Add a getter of the current surface for filtering operation in BitmapTextureGL.
228         It would be clear to move filtering operation from BitmapTextureGL to TextureMapperGL later.
229
230         (WebCore::TextureMapperGL::ClipStack):
231         Move inner class declaration to public.
232
233         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
234         * platform/graphics/texmap/TextureMapperImageBuffer.h:
235         Remove BitmapTextureImageBuffer from its implementation.
236
237 2015-03-27  Tim Horton  <timothy_horton@apple.com>
238
239         WebProcess started by editable WKWebView spends 15% of its initialization time loading DataDetectors
240         https://bugs.webkit.org/show_bug.cgi?id=143142
241         <rdar://problem/20324495>
242
243         Reviewed by Anders Carlsson.
244
245         Calling DataDetectorsLibrary() is expensive; we should avoid doing it
246         until actually necessary. When loading a page that makes a caret selection,
247         ServicesOverlayController was calling DataDetectorsLibrary() (ignoring the fact
248         that a caret selection can't have any services associated with it) to avoid
249         crashing on systems where DataDetectors is not available. Instead, we should
250         first check if there's anything to do, and then check for the existence
251         of DataDetectors.
252
253         * page/mac/ServicesOverlayController.mm:
254         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
255         Build the list of phone number ranges, and bail (clearing the potential highlights)
256         if it is empty, before calling DataDetectorsLibrary().
257
258         (WebCore::ServicesOverlayController::buildSelectionHighlight):
259         Check the list of selection rects, and bail (clearing the potential highlights)
260         if it is empty, before calling DataDetectorsLibrary().
261
262 2015-03-27  Jer Noble  <jer.noble@apple.com>
263
264         [Mac] Safari fails to fire page "load" event with video[preload=none]
265         https://bugs.webkit.org/show_bug.cgi?id=143147
266
267         Reviewed by Simon Fraser.
268
269         Test: media/video-page-load-preload-none.html
270
271         When told to load() when preload == None, set the networkState to Idle.
272         This causes HTMLMediaElement to set the shouldDelayLoadEvent flag to
273         false, and allows the page's 'load' event to fire.
274
275         Drive-by fix: add setNetworkState() and setReadyState() methods to
276         MediaPlayerPrivateAVFoundation, reducing a bunch of code duplication.
277
278         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
279         (WebCore::MediaPlayerPrivateAVFoundation::load):
280         (WebCore::MediaPlayerPrivateAVFoundation::setNetworkState):
281         (WebCore::MediaPlayerPrivateAVFoundation::setReadyState):
282         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
283         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
284
285 2015-03-27  Alexey Proskuryakov  <ap@apple.com>
286
287         Calling crypto.webkitSubtle.generateKey causes page memory to never be released
288         https://bugs.webkit.org/show_bug.cgi?id=143151
289         rdar://problem/18940687
290
291         Reviewed by Tim Horton.
292
293         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair): Don't.
294
295 2015-03-27  Brent Fulgham  <bfulgham@apple.com>
296
297         Null dereference in InbandMetadataTextTrack handling
298         https://bugs.webkit.org/show_bug.cgi?id=143144
299         <rdar://problem/18983250>
300
301         Reviewed by Eric Carlson.
302
303         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
304         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): Check for null return value from
305         'client()', just like we do in all other methods.
306
307 2015-03-27  Oliver Hunt  <oliver@apple.com>
308
309         Forward additional CFNetwork ATS information to child processes
310         https://bugs.webkit.org/show_bug.cgi?id=143136
311
312         Reviewed by Anders Carlsson.
313
314         Declare SPI.
315
316         * platform/spi/cf/CFNetworkSPI.h:
317
318 2015-03-27  Chris Dumez  <cdumez@apple.com>
319
320         [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
321         https://bugs.webkit.org/show_bug.cgi?id=143125
322         <rdar://problem/20321172>
323
324         Reviewed by Antti Koivisto.
325
326         Export a couple of extra symbols.
327
328         * platform/network/ResourceResponseBase.h:
329
330 2015-03-27  Jer Noble  <jer.noble@apple.com>
331
332         HTMLMediaElement will fire 'seeked' before seek completes, leading to currentTime discontinuities.
333         https://bugs.webkit.org/show_bug.cgi?id=143132
334
335         Reviewed by Eric Carlson.
336
337         When seeking, if the ready state rises to >= HAVE_CURRENT_DATA, we will fire the 'seeked'
338         event and continue playback. However, if a media engine updates the ready state before its
339         seek operation actually completes, the currentTime it returns may still be the time before
340         the seek.
341
342         Wait until both the ready state rises to HAVE_CURRENT_DATA and m_player->seeking() returns
343         false before firing the 'seeked' event.
344
345         * html/HTMLMediaElement.cpp:
346         (WebCore::HTMLMediaElement::parseAttribute):
347
348 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
349
350         Make some more objects use FastMalloc
351         https://bugs.webkit.org/show_bug.cgi?id=143122
352
353         Reviewed by Csaba Osztrogonác.
354
355         * Modules/geolocation/GeolocationController.h:
356         * Modules/geolocation/NavigatorGeolocation.h:
357         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
358         * Modules/notifications/NotificationController.h:
359         * Modules/webdatabase/DatabaseServer.h:
360         * css/CSSFontFaceSource.h:
361         * html/HTMLMediaSession.h:
362         * inspector/InspectorIndexedDBAgent.h:
363         * inspector/InspectorReplayAgent.h:
364         * page/CaptionUserPreferencesMediaAF.h:
365         * page/PageConsoleClient.h:
366         * page/PageDebuggable.h:
367         * page/animation/CSSPropertyAnimation.cpp:
368         * page/mac/ServicesOverlayController.h:
369         * platform/RemoteCommandListener.h:
370         * platform/Timer.h:
371         * platform/audio/MediaSessionManager.h:
372         * platform/mac/SystemSleepListenerMac.h:
373         * platform/mac/ThemeMac.h:
374         * rendering/svg/RenderSVGResourceSolidColor.h:
375         * replay/ReplayController.h:
376
377 2015-03-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
378
379         FEMorphology::platformApplyGeneric() should bail out if the radius is less than or equal to zero.
380         https://bugs.webkit.org/show_bug.cgi?id=142885.
381
382         Reviewed by Dean Jackson.
383
384         FEMorphology class implementation code clean up.
385         
386         Tests: svg/filters/feMorphology-radius-cases.svg
387
388         * platform/graphics/filters/FEMorphology.cpp:
389         (WebCore::shouldSupersedeExtremum): Reuse code instead of repeating it and
390         use < and > instead of =< and >=.
391         
392         (WebCore::pixelArrayIndex): Returns the array index of a pixel in an image
393         buffer, given: position(x, y), image width and the color channel.
394         
395         (WebCore::columnExtremum): Returns the extremum of a column of pixels.
396         
397         (WebCore::kernelExtremum): Returns the extremum of a filter kernel.
398         
399         (WebCore::FEMorphology::platformApplyGeneric): Apply some code clean-up.
400         The kernel size should be equal to radius of the filter. The extra pixel
401         was causing the resulted image to be asymmetric in some cases.
402         
403         (WebCore::FEMorphology::platformApplyDegenerate):
404         (WebCore::FEMorphology::platformApplySoftware): After applying scaling, we
405         still need to check the resulted radius is negative (overflow case) or less
406         than one (zero radius case) and treat these cases differently.
407         
408         (WebCore::FEMorphology::morphologyOperator): Deleted.
409         (WebCore::FEMorphology::radiusX): Deleted.
410         (WebCore::FEMorphology::radiusY): Deleted.
411         * platform/graphics/filters/FEMorphology.h:
412         (WebCore::FEMorphology::morphologyOperator):
413         (WebCore::FEMorphology::radiusX):
414         (WebCore::FEMorphology::radiusY):
415         Move a single line functions from the source file to the header file.
416
417 2015-03-27  Antti Koivisto  <antti@apple.com>
418
419         Move CacheValidation to platform
420         https://bugs.webkit.org/show_bug.cgi?id=143133
421
422         Reviewed by Chris Dumez.
423
424         It deals with platform types only and is currently violating layering.
425
426         * WebCore.xcodeproj/project.pbxproj:
427         * loader/cache/CacheValidation.cpp: Removed.
428         * loader/cache/CacheValidation.h: Removed.
429         * platform/network/CacheValidation.cpp: Copied from Source/WebCore/loader/cache/CacheValidation.cpp.
430         * platform/network/CacheValidation.h: Copied from Source/WebCore/loader/cache/CacheValidation.h.
431
432 2015-03-27  Commit Queue  <commit-queue@webkit.org>
433
434         Unreviewed, rolling out r177896.
435         https://bugs.webkit.org/show_bug.cgi?id=142978
436
437         Loading libgstclutter.so in-process hangs web process
438         (Requested by mcatanzaro on #webkit).
439
440         Reverted changeset:
441
442         "[GStreamer] Disable gst-plugin-scanner if seccomp filters are
443         enabled"
444         https://bugs.webkit.org/show_bug.cgi?id=140069
445         http://trac.webkit.org/changeset/177896
446
447 2015-03-26  Antti Koivisto  <antti@apple.com>
448
449         Respect cache-control directives in request
450         https://bugs.webkit.org/show_bug.cgi?id=143121
451         rdar://problem/19714040
452
453         Reviewed by Chris Dumez.
454
455         Test: http/tests/cache/disk-cache/disk-cache-request-headers.html
456
457         * loader/cache/CacheValidation.cpp:
458         (WebCore::isCacheHeaderSeparator):
459         (WebCore::isControlCharacter):
460         (WebCore::trimToNextSeparator):
461         (WebCore::parseCacheHeader):
462         (WebCore::parseCacheControlDirectives):
463
464             Factor Cache-control parsing here so it can be used for both requests and responses.
465
466         * loader/cache/CacheValidation.h:
467         * platform/network/ResourceRequestBase.h:
468         * platform/network/ResourceResponseBase.cpp:
469         (WebCore::ResourceResponseBase::ResourceResponseBase):
470         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
471         (WebCore::ResourceResponseBase::cacheControlContainsNoCache):
472         (WebCore::ResourceResponseBase::cacheControlContainsNoStore):
473         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
474         (WebCore::ResourceResponseBase::cacheControlMaxAge):
475         (WebCore::isCacheHeaderSeparator): Deleted.
476         (WebCore::isControlCharacter): Deleted.
477         (WebCore::trimToNextSeparator): Deleted.
478         (WebCore::parseCacheHeader): Deleted.
479         * platform/network/ResourceResponseBase.h:
480
481 2015-03-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
482
483         [GStreamer] share GL context in pipeline, part 2
484         https://bugs.webkit.org/show_bug.cgi?id=143049
485
486         Reviewed by Carlos Garcia Campos.
487
488         This patch, instead of cluttering the GstGL attributes creation in
489         ::handleSyncMessage(), creates a new method ::ensureGstGLContext(),
490         where those attributes are defined. This method is guarded by
491         USE(GSTREAMER_GL)
492
493         ::handlSyncMessage() shall return nothing, according to GStreamer
494         documentation, not a boolean.
495
496         The GstGL attributes are now GRefPtr<> to avoid memory leaks.
497
498         The GstGLAPI and GstGLPlatform are now set given by the pre-processor
499         directives, and the code in ::ensureGstGLContext() is simpler.
500
501         No new tests because this is platform specific and it depends in the
502         run-time availability and configurations of GstGL elements.
503
504         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
505         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
506         Don't initialise the GstGL attributes since are GRefPtr<>
507         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Changed the
508         signature to use void instead of gboolean.
509         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): New method.
510         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
511
512 2015-03-26  Jeremy Jones  <jeremyj@apple.com>
513
514         Optimized Fullscreen fails to cleanup because of no longer necessary release of m_playerController in exitFullscreen()
515         https://bugs.webkit.org/show_bug.cgi?id=143120
516
517         Reviewed by Eric Carlson.
518
519         We used to release m_playerController in WebVideoFullscreenInterfaceAVKit::exitFullscreen() in order to make sure 
520         media state was reset. This is no longer necessary as we now have a way the model can explicitly request resetting the
521         media state via resetMediaState(). m_playerController is already released in 
522         WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal(). Releasing it prematurely can actually prevent the exit
523         fullscreen process from completing successfully.
524
525         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
526         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
527
528 2015-03-26  Zalan Bujtas  <zalan@apple.com>
529
530         Inline continuation code should not take anonymous containing wrapper granted.
531         https://bugs.webkit.org/show_bug.cgi?id=133312
532
533         Reviewed by Dave Hyatt.
534
535         It's wrong to assume that when RenderInline is part of an inline continuation, its containing block
536         is an anonymous wrapper and its sibling might be a block level renderer.
537         When the inline continuation is no longer needed, for example when the block level renderer that initiated the continuation
538         is detached from the render tree, the inline renderes still continue to form continuation.(however they no longer require
539         anonymous wrappers)
540
541         Test: fast/inline/crash-when-position-property-is-changed-and-no-longer-in-continuation.html
542
543         * rendering/RenderInline.cpp:
544         (WebCore::updateStyleOfAnonymousBlockContinuations):
545         (WebCore::RenderInline::styleDidChange):
546
547 2015-03-26  Tim Horton  <timothy_horton@apple.com>
548
549         REGRESSION (r181358 and r181507): Lots of sites think that we support touch events on OS X
550         https://bugs.webkit.org/show_bug.cgi?id=142888
551         <rdar://problem/20227304>
552
553         Reviewed by Beth Dakin.
554
555         * dom/Document.idl:
556         * dom/Element.idl:
557         * html/HTMLBodyElement.idl:
558         * html/HTMLFrameSetElement.idl:
559         * page/DOMWindow.idl:
560         Re-conditionalize a lot of event listeners; sites test ("ontouchstart" in window), which
561         is not covered by NotEnumerable, and so r181358 and r181507 broke a bunch of sites
562         (apple.com, blaze.com, anything using nicescroll.js, etc.) by causing them to think
563         that (Mac) Safari was touch-enabled.
564
565 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
566
567         "lineNo" does not match WebKit coding style guidelines
568         https://bugs.webkit.org/show_bug.cgi?id=143119
569
570         Reviewed by Michael Saboff.
571
572         We can afford to use whole words.
573
574         * bindings/js/JSLazyEventListener.cpp:
575         (WebCore::JSLazyEventListener::initializeJSFunction):
576         * bindings/js/JSMainThreadExecStateInstrumentation.h:
577         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
578         * inspector/InspectorDOMAgent.cpp:
579         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
580         * testing/Internals.cpp:
581         (WebCore::Internals::parserMetaData):
582
583 2015-03-26  Roger Fong  <roger_fong@apple.com>
584
585         Apply blur effect to media control background.
586         https://bugs.webkit.org/show_bug.cgi?id=143116.
587         <rdar://problem/20316964>.
588
589         Reviewed by Brent Fulgham.
590
591         There are still a few issues, like the borders of the controls being blurred with black,
592         and the volume slider background not showing the blur effect. Will fix those separately.
593
594         Add CSS for new divs to create blur effect using back drop filters and blend modes.
595         * Modules/mediacontrols/mediaControlsApple.css:
596         (audio::-webkit-media-controls-panel):
597         (audio::-webkit-media-controls-panel-tint):
598         (audio::-webkit-media-controls-panel-background):
599         (audio::-webkit-media-controls-panel .volume-box):
600         (audio::-webkit-media-controls-volume-slider-container-background):
601         (audio::-webkit-media-controls-volume-slider-container-tint):
602         (audio::-webkit-media-controls-toggle-closed-captions-button): Adjust fill.
603         (audio::-webkit-media-controls-fullscreen-button): Adjust fill.
604         (audio::-webkit-media-controls-fullscreen-button.exit): Adjust fill.
605         (video:-webkit-full-screen::-webkit-media-controls-panel):
606         (audio:-webkit-full-screen::-webkit-media-controls-panel-tint):
607         (audio:-webkit-full-screen::-webkit-media-controls-panel-background):
608         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
609         (video:-webkit-full-screen::-webkit-media-controls-play-button):
610         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
611         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
612         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
613         (video:-webkit-full-screen::-webkit-media-controls-status-display):
614         (audio::-webkit-media-controls-panel .volume-box:active): Deleted.
615         * Modules/mediacontrols/mediaControlsApple.js:
616         (Controller.prototype.createControls):
617         (Controller.prototype.configureInlineControls): Add new divs for blurred background effect.
618         (Controller.prototype.configureFullScreenControls): Ditto.
619         (Controller.prototype.handlePanelMouseDown): The tint div is now in front.
620         (Controller.prototype.drawTimelineBackground): Adjust colors to make border look better with new background.
621         (Controller.prototype.drawVolumeBackground): Ditto.
622
623 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
624
625         Assertion firing in JavaScriptCore/parser/parser.h for statesman.com site
626         https://bugs.webkit.org/show_bug.cgi?id=142974
627
628         Reviewed by Joseph Pecoraro.
629
630         * bindings/js/JSLazyEventListener.cpp:
631         (WebCore::JSLazyEventListener::initializeJSFunction): Use the new override
632         line number API to guarantee that errors will map to the .html file locations
633         that we like.
634
635         * bindings/js/ScriptController.cpp:
636         (WebCore::ScriptController::eventHandlerPosition): Added a FIXME to cover
637         some cases where our line and column numbers are still nonsense.
638
639 2015-03-26  Beth Dakin  <bdakin@apple.com>
640
641         Relevant repainted objects callback is inaccurate and inconsistent for PDF 
642         documents
643         https://bugs.webkit.org/show_bug.cgi?id=143118
644         -and corresponding-
645         rdar://problem/13371582
646
647         Reviewed by Tim Horton.
648
649         Investigating this bug resulted in finding two things that should change for the 
650         relevant repainted objects heuristic. First, we should not count any objects 
651         painted while updating control tints. And secondly, we should not use it at all 
652         for plugin documents. In other documents, we count the plugin area as “painted” 
653         when we get to paint whether or not the plugin has actually loaded. This is 
654         intentional because it allows us to account for chunks of the page that will be 
655         filled in by possibly slow-loading ads. However, if the plugin is the whole 
656         document, then the heuristic just doesn’t make any sense and it leads to 
657         inconsistent behavior at different window sizes. So we’ll only count plugins when 
658         the document is not a plugin document. 
659
660         Don’t count objects during this paint!
661         * page/FrameView.cpp:
662         (WebCore::FrameView::updateControlTints):
663         * page/Page.h:
664         (WebCore::Page::setIsCountingRelevantRepaintedObjects):
665
666         Make sure the document is not a plugin document.
667         * rendering/RenderEmbeddedObject.cpp:
668         (WebCore::RenderEmbeddedObject::paint):
669
670 2015-03-26  Alex Christensen  <achristensen@webkit.org>
671
672         Progress towards CMake on Mac.
673         https://bugs.webkit.org/show_bug.cgi?id=143112
674
675         Reviewed by Chris Dumez.
676
677         * CMakeLists.txt:
678         * PlatformEfl.cmake:
679         * PlatformGTK.cmake:
680         * PlatformMac.cmake:
681         * platform/graphics/mac/IconMac.mm:
682
683 2015-03-26  Jer Noble  <jer.noble@apple.com>
684
685         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
686         https://bugs.webkit.org/show_bug.cgi?id=142970
687
688         Reviewed by Eric Carlson.
689
690         isMainThread() will (ironically) return true if called from the web thread. Rather than dispatch
691         synchronously to the main thread to allocate the _volumeView, dispatch asynchronously and handle
692         the case where the MPVolumeView has not yet been created.
693
694         * platform/audio/ios/MediaSessionManagerIOS.mm:
695         (-[WebMediaSessionHelper allocateVolumeView]): Dispatch to the main thread to allocate. Move notification
696             registration to -setVolumeView:.
697         (-[WebMediaSessionHelper setVolumeView:]): Added. Register/Unregister for route availablitiy notifications.
698         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Handle the possibility of a nil _volumeView.
699
700 2015-03-26  Benjamin Poulain  <bpoulain@apple.com>
701
702         Fix state maching debugging after r181964
703         https://bugs.webkit.org/show_bug.cgi?id=143082
704
705         Reviewed by Alex Christensen.
706
707         * contentextensions/ContentExtensionCompiler.cpp:
708         (WebCore::ContentExtensions::compileRuleList):
709
710 2015-03-25  David Hyatt  <hyatt@apple.com>
711
712         Improve the offsetWidth/Height layout optimization
713         https://bugs.webkit.org/show_bug.cgi?id=143008
714
715         Reviewed by Zalan Bujtas.
716
717         * dom/Document.cpp:
718         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
719         * dom/Document.h:
720         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
721         the positioning restrictions on the optimization check.
722
723         * dom/Element.cpp:
724         (WebCore::Element::offsetWidth):
725         (WebCore::Element::offsetHeight):
726         Change to use Element& instead of Element*.
727
728         (WebCore::Element::clientWidth):
729         (WebCore::Element::clientHeight):
730         (WebCore::Element::scrollWidth):
731         (WebCore::Element::scrollHeight):
732         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
733
734 2015-03-26  Brady Eidson  <beidson@apple.com>
735
736         Apply ContentExtension actions after redirects.
737         <rdar://problem/20062613> and https://bugs.webkit.org/show_bug.cgi?id=143055
738
739         Reviewed by Alex Christensen.
740
741         Tests: http/tests/contentextensions/loading/main-resource-redirect-blocked.php
742                http/tests/contentextensions/subresource-redirect-blocked.html
743
744         This patch moves the "run a URL against the content extension" code from CachedResourceLoader to
745         the ContentExtensionsBackend.
746
747         That allows it to be shared between the CachedResourceLoader where loads are initiated and 
748         ResourceLoader where redirects are handled.
749
750         * contentextensions/ContentExtension.cpp:
751         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
752
753         * contentextensions/ContentExtensionsBackend.cpp:
754         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
755         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
756         * contentextensions/ContentExtensionsBackend.h:
757
758         * loader/NetscapePlugInStreamLoader.cpp:
759         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
760
761         * loader/ResourceLoadInfo.h:
762
763         * loader/ResourceLoader.cpp:
764         (WebCore::ResourceLoader::ResourceLoader):
765         (WebCore::ResourceLoader::willSendRequest):
766         * loader/ResourceLoader.h:
767
768         * loader/SubresourceLoader.cpp:
769         (WebCore::SubresourceLoader::SubresourceLoader):
770
771         * loader/cache/CachedResourceLoader.cpp:
772         (WebCore::CachedResourceLoader::requestResource):
773
774         * page/UserContentController.cpp:
775         (WebCore::UserContentController::processContentExtensionRulesForLoad):
776         (WebCore::UserContentController::actionsForResourceLoad): Deleted.
777         (WebCore::UserContentController::globalDisplayNoneStyleSheet): Deleted.
778         (WebCore::UserContentController::displayNoneCSSRule): Deleted.
779         * page/UserContentController.h:
780
781 2015-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
782
783         Crash when laying out (char)0
784         https://bugs.webkit.org/show_bug.cgi?id=143103
785
786         Reviewed by Dean Jackson.
787
788         We currently cache a character -> Font mapping in a HashMap.
789         However, keys in Hashmaps can't be 0. This patch simply skips
790         the cache in this case.
791
792         No new tests, for now. I'm having trouble creating a test because
793         the site that causes this bug generates their page using script,
794         and the script is all minified, and difficult to understand. I
795         will contact the owner of the site and ask for and unminified
796         version of their sources. However, I don't want to that to block
797         this tiny fix from going in.
798
799         * platform/graphics/Font.cpp:
800         (WebCore::Font::systemFallbackFontForCharacter):
801
802 2015-03-26  Jer Noble  <jer.noble@apple.com>
803
804         [Mac][EME] Crash at com.apple.WebCore: WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys + 177
805         https://bugs.webkit.org/show_bug.cgi?id=143080
806
807         Reviewed by Eric Carlson.
808
809         Null-check m_certificate before dereferencing.
810
811         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
812         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
813
814 2015-03-26  Chris Fleizach  <cfleizach@apple.com>
815
816         AX: [role="button"][aria-pressed] should be exposed as AXCheckbox:AXToggleButton, with role description of "toggle button"
817         https://bugs.webkit.org/show_bug.cgi?id=115298
818
819         Reviewed by Mario Sanchez Prada.
820
821         A role=button + aria-pressed object should be exposed as AXCheckbox on Mac now. It should also convert the
822         aria-pressed state into a 0, 1, 2 number value for the Mac.
823
824         Test: platform/mac/accessibility/aria-pressed-button-attributes.html
825
826         * accessibility/AccessibilityObject.cpp:
827         (WebCore::AccessibilityObject::checkboxOrRadioValue):
828         * accessibility/AccessibilityObject.h:
829         (WebCore::AccessibilityObject::isToggleButton):
830         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
831         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
832         (createAccessibilityRoleMap):
833         (-[WebAccessibilityObjectWrapper subrole]):
834         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
835
836 2015-03-25  Dean Jackson  <dino@apple.com>
837
838         CSS blend modes do not parse when in the shadow tree
839         https://bugs.webkit.org/show_bug.cgi?id=143067
840         <rdar://problem/20302662>
841
842         Reviewed by Anders Carlson.
843
844         The media controls style sheets are injected as UA stylesheets
845         when we come across a <video> or <audio> element. These stylesheets
846         have a different parsing context than the document stylesheets -
847         one that uses the default constructor, which initializes some
848         features like cssCompositingEnabled to false without checking
849         the runtime state.
850
851         The easy fix is to use the global state to initialize the context.
852
853         Unfortunately we can't test this since it only occurs in the shadow
854         tree.
855
856         * css/CSSParser.cpp:
857         (WebCore::CSSParserContext::CSSParserContext): Check the state
858         of RuntimeEnabledFeatures to initialize CSS Regions and
859         CSS Compositing (Blending).
860
861 2015-03-25  Chris Fleizach  <cfleizach@apple.com>
862
863         AX: table cells that use display:block render the table inaccessible to VoiceOver
864         https://bugs.webkit.org/show_bug.cgi?id=143007
865
866         Reviewed by Mario Sanchez Prada.
867
868         When display:block is used on a table cell, it was being ignored because it was anonymous.
869         This is still a valid scenario however if it's still inside of a valid table.
870
871         Test: accessibility/table-cell-display-block.html
872
873         * accessibility/AccessibilityTableCell.cpp:
874         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
875
876 2015-03-25  Tim Horton  <timothy_horton@apple.com>
877
878         Add a preference to prevent "user-scalable=no" from having any effect
879         https://bugs.webkit.org/show_bug.cgi?id=143032
880
881         Reviewed by Sam Weinig.
882
883         * page/ViewportConfiguration.cpp:
884         (WebCore::ViewportConfiguration::ViewportConfiguration):
885         (WebCore::ViewportConfiguration::allowsUserScaling):
886         * page/ViewportConfiguration.h:
887         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
888         If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
889
890 2015-03-25  Dan Bernstein  <mitz@apple.com>
891
892         Another attempt to get the iOS EWS building again.
893
894         * WebCore.xcodeproj/project.pbxproj:
895
896 2015-03-25  Alex Christensen  <achristensen@webkit.org>
897
898         Add case-insensitive checks to DFA bytecode.
899         https://bugs.webkit.org/show_bug.cgi?id=142977
900
901         Reviewed by Benjamin Poulain.
902
903         * contentextensions/DFABytecode.h:
904         (WebCore::ContentExtensions::instructionSizeWithArguments):
905         * contentextensions/DFABytecodeCompiler.cpp:
906         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
907         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
908         Add case-insensitive bytecode.
909         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
910         Check to see if case-insensitive bytecodes can be used.
911         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
912         * contentextensions/DFABytecodeCompiler.h:
913         (WebCore::ContentExtensions::DFABytecodeCompiler::Range::Range):
914         Added Range structure to be able to count the ranges in a future patch deciding if we want to use jump tables.
915         * contentextensions/DFABytecodeInterpreter.cpp:
916         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
917         Interpret case-insensitive bytecodes.
918
919 2015-03-25  Sam Weinig  <sam@webkit.org>
920
921         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
922
923         * contentextensions/ContentExtensionCompiler.cpp:
924         (WebCore::ContentExtensions::compileRuleList):
925         * contentextensions/ContentExtensionCompiler.h:
926         * contentextensions/ContentExtensionParser.cpp:
927         (WebCore::ContentExtensions::getTypeFlags):
928
929 2015-03-25  Sam Weinig  <sam@webkit.org>
930
931         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
932         https://bugs.webkit.org/show_bug.cgi?id=143059
933
934         Reviewed by Alex Christensen.
935
936         * WebCore.xcodeproj/project.pbxproj:
937         Add ContentExtensionError.h/cpp.
938
939         * contentextensions/ContentExtensionError.cpp: Added.
940         (WebCore::ContentExtensions::contentExtensionErrorCategory):
941         * contentextensions/ContentExtensionError.h: Added.
942         (WebCore::ContentExtensions::make_error_code):
943         Add ContentExtensionError enum and std::error_code adaptor.
944
945         * contentextensions/ContentExtensionCompiler.h:
946         Instead of returning CompiledContentExtensionData, use a client interface
947         to pass data. Eventually, this should be turned into a direct streaming 
948         interface so we can write directly to a file.
949
950         * contentextensions/ContentExtensionCompiler.cpp:
951         (WebCore::ContentExtensions::compileRuleList):
952         * contentextensions/ContentExtensionParser.cpp:
953         (WebCore::ContentExtensions::getTypeFlags):
954         (WebCore::ContentExtensions::loadTrigger):
955         (WebCore::ContentExtensions::loadAction):
956         (WebCore::ContentExtensions::loadRule):
957         (WebCore::ContentExtensions::loadEncodedRules):
958         (WebCore::ContentExtensions::parseRuleList):
959         * contentextensions/ContentExtensionParser.h:
960         Convert to return an error.
961
962 2015-03-25  Beth Dakin  <bdakin@apple.com>
963
964         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
965         force preview
966         https://bugs.webkit.org/show_bug.cgi?id=143057
967         -and corresponding-
968         rdar://problem/20251436
969
970         Reviewed by Tim Horton.
971
972         This patch adds a value for ActionUpdated to the ImmediateActionStage enum. Now if 
973         m_immediateActionStage indicates that an immediate action has either begun or 
974         completed then we can have the same behavior.
975         * page/EventHandler.cpp:
976         (WebCore::EventHandler::handleMouseReleaseEvent):
977         * page/EventHandler.h:
978
979 2015-03-25  Dean Jackson  <dino@apple.com>
980
981         MediaControls: Use font with fixed number width
982         https://bugs.webkit.org/show_bug.cgi?id=143018
983         <rdar://problem/20245415>
984
985         Reviewed by Eric Carlson.
986
987         Add a new font-family, specific to Apple platforms,
988         called -apple-system-font-monospaced-numbers. This is
989         a special variant of the system font which uses monospaced
990         forms for the number glyphs - allowing a time reading that
991         doesn't bounce around as the time changes.
992
993         * Modules/mediacontrols/mediaControlsApple.css: Media controls should
994         use the new font.
995         (audio::-webkit-media-controls-time-remaining-display):
996         * Modules/mediacontrols/mediaControlsiOS.css:
997         (audio::-webkit-media-controls-time-remaining-display):
998
999         * platform/graphics/ios/FontCacheIOS.mm: Request a new CTFontRef with
1000         the appropriate attributes.
1001         (WebCore::createCTFontWithFamilyNameAndWeight):
1002         * platform/graphics/mac/FontCacheMac.mm: Ditto, but NSFont.
1003         (WebCore::fontWithFamily):
1004         * platform/spi/cocoa/CoreTextSPI.h: Expose the constants for
1005         the new form so that the public SDK can build.
1006
1007 2015-03-25  Alex Christensen  <achristensen@webkit.org>
1008
1009         [Content Extensions] Add multi-DFA compiling and interpreting.
1010         https://bugs.webkit.org/show_bug.cgi?id=143010
1011
1012         Reviewed by Benjamin Poulain.
1013
1014         * contentextensions/ContentExtensionCompiler.cpp:
1015         (WebCore::ContentExtensions::compileRuleList):
1016         Compile multiple NFAs to DFAs.
1017         * contentextensions/ContentExtensionsBackend.cpp:
1018         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1019         Fixed a bug when there are no non-universal actions.
1020         We still need to report that no ignore-previous-rules was hit to apply the
1021         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
1022         and skipped in DFABytecodeInterpreter::interpret.
1023         * contentextensions/DFABytecodeCompiler.cpp:
1024         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1025         Add a header for each DFA.
1026         * contentextensions/DFABytecodeInterpreter.cpp:
1027         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1028         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1029         Interpret as many DFAs as there are in the bytecode.
1030
1031 2015-03-25  Per Arne Vollan  <peavo@outlook.com>
1032
1033         [Win] Illegal character in project file.
1034         https://bugs.webkit.org/show_bug.cgi?id=143051
1035
1036         Reviewed by Brent Fulgham.
1037
1038         There is an illegal character in the WebCore project filter.
1039         WebCore files are shown unfiltered.
1040
1041         * WebCore.vcxproj/WebCore.vcxproj.filters:
1042
1043 2015-03-25  David Hyatt  <hyatt@apple.com>
1044
1045         Add a pref to enable the new block-inside-inline model
1046         https://bugs.webkit.org/show_bug.cgi?id=143050
1047
1048         Reviewed by Sam Weinig.
1049
1050         * page/Settings.in:
1051
1052 2015-03-25  Dan Bernstein  <mitz@apple.com>
1053
1054         iOS Simulator build fix.
1055
1056         * platform/spi/cocoa/IOSurfaceSPI.h:
1057
1058 2015-03-25  Commit Queue  <commit-queue@webkit.org>
1059
1060         Unreviewed, rolling out r181932.
1061         https://bugs.webkit.org/show_bug.cgi?id=143041
1062
1063         The test fails most of the time on bots (Requested by ap on
1064         #webkit).
1065
1066         Reverted changeset:
1067
1068         "[Content Extensions] Add multi-DFA compiling and
1069         interpreting."
1070         https://bugs.webkit.org/show_bug.cgi?id=143010
1071         http://trac.webkit.org/changeset/181932
1072
1073 2015-03-24  Dean Jackson  <dino@apple.com>
1074
1075         Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
1076         https://bugs.webkit.org/show_bug.cgi?id=143039
1077
1078         Unreviewed build fix for newer versions of OS X.
1079
1080         * rendering/RenderThemeMac.mm: Define a null language parameter. This
1081         seemed better than turning the clang warning off for just that
1082         function.
1083         (WebCore::AttachmentLayout::layOutTitle):
1084         (WebCore::AttachmentLayout::layOutSubtitle):
1085
1086 2015-03-24  Dan Bernstein  <mitz@apple.com>
1087
1088         Another attempt to fix the build.
1089
1090         * WebCore.xcodeproj/project.pbxproj:
1091         * platform/spi/cocoa/QuartzCoreSPI.h:
1092
1093 2015-03-24  Alex Christensen  <achristensen@webkit.org>
1094
1095         [Content Extensions] Add multi-DFA compiling and interpreting.
1096         https://bugs.webkit.org/show_bug.cgi?id=143010
1097
1098         Reviewed by Benjamin Poulain.
1099
1100         * contentextensions/ContentExtensionCompiler.cpp:
1101         (WebCore::ContentExtensions::compileRuleList):
1102         Compile multiple NFAs to DFAs.
1103         * contentextensions/ContentExtensionsBackend.cpp:
1104         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1105         Fixed a bug when there are no non-universal actions.
1106         We still need to report that no ignore-previous-rules was hit to apply the
1107         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
1108         and skipped in DFABytecodeInterpreter::interpret.
1109         * contentextensions/DFABytecodeCompiler.cpp:
1110         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1111         Add a header for each DFA.
1112         * contentextensions/DFABytecodeInterpreter.cpp:
1113         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1114         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1115         Interpret as many DFAs as there are in the bytecode.
1116
1117 2015-03-24  Dan Bernstein  <mitz@apple.com>
1118
1119         Tried to fix the EWS build.
1120
1121         * platform/spi/cocoa/QuartzCoreSPI.h:
1122
1123 2015-03-24  Commit Queue  <commit-queue@webkit.org>
1124
1125         Unreviewed, rolling out r181898 and r181909.
1126         https://bugs.webkit.org/show_bug.cgi?id=143034
1127
1128         Broke fast/regions/auto-size/autoheight-two-pass-layout-
1129         complex-002.html (Requested by ap on #webkit).
1130
1131         Reverted changesets:
1132
1133         "Improve the offsetWidth/Height layout optimization"
1134         https://bugs.webkit.org/show_bug.cgi?id=143008
1135         http://trac.webkit.org/changeset/181898
1136
1137         "Disable layout dimensions optimization for RenderRegions"
1138         https://bugs.webkit.org/show_bug.cgi?id=143017
1139         http://trac.webkit.org/changeset/181909
1140
1141 2015-03-24  Zhuo Li  <zachli@apple.com>
1142
1143         Scripts running in isolated world should not subject to a page's CSP about 'eval'.
1144         https://bugs.webkit.org/show_bug.cgi?id=141316.
1145
1146         Reviewed by Geoffrey Garen.
1147
1148         * bindings/js/ScriptController.cpp:
1149         (WebCore::ScriptController::initScript):
1150         We should not impose the main world Content Security Policy onto the isolated world.
1151
1152 2015-03-24  Chris Dumez  <cdumez@apple.com>
1153
1154         [Mac] Use .cpp file extension instead of .mm for SharedTimerCF and PowerObserverMac
1155         https://bugs.webkit.org/show_bug.cgi?id=143026
1156
1157         Reviewed by Andy Estes.
1158
1159         Use .cpp file extension instead of .mm for SharedTimerCF and
1160         PowerObserverMac.
1161
1162         * WebCore.xcodeproj/project.pbxproj:
1163         * platform/cf/SharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.mm.
1164         (WebCore::timerFired):
1165         Use WTF::AutodrainedPool instead of @autoreleasepool {}.
1166
1167         * platform/mac/PowerObserverMac.cpp: Renamed from Source/WebCore/platform/mac/PowerObserverMac.mm.
1168
1169 2015-03-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1170
1171         REGRESSION (r181458): Heap use-after-free in JSSetIterator destructor
1172         https://bugs.webkit.org/show_bug.cgi?id=142696
1173
1174         Reviewed and tweaked by Geoffrey Garen.
1175
1176         Use JSSetIterator/JSMapIterator to iterate over JSSet and JSMap.
1177
1178         * ForwardingHeaders/runtime/JSMapIterator.h: Added.
1179         * ForwardingHeaders/runtime/JSSetIterator.h: Added.
1180         * bindings/js/SerializedScriptValue.cpp:
1181         (WebCore::CloneSerializer::serialize):
1182
1183 2015-03-24  Dan Bernstein  <mitz@apple.com>
1184
1185         Tried to fix the iOS Simulator build.
1186
1187         * platform/spi/cocoa/QuartzCoreSPI.h:
1188
1189 2015-03-24  Benjamin Poulain  <bpoulain@apple.com>
1190
1191         Make URL filter patterns matching consistent and add a simple canonicalization step
1192         https://bugs.webkit.org/show_bug.cgi?id=142998
1193
1194         Reviewed by Alex Christensen.
1195
1196         This patch makes two changes to the url filter input:
1197         -Make the matching "Search" by default, the pattern can now appear anywhere
1198          in the URL by default.
1199         -Make the input a little less fragile: do not explode on valid input
1200          that is not formatted in a certain way.
1201
1202         To implement the search behavior, I simply add an implict ".*" in front of the patterns
1203         when that make sense.
1204
1205         To make the input more solid, we do some little modification on the input:
1206         -Remove duplicated ".*".
1207         -Remove matching suffixes that do not bring new information.
1208         -Unify all the ".*" in the same format.
1209
1210         Why do that here? That should be done through a graph analysis on the machine.
1211
1212         The reason is this is incredibly cheap compared to the graph analysis. Any state
1213         removed upfront will save the handling of several hundred nodes in the deterministic
1214         graph.
1215
1216         * contentextensions/URLFilterParser.cpp:
1217         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString):
1218         (WebCore::ContentExtensions::Term::isUniversalTransition):
1219         (WebCore::ContentExtensions::GraphBuilder::finalize):
1220         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
1221         (WebCore::ContentExtensions::GraphBuilder::fail):
1222         (WebCore::ContentExtensions::GraphBuilder::simplifySunkTerms):
1223
1224 2015-03-24  Chris Dumez  <cdumez@apple.com>
1225
1226         Regression(r181671): Caused Timer-related crashes on iOS / WK1
1227         https://bugs.webkit.org/show_bug.cgi?id=143025
1228
1229         Reviewed by Andy Estes.
1230
1231         Call CFRunLoopAddTimer() on WebThreadRunLoop() instead of
1232         CFRunLoopGetCurrent() for iOS, as we did before r181671.
1233
1234         I inadvertently changed this in r181671 when merging the Mac
1235         and iOS implementations.
1236
1237         No new tests, already covered by existing tests.
1238
1239         * platform/cf/SharedTimerCF.mm:
1240         (WebCore::setSharedTimerFireInterval):
1241
1242 2015-03-24  Dan Bernstein  <mitz@apple.com>
1243
1244         WebCore part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
1245         https://bugs.webkit.org/show_bug.cgi?id=143023
1246
1247         Reviewed by Tim Horton.
1248
1249         * platform/spi/cocoa/QuartzCoreSPI.h: Added the declaration of
1250         CARenderServerRenderLayerWithTransform.
1251
1252 2015-03-24  David Hyatt  <hyatt@apple.com>
1253
1254         Disable layout dimensions optimization for RenderRegions
1255         https://bugs.webkit.org/show_bug.cgi?id=143017
1256
1257         Reviewed by Dean Jackson.
1258
1259         * dom/Document.cpp:
1260         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1261         Turn off the optimization for regions, since auto height regions can change size
1262         without needing a layout.
1263
1264 2015-03-24  Beth Dakin  <bdakin@apple.com>
1265
1266         Add events related to force click gesture
1267         https://bugs.webkit.org/show_bug.cgi?id=142836
1268         -and corresponding-
1269         rdar://problem/20210239
1270
1271         Reviewed by Dean Jackson.
1272
1273         This patch adds six new events for the force click gesture:
1274
1275         webkitmouseforcewillbegin -> Event is sent just before mousedown to indicate that 
1276         force can be perceived if the user presses any harder. The author should prevent 
1277         default on this event to both prevent the user agent’s default force click 
1278         features and to receive the other 5 events.
1279
1280         webkitmouseforcechanged -> This event fires whenever force changes between the 
1281         mousedown and mouseup. It is a new type of mouse event that includes a force 
1282         variable which is a normalized number between 0 (corresponds to click) and 1 
1283         (corresponds to force click). In this patch, I have only added code to send this 
1284         event between mousedown and mouseforcedown, but as a followup patch, we plan to 
1285         send it through mouseup.
1286
1287         webkitmouseforcecancelled -> If the user releases their finger from the trackpad 
1288         after pressing hard enough to send webkitmouseforcewillbegin events but not hard 
1289         enough to force click, this event will be sent to indicate that the user bailed 
1290         out on the gesture.
1291
1292         webkitmouseforcedown -> The down part of the force click.
1293
1294         webkitmouseforceup -> The up part of the force click. This event is added in this 
1295         patch, but does not yet fire. That is work for a follow-up patch.
1296
1297         webkitmouseforceclick -> The equivalent of the click event for the force click. 
1298         Should fire just after webkitmouseforceup. This event is added in this patch, but 
1299         does not yet fire. That is work for a follow-up patch.
1300
1301         Add new files for WebKitMouseForceEvent to build systems.
1302         * DerivedSources.cpp:
1303         * DerivedSources.make:
1304         * WebCore.vcxproj/WebCore.vcxproj:
1305         * WebCore.vcxproj/WebCore.vcxproj.filters:
1306         * WebCore.xcodeproj/project.pbxproj:
1307         * WebCore.xcodeproj/project.pbxproj:
1308
1309         Plumbing for new events.
1310         * dom/Document.idl:
1311
1312         Code to dispatch the new events. Currently the code that calls these functions is 
1313         in WebKit2.
1314         * dom/Element.cpp:
1315         (WebCore::Element::dispatchMouseForceWillBegin):
1316         (WebCore::Element::dispatchMouseForceChanged):
1317         (WebCore::Element::dispatchMouseForceDown):
1318         (WebCore::Element::dispatchMouseForceUp):
1319         (WebCore::Element::dispatchMouseForceClick):
1320         (WebCore::Element::dispatchMouseForceCancelled):
1321         * dom/Element.h:
1322
1323         More plumbing.
1324         * dom/Element.idl:
1325         * dom/EventNames.h:
1326         * dom/EventNames.in:
1327
1328         Our new type of mouse event that includes force.
1329         * dom/WebKitMouseForceEvent.cpp: Added.
1330         (WebCore::WebKitMouseForceEventInit::WebKitMouseForceEventInit):
1331         (WebCore::WebKitMouseForceEvent::WebKitMouseForceEvent):
1332         (WebCore::WebKitMouseForceEvent::~WebKitMouseForceEvent):
1333         (WebCore::WebKitMouseForceEvent::eventInterface):
1334         * dom/WebKitMouseForceEvent.h: Added.
1335         * dom/WebKitMouseForceEvent.idl: Added.
1336
1337         More plumbing.
1338         * html/HTMLAttributeNames.in:
1339         * html/HTMLBodyElement.cpp:
1340         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
1341         * html/HTMLBodyElement.idl:
1342         * html/HTMLElement.cpp:
1343         (WebCore::HTMLElement::createEventHandlerNameMap):
1344         * page/DOMWindow.idl:
1345         * page/EventHandler.h:
1346         (WebCore::EventHandler::lastMouseDownEvent):
1347
1348 2015-03-24  Anders Carlsson  <andersca@apple.com>
1349
1350         Fix designated initializer violations
1351         https://bugs.webkit.org/show_bug.cgi?id=143016
1352         rdar://problem/20268858
1353
1354         Reviewed by Dan Bernstein.
1355
1356         Mark -[DOMObject init] as unavailable.
1357
1358         * bindings/objc/DOMObject.h:
1359         * bindings/objc/DOMObject.mm:
1360         (-[DOMObject init]):
1361
1362 2015-03-24  Benjamin Poulain  <benjamin@webkit.org>
1363
1364         CSS Selectors Level 4: enable case-insensitive attribute matching by default
1365         https://bugs.webkit.org/show_bug.cgi?id=142960
1366
1367         Reviewed by Andreas Kling.
1368
1369         All open issues have been resolved, enable the feature by default.
1370
1371         Test: fast/css/attribute-selector-case-insensitive.html
1372
1373         * css/CSSGrammar.y.in:
1374
1375 2015-03-24  Dean Jackson  <dino@apple.com>
1376
1377         MediaControls: Scrubber and Time displays have the incorrect blending
1378         https://bugs.webkit.org/show_bug.cgi?id=143011
1379         <rdar://problem/20245251>
1380
1381         Reviewed by Eric Carlson.
1382
1383         The scrubber in media controls should use plus-darker blending. Then
1384         the scrubber itself should use a slightly transparent black (55% opacity)
1385         when drawing.
1386
1387         * Modules/mediacontrols/mediaControlsiOS.css:
1388         (audio::-webkit-media-controls-timeline): Add the blend mode.
1389         * Modules/mediacontrols/mediaControlsiOS.js:
1390         (ControllerIOS.prototype.drawTimelineBackground): Start drawing with
1391         transparency. I changed the order of rendering to make it
1392         more clear we draw the three parts in left to right order.
1393
1394 2015-03-24  David Hyatt  <hyatt@apple.com>
1395
1396         Improve the offsetWidth/Height layout optimization
1397         https://bugs.webkit.org/show_bug.cgi?id=143008
1398
1399         Reviewed by Dean Jackson.
1400
1401         * dom/Document.cpp:
1402         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1403         * dom/Document.h:
1404         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
1405         the positioning restrictions on the optimization check.
1406
1407         * dom/Element.cpp:
1408         (WebCore::Element::offsetWidth):
1409         (WebCore::Element::offsetHeight):
1410         Change to use Element& instead of Element*.
1411
1412         (WebCore::Element::clientWidth):
1413         (WebCore::Element::clientHeight):
1414         (WebCore::Element::scrollWidth):
1415         (WebCore::Element::scrollHeight):
1416         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
1417
1418 2015-03-24  Yoav Weiss  <yoav@yoav.ws>
1419
1420         Stop image from displaying when src attribute is removed or emptied
1421         https://bugs.webkit.org/show_bug.cgi?id=142677
1422
1423         Reviewed by Chris Dumez.
1424
1425         Previously, we ignored empty attribute as failed URL, and didn't update the
1426         renderer when an image was removed. This patch fixes that.
1427
1428         Tests: fast/dom/HTMLImageElement/image-empty-src.html
1429                fast/dom/HTMLImageElement/image-remove-src.html
1430
1431         * loader/ImageLoader.cpp:
1432         (WebCore::ImageLoader::updateFromElement):
1433
1434 2015-03-17  Philippe Normand  <pnormand@igalia.com>
1435
1436         [OpenWebRTC] RealtimeMediaSourceCenter implementation
1437         https://bugs.webkit.org/show_bug.cgi?id=142476
1438
1439         Reviewed by Eric Carlson.
1440
1441         The old GStreamer MediaStreamCenter is replaced by the OpenWebRTC
1442         RealtimeMediaSourceCenter. It is not yet able to correctly assess
1443         MediaConstraints so it selects the first audio/video sources
1444         available through OpenWebRTC.
1445
1446         * PlatformEfl.cmake: Add new files to the build.
1447         * PlatformGTK.cmake: Ditto.
1448         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Removed.
1449         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Added.
1450         (WebCore::initializeOpenWebRTC): Simple function to initialize the
1451         framework, it is going to be used by the PeerConnection backend as well.
1452         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Added.
1453         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Added.
1454         (WebCore::mediaSourcesAvailableCallback): Function invoked once
1455         the media sources discovery succeeded within OpenWebRTC.
1456         (WebCore::RealtimeMediaSourceCenter::platformCenter): Instantiate
1457         the OpenWebRTC RealtimeMediaSourceCenter.
1458         (WebCore::RealtimeMediaSourceCenterOwr::RealtimeMediaSourceCenterOwr):
1459         (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
1460         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
1461         Schedule a discovery process for the capture sources.
1462         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Pick
1463         the first audio/video sources and create a MediaStream accordingly.
1464         (WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources):
1465         Not yet implemented.
1466         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
1467         Method invoked once the capture sources process succeeded. Parse
1468         them and create an internal cache of RealtimeMediaSources accordingly.
1469         (WebCore::RealtimeMediaSourceCenterOwr::firstSource): Utility
1470         function to fetch the first source of the given type from the
1471         RealtimeMediaSources cache.
1472         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h.
1473         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Added.
1474
1475 2015-03-24  Csaba Osztrogonác  <ossy@webkit.org>
1476
1477         [EFL] Add OpenWebRTC in jhbuild
1478         https://bugs.webkit.org/show_bug.cgi?id=142778
1479
1480         Reviewed by Gyuyoung Kim.
1481
1482         Original patch by Philippe Normand <pnormand@igalia.com>
1483
1484         * PlatformEfl.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
1485
1486 2015-03-23 Yoav Weiss  <yoav@yoav.ws>
1487
1488         Update empty image canvas tests and fix a related bug
1489         https://bugs.webkit.org/show_bug.cgi?id=142694
1490
1491         Reviewed by Chris Dumez.
1492
1493         During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
1494         we encountered an issue with canvas tests related to empty image handling
1495         when drawn or used as a pattern. After updating these tests, an issue with
1496         pattern handling was encountered.
1497
1498         The spec, as well as Chrome's implementation, say that when an empty image
1499         is used as a pattern, createPattern should return null. See
1500         https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
1501         Instead, createPattern returned an exception in this case.
1502         This patch fixes that and makes sure that it returns a null when image loading hasn't started.
1503
1504         Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
1505                canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
1506                canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
1507                canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
1508                canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html
1509
1510         * html/canvas/CanvasRenderingContext2D.cpp:
1511         (WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.
1512
1513 2015-03-23  Alex Christensen  <achristensen@webkit.org>
1514
1515         Fix api tests after r181876.
1516
1517         * contentextensions/ContentExtensionsBackend.cpp:
1518         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1519         Always append a CSSDisplayNoneStyleSheet action if no ignore-previous-rules is seen.
1520         * loader/cache/CachedResourceLoader.cpp:
1521         (WebCore::CachedResourceLoader::requestResource):
1522         Changed an assertion to a null check.
1523
1524 2015-03-23  Dean Jackson  <dino@apple.com>
1525
1526         Timelines are sharing the same canvas background
1527         https://bugs.webkit.org/show_bug.cgi?id=142994
1528         <rdar://problem/20209466>
1529
1530         Reviewed by Brent Fulgham.
1531
1532         Since each MediaControl lives in an isolated world, we
1533         can't rely on a global variable to provide a unique
1534         identifier for a named canvas. The fix is to expose
1535         WebCore's UUID generator, and have each canvas use
1536         that for a name.
1537
1538         * Modules/mediacontrols/MediaControlsHost.cpp:
1539         (WebCore::MediaControlsHost::generateUUID): New method on the
1540         MediaControlsHost that generates a UUID.
1541         * Modules/mediacontrols/MediaControlsHost.h:
1542         * Modules/mediacontrols/MediaControlsHost.idl:
1543
1544         * Modules/mediacontrols/mediaControlsApple.js: Remove the global
1545         variable unique ID that wasn't working, and instead get
1546         an ID from the MediaControlsHost.
1547         (Controller.prototype.createControls):
1548         * Modules/mediacontrols/mediaControlsiOS.js:
1549         (ControllerIOS):
1550
1551 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
1552
1553         Scroll latching logic can get stuck in 'scrollable="no"' iframes
1554         https://bugs.webkit.org/show_bug.cgi?id=142789
1555         <rdar://problem/20129494>
1556
1557         Reviewed by Dean Jackson.
1558
1559         Clean up the EventHandler and latching code as follows:
1560         (1) Do not handle iframe elements as part of the normal latching logic. Instead, iframes should
1561             be evaluated during the 'platformCompleteWheelEvent' phase of processing as top-level scrolling
1562             frames.
1563         (2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames
1564             different.
1565         (3) Modify code to reflect that the scroll latching code really deals with overflow scrolling. Consequently,
1566             the 'findEnclosingScrollableContainer' was renamed to 'findEnclosingOverflowScroll' and does not
1567             treat iframe as a suitable target.
1568         (4) Do not create a latching state object when the container being evaluated is already scrolled to the
1569             extreme position in the direction of the mouse gesture. In this case, we want the enclosing frame
1570             to be the latching target.
1571         (5) Do not treat the state where the mouse wheel gesture has ended manual scrolling, but has not ended
1572             momentum scrolling, as an appropriate time to select a latching target.
1573
1574         * page/EventHandler.cpp:
1575         (WebCore::EventHandler::platformCompleteWheelEvent): Modify signature to remove unneeded argument.
1576         (WebCore::EventHandler::handleWheelEvent): Modify call to 'platformCompleteWheelEvent' to remove unused argument.
1577         * page/EventHandler.h:
1578         * page/mac/EventHandlerMac.mm:
1579         (WebCore::findEnclosingOverflowScroll): Renamed from 'findEnclosingScrollableContainer' and revised per the
1580         notes above.
1581         (WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
1582         consolidate logic.
1583         (WebCore::EventHandler::platformCompleteWheelEvent): Remove unused argument. The wheel event target is no
1584         longer needed here, now that iframes are not processed by this code.
1585         (WebCore::findEnclosingScrollableContainer): Deleted.
1586         * page/scrolling/ScrollLatchingState.cpp:
1587         (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement:) Switch to move operator for passing
1588         a temporary RefPtr to the the function.
1589         * page/scrolling/ScrollLatchingState.h:
1590         * platform/PlatformWheelEvent.h:
1591         (WebCore::PlatformWheelEvent::useLatchedEventElement): Recognize 'phase=ended, momentum=none' as a state
1592         that should not cause latching state to be revised.
1593
1594 2015-03-23  Anders Carlsson  <andersca@apple.com>
1595
1596         Try to fix the iOS build.
1597
1598         * platform/network/mac/CookieJarMac.mm:
1599
1600 2015-03-23  Brady Eidson  <beidson@apple.com>
1601
1602         Content extensions should apply css selectors
1603         https://bugs.webkit.org/show_bug.cgi?id=142604
1604
1605         Reviewed by Alex Christensen.
1606
1607         Tests: http/tests/contentextensions/css-display-none.html
1608
1609         * WebCore.xcodeproj/project.pbxproj:
1610
1611         * contentextensions/ContentExtension.cpp:
1612         (WebCore::ContentExtensions::ContentExtension::create):
1613         (WebCore::ContentExtensions::ContentExtension::ContentExtension):
1614         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
1615         * contentextensions/ContentExtension.h:
1616         (WebCore::ContentExtensions::ContentExtension::identifier):
1617         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
1618
1619         * contentextensions/ContentExtensionsBackend.cpp:
1620         (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
1621         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1622         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
1623         * contentextensions/ContentExtensionsBackend.h:
1624
1625         * contentextensions/DFABytecodeInterpreter.cpp:
1626         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1627
1628         * dom/DocumentStyleSheetCollection.cpp:
1629         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):
1630         * dom/DocumentStyleSheetCollection.h:
1631
1632         * loader/DocumentLoader.cpp:
1633         (WebCore::DocumentLoader::commitData):
1634         (WebCore::DocumentLoader::startLoadingMainResource):
1635         (WebCore::DocumentLoader::addPendingContentExtensionSheet):
1636         * loader/DocumentLoader.h:
1637
1638         * loader/cache/CachedResourceLoader.cpp:
1639         (WebCore::CachedResourceLoader::requestResource):
1640
1641         * loader/cache/CachedResourceRequest.cpp:
1642         (WebCore::CachedResourceRequest::setInitiator):
1643         * loader/cache/CachedResourceRequest.h:
1644         (WebCore::CachedResourceRequest::initiatingDocumentLoader):
1645
1646         * page/UserContentController.cpp:
1647         (WebCore::UserContentController::globalDisplayNoneStyleSheet):
1648         (WebCore::UserContentController::displayNoneCSSRule):
1649         * page/UserContentController.h:
1650
1651 2015-03-23  Anders Carlsson  <andersca@apple.com>
1652
1653         -[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
1654         https://bugs.webkit.org/show_bug.cgi?id=142990
1655         rdar://problem/20241645
1656
1657         Reviewed by Andreas Kling.
1658
1659         Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.
1660
1661         * platform/network/cf/CookieJarCFNet.cpp:
1662         * platform/network/mac/CookieJarMac.mm:
1663
1664 2015-03-23  Conrad Shultz  <conrad_shultz@apple.com>
1665
1666         Replace uses of kCTFontSystemFontType
1667         https://bugs.webkit.org/show_bug.cgi?id=142984
1668
1669         Reviewed by Tim Horton.
1670
1671         * rendering/RenderThemeMac.mm:
1672         (WebCore::AttachmentLayout::layOutTitle):
1673         (WebCore::AttachmentLayout::layOutSubtitle):
1674
1675 2015-03-23  Dean Jackson  <dino@apple.com>
1676
1677         kCTFontSystemFontType is deprecated in CoreText
1678         https://bugs.webkit.org/show_bug.cgi?id=142981
1679         <rdar://problem/20261171>
1680
1681         Reviewed by Beth Dakin.
1682
1683         Update to the non-deprecated version.
1684
1685         * rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem
1686         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
1687
1688 2015-03-23  Eric Carlson  <eric.carlson@apple.com>
1689
1690         [Mac] Enable fullscreen for MSE-based videos
1691         https://bugs.webkit.org/show_bug.cgi?id=142971
1692
1693         Reviewed by Jer Noble.
1694
1695         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1696         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;
1697
1698 2015-03-23  Alex Christensen  <achristensen@webkit.org>
1699
1700         [MediaFoundation] Implement seek.
1701         https://bugs.webkit.org/show_bug.cgi?id=142594
1702
1703         Reviewed by Darin Adler.
1704
1705         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1706         (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
1707         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
1708         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
1709         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1710
1711 2015-03-23  Dan Bernstein  <mitz@apple.com>
1712
1713         Fixed the build.
1714
1715         * platform/graphics/cocoa/FontCocoa.mm:
1716         (WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
1717         (WebCore::Font::platformWidthForGlyph): Ditto.
1718
1719 2015-03-23  Jer Noble  <jer.noble@apple.com>
1720
1721         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
1722         https://bugs.webkit.org/show_bug.cgi?id=142970
1723
1724         Reviewed by Eric Carlson.
1725
1726         Return early after synchronously calling to the main thread to allocate the volume
1727         view, to avoid re-allocating the volume view again on the web thread.
1728
1729         * platform/audio/ios/MediaSessionManagerIOS.mm:
1730         (-[WebMediaSessionHelper allocateVolumeView]):
1731
1732 2015-03-23  Tim Horton  <timothy_horton@apple.com>
1733
1734         Add a share item to the link action menu
1735         https://bugs.webkit.org/show_bug.cgi?id=142961
1736         <rdar://problem/19198374>
1737
1738         Reviewed by Beth Dakin.
1739
1740         * English.lproj/Localizable.strings:
1741         Remove some now-unused strings.
1742
1743         * platform/spi/mac/NSMenuSPI.h:
1744         Add some SPI.
1745
1746 2015-03-23  David Kilzer  <ddkilzer@apple.com>
1747
1748         [iOS] Build fix: CoreText deprecated kCTFontSystemFontType
1749
1750         Fix tracked by:  <rdar://problem/20261171>
1751
1752         * rendering/RenderThemeIOS.mm:
1753         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
1754         Add clang pragmas.
1755
1756 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
1757
1758         Unreviewed test fix.
1759
1760         * css/CSSParser.cpp:
1761         (WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.
1762
1763 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
1764
1765         scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
1766         https://bugs.webkit.org/show_bug.cgi?id=142552
1767         <rdar://problem/20114743>
1768
1769         Reviewed by Dean Jackson.
1770
1771         Revise the snap point logic as follows:
1772         (1) Put the snap point destination handling in a helper function to make the rest of the code
1773             easier to read.
1774         (2) Make sure we always have a left-hand snap point (i.e., position 0), but don't add multiple
1775             left-hand snap points.
1776         (3) Create a helper function to determine if we should be working with the scroll snap 'elements'
1777             behavior. We want to use this for scroll-snap-destination/scroll-snap-coordinate markup.
1778         (4) Create per-element snap point offsets when using scroll-snap-destination/scroll-snap-coordinate.
1779
1780         * css/CSSParser.cpp:
1781         (WebCore::CSSParser::parseScrollSnapDestination): Add assertion to try to catch bad parser state.
1782         * page/scrolling/AxisScrollSnapOffsets.cpp:
1783         (WebCore::destinationOffsetForViewSize): Added helper function to consolidate logic for handling
1784         destination coordinates.
1785         (WebCore::updateFromStyle): Make sure a left-hand snap point is always provided.
1786         (WebCore::styleUsesElements): Added helper function.
1787         (WebCore::updateSnapOffsetsForScrollableArea): Revise logic to generate 'per-element' snap point
1788         offsets.
1789
1790 2015-03-23  Yoav Weiss  <yoav@yoav.ws>
1791
1792         Refactor ImageLoader's setting of CachedImage
1793         https://bugs.webkit.org/show_bug.cgi?id=142825
1794
1795         Reviewed by Chris Dumez.
1796
1797         No new tests, since there's no functional change.
1798
1799         setImage and setImageWithoutConsideringPendingLoadEvent were not called with new
1800         CachedImages and were not used as originally intended. That resulted in some dead code,
1801         and confusion when going over the code.
1802         This patch renames these methods into equivalent clearImage* methods, and deletes resulting dead code.
1803
1804         * html/HTMLObjectElement.cpp:
1805         (WebCore::HTMLObjectElement::renderFallbackContent): Changed setImage call to clearImage.
1806         * loader/ImageLoader.cpp:
1807         (WebCore::ImageLoader::clearImage):
1808         (WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
1809         (WebCore::ImageLoader::notifyFinished):
1810         (WebCore::ImageLoader::elementDidMoveToNewDocument):
1811         (WebCore::ImageLoader::setImage): Deleted.
1812         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Deleted.
1813         * loader/ImageLoader.h:
1814
1815 2015-03-22  Benjamin Poulain  <benjamin@webkit.org>
1816
1817         CSS Selectors: fix attribute case-insensitive matching of Contain and List
1818         https://bugs.webkit.org/show_bug.cgi?id=142932
1819
1820         Reviewed by Darin Adler.
1821
1822         Fix the last two attribute selectors that were using full case-insensitive
1823         match:
1824             -Contain ([foo*=bar]).
1825             -List (foo~=bar]).
1826
1827         Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
1828                fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html
1829
1830         * css/SelectorChecker.cpp:
1831         (WebCore::attributeValueMatches):
1832         * cssjit/SelectorCompiler.cpp:
1833         (WebCore::SelectorCompiler::attributeValueContains):
1834         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
1835
1836 2015-03-22  Benjamin Poulain  <bpoulain@apple.com>
1837
1838         Detect when url filter pattern with groups match the empty string
1839         https://bugs.webkit.org/show_bug.cgi?id=142930
1840
1841         Reviewed by Sam Weinig.
1842
1843         The previous test was only accounting for simple atoms. This patch extends
1844         it to groups.
1845
1846         * contentextensions/URLFilterParser.cpp:
1847         (WebCore::ContentExtensions::Term::quantify):
1848         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
1849         (WebCore::ContentExtensions::GraphBuilder::finalize):
1850         (WebCore::ContentExtensions::Term::quantifier): Deleted.
1851
1852 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
1853
1854         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
1855         https://bugs.webkit.org/show_bug.cgi?id=142940
1856
1857         Reviewed by Sam Weinig.
1858
1859         * dom/Document.cpp:
1860         (WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.
1861         * dom/Document.h:
1862
1863         * html/HTMLMediaSession.cpp:
1864         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.
1865         * html/HTMLMediaSession.h:
1866
1867         * page/Page.cpp:
1868         (WebCore::Page::didChoosePlaybackTarget):  Ditto.
1869         * page/Page.h:
1870
1871         * platform/audio/MediaSession.h:
1872         * platform/graphics/MediaPlaybackTargetPickerClient.h:
1873         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: 
1874         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):  Ditto.
1875
1876 2015-03-22  Anders Carlsson  <andersca@apple.com>
1877
1878         _WKWebsiteDataStore should clear WebSQL databases
1879         https://bugs.webkit.org/show_bug.cgi?id=142947
1880
1881         Reviewed by Sam Weinig.
1882
1883         * Modules/webdatabase/DatabaseTracker.cpp:
1884         (WebCore::DatabaseTracker::trackerWithDatabasePath):
1885         Add a hack so we can get at a tracker from the UI process.
1886
1887         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
1888         New function that deletes all databases modified after a given time.
1889
1890         * Modules/webdatabase/DatabaseTracker.h:
1891         Add new members and export the ones we want to call from WebKit2.
1892
1893         * Modules/webdatabase/OriginLock.h:
1894         Export the destructor.
1895
1896 2015-03-21  Dean Jackson  <dino@apple.com>
1897
1898         Remove the prefix for CSS Transforms
1899         https://bugs.webkit.org/show_bug.cgi?id=142927
1900         <rdar://problem/11568151>
1901
1902         Reviewed by Simon Fraser.
1903
1904         Support the bare form of:
1905         - transform
1906         - transform-style
1907         - transform-origin
1908         - perspective
1909         - perspective-origin
1910
1911         For transform-style, we also still differentiate the prefixed property
1912         because we may want to use that as an indicator of legacy content.
1913
1914         This is mostly a find and replace, but with some related naming
1915         changes. The DOM interface for WebKitCSSTransformValue remains
1916         unchanged.
1917
1918         Tests: transforms/2d/transform-2d-prefixed.html
1919                transforms/3d/general/prefixed-3dtransform-values.html
1920
1921         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1922         (WebCore::propertyChangeMayRepaintNonDescendants):
1923         * css/CSSComputedStyleDeclaration.cpp:
1924         (WebCore::isLayoutDependent):
1925         (WebCore::ComputedStyleExtractor::propertyValue):
1926         * css/CSSParser.cpp:
1927         (WebCore::isValidKeywordPropertyAndValue):
1928         (WebCore::isKeywordPropertyID):
1929         (WebCore::parseTranslateTransformValue):
1930         (WebCore::CSSParser::parseValue):
1931         (WebCore::CSSParser::parseTransformOrigin):
1932         (WebCore::CSSParser::parsePerspectiveOrigin):
1933         * css/CSSPropertyNames.in:
1934         * css/StyleProperties.cpp:
1935         (WebCore::StyleProperties::getPropertyValue):
1936         (WebCore::StyleProperties::asText):
1937         * css/WebKitCSSMatrix.cpp:
1938         (WebCore::WebKitCSSMatrix::setMatrixValue):
1939         * html/track/VTTCue.cpp:
1940         (WebCore::VTTCueBox::applyCSSProperties):
1941         * page/animation/AnimationController.cpp:
1942         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
1943         * page/animation/CSSPropertyAnimation.cpp:
1944         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
1945         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1946         * page/animation/CompositeAnimation.cpp:
1947         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
1948         * page/animation/ImplicitAnimation.cpp:
1949         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
1950         * page/animation/KeyframeAnimation.cpp:
1951         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
1952         (WebCore::KeyframeAnimation::validateTransformFunctionList):
1953         * platform/graphics/GraphicsLayer.cpp:
1954         (WebCore::GraphicsLayer::validateTransformOperations):
1955         * platform/graphics/GraphicsLayerClient.h:
1956         * platform/graphics/ca/GraphicsLayerCA.cpp:
1957         (WebCore::propertyIdToString):
1958         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
1959         (WebCore::GraphicsLayerCA::addAnimation):
1960         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
1961         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
1962         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
1963         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1964         (WebCore::GraphicsLayerTextureMapper::addAnimation):
1965         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1966         (WebCore::TextureMapperAnimation::applyInternal):
1967         * platform/graphics/texmap/TextureMapperLayer.cpp:
1968         (WebCore::TextureMapperLayer::syncAnimations):
1969         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1970         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
1971         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
1972         (WebCore::CoordinatedGraphicsLayer::addAnimation):
1973         * rendering/RenderLayerBacking.cpp:
1974         (WebCore::RenderLayerBacking::updateGeometry):
1975         (WebCore::RenderLayerBacking::startAnimation):
1976         (WebCore::RenderLayerBacking::startTransition):
1977         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
1978         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
1979         * rendering/RenderLayerCompositor.cpp:
1980         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1981         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
1982         * svg/SVGElement.cpp:
1983         (WebCore::populateAttributeNameToCSSPropertyIDMap):
1984
1985 2015-03-21  Commit Queue  <commit-queue@webkit.org>
1986
1987         Unreviewed, rolling out r181824.
1988         https://bugs.webkit.org/show_bug.cgi?id=142935
1989
1990         Broke Windows build (Requested by ap on #webkit).
1991
1992         Reverted changeset:
1993
1994         "Remove the prefix for CSS Transforms"
1995         https://bugs.webkit.org/show_bug.cgi?id=142927
1996         http://trac.webkit.org/changeset/181824
1997
1998 2015-03-20  Dean Jackson  <dino@apple.com>
1999
2000         Remove the prefix for CSS Transforms
2001         https://bugs.webkit.org/show_bug.cgi?id=142927
2002         <rdar://problem/11568151>
2003
2004         Reviewed by Simon Fraser.
2005
2006         Support the bare form of:
2007         - transform
2008         - transform-style
2009         - transform-origin
2010         - perspective
2011         - perspective-origin
2012
2013         For transform-style, we also still differentiate the prefixed property
2014         because we may want to use that as an indicator of legacy content.
2015
2016         This is mostly a find and replace, but with some related naming
2017         changes. The DOM interface for WebKitCSSTransformValue remains
2018         unchanged.
2019
2020         Tests: transforms/2d/transform-2d-prefixed.html
2021                transforms/3d/general/prefixed-3dtransform-values.html
2022
2023         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2024         (WebCore::propertyChangeMayRepaintNonDescendants):
2025         * css/CSSComputedStyleDeclaration.cpp:
2026         (WebCore::isLayoutDependent):
2027         (WebCore::ComputedStyleExtractor::propertyValue):
2028         * css/CSSParser.cpp:
2029         (WebCore::isValidKeywordPropertyAndValue):
2030         (WebCore::isKeywordPropertyID):
2031         (WebCore::parseTranslateTransformValue):
2032         (WebCore::CSSParser::parseValue):
2033         (WebCore::CSSParser::parseTransformOrigin):
2034         (WebCore::CSSParser::parsePerspectiveOrigin):
2035         * css/CSSPropertyNames.in:
2036         * css/StyleProperties.cpp:
2037         (WebCore::StyleProperties::getPropertyValue):
2038         (WebCore::StyleProperties::asText):
2039         * css/WebKitCSSMatrix.cpp:
2040         (WebCore::WebKitCSSMatrix::setMatrixValue):
2041         * html/track/VTTCue.cpp:
2042         (WebCore::VTTCueBox::applyCSSProperties):
2043         * page/animation/AnimationController.cpp:
2044         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
2045         * page/animation/CSSPropertyAnimation.cpp:
2046         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
2047         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2048         * page/animation/CompositeAnimation.cpp:
2049         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2050         * page/animation/ImplicitAnimation.cpp:
2051         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
2052         * page/animation/KeyframeAnimation.cpp:
2053         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2054         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2055         * platform/graphics/GraphicsLayer.cpp:
2056         (WebCore::GraphicsLayer::validateTransformOperations):
2057         * platform/graphics/GraphicsLayerClient.h:
2058         * platform/graphics/ca/GraphicsLayerCA.cpp:
2059         (WebCore::propertyIdToString):
2060         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2061         (WebCore::GraphicsLayerCA::addAnimation):
2062         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
2063         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2064         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2065         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2066         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2067         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2068         (WebCore::TextureMapperAnimation::applyInternal):
2069         * platform/graphics/texmap/TextureMapperLayer.cpp:
2070         (WebCore::TextureMapperLayer::syncAnimations):
2071         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2072         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
2073         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
2074         (WebCore::CoordinatedGraphicsLayer::addAnimation):
2075         * rendering/RenderLayerBacking.cpp:
2076         (WebCore::RenderLayerBacking::updateGeometry):
2077         (WebCore::RenderLayerBacking::startAnimation):
2078         (WebCore::RenderLayerBacking::startTransition):
2079         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2080         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2081         * rendering/RenderLayerCompositor.cpp:
2082         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2083         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
2084         * svg/SVGElement.cpp:
2085         (WebCore::populateAttributeNameToCSSPropertyIDMap):
2086
2087 2015-03-20  Yusuke Suzuki  <utatane.tea@gmail.com>
2088
2089         REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
2090         https://bugs.webkit.org/show_bug.cgi?id=142410
2091
2092         Reviewed by Geoffrey Garen.
2093
2094         The same issues are found in the existing code; PropertyName does not have ownership.
2095         This patch rewrite the point that should have ownership to Identifier.
2096
2097         * bindings/js/JSDOMWindowCustom.cpp:
2098         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2099         (WebCore::JSDOMWindow::putByIndex):
2100         * bindings/js/ReadableStreamJSSource.cpp:
2101         (WebCore::getInternalSlotFromObject):
2102         * bindings/scripts/CodeGeneratorJS.pm:
2103         (GenerateImplementation):
2104         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2105         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
2106         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2107         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
2108         * bindings/scripts/test/JS/JSTestInterface.cpp:
2109         (WebCore::JSTestInterface::putByIndex):
2110
2111 2015-03-20  Simon Fraser  <simon.fraser@apple.com>
2112
2113         Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
2114         https://bugs.webkit.org/show_bug.cgi?id=142917
2115
2116         Reviewed by Beth Dakin.
2117         
2118         The scrollperf test would fail to detect transitions between slow and fast scrolling
2119         for new pages, because there was no logging when slow-scrolling scrolling tree was
2120         torn down, and a new fast-scrolling tree constructed.
2121         
2122         Fix by always logging the slow-scrolling reasons in the first update of the
2123         ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
2124         changed.
2125
2126         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2127         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2128         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
2129         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
2130
2131 2015-03-19  Geoffrey Garen  <ggaren@apple.com>
2132
2133         Function.prototype.toString should not decompile the AST
2134         https://bugs.webkit.org/show_bug.cgi?id=142853
2135
2136         Reviewed by Sam Weinig.
2137
2138         * bindings/js/JSLazyEventListener.cpp:
2139         (WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
2140         number of attribute event listeners to account for the leading newline
2141         now added by JavaScriptCore.
2142
2143         This solution is not perfect, but there are a lot of pre-existing problems
2144         with line and column reporting for attribute event listeners, and this
2145         preserves existing behavior with reasonable reliability.
2146
2147 2015-03-20  Alex Christensen  <achristensen@webkit.org>
2148
2149         Progress towards CMake on Mac.
2150         https://bugs.webkit.org/show_bug.cgi?id=136003
2151
2152         Reviewed by Chris Dumez.
2153
2154         * PlatformMac.cmake:
2155         Added some directories to create forwarding headers from.
2156         Generate ObjC bindings.
2157
2158 2015-03-20  Per Arne Vollan  <peavo@outlook.com>
2159
2160         [WinCairo] Crash when leaving page while video is playing.
2161         https://bugs.webkit.org/show_bug.cgi?id=142578
2162
2163         Reviewed by Alex Christensen.
2164
2165         This can happen when there is an asynchronous event invoked from a video worker
2166         thread, accessing the media player object after it has been deleted.
2167         This is solved by resetting the media player pointer in the event object,
2168         when the media player is deleted.
2169
2170         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2171         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
2172         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
2173         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
2174         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
2175         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
2176         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
2177         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
2178         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
2179         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2180         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::MediaPlayerListener):
2181         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::~MediaPlayerListener):
2182         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::onMediaPlayerDeleted):
2183
2184 2015-03-20  Chris Dumez  <cdumez@apple.com>
2185
2186         Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
2187         https://bugs.webkit.org/show_bug.cgi?id=142911
2188
2189         Reviewed by Antti Koivisto.
2190
2191         Drop the isBackForwardLoadType(m_loadType) assertion in
2192         FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
2193         used to hold true when goToBackForwardItem() was only called with
2194         history navigation load types. However, after r181782, we use a Standard
2195         load in the cases where we do not wish to display stale content (e.g.
2196         restoring session state).
2197
2198         The assertion comment says "We only use cache-only loads to avoid
2199         resubmitting forms". However, we then call loadDifferentDocumentItem()
2200         which already takes care of using the ReturnCacheDataElseLoad cache
2201         policy as the HistoryItem has form data and we pass
2202         MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.
2203
2204         No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
2205         API test.
2206
2207         * loader/FrameLoader.cpp:
2208         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
2209
2210 2015-03-20  Andy Estes  <aestes@apple.com>
2211
2212         [Content Filtering] Adopt NEFilterSource unblock handling
2213         https://bugs.webkit.org/show_bug.cgi?id=142904
2214
2215         Reviewed by Andreas Kling.
2216
2217         * platform/cocoa/NetworkExtensionContentFilter.mm:
2218         (WebCore::NetworkExtensionContentFilter::unblockHandler):
2219         Returned an unblock handler that calls -[NEFilterSource remediateWithDecisionHandler:].
2220         * platform/cocoa/ParentalControlsContentFilter.mm:
2221         (WebCore::ParentalControlsContentFilter::unblockHandler): Used ASCIILiteral.
2222
2223 2015-03-19  Andy Estes  <aestes@apple.com>
2224
2225         [Content Filtering] Add tests for unblock requests
2226         https://bugs.webkit.org/show_bug.cgi?id=142900
2227
2228         Reviewed by Andreas Kling.
2229
2230         Currently the iOS Parental Controls content filter has a mechanism for requesting that a page be unblocked.
2231         WebKit implements this by listening for navigations originating from the filter's error page to a special URL,
2232         and requesting the page be unblocked via platform API, which might cause UI to be displayed. If the unblock is
2233         successful then we schedule a reload of the frame in order to display the unblocked document.
2234
2235         NetworkExtension also supports unblock requests, so in preparation for adopting its API, this patch allows
2236         content filters to specify their own unblock request method, teaches MockContentFilter to provide such a method,
2237         and writes tests to cover both allowed and denied unblock requests.
2238
2239         The content filter that blocks a load creates a ContentFilterUnblockHandler, passing it a lambda that is executed
2240         when a navigation matches the filter's special unblock URL. Filters can also specify that a script be executed in
2241         the context of its error page if the unblock is denied.
2242
2243         All platform content filters can handle unblock requests like this with the exception of iOS Parental Controls in WebKit2.
2244         Since UI can be displayed by the system in this case, the request must be made from within the UI process. Therefore the
2245         existing method is retained of serializing a WebFilterEvaluator and intercepting navigation policy calls in the UI process.
2246
2247         Tests: contentfiltering/allow-after-unblock-request.html
2248                contentfiltering/block-after-unblock-request.html
2249
2250         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
2251         (WebCore::JSMockContentFilterSettings::decisionPoint): Added some using statements for clarity.
2252         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
2253         (WebCore::toJSValue): Returns a JSValue from a Decision.
2254         (WebCore::toDecision): Returns a Decision from a JSValue.
2255         (WebCore::JSMockContentFilterSettings::decision): Used toJSValue.
2256         (WebCore::JSMockContentFilterSettings::setDecision): Used toDecision.
2257         (WebCore::JSMockContentFilterSettings::unblockRequestDecision): Used toJSValue.
2258         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision): Used toDecision.
2259         * loader/ContentFilter.cpp:
2260         (WebCore::ContentFilter::createIfNeeded): Passed a reference to the owning DocumentLoader.
2261         (WebCore::ContentFilter::ContentFilter): Ditto.
2262         (WebCore::ContentFilter::unblockHandler): If the unblockHandler requests that a script be executed when an
2263         unblock request is denied, create a wrapper unblockHandler that executes that script in m_documentLoader's frame.
2264         * loader/ContentFilter.h:
2265         * loader/DocumentLoader.cpp:
2266         (WebCore::DocumentLoader::responseReceived): Passed this to ContentFilter::createIfNeeded.
2267         * loader/FrameLoader.cpp:
2268         (WebCore::FrameLoader::prepareForLoadStart): Called PolicyChecker::prepareForLoadStart.
2269         * loader/PolicyChecker.cpp:
2270         (WebCore::PolicyChecker::prepareForLoadStart): Reset m_contentFilterUnblockHandler.
2271         (WebCore::PolicyChecker::checkNavigationPolicy): Moved logic to here from WebKit1's WebFrameLoaderClient.
2272         Placing it here allows it to be shared between WebKit1 and WebKit2 (when the unblock handler does not need to
2273         be called in the UI process).
2274         * loader/PolicyChecker.h:
2275         (WebCore::PolicyChecker::setContentFilterUnblockHandler): Added.
2276         * page/Frame.h: Made Frame ThreadSafeRefCounted, since RefPtr<Frames> are captured in lambdas that can be
2277         copied by background threads managed by the underlying platform.
2278         * platform/ContentFilterUnblockHandler.h:
2279         (WebCore::ContentFilterUnblockHandler::unblockURLScheme): Returned the Apple content filter scheme.
2280         (WebCore::ContentFilterUnblockHandler::unblockURLHost): Returned the unblock URL host.
2281         (WebCore::ContentFilterUnblockHandler::clear): Deleted.
2282         * platform/PlatformContentFilter.h:
2283         (WebCore::PlatformContentFilter::unblockRequestDeniedScript): Returned the unblock request denied script.
2284         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
2285         (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler): Added a constructor that takes an
2286         unblockURLHost and a UnblockRequesterFunction. Added an alternate constructor for iOS Parental Controls on
2287         WebKit2 that takes an unblockURLHost and a WebFilterEvaluator.
2288         (WebCore::ContentFilterUnblockHandler::needsUIProcess): Returned true if m_webFilterEvaluator is non-null.
2289         (WebCore::ContentFilterUnblockHandler::encode): Encoded m_unblockURLHost in addition to m_webFilterEvaluator.
2290         (WebCore::ContentFilterUnblockHandler::decode): Decoded m_unblockURLHost in addition to m_webFilterEvaluator.
2291         (WebCore::ContentFilterUnblockHandler::canHandleRequest): Returned true if there is a either a m_unblockRequester
2292         or a m_webFilterEvaluator and the request's host and scheme match those of the unblock request URL.
2293         (WebCore::dispatchToMainThread): Added a helper to dispatch a block to the main thread. Then if the web thread
2294         is enabled on iOS, dispatch it there.
2295         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Renamed from handleUnblockRequestAndDispatchIfSuccessful.
2296         Requested an unblock using either m_unblockRequester or m_webFilterEvaluator, then called decisionHandler with the response.
2297         (WebCore::scheme): Moved to ContentFilterUnblockHandler::unblockURLScheme.
2298         (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful): Renamed to requestUnblockAsync.
2299         * platform/cocoa/ParentalControlsContentFilter.mm:
2300         (WebCore::ParentalControlsContentFilter::unblockHandler): Returned an unblock handler using the WebFilterEvaluator constructor.
2301         * testing/MockContentFilter.cpp: Added using statments for clarity.
2302         (WebCore::settings): Added a helper to get MockContentFilterSettings::singleton().
2303         (WebCore::MockContentFilter::canHandleResponse): Used the helper.
2304         (WebCore::MockContentFilter::MockContentFilter): Took advantage of the using statements.
2305         (WebCore::MockContentFilter::addData): Ditto.
2306         (WebCore::MockContentFilter::finishedAddingData): Ditto.
2307         (WebCore::MockContentFilter::unblockHandler): Returned a ContentFilterUnblockHandler that checks settings() for its decision.
2308         (WebCore::MockContentFilter::unblockRequestDeniedScript): Returned the script to execute in MockContentFilter's
2309         error page when an unblock request is denied.
2310         (WebCore::MockContentFilter::maybeDetermineStatus): Took advantage of settings() and using statements.
2311         * testing/MockContentFilterSettings.cpp:
2312         (WebCore::MockContentFilterSettings::unblockRequestURL): Constructed a static unblock URL and returned it.
2313         * testing/MockContentFilterSettings.h:
2314         (WebCore::MockContentFilterSettings::unblockURLHost): Returned the filter's unblock URL host.
2315         (WebCore::MockContentFilterSettings::unblockRequestDecision): Returns the decision to make for an unblock request.
2316         (WebCore::MockContentFilterSettings::setUnblockRequestDecision): Sets the decision to make for an unblock request.
2317         * testing/MockContentFilterSettings.idl: Added the unblockRequestDecision and unblockRequestURL attributes.
2318
2319 2015-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2320
2321         [GTK] Crash due to empty drag image during drag-and-drop
2322         https://bugs.webkit.org/show_bug.cgi?id=142671
2323
2324         Reviewed by Philippe Normand.
2325
2326         Return early from ImageBuffer constructor if an empty size is
2327         given. This is a speculative fix for a crash while starting a drag
2328         and drop operation, that I haven't been able to reproduce.
2329
2330         * platform/graphics/cairo/ImageBufferCairo.cpp:
2331         (WebCore::ImageBuffer::ImageBuffer):
2332
2333 2015-03-19  Chris Dumez  <cdumez@apple.com>
2334
2335         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
2336         https://bugs.webkit.org/show_bug.cgi?id=142893
2337         <rdar://problem/19633737>
2338         <rdar://problem/19869257>
2339
2340         Reviewed by Antti Koivisto.
2341
2342         Always use ReturnCacheDataElseLoad cache policy for history navigations.
2343         Previously, we would use the default protocol cache policy for history
2344         navigations if m_stateMachine.committedFirstRealDocumentLoad() returned
2345         false so that we do not display stale content when restoring the session
2346         state of Safari statup (rdar://problem/8131355). This is now handled
2347         before reaching this method by no longer using "IndexedBackForward"
2348         FrameLoadType when restoring session tabs, and using "Standard" load
2349         type instead.
2350
2351         * loader/FrameLoader.cpp:
2352         (WebCore::FrameLoader::loadDifferentDocumentItem):
2353
2354 2015-03-19  Andy Estes  <aestes@apple.com>
2355
2356         [Content Filtering] Move ContentFilter to from platform/ to loader/
2357         https://bugs.webkit.org/show_bug.cgi?id=142897
2358
2359         Reviewed by Dan Bernstein.
2360
2361         ContentFilterCollection never contained any platform code, so it doesn't make sense for it to be in platform.
2362         Move it to loader/, since ContentFilters are owned by DocumentLoaders, and just call it ContentFilter. Extract
2363         the abstract part of ContentFilter into a new base class called PlatformContentFilter that each of the
2364         individual filters inherit from.
2365
2366         * WebCore.xcodeproj/project.pbxproj:
2367         * loader/ContentFilter.cpp: Renamed from Source/WebCore/platform/ContentFilter.cpp.
2368         (WebCore::ContentFilter::types): Moved from ContentFilterCollection.
2369         (WebCore::ContentFilter::createIfNeeded): Ditto.
2370         (WebCore::ContentFilter::ContentFilter): Ditto.
2371         (WebCore::ContentFilter::addData): Ditto.
2372         (WebCore::ContentFilter::finishedAddingData): Ditto.
2373         (WebCore::ContentFilter::needsMoreData): Ditto.
2374         (WebCore::ContentFilter::didBlockData): Ditto.
2375         (WebCore::ContentFilter::getReplacementData): Ditto.
2376         (WebCore::ContentFilter::unblockHandler): Ditto.
2377         * loader/ContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
2378         (WebCore::ContentFilter::type): Replaced a use of ContentFilterCollection.
2379         * platform/PlatformContentFilter.h: Renamed from Source/WebCore/platform/ContentFilter.h.
2380         * platform/cocoa/NetworkExtensionContentFilter.h: Inherited from PlatformContentFilter.
2381         * platform/cocoa/ParentalControlsContentFilter.h: Ditto.
2382         * testing/MockContentFilter.h: Ditto.
2383
2384 2015-03-19  Dean Jackson  <dino@apple.com>
2385
2386         CSS Animations with triggers should map scroll position to duration
2387         https://bugs.webkit.org/show_bug.cgi?id=142870
2388         <rdar://problem/20227244>
2389
2390         Reviewed by Simon Fraser.
2391
2392         Expose a prototype implementation of what will eventually be called
2393         animation-timebase, mapping the scroll location to the duration of an
2394         animation. This only applies if the animation has a start and end
2395         trigger.
2396
2397         Test: animations/trigger-container-scroll-boundaries.html
2398
2399         * css/CSSComputedStyleDeclaration.cpp:
2400         (WebCore::createAnimationTriggerValue): Change to downcast.
2401
2402         * css/CSSToStyleMap.cpp:
2403         (WebCore::CSSToStyleMap::mapAnimationTrigger): Fix a bug where I wasn't
2404         telling the ScrollAnimationTrigger object whether or not it had
2405         an end value. This wasn't visible before because we were not using
2406         the end value.
2407
2408         * page/animation/AnimationBase.cpp:
2409         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): Add a comment and
2410         change to using a downcast.
2411         (WebCore::AnimationBase::timeToNextService): Change to downcast.
2412         (WebCore::AnimationBase::freezeAtTime): Whitespace cleanup.
2413         (WebCore::AnimationBase::getElapsedTime): Calculate the elapsedTime based
2414         on the scroll position relative to the start and end trigger spots.
2415
2416         * page/animation/AnimationController.cpp:
2417         (WebCore::AnimationControllerPrivate::updateAnimations): Since this
2418         can potentially call into beginAnimationUpdateTime, it should have
2419         an update blocker. This fixes the assert we were seeing in tests.
2420         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Keep track of the scroll
2421         position so we don't need to ask for it all the time.
2422         * page/animation/AnimationControllerPrivate.h:
2423         (WebCore::AnimationControllerPrivate::scrollPosition): New accessor.
2424
2425         * platform/animation/AnimationTrigger.h: Add downcast macros.
2426         (WebCore::ScrollAnimationTrigger::create): Calculate hasEndValue from the passed
2427         parameters rather than a separate value.
2428         (WebCore::ScrollAnimationTrigger::hasEndValue):
2429         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
2430         (WebCore::ScrollAnimationTrigger::setHasEndValue): Deleted.
2431
2432         * platform/graphics/ca/GraphicsLayerCA.cpp:
2433         (WebCore::GraphicsLayerCA::animationCanBeAccelerated): If we have an
2434         animation of this sort, we can't use a CAAnimation.
2435
2436 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
2437
2438         [Mac] Move MediaPlaybackTargetPicker
2439         https://bugs.webkit.org/show_bug.cgi?id=142889
2440
2441         Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicker so it
2442         can be used by both WK2 and WK1.
2443
2444         Reviewed by Tim Horton.
2445
2446         * WebCore.xcodeproj/project.pbxproj:
2447         * platform/graphics/MediaPlaybackTargetPicker.cpp: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp.
2448         * platform/graphics/MediaPlaybackTargetPicker.h: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h.
2449         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h.
2450         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm.
2451
2452 2015-03-19  Enrica Casucci  <enrica@apple.com>
2453
2454         REGRESSION (r109593): Clicking after last inline element could cause a crash.
2455         https://bugs.webkit.org/show_bug.cgi?id=142880
2456         rdar://problem/17222294
2457
2458         Reviewed by Ryosuke Niwa.
2459
2460         Test: editing/selection/click-after-last-inline-crash.html
2461
2462         * rendering/RootInlineBox.cpp:
2463         (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
2464
2465 2015-03-19  Enrica Casucci  <enrica@apple.com>
2466
2467         One more build fix after r181760.
2468
2469         * page/EventHandler.cpp:
2470         (WebCore::EventHandler::handleDrag):
2471
2472 2015-03-19  Jessie Berlin  <jberlin@webkit.org>
2473
2474         Build fix after r181760.
2475
2476         * rendering/RenderAttachment.h:
2477
2478 2015-03-19  Jer Noble  <jer.noble@apple.com>
2479
2480         [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
2481         https://bugs.webkit.org/show_bug.cgi?id=142132
2482
2483         Reviewed by Tim Horton.
2484
2485         Add a new utility method to calculate a rect with a specific aspect ratio wrapping a smaller one.
2486
2487         * platform/graphics/GeometryUtilities.cpp:
2488         (WebCore::smallestRectWithAspectRatioAroundRect):
2489         * platform/graphics/GeometryUtilities.h:
2490
2491 2015-03-19  Chris Dumez  <cdumez@apple.com>
2492
2493         Get rid of "CachePolicyCache" cache policy
2494         https://bugs.webkit.org/show_bug.cgi?id=142881
2495
2496         Reviewed by Antti Koivisto.
2497
2498         Get rid of "CachePolicyCache" cache policy as it is unused.
2499
2500         * loader/cache/CachePolicy.h:
2501         * loader/cache/CachedResource.cpp:
2502         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
2503         * page/DiagnosticLoggingKeys.cpp:
2504         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey): Deleted.
2505         * page/DiagnosticLoggingKeys.h:
2506
2507 2015-03-19  Alex Christensen  <achristensen@webkit.org>
2508
2509         [Content Extensions] Test regular expression parse failures.
2510         https://bugs.webkit.org/show_bug.cgi?id=142872
2511
2512         Reviewed by Benjamin Poulain.
2513
2514         * contentextensions/URLFilterParser.cpp:
2515         (WebCore::ContentExtensions::GraphBuilder::finalize):
2516         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
2517         (WebCore::ContentExtensions::URLFilterParser::addPattern):
2518         (WebCore::ContentExtensions::URLFilterParser::statusString):
2519         * contentextensions/URLFilterParser.h:
2520         Changed failures that can never happen to assertions.
2521
2522 2015-03-19  Enrica Casucci  <enrica@apple.com>
2523
2524         Release build fix after https://trac.webkit.org/r181760.
2525
2526         Unreviewed.
2527
2528         * page/EventHandler.cpp:
2529         (WebCore::EventHandler::handleDrag):
2530
2531 2015-03-19  Enrica Casucci  <enrica@apple.com>
2532
2533         <attachment> should put URLs on the pasteboard so that Finder can accept drops.
2534         https://bugs.webkit.org/show_bug.cgi?id=142801
2535         rdar://problem/19982527
2536
2537         Reviewed by Tim Horton.
2538
2539         Test: editing/pasteboard/drag-and-drop-attachment-contenteditable.html
2540
2541         This patch adds all the necessary support to write attachment elements into
2542         the pasteboard, including the promised type.
2543
2544         * WebCore.xcodeproj/project.pbxproj:
2545         * page/DragActions.h:
2546         * page/DragClient.h:
2547         (WebCore::DragClient::declareAndWriteAttachment):
2548         * page/DragController.cpp:
2549         (WebCore::DragController::draggableElement):
2550         (WebCore::DragController::startDrag):
2551         * page/DragController.h:
2552         (WebCore::DragController::draggingAttachmentURL):
2553         * page/EventHandler.cpp:
2554         (WebCore::EventHandler::dragHysteresisExceeded):
2555         (WebCore::EventHandler::handleDrag):
2556         * page/mac/DragControllerMac.mm:
2557         (WebCore::DragController::declareAndWriteAttachment):
2558         * page/win/DragControllerWin.cpp:
2559         (WebCore::DragController::declareAndWriteAttachment):
2560         * platform/URL.cpp:
2561         (WebCore::URL::fileURLWithFileSystemPath):
2562         * platform/URL.h:
2563         * rendering/HitTestResult.cpp:
2564         (WebCore::HitTestResult::absoluteAttachmentURL):
2565         * rendering/HitTestResult.h:
2566
2567 2015-03-19  Chris Dumez  <cdumez@apple.com>
2568
2569         Unreviewed, fix linking error after r181753.
2570
2571         Drop WEBCORE_EXPORT for Settings::minimumDOMTimerInterval() as it is
2572         now inlined.
2573
2574         * page/Settings.h:
2575         (WebCore::Settings::minimumDOMTimerInterval):
2576
2577 2015-03-19  Brady Eidson  <beidson@apple.com>
2578
2579         Part of content extensions should apply css selectors
2580         https://bugs.webkit.org/show_bug.cgi?id=142604
2581
2582         Reviewed by Alex Christensen.
2583
2584         Add a new action for applying the cached global stylesheet.
2585
2586         * contentextensions/CompiledContentExtension.cpp:
2587         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
2588
2589         * contentextensions/ContentExtensionActions.h:
2590
2591         * contentextensions/ContentExtensionCompiler.cpp:
2592         (WebCore::ContentExtensions::serializeActions):
2593
2594         * contentextensions/ContentExtensionParser.cpp:
2595         (WebCore::ContentExtensions::loadAction):
2596
2597         * contentextensions/ContentExtensionRule.cpp:
2598         (WebCore::ContentExtensions::Action::deserialize):
2599         * contentextensions/ContentExtensionRule.h:
2600         (WebCore::ContentExtensions::Action::Action):
2601         (WebCore::ContentExtensions::Action::operator==):
2602         (WebCore::ContentExtensions::Action::stringArgument):
2603         (WebCore::ContentExtensions::Action::cssSelector): Deleted.
2604
2605         * contentextensions/ContentExtensionsBackend.cpp:
2606         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2607
2608         * loader/cache/CachedResourceLoader.cpp:
2609         (WebCore::CachedResourceLoader::requestResource):
2610
2611 2015-03-19  Chris Dumez  <cdumez@apple.com>
2612
2613         Clean up DOMTimer related settings
2614         https://bugs.webkit.org/show_bug.cgi?id=142837
2615
2616         Reviewed by Darin Adler.
2617
2618         Clean up DOMTimer related settings:
2619         - Make default minimum timer interval 4ms instead of 10ms as all ports
2620           were setting it to 4ms and the specifications says 4ms.
2621         - Get rid of setters for default DOMTimer interval values as they are
2622           not set anymore.
2623         - Move default DOMTimer interval values from Settings to DOMTimer as
2624           those are global (not per-page) and not really settings.
2625         - Stop using abbreviations in the names (e.g. min -> minimum).
2626         - Move DOMTimer settings members from Page to Settings. There is no
2627           reason for those to be stored on the Page. The getters were private
2628           so call-sites had to go via Settings anyway. Also, call-sites already
2629           had to do a null check on the page to get the settings. It seems
2630           unfortunate for the settings to do another null-check on the page for
2631           retrieving the setting value from the page.
2632         - Inline the DOMTimer settings getters as these are trivial.
2633
2634         * dom/Document.cpp:
2635         (WebCore::Document::minimumTimerInterval):
2636         (WebCore::Document::timerAlignmentInterval):
2637         * dom/ScriptExecutionContext.cpp:
2638         (WebCore::ScriptExecutionContext::minimumTimerInterval):
2639         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
2640         * page/DOMTimer.h:
2641         * page/Page.cpp:
2642         (WebCore::Page::Page):
2643         (WebCore::Page::setTimerThrottlingEnabled):
2644         (WebCore::Page::setMinimumTimerInterval): Deleted.
2645         (WebCore::Page::minimumTimerInterval): Deleted.
2646         * page/Page.h:
2647         (WebCore::Page::timerAlignmentInterval): Deleted.
2648         * page/Settings.cpp:
2649         (WebCore::Settings::Settings):
2650         (WebCore::Settings::setMinimumDOMTimerInterval):
2651         (WebCore::Settings::setDOMTimerAlignmentInterval):
2652         (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): Deleted.
2653         (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): Deleted.
2654         (WebCore::Settings::setDefaultMinDOMTimerInterval): Deleted.
2655         (WebCore::Settings::defaultMinDOMTimerInterval): Deleted.
2656         (WebCore::Settings::setMinDOMTimerInterval): Deleted.
2657         (WebCore::Settings::minDOMTimerInterval): Deleted.
2658         (WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Deleted.
2659         (WebCore::Settings::defaultDOMTimerAlignmentInterval): Deleted.
2660         (WebCore::Settings::domTimerAlignmentInterval): Deleted.
2661         * page/Settings.h:
2662         (WebCore::Settings::minimumDOMTimerInterval):
2663         (WebCore::Settings::domTimerAlignmentInterval):
2664         * testing/InternalSettings.cpp:
2665         (WebCore::InternalSettings::Backup::Backup):
2666         (WebCore::InternalSettings::Backup::restoreTo):
2667         (WebCore::InternalSettings::setMinimumTimerInterval):
2668
2669 2015-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2670
2671         [GTK] Scrollbars look bad with GTK+ 3.16
2672         https://bugs.webkit.org/show_bug.cgi?id=140800
2673
2674         Reviewed by Sergio Villar Senin.
2675
2676         Take margin into account when rendering scrollbars. This fixes the
2677         huge scrollbars rendered with GTK+ 3.16. We don't need to check
2678         the GTK+ version because in previous versions the marging were 0,
2679         so the same code just works.
2680
2681         * platform/gtk/ScrollbarThemeGtk.cpp:
2682         (WebCore::adjustRectAccordingToMargin):
2683         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
2684         (WebCore::ScrollbarThemeGtk::paintThumb):
2685
2686 2015-03-19  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2687
2688         [Streams API] Update ReadableStream API according new version of the specification
2689         https://bugs.webkit.org/show_bug.cgi?id=142822
2690
2691         Reviewed by Benjamin Poulain.
2692
2693         This patch updates the IDL of ReadableStream according the new version of the spec, which splits functionality between ReadableStream and ReadableStreamReader.
2694         In particular, this patch removes read(), ready, closed and state from ReadableStream and it adds the getReader method.
2695
2696         Covered by updated readablestream-constructor.html test.
2697
2698         * Modules/streams/ReadableStream.cpp:
2699         (WebCore::ReadableStream::ReadableStream):
2700         (WebCore::ReadableStream::state): Deleted.
2701         (WebCore::ReadableStream::closed): Deleted.
2702         (WebCore::ReadableStream::ready): Deleted.
2703         * Modules/streams/ReadableStream.h:
2704         (WebCore::ReadableStream::internalState): Added to make mac build system happy, to be used by ReadableStreamReader.
2705         * Modules/streams/ReadableStream.idl:
2706         * bindings/js/JSReadableStreamCustom.cpp:
2707         (WebCore::JSReadableStream::cancel):
2708         (WebCore::JSReadableStream::getReader):
2709         (WebCore::JSReadableStream::read): Deleted.
2710         (WebCore::getOrCreatePromiseDeferredFromObject): Deleted.
2711         (WebCore::readyPromiseSlotName): Deleted.
2712         (WebCore::JSReadableStream::ready): Deleted.
2713         (WebCore::closedPromiseSlotName): Deleted.
2714         (WebCore::JSReadableStream::closed): Deleted.
2715
2716 2015-03-18  Manuel Rego Casasnovas  <rego@igalia.com>
2717
2718         Unreviewed. GTK build fix after r181720.
2719
2720         * rendering/RenderImage.cpp:
2721         (WebCore::RenderImage::styleDidChange):
2722
2723 2015-03-18  Antti Koivisto  <antti@apple.com>
2724
2725         Test disk cache behavior when using back navigation cache policy
2726         https://bugs.webkit.org/show_bug.cgi?id=142848
2727
2728         Reviewed by Chris Dumez.
2729
2730         Add a way to override the normal cache policy so we can test reload behavior of cache without actually reloading.
2731
2732         Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
2733
2734         * loader/FrameLoader.cpp:
2735         (WebCore::FrameLoader::addExtraFieldsToRequest):
2736         * loader/FrameLoader.h:
2737         (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
2738         * testing/Internals.cpp:
2739         (WebCore::Internals::setOverrideCachePolicy):
2740         * testing/Internals.h:
2741         * testing/Internals.idl:
2742
2743 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
2744
2745         TextFragment#start() is always >= 0 since its type is unsigned
2746         https://bugs.webkit.org/show_bug.cgi?id=142860
2747
2748         Reviewed by Andreas Kling.
2749
2750         Since TextFragment::m_start is unsigned, the result of
2751         TextFragment::start() is always >= 0 and assertion is not effective.
2752         This patch removes this assertion to suppress warnings.
2753
2754         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2755         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
2756
2757 2015-03-18  Alex Christensen  <achristensen@webkit.org>
2758
2759         [ContentExtensions] Prepare for compiling stylesheets of selectors to be used on every page.
2760         https://bugs.webkit.org/show_bug.cgi?id=142799
2761
2762         Reviewed by Brady Eidson.
2763
2764         * WebCore.xcodeproj/project.pbxproj:
2765         Make private headers to use with API tests.
2766         * contentextensions/CompiledContentExtension.cpp:
2767         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
2768         * contentextensions/CompiledContentExtension.h:
2769         Added method to get only the selectors from the root of the DFA, which apply to all URLs.
2770         * contentextensions/ContentExtensionCompiler.cpp:
2771         (WebCore::ContentExtensions::compileRuleList):
2772         Added checking if the trigger will match everything.
2773         These actions can be put directly on the root of the DFA without adding extra epsilon transitions to the NFA.
2774         * contentextensions/DFA.h:
2775         (WebCore::ContentExtensions::DFA::nodeAt):
2776         * contentextensions/DFABytecodeInterpreter.cpp:
2777         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
2778         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2779         * contentextensions/DFABytecodeInterpreter.h:
2780         * contentextensions/NFA.h:
2781         * contentextensions/URLFilterParser.cpp:
2782         (WebCore::ContentExtensions::Term::quantifier):
2783         Sink terms to a vector then add nodes to NFA when finalizing after checking for regexes that match everything.
2784         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
2785         (WebCore::ContentExtensions::GraphBuilder::finalize):
2786         (WebCore::ContentExtensions::GraphBuilder::parseStatus):
2787         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2788         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2789         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
2790         (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
2791         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
2792         (WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
2793         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
2794         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
2795         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
2796         (WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
2797         (WebCore::ContentExtensions::GraphBuilder::disjunction):
2798         (WebCore::ContentExtensions::GraphBuilder::hasError):
2799         (WebCore::ContentExtensions::GraphBuilder::fail):
2800         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
2801         (WebCore::ContentExtensions::URLFilterParser::addPattern):
2802         (WebCore::ContentExtensions::URLFilterParser::statusString):
2803         (WebCore::ContentExtensions::GraphBuilder::errorMessage): Deleted.
2804         * contentextensions/URLFilterParser.h:
2805         Use an enum instead of strings for the status to avoid checking strings when we have a regex that matches everything.
2806
2807 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
2808
2809         Fix build failure due to FALLTHROUGH in unreachable code
2810         https://bugs.webkit.org/show_bug.cgi?id=142703
2811
2812         Reviewed by Benjamin Poulain.
2813
2814         FALLTHROUGH should not exist in unreachable code marked by
2815         ASSERT_NOT_REACHABLE.
2816
2817         When !ENABLE(CSS_SELECTOR_JIT) and Debug mode is enabled,
2818         both ASSERT_NOT_REACHED and FALLTHROUGH are instantiated
2819         and it cause build failure.
2820
2821         Here, since CompiledSingle/CompiledSingleWithRootFilter are
2822         not set when !ENABLE(CSS_SELECTOR_JIT). So dropping FALLTHROUGH
2823         and leave ASSERT_NOT_REACHED.
2824         And since ASSERT_NOT_ReACHED is stripped when Release build,
2825         I've inserted FALLTHROUGH() if ASSERT_DISABLED.
2826         This fix is the same to r162906.
2827
2828         * dom/SelectorQuery.cpp:
2829         (WebCore::SelectorDataList::execute):
2830
2831 2015-03-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
2832
2833         Switching between two SVG images with no intrinsic sizes causes them to get the default SVG size instead of the container size.
2834         https://bugs.webkit.org/show_bug.cgi?id=142805.
2835
2836         Reviewed by Darin Adler.
2837         
2838         The bug happens due to wrong logic in RenderImage::imageDimensionsChanged().
2839         This function decides to setNeedsLayout() if the intrinsic size of the image
2840         changes. If the size does not change, it only repaints the image rectangle.
2841         When switching the src of the an image between two SVG images and both of
2842         them have no intrinsic size, we do not updateInnerContentRect() and this
2843         means an SVGImageForContainer is not going to be created for this image.
2844         When the image is drawn, it is drawn directly from the SVGImage. And this
2845         means the drawing has to be scaled by container_size / SVG_default_intrinsic_size
2846         
2847         After figuring out that I need to updateInnerContentRect() to fix this bug,
2848         I found out Blink has already changed this code to do the same thing. But 
2849         they also did more clean-up in this function. Here is the link
2850         https://codereview.chromium.org/114323004. I think their change seems correct
2851         although they did not say what exactly they were trying to fix.
2852         
2853         The plan for repaintOrMarkForLayout(), which is the new name of this function,
2854         is the following:
2855             -- setNeedLayout() if the intrinsic size changes and it affects the size
2856                of the image.
2857             -- updateInnerContentRect() if the intrinsic size did not change but the
2858                image has exiting layout.
2859             -- repaint the image rectangle if layout is not needed.
2860             
2861         This change also removes the call to computeLogicalWidthInRegion(), which is
2862         almost running a layout for the image. This call figures out whether the image
2863         needs to setNeedsLayout(). This call is unnecessary; the image needs to run a
2864         layout if the intrinsic size has changed and it affects the size of the image.
2865                     
2866         Test: svg/as-image/svg-no-intrinsic-size-switching.html
2867
2868         * rendering/RenderImage.cpp:
2869         (WebCore::RenderImage::styleDidChange): Change the function call.
2870         (WebCore::RenderImage::imageChanged): Rename local variable and change the
2871         function call.
2872         
2873         (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Simplify this function.
2874         Call setIntrinsicSize() with the new size unless the image is in error state.
2875         
2876         (WebCore::RenderImage::repaintOrMarkForLayout): This a better name for this
2877         function since it is called even if the intrinsic size was not changed.
2878         (WebCore::RenderImage::imageDimensionsChanged): Deleted.
2879         
2880         * rendering/RenderImage.h: Rename imageDimensionsChanged() and change the 
2881         updateIntrinsicSizeIfNeeded() to return void.
2882         
2883         * rendering/svg/RenderSVGForeignObject.cpp:
2884         (WebCore::RenderSVGForeignObject::paint): Code cleanup. This function can
2885         only handle the paint phases PaintPhaseForeground and PaintPhaseSelection.
2886         Use this information to simplify the logic and order of painting there.
2887
2888 2015-03-18  Jeremy Jones  <jeremyj@apple.com>
2889
2890         Fix typo in playerViewControllerWillCancelOptimizedFullscree.
2891         https://bugs.webkit.org/show_bug.cgi?id=142745
2892
2893         Reviewed by Darin Adler.
2894
2895         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2896         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]):
2897         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): Deleted.
2898
2899 2015-03-18  Simon Fraser  <simon.fraser@apple.com>
2900
2901         Avoid repaints when changing transform on an element with multiple background images
2902         https://bugs.webkit.org/show_bug.cgi?id=142841
2903
2904         Reviewed by Zalan Bujtas.
2905         
2906         Replace the cheap test for changed images in RenderElement::updateFillImages()
2907         with an exhaustive test that walks the entire list of background images,
2908         since any ensuing repaint is way more expensive than a slightly more expensive check here.
2909         
2910         Test: fast/repaint/multiple-backgrounds-style-change.html
2911
2912         * rendering/RenderElement.cpp:
2913         (WebCore::RenderElement::updateFillImages):
2914         * rendering/style/FillLayer.cpp:
2915         (WebCore::layerImagesIdentical): See if both images are the same (either none
2916         or both mask images, and same image pointer).
2917         (WebCore::FillLayer::imagesIdentical): Walk the two FillLayer lists, checking the images
2918         on each one. Returns false if we reach the end of one list before the other, or the images
2919         are different.
2920         * rendering/style/FillLayer.h: New static function; static because
2921         it compares two FillLayer lists, and I think that makes more sense than
2922         a member function.
2923
2924 2015-03-18  Anders Carlsson  <andersca@apple.com>
2925
2926         Pass cookies by reference in CookieHash functions
2927         https://bugs.webkit.org/show_bug.cgi?id=142839
2928
2929         Reviewed by Sam Weinig.
2930
2931         * platform/Cookie.h:
2932         (WebCore::CookieHash::hash):
2933         (WebCore::CookieHash::equal):
2934
2935 2015-03-18  Tim Horton  <timothy_horton@apple.com>
2936
2937         Temporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build
2938
2939         * dom/SelectorQuery.cpp:
2940         (WebCore::SelectorDataList::execute):
2941
2942 2015-03-18  Myles C. Maxfield  <mmaxfield@apple.com>
2943
2944         Call CTFontSetRenderingParameters before rendering text
2945         https://bugs.webkit.org/show_bug.cgi?id=142816
2946
2947         Reviewed by Darin Adler.
2948
2949         No new tests.
2950
2951         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2952         (WebCore::showGlyphsWithAdvances):
2953         * platform/spi/cocoa/CoreTextSPI.h:
2954
2955 2015-03-18  Chris Dumez  <cdumez@apple.com>
2956
2957         [WK2] Log the number of network cache requests that we have never seen before
2958         https://bugs.webkit.org/show_bug.cgi?id=142828
2959         <rdar://problem/19632130>
2960
2961         Reviewed by Antti Koivisto.
2962
2963         Add diagnostic logging key for network cache efficacy logging.
2964
2965         * page/DiagnosticLoggingKeys.cpp:
2966         (WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
2967         (WebCore::DiagnosticLoggingKeys::requestKey):
2968         * page/DiagnosticLoggingKeys.h:
2969
2970 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
2971
2972         Use filterRootId in SelectorQuery even if CSS JIT is not enabled
2973         https://bugs.webkit.org/show_bug.cgi?id=142703
2974
2975         Reviewed by Benjamin Poulain.
2976
2977         filterRootId pruning path is not inherently related to CSS JIT.
2978         This patch enables filterRootId even in the environment
2979         where CSS JIT is not enabled.
2980
2981         * dom/SelectorQuery.cpp:
2982         (WebCore::filterRootById):
2983         (WebCore::SelectorDataList::executeSingleSelectorData):
2984         (WebCore::SelectorDataList::execute):
2985         * dom/SelectorQuery.h:
2986
2987 2015-03-18  Zalan Bujtas  <zalan@apple.com>
2988
2989         Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
2990         https://bugs.webkit.org/show_bug.cgi?id=142809
2991
2992         Reviewed by Antti Koivisto.
2993
2994         FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
2995
2996         No change in functionality.
2997
2998         * rendering/SimpleLineLayoutFlowContents.h:
2999         (WebCore::SimpleLineLayout::FlowContents::begin):
3000         (WebCore::SimpleLineLayout::FlowContents::end):
3001         (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
3002         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
3003         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
3004         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
3005         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
3006         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
3007         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
3008         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3009         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3010
3011 2015-03-18  Zalan Bujtas  <zalan@apple.com>
3012
3013         Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
3014         https://bugs.webkit.org/show_bug.cgi?id=142785
3015
3016         Reviewed by Antti Koivisto.
3017
3018         This is in transition to support <br>. A particular position could point to multiple
3019         segments when <br> is directly followed by text.
3020
3021         No change in functionality.
3022
3023         * rendering/SimpleLineLayoutFlowContents.cpp:
3024         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
3025         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
3026         * rendering/SimpleLineLayoutFlowContents.h:
3027         (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
3028         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
3029         (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
3030         * rendering/SimpleLineLayoutResolver.cpp:
3031         (WebCore::SimpleLineLayout::RunResolver::Run::text):
3032
3033 2015-03-17  Simon Fraser  <simon.fraser@apple.com>
3034
3035         Skip trying to paint overlay scrollbars when there are none or they are clipped out
3036         https://bugs.webkit.org/show_bug.cgi?id=142811
3037         rdar://problem/20200725
3038
3039         Reviewed by Darin Adler.
3040
3041         In some content with lots of layers and overflow:scroll, we could spend 20% of
3042         the time under paintOverflowControlsForFragments() setting up an (empty) clip,
3043         and then trying to draw scrollbars that we don't have.
3044         
3045         Avoid calling paintOverflowControlsForFragments() if there are no scrollbars,
3046         and don't both setting up an empty clip just to paint nothing.
3047
3048         * rendering/RenderLayer.cpp:
3049         (WebCore::RenderLayer::paintLayerContents):
3050         (WebCore::RenderLayer::paintOverflowControlsForFragments):
3051
3052 2015-03-18  Per Arne Vollan  <peavo@outlook.com>
3053
3054         [WinCairo] Unreviewed build fix after r181665.
3055
3056         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3057         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
3058
3059 2015-03-18  Joseph Pecoraro  <pecoraro@apple.com>
3060
3061         Remove unused "preprocessor" parameter to sub-CodeGenerators
3062         https://bugs.webkit.org/show_bug.cgi?id=142793
3063
3064         Reviewed by Darin Adler.
3065
3066         * bindings/scripts/CodeGenerator.pm:
3067         (ProcessDocument):
3068         (FileNamePrefix):
3069         * bindings/scripts/CodeGeneratorObjC.pm:
3070
3071 2015-03-18  Zalan Bujtas  <zalan@apple.com>
3072
3073         Simple line layout: Split fragments on renderer boundary on the fly.
3074         https://bugs.webkit.org/show_bug.cgi?id=142579
3075
3076         Reviewed by Antti Koivisto.
3077
3078         Fragment splitting at renderers' boundary at the end of the line is no longer needed.
3079         This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
3080         fragments across renderer boundary.
3081
3082         Test: fast/text/simple-line-with-multiple-renderers.html
3083
3084         * rendering/SimpleLineLayout.cpp:
3085         (WebCore::SimpleLineLayout::revertRuns):
3086         (WebCore::SimpleLineLayout::LineState::isEmpty):
3087         (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
3088         whether neighboring fragments need collapsing.
3089         (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
3090         a fragment continuation.
3091         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
3092         (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
3093         they all get added to the current line.
3094         (WebCore::SimpleLineLayout::createLineRuns):
3095         (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
3096         (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
3097         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
3098         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
3099         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
3100         (WebCore::SimpleLineLayout::begin): Deleted.
3101         (WebCore::SimpleLineLayout::end): Deleted.
3102         (WebCore::SimpleLineLayout::preWrap): Deleted.
3103         (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
3104         (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
3105         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
3106         (WebCore::SimpleLineLayout::createTextRuns): Deleted.
3107         (WebCore::SimpleLineLayout::create): Deleted.
3108         (WebCore::SimpleLineLayout::Layout::create): Deleted.
3109         * rendering/SimpleLineLayoutFlowContents.h:
3110         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
3111         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
3112         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
3113         * rendering/SimpleLineLayoutFunctions.cpp:
3114         (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
3115         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3116         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
3117         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
3118         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
3119         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
3120         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3121         * rendering/SimpleLineLayoutTextFragmentIterator.h:
3122         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
3123         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
3124         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
3125         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
3126         (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
3127         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
3128
3129 2015-03-18  Manuel Rego Casasnovas  <rego@igalia.com>
3130
3131         Flex and grid items should be painted as inline-blocks
3132         https://bugs.webkit.org/show_bug.cgi?id=142266
3133
3134         Reviewed by Darin Adler.
3135
3136         Based on Blink r157004 by <cbiesinger@chromium.org>.
3137         https://src.chromium.org/viewvc/blink?revision=157004&view=revision
3138
3139         Both flexbox and grid specs define that the painting order of flex/grid
3140         items is the same as inline blocks. See
3141         http://dev.w3.org/csswg/css-flexbox/#painting and
3142         http://dev.w3.org/csswg/css-grid/#z-order.
3143
3144         Extracted inline blocks painting code from InlineElementBox and moved to
3145         a helper method that will be reused for flexboxes and grids.
3146
3147         Tests: css3/flexbox/flex-item-text-background-not-interleaved.html
3148                fast/css-grid-layout/grid-item-text-background-not-interleaved.html
3149
3150         * rendering/InlineElementBox.cpp:
3151         (WebCore::InlineElementBox::paint): Move code to
3152         RenderElement::paintAsInlineBlock().
3153         * rendering/RenderBlock.cpp:
3154         (WebCore::RenderBlock::paintChild): Add new argument to paint children
3155         as inline blocks.
3156         * rendering/RenderBlock.h: Define PaintType enmu and modify paintChild()
3157         signature to add the new argument.
3158         * rendering/RenderElement.cpp:
3159         (WebCore::paintPhase): Paint element in a phase.
3160         (WebCore::RenderElement::paintAsInlineBlock): Code extracted from
3161         InlineElementBox::paint().
3162         * rendering/RenderElement.h: Add new method signature.
3163         * rendering/RenderFlexibleBox.cpp:
3164         (WebCore::RenderFlexibleBox::paintChildren): Call
3165         RenderBlock::paintChild() with the new argument.
3166         * rendering/RenderGrid.cpp:
3167         (WebCore::RenderGrid::paintChildren): Ditto.
3168
3169 2015-03-18  Chris Dumez  <cdumez@apple.com>
3170
3171         [WK2] Log total number of network cache queries using diagnostic logging
3172         https://bugs.webkit.org/show_bug.cgi?id=142803
3173         <rdar://problem/19632130>
3174
3175         Reviewed by Antti Koivisto.
3176
3177         Add diagnostic logging key needed for network efficacy logging.
3178
3179         * page/DiagnosticLoggingKeys.cpp:
3180         (WebCore::DiagnosticLoggingKeys::retrievalRequestKey):
3181         * page/DiagnosticLoggingKeys.h:
3182
3183 2015-03-18  Tim Horton  <timothy_horton@apple.com>
3184
3185         Fix the build after r181660
3186
3187         * page/EventHandler.cpp:
3188         (WebCore::EventHandler::setImmediateActionStage):
3189         * page/EventHandler.h:
3190         (WebCore::EventHandler::setImmediateActionStage):
3191         Un-inline setImmediateActionStage, because it is exported to WebCore, and
3192         exporting inline thing causes random weak symbol errors on some platforms.
3193
3194 2015-03-17  Conrad Shultz  <conrad_shultz@apple.com>
3195
3196         Ignore some deprecation warnings
3197         https://bugs.webkit.org/show_bug.cgi?id=142813
3198
3199         Reviewed by Mark Rowe.
3200
3201         Fixing the deprecations is tracked by: <rdar://problem/20201450>
3202
3203         * editing/cocoa/HTMLConverter.mm:
3204         (HTMLConverter::_processElement):
3205
3206 2015-03-17  Commit Queue  <commit-queue@webkit.org>
3207
3208         Unreviewed, rolling out r181667, r181682, and r181683.
3209         https://bugs.webkit.org/show_bug.cgi?id=142812
3210
3211         Broke multiple tests with ASan, plus dependent commits
3212         (Requested by ap on #webkit).
3213
3214         Reverted changesets:
3215
3216         "Simple line layout: Split fragments on renderer boundary on
3217         the fly."
3218         https://bugs.webkit.org/show_bug.cgi?id=142579
3219         http://trac.webkit.org/changeset/181667
3220
3221         "Simple line layout: Change FlowContents::segmentForPosition()
3222         to segmentForRun()."
3223         https://bugs.webkit.org/show_bug.cgi?id=142785
3224         http://trac.webkit.org/changeset/181682
3225
3226         "Simple line layout: Use Vector<>::const_iterator instead of
3227         custom FlowContents::Iterator."
3228         https://bugs.webkit.org/show_bug.cgi?id=142809
3229         http://trac.webkit.org/changeset/181683
3230
3231 2015-03-17  Zalan Bujtas  <zalan@apple.com>
3232
3233         Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
3234         https://bugs.webkit.org/show_bug.cgi?id=142809
3235
3236         Reviewed by Antti Koivisto.
3237
3238         FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
3239
3240         No change in functionality.
3241
3242         * rendering/SimpleLineLayoutFlowContents.h:
3243         (WebCore::SimpleLineLayout::FlowContents::begin):
3244         (WebCore::SimpleLineLayout::FlowContents::end):
3245         (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
3246         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
3247         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
3248         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
3249         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
3250         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
3251         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
3252         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3253         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3254
3255 2015-03-17  Zalan Bujtas  <zalan@apple.com>
3256
3257         Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
3258         https://bugs.webkit.org/show_bug.cgi?id=142785
3259
3260         Reviewed by Antti Koivisto.
3261
3262         This is in transition to support <br>. A particular position could point to multiple
3263         segments when <br> is directly followed by text.
3264
3265         No change in functionality.
3266
3267         * rendering/SimpleLineLayoutFlowContents.cpp:
3268         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
3269         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
3270         * rendering/SimpleLineLayoutFlowContents.h:
3271         (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
3272         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
3273         (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
3274         * rendering/SimpleLineLayoutResolver.cpp:
3275         (WebCore::SimpleLineLayout::RunResolver::Run::text):
3276
3277 2015-03-17  Chris Dumez  <cdumez@apple.com>
3278
3279         [Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
3280         https://bugs.webkit.org/show_bug.cgi?id=142752
3281         <rdar://problem/20176731>
3282
3283         Reviewed by Antti Koivisto.
3284
3285         setSharedTimerFireInterval() / stopSharedTimer() are expensive on Mac
3286         and iOS on pages using a lot of timers.
3287
3288         For example, on bing.com / iOS, ~15.4% of the CPU time is spent in
3289         setSharedTimerFireInterval() and ~14.7% of the CPU time is spent in
3290         stopSharedTimer(). The expensive calls are CFRunLoopAddTimer (11.4%),
3291         CFRunLoopTimerInvalidate (14.1%), CFRunLoopTimerCreate (3.3%).
3292
3293         The issue is that we keep creating, adding to run loop modes, and then
3294         destroying the sharedTimer for each firing event. This is very
3295         expensive. In such case, the CFRunLoopTimerRef documentation advises to
3296         """
3297         ... create a repeating timer with an initial firing time in the distant
3298         future (or the initial firing time) and a very large repeat interval—on
3299         the order of decades or more—and add it to all the necessary run loop
3300         modes. Then, when you know when the timer should fire next, you reset
3301         the firing time with CFRunLoopTimerSetNextFireDate, perhaps from the
3302         timer’s own callback function. This technique effectively produces a
3303         reusable, asynchronous timer.
3304         """ [1].
3305
3306         Doing so greatly decreases CPU time spend in:
3307         - setSharedTimerFireInterval(): 15.4% -> 4.6%
3308         - stopSharedTimer(): 14.6% -> 8.6%
3309
3310         Overall CPU time spent on bing.com in timerFired() goes down from
3311         ~61.2% to ~49.5%.
3312
3313         This patch also refactors the SharedTimer code to share as much as
3314         possible between Mac and iOS.
3315
3316         This patch is based in part on the following patch:
3317         http://trac.webkit.org/changeset/143210
3318
3319         [1] https://developer.apple.com/library/prerelease/ios/documentation/CoreFoundation/Reference/CFRunLoopTimerRef/index.html#//apple_ref/c/func/CFRunLoopTimerSetNextFireDate
3320
3321         * WebCore.xcodeproj/project.pbxproj:
3322         * platform/SharedTimer.h:
3323         (WebCore::SharedTimer::invalidate):
3324         (WebCore::MainThreadSharedTimer::setFiredFunction): Deleted.
3325         (WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
3326         (WebCore::MainThreadSharedTimer::stop): Deleted.
3327         * platform/ThreadTimers.cpp:
3328         (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
3329         * platform/cf/SharedTimerCF.mm: Added.
3330         (WebCore::applicationDidBecomeActive):
3331         (WebCore::setupPowerObserver):
3332         (WebCore::setSharedTimerFiredFunction):
3333         (WebCore::timerFired):
3334         (WebCore::restartSharedTimer):
3335         (WebCore::invalidateSharedTimer):
3336         (WebCore::setSharedTimerFireInterval):
3337         (WebCore::stopSharedTimer):
3338         * platform/efl/SharedTimerEfl.cpp:
3339         (WebCore::invalidateSharedTimer):
3340         * platform/gtk/SharedTimerGtk.cpp:
3341         (WebCore::invalidateSharedTimer):
3342         * platform/ios/SharedTimerIOS.mm: Removed.
3343         * platform/mac/PowerObserverMac.h: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
3344         * platform/mac/PowerObserverMac.mm: Renamed from Source/WebCore/platform/mac/SharedTimerMac.mm.
3345         (WebCore::PowerObserver::PowerObserver):
3346         (WebCore::PowerObserver::~PowerObserver):
3347         (WebCore::PowerObserver::didReceiveSystemPowerNotification):
3348         * platform/win/SharedTimerWin.cpp:
3349         (WebCore::removeSharedTimer):
3350
3351 2015-03-17  Tim Horton  <timothy_horton@apple.com>
3352
3353         Cannot invoke action menus anymore
3354         https://bugs.webkit.org/show_bug.cgi?id=142797
3355         <rdar://problem/20032670>
3356
3357         Reviewed by Beth Dakin.
3358
3359         * platform/spi/mac/NSMenuSPI.h:
3360         Add additional NSMenu SPI.
3361
3362 2015-03-17  Zalan Bujtas  <zalan@apple.com>
3363
3364         Simple line layout: Split fragments on renderer boundary on the fly.
3365         https://bugs.webkit.org/show_bug.cgi?id=142579
3366
3367         Reviewed by Antti Koivisto.
3368
3369         Fragment splitting at renderers' boundary at the end of the line is no longer needed.
3370         This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
3371         fragments across renderer boundary.
3372
3373         Test: fast/text/simple-line-with-multiple-renderers.html
3374
3375         * rendering/SimpleLineLayout.cpp:
3376         (WebCore::SimpleLineLayout::revertRuns):
3377         (WebCore::SimpleLineLayout::LineState::isEmpty):
3378         (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
3379         whether neighboring fragments need collapsing.
3380         (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
3381         a fragment continuation.
3382         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
3383         (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
3384         they all get added to the current line.
3385         (WebCore::SimpleLineLayout::createLineRuns):
3386         (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
3387         (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
3388         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
3389         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
3390         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
3391         (WebCore::SimpleLineLayout::begin): Deleted.
3392         (WebCore::SimpleLineLayout::end): Deleted.
3393         (WebCore::SimpleLineLayout::preWrap): Deleted.
3394         (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
3395         (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
3396         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
3397         (WebCore::SimpleLineLayout::createTextRuns): Deleted.
3398         (WebCore::SimpleLineLayout::create): Deleted.
3399         (WebCore::SimpleLineLayout::Layout::create): Deleted.
3400         * rendering/SimpleLineLayoutFlowContents.h:
3401         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
3402         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
3403         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
3404         * rendering/SimpleLineLayoutFunctions.cpp:
3405         (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
3406         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3407         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
3408         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
3409         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
3410         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
3411         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3412         * rendering/SimpleLineLayoutTextFragmentIterator.h:
3413         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
3414         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
3415         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
3416         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
3417         (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
3418         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
3419
3420 2015-03-17  Jeremy Jones  <jeremyj@apple.com>
3421
3422         When tab hides, pause fullscreen and exit normally.
3423         https://bugs.webkit.org/show_bug.cgi?id=142685
3424
3425         Reviewed by Eric Carlson.
3426
3427         Pause fullscreen playback when switching tabs. Exit fullscreen is not necessary and even prevents
3428         the normal flow of teardown. This allows the normal exit fullscreen call to succeed and call its callback.
3429
3430         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3431         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
3432
3433 2015-03-17  Per Arne Vollan  <peavo@outlook.com>
3434
3435         [WinCairo] Video position is incorrect when located inside a frame.
3436         https://bugs.webkit.org/show_bug.cgi?id=142784
3437
3438         Reviewed by Brent Fulgham.
3439
3440