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