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