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