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