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