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