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