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