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