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