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