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