5384a6bc346343f20ad3020c3b5fb6a5d9c7c0cb
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-17  Dean Jackson  <dino@apple.com>
2
3         Implement Scroll Container Animation Triggers
4         https://bugs.webkit.org/show_bug.cgi?id=142732
5
6         Reviewed by Simon Fraser.
7
8         Test: animations/trigger-container-scroll-simple.html
9
10         Basic implementation of container-scroll. It only checks
11         the page scroll position for trigger values (not the scrolling
12         container in an overflow).
13
14         * css/CSSComputedStyleDeclaration.cpp: Add CSSPropertyWebkitAnimationTrigger
15         so that this property will appear in the inspector.
16
17         * page/FrameView.cpp:
18         (WebCore::FrameView::sendScrollEvent): If the page has scrolled, let the animation
19         controller know about it.
20
21         * page/animation/AnimationBase.cpp:
22         (WebCore::AnimationBase::updateStateMachine): Whitespace fix.
23         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): If there is a trigger,
24         and the scroll position is past it, then tell the state machine that
25         we should start.
26         (WebCore::AnimationBase::timeToNextService): Use the scroll position as
27         an input to the update timer if a trigger is involved.
28
29         * page/animation/AnimationController.cpp:
30         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Add whitespace.
31         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Call updateAnimations.
32         (WebCore::AnimationController::scrollWasUpdated): Call into AnimationControllerPrivate.
33         * page/animation/AnimationController.h:
34         * page/animation/AnimationControllerPrivate.h:
35
36         * page/animation/CompositeAnimation.cpp: Keep a record of whether we have a scroll
37         triggered animation.
38         (WebCore::CompositeAnimation::CompositeAnimation):
39         (WebCore::CompositeAnimation::updateKeyframeAnimations):
40         * page/animation/CompositeAnimation.h:
41         (WebCore::CompositeAnimation::hasScrollTriggeredAnimation):
42         * platform/animation/Animation.cpp:
43         (WebCore::Animation::operator=):
44
45 2015-03-17  Simon Fraser  <simon.fraser@apple.com>
46
47         Move some code from LogicalSelectionOffsetCaches into RenderElement
48         https://bugs.webkit.org/show_bug.cgi?id=142758
49
50         Reviewed by Myles C. Maxfield.
51
52         LogicalSelectionOffsetCaches had some useful code regarding containing blocks etc
53         that should be used in more places, so move it into RenderElement.
54         
55         No behavior change.
56
57         * rendering/LogicalSelectionOffsetCaches.h:
58         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
59         (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Deleted.
60         (WebCore::isNonRenderBlockInline): Deleted.
61         (WebCore::containingBlockForFixedPosition): Deleted.
62         (WebCore::containingBlockForAbsolutePosition): Deleted.
63         (WebCore::containingBlockForObjectInFlow): Deleted.
64         * rendering/RenderBlock.cpp: No need to initialize static data.
65         (WebCore::RenderBlock::positionedObjects): nullptr
66         * rendering/RenderElement.cpp:
67         (WebCore::RenderElement::containingBlockForFixedPosition):
68         (WebCore::RenderElement::containingBlockForAbsolutePosition):
69         (WebCore::isNonRenderBlockInline):
70         (WebCore::RenderElement::containingBlockForObjectInFlow):
71         * rendering/RenderElement.h:
72         (WebCore::RenderElement::canContainAbsolutelyPositionedObjects):
73         * rendering/RenderLayer.cpp:
74         (WebCore::isContainerForPositioned):
75         * rendering/RenderObject.cpp:
76         (WebCore::RenderObject::containingBlock):
77
78 2015-03-17  Alex Christensen  <achristensen@webkit.org>
79
80         [WinCairo] Unreviewed build fix after r181640.
81
82         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
83         Tell Windows how to find ShaderLang.h.
84
85 2015-03-17  Chris Dumez  <cdumez@apple.com>
86
87         'pageLoaded' diagnostic logging is too verbose
88         https://bugs.webkit.org/show_bug.cgi?id=142727
89         <rdar://problem/18937048>
90
91         Reviewed by Eric Carlson.
92
93         Make 'pageLoaded' diagnostic logging less verbose:
94         - Log once per main frame instead of once for subframe
95         - Apply sampling
96
97         * loader/FrameLoader.cpp:
98         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
99
100 2015-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
101
102         [GTK] Wrong transfer annotations used in GObject DOM bindings
103         https://bugs.webkit.org/show_bug.cgi?id=142780
104
105         Reviewed by Gustavo Noronha Silva.
106
107         We are using transfer none for all methods returning a GObject DOM
108         Object. That's not true. Only objects derived from Node are
109         automatically released by the DOM object cache and can be transfer
110         none. All other objects are added to the cache only to avoid
111         creating the same wrapper twice for the same core object, but
112         caller should release the returned reference.
113
114         * bindings/gobject/WebKitDOMCustomUnstable.h:
115         * bindings/scripts/CodeGeneratorGObject.pm:
116         (GetTransferTypeForReturnType):
117         (GenerateFunction):
118
119 2015-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
120
121         [GTK] WebKitDOM objects leaking
122         https://bugs.webkit.org/show_bug.cgi?id=118788
123
124         Reviewed by Darin Adler and Sergio Villar Senin.
125
126         Use a DOMwindowObserver class, derived from DOMWindowProperty to
127         be notified when the window object is detached from the frame to
128         clear the DOM objects associated to that frame in that case too.
129
130         * bindings/gobject/DOMObjectCache.cpp:
131
132 2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
133
134         [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
135         https://bugs.webkit.org/show_bug.cgi?id=142530
136
137         Reviewed by Darin Adler.
138
139         Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
140         us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
141         and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
142         headers instead.
143
144         Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
145         required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
146         whole WebCore library anymore, only the ANGLESupport library.
147
148         * CMakeLists.txt:
149         * platform/graphics/ANGLEWebKitBridge.h:
150         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
151
152 2015-03-17  Matt Baker  <mattbaker@apple.com>
153
154         Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
155         https://bugs.webkit.org/show_bug.cgi?id=142029
156
157         Reviewed by Timothy Hatcher.
158
159         Add new functionality to the Inspector timelines backend to add runloop data to timeline recordings.
160
161         * inspector/InspectorTimelineAgent.cpp:
162         (WebCore::currentRunLoop):
163         (WebCore::InspectorTimelineAgent::internalStart):
164         (WebCore::InspectorTimelineAgent::internalStop):
165         (WebCore::toProtocol):
166         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
167         Install observers for the begining and end of the runloop when recording begins. All other
168         instrumented timeline events get added as children of the current runloop record, which is
169         sent to the frontend once the runloop completes.
170
171         * inspector/InspectorTimelineAgent.h:
172
173         * platform/cf/RunLoopObserver.cpp:
174         (WebCore::RunLoopObserver::schedule):
175         Wrapper changed to allow observing arbitrary runloop activities.
176
177         * platform/cf/RunLoopObserver.h:
178
179 2015-03-17  Philippe Normand  <pnormand@igalia.com>
180
181         [GTK] basic OpenWebRTC build support
182         https://bugs.webkit.org/show_bug.cgi?id=142393
183
184         Reviewed by Carlos Garcia Campos.
185
186         * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
187
188 2015-03-17  Joseph Pecoraro  <pecoraro@apple.com>
189
190         Remove never used "useLayerOnTop" bindings generator argument
191         https://bugs.webkit.org/show_bug.cgi?id=142773
192
193         Reviewed by Darin Adler.
194
195         * bindings/scripts/CodeGenerator.pm:
196         * bindings/scripts/CodeGeneratorJS.pm:
197         * bindings/scripts/CodeGeneratorObjC.pm:
198         * bindings/scripts/generate-bindings.pl:
199
200 2015-03-16  Ryosuke Niwa  <rniwa@webkit.org>
201
202         Enable ES6 classes by default
203         https://bugs.webkit.org/show_bug.cgi?id=142774
204
205         Reviewed by Gavin Barraclough.
206
207         * Configurations/FeatureDefines.xcconfig:
208
209 2015-03-16  Simon Fraser  <simon.fraser@apple.com>
210
211         Update the debug overlays after layout
212         https://bugs.webkit.org/show_bug.cgi?id=142768
213
214         Reviewed by Zalan Bujtas.
215
216         The debug overlays need to be updated after layout, in case elements with wheel event handlers
217         moved around.
218         
219         DebugPageOverlays::didLayout() is cheap if there are no overlays.
220         
221         Call DebugPageOverlays::didLayout() for all frames, not just the main frame, since subframes can contribute
222         to the main frame's event handler region.
223
224         * page/DebugPageOverlays.cpp:
225         (WebCore::DebugPageOverlays::regionChanged):
226         * page/DebugPageOverlays.h:
227         (WebCore::DebugPageOverlays::didLayout):
228         (WebCore::DebugPageOverlays::didChangeEventHandlers):
229         * page/FrameView.cpp:
230         (WebCore::FrameView::layout):
231
232 2015-03-16  Jon Lee  <jonlee@apple.com>
233
234         Unreviewed fix for crash after r181608.
235
236         * WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.
237
238 2015-03-16  Simon Fraser  <simon.fraser@apple.com>
239
240         Generalize the Document code that maintains a set of nodes with event handlers
241         https://bugs.webkit.org/show_bug.cgi?id=142762
242
243         Reviewed by Zalan Bujtas, Darin Adler.
244
245         Document.h defines a TouchEventTargetSet type, which will in future be used for
246         other event types too (wheel events), so rename it to EventTargetSet.
247         
248         Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
249         to take a reference.
250
251         * dom/Document.cpp:
252         (WebCore::Document::prepareForDestruction): References
253         (WebCore::Document::didAddTouchEventHandler): Ditto.
254         (WebCore::Document::didRemoveEventTargetNode): Ditto.
255         * dom/Document.h:
256         (WebCore::Document::touchEventTargets): No-one calls this; just remove the non
257         #ideffed one.
258         * html/HTMLInputElement.cpp:
259         (WebCore::HTMLInputElement::~HTMLInputElement): Pass a ref.
260         (WebCore::HTMLInputElement::didMoveToNewDocument): Pass a ref.
261         * page/DOMWindow.cpp:
262         (WebCore::DOMWindow::removeAllEventListeners): Pass a ref.
263
264 2015-03-16  Joseph Pecoraro  <pecoraro@apple.com>
265
266         Web Inspector: Object Previews in Indexed DB tables
267         https://bugs.webkit.org/show_bug.cgi?id=140813
268
269         Reviewed by Timothy Hatcher.
270
271         * inspector/InspectorIndexedDBAgent.cpp:
272         Include previews with object store objects.
273
274 2015-03-16  Jer Noble  <jer.noble@apple.com>
275
276         [Mac] Update missing image UI
277         https://bugs.webkit.org/show_bug.cgi?id=142592
278
279         Reviewed by Darin Adler.
280
281         Update the broken image glyphs with new art (including a 3x image).
282
283         Test: fast/hidpi/broken-image-icon-very-hidpi.html
284
285         * Resources/missingImage.png:
286         * Resources/missingImage@2x.png:
287         * Resources/missingImage@3x.png: Added.
288         * WebCore.xcodeproj/project.pbxproj:
289         * loader/cache/CachedImage.cpp:
290         (WebCore::CachedImage::brokenImage):
291
292 2015-03-16  Dean Jackson  <dino@apple.com>
293
294         Parsing and Style Resolution of Container-based Animation Triggers
295         https://bugs.webkit.org/show_bug.cgi?id=142687
296         <rdar://problem/20170007>
297
298         Reviewed by Simon Fraser.
299
300         Take 2 after the previous patch was rolled out.
301
302         This is the beginning of a prototype implementation of
303         CSS Animation Triggers, as described by
304         https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
305
306         In this patch we parse and resolve the value of a new
307         CSS property "-webkit-animation-trigger". At the moment it
308         only accepts one function value "container-scroll", which
309         will trigger the animation at an absolute position within
310         an element's scrolling container. We expect the syntax to
311         change in the near future, as the spec is written.
312
313         Tests: animations/trigger-computed-style.html
314                animations/trigger-parsing.html
315
316         * WebCore.xcodeproj/project.pbxproj: Add the new files.
317
318         * css/CSSAnimationTriggerScrollValue.cpp: Added.
319         (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
320         (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
321         * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
322         scroll trigger. This name may change in the future to better represent the
323         type of trigger, but it is good enough for now.
324         (WebCore::CSSAnimationTriggerScrollValue::create):
325         (WebCore::CSSAnimationTriggerScrollValue::startValue):
326         (WebCore::CSSAnimationTriggerScrollValue::endValue):
327         (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
328
329         * css/CSSComputedStyleDeclaration.cpp:
330         (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
331         (WebCore::getAnimationTriggerValue): Gets the current computed style.
332         (WebCore::ComputedStyleExtractor::propertyValue):
333
334         * css/CSSParser.cpp:
335         (WebCore::CSSParser::parseValue):
336         (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
337         and record the value as a CSSAnimationTriggerScrollValue.
338         (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
339         * css/CSSParser.h:
340
341         * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
342
343         * css/CSSToStyleMap.cpp:
344         (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
345         an Animation object.
346         * css/CSSToStyleMap.h:
347
348         * css/CSSValue.cpp: Handle the new CSSValue type.
349         (WebCore::CSSValue::equals):
350         (WebCore::CSSValue::cssText):
351         (WebCore::CSSValue::destroy):
352         * css/CSSValue.h:
353         (WebCore::CSSValue::isAnimationTriggerScrollValue):
354
355         * platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
356         and use them in the operator==.
357         * platform/animation/Animation.h: Add AnimationTrigger as a new field.
358         (WebCore::Animation::isTriggerSet):
359         (WebCore::Animation::isEmpty):
360
361         * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
362         "auto" and the scrolling trigger.
363         (WebCore::AnimationTrigger::~AnimationTrigger):
364         (WebCore::AnimationTrigger::type):
365         (WebCore::AnimationTrigger::isAutoAnimationTrigger):
366         (WebCore::AnimationTrigger::isScrollAnimationTrigger):
367         (WebCore::AnimationTrigger::AnimationTrigger):
368         (WebCore::AutoAnimationTrigger::create):
369         (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
370         (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
371         (WebCore::ScrollAnimationTrigger::create):
372         (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
373         (WebCore::ScrollAnimationTrigger::startValue):
374         (WebCore::ScrollAnimationTrigger::setStartValue):
375         (WebCore::ScrollAnimationTrigger::endValue):
376         (WebCore::ScrollAnimationTrigger::setEndValue):
377         (WebCore::ScrollAnimationTrigger::hasEndValue):
378         (WebCore::ScrollAnimationTrigger::setHasEndValue):
379         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
380
381 2015-03-16  Alex Christensen  <achristensen@webkit.org>
382
383         Progress towards CMake on Mac
384         https://bugs.webkit.org/show_bug.cgi?id=142747
385
386         Reviewed by Chris Dumez.
387
388         * CMakeLists.txt:
389         * PlatformMac.cmake:
390         Added more directories, interfaces, and forwarding headers.
391         Temporarily disabled the generating of ObjC bindings in CMake builds.
392         * platform/mac/PasteboardMac.mm:
393         Removed unused include.
394
395 2015-03-16  Joanmarie Diggs  <jdiggs@igalia.com>
396
397         AX: Crash viewing http://www.last.fm/
398         https://bugs.webkit.org/show_bug.cgi?id=142309
399
400         Reviewed by Chris Fleizach.
401
402         The crash occurs when a not-yet-rendered object emits a children-changed
403         signal. If an assistive technology is listening, AT-SPI2 will attempt to
404         create and cache the state set for the child being added and the creation
405         of the state set assumes a rendered object.
406
407         Test: platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html
408
409         * accessibility/atk/AXObjectCacheAtk.cpp:
410         (WebCore::AXObjectCache::attachWrapper):
411
412 2015-03-16  Commit Queue  <commit-queue@webkit.org>
413
414         Unreviewed, rolling out r181492.
415         https://bugs.webkit.org/show_bug.cgi?id=142756
416
417         May have regressed PLT (Requested by anttik on #webkit).
418
419         Reverted changeset:
420
421         "Cache glyph widths to GlyphPages"
422         https://bugs.webkit.org/show_bug.cgi?id=142028
423         http://trac.webkit.org/changeset/181492
424
425 2015-03-16  Roger Fong  <roger_fong@apple.com>
426
427         [WebGL2] Instancing draw calls.
428         https://bugs.webkit.org/show_bug.cgi?id=126939.
429         <rdar://problem/15002379>
430
431         Reviewed by Dean Jackson.
432
433         Tested by a modified version of the 1.0.3 conformance tests:
434         conformance/extensions/angle-instanced-arrays.html
435         conformance/extensions/angle-instanced-arrays-out-of-bounds.html
436
437         These tests will be landed along with other modified extension conformance tests
438         once approval from Khronos is received.
439
440         * html/canvas/WebGL2RenderingContext.cpp:
441         (WebCore::WebGL2RenderingContext::clear): Generate error if clearing an integer color buffer.
442         (WebCore::WebGL2RenderingContext::vertexAttribDivisor): Call method from base class.
443         (WebCore::WebGL2RenderingContext::drawArraysInstanced): Ditto.
444         (WebCore::WebGL2RenderingContext::drawElementsInstanced): Ditto.
445         (WebCore::WebGL2RenderingContext::isIntegerFormat): Ditto.
446         (WebCore::WebGL2RenderingContext::validateDrawElements): Deleted. Move back to base class.
447         * html/canvas/WebGL2RenderingContext.h:
448         * html/canvas/WebGL2RenderingContext.idl: Add a missing enum.
449         * html/canvas/WebGLRenderingContext.cpp:
450         (WebCore::WebGLRenderingContext::clear): Copied from WebGLRenderingContextBase.
451         (WebCore::WebGLRenderingContext::validateDrawElements): Deleted. Move back to base class.
452         * html/canvas/WebGLRenderingContext.h:
453         * html/canvas/WebGLRenderingContextBase.cpp: 
454         (WebCore::WebGLRenderingContextBase::clear): Deleted. Moved to WebGLRenderingContext.
455         (WebCore::WebGLRenderingContextBase::getVertexAttrib): Check for WebGL2 context.
456         (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
457         * html/canvas/WebGLRenderingContextBase.h:
458
459 2015-03-16  Commit Queue  <commit-queue@webkit.org>
460
461         Unreviewed, rolling out r181572.
462         https://bugs.webkit.org/show_bug.cgi?id=142755
463
464         Caused weird test failures in transitions and animations
465         (Requested by dino on #webkit).
466
467         Reverted changeset:
468
469         "Parsing and Style Resolution of Container-based Animation
470         Triggers"
471         https://bugs.webkit.org/show_bug.cgi?id=142687
472         http://trac.webkit.org/changeset/181572
473
474 2015-03-16  Yoav Weiss  <yoav@yoav.ws>
475
476         Remove setCachedImage from HTMLImageElement since it is not used
477         https://bugs.webkit.org/show_bug.cgi?id=142740
478
479         Reviewed by Chris Dumez.
480
481         No new tests since this patch is just removing dead code.
482
483         HTMLImageElement::setCachedImage is not being called by anyone.
484         This patch removes it, since it's dead code.
485
486         * html/HTMLImageElement.h:
487         (WebCore::HTMLImageElement::setCachedImage): Deleted.
488
489 2015-03-16  Brent Fulgham  <bfulgham@apple.com>
490
491         WebKit1 Clients Are Not Reliably Repainted
492         https://bugs.webkit.org/show_bug.cgi?id=142750
493         <rdar://problem/20042453>
494
495         Reviewed by Simon Fraser.
496
497         * page/FrameView.cpp:
498         (WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
499         the early return so we can see when this happening in debug builds.
500         * page/FrameView.h:
501         (WebCore::FrameView::inPaintableState): Added.
502
503 2015-03-16  Chris Dumez  <cdumez@apple.com>
504
505         Make DatabaseContext suspendable if there is no pending database activity
506         https://bugs.webkit.org/show_bug.cgi?id=142716
507         <rdar://problem/19923085>
508
509         Reviewed by Andreas Kling.
510
511         Make DatabaseContext suspendable if there is no pending database
512         activity, i.e:
513         - No pending Database creation JS callback
514         - No pending transaction(s)
515
516         Suspending is safe in this case because we are not going to interrupt
517         any database activity, nor fire any JS event.
518
519         This greatly increases the likelihood of pages using websql to enter
520         the PageCache.
521
522         Tests: fast/history/page-cache-webdatabase-no-transaction-db.html
523                fast/history/page-cache-webdatabase-pending-transaction.html
524
525         * Modules/webdatabase/Database.cpp:
526         (WebCore::Database::hasPendingTransaction):
527         * Modules/webdatabase/Database.h:
528         * Modules/webdatabase/DatabaseContext.cpp:
529         (WebCore::DatabaseContext::canSuspend):
530         * Modules/webdatabase/DatabaseManager.cpp:
531         (WebCore::DatabaseManager::openDatabase):
532         * Modules/webdatabase/DatabaseThread.cpp:
533         (WebCore::DatabaseThread::hasPendingDatabaseActivity):
534         * Modules/webdatabase/DatabaseThread.h:
535
536 2015-03-16  Brady Eidson  <beidson@apple.com>
537
538         Addressing additional review feedback after http://trac.webkit.org/changeset/181565
539         https://bugs.webkit.org/show_bug.cgi?id=142733
540
541         Reviewed by Darin Adler.
542
543         * loader/icon/IconController.cpp:
544         (WebCore::IconController::startLoader): Null check page()
545
546 2015-03-16  Roger Fong  <roger_fong@apple.com>
547
548         [Win] Unreviewed build fix attempt after r181571.
549
550         * WebCore.vcxproj/WebCore.vcxproj:
551
552 2015-03-16  Roger Fong  <roger_fong@apple.com>
553
554         [WebGL2] Multiple Render Targets.
555         https://bugs.webkit.org/show_bug.cgi?id=126994.
556         <rdar://problem/15815766>
557
558         Reviewed by Dean Jackson.
559
560         Tested by a modified version of the 1.0.3 conformance test:
561         conformance/extensions/webgl-draw-buffers.html
562         This test will be landed along with other modified extension conformance tests
563         once approval from Khronos is received.
564
565         * html/canvas/WebGL2RenderingContext.cpp:
566         (WebCore::WebGL2RenderingContext::drawBuffers): Mostly the same as WebGLDrawBuffers::drawBuffersWEBGL.
567         Returns different error messages, uses non EXT enums.
568         (WebCore::WebGL2RenderingContext::clearBufferiv): This actually does nothing for now but the validation has been implemented.
569         (WebCore::WebGL2RenderingContext::clearBufferuiv): Ditto.
570         (WebCore::WebGL2RenderingContext::clearBufferfv): Ditto.
571         (WebCore::WebGL2RenderingContext::clearBufferfi): Ditto.
572         (WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Removes the extension object check.
573         (WebCore::WebGL2RenderingContext::getMaxDrawBuffers):
574         (WebCore::WebGL2RenderingContext::getMaxColorAttachments): Must return the same thing as getMaxDrawBuffers.
575         (WebCore::WebGL2RenderingContext::getParameter): Remove extension object checks.
576         * html/canvas/WebGL2RenderingContext.h:
577         * html/canvas/WebGLFramebuffer.cpp:
578         (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
579         * html/canvas/WebGLRenderingContext.cpp:
580         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Copied from WebGLRenderingContextBase.
581         (WebCore::WebGLRenderingContext::getMaxDrawBuffers): Ditto.
582         (WebCore::WebGLRenderingContext::getMaxColorAttachments): Ditto.
583         * html/canvas/WebGLRenderingContext.h:
584         * html/canvas/WebGLRenderingContextBase.cpp:
585         (WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters): Deleted.
586         * html/canvas/WebGLRenderingContextBase.h:
587
588 2015-03-16  Dean Jackson  <dino@apple.com>
589
590         Parsing and Style Resolution of Container-based Animation Triggers
591         https://bugs.webkit.org/show_bug.cgi?id=142687
592         <rdar://problem/20170007>
593
594         Reviewed by Simon Fraser.
595
596         This is the beginning of a prototype implementation of
597         CSS Animation Triggers, as described by
598         https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
599
600         In this patch we parse and resolve the value of a new
601         CSS property "-webkit-animation-trigger". At the moment it
602         only accepts one function value "container-scroll", which
603         will trigger the animation at an absolute position within
604         an element's scrolling container. We expect the syntax to
605         change in the near future, as the spec is written.
606
607         Tests: animations/trigger-computed-style.html
608                animations/trigger-parsing.html
609
610         * WebCore.xcodeproj/project.pbxproj: Add the new files.
611
612         * css/CSSAnimationTriggerScrollValue.cpp: Added.
613         (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
614         (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
615         * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
616         scroll trigger. This name may change in the future to better represent the
617         type of trigger, but it is good enough for now.
618         (WebCore::CSSAnimationTriggerScrollValue::create):
619         (WebCore::CSSAnimationTriggerScrollValue::startValue):
620         (WebCore::CSSAnimationTriggerScrollValue::endValue):
621         (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
622
623         * css/CSSComputedStyleDeclaration.cpp:
624         (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
625         (WebCore::getAnimationTriggerValue): Gets the current computed style.
626         (WebCore::ComputedStyleExtractor::propertyValue):
627
628         * css/CSSParser.cpp:
629         (WebCore::CSSParser::parseValue):
630         (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
631         and record the value as a CSSAnimationTriggerScrollValue.
632         (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
633         * css/CSSParser.h:
634
635         * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
636
637         * css/CSSToStyleMap.cpp:
638         (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
639         an Animation object.
640         * css/CSSToStyleMap.h:
641
642         * css/CSSValue.cpp: Handle the new CSSValue type.
643         (WebCore::CSSValue::equals):
644         (WebCore::CSSValue::cssText):
645         (WebCore::CSSValue::destroy):
646         * css/CSSValue.h:
647         (WebCore::CSSValue::isAnimationTriggerScrollValue):
648
649         * platform/animation/Animation.h: Add AnimationTrigger as a new field.
650         (WebCore::Animation::isTriggerSet):
651         (WebCore::Animation::isEmpty):
652
653         * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
654         "auto" and the scrolling trigger.
655         (WebCore::AnimationTrigger::~AnimationTrigger):
656         (WebCore::AnimationTrigger::type):
657         (WebCore::AnimationTrigger::isAutoAnimationTrigger):
658         (WebCore::AnimationTrigger::isScrollAnimationTrigger):
659         (WebCore::AnimationTrigger::AnimationTrigger):
660         (WebCore::AutoAnimationTrigger::create):
661         (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
662         (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
663         (WebCore::ScrollAnimationTrigger::create):
664         (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
665         (WebCore::ScrollAnimationTrigger::startValue):
666         (WebCore::ScrollAnimationTrigger::setStartValue):
667         (WebCore::ScrollAnimationTrigger::endValue):
668         (WebCore::ScrollAnimationTrigger::setEndValue):
669         (WebCore::ScrollAnimationTrigger::hasEndValue):
670         (WebCore::ScrollAnimationTrigger::setHasEndValue):
671         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
672
673 2015-03-15  Roger Fong  <roger_fong@apple.com>
674
675         [WebGL2] Vertex Array Objects.
676         https://bugs.webkit.org/show_bug.cgi?id=126944.
677         <rdar://problem/15002455>
678
679         Reviewed by Dean Jackson.
680
681         Tested by a modified version of the 1.0.3 conformance test:
682         conformance/extensions/oes-vertex-array-object.html
683         This test will be landed along with other modified extension conformance tests
684         once approval from Khronos is received.
685
686         * html/canvas/OESVertexArrayObject.cpp: Associate extension calls only with WebGLRenderingContext.
687         (WebCore::OESVertexArrayObject::deleteVertexArrayOES):
688         (WebCore::OESVertexArrayObject::bindVertexArrayOES):
689         * html/canvas/WebGLRenderingContext.cpp:
690         (WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
691         (WebCore::WebGLRenderingContext::getParameter):
692         * html/canvas/WebGL2RenderingContext.cpp: Implement vertex array object calls as part WebGL2 context.
693         (WebCore::WebGL2RenderingContext::createVertexArray):
694         (WebCore::WebGL2RenderingContext::deleteVertexArray):
695         (WebCore::WebGL2RenderingContext::isVertexArray):
696         (WebCore::WebGL2RenderingContext::bindVertexArray):
697         (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
698         (WebCore::WebGL2RenderingContext::getParameter):
699
700         Duplicate extension object vertex array object extension methods in GraphicsContext3D.
701         Implementation may change after we upgrade to newer GL headers and profile.
702         * platform/graphics/GraphicsContext3D.h:
703         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
704         (WebCore::GraphicsContext3D::createVertexArray):
705         (WebCore::GraphicsContext3D::deleteVertexArray):
706         (WebCore::GraphicsContext3D::isVertexArray):
707         (WebCore::GraphicsContext3D::bindVertexArray):
708
709         Have WebGLVertexArrayObjectOES and WebGLVertexArrayObject inherit from WebGLRenderingContextBase.
710         * CMakeLists.txt:
711         * WebCore.xcodeproj/project.pbxproj:
712         * html/canvas/WebGLVertexArrayObject.cpp:
713         (WebCore::WebGLVertexArrayObject::create):
714         (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): Use GraphicsContext3D implementation of createVertexArray.
715         (WebCore::WebGLVertexArrayObject::deleteObjectImpl):
716         * html/canvas/WebGLVertexArrayObject.h:
717         * html/canvas/WebGLVertexArrayObjectBase.cpp: Added.
718         (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):
719         (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer):
720         (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):
721         (WebCore::WebGLVertexArrayObjectBase::unbindBuffer):
722         (WebCore::WebGLVertexArrayObjectBase::setVertexAttribDivisor):
723         * html/canvas/WebGLVertexArrayObjectBase.h: Added.
724         (WebCore::WebGLVertexArrayObjectBase::~WebGLVertexArrayObjectBase):
725         (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::VertexAttribState):
726         (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::isBound):
727         (WebCore::WebGLVertexArrayObjectBase::VertexAttribState::validateBinding):
728         (WebCore::WebGLVertexArrayObjectBase::isDefaultObject):
729         (WebCore::WebGLVertexArrayObjectBase::hasEverBeenBound):
730         (WebCore::WebGLVertexArrayObjectBase::setHasEverBeenBound):
731         (WebCore::WebGLVertexArrayObjectBase::getElementArrayBuffer):
732         (WebCore::WebGLVertexArrayObjectBase::getVertexAttribState):
733         * html/canvas/WebGLVertexArrayObjectOES.cpp:
734         (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
735         (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):
736         (WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer): Deleted.
737         (WebCore::WebGLVertexArrayObjectOES::setVertexAttribState): Deleted.
738         (WebCore::WebGLVertexArrayObjectOES::unbindBuffer): Deleted.
739         (WebCore::WebGLVertexArrayObjectOES::setVertexAttribDivisor): Deleted.
740         * html/canvas/WebGLVertexArrayObjectOES.h:
741
742         * html/canvas/WebGLRenderingContextBase.cpp: Use WebGLVertexArrayObjectBase class.
743         (WebCore::WebGLRenderingContextBase::initializeNewContext):
744         (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
745         (WebCore::WebGLRenderingContextBase::validateVertexAttributes):
746         (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
747         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
748         (WebCore::WebGLRenderingContextBase::initVertexAttrib0):
749         (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
750         (WebCore::WebGLRenderingContextBase::restoreStatesAfterVertexAttrib0Simulation):
751         * html/canvas/WebGLRenderingContextBase.h:
752         (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject):
753
754         Handle construction of WebGLGetInfo using WebGLVertexArrayObject.
755         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
756         (WebCore::toJS):
757         * html/canvas/WebGLGetInfo.cpp:
758         (WebCore::WebGLGetInfo::WebGLGetInfo):
759         (WebCore::WebGLGetInfo::getWebGLVertexArrayObjectOES):
760         (WebCore::WebGLGetInfo::getWebGLVertexArrayObject):
761         * html/canvas/WebGLGetInfo.h:
762
763 2015-03-16  Brent Fulgham  <bfulgham@apple.com>
764
765         Potentially uninitialized Inspector values
766         https://bugs.webkit.org/show_bug.cgi?id=142730
767
768         Reviewed by Joseph Pecoraro.
769
770         * inspector/InspectorDOMAgent.cpp:
771         (WebCore::parseColor): Make sure color values are given an initial value.
772
773 2015-03-16  Brady Eidson  <beidson@apple.com>
774
775         URLs visited during private browsing show up in WebpageIcons.db
776         rdar://problem/11254910 and https://bugs.webkit.org/show_bug.cgi?id=142733
777
778         Patch by Sam Weinig. Reviewed by Brady Eidson.
779
780         * loader/icon/IconController.cpp:
781         (WebCore::IconController::startLoader): Bail early here if the page is using an ephemeral session.
782         (WebCore::IconController::continueLoadWithDecision): Instead of here.
783
784 2015-03-16  Conrad Shultz  <conrad_shultz@apple.com>
785
786         Allow clients to selectively disable plug-ins
787         https://bugs.webkit.org/show_bug.cgi?id=142506
788
789         Reviewed by Anders Carlsson.
790
791         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
792         from the page). As part of this:
793
794         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
795            set of plug-ins.
796
797         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
798            down the stack.
799
800         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
801            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
802
803         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
804
805         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
806         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
807
808         * dom/DOMImplementation.cpp:
809         (WebCore::DOMImplementation::createDocument):
810         Update to reflect function rename.
811
812         * loader/SubframeLoader.cpp:
813         (WebCore::findPluginMIMETypeFromURL):
814         Adopt getWebVisibleMimesAndPluginIndices().
815         (WebCore::logPluginRequest):
816         Update to reflect function rename.
817         (WebCore::SubframeLoader::shouldUsePlugin):
818         Ditto.
819
820         * platform/PlatformStrategies.h:
821         Export platformStrategies(), since it is now used in WebProcess.cpp.
822
823         * plugins/DOMMimeType.cpp:
824         (WebCore::DOMMimeType::type):
825         (WebCore::DOMMimeType::description):
826         (WebCore::DOMMimeType::mimeClassInfo):
827         Adopt getWebVisibleMimesAndPluginIndices().
828         (WebCore::DOMMimeType::enabledPlugin):
829         Ditto.
830
831         * plugins/DOMMimeType.h:
832         Don't return references in a few places where it is no longer safe to do so.
833         (WebCore::DOMMimeType::mimeClassInfo): Deleted.
834
835         * plugins/DOMMimeTypeArray.cpp:
836         (WebCore::DOMMimeTypeArray::length):
837         Adopt getWebVisibleMimesAndPluginIndices().
838         (WebCore::DOMMimeTypeArray::item):
839         Ditto.
840         (WebCore::DOMMimeTypeArray::canGetItemsForName):
841         Ditto.
842         (WebCore::DOMMimeTypeArray::namedItem):
843         Ditto.
844
845         * plugins/DOMPlugin.cpp:
846         (WebCore::DOMPlugin::pluginInfo):
847         Adopt getWebVisiblePlugins().
848         (WebCore::DOMPlugin::item):
849         Adopt getWebVisibleMimesAndPluginIndices().
850         (WebCore::DOMPlugin::canGetItemsForName):
851         Ditto.
852         (WebCore::DOMPlugin::namedItem):
853         Ditto.
854
855         * plugins/DOMPlugin.h:
856         (WebCore::DOMPlugin::pluginInfo): Deleted.
857
858         * plugins/DOMPluginArray.cpp:
859         (WebCore::DOMPluginArray::length):
860         Adopt getWebVisiblePlugins().
861         (WebCore::DOMPluginArray::item):
862         Ditto.
863         (WebCore::DOMPluginArray::canGetItemsForName):
864         Ditto.
865         (WebCore::DOMPluginArray::namedItem):
866         Ditto.
867
868         * plugins/PluginData.cpp:
869         (WebCore::PluginData::PluginData):
870         Stash the passed-in Page and call initPlugins().
871         (WebCore::PluginData::getWebVisiblePlugins):
872         New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
873         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
874         New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
875         limited to the web-visible plug-ins.
876         (WebCore::PluginData::supportsWebVisibleMimeType):
877         Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
878         (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
879         Renamed from pluginInfoForMimeType(); ditto.
880         (WebCore::PluginData::pluginNameForWebVisibleMimeType):
881         Renamed from pluginNameForMimeType(); ditto.
882         (WebCore::PluginData::pluginFileForWebVisibleMimeType):
883         Renamed from pluginFileForMimeType(); ditto.
884         (WebCore::PluginData::initPlugins):
885         (WebCore::PluginData::supportsMimeType): Deleted.
886         (WebCore::PluginData::pluginInfoForMimeType): Deleted.
887         (WebCore::PluginData::pluginNameForMimeType): Deleted.
888         (WebCore::PluginData::pluginFileForMimeType): Deleted.
889
890         * plugins/PluginData.h:
891         Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
892         new members to PluginInfo for the clientLoadPolicy and bundle information.
893         (WebCore::PluginData::PluginData):
894         Replace some member functions with new ones that will hide plug-ins upon request from the client;
895         (WebCore::PluginData::mimes): Deleted.
896         (WebCore::PluginData::mimePluginIndices): Deleted.
897
898         * plugins/PluginStrategy.h:
899         Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
900
901         * replay/SerializationMethods.cpp:
902         (JSC::EncodingTraits<PluginData>::encodeValue):
903         Remove now-obsolete code for handling MIME types and add a FIXME.
904         (JSC::DeserializedPluginData::DeserializedPluginData):
905         (JSC::EncodingTraits<PluginData>::decodeValue):
906         Ditto.
907         (JSC::EncodingTraits<PluginInfo>::encodeValue):
908         Handle the new members in PluginInfo.
909         (JSC::EncodingTraits<PluginInfo>::decodeValue):
910         Ditto.
911
912         * replay/WebInputs.json:
913         Teach Replay about PluginLoadClientPolicy.
914
915 2015-03-16  Max Stepin  <maxstepin@gmail.com>
916
917         Add APNG support
918         https://bugs.webkit.org/show_bug.cgi?id=17022
919
920         Reviewed by Carlos Garcia Campos.
921
922         Test: fast/images/animated-png.html
923
924         * platform/image-decoders/ImageDecoder.h:
925         (WebCore::ImageFrame::divide255):
926         (WebCore::ImageFrame::overRGBA):
927         * platform/image-decoders/png/PNGImageDecoder.cpp:
928         (WebCore::frameHeader):
929         (WebCore::readChunks):
930         (WebCore::PNGImageReader::PNGImageReader):
931         (WebCore::PNGImageDecoder::PNGImageDecoder):
932         (WebCore::PNGImageDecoder::frameBufferAtIndex):
933         (WebCore::PNGImageDecoder::headerAvailable):
934         (WebCore::PNGImageDecoder::rowAvailable):
935         (WebCore::PNGImageDecoder::pngComplete):
936         (WebCore::PNGImageDecoder::readChunks):
937         (WebCore::PNGImageDecoder::frameHeader):
938         (WebCore::PNGImageDecoder::init):
939         (WebCore::PNGImageDecoder::clearFrameBufferCache):
940         (WebCore::PNGImageDecoder::initFrameBuffer):
941         (WebCore::PNGImageDecoder::frameComplete):
942         (WebCore::PNGImageDecoder::processingStart):
943         (WebCore::PNGImageDecoder::processingFinish):
944         (WebCore::PNGImageDecoder::fallbackNotAnimated):
945         * platform/image-decoders/png/PNGImageDecoder.h:
946         (WebCore::PNGImageDecoder::frameCount):
947         (WebCore::PNGImageDecoder::repetitionCount):
948         (WebCore::PNGImageDecoder::isComplete):
949
950 2015-03-15  Benjamin Poulain  <benjamin@webkit.org>
951
952         CSS: fix the case-insensitive matching of the attribute selectors Begin, End and Hyphen
953         https://bugs.webkit.org/show_bug.cgi?id=142715
954
955         Reviewed by Brent Fulgham.
956
957         Fix attribute matching with:
958         -Begin: [a^=b].
959         -End: [a$=b].
960         -Hyphen: [a|=b].
961
962         Tests: fast/selectors/attribute-endswith-value-matching-is-ascii-case-insensitive.html
963                fast/selectors/attribute-hyphen-value-matching-is-ascii-case-insensitive.html
964                fast/selectors/attribute-startswith-value-matching-is-ascii-case-insensitive.html
965
966         * css/SelectorChecker.cpp:
967         (WebCore::attributeValueMatches):
968         I forgot to change CSSSelector::Exact in my last patch.
969         The tests could not catch that since we use the CSS JIT almost everywhere.
970
971         * cssjit/SelectorCompiler.cpp:
972         (WebCore::SelectorCompiler::attributeValueBeginsWith):
973         (WebCore::SelectorCompiler::attributeValueEndsWith):
974         (WebCore::SelectorCompiler::attributeValueMatchHyphenRule):
975
976 2015-03-15  Dan Bernstein  <mitz@apple.com>
977
978         Fixed the iOS build after r181522.
979
980         * page/FrameView.cpp:
981         (WebCore::FrameView::performPostLayoutTasks):
982
983 2015-03-15  Andy Estes  <aestes@apple.com>
984
985         [Content Filtering] Adopt new NEFilterSource SPI
986         https://bugs.webkit.org/show_bug.cgi?id=142710
987         rdar://problem/19023855
988
989         Reviewed by Dan Bernstein.
990
991         Teach NetworkExtensionContentFilter to use a new, alternate NEFilterSource SPI on platforms where it is available.
992
993         * platform/ContentFilter.cpp:
994         (WebCore::ContentFilter::types): Renamed HAVE(NE_FILTER_SOURCE) to HAVE(NETWORK_EXTENSION).
995         * platform/cocoa/NetworkExtensionContentFilter.h: Renamed member variables to remove redundancy, forward-declared NEFilterSourceStatus,
996         added a dispatch_semaphore member variable to avoid creating and destroying multiple semaphores, and made m_originalData a SharedBuffer.
997         * platform/cocoa/NetworkExtensionContentFilter.mm:
998         (decisionInfoReplacementData): Returned the replacement data from a decision handler info dictionary.
999         (WebCore::createNEFilterSource): Created either an old-style or new-style NEFilterSource object.
1000         (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Called receivedResponse:decisionHandler: when using the new SPI.
1001         (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Released the dispatch_semaphore.
1002         (WebCore::NetworkExtensionContentFilter::addData): Appended the copied NSData to m_originalData, avoiding an additional copy previously
1003         being made by NSMutableData. Used the new receivedData:decisionHandler: SPI when appropriate.
1004         (WebCore::NetworkExtensionContentFilter::finishedAddingData): Used the new finishedLoadingWithDecisionHandler: SPI when appropriate.
1005         (WebCore::NetworkExtensionContentFilter::needsMoreData): Changed m_neFilterSourceStatus to m_status.
1006         (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
1007         (WebCore::NetworkExtensionContentFilter::getReplacementData): Returned the replacement data from NEFilterSource if the load was blocked.
1008         Otherwise, returned the original data.
1009         (WebCore::NetworkExtensionContentFilter::handleDecision): Added a helper to set m_status and m_replacementData, and to signal m_semaphore.
1010         * platform/spi/cocoa/NEFilterSourceSPI.h: Declared the new NEFilterSource SPI on platforms that support it.
1011
1012 2015-03-15  Brent Fulgham  <bfulgham@apple.com>
1013
1014         Scroll snap points are not supported on iframe content
1015         https://bugs.webkit.org/show_bug.cgi?id=142582
1016         <rdar://problem/20121319>
1017
1018         Tested by css3/scroll-snap/scroll-snap-iframe.html
1019
1020         Reviewed by Simon Fraser.
1021
1022         The scroll snap points were not being applied to the iframe contents because the code
1023         that sets up the scroll snap point content is not called for iframes.
1024
1025         To correct this, we need to make sure the snap offsets are set during post-frame layout
1026         for iframes. We also need to make sure (on Mac) that the scroll animator and timers are updated.
1027
1028         * page/FrameView.cpp:
1029         (WebCore::FrameView::performPostLayoutTasks): Call 'updateSnapOffsets' if the frame is not a
1030         MainFrame. Also notify scroll animators they need to update their snap point settings.
1031
1032 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
1033
1034         Add the same is<RenderBox> test to KeyframeAnimation::computeExtentOfTransformAnimation()
1035         that ImplicitAnimation::computeExtentOfTransformAnimation() has, and change the latter
1036         to the more canonical is<RenderBox>() form.
1037         
1038         Fixes an assertion in animations/animation-on-inline-crash.html
1039
1040         * page/animation/ImplicitAnimation.cpp:
1041         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
1042         * page/animation/KeyframeAnimation.cpp:
1043         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
1044
1045 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
1046
1047         And another fix. Thanks to Hunseop Jeong for the fix.
1048
1049         * html/HTMLInputElement.cpp:
1050         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
1051         (WebCore::HTMLInputElement::didMoveToNewDocument):
1052
1053 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
1054
1055         Fix the touch-event build.
1056
1057         * dom/Document.cpp:
1058         (WebCore::Document::didAddTouchEventHandler):
1059         (WebCore::Document::didRemoveTouchEventHandler):
1060
1061 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
1062
1063         Reduce the side-effects of animations turning off overlap testing
1064         https://bugs.webkit.org/show_bug.cgi?id=92791
1065
1066         Reviewed by Dean Jackson.
1067         
1068         When a layer is running a transition or animation of the transform property,
1069         we would simply disable overlap testing for later layers, which had the side-effect
1070         of promoting lots of unrelated elements into layers temporarily.
1071         
1072         Fix by maintaining overlap, but computing an overlap extent that takes the animation
1073         into account.
1074         
1075         Rotations are currently treated as full rotations. If an extent for the overlap is
1076         hard to compute (e.g. 3d transforms, or matrix animations with a rotation component),
1077         then we fall back to the current behavior.
1078
1079         Tests: compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html
1080                compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html
1081                compositing/layer-creation/mismatched-transform-transition-overlap.html
1082                compositing/layer-creation/multiple-keyframes-animation-overlap.html
1083                compositing/layer-creation/scale-rotation-animation-overlap.html
1084                compositing/layer-creation/scale-rotation-transition-overlap.html
1085                compositing/layer-creation/translate-animation-overlap.html
1086                compositing/layer-creation/translate-scale-animation-overlap.html
1087                compositing/layer-creation/translate-scale-transition-overlap.html
1088                compositing/layer-creation/translate-transition-overlap.html
1089
1090         * page/animation/AnimationBase.cpp:
1091         (WebCore::containsRotation):
1092         (WebCore::AnimationBase::computeTransformedExtentViaTransformList): When we have matched
1093         transform lists, we can map a rectangle through the various operations. Transform-origin
1094         is used to shift the origin of the box first, and then unshift after. If we encounter
1095         a rotation, for now assume it's a full rotation (a future patch could tighten this up).
1096         (WebCore::AnimationBase::computeTransformedExtentViaMatrix): If we're using matrix
1097         interpolation, we have to decompose the matrix to see if there's any rotation component,
1098         and, if there is, fall back to current behavior.
1099         * page/animation/AnimationBase.h:
1100         * page/animation/AnimationController.cpp:
1101         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
1102         (WebCore::AnimationController::computeExtentOfAnimation):
1103         * page/animation/AnimationController.h:
1104         * page/animation/AnimationControllerPrivate.h:
1105         * page/animation/CompositeAnimation.cpp:
1106         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation): Ask active keyframe
1107         animations and transitions to compute the bounds extent.
1108         * page/animation/CompositeAnimation.h:
1109         * page/animation/ImplicitAnimation.cpp:
1110         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation): Compute the extent
1111         of the start and end transforms, and union them.
1112         * page/animation/ImplicitAnimation.h:
1113         * page/animation/KeyframeAnimation.cpp:
1114         (WebCore::KeyframeAnimation::animate):
1115         (WebCore::KeyframeAnimation::getAnimatedStyle): Some nullptr goodness.
1116         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation): Compute an extent
1117         for each keyframe, and take their union.
1118         * page/animation/KeyframeAnimation.h:
1119         * platform/graphics/GeometryUtilities.cpp:
1120         (WebCore::euclidianDistance): Use Pythagoras to compute a distance.
1121         (WebCore::boundsOfRotatingRect): Given a rect whose location is relative
1122         to the rotation origin, compute a bounds for the rotated rect by computing
1123         the furthest corner from the origin, and sweeping out a circle.
1124         * platform/graphics/GeometryUtilities.h:
1125         * platform/graphics/transforms/Matrix3DTransformOperation.h:
1126         * platform/graphics/transforms/MatrixTransformOperation.h:
1127         * platform/graphics/transforms/PerspectiveTransformOperation.h:
1128         * platform/graphics/transforms/RotateTransformOperation.h:
1129         * platform/graphics/transforms/ScaleTransformOperation.h:
1130         * platform/graphics/transforms/SkewTransformOperation.h:
1131         * platform/graphics/transforms/TransformOperation.h:
1132         (WebCore::TransformOperation::isAffectedByTransformOrigin):
1133         * platform/graphics/transforms/TransformOperations.cpp:
1134         (WebCore::TransformOperations::affectedByTransformOrigin): Ask all the operations if
1135         they are affected by transform-origin.
1136         (WebCore::TransformOperations::blendByMatchingOperations): nullptr.
1137         * platform/graphics/transforms/TransformOperations.h:
1138         * rendering/RenderBox.cpp:
1139         (WebCore::RenderBox::pushMappingToContainer): Comment fix. Only take transforms into account
1140         if the geometry map says so (which is most of the time).
1141         * rendering/RenderGeometryMap.cpp:
1142         (WebCore::RenderGeometryMap::mapToContainer): RenderLayerCompositor is now using the
1143         geometry map in a way that is incompatible with this assertion; it deliberately ignores
1144         transforms sometimes, so we can't easily verify that the mapping matches mapping through
1145         renderers.
1146         (WebCore::RenderGeometryMap::pushMappingsToAncestor): Save and restore the UseTransforms
1147         bit.
1148         * rendering/RenderGeometryMap.h:
1149         * rendering/RenderLayer.cpp:
1150         (WebCore::RenderLayer::boundingBox): Whitespace.
1151         (WebCore::RenderLayer::getOverlapBoundsIncludingChildrenAccountingForTransformAnimations): Helper
1152         function to get the bounds of a layer, including descendants, when a transform animation is running.
1153         * rendering/RenderLayer.h:
1154         * rendering/RenderLayerCompositor.cpp:
1155         (WebCore::RenderLayerCompositor::CompositingState::CompositingState): Add a ancestorHasTransformAnimation
1156         flag to detect nested animated transforms.
1157         (WebCore::RenderLayerCompositor::OverlapExtent::knownToBeHaveExtentUncertainty): This returns true when
1158         the layer is animating transform, and the transition/animation is such that we can't easily compute the
1159         bounds of the animation.
1160         (WebCore::RenderLayerCompositor::computeExtent): const RenderLayer&.
1161         Compute the animated bounds if there's a transform animation running.
1162         (WebCore::RenderLayerCompositor::addToOverlapMap): const RenderLayer&
1163         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): const RenderLayer&
1164         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1165         Delay the call to pushMappingsToAncestor() until knowing if there's a transform animation running, and
1166         if there is, push the mapping while ignoring transforms (since the transform is implicitly taken into account
1167         for overlap via the computed animated bounds).
1168         If this layer is running a transform animation, set the childState.ancestorHasTransformAnimation flag so
1169         that descendants will know (nested transform animations fall back to current behavior).
1170         The if (.... && isRunningAcceleratedTransformAnimation()) is what previously caused us to turn off overlap
1171         testing in the face of animations. That now only happens if we were unable to easily compute the animation bounds.
1172         (WebCore::RenderLayerCompositor::isRunningTransformAnimation): This previously tested whether an accelerated animation
1173         was running, but that's timing sensitive; AnimationController can start the transform animation, but it's not yet
1174         considered accelerated until we get an async callback from GraphicsLayer, yet this code needed to know if the
1175         animation was running.
1176         Since transform animations are always accelerated, we can just test for a running transform animation.
1177         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation): Deleted.
1178         * rendering/RenderLayerCompositor.h:
1179         * rendering/style/RenderStyle.cpp:
1180         (WebCore::requireTransformOrigin): Some FIXME comments.
1181
1182 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
1183
1184         Clean up related to wheelEvent names
1185         https://bugs.webkit.org/show_bug.cgi?id=142713
1186
1187         Reviewed by Anders Carlsson.
1188
1189         Add EventNames::isWheelEventType() and use it in places that test for the
1190         two wheel event names.
1191
1192         * dom/Document.cpp:
1193         (WebCore::Document::didAddWheelEventHandler):
1194         (WebCore::Document::didRemoveWheelEventHandler):
1195         * dom/Document.h: No need for exports (I grepped). Pass the Node*, which
1196         will be used in a later patch.
1197         * dom/EventNames.h:
1198         (WebCore::EventNames::isWheelEventType):
1199         * dom/Node.cpp:
1200         (WebCore::Node::didMoveToNewDocument):
1201         (WebCore::tryAddEventListener):
1202         (WebCore::tryRemoveEventListener):
1203         (WebCore::Node::defaultEventHandler):
1204         * html/shadow/MediaControlsApple.cpp:
1205         (WebCore::MediaControlsAppleEventListener::handleEvent):
1206         * page/DOMWindow.cpp:
1207         (WebCore::DOMWindow::addEventListener):
1208         (WebCore::DOMWindow::removeEventListener):
1209         * page/ios/FrameIOS.mm:
1210         (WebCore::ancestorRespondingToScrollWheelEvents): Remove dead code.
1211
1212 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
1213
1214         Remove a redundant repaint when a layer becomes composited
1215         https://bugs.webkit.org/show_bug.cgi?id=142711
1216
1217         Reviewed by Anders Carlsson.
1218
1219         RenderLayerCompositor::computeCompositingRequirements() doesn't need to call
1220         repaintOnCompositingChange() when a layer is going to become composited,
1221         because updateBacking() does exactly the same thing. I used an assertion
1222         and ran the tests to ensure this wasn't a behavior change.
1223
1224         * rendering/RenderLayerCompositor.cpp:
1225         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1226
1227 2015-03-15  Benjamin Poulain  <bpoulain@apple.com>
1228
1229         Change the exact attribute matching to be ASCII case-insensitive
1230         https://bugs.webkit.org/show_bug.cgi?id=142609
1231
1232         Reviewed by Darin Adler.
1233
1234         In CSS, testing attribute values should be ASCII case-insensitive,
1235         previously we were using full unicode case conversion.
1236
1237         Test: fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive.html
1238
1239         * css/CSSParser.cpp:
1240         (WebCore::CSSParser::parseKeyframeSelector):
1241         The CSS parser has its own fast version for ASCII case insensitive.
1242         This code was using the general equalIgnoringASCIICase() which was causing name conflicts,
1243         change that to the normal CSS parser version.
1244
1245         * css/SelectorCheckerTestFunctions.h:
1246         (WebCore::equalIgnoringASCIICase): Deleted.
1247         * cssjit/SelectorCompiler.cpp:
1248         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
1249
1250 2015-03-15  Brent Fulgham  <bfulgham@apple.com>
1251
1252         scroll snap points do not properly account for zoomed pages
1253         https://bugs.webkit.org/show_bug.cgi?id=142706
1254         <rdar://problem/20165771>
1255
1256         Reviewed by Anders Carlsson.
1257
1258         When a WebView is zoomed (such that it has a non-unity pageScaleFactor), we need to account for this
1259         scaling value when selecting our correct scroll snap point target, as well as when specifying the
1260         pixel location for our animation to target.
1261
1262         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1263         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1264         (WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor): Added new delegate method.
1265         * platform/cocoa/ScrollController.h:
1266         (WebCore::ScrollControllerClient::pageScaleFactor): Added new default delegate.
1267         * platform/cocoa/ScrollController.mm:
1268         (WebCore::ScrollController::beginScrollSnapAnimation): Calculate the correct scroll target
1269         based on the page scale factor.
1270
1271 2015-03-15  Csaba Osztrogonác  <ossy@webkit.org>
1272
1273         Fix run-bindings-tests on the WinCairo bot
1274         https://bugs.webkit.org/show_bug.cgi?id=142588
1275
1276         Reviewed by Alex Christensen.
1277
1278         * bindings/scripts/test/JS/JSFloat64Array.cpp: Added property svn:eol-style.
1279         * bindings/scripts/test/JS/JSFloat64Array.h: Added property svn:eol-style.
1280         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Added property svn:eol-style.
1281         * bindings/scripts/test/JS/JSTestActiveDOMObject.h: Modified property svn:eol-style.
1282         * bindings/scripts/test/JS/JSTestCallback.cpp: Modified property svn:eol-style.
1283         * bindings/scripts/test/JS/JSTestCallback.h: Modified property svn:eol-style.
1284         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Added property svn:eol-style.
1285         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: Modified property svn:eol-style.
1286         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Added property svn:eol-style.
1287         * bindings/scripts/test/JS/JSTestEventConstructor.h: Added property svn:eol-style.
1288         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Added property svn:eol-style.
1289         * bindings/scripts/test/JS/JSTestEventTarget.h: Modified property svn:eol-style.
1290         * bindings/scripts/test/JS/JSTestException.cpp: Added property svn:eol-style.
1291         * bindings/scripts/test/JS/JSTestException.h: Added property svn:eol-style.
1292         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added property svn:eol-style.
1293         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added property svn:eol-style.
1294         * bindings/scripts/test/JS/JSTestImplements.cpp: Added property svn:eol-style.
1295         * bindings/scripts/test/JS/JSTestImplements.h: Added property svn:eol-style.
1296         * bindings/scripts/test/JS/JSTestInterface.cpp: Modified property svn:eol-style.
1297         * bindings/scripts/test/JS/JSTestInterface.h: Modified property svn:eol-style.
1298         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Modified property svn:eol-style.
1299         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: Modified property svn:eol-style.
1300         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Added property svn:eol-style.
1301         * bindings/scripts/test/JS/JSTestNamedConstructor.h: Added property svn:eol-style.
1302         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Added property svn:eol-style.
1303         * bindings/scripts/test/JS/JSTestNondeterministic.h: Added property svn:eol-style.
1304         * bindings/scripts/test/JS/JSTestObj.cpp: Modified property svn:eol-style.
1305         * bindings/scripts/test/JS/JSTestObj.h: Modified property svn:eol-style.
1306         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Added property svn:eol-style.
1307         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: Added property svn:eol-style.
1308         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Modified property svn:eol-style.
1309         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: Modified property svn:eol-style.
1310         * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added property svn:eol-style.
1311         * bindings/scripts/test/JS/JSTestSupplemental.h: Added property svn:eol-style.
1312         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added property svn:eol-style.
1313         * bindings/scripts/test/JS/JSTestTypedefs.h: Added property svn:eol-style.
1314         * bindings/scripts/test/JS/JSattribute.cpp: Added property svn:eol-style.
1315         * bindings/scripts/test/JS/JSattribute.h: Added property svn:eol-style.
1316         * bindings/scripts/test/JS/JSreadonly.cpp: Added property svn:eol-style.
1317         * bindings/scripts/test/JS/JSreadonly.h: Added property svn:eol-style.
1318
1319 2015-03-14  Darin Adler  <darin@apple.com>
1320
1321         More event handler improvements
1322         https://bugs.webkit.org/show_bug.cgi?id=142701
1323
1324         Reviewed by Anders Carlsson.
1325
1326         These are the improvements:
1327
1328         - Use EventHandler rather than EventListener as the the type for event handler
1329           attributes. This matches the HTML specification, and also makes sense, since
1330           EventListener means something else (and we use it to mean that!). Also renamed
1331           JSWindowEventListener to WindowEventHandler. Even though this only affects the
1332           JavaScript code generated, it's not really a JavaScript-specific flag.
1333
1334         - Tweak formatting on addEventListener/removeEventListener/dispatchEvent in
1335           all the IDL files where the appear. This includes changing the spelling from
1336           "evt" to "event". Some day we should fix this so these functions only need to
1337           appear in EventTarget.idl.
1338
1339         - Tweak formatting a bit on the IDL files we had to modify anyway.
1340
1341         - Use [Conditional] more often and #if less often in IDL files.
1342
1343         - Added a new [DocumentEventHandler] attribute for the selectionchange event.
1344           This involved adding new event handler attribute functions to JSEventListener.h
1345           for use by the JavaScript bindings.
1346
1347         - Removed a little unused code from the JavaScript code bindings generator.
1348
1349         - Improved the mechanism used by HTMLElement and SVGElement to share the list of
1350           content attributes that are event handlers so there is only one map rather than
1351           two. Made a similar mechanism so that HTMLBodyElement and HTMLFrameSetElement
1352           can share the list of window event handlers.
1353
1354         - Followed the HTML specification by putting all the event handler support in
1355           the HTMLElement class rather than having event handlers apply only a the
1356           particular element that uses those events. We already did this for most of
1357           our event handlers, but we are now doing it for all of them.
1358
1359         * Modules/battery/BatteryManager.idl: Use EventHandler instead of EventListener
1360         as appropriate. Also reformatted addEventListener/removeEventListener/dispatchEvent.
1361         * Modules/encryptedmedia/MediaKeySession.idl: Ditto.
1362         * Modules/indexeddb/IDBDatabase.idl: Ditto.
1363         * Modules/indexeddb/IDBOpenDBRequest.idl: Ditto.
1364         * Modules/indexeddb/IDBRequest.idl: Ditto.
1365         * Modules/indexeddb/IDBTransaction.idl: Ditto.
1366         * Modules/mediastream/MediaStream.idl: Ditto.
1367         * Modules/mediastream/MediaStreamTrack.idl: Ditto.
1368         * Modules/mediastream/RTCDTMFSender.idl: Ditto.
1369         * Modules/mediastream/RTCDataChannel.idl: Ditto.
1370         * Modules/mediastream/RTCPeerConnection.idl: Ditto.
1371         * Modules/speech/SpeechSynthesisUtterance.idl: Ditto.
1372         * Modules/webaudio/AudioBufferSourceNode.idl: Ditto.
1373         * Modules/webaudio/AudioContext.idl: Ditto.
1374         * Modules/webaudio/OscillatorNode.idl: Ditto.
1375         * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
1376         * Modules/websockets/WebSocket.idl: Ditto.
1377         * css/FontLoader.idl: Ditto.
1378         * dom/EventListener.idl: Ditto.
1379         * dom/EventTarget.idl: Ditto.
1380         * dom/MessagePort.idl: Ditto.
1381         * dom/Node.idl: Ditto.
1382         * dom/WebKitNamedFlow.idl: Ditto.
1383         * fileapi/FileReader.idl: Ditto.
1384         * html/MediaController.idl: Ditto.
1385         * html/track/AudioTrackList.idl: Ditto.
1386         * html/track/TextTrackCue.idl: Ditto.
1387         * html/track/TextTrackList.idl: Ditto.
1388         * html/track/VideoTrackList.idl: Ditto.
1389         * loader/appcache/DOMApplicationCache.idl: Ditto.
1390         * page/EventSource.idl: Ditto.
1391         * page/Performance.idl: Ditto.
1392         * workers/AbstractWorker.idl: Ditto.
1393         * workers/DedicatedWorkerGlobalScope.idl: Ditto.
1394         * workers/Worker.idl: Ditto.
1395         * workers/WorkerGlobalScope.idl: Ditto.
1396         * xml/XMLHttpRequest.idl: Ditto.
1397         * xml/XMLHttpRequestUpload.idl: Ditto.
1398
1399         * Modules/notifications/Notification.idl: Did the above, but also used
1400         [Conditional] instead of #if throughout.
1401         * html/track/TextTrack.idl: Ditto.
1402
1403         * Modules/webaudio/AudioNode.idl: Tweaked paragraphing of this file.
1404
1405         * bindings/js/JSEventListener.cpp:
1406         (WebCore::windowEventHandlerAttribute): Renamed to take the word "forwarded"
1407         out of this. More closely matches the terminology used in IDL files and the
1408         HTML specification.
1409         (WebCore::setWindowEventHandlerAttribute): Ditto.
1410         (WebCore::documentEventHandlerAttribute): Added.
1411         (WebCore::setDocumentEventHandlerAttribute): Added.
1412         * bindings/js/JSEventListener.h: Updated for above changes.
1413
1414         * bindings/objc/PublicDOMInterfaces.h: Renamed argument from "evt" to "event".
1415
1416         * bindings/scripts/CodeGeneratorGObject.pm:
1417         (SkipAttribute): Skip attributes of type "EventHandler" rather than attributes
1418         of type "EventListener".
1419         * bindings/scripts/CodeGeneratorObjC.pm:
1420         (SkipAttribute): Ditto.
1421
1422         * bindings/scripts/CodeGeneratorJS.pm:
1423         (GenerateImplementation): Look for the type EventHandler instead of the type
1424         EventListener for event handler attributes. Also added code to handle the new
1425         DocumentEventHandler, and use the name WindowEventHandler instead of the name
1426         JSWindowEventListener. Removed unneeded preflight check to see if we have
1427         writable attributes; it was not doing us any good. (That caused a lot of code
1428         to be un-indented and makes the diff hard to read.)
1429
1430         * bindings/scripts/IDLAttributes.txt: Removed JSWindowEventListener, and added
1431         WindowEventHandler and DocumentEventHandler.
1432
1433         * bindings/scripts/test/TestObj.idl: Use the type EventHandler instead of the
1434         type EventListener. The test output is unchanged, though.
1435
1436         * dom/Document.idl: Got rid of the conditionals and merged all the event handler
1437         attributes into a single sorted, unconditional list. Added some that were missing,
1438         as detected by the event-handler-attributes.html test.
1439
1440         * dom/Element.idl: Ditto. This includes moving attributes here that were formerly
1441         only in certain element classes. Note that the script event handler attribute
1442         support is still here, even though it should be in HTMLElement and SVGElement
1443         instead. There's a FIXME about that, but no real urgency in fixing it.
1444
1445         * html/HTMLAttributeNames.in: Added onmessage. Previously, the support for this
1446         was from the script attribute only, not the content attribute.
1447
1448         * html/HTMLBodyElement.cpp:
1449         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): Added. This
1450         contains the list of all the window event handlers that can be set on a body
1451         or frameset element and which are triggered by events on the window.
1452         (WebCore::HTMLBodyElement::eventNameForWindowEventHandlerAttribute): Added.
1453         This is the function to call to use the map above. Given an attribute, it
1454         returns either null if it is not a window event handler attribute, or the
1455         event type if it is one.
1456         (WebCore::HTMLBodyElement::parseAttribute): Updated to use the new
1457         functions above. Handling of these attributes is now unconditional, but
1458         also we don't have to keep the nested if statements here up to date, just
1459         the list of event handler attributes names in the map create function above.
1460
1461         * html/HTMLBodyElement.h: Added public eventNameForWindowEventHandlerAttribute
1462         and private createWindowEventHandlerNameMap functions.
1463
1464         * html/HTMLBodyElement.idl: Updated to use WindowEventHandler, DocumentEventHandler,
1465         and EventHandler. Also made everything unconditional. Also filled out the list here
1466         to match the list handled as content attributes. All covered by the test.
1467
1468         * html/HTMLElement.cpp:
1469         (WebCore::HTMLElement::createEventHandlerNameMap): Added. Replaces the old
1470         populate function. Changed the list of event handler attributes to be a bit more
1471         complete, and to be entirely unconditional. Also refactored this function to use
1472         a new populateEventHandlerNameMap helper, shared with HTMLBodyElement.
1473         (WebCore::HTMLElement::populateEventHandlerNameMap): Added. Factors out the code
1474         that both this class and HTMLBodyElement use to build event handler name maps.
1475         (WebCore::HTMLElement::eventNameForEventHandlerAttribute): Added. This is the
1476         function that call to use the map above. Given an attribute it returns either
1477         null if it is not an event handler attribute, or the event type if it is one.
1478         This is actually two functions. One is a protected function for use by both this
1479         class and HTMLBodyElement so they can share things like the optimization to look
1480         for the "on" prefix. The other is the public function that we actually use in
1481         HTMLElement and SVGElement.
1482         (WebCore::HTMLElement::editabilityFromContentEditableAttr): Tweaked and refactored
1483         to use lineageOfType. Would have been even simpler if this took an element instead
1484         of a node. Unrelated to the event handler changes.
1485         (WebCore::HTMLElement::parseAttribute): Removed long-obsolete code that decided
1486         whether to call through to the base class. The base class function is empty and
1487         never needs to be called, and in any case there is no value in doing work to
1488         decide whether to call through to an empty function. Changed the style of the
1489         function to use early return instead of else. Worth considering whether we want
1490         to return early or call through to base class in this family of functions. It's
1491         more efficient to return early, but doesn't work well if both the derived class
1492         and base class want to respond to changes to the same attribute. The new logic
1493         for event handler attributes is more straightforward than the old, since the
1494         eventNameForEventHandlerAttribute has the logic.
1495         (WebCore::HTMLElement::textToFragment): Tweaked and refactored a bit, and also
1496         changed to return a Ref since this never fails and needs to return null.
1497
1498         * html/HTMLElement.h: Updated for above changes. This includes a template version
1499         of populateEventHandlerNameMap that extracts the array size at compile time and
1500         passes it to the non-template function that does the work.
1501
1502         * html/HTMLFrameElementBase.cpp:
1503         (WebCore::HTMLFrameElementBase::parseAttribute): Removed unneeded code to handle
1504         event handler attributes handled by HTMLElement.
1505         * html/HTMLImageElement.cpp:
1506         (WebCore::HTMLImageElement::parseAttribute): Ditto.
1507         * html/HTMLLinkElement.cpp:
1508         (WebCore::HTMLLinkElement::parseAttribute): Ditto.
1509         * html/HTMLObjectElement.cpp:
1510         (WebCore::HTMLObjectElement::parseAttribute): Ditto.
1511         * html/HTMLScriptElement.cpp:
1512         (WebCore::HTMLScriptElement::parseAttribute): Ditto.
1513
1514         * html/HTMLFrameSetElement.cpp:
1515         (WebCore::HTMLFrameSetElement::parseAttribute): Changed function to early return
1516         style, and added FIXMEs about the many problems in the attribute handling code.
1517         Replaced all the code to handle window event handlers with a new bit of code that
1518         calls HTMLBodyElement::eventNameForWindowEventHandlerAttribute.
1519
1520         * html/HTMLFrameSetElement.idl: Changed to match the list of window event handlers
1521         in HTMLBodyElement.idl, although I did not add the document event handler here.
1522         As in the various other cases, having some extra event handlers does not seem to
1523         do harm and this is covered by the event-handler-attributes.html test.
1524
1525         * html/HTMLMarqueeElement.idl: Renamed EventListener to EventHandler in comment.
1526
1527         * page/DOMWindow.idl: As with Element and Document, removed conditionals, and
1528         filled out the list of event handlers so all the tests in
1529         event-handler-attributes.html will pass.
1530
1531         * svg/SVGElement.cpp:
1532         (WebCore::SVGElement::parseAttribute): Changed code to the early return style,
1533         and replaced the event handler attribute code with new much simpler code that
1534         uses the new HTMLElement::eventNameForEventHandlerAttribute. Also changed the
1535         way we call through to base classes. Just call through to the
1536         SVGLangSpace::parseAttribute function unconditionally, and don't try to use
1537         early return style to arbitrate among base classes. We should make this
1538         simplification throughout the SVG code; there's no need for the complexity
1539         that was there before just to cut down slightly on calls through to base
1540         class parseAttribute functions.
1541
1542         * svg/SVGSVGElement.cpp:
1543         (WebCore::SVGSVGElement::parseAttribute): Changed some of this code to the
1544         early return style and corrected some comments about the window event handler
1545         attributes here. These could use some further testing and might later need to be
1546         properly supported when the attributes are set in script, not just in content.
1547
1548         * svg/SVGScriptElement.cpp:
1549         (WebCore::SVGScriptElement::isSupportedAttribute): Deleted.
1550         (WebCore::SVGScriptElement::parseAttribute): Changed this function to use the
1551         early return style and also to call through to all three base classes. This is
1552         a pattern we should follow elsewhere in SVG to simplify the code. There is no
1553         need for the supportedAttributes sets like the one in this calass, and the code
1554         is unnecessarily complex, perhaps in an attempt to optimize performance. I'm
1555         pretty sure the old code was slower than this new code will be. No need for the
1556         extra hash table lookup every time. Also removed handling of event handler
1557         attribute which is taken care of by SVGElement now.
1558         (WebCore::SVGScriptElement::svgAttributeChanged): Made similar changes for
1559         the same reason as in parseAttribute. This function really needs a new name:
1560         It's the same as parseAttribute, except it's also used when implementing
1561         changes due to SVG animation.
1562
1563         * svg/SVGScriptElement.h: Removed isSupportedAttribute.
1564
1565 2015-03-14  Simon Fraser  <simon.fraser@apple.com>
1566
1567         Clean up use of flags in localToContainer-type functions
1568         https://bugs.webkit.org/show_bug.cgi?id=142704
1569
1570         Reviewed by Alexey Proskuryakov.
1571         
1572         RenderObject::localToContainerQuad() had the questionable behavior of always
1573         enforcing UseTransforms in the flags. However, a future patch will need to call
1574         localToContainerQuad() without this flag.
1575         
1576         Fix by requiring callers of localToAbsoluteQuad(), localToContainerQuad(), localToContainerPoint(),
1577         and absoluteToLocalQuad() to pass the UseTransforms flag in, providing it as a default argument.
1578         
1579         The default value of the MapCoordinatesFlags parameter to mapLocalToContainer(),
1580         a lower-level function, is removed.
1581         
1582         Sprinkle a few more nullptrs around.
1583         
1584         No behavior change.
1585
1586         * rendering/RenderBlock.cpp:
1587         (WebCore::RenderBlock::selectionGapRectsForRepaint): call the higher-level localToContainerPoint()
1588         instead of mapLocalToContainer().
1589         (WebCore::RenderBlock::absoluteQuads): Pass UseTransforms.
1590         * rendering/RenderBox.cpp:
1591         (WebCore::RenderBox::absoluteQuads): Ditto.
1592         * rendering/RenderBox.h:
1593         * rendering/RenderFlowThread.h:
1594         * rendering/RenderGeometryMap.h:
1595         (WebCore::RenderGeometryMap::absolutePoint):
1596         (WebCore::RenderGeometryMap::absoluteRect):
1597         * rendering/RenderImage.cpp:
1598         (WebCore::RenderImage::collectSelectionRects): This function was erroneously passing
1599         'false' as flags. Pass UseTransforms instead (but no behavior change since
1600         UseTransforms was forced on lower down).
1601         * rendering/RenderInline.h:
1602         * rendering/RenderLayer.cpp:
1603         (WebCore::RenderLayer::scrollRectToVisible): UseTransforms is the parameter default, remove it.
1604         * rendering/RenderLineBreak.cpp:
1605         (WebCore::RenderLineBreak::absoluteQuads):
1606         (WebCore::RenderLineBreak::collectSelectionRects): Another erroneous 'false'.
1607         * rendering/RenderNamedFlowFragment.cpp:
1608         (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion):
1609         * rendering/RenderObject.cpp:
1610         (WebCore::RenderObject::localToContainerQuad): Here's where we no longer force
1611         the UseTransforms bit.
1612         (WebCore::RenderObject::localToContainerPoint): Also here.
1613         * rendering/RenderObject.h: I prefer bit flags lined up. Makes it easier to spot errors.
1614         (WebCore::RenderObject::localToAbsoluteQuad):
1615         * rendering/RenderText.cpp:
1616         (WebCore::RenderText::collectSelectionRects): Another bad 'false'.
1617         * rendering/RenderTextLineBoxes.cpp:
1618         (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
1619         (WebCore::RenderTextLineBoxes::absoluteQuads):
1620         (WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
1621         * rendering/RenderView.h:
1622         * rendering/SimpleLineLayoutFunctions.cpp:
1623         (WebCore::SimpleLineLayout::collectAbsoluteQuads):
1624         * rendering/svg/RenderSVGForeignObject.h:
1625         * rendering/svg/RenderSVGInline.cpp:
1626         (WebCore::RenderSVGInline::absoluteQuads): Another bad 'false'.
1627         * rendering/svg/RenderSVGInline.h:
1628         * rendering/svg/RenderSVGModelObject.cpp:
1629         (WebCore::RenderSVGModelObject::absoluteQuads):
1630         * rendering/svg/RenderSVGModelObject.h:
1631         * rendering/svg/RenderSVGRoot.h:
1632         * rendering/svg/RenderSVGText.cpp:
1633         (WebCore::RenderSVGText::absoluteQuads):
1634         * rendering/svg/RenderSVGText.h:
1635         * rendering/svg/SVGRenderSupport.h:
1636
1637 2015-03-14  Brent Fulgham  <bfulgham@apple.com>
1638
1639         [iOS] scroll snap points are animating to the wrong positions...
1640         https://bugs.webkit.org/show_bug.cgi?id=142705
1641         <rdar://problem/20136946>
1642
1643         Reviewed by Simon Fraser.
1644
1645         Avoid adding an extra '0' snap point to our set. We always start with one zero; this
1646         extra append just forces us to do more steps in our search for nearest snap point.
1647
1648         * page/scrolling/AxisScrollSnapOffsets.cpp:
1649         (WebCore::updateFromStyle): Remove extra '0' appended to offsets.
1650
1651 2015-03-14  Dean Jackson  <dino@apple.com>
1652
1653         Feature flag for Animations Level 2
1654         https://bugs.webkit.org/show_bug.cgi?id=142699
1655         <rdar://problem/20165097>
1656
1657         Reviewed by Brent Fulgham.
1658
1659         Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
1660
1661         * Configurations/FeatureDefines.xcconfig:
1662         * bindings/generic/RuntimeEnabledFeatures.cpp:
1663         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
1664         * bindings/generic/RuntimeEnabledFeatures.h:
1665         (WebCore::RuntimeEnabledFeatures::setAnimationTriggersEnabled):
1666         (WebCore::RuntimeEnabledFeatures::animationTriggersEnabled):
1667
1668 2015-03-14  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1669
1670         RenderBlock::imageChange() calling const methods on exit
1671         https://bugs.webkit.org/show_bug.cgi?id=142648
1672
1673         Reviewed by Brent Fulgham.
1674
1675         No new tests, no change on behavior.
1676
1677         * rendering/RenderBlock.cpp:
1678         (WebCore::RenderBlock::imageChanged): Deleted.
1679         * rendering/RenderBlock.h:
1680
1681 2015-03-14  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1682
1683         [GStreamer] share GL context in pipeline
1684         https://bugs.webkit.org/show_bug.cgi?id=142693
1685
1686         Reviewed by Philippe Normand.
1687
1688         GstGL elements in a pipeline need to be aware of the application's
1689         display and its GL context. This information is shared through context
1690         messages between the pipeline and the browser.
1691
1692         This patch shares this context through a GStreamer's synchronous
1693         message, using the GL information held in the web process.
1694
1695         This patch is based on the work of Philippe Normand for Bug 138562.
1696
1697         No new tests because this is platform specific and it depends in the
1698         run-time availability and configurations of GstGL elements.
1699
1700         * PlatformGTK.cmake: appends the GstGL header files in the include
1701         directories. Also its library directory is appended.
1702         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1703         (WebCore::mediaPlayerPrivateSyncMessageCallback): New callback function.
1704         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1705         Initialize the new class attributes.
1706         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): New method
1707         for handling synchronous messages from the pipeline. This method
1708         currently only handles the GL context sharing.
1709         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Configures
1710         the pipeline's bus to handle the synchronous messages.
1711         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add new
1712         class methods and attributes.
1713
1714 2015-03-13  Alex Christensen  <achristensen@webkit.org>
1715
1716         Progress towards CMake on Mac.
1717         https://bugs.webkit.org/show_bug.cgi?id=142680
1718
1719         Reviewed by Gyuyoung Kim.
1720
1721         * PlatformMac.cmake:
1722         Added new include directories and removed old source files.
1723
1724 2015-03-13  Commit Queue  <commit-queue@webkit.org>
1725
1726         Unreviewed, rolling out r181483.
1727         https://bugs.webkit.org/show_bug.cgi?id=142688
1728
1729         Caused use-after-free on many tests (Requested by ap on
1730         #webkit).
1731
1732         Reverted changeset:
1733
1734         "Allow clients to selectively disable plug-ins"
1735         https://bugs.webkit.org/show_bug.cgi?id=142506
1736         http://trac.webkit.org/changeset/181483
1737
1738 2015-03-13  Antti Koivisto  <antti@apple.com>
1739
1740         Cache glyph widths to GlyphPages
1741         https://bugs.webkit.org/show_bug.cgi?id=142028
1742
1743         Reviewed by Andreas Kling.
1744
1745         Currently we have a separate cache in Font for glyph widths. In practice we always need
1746         the widths so we can just cache them in GlyphPages. This simplifies the code and removes
1747         a per-character hash lookup from WidthIterator.
1748
1749         * platform/graphics/Font.cpp:
1750         (WebCore::Font::Font):
1751         (WebCore::Font::initCharWidths):
1752         (WebCore::Font::platformGlyphInit):
1753         (WebCore::createAndFillGlyphPage):
1754         (WebCore::Font::computeWidthForGlyph):
1755
1756             Rename to make it clear this doesn't cache.
1757
1758         (WebCore::GlyphPage::setGlyphDataForIndex):
1759
1760             Initialize the width.
1761             This could go to GlyphPage.cpp if we had one.
1762
1763         * platform/graphics/Font.h:
1764         (WebCore::Font::glyphZeroWidth):
1765         (WebCore::Font::isZeroWidthSpaceGlyph):
1766         (WebCore::Font::zeroGlyph): Deleted.
1767         (WebCore::Font::setZeroGlyph): Deleted.
1768         (WebCore::Font::widthForGlyph): Deleted.
1769         * platform/graphics/FontCascade.cpp:
1770         (WebCore::offsetToMiddleOfGlyph):
1771         * platform/graphics/FontCascadeFonts.cpp:
1772         (WebCore::FontCascadeFonts::glyphDataForCharacter):
1773         * platform/graphics/GlyphPage.h:
1774         (WebCore::GlyphData::GlyphData):
1775
1776             Return width too as part of GlyphData.
1777
1778         (WebCore::GlyphPage::glyphDataForIndex):
1779         (WebCore::GlyphPage::setGlyphDataForCharacter):
1780         (WebCore::GlyphPage::setGlyphDataForIndex):
1781         (WebCore::GlyphPage::GlyphPage):
1782         * platform/graphics/WidthIterator.cpp:
1783         (WebCore::WidthIterator::advanceInternal):
1784
1785             No need to lookup width separately now.
1786
1787         * platform/graphics/mac/ComplexTextController.cpp:
1788         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1789         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1790         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
1791         * rendering/mathml/RenderMathMLOperator.cpp:
1792         (WebCore::RenderMathMLOperator::advanceForGlyph):
1793         * rendering/svg/SVGTextRunRenderingContext.cpp:
1794         (WebCore::missingGlyphForFont):
1795         * svg/SVGFontData.cpp:
1796         (WebCore::SVGFontData::initializeFont):
1797
1798 2015-03-13  Eric Carlson  <eric.carlson@apple.com>
1799
1800         [Mac] Enable WIRELESS_PLAYBACK_TARGET
1801         https://bugs.webkit.org/show_bug.cgi?id=142635
1802
1803         Reviewed by Darin Adler.
1804
1805         * Configurations/FeatureDefines.xcconfig:
1806
1807 2015-03-13  Jeremy Jones  <jeremyj@apple.com>
1808
1809         Fix typo restoreUserInterfaceForOptimizedFullscreeStopWithCompletionHandler.
1810         https://bugs.webkit.org/show_bug.cgi?id=142678
1811
1812         Reviewed by Eric Carlson.
1813
1814         Add the missing 'n' in "fullscreen".
1815
1816         * platform/spi/ios/AVKitSPI.h:
1817
1818 2015-03-13  Timothy Horton  <timothy_horton@apple.com>
1819
1820         Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
1821         https://bugs.webkit.org/show_bug.cgi?id=142664
1822         <rdar://problem/18859470>
1823
1824         Reviewed by Benjamin Poulain.
1825
1826         * page/ViewportConfiguration.cpp:
1827         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
1828         (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
1829         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
1830         Split shouldIgnoreScalingConstraints into one for each dimension.
1831
1832         (WebCore::ViewportConfiguration::initialScale):
1833         (WebCore::ViewportConfiguration::minimumScale):
1834         Don't force the initial and minimum scales to cover the whole view if the
1835         page claims to want to lay out to device width but then lays out too big.
1836         This will allow pages that misbehave in this way to scale down further
1837         than they previously could, but will result in a region of empty background
1838         color being exposed at the initial/minimum scale.
1839
1840         (WebCore::ViewportConfiguration::description):
1841         Update the logging to show each dimension separately.
1842
1843         * page/ViewportConfiguration.h:
1844
1845 2015-03-13  Mark Lam  <mark.lam@apple.com>
1846
1847         Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
1848         <https://webkit.org/b/142674>
1849
1850         Reviewed by Filip Pizlo.
1851
1852         No new tests because there is no new functionality. This is a refactoring effort.
1853
1854         * bindings/objc/WebScriptObject.mm:
1855         * platform/ios/wak/WAKWindow.mm:
1856         (-[WAKWindow initWithLayer:]):
1857         (-[WAKWindow initWithFrame:]):
1858
1859 2015-03-13  Doug Russell  <d_russell@apple.com>
1860
1861         AX: Provide API for assistive tech to ignore DOM key event handlers
1862         https://bugs.webkit.org/show_bug.cgi?id=142059
1863
1864         Reviewed by Beth Dakin.
1865
1866         Assistive technology applications on the desktop are heavily dependent on keyboard navigation being reliable. This is greatly hindered by sites that handle key events without updating keyboard selection and then consume the event. It is important for assistive technology apps to allow users to decide to ignore these handlers that are incorrect for their purposes.
1867
1868         This can be fixed by exposing, via a new accessibility attribute, a way to decide, for a given WebCore::Frame, to pre-empt DOM dispatch and instead let accessibility caret browsing take place.
1869
1870         Test: platform/mac/accessibility/prevent-keyboard-event-dispatch.html
1871
1872         * accessibility/AccessibilityObject.cpp:
1873         (WebCore::AccessibilityObject::preventKeyboardDOMEventDispatch):
1874         (WebCore::AccessibilityObject::setPreventKeyboardDOMEventDispatch):
1875         * accessibility/AccessibilityObject.h:
1876         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1877         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1878         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1879         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
1880         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1881         * dom/Element.cpp:
1882         (WebCore::Element::dispatchKeyEvent):
1883         * page/EventHandler.cpp:
1884         (WebCore::EventHandler::keyEvent):
1885         (WebCore::handleKeyboardSelectionMovement):
1886         (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
1887         * page/EventHandler.h:
1888         * page/Settings.in:
1889
1890 2015-03-09  Conrad Shultz  <conrad_shultz@apple.com>
1891
1892         Allow clients to selectively disable plug-ins
1893         https://bugs.webkit.org/show_bug.cgi?id=142506
1894
1895         Reviewed by Anders Carlsson.
1896
1897         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
1898         from the page). As part of this:
1899
1900         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
1901            set of plug-ins.
1902
1903         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
1904            down the stack.
1905
1906         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
1907            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
1908
1909         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
1910
1911         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
1912         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
1913
1914         * dom/DOMImplementation.cpp:
1915         (WebCore::DOMImplementation::createDocument):
1916         Update to reflect function rename.
1917
1918         * loader/SubframeLoader.cpp:
1919         (WebCore::findPluginMIMETypeFromURL):
1920         Adopt getWebVisibleMimesAndPluginIndices().
1921         (WebCore::logPluginRequest):
1922         Update to reflect function rename.
1923         (WebCore::SubframeLoader::shouldUsePlugin):
1924         Ditto.
1925
1926         * platform/PlatformStrategies.h:
1927         Export platformStrategies(), since it is now used in WebProcess.cpp.
1928
1929         * plugins/DOMMimeType.cpp:
1930         (WebCore::DOMMimeType::type):
1931         (WebCore::DOMMimeType::description):
1932         (WebCore::DOMMimeType::mimeClassInfo):
1933         Adopt getWebVisibleMimesAndPluginIndices().
1934         (WebCore::DOMMimeType::enabledPlugin):
1935         Ditto.
1936
1937         * plugins/DOMMimeType.h:
1938         Don't return references in a few places where it is no longer safe to do so.
1939         (WebCore::DOMMimeType::mimeClassInfo): Deleted.
1940
1941         * plugins/DOMMimeTypeArray.cpp:
1942         (WebCore::DOMMimeTypeArray::length):
1943         Adopt getWebVisibleMimesAndPluginIndices().
1944         (WebCore::DOMMimeTypeArray::item):
1945         Ditto.
1946         (WebCore::DOMMimeTypeArray::canGetItemsForName):
1947         Ditto.
1948         (WebCore::DOMMimeTypeArray::namedItem):
1949         Ditto.
1950
1951         * plugins/DOMPlugin.cpp:
1952         (WebCore::DOMPlugin::pluginInfo):
1953         Adopt getWebVisiblePlugins().
1954         (WebCore::DOMPlugin::item):
1955         Adopt getWebVisibleMimesAndPluginIndices().
1956         (WebCore::DOMPlugin::canGetItemsForName):
1957         Ditto.
1958         (WebCore::DOMPlugin::namedItem):
1959         Ditto.
1960
1961         * plugins/DOMPlugin.h:
1962         (WebCore::DOMPlugin::pluginInfo): Deleted.
1963
1964         * plugins/DOMPluginArray.cpp:
1965         (WebCore::DOMPluginArray::length):
1966         Adopt getWebVisiblePlugins().
1967         (WebCore::DOMPluginArray::item):
1968         Ditto.
1969         (WebCore::DOMPluginArray::canGetItemsForName):
1970         Ditto.
1971         (WebCore::DOMPluginArray::namedItem):
1972         Ditto.
1973
1974         * plugins/PluginData.cpp:
1975         (WebCore::PluginData::PluginData):
1976         Stash the passed-in Page and call initPlugins().
1977         (WebCore::PluginData::getWebVisiblePlugins):
1978         New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
1979         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
1980         New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
1981         limited to the web-visible plug-ins.
1982         (WebCore::PluginData::supportsWebVisibleMimeType):
1983         Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
1984         (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
1985         Renamed from pluginInfoForMimeType(); ditto.
1986         (WebCore::PluginData::pluginNameForWebVisibleMimeType):
1987         Renamed from pluginNameForMimeType(); ditto.
1988         (WebCore::PluginData::pluginFileForWebVisibleMimeType):
1989         Renamed from pluginFileForMimeType(); ditto.
1990         (WebCore::PluginData::initPlugins):
1991         (WebCore::PluginData::supportsMimeType): Deleted.
1992         (WebCore::PluginData::pluginInfoForMimeType): Deleted.
1993         (WebCore::PluginData::pluginNameForMimeType): Deleted.
1994         (WebCore::PluginData::pluginFileForMimeType): Deleted.
1995
1996         * plugins/PluginData.h:
1997         Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
1998         new members to PluginInfo for the clientLoadPolicy and bundle information.
1999         (WebCore::PluginData::PluginData):
2000         Replace some member functions with new ones that will hide plug-ins upon request from the client;
2001         (WebCore::PluginData::mimes): Deleted.
2002         (WebCore::PluginData::mimePluginIndices): Deleted.
2003
2004         * plugins/PluginStrategy.h:
2005         Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
2006
2007         * replay/SerializationMethods.cpp:
2008         (JSC::EncodingTraits<PluginData>::encodeValue):
2009         Remove now-obsolete code for handling MIME types and add a FIXME.
2010         (JSC::DeserializedPluginData::DeserializedPluginData):
2011         (JSC::EncodingTraits<PluginData>::decodeValue):
2012         Ditto.
2013         (JSC::EncodingTraits<PluginInfo>::encodeValue):
2014         Handle the new members in PluginInfo.
2015         (JSC::EncodingTraits<PluginInfo>::decodeValue):
2016         Ditto.
2017
2018         * replay/WebInputs.json:
2019         Teach Replay about PluginLoadClientPolicy.
2020
2021 2015-03-13  Chris Dumez  <cdumez@apple.com>
2022
2023         XMLHttpRequests should not prevent a page from entering PageCache
2024         https://bugs.webkit.org/show_bug.cgi?id=142612
2025         <rdar://problem/19923085>
2026
2027         Reviewed by Alexey Proskuryakov.
2028
2029         Make XMLHttpRequest ActiveDOMObjects suspendable in most cases to
2030         drastically improve the likelihood of pages using them to enter
2031         PageCache. XMLHttpRequest used to be only suspendable when not
2032         loading. After this patch, if the XMLHttpRequest is loading when
2033         navigating away from the page, it will be aborted and the page
2034         will enter the PageCache. Upon restoring the page from PageCache,
2035         the XMLHttpRequests' error handlers will be executed to give them
2036         a chance to reload if they want to.
2037
2038         Test: http/tests/navigation/page-cache-xhr.html
2039
2040         * history/PageCache.cpp:
2041         (WebCore::logCanCacheFrameDecision):
2042         (WebCore::PageCache::canCachePageContainingThisFrame):
2043         Do not prevent a page to enter the page cache ff the main document has
2044         an error that is a cancellation and all remaining subresource loaders
2045         are for XHR. We extend the pre-existing mechanism used on iOS, which
2046         allowed PageCaching if the remaining resource loads are for images.
2047
2048         * loader/DocumentLoader.cpp:
2049         (WebCore::areAllLoadersPageCacheAcceptable):
2050         Mark XHR loaders as PageCache acceptable.
2051
2052         * loader/DocumentThreadableLoader.cpp:
2053         (WebCore::DocumentThreadableLoader::isXMLHttpRequest):
2054         * loader/DocumentThreadableLoader.h:
2055         * loader/ThreadableLoader.h:
2056         * loader/cache/CachedResource.cpp:
2057         (WebCore::CachedResource::areAllClientsXMLHttpRequests):
2058         * loader/cache/CachedResource.h:
2059         * loader/cache/CachedResourceClient.h:
2060         (WebCore::CachedResourceClient::isXMLHttpRequest):
2061         * xml/XMLHttpRequest.cpp:
2062         (WebCore::XMLHttpRequest::XMLHttpRequest):
2063         (WebCore::XMLHttpRequest::createRequest):
2064         (WebCore::XMLHttpRequest::canSuspend):
2065         Report that we can suspend XMLHttpRequests as long as the window load
2066         event has already fired. If the window load event has not fired yet,
2067         it would be unsafe to cancel the load in suspend() as it would
2068         potentially cause arbitrary JS execution while suspending.
2069
2070         (WebCore::XMLHttpRequest::suspend):
2071         If suspending for PageCache and the request is currently loading, abort
2072         the load and mark that we should fire the error event upon restoring
2073         from PageCache.
2074
2075         (WebCore::XMLHttpRequest::resume):
2076         (WebCore::XMLHttpRequest::resumeTimerFired):
2077         Upon resuming, fire the error event in a timer if the load was aborted
2078         for suspending. We need to do this in a timer because we are not allowed
2079         to execute arbitrary JS inside resume().
2080
2081         (WebCore::XMLHttpRequest::stop):
2082         Add a assertion to make sure we are not firing event inside stop() as
2083         this would potentially cause arbitrary JS execution and it would be
2084         unsafe. It seems to me that our code is currently unsafe but the
2085         assertion does not seem to be hit by our current layout tests. I am
2086         adding the assertion as it would make it clear we have a bug and we
2087         need to fix it.
2088
2089         * xml/XMLHttpRequest.h:
2090
2091 2015-03-13  Joonghun Park  <jh718.park@samsung.com>
2092
2093         Fix Debug build error 'comparison is always true due to limited range of data type [-Werror=type-limits]'
2094         https://bugs.webkit.org/show_bug.cgi?id=142652
2095
2096         Reviewed by Csaba Osztrogonác.
2097
2098         No new tests, no behavior changes.
2099
2100         Now CSSPropertyID type is uint16_t, so propertyID >= 0 check is needed no more.
2101
2102         * css/CSSPrimitiveValue.cpp:
2103         (WebCore::propertyName):
2104         * css/makeprop.pl:
2105
2106 2015-03-12  Zan Dobersek  <zdobersek@igalia.com>
2107
2108         Remove DrawingBuffer
2109         https://bugs.webkit.org/show_bug.cgi?id=142641
2110
2111         Reviewed by Darin Adler.
2112
2113         Remove the DrawingBuffer class. Objects of this type were only held in the
2114         WebGLRenderingContext (later renamed to WebGLRenderingContextBase) on the
2115         Chromium port, with the relevant code removed in r147888. Since then, the
2116         m_drawingBuffer member variable has always been null.
2117
2118         * CMakeLists.txt:
2119         * PlatformEfl.cmake:
2120         * PlatformGTK.cmake:
2121         * WebCore.vcxproj/WebCore.vcxproj:
2122         * WebCore.vcxproj/WebCore.vcxproj.filters:
2123         * WebCore.xcodeproj/project.pbxproj:
2124         * html/canvas/WebGL2RenderingContext.cpp:
2125         (WebCore::WebGL2RenderingContext::copyTexImage2D):
2126         * html/canvas/WebGLRenderingContext.cpp:
2127         (WebCore::WebGLRenderingContext::copyTexImage2D):
2128         * html/canvas/WebGLRenderingContextBase.cpp:
2129         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
2130         (WebCore::WebGLRenderingContextBase::initializeNewContext):
2131         (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
2132         (WebCore::WebGLRenderingContextBase::markContextChanged):
2133         (WebCore::WebGLRenderingContextBase::clearIfComposited):
2134         (WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
2135         (WebCore::WebGLRenderingContextBase::paintRenderingResultsToImageData):
2136         (WebCore::WebGLRenderingContextBase::reshape):
2137         (WebCore::WebGLRenderingContextBase::drawingBufferWidth):
2138         (WebCore::WebGLRenderingContextBase::drawingBufferHeight):
2139         (WebCore::WebGLRenderingContextBase::activeTexture):
2140         (WebCore::WebGLRenderingContextBase::bindFramebuffer):
2141         (WebCore::WebGLRenderingContextBase::bindTexture):
2142         (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
2143         (WebCore::WebGLRenderingContextBase::deleteFramebuffer):
2144         (WebCore::WebGLRenderingContextBase::disable):
2145         (WebCore::WebGLRenderingContextBase::enable):
2146         (WebCore::WebGLRenderingContextBase::getContextAttributes):
2147         (WebCore::WebGLRenderingContextBase::readPixels):
2148         (WebCore::WebGLRenderingContextBase::loseContextImpl):
2149         (WebCore::WebGLRenderingContextBase::getBoundFramebufferWidth):
2150         (WebCore::WebGLRenderingContextBase::getBoundFramebufferHeight):
2151         (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
2152         * html/canvas/WebGLRenderingContextBase.h:
2153         (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder): Deleted.
2154         (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Deleted.
2155         * platform/graphics/GraphicsContext.h:
2156         * platform/graphics/GraphicsContext3D.h:
2157         * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed.
2158         * platform/graphics/gpu/DrawingBuffer.cpp: Removed.
2159         * platform/graphics/gpu/DrawingBuffer.h: Removed.
2160         * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
2161         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2162         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2163         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
2164
2165 2015-03-12  Ryosuke Niwa  <rniwa@webkit.org>
2166
2167         REGRESSION(r180726): Removing an empty line at the end of textarea clears the entire texture
2168         https://bugs.webkit.org/show_bug.cgi?id=142646
2169
2170         Reviewed by Darin Adler.
2171
2172         The bug was caused by TypingCommand::deleteKeyPressed erroneously determining the editable root to be empty because
2173         Position::atStartOfTree returns true when it's anchored at a BR that is immediately below the root editable element.
2174
2175         Fixed the bug by replacing the use of the deprecated atFirstEditingPositionForNode by a code that understands modern
2176         position types such as PositionIsBeforeAnchor in atStartOfTree and atEndOfTree. These two functions will no longer
2177         return true when anchored before or after BR after this patch.
2178
2179         Test: editing/deleting/delete-empty-line-breaks-at-end-of-textarea.html
2180
2181         * dom/Position.cpp:
2182         (WebCore::Position::atStartOfTree):
2183         (WebCore::Position::atEndOfTree):
2184
2185 2015-03-12  Yusuke Suzuki  <utatane.tea@gmail.com>
2186
2187         Integrate MapData into JSMap and JSSet
2188         https://bugs.webkit.org/show_bug.cgi?id=142556
2189
2190         Reviewed by Filip Pizlo.
2191
2192         Now Set has SetData and it's different from MapData.
2193         And MapData/SetData are completely integrated into JSSet and JSMap.
2194         Structured-cloning algorithm need to be aware of these changes.
2195         And in the case of JSSet, since JSSet doesn't need dummy value for construction,
2196         Structured-cloning only serialize the keys in JSSet.
2197
2198         * ForwardingHeaders/runtime/MapDataInlines.h: Added.
2199         * bindings/js/SerializedScriptValue.cpp:
2200         (WebCore::CloneSerializer::serialize):
2201         (WebCore::CloneDeserializer::consumeCollectionDataTerminationIfPossible):
2202         (WebCore::CloneDeserializer::deserialize):
2203         (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible): Deleted.
2204
2205 2015-03-12  Dan Bernstein  <mitz@apple.com>
2206
2207         Finish up <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
2208
2209         Added back OS X bits that I couldn’t land initially in r181317 or had to remove in r181327.
2210
2211         * platform/network/mac/CertificateInfoMac.mm:
2212         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
2213         * platform/spi/cocoa/SecuritySPI.h:
2214
2215 2015-03-12  Geoffrey Garen  <ggaren@apple.com>
2216
2217         REGRESSION: Crash under Heap::reportExtraMemoryAllocatedSlowCase for media element
2218         https://bugs.webkit.org/show_bug.cgi?id=142636
2219
2220         Reviewed by Mark Hahnenberg.
2221
2222         This was a pre-existing bug that I made a lot worse in
2223         <https://trac.webkit.org/changeset/181411>.
2224
2225         * html/HTMLMediaElement.cpp:
2226         (WebCore::HTMLMediaElement::parseAttribute): Compare size before
2227         subtracting rather than subtracting and then comparing to zero. The
2228         latter technique is not valid for unsigned integers, which will happily
2229         underflow into giant numbers.
2230
2231         * Modules/mediasource/SourceBuffer.cpp:
2232         (WebCore::SourceBuffer::reportExtraMemoryAllocated): This code was
2233          technically correct, but I took the opportunity to clean it up a bit.
2234          There's no need to do two checks here, and it smells bad to check for
2235          a negative unsigned integer.
2236
2237 2015-03-12  Sebastian Dröge  <sebastian@centricular.com>
2238
2239         Stop using single-include headers that are only available since GStreamer >= 1.2.
2240
2241         https://bugs.webkit.org/show_bug.cgi?id=142537
2242
2243         Reviewed by Philippe Normand.
2244
2245         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
2246         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2247         * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
2248         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2249         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2250         * platform/graphics/gstreamer/GStreamerUtilities.h:
2251         * platform/graphics/gstreamer/ImageGStreamer.h:
2252         Instead of using single-include headers for the GStreamer libraries,
2253         directly include the headers we need. The single-include headers were
2254         only added in 1.2, and this would be the only reason why we would
2255         depend on 1.2.
2256
2257 2015-03-12  Eric Carlson  <eric.carlson@apple.com>
2258
2259         [Mac] Update AirPlay handling
2260         https://bugs.webkit.org/show_bug.cgi?id=142541
2261
2262         Unreviewed, respond to post-review comments.
2263
2264         * dom/Document.cpp:
2265         (WebCore::Document::didChoosePlaybackTarget):
2266         * page/ChromeClient.h:
2267         * page/Page.cpp:
2268         (WebCore::Page::showPlaybackTargetPicker):
2269         (WebCore::Page::didChoosePlaybackTarget):
2270         (WebCore::Page::configurePlaybackTargetMonitoring):
2271
2272 2015-03-12  Csaba Osztrogonác  <ossy@webkit.org>
2273
2274         Fix the !ENABLE(PICTURE_SIZES) build
2275         https://bugs.webkit.org/show_bug.cgi?id=142617
2276
2277         Reviewed by Darin Adler.
2278
2279         * html/parser/HTMLPreloadScanner.cpp:
2280         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2281
2282 2015-03-11  Joseph Pecoraro  <pecoraro@apple.com>
2283
2284         Unreviewed follow-up fix to r181426. Initialize TextPosition with zeros in case it gets used.
2285
2286         Address ASSERT in LayoutTests/printing/page-format-data.html.
2287
2288         * dom/InlineStyleSheetOwner.cpp:
2289         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2290         In case the TextPosition gets used because it wasn't created by a parser,
2291         zeros are more realistic values then beforeFirst.
2292
2293 2015-03-11  Roger Fong  <roger_fong@apple.com>
2294
2295         Media element time no longer updates while scrubbing following r181279.
2296         https://bugs.webkit.org/show_bug.cgi?id=142606.
2297         <rdar://problem/20131014>
2298
2299         Reviewed by Eric Carlson.
2300
2301         * Modules/mediacontrols/mediaControlsApple.js:
2302         (Controller.prototype.handleWrapperMouseMove):
2303         Update time as a result of a mouse move if we are scrubbing.
2304
2305 2015-03-11  Joseph Pecoraro  <pecoraro@apple.com>
2306
2307         Web Inspector: CSS parser errors in the console should include column numbers
2308         https://bugs.webkit.org/show_bug.cgi?id=114313
2309
2310         Reviewed by Darin Adler.
2311
2312         Test: inspector-protocol/console/warnings-errors.html
2313
2314         * css/CSSParser.h:
2315         (WebCore::CSSParser::currentCharacterOffset):
2316         Get the current character offset depending on the source type.
2317         Add instance variables to track column position and start
2318         line / column for inline stylesheets.
2319
2320         * css/CSSParser.cpp:
2321         (WebCore::CSSParser::CSSParser):
2322         (WebCore::CSSParser::parseSheet):
2323         Initialize new instance variables.
2324
2325         (WebCore::CSSParser::currentLocation):
2326         Update to include column information for the token. Also, if we are on the
2327         first line we may need to take into account a start column offset as well.
2328
2329         (WebCore::CSSParser::realLex):
2330         Set the token's start column.
2331         When bumping the line number, reset the column offset for the next
2332         line with the next character.
2333
2334         (WebCore::CSSParser::syntaxError):
2335         (WebCore::CSSParser::logError):
2336         Include column information.
2337
2338         * css/StyleSheetContents.cpp:
2339         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2340         (WebCore::StyleSheetContents::parseString):
2341         (WebCore::StyleSheetContents::parseStringAtPosition):
2342         Include column information.
2343
2344         * css/StyleSheetContents.h:
2345         * dom/InlineStyleSheetOwner.cpp:
2346         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2347         (WebCore::InlineStyleSheetOwner::createSheet):
2348         Save and use column information later on.
2349
2350         * dom/InlineStyleSheetOwner.h:
2351         * inspector/InspectorStyleSheet.cpp:
2352         (WebCore::InspectorStyleSheet::ensureSourceData):
2353         Updated parser signature needs starting column and no longer has optional parameters.
2354
2355 2015-03-11  Eric Carlson  <eric.carlson@apple.com>
2356
2357         [Mac] Update AirPlay handling
2358         https://bugs.webkit.org/show_bug.cgi?id=142541
2359
2360         Reviewed by Sam Weinig.
2361
2362         * WebCore.xcodeproj/project.pbxproj:
2363         * dom/Document.cpp:
2364         (WebCore::Document::showPlaybackTargetPicker):
2365         (WebCore::Document::addPlaybackTargetPickerClient):
2366         (WebCore::Document::removePlaybackTargetPickerClient):
2367         (WebCore::Document::configurePlaybackTargetMonitoring):
2368         (WebCore::Document::requiresPlaybackTargetRouteMonitoring):
2369         (WebCore::Document::playbackTargetAvailabilityDidChange):
2370         (WebCore::Document::didChoosePlaybackTarget):
2371         * dom/Document.h:
2372         * html/HTMLMediaElement.cpp:
2373         (WebCore::HTMLMediaElement::registerWithDocument):
2374         (WebCore::HTMLMediaElement::unregisterWithDocument):
2375         (WebCore::HTMLMediaElement::parseAttribute):
2376         * html/HTMLMediaElement.h:
2377         * html/HTMLMediaSession.cpp:
2378         (WebCore::HTMLMediaSession::HTMLMediaSession):
2379         (WebCore::HTMLMediaSession::registerWithDocument):
2380         (WebCore::HTMLMediaSession::unregisterWithDocument):
2381         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
2382         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
2383         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
2384         (WebCore::HTMLMediaSession::didChoosePlaybackTarget):
2385         (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
2386         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring):
2387         * html/HTMLMediaSession.h:
2388         * page/ChromeClient.h:
2389         * page/Page.cpp:
2390         (WebCore::Page::didChoosePlaybackTarget):
2391         (WebCore::Page::playbackTargetAvailabilityDidChange):
2392         (WebCore::Page::configurePlaybackTargetMonitoring):
2393         * page/Page.h:
2394         (WebCore::Page::hasWirelessPlaybackTarget):
2395         (WebCore::Page::playbackTarget):
2396         * platform/audio/MediaSession.cpp:
2397         (WebCore::MediaSession::clientDataBufferingTimerFired):
2398         (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Deleted.
2399         * platform/audio/MediaSession.h:
2400         (WebCore::MediaSession::didChoosePlaybackTarget):
2401         (WebCore::MediaSession::externalOutputDeviceAvailableDidChange):
2402         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
2403         (WebCore::MediaSessionClient::setWirelessPlaybackTarget):
2404         * platform/audio/MediaSessionManager.cpp:
2405         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Deleted.
2406         * platform/audio/MediaSessionManager.h:
2407         (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
2408         * platform/audio/ios/MediaSessionManagerIOS.h:
2409         * platform/audio/ios/MediaSessionManagerIOS.mm:
2410         (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
2411         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
2412         * platform/graphics/AVPlaybackTarget.h: Added.
2413         (WebCore::AVPlaybackTarget::~AVPlaybackTarget):
2414         (WebCore::AVPlaybackTarget::AVPlaybackTarget):
2415         (WebCore::AVPlaybackTarget::setDevicePickerContext):
2416         (WebCore::AVPlaybackTarget::devicePickerContext):
2417         * platform/graphics/AVPlaybackTargetPickerClient.h: Added.
2418         (WebCore::AVPlaybackTargetPickerClient::~AVPlaybackTargetPickerClient):
2419         * platform/graphics/MediaPlayer.cpp:
2420         (WebCore::MediaPlayer::setWirelessPlaybackTarget):
2421         * platform/graphics/MediaPlayer.h:
2422         * platform/graphics/MediaPlayerPrivate.h:
2423         (WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):
2424         * platform/graphics/avfoundation/AVPlaybackTargetMac.mm: Added.
2425         (WebCore::AVPlaybackTarget::encode):
2426         (WebCore::AVPlaybackTarget::decode):
2427         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2428         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2429         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2430         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2431         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
2432         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless):
2433         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType):
2434         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
2435         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
2436         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
2437         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
2438         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2439
2440 2015-03-11  Alex Christensen  <achristensen@webkit.org>
2441
2442         [Content Extensions] Add resource type and load type triggers.
2443         https://bugs.webkit.org/show_bug.cgi?id=142422
2444
2445         Reviewed by Benjamin Poulain.
2446
2447         New API tests.
2448
2449         * WebCore.xcodeproj/project.pbxproj:
2450         * contentextensions/ContentExtensionCompiler.cpp:
2451         (WebCore::ContentExtensions::compileRuleList):
2452         * contentextensions/ContentExtensionParser.cpp:
2453         (WebCore::ContentExtensions::getTypeFlags):
2454         (WebCore::ContentExtensions::loadTrigger):
2455         * contentextensions/ContentExtensionRule.h:
2456         * contentextensions/ContentExtensionsBackend.cpp:
2457         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2458         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL): Deleted.
2459         * contentextensions/ContentExtensionsBackend.h:
2460         * contentextensions/DFABytecode.h:
2461         (WebCore::ContentExtensions::instructionSizeWithArguments):
2462         * contentextensions/DFABytecodeCompiler.cpp:
2463         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendConditionalAction):
2464         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2465         * contentextensions/DFABytecodeCompiler.h:
2466         * contentextensions/DFABytecodeInterpreter.cpp:
2467         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2468         * contentextensions/DFABytecodeInterpreter.h:
2469         * loader/ResourceLoadInfo.cpp: Added.
2470         (WebCore::toResourceType):
2471         (WebCore::readResourceType):
2472         (WebCore::readLoadType):
2473         (WebCore::ResourceLoadInfo::isThirdParty):
2474         (WebCore::ResourceLoadInfo::getResourceFlags):
2475         * loader/ResourceLoadInfo.h: Added.
2476         * loader/cache/CachedResourceLoader.cpp:
2477         (WebCore::CachedResourceLoader::requestResource):
2478         * page/UserContentController.cpp:
2479         (WebCore::UserContentController::actionsForResourceLoad):
2480         (WebCore::UserContentController::actionsForURL): Deleted.
2481         * page/UserContentController.h:
2482
2483 2015-03-11  Tim Horton  <timothy_horton@apple.com>
2484
2485         Fix the build.
2486
2487         * page/EventHandler.cpp:
2488         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
2489         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2490         (WebCore::EventHandler::handleMousePressEventTripleClick):
2491         (WebCore::EventHandler::handleMousePressEventSingleClick):
2492
2493 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
2494
2495         <attachment> shouldn't use "user-select: all"
2496         https://bugs.webkit.org/show_bug.cgi?id=142453
2497
2498         Reviewed by Darin Adler.
2499
2500         It turns out that "user-select: all" is rife with bugs; in lieu of fixing them
2501         all (at least for now), let's not use "user-select: all" in the default stylesheet
2502         for <attachment>. It's really overkill anyway, since <attachment> can't have children.
2503         The only "user-select: all" behavior we actually want is select-on-click.
2504         So, we'll implement that in a slightly different way.
2505
2506         Tests: fast/attachment/attachment-select-on-click-inside-user-select-all.html
2507                fast/attachment/attachment-select-on-click.html
2508
2509         * css/html.css:
2510         (attachment):
2511         No more "user-select: all".
2512
2513         (attachment:focus): Deleted.
2514         We stopped using attachment focus a while back and forgot to remove this.
2515
2516         * dom/Node.h:
2517         (WebCore::Node::shouldSelectOnMouseDown):
2518         Add a virtual function that Node subclasses can override to indicate they
2519         should be selected on mouse down.
2520
2521         * html/HTMLAttachmentElement.h:
2522         Override the aforementioned virtual function; <attachment> should always
2523         be selected on mouse down.
2524
2525         * page/EventHandler.cpp:
2526         (WebCore::nodeToSelectOnMouseDownForNode):
2527         Determine which node should be selected when a mousedown hits the given node.
2528         If there's any "user-select: all", we go with the outermost "user-select: all".
2529         Otherwise, we give the node a chance to say that it wants to be selected itself.
2530
2531         (WebCore::expandSelectionToRespectSelectOnMouseDown):
2532         Rename this function, it's not just about "user-select: all" anymore.
2533         Make use of nodeToSelectOnMouseDownForNode.
2534
2535         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
2536         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2537         (WebCore::EventHandler::handleMousePressEventTripleClick):
2538         (WebCore::EventHandler::handleMousePressEventSingleClick):
2539         (WebCore::expandSelectionToRespectUserSelectAll): Deleted.
2540         Adjust to the new names.
2541
2542 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
2543
2544         Users of Heap::deprecatedReportExtraMemory should switch to reportExtraMemoryAllocated+reportExtraMemoryVisited
2545         https://bugs.webkit.org/show_bug.cgi?id=142595
2546
2547         Reviewed by Andreas Kling.
2548
2549         Fixed this bug for canvas.
2550
2551         * html/HTMLCanvasElement.cpp:
2552         (WebCore::HTMLCanvasElement::memoryCost): Factored out the helper function
2553         required by our IDL generator.
2554
2555         (WebCore::HTMLCanvasElement::createImageBuffer): Use
2556         reportExtraMemoryAllocated.
2557
2558         * html/HTMLCanvasElement.h:
2559
2560         * html/HTMLCanvasElement.idl: Adopt the IDL for reporting cost in the
2561         right way during GC. This will match our reportExtraMemoryAllocated
2562         with a reportExtraMemoryVisited during GC.
2563
2564 2015-03-11  Roger Fong  <roger_fong@apple.com>
2565
2566         A number of minor edits to the media controls on OSX.
2567         https://bugs.webkit.org/show_bug.cgi?id=142551.
2568         <rdar://problem/20114707>
2569
2570         Reviewed by Darin Adler.
2571
2572         This covers a slew of minor edits to the new media controls. They are as follows.
2573         Small vertical placements adjustments to inline control elements.
2574         Make sure buttons have no focus outlines.
2575         Expand height of mute box that triggers the volume panel appearing.
2576         Turn all button colors into an slightly transparent white.
2577         Center status display text in fullscreen mode.
2578         Lower position of captions container in fullscreen mode.
2579         Show the controls on when done loading of the video an status display is hidden.
2580
2581         * Modules/mediacontrols/mediaControlsApple.css:
2582         (audio::-webkit-media-controls-panel):
2583         (audio::-webkit-media-controls-panel button:focus):
2584         (audio::-webkit-media-controls-rewind-button):
2585         (audio::-webkit-media-controls-play-button):
2586         (audio::-webkit-media-controls-play-button.paused):
2587         (audio::-webkit-media-controls-panel .mute-box):
2588         (video::-webkit-media-controls-volume-max-button):
2589         (audio::-webkit-media-controls-panel .volume-box):
2590         (video::-webkit-media-controls-volume-min-button):
2591         (audio::-webkit-media-controls-wireless-playback-picker-button):
2592         (audio::-webkit-media-controls-toggle-closed-captions-button):
2593         (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before):
2594         (audio::-webkit-media-controls-fullscreen-button):
2595         (audio::-webkit-media-controls-fullscreen-button.exit):
2596         (audio::-webkit-media-controls-status-display):
2597         (audio::-webkit-media-controls-time-remaining-display):
2598         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
2599         (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
2600         (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
2601         (video:-webkit-full-screen::-webkit-media-controls-play-button):
2602         (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
2603         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
2604         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
2605         (video:-webkit-full-screen::-webkit-media-controls-status-display):
2606         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
2607         (audio::-webkit-media-controls-panel button:active): Deleted.
2608         * Modules/mediacontrols/mediaControlsApple.js:
2609         (Controller.prototype.setStatusHidden):
2610
2611 2015-03-11  Commit Queue  <commit-queue@webkit.org>
2612
2613         Unreviewed, rolling out r179340 and r179344.
2614         https://bugs.webkit.org/show_bug.cgi?id=142598
2615
2616         Caused images to stay alive forever when navigating away from
2617         the page before they finish loading. (Requested by kling on
2618         #webkit).
2619
2620         Reverted changesets:
2621
2622         "CachedImage: ensure clients overrides imageChanged instead of
2623         notifyFinished"
2624         https://bugs.webkit.org/show_bug.cgi?id=140722
2625         http://trac.webkit.org/changeset/179340
2626
2627         "HTMLImageLoader: fix build failure on assert condition after
2628         r179340"
2629         https://bugs.webkit.org/show_bug.cgi?id=140722
2630         http://trac.webkit.org/changeset/179344
2631
2632 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
2633
2634         Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
2635         https://bugs.webkit.org/show_bug.cgi?id=142593
2636
2637         Reviewed by Andreas Kling.
2638
2639         Adopt deprecatedReportExtraMemory as a short-term fix for runaway
2640         memory growth in these cases where we have not adopted
2641         reportExtraMemoryVisited.
2642
2643         Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited.
2644         That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595.
2645
2646         Using IOSDebug, I can see that the canvas stress test @ http://jsfiddle.net/fvyw4ba0/,
2647         which used to keep > 1000 1MB NonVolatile GPU allocations live, now keeps about 10 live.
2648
2649         * Modules/mediasource/SourceBuffer.cpp:
2650         (WebCore::SourceBuffer::reportExtraMemoryAllocated):
2651         * bindings/js/JSDocumentCustom.cpp:
2652         (WebCore::toJS):
2653         * bindings/js/JSImageDataCustom.cpp:
2654         (WebCore::toJS):
2655         * bindings/js/JSNodeListCustom.cpp:
2656         (WebCore::createWrapper):
2657         * dom/CollectionIndexCache.cpp:
2658         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
2659         * html/HTMLCanvasElement.cpp:
2660         (WebCore::HTMLCanvasElement::createImageBuffer):
2661         * html/HTMLImageLoader.cpp:
2662         (WebCore::HTMLImageLoader::imageChanged):
2663         * html/HTMLMediaElement.cpp:
2664         (WebCore::HTMLMediaElement::parseAttribute):
2665         * xml/XMLHttpRequest.cpp:
2666         (WebCore::XMLHttpRequest::dropProtection):
2667
2668 2015-03-10  Andy Estes  <aestes@apple.com>
2669
2670         REGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
2671         https://bugs.webkit.org/show_bug.cgi?id=142526
2672
2673         Reviewed by Darin Adler.
2674
2675         * loader/DocumentLoader.cpp:
2676         (WebCore::DocumentLoader::dataReceived): Don't delete m_contentFilter until after we're done using its replacement data.
2677
2678 2015-03-10  Sam Weinig  <sam@webkit.org>
2679
2680         Allow adding a button in input elements for auto fill related functionality
2681         <rdar://problem/19782066>
2682         https://bugs.webkit.org/show_bug.cgi?id=142564
2683
2684         Reviewed by Anders Carlsson.
2685
2686         Test: fast/forms/input-auto-fill-button.html
2687
2688         - Adds a new button that can be shown in <input> elements - AutoFillButtonElement.
2689         - Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
2690           where not feasible due to exported API/SPI).
2691
2692         * CMakeLists.txt:
2693         * WebCore.vcxproj/WebCore.vcxproj:
2694         * WebCore.vcxproj/WebCore.vcxproj.filters:
2695         * WebCore.xcodeproj/project.pbxproj:
2696         Add new files.
2697
2698         * css/html.css:
2699         (input::-webkit-auto-fill-button):
2700         (input::-webkit-auto-fill-button:hover):
2701         (input::-webkit-auto-fill-button:active):
2702         Add default style rules for the AutoFill button based on the ones
2703         used for caps lock indicator.
2704
2705         * html/HTMLInputElement.cpp:
2706         (WebCore::HTMLInputElement::HTMLInputElement):
2707         (WebCore::HTMLInputElement::autoFillButtonElement):
2708         (WebCore::HTMLInputElement::reset):
2709         (WebCore::HTMLInputElement::setValueFromRenderer):
2710         (WebCore::HTMLInputElement::setAutoFilled):
2711         (WebCore::HTMLInputElement::setShowAutoFillButton):
2712         (WebCore::HTMLInputElement::setAutofilled): Deleted.
2713         * html/HTMLInputElement.h:
2714         (WebCore::HTMLInputElement::isAutoFilled):
2715         (WebCore::HTMLInputElement::showAutoFillButton):
2716         (WebCore::HTMLInputElement::isAutofilled): Deleted.
2717         Add new bit to represent whether the AutoFill button should be shown
2718         or not. By default it is not shown, and the client must enable it.
2719
2720         * html/InputType.cpp:
2721         (WebCore::InputType::updateAutoFillButton):
2722         * html/InputType.h:
2723         (WebCore::InputType::autoFillButtonElement):
2724         Add new virtual methods for updating and accessing the AutoFill button.
2725
2726         * html/TextFieldInputType.cpp:
2727         (WebCore::TextFieldInputType::createShadowSubtree):
2728         (WebCore::TextFieldInputType::autoFillButtonElement):
2729         (WebCore::TextFieldInputType::destroyShadowSubtree):
2730         (WebCore::TextFieldInputType::updatePlaceholderText):
2731         (WebCore::TextFieldInputType::shouldDrawAutoFillButton):
2732         (WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
2733         (WebCore::TextFieldInputType::createContainer):
2734         (WebCore::TextFieldInputType::createAutoFillButton):
2735         (WebCore::TextFieldInputType::updateAutoFillButton):
2736         * html/TextFieldInputType.h:
2737         Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
2738         is slightly different than for the caps lock indicator, because I didn't want to force
2739         the creation of a container for all <input> elements just in case an AutoFill button was
2740         added. Instead, if an AutoFill button is added, the container is created on the fly and
2741         the existing DOM is updated to move into it. Once a container is created, it is never
2742         removed.
2743
2744         * html/shadow/AutoFillButtonElement.cpp: Added.
2745         (WebCore::AutoFillButtonElement::create):
2746         (WebCore::AutoFillButtonElement::AutoFillButtonElement):
2747         (WebCore::AutoFillButtonElement::defaultEventHandler):
2748         * html/shadow/AutoFillButtonElement.h: Added.
2749         Add div subclass that swallows the click event and forwards it to the ChromeClient.
2750
2751         * page/ChromeClient.h:
2752         Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
2753         button was clicked.
2754
2755         * testing/Internals.cpp:
2756         (WebCore::Internals::setAutofilled):
2757         (WebCore::Internals::setShowAutoFillButton):
2758         * testing/Internals.h:
2759         * testing/Internals.idl:
2760         Expose a new internals.setShowAutoFillButton() function to allow testing
2761         of the AutoFill button from layout tests.
2762
2763         * accessibility/AccessibilityObject.cpp:
2764         (WebCore::AccessibilityObject::isValueAutofilled):
2765         * css/SelectorCheckerTestFunctions.h:
2766         (WebCore::isAutofilled):
2767         * css/StyleResolver.cpp:
2768         (WebCore::StyleResolver::canShareStyleWithControl):
2769         Update for new spelling of AutoFill.
2770
2771 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
2772
2773         Refactored the JSC::Heap extra cost API for clarity and to make some known bugs more obvious
2774         https://bugs.webkit.org/show_bug.cgi?id=142589
2775
2776         Reviewed by Andreas Kling.
2777
2778         Updated for renames to JSC extra cost APIs.
2779
2780         Added FIXMEs to our 10 use cases that are currently wrong, including
2781         canvas, which is the cause of https://bugs.webkit.org/show_bug.cgi?id=142457.
2782
2783         * Modules/mediasource/SourceBuffer.cpp:
2784         (WebCore::SourceBuffer::appendBufferInternal):
2785         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
2786         (WebCore::SourceBuffer::reportExtraMemoryAllocated):
2787         (WebCore::SourceBuffer::reportExtraMemoryCost): Deleted.
2788         * Modules/mediasource/SourceBuffer.h:
2789         * bindings/js/JSDocumentCustom.cpp:
2790         (WebCore::toJS):
2791         * bindings/js/JSImageDataCustom.cpp:
2792         (WebCore::toJS):
2793         * bindings/js/JSNodeListCustom.cpp:
2794         (WebCore::createWrapper):
2795         * bindings/scripts/CodeGeneratorJS.pm:
2796         (GenerateImplementation):
2797         * dom/CollectionIndexCache.cpp:
2798         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
2799         (WebCore::reportExtraMemoryCostForCollectionIndexCache): Deleted.
2800         * dom/CollectionIndexCache.h:
2801         (WebCore::Iterator>::computeNodeCountUpdatingListCache):
2802         * html/HTMLCanvasElement.cpp:
2803         (WebCore::HTMLCanvasElement::createImageBuffer):
2804         * html/HTMLCollection.h:
2805         (WebCore::CollectionNamedElementCache::didPopulate):
2806         * html/HTMLImageLoader.cpp:
2807         (WebCore::HTMLImageLoader::imageChanged):
2808         * html/HTMLMediaElement.cpp:
2809         (WebCore::HTMLMediaElement::parseAttribute):
2810         * xml/XMLHttpRequest.cpp:
2811         (WebCore::XMLHttpRequest::dropProtection):
2812
2813 2015-03-11  Benjamin Poulain  <bpoulain@apple.com>
2814
2815         Add basic support for BOL and EOL assertions to the URL Filter parser
2816         https://bugs.webkit.org/show_bug.cgi?id=142568
2817
2818         Reviewed by Alex Christensen.
2819
2820         This patch adds heavily restricted support for BOL and EOL to the URL filter parser.
2821
2822         Both assertions must be the first/last term of their pattern. Any advanced combination
2823         results in a parsing error.
2824
2825         The BOL assertion is easy to represent: currently, any pattern starts at the beginning
2826         of a line and the NFA are generated accordingly.
2827
2828         I had two options to represent the EOL assertion:
2829         1) Add a new special transition on EOL.
2830         2) Add a new vector of actions to the states, conditional to the EOL input.
2831
2832         I picked the first option to avoid growing every state by a vector
2833         that would be empty in the vast majority of cases.
2834
2835
2836         On the matching side, the interpreter was modified to support transitions on '\0'.
2837         DFABytecodeInstruction::CheckValue now stops when running on a character after
2838         the end of the string.
2839
2840         DFABytecodeInstruction::Jump gets two fixes: First we now account for the index
2841         to avoid going past the end of the input. Second, stop on '\0' too... the reason
2842         is that the unconditional jump is only used for fallback edges of the DFA, fallback
2843         edge are not supposed to accept '\0'.
2844
2845         * contentextensions/DFA.cpp:
2846         (WebCore::ContentExtensions::printTransitions):
2847         * contentextensions/DFABytecodeInterpreter.cpp:
2848         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2849         * contentextensions/DFANode.h:
2850         * contentextensions/NFA.cpp:
2851         (WebCore::ContentExtensions::NFA::addTransition):
2852         (WebCore::ContentExtensions::NFA::addEpsilonTransition):
2853         (WebCore::ContentExtensions::printTransitions):
2854         * contentextensions/NFANode.h:
2855         * contentextensions/NFAToDFA.cpp:
2856         (WebCore::ContentExtensions::populateTransitions):
2857         (WebCore::ContentExtensions::NFAToDFA::convert):
2858         * contentextensions/URLFilterParser.cpp:
2859         (WebCore::ContentExtensions::Term::Term):
2860         (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
2861         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
2862         (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
2863         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
2864
2865 2015-03-11  Jer Noble  <jer.noble@apple.com>
2866
2867         [Mac] Update fullscreen placeholder UI to use Vibrancy.
2868         https://bugs.webkit.org/show_bug.cgi?id=142586
2869
2870         Reviewed by Eric Carlson.
2871
2872         Update the fullscreen placeholder with a translucent vibrant appearance
2873         using NSVisualEffectView. Since NSVisuaEffectView is only available for
2874         OS X 10.10 and above, wrap the new implementation in a version check and
2875         retain the old implementation.
2876
2877         Drive-by: Update the strings for the placeholder view with new HI guidance
2878         as well.
2879
2880         * English.lproj/Localizable.strings:
2881         * platform/LocalizedStrings.cpp:
2882         (WebCore::clickToExitFullScreenText):
2883         * platform/mac/WebCoreFullScreenPlaceholderView.h:
2884         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
2885         (-[WebCoreFullScreenPlaceholderView setExitWarningVisible:]):
2886
2887 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
2888
2889         Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
2890         https://bugs.webkit.org/show_bug.cgi?id=142549
2891
2892         Reviewed by Simon Fraser.
2893
2894         * page/ViewportConfiguration.cpp:
2895         (WebCore::ViewportConfiguration::ViewportConfiguration):
2896         Rename m_ignoreScalingConstraints to m_canIgnoreScalingConstraints,
2897         because it being true does not guarantee that we will ignore scaling constraints,
2898         but it being false does guarantee that we won't.
2899
2900         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
2901         Ignore scaling constraints if the page:
2902             a) claimed to want to lay out to device-width and then laid out too wide
2903             b) claimed to want to lay out to device-height and then laid out too tall
2904             c) claimed to want to lay out with initialScale=1 and then laid out too wide
2905
2906         (WebCore::ViewportConfiguration::initialScale):
2907         (WebCore::ViewportConfiguration::minimumScale):
2908         (WebCore::ViewportConfiguration::allowsUserScaling):
2909         Call shouldIgnoreScalingConstraints() instead of looking at the local, so we can
2910         have some more logic here (as above).
2911
2912         (WebCore::ViewportConfiguration::description):
2913         Dump whether we're ignoring scaling constraints.
2914
2915         (WebCore::ViewportConfiguration::dump):
2916         Use WTFLogAlways so that the output goes to various other logging mechanisms
2917         instead of just stderr.
2918
2919         * page/ViewportConfiguration.h:
2920         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
2921         (WebCore::ViewportConfiguration::setIgnoreScalingConstraints): Deleted.
2922
2923 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
2924
2925         Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
2926         https://bugs.webkit.org/show_bug.cgi?id=142569
2927
2928         Reviewed by David Hyatt.
2929
2930         Currently, RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline() return -1 to mean
2931         that its baseline should be skipped. Instead of using this sentinel value, this patch changes the
2932         return type from int to Optional<int>.
2933
2934         No new tests because there is no behavior change.
2935
2936         * rendering/RenderBlock.cpp:
2937         (WebCore::RenderBlock::baselinePosition):
2938         (WebCore::RenderBlock::firstLineBaseline):
2939         (WebCore::RenderBlock::inlineBlockBaseline):
2940         * rendering/RenderBlock.h:
2941         * rendering/RenderBlockFlow.cpp:
2942         (WebCore::RenderBlockFlow::firstLineBaseline):
2943         (WebCore::RenderBlockFlow::inlineBlockBaseline):
2944         * rendering/RenderBlockFlow.h:
2945         * rendering/RenderBox.h:
2946         (WebCore::RenderBox::firstLineBaseline):
2947         (WebCore::RenderBox::inlineBlockBaseline):
2948         * rendering/RenderDeprecatedFlexibleBox.cpp:
2949         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2950         * rendering/RenderFlexibleBox.cpp:
2951         (WebCore::RenderFlexibleBox::baselinePosition):
2952         (WebCore::RenderFlexibleBox::firstLineBaseline):
2953         (WebCore::RenderFlexibleBox::inlineBlockBaseline):
2954         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
2955         * rendering/RenderFlexibleBox.h:
2956         * rendering/RenderMenuList.h:
2957         * rendering/RenderTable.cpp:
2958         (WebCore::RenderTable::cellAbove):
2959         (WebCore::RenderTable::cellBelow):
2960         (WebCore::RenderTable::cellBefore):
2961         (WebCore::RenderTable::cellAfter):
2962         (WebCore::RenderTable::firstLineBlock):
2963         (WebCore::RenderTable::baselinePosition):
2964         (WebCore::RenderTable::inlineBlockBaseline):
2965         (WebCore::RenderTable::firstLineBaseline):
2966         * rendering/RenderTable.h:
2967         * rendering/RenderTableCell.cpp:
2968         (WebCore::RenderTableCell::cellBaselinePosition):
2969         * rendering/RenderTableSection.cpp:
2970         (WebCore::RenderTableSection::firstLineBaseline):
2971         * rendering/RenderTableSection.h:
2972         * rendering/RenderTextControl.h:
2973         * rendering/mathml/RenderMathMLBlock.cpp:
2974         (WebCore::RenderMathMLBlock::baselinePosition):
2975         (WebCore::RenderMathMLTable::firstLineBaseline):
2976         * rendering/mathml/RenderMathMLBlock.h:
2977         * rendering/mathml/RenderMathMLFraction.cpp:
2978         (WebCore::RenderMathMLFraction::firstLineBaseline):
2979         * rendering/mathml/RenderMathMLFraction.h:
2980         * rendering/mathml/RenderMathMLOperator.cpp:
2981         (WebCore::RenderMathMLOperator::firstLineBaseline):
2982         * rendering/mathml/RenderMathMLOperator.h:
2983         * rendering/mathml/RenderMathMLRoot.cpp:
2984         (WebCore::RenderMathMLRoot::firstLineBaseline):
2985         (WebCore::RenderMathMLRoot::layout):
2986         * rendering/mathml/RenderMathMLRoot.h:
2987         * rendering/mathml/RenderMathMLRow.cpp:
2988         (WebCore::RenderMathMLRow::layout):
2989         * rendering/mathml/RenderMathMLScripts.cpp:
2990         (WebCore::RenderMathMLScripts::layout):
2991         (WebCore::RenderMathMLScripts::firstLineBaseline):
2992         * rendering/mathml/RenderMathMLScripts.h:
2993         * rendering/mathml/RenderMathMLSpace.cpp:
2994         (WebCore::RenderMathMLSpace::firstLineBaseline):
2995         * rendering/mathml/RenderMathMLSpace.h:
2996         * rendering/mathml/RenderMathMLUnderOver.cpp:
2997         (WebCore::RenderMathMLUnderOver::firstLineBaseline):
2998         * rendering/mathml/RenderMathMLUnderOver.h:
2999
3000 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
3001
3002         <attachment>s should be created when dropping files onto contentEditable areas
3003         https://bugs.webkit.org/show_bug.cgi?id=142494
3004         <rdar://problem/19982553>
3005
3006         Reviewed by Anders Carlsson.
3007
3008         Covered by existing tests.
3009
3010         * editing/mac/EditorMac.mm:
3011         (WebCore::Editor::WebContentReader::readFilenames):
3012         Instead of inserting the dropped URLs as strings, make an <attachment>
3013         for each.
3014
3015 2015-03-11  David Hyatt  <hyatt@apple.com>
3016
3017         Optimize offsetWidth and offsetHeight to avoid doing layouts.
3018         https://bugs.webkit.org/show_bug.cgi?id=142544
3019
3020         Reviewed by Beth Dakin.
3021
3022         * dom/Document.cpp:
3023         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
3024         * dom/Document.h:
3025         Added a new method that only updates layout if it determines that the desired dimensions are out
3026         of date.
3027
3028         * dom/Element.cpp:
3029         (WebCore::Element::offsetWidth):
3030         (WebCore::Element::offsetHeight):
3031         Patch offsetWidth and offsetHeight to call the new method rather than updateLayoutIgnorePendingStylesheets.
3032
3033 2015-03-11  Commit Queue  <commit-queue@webkit.org>
3034
3035         Unreviewed, rolling out r181367.
3036         https://bugs.webkit.org/show_bug.cgi?id=142581
3037
3038         Caused crashes on the debug bots (Requested by cdumez on
3039         #webkit).
3040
3041         Reverted changeset:
3042
3043         "Web Inspector: CSS parser errors in the console should
3044         include column numbers"
3045         https://bugs.webkit.org/show_bug.cgi?id=114313
3046         http://trac.webkit.org/changeset/181367
3047
3048 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
3049
3050         Inline block children do not have correct baselines if their children are also block elements
3051         https://bugs.webkit.org/show_bug.cgi?id=142559
3052
3053         Reviewed by Darin Adler.
3054
3055         Perform the same computation on child block elements as child inline elements.
3056
3057         Test: fast/text/baseline-inline-block-block-children.html
3058
3059         * rendering/RenderBlockFlow.cpp:
3060         (WebCore::RenderBlockFlow::inlineBlockBaseline):
3061
3062 2015-03-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3063
3064         [CMake][GStreamer] Building EFL or GTK with ENABLE_VIDEO and without ENABLE_WEB_AUDIO is broken.
3065         https://bugs.webkit.org/show_bug.cgi?id=142577
3066
3067         Reviewed by Carlos Garcia Campos.
3068
3069         No new tests, this is a build fix.
3070
3071         * PlatformEfl.cmake: Include GSTREAMER_AUDIO_LIBRARIES on the link step both for ENABLE_VIDEO and ENABLE_WEB_AUDIO.
3072         * PlatformGTK.cmake: Idem.
3073
3074 2015-03-10  Philippe Normand  <pnormand@igalia.com>
3075
3076         Rename MediaStreamCenter to RealtimeMediaSourceCenter
3077         https://bugs.webkit.org/show_bug.cgi?id=142535
3078
3079         Reviewed by Eric Carlson.
3080
3081         As per bug title, rename MediaStreamCenter to
3082         RealtimeMediaSourceCenter, this class manages
3083         RealtimeMediaSources, not MediaStreams. Some un-needed includes of
3084         the header were also removed.
3085
3086 2015-03-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3087
3088         Remove unnecessary create() factory functions
3089         https://bugs.webkit.org/show_bug.cgi?id=142558
3090
3091         Reviewed by Darin Adler.
3092
3093         create() function which just returns new instance can be replaced with std::make_unique<>.
3094
3095         No new tests, no behavior changes.
3096
3097         * bindings/js/JSCryptoKeySerializationJWK.cpp:
3098         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
3099         * crypto/keys/CryptoKeyAES.cpp:
3100         (WebCore::CryptoKeyAES::exportData):
3101         * crypto/keys/CryptoKeyDataOctetSequence.h:
3102         * crypto/keys/CryptoKeyHMAC.cpp:
3103         (WebCore::CryptoKeyHMAC::exportData):
3104         * crypto/keys/CryptoKeySerializationRaw.cpp:
3105         (WebCore::CryptoKeySerializationRaw::keyData):
3106         * platform/audio/mac/CARingBuffer.cpp:
3107         (WebCore::CARingBuffer::create): Deleted.
3108         * platform/audio/mac/CARingBuffer.h:
3109         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3110         (WebCore::AudioSourceProviderAVFObjC::prepare):
3111         * testing/Internals.cpp:
3112         (WebCore::Internals::queueMicroTask):
3113         * testing/MicroTaskTest.cpp:
3114         (WebCore::MicroTaskTest::create): Deleted.
3115         * testing/MicroTaskTest.h:
3116         (WebCore::MicroTaskTest::MicroTaskTest):
3117
3118 2015-03-10  Joseph Pecoraro  <pecoraro@apple.com>
3119
3120         Web Inspector: CSS parser errors in the console should include column numbers
3121         https://bugs.webkit.org/show_bug.cgi?id=114313
3122
3123         Reviewed by Benjamin Poulain.
3124
3125         Test: inspector-protocol/console/warnings-errors.html
3126
3127         * css/CSSParser.h:
3128         (WebCore::CSSParser::currentCharacterOffset):
3129         Get the current character offset depending on the source type.
3130         Add instance variables to track column position and start
3131         line / column for inline stylesheets.
3132
3133         * css/CSSParser.cpp:
3134         (WebCore::CSSParser::CSSParser):
3135         (WebCore::CSSParser::parseSheet):
3136         Initialize new instance variables.
3137
3138         (WebCore::CSSParser::currentLocation):
3139         Update to include column information. Also, if we are on the first line
3140         we may need to take into account a start column offset as well.
3141
3142         (WebCore::CSSParser::realLex):
3143         When bumping the line number, reset the column offset for the next
3144         line with the next character.
3145
3146         (WebCore::CSSParser::syntaxError):
3147         (WebCore::CSSParser::logError):
3148         Include column information.
3149
3150         * css/StyleSheetContents.cpp:
3151         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
3152         (WebCore::StyleSheetContents::parseString):
3153         (WebCore::StyleSheetContents::parseStringAtLineAndColumn):
3154         Include column information.
3155
3156         * css/StyleSheetContents.h:
3157         * dom/InlineStyleSheetOwner.cpp:
3158         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
3159         (WebCore::InlineStyleSheetOwner::createSheet):
3160         Save and use column information later on.
3161
3162         * dom/InlineStyleSheetOwner.h:
3163         * inspector/InspectorStyleSheet.cpp:
3164         (WebCore::InspectorStyleSheet::ensureSourceData):
3165         Updated parser signature needs starting column and no longer has optional parameters.
3166
3167 2015-03-10  Darin Adler  <darin@apple.com>
3168
3169         Try to fix the GTK build.
3170
3171         * html/HTMLVideoElement.idl: Work around gobject bindings generator limitation
3172         by putting in a LANGUAGE_GOBJECT conditional.
3173
3174 2015-03-10  Darin Adler  <darin@apple.com>
3175
3176         Some event handler fixes
3177         https://bugs.webkit.org/show_bug.cgi?id=142474
3178
3179         Reviewed by Anders Carlsson.
3180
3181         * bindings/scripts/CodeGenerator.pm:
3182         (GenerateConditionalStringFromAttributeValue): Improved the algorithm here to
3183         handle combinations of & and | in conditional expressions; that's coming up when
3184         combining conditionals for includes in NavigatorContentUtils.idl.
3185
3186         * bindings/scripts/CodeGeneratorJS.pm:
3187         (AddToImplIncludes): Removed the rudimentary attempt to split and merge
3188         conditionals involving | here; instead we rely on the rules in the
3189         GenerateConditionalStringFromAttributeValue to handle this.
3190         (GenerateImplementation): Passed new "conditional" argument to JSValueToNative.
3191         (GenerateParametersCheck): Pass "conditional" argument to AddToImplIncludes and
3192         JSValueToNative.
3193         (JSValueToNative): Changed to take "conditional" as an argument, since getting
3194         it from the signature won't work for a method parameter.
3195         (WriteData): Merge duplicates based on the result of the
3196         GenerateConditionalStringFromAttributeValue function rather than on the values
3197         passed into that function, since that function converts conditionals into a
3198         canonical form and can make two strings equal that don't start out that way.
3199
3200         * bindings/scripts/CodeGeneratorObjC.pm:
3201         (SkipAttribute): Added code to guarantee we won't make Objective-C bindings
3202         for event handlers. We will rename EventListener to EventHandler in a
3203         subsequent patch.
3204
3205         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated for a progression caused
3206         by the better logic for conditional includes.
3207
3208         * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change to the test below.
3209         * bindings/scripts/test/TestObj.idl: Added test of an event handler attribute.
3210
3211         * dom/Document.idl: Removed unneeded language #if around event handler
3212         attributes. Removed all the commented out event handler attributes.
3213         Sorted event handler attributes into a single section rather than separating
3214         "standard" from "extensions". Sorted the conditional event handler attributes
3215         into paragraphs at the bottom. We will probably make them all unconditional
3216         in a subsequent patch.
3217
3218         * dom/Element.idl: Removed unneeded language #if around event handler
3219         attributes. Removed all the commented out event handler attributes.
3220         Moved event handler attributes here from all derived element classes to
3221         match the approach from the HTML standard. Also resorted the attributes
3222         as in Document above.
3223
3224         * html/HTMLBodyElement.idl: Removed unneeded language #if around event handler
3225         attributes. Removed all the commented out event handler attributes.
3226         Sorted event handler attributes into a single section rather than separating
3227         "standard" from "overrides".
3228
3229         * html/HTMLElement.cpp:
3230         (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
3231         Added a few missing attribute names, and re-sorted a bit. Moved any from
3232         element subclasses here.
3233
3234         * html/HTMLFormElement.cpp:
3235         (WebCore::HTMLFormElement::parseAttribute): Moved code to handle
3236         oncomplete and oncompleteerror to Element and HTMLElement.
3237         * html/HTMLFormElement.idl: Ditto.
3238
3239         * html/HTMLFrameSetElement.idl: Removed #if and resorted as above.
3240
3241         * html/HTMLInputElement.cpp:
3242         (WebCore::HTMLInputElement::parseAttribute): Moved code to handle
3243         onsearch to HTMLElement.
3244
3245         * html/HTMLMediaElement.cpp:
3246         (WebCore::HTMLMediaElement::parseAttribute): Moved code to handle
3247         all the event handler attributes to HTMLElement.
3248         (WebCore::HTMLMediaElement::updateCaptionContainer): Removed a redundant
3249         if statement I noticed while auditing all calls to JSC::call.
3250         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added clearException.
3251         I noticed this was missing because a flawed earlier version of my patch was
3252         causing the script to fail, leaving an exception behind that caused an
3253         assertion later. So I audited all calls to JSC::call looking for this mistake.
3254
3255         * html/HTMLMediaElement.idl: Moved all the event handlers from here to
3256         Element. Also changed everything possible to use Conditional instead of #if.
3257
3258         * html/HTMLPlugInImageElement.cpp:
3259         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Added
3260         clearException. Noticed it was missing while auditing all calls to JSC::call.
3261
3262         * html/HTMLVideoElement.cpp:
3263         (WebCore::HTMLVideoElement::parseAttribute): Moved event handler code to
3264         HTMLElement.
3265
3266         * html/HTMLVideoElement.idl: Moved event handler to Element.idl and use
3267         Conditional instead of #if.
3268
3269         * page/DOMWindow.idl: Use Conditional instead of #if and tidy up the event
3270         handlers section.
3271
3272         * svg/svgattrs.in: Remove six unused attribute names. Presumably used in
3273         some older scheme to implement event handlers but no longer used at all.
3274
3275 2015-03-10  Brent Fulgham  <bfulgham@apple.com>
3276
3277         CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
3278         https://bugs.webkit.org/show_bug.cgi?id=142411
3279
3280         Reviewed by Simon Fraser.
3281
3282         Tested by css3/scroll-snap/scroll-snap-position-values.html.
3283
3284         Revise the CSSParser to recognize that scroll-snap-coordinates and scroll-snap-destination
3285         may be specified as positions, therefore allowing 'top', 'bottom', and 'center' for the Y axis,
3286         and 'left', 'right', and 'center' for the X axis.
3287
3288         Correct implementation to support calculated values for Scroll Snap Point markup. This required the
3289         Scroll Snap Point-specific LengthRepeat class to change its internal representation from a CSSPrimitiveValue
3290         to a regular CSSValue.
3291
3292         Add tests that these position labels, as well as combinations with percentages and pixel offsets
3293         are parsed properly.
3294
3295         * css/CSSComputedStyleDeclaration.cpp:
3296         (WebCore::scrollSnapDestination): Switch from 'percentageOrZoomAdjustedValue' to 'zoomAdjustedPixelValueForLength'
3297         when working with Length values. This is necessary to allow calculated results to be based on the proper default
3298         page dimensions.
3299         (WebCore::scrollSnapPoints): Ditto.
3300         (WebCore::scrollSnapCoordinates): Ditto.
3301         * css/CSSParser.cpp:
3302         (WebCore::CSSParser::parseScrollSnapPositions): Consolidated code for dealing with snap point
3303         positions.
3304         (WebCore::CSSParser::parseScrollSnapDestination): Revise to call new helper function.
3305         (WebCore::CSSParser::parseScrollSnapCoordinate): Ditto.
3306         (WebCore::CSSParser::parseFillPositionX): Rename as parsePositionX.
3307         (WebCore::CSSParser::parseFillPositionY): Rename as parsePositionY.
3308         (WebCore::CSSParser::parseFillProperty): Update to call renamed parsePosition{X|Y} methods.
3309         (WebCore::CSSParser::parseTransformOrigin): Ditto.
3310         (WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
3311         * css/CSSParser.h:
3312         * css/LengthRepeat.h: Revise class to use a CSSValue, rather than a CSSPrimitiveValue, so that we can represent
3313         repeat values as calculations.
3314
3315 2015-03-10  Enrica Casucci  <enrica@apple.com>
3316
3317         Add support for more emoji with variation.
3318         https://bugs.webkit.org/show_bug.cgi?id=142548
3319         rdar://problem/20105008
3320
3321         Reviewed by Tim Horton.
3322
3323         Update ICU rules to support new emoji with variation.
3324
3325         Test: editing/selection/extend-by-character-007.html
3326
3327         * platform/text/TextBreakIterator.cpp:
3328         (WebCore::cursorMovementIterator):
3329
3330 2015-03-10  Alex Christensen  <achristensen@webkit.org>
3331
3332         Use unsigned for HashSet size.
3333         https://bugs.webkit.org/show_bug.cgi?id=142518
3334
3335         Reviewed by Benjamin Poulain.
3336
3337         * Modules/websockets/WebSocketDeflateFramer.cpp:
3338         (WebCore::WebSocketExtensionDeflateFrame::processResponse):
3339         * bindings/js/SerializedScriptValue.cpp:
3340         (WebCore::CloneSerializer::checkForDuplicate):
3341         (WebCore::CloneSerializer::writeConstantPoolIndex):
3342         * dom/ScriptRunner.cpp:
3343         (WebCore::ScriptRunner::~ScriptRunner):
3344         * loader/ResourceLoadScheduler.h:
3345         * platform/graphics/Font.cpp:
3346         (WebCore::Font::systemFallbackFontForCharacter):
3347         * platform/graphics/FontCache.cpp:
3348         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
3349         (WebCore::FontCache::purgeInactiveFontData):
3350         * platform/graphics/FontCache.h:
3351         * platform/graphics/freetype/FontCacheFreeType.cpp:
3352         (WebCore::FontCache::systemFallbackForCharacters):
3353         * platform/graphics/ios/FontCacheIOS.mm:
3354         (WebCore::FontCache::getSystemFontFallbackForCharacters):
3355         (WebCore::FontCache::systemFallbackForCharacters):
3356         (WebCore::FontCache::similarFont):
3357         * platform/graphics/mac/FontCacheMac.mm:
3358         (WebCore::shouldAutoActivateFontIfNeeded):
3359         (WebCore::FontCache::systemFallbackForCharacters):
3360         (WebCore::FontCache::similarFont):
3361         * platform/graphics/win/FontCacheWin.cpp:
3362         (WebCore::FontCache::systemFallbackForCharacters):
3363         * rendering/RenderDeprecatedFlexibleBox.cpp:
3364         (WebCore::FlexBoxIterator::next):
3365         * rendering/RenderTableSection.cpp:
3366         (WebCore::RenderTableSection::computeOverflowFromCells):
3367
3368 2015-03-10  Eric Carlson  <eric.carlson@apple.com>
3369
3370         [Mac] Refactor media controls code
3371         https://bugs.webkit.org/show_bug.cgi?id=142455
3372
3373         Reviewed by Dean Jackson.
3374
3375         No new tests, updated tests/media/hls/video-controls-live-stream-expected.txt.
3376
3377         * Modules/mediacontrols/mediaControlsApple.js:
3378         (Controller):
3379         (Controller.prototype.addVideoListeners):
3380         (Controller.prototype.removeVideoListeners):
3381         (Controller.prototype.createControls):
3382         (Controller.prototype.setControlsType):
3383         (Controller.prototype.configureInlineControls):
3384         (Controller.prototype.updateStatusDisplay):
3385         (Controller.prototype.handlePanelMouseDown):
3386         (Controller.prototype.showControls):
3387         (Controller.prototype.hideControls):
3388         (Controller.prototype.handleOptimizedFullscreenButtonClicked):
3389         (Controller.prototype.currentPlaybackTargetIsWireless):
3390         (Controller.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
3391         (Controller.prototype.updateWirelessPlaybackStatus):
3392         (Controller.prototype.updateWirelessTargetAvailable):
3393         (Controller.prototype.handleWirelessPickerButtonClicked):
3394         (Controller.prototype.handleWirelessPlaybackChange):