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