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