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