abc909c6a8ddd89b82b7e40ec8e94006fa287bae
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
2
3         Users of Heap::deprecatedReportExtraMemory should switch to reportExtraMemoryAllocated+reportExtraMemoryVisited
4         https://bugs.webkit.org/show_bug.cgi?id=142595
5
6         Reviewed by Andreas Kling.
7
8         Fixed this bug for canvas.
9
10         * html/HTMLCanvasElement.cpp:
11         (WebCore::HTMLCanvasElement::memoryCost): Factored out the helper function
12         required by our IDL generator.
13
14         (WebCore::HTMLCanvasElement::createImageBuffer): Use
15         reportExtraMemoryAllocated.
16
17         * html/HTMLCanvasElement.h:
18
19         * html/HTMLCanvasElement.idl: Adopt the IDL for reporting cost in the
20         right way during GC. This will match our reportExtraMemoryAllocated
21         with a reportExtraMemoryVisited during GC.
22
23 2015-03-11  Roger Fong  <roger_fong@apple.com>
24
25         A number of minor edits to the media controls on OSX.
26         https://bugs.webkit.org/show_bug.cgi?id=142551.
27         <rdar://problem/20114707>
28
29         Reviewed by Darin Adler.
30
31         This covers a slew of minor edits to the new media controls. They are as follows.
32         Small vertical placements adjustments to inline control elements.
33         Make sure buttons have no focus outlines.
34         Expand height of mute box that triggers the volume panel appearing.
35         Turn all button colors into an slightly transparent white.
36         Center status display text in fullscreen mode.
37         Lower position of captions container in fullscreen mode.
38         Show the controls on when done loading of the video an status display is hidden.
39
40         * Modules/mediacontrols/mediaControlsApple.css:
41         (audio::-webkit-media-controls-panel):
42         (audio::-webkit-media-controls-panel button:focus):
43         (audio::-webkit-media-controls-rewind-button):
44         (audio::-webkit-media-controls-play-button):
45         (audio::-webkit-media-controls-play-button.paused):
46         (audio::-webkit-media-controls-panel .mute-box):
47         (video::-webkit-media-controls-volume-max-button):
48         (audio::-webkit-media-controls-panel .volume-box):
49         (video::-webkit-media-controls-volume-min-button):
50         (audio::-webkit-media-controls-wireless-playback-picker-button):
51         (audio::-webkit-media-controls-toggle-closed-captions-button):
52         (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before):
53         (audio::-webkit-media-controls-fullscreen-button):
54         (audio::-webkit-media-controls-fullscreen-button.exit):
55         (audio::-webkit-media-controls-status-display):
56         (audio::-webkit-media-controls-time-remaining-display):
57         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
58         (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
59         (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
60         (video:-webkit-full-screen::-webkit-media-controls-play-button):
61         (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
62         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
63         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
64         (video:-webkit-full-screen::-webkit-media-controls-status-display):
65         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
66         (audio::-webkit-media-controls-panel button:active): Deleted.
67         * Modules/mediacontrols/mediaControlsApple.js:
68         (Controller.prototype.setStatusHidden):
69
70 2015-03-11  Commit Queue  <commit-queue@webkit.org>
71
72         Unreviewed, rolling out r179340 and r179344.
73         https://bugs.webkit.org/show_bug.cgi?id=142598
74
75         Caused images to stay alive forever when navigating away from
76         the page before they finish loading. (Requested by kling on
77         #webkit).
78
79         Reverted changesets:
80
81         "CachedImage: ensure clients overrides imageChanged instead of
82         notifyFinished"
83         https://bugs.webkit.org/show_bug.cgi?id=140722
84         http://trac.webkit.org/changeset/179340
85
86         "HTMLImageLoader: fix build failure on assert condition after
87         r179340"
88         https://bugs.webkit.org/show_bug.cgi?id=140722
89         http://trac.webkit.org/changeset/179344
90
91 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
92
93         Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
94         https://bugs.webkit.org/show_bug.cgi?id=142593
95
96         Reviewed by Andreas Kling.
97
98         Adopt deprecatedReportExtraMemory as a short-term fix for runaway
99         memory growth in these cases where we have not adopted
100         reportExtraMemoryVisited.
101
102         Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited.
103         That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595.
104
105         Using IOSDebug, I can see that the canvas stress test @ http://jsfiddle.net/fvyw4ba0/,
106         which used to keep > 1000 1MB NonVolatile GPU allocations live, now keeps about 10 live.
107
108         * Modules/mediasource/SourceBuffer.cpp:
109         (WebCore::SourceBuffer::reportExtraMemoryAllocated):
110         * bindings/js/JSDocumentCustom.cpp:
111         (WebCore::toJS):
112         * bindings/js/JSImageDataCustom.cpp:
113         (WebCore::toJS):
114         * bindings/js/JSNodeListCustom.cpp:
115         (WebCore::createWrapper):
116         * dom/CollectionIndexCache.cpp:
117         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
118         * html/HTMLCanvasElement.cpp:
119         (WebCore::HTMLCanvasElement::createImageBuffer):
120         * html/HTMLImageLoader.cpp:
121         (WebCore::HTMLImageLoader::imageChanged):
122         * html/HTMLMediaElement.cpp:
123         (WebCore::HTMLMediaElement::parseAttribute):
124         * xml/XMLHttpRequest.cpp:
125         (WebCore::XMLHttpRequest::dropProtection):
126
127 2015-03-10  Andy Estes  <aestes@apple.com>
128
129         REGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
130         https://bugs.webkit.org/show_bug.cgi?id=142526
131
132         Reviewed by Darin Adler.
133
134         * loader/DocumentLoader.cpp:
135         (WebCore::DocumentLoader::dataReceived): Don't delete m_contentFilter until after we're done using its replacement data.
136
137 2015-03-10  Sam Weinig  <sam@webkit.org>
138
139         Allow adding a button in input elements for auto fill related functionality
140         <rdar://problem/19782066>
141         https://bugs.webkit.org/show_bug.cgi?id=142564
142
143         Reviewed by Anders Carlsson.
144
145         Test: fast/forms/input-auto-fill-button.html
146
147         - Adds a new button that can be shown in <input> elements - AutoFillButtonElement.
148         - Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
149           where not feasible due to exported API/SPI).
150
151         * CMakeLists.txt:
152         * WebCore.vcxproj/WebCore.vcxproj:
153         * WebCore.vcxproj/WebCore.vcxproj.filters:
154         * WebCore.xcodeproj/project.pbxproj:
155         Add new files.
156
157         * css/html.css:
158         (input::-webkit-auto-fill-button):
159         (input::-webkit-auto-fill-button:hover):
160         (input::-webkit-auto-fill-button:active):
161         Add default style rules for the AutoFill button based on the ones
162         used for caps lock indicator.
163
164         * html/HTMLInputElement.cpp:
165         (WebCore::HTMLInputElement::HTMLInputElement):
166         (WebCore::HTMLInputElement::autoFillButtonElement):
167         (WebCore::HTMLInputElement::reset):
168         (WebCore::HTMLInputElement::setValueFromRenderer):
169         (WebCore::HTMLInputElement::setAutoFilled):
170         (WebCore::HTMLInputElement::setShowAutoFillButton):
171         (WebCore::HTMLInputElement::setAutofilled): Deleted.
172         * html/HTMLInputElement.h:
173         (WebCore::HTMLInputElement::isAutoFilled):
174         (WebCore::HTMLInputElement::showAutoFillButton):
175         (WebCore::HTMLInputElement::isAutofilled): Deleted.
176         Add new bit to represent whether the AutoFill button should be shown
177         or not. By default it is not shown, and the client must enable it.
178
179         * html/InputType.cpp:
180         (WebCore::InputType::updateAutoFillButton):
181         * html/InputType.h:
182         (WebCore::InputType::autoFillButtonElement):
183         Add new virtual methods for updating and accessing the AutoFill button.
184
185         * html/TextFieldInputType.cpp:
186         (WebCore::TextFieldInputType::createShadowSubtree):
187         (WebCore::TextFieldInputType::autoFillButtonElement):
188         (WebCore::TextFieldInputType::destroyShadowSubtree):
189         (WebCore::TextFieldInputType::updatePlaceholderText):
190         (WebCore::TextFieldInputType::shouldDrawAutoFillButton):
191         (WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
192         (WebCore::TextFieldInputType::createContainer):
193         (WebCore::TextFieldInputType::createAutoFillButton):
194         (WebCore::TextFieldInputType::updateAutoFillButton):
195         * html/TextFieldInputType.h:
196         Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
197         is slightly different than for the caps lock indicator, because I didn't want to force
198         the creation of a container for all <input> elements just in case an AutoFill button was
199         added. Instead, if an AutoFill button is added, the container is created on the fly and
200         the existing DOM is updated to move into it. Once a container is created, it is never
201         removed.
202
203         * html/shadow/AutoFillButtonElement.cpp: Added.
204         (WebCore::AutoFillButtonElement::create):
205         (WebCore::AutoFillButtonElement::AutoFillButtonElement):
206         (WebCore::AutoFillButtonElement::defaultEventHandler):
207         * html/shadow/AutoFillButtonElement.h: Added.
208         Add div subclass that swallows the click event and forwards it to the ChromeClient.
209
210         * page/ChromeClient.h:
211         Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
212         button was clicked.
213
214         * testing/Internals.cpp:
215         (WebCore::Internals::setAutofilled):
216         (WebCore::Internals::setShowAutoFillButton):
217         * testing/Internals.h:
218         * testing/Internals.idl:
219         Expose a new internals.setShowAutoFillButton() function to allow testing
220         of the AutoFill button from layout tests.
221
222         * accessibility/AccessibilityObject.cpp:
223         (WebCore::AccessibilityObject::isValueAutofilled):
224         * css/SelectorCheckerTestFunctions.h:
225         (WebCore::isAutofilled):
226         * css/StyleResolver.cpp:
227         (WebCore::StyleResolver::canShareStyleWithControl):
228         Update for new spelling of AutoFill.
229
230 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
231
232         Refactored the JSC::Heap extra cost API for clarity and to make some known bugs more obvious
233         https://bugs.webkit.org/show_bug.cgi?id=142589
234
235         Reviewed by Andreas Kling.
236
237         Updated for renames to JSC extra cost APIs.
238
239         Added FIXMEs to our 10 use cases that are currently wrong, including
240         canvas, which is the cause of https://bugs.webkit.org/show_bug.cgi?id=142457.
241
242         * Modules/mediasource/SourceBuffer.cpp:
243         (WebCore::SourceBuffer::appendBufferInternal):
244         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
245         (WebCore::SourceBuffer::reportExtraMemoryAllocated):
246         (WebCore::SourceBuffer::reportExtraMemoryCost): Deleted.
247         * Modules/mediasource/SourceBuffer.h:
248         * bindings/js/JSDocumentCustom.cpp:
249         (WebCore::toJS):
250         * bindings/js/JSImageDataCustom.cpp:
251         (WebCore::toJS):
252         * bindings/js/JSNodeListCustom.cpp:
253         (WebCore::createWrapper):
254         * bindings/scripts/CodeGeneratorJS.pm:
255         (GenerateImplementation):
256         * dom/CollectionIndexCache.cpp:
257         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
258         (WebCore::reportExtraMemoryCostForCollectionIndexCache): Deleted.
259         * dom/CollectionIndexCache.h:
260         (WebCore::Iterator>::computeNodeCountUpdatingListCache):
261         * html/HTMLCanvasElement.cpp:
262         (WebCore::HTMLCanvasElement::createImageBuffer):
263         * html/HTMLCollection.h:
264         (WebCore::CollectionNamedElementCache::didPopulate):
265         * html/HTMLImageLoader.cpp:
266         (WebCore::HTMLImageLoader::imageChanged):
267         * html/HTMLMediaElement.cpp:
268         (WebCore::HTMLMediaElement::parseAttribute):
269         * xml/XMLHttpRequest.cpp:
270         (WebCore::XMLHttpRequest::dropProtection):
271
272 2015-03-11  Benjamin Poulain  <bpoulain@apple.com>
273
274         Add basic support for BOL and EOL assertions to the URL Filter parser
275         https://bugs.webkit.org/show_bug.cgi?id=142568
276
277         Reviewed by Alex Christensen.
278
279         This patch adds heavily restricted support for BOL and EOL to the URL filter parser.
280
281         Both assertions must be the first/last term of their pattern. Any advanced combination
282         results in a parsing error.
283
284         The BOL assertion is easy to represent: currently, any pattern starts at the beginning
285         of a line and the NFA are generated accordingly.
286
287         I had two options to represent the EOL assertion:
288         1) Add a new special transition on EOL.
289         2) Add a new vector of actions to the states, conditional to the EOL input.
290
291         I picked the first option to avoid growing every state by a vector
292         that would be empty in the vast majority of cases.
293
294
295         On the matching side, the interpreter was modified to support transitions on '\0'.
296         DFABytecodeInstruction::CheckValue now stops when running on a character after
297         the end of the string.
298
299         DFABytecodeInstruction::Jump gets two fixes: First we now account for the index
300         to avoid going past the end of the input. Second, stop on '\0' too... the reason
301         is that the unconditional jump is only used for fallback edges of the DFA, fallback
302         edge are not supposed to accept '\0'.
303
304         * contentextensions/DFA.cpp:
305         (WebCore::ContentExtensions::printTransitions):
306         * contentextensions/DFABytecodeInterpreter.cpp:
307         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
308         * contentextensions/DFANode.h:
309         * contentextensions/NFA.cpp:
310         (WebCore::ContentExtensions::NFA::addTransition):
311         (WebCore::ContentExtensions::NFA::addEpsilonTransition):
312         (WebCore::ContentExtensions::printTransitions):
313         * contentextensions/NFANode.h:
314         * contentextensions/NFAToDFA.cpp:
315         (WebCore::ContentExtensions::populateTransitions):
316         (WebCore::ContentExtensions::NFAToDFA::convert):
317         * contentextensions/URLFilterParser.cpp:
318         (WebCore::ContentExtensions::Term::Term):
319         (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
320         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
321         (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
322         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
323
324 2015-03-11  Jer Noble  <jer.noble@apple.com>
325
326         [Mac] Update fullscreen placeholder UI to use Vibrancy.
327         https://bugs.webkit.org/show_bug.cgi?id=142586
328
329         Reviewed by Eric Carlson.
330
331         Update the fullscreen placeholder with a translucent vibrant appearance
332         using NSVisualEffectView. Since NSVisuaEffectView is only available for
333         OS X 10.10 and above, wrap the new implementation in a version check and
334         retain the old implementation.
335
336         Drive-by: Update the strings for the placeholder view with new HI guidance
337         as well.
338
339         * English.lproj/Localizable.strings:
340         * platform/LocalizedStrings.cpp:
341         (WebCore::clickToExitFullScreenText):
342         * platform/mac/WebCoreFullScreenPlaceholderView.h:
343         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
344         (-[WebCoreFullScreenPlaceholderView setExitWarningVisible:]):
345
346 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
347
348         Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
349         https://bugs.webkit.org/show_bug.cgi?id=142549
350
351         Reviewed by Simon Fraser.
352
353         * page/ViewportConfiguration.cpp:
354         (WebCore::ViewportConfiguration::ViewportConfiguration):
355         Rename m_ignoreScalingConstraints to m_canIgnoreScalingConstraints,
356         because it being true does not guarantee that we will ignore scaling constraints,
357         but it being false does guarantee that we won't.
358
359         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
360         Ignore scaling constraints if the page:
361             a) claimed to want to lay out to device-width and then laid out too wide
362             b) claimed to want to lay out to device-height and then laid out too tall
363             c) claimed to want to lay out with initialScale=1 and then laid out too wide
364
365         (WebCore::ViewportConfiguration::initialScale):
366         (WebCore::ViewportConfiguration::minimumScale):
367         (WebCore::ViewportConfiguration::allowsUserScaling):
368         Call shouldIgnoreScalingConstraints() instead of looking at the local, so we can
369         have some more logic here (as above).
370
371         (WebCore::ViewportConfiguration::description):
372         Dump whether we're ignoring scaling constraints.
373
374         (WebCore::ViewportConfiguration::dump):
375         Use WTFLogAlways so that the output goes to various other logging mechanisms
376         instead of just stderr.
377
378         * page/ViewportConfiguration.h:
379         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
380         (WebCore::ViewportConfiguration::setIgnoreScalingConstraints): Deleted.
381
382 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
383
384         Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
385         https://bugs.webkit.org/show_bug.cgi?id=142569
386
387         Reviewed by David Hyatt.
388
389         Currently, RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline() return -1 to mean
390         that its baseline should be skipped. Instead of using this sentinel value, this patch changes the
391         return type from int to Optional<int>.
392
393         No new tests because there is no behavior change.
394
395         * rendering/RenderBlock.cpp:
396         (WebCore::RenderBlock::baselinePosition):
397         (WebCore::RenderBlock::firstLineBaseline):
398         (WebCore::RenderBlock::inlineBlockBaseline):
399         * rendering/RenderBlock.h:
400         * rendering/RenderBlockFlow.cpp:
401         (WebCore::RenderBlockFlow::firstLineBaseline):
402         (WebCore::RenderBlockFlow::inlineBlockBaseline):
403         * rendering/RenderBlockFlow.h:
404         * rendering/RenderBox.h:
405         (WebCore::RenderBox::firstLineBaseline):
406         (WebCore::RenderBox::inlineBlockBaseline):
407         * rendering/RenderDeprecatedFlexibleBox.cpp:
408         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
409         * rendering/RenderFlexibleBox.cpp:
410         (WebCore::RenderFlexibleBox::baselinePosition):
411         (WebCore::RenderFlexibleBox::firstLineBaseline):
412         (WebCore::RenderFlexibleBox::inlineBlockBaseline):
413         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
414         * rendering/RenderFlexibleBox.h:
415         * rendering/RenderMenuList.h:
416         * rendering/RenderTable.cpp:
417         (WebCore::RenderTable::cellAbove):
418         (WebCore::RenderTable::cellBelow):
419         (WebCore::RenderTable::cellBefore):
420         (WebCore::RenderTable::cellAfter):
421         (WebCore::RenderTable::firstLineBlock):
422         (WebCore::RenderTable::baselinePosition):
423         (WebCore::RenderTable::inlineBlockBaseline):
424         (WebCore::RenderTable::firstLineBaseline):
425         * rendering/RenderTable.h:
426         * rendering/RenderTableCell.cpp:
427         (WebCore::RenderTableCell::cellBaselinePosition):
428         * rendering/RenderTableSection.cpp:
429         (WebCore::RenderTableSection::firstLineBaseline):
430         * rendering/RenderTableSection.h:
431         * rendering/RenderTextControl.h:
432         * rendering/mathml/RenderMathMLBlock.cpp:
433         (WebCore::RenderMathMLBlock::baselinePosition):
434         (WebCore::RenderMathMLTable::firstLineBaseline):
435         * rendering/mathml/RenderMathMLBlock.h:
436         * rendering/mathml/RenderMathMLFraction.cpp:
437         (WebCore::RenderMathMLFraction::firstLineBaseline):
438         * rendering/mathml/RenderMathMLFraction.h:
439         * rendering/mathml/RenderMathMLOperator.cpp:
440         (WebCore::RenderMathMLOperator::firstLineBaseline):
441         * rendering/mathml/RenderMathMLOperator.h:
442         * rendering/mathml/RenderMathMLRoot.cpp:
443         (WebCore::RenderMathMLRoot::firstLineBaseline):
444         (WebCore::RenderMathMLRoot::layout):
445         * rendering/mathml/RenderMathMLRoot.h:
446         * rendering/mathml/RenderMathMLRow.cpp:
447         (WebCore::RenderMathMLRow::layout):
448         * rendering/mathml/RenderMathMLScripts.cpp:
449         (WebCore::RenderMathMLScripts::layout):
450         (WebCore::RenderMathMLScripts::firstLineBaseline):
451         * rendering/mathml/RenderMathMLScripts.h:
452         * rendering/mathml/RenderMathMLSpace.cpp:
453         (WebCore::RenderMathMLSpace::firstLineBaseline):
454         * rendering/mathml/RenderMathMLSpace.h:
455         * rendering/mathml/RenderMathMLUnderOver.cpp:
456         (WebCore::RenderMathMLUnderOver::firstLineBaseline):
457         * rendering/mathml/RenderMathMLUnderOver.h:
458
459 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
460
461         <attachment>s should be created when dropping files onto contentEditable areas
462         https://bugs.webkit.org/show_bug.cgi?id=142494
463         <rdar://problem/19982553>
464
465         Reviewed by Anders Carlsson.
466
467         Covered by existing tests.
468
469         * editing/mac/EditorMac.mm:
470         (WebCore::Editor::WebContentReader::readFilenames):
471         Instead of inserting the dropped URLs as strings, make an <attachment>
472         for each.
473
474 2015-03-11  David Hyatt  <hyatt@apple.com>
475
476         Optimize offsetWidth and offsetHeight to avoid doing layouts.
477         https://bugs.webkit.org/show_bug.cgi?id=142544
478
479         Reviewed by Beth Dakin.
480
481         * dom/Document.cpp:
482         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
483         * dom/Document.h:
484         Added a new method that only updates layout if it determines that the desired dimensions are out
485         of date.
486
487         * dom/Element.cpp:
488         (WebCore::Element::offsetWidth):
489         (WebCore::Element::offsetHeight):
490         Patch offsetWidth and offsetHeight to call the new method rather than updateLayoutIgnorePendingStylesheets.
491
492 2015-03-11  Commit Queue  <commit-queue@webkit.org>
493
494         Unreviewed, rolling out r181367.
495         https://bugs.webkit.org/show_bug.cgi?id=142581
496
497         Caused crashes on the debug bots (Requested by cdumez on
498         #webkit).
499
500         Reverted changeset:
501
502         "Web Inspector: CSS parser errors in the console should
503         include column numbers"
504         https://bugs.webkit.org/show_bug.cgi?id=114313
505         http://trac.webkit.org/changeset/181367
506
507 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
508
509         Inline block children do not have correct baselines if their children are also block elements
510         https://bugs.webkit.org/show_bug.cgi?id=142559
511
512         Reviewed by Darin Adler.
513
514         Perform the same computation on child block elements as child inline elements.
515
516         Test: fast/text/baseline-inline-block-block-children.html
517
518         * rendering/RenderBlockFlow.cpp:
519         (WebCore::RenderBlockFlow::inlineBlockBaseline):
520
521 2015-03-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
522
523         [CMake][GStreamer] Building EFL or GTK with ENABLE_VIDEO and without ENABLE_WEB_AUDIO is broken.
524         https://bugs.webkit.org/show_bug.cgi?id=142577
525
526         Reviewed by Carlos Garcia Campos.
527
528         No new tests, this is a build fix.
529
530         * PlatformEfl.cmake: Include GSTREAMER_AUDIO_LIBRARIES on the link step both for ENABLE_VIDEO and ENABLE_WEB_AUDIO.
531         * PlatformGTK.cmake: Idem.
532
533 2015-03-10  Philippe Normand  <pnormand@igalia.com>
534
535         Rename MediaStreamCenter to RealtimeMediaSourceCenter
536         https://bugs.webkit.org/show_bug.cgi?id=142535
537
538         Reviewed by Eric Carlson.
539
540         As per bug title, rename MediaStreamCenter to
541         RealtimeMediaSourceCenter, this class manages
542         RealtimeMediaSources, not MediaStreams. Some un-needed includes of
543         the header were also removed.
544
545 2015-03-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
546
547         Remove unnecessary create() factory functions
548         https://bugs.webkit.org/show_bug.cgi?id=142558
549
550         Reviewed by Darin Adler.
551
552         create() function which just returns new instance can be replaced with std::make_unique<>.
553
554         No new tests, no behavior changes.
555
556         * bindings/js/JSCryptoKeySerializationJWK.cpp:
557         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
558         * crypto/keys/CryptoKeyAES.cpp:
559         (WebCore::CryptoKeyAES::exportData):
560         * crypto/keys/CryptoKeyDataOctetSequence.h:
561         * crypto/keys/CryptoKeyHMAC.cpp:
562         (WebCore::CryptoKeyHMAC::exportData):
563         * crypto/keys/CryptoKeySerializationRaw.cpp:
564         (WebCore::CryptoKeySerializationRaw::keyData):
565         * platform/audio/mac/CARingBuffer.cpp:
566         (WebCore::CARingBuffer::create): Deleted.
567         * platform/audio/mac/CARingBuffer.h:
568         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
569         (WebCore::AudioSourceProviderAVFObjC::prepare):
570         * testing/Internals.cpp:
571         (WebCore::Internals::queueMicroTask):
572         * testing/MicroTaskTest.cpp:
573         (WebCore::MicroTaskTest::create): Deleted.
574         * testing/MicroTaskTest.h:
575         (WebCore::MicroTaskTest::MicroTaskTest):
576
577 2015-03-10  Joseph Pecoraro  <pecoraro@apple.com>
578
579         Web Inspector: CSS parser errors in the console should include column numbers
580         https://bugs.webkit.org/show_bug.cgi?id=114313
581
582         Reviewed by Benjamin Poulain.
583
584         Test: inspector-protocol/console/warnings-errors.html
585
586         * css/CSSParser.h:
587         (WebCore::CSSParser::currentCharacterOffset):
588         Get the current character offset depending on the source type.
589         Add instance variables to track column position and start
590         line / column for inline stylesheets.
591
592         * css/CSSParser.cpp:
593         (WebCore::CSSParser::CSSParser):
594         (WebCore::CSSParser::parseSheet):
595         Initialize new instance variables.
596
597         (WebCore::CSSParser::currentLocation):
598         Update to include column information. Also, if we are on the first line
599         we may need to take into account a start column offset as well.
600
601         (WebCore::CSSParser::realLex):
602         When bumping the line number, reset the column offset for the next
603         line with the next character.
604
605         (WebCore::CSSParser::syntaxError):
606         (WebCore::CSSParser::logError):
607         Include column information.
608
609         * css/StyleSheetContents.cpp:
610         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
611         (WebCore::StyleSheetContents::parseString):
612         (WebCore::StyleSheetContents::parseStringAtLineAndColumn):
613         Include column information.
614
615         * css/StyleSheetContents.h:
616         * dom/InlineStyleSheetOwner.cpp:
617         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
618         (WebCore::InlineStyleSheetOwner::createSheet):
619         Save and use column information later on.
620
621         * dom/InlineStyleSheetOwner.h:
622         * inspector/InspectorStyleSheet.cpp:
623         (WebCore::InspectorStyleSheet::ensureSourceData):
624         Updated parser signature needs starting column and no longer has optional parameters.
625
626 2015-03-10  Darin Adler  <darin@apple.com>
627
628         Try to fix the GTK build.
629
630         * html/HTMLVideoElement.idl: Work around gobject bindings generator limitation
631         by putting in a LANGUAGE_GOBJECT conditional.
632
633 2015-03-10  Darin Adler  <darin@apple.com>
634
635         Some event handler fixes
636         https://bugs.webkit.org/show_bug.cgi?id=142474
637
638         Reviewed by Anders Carlsson.
639
640         * bindings/scripts/CodeGenerator.pm:
641         (GenerateConditionalStringFromAttributeValue): Improved the algorithm here to
642         handle combinations of & and | in conditional expressions; that's coming up when
643         combining conditionals for includes in NavigatorContentUtils.idl.
644
645         * bindings/scripts/CodeGeneratorJS.pm:
646         (AddToImplIncludes): Removed the rudimentary attempt to split and merge
647         conditionals involving | here; instead we rely on the rules in the
648         GenerateConditionalStringFromAttributeValue to handle this.
649         (GenerateImplementation): Passed new "conditional" argument to JSValueToNative.
650         (GenerateParametersCheck): Pass "conditional" argument to AddToImplIncludes and
651         JSValueToNative.
652         (JSValueToNative): Changed to take "conditional" as an argument, since getting
653         it from the signature won't work for a method parameter.
654         (WriteData): Merge duplicates based on the result of the
655         GenerateConditionalStringFromAttributeValue function rather than on the values
656         passed into that function, since that function converts conditionals into a
657         canonical form and can make two strings equal that don't start out that way.
658
659         * bindings/scripts/CodeGeneratorObjC.pm:
660         (SkipAttribute): Added code to guarantee we won't make Objective-C bindings
661         for event handlers. We will rename EventListener to EventHandler in a
662         subsequent patch.
663
664         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated for a progression caused
665         by the better logic for conditional includes.
666
667         * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change to the test below.
668         * bindings/scripts/test/TestObj.idl: Added test of an event handler attribute.
669
670         * dom/Document.idl: Removed unneeded language #if around event handler
671         attributes. Removed all the commented out event handler attributes.
672         Sorted event handler attributes into a single section rather than separating
673         "standard" from "extensions". Sorted the conditional event handler attributes
674         into paragraphs at the bottom. We will probably make them all unconditional
675         in a subsequent patch.
676
677         * dom/Element.idl: Removed unneeded language #if around event handler
678         attributes. Removed all the commented out event handler attributes.
679         Moved event handler attributes here from all derived element classes to
680         match the approach from the HTML standard. Also resorted the attributes
681         as in Document above.
682
683         * html/HTMLBodyElement.idl: Removed unneeded language #if around event handler
684         attributes. Removed all the commented out event handler attributes.
685         Sorted event handler attributes into a single section rather than separating
686         "standard" from "overrides".
687
688         * html/HTMLElement.cpp:
689         (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
690         Added a few missing attribute names, and re-sorted a bit. Moved any from
691         element subclasses here.
692
693         * html/HTMLFormElement.cpp:
694         (WebCore::HTMLFormElement::parseAttribute): Moved code to handle
695         oncomplete and oncompleteerror to Element and HTMLElement.
696         * html/HTMLFormElement.idl: Ditto.
697
698         * html/HTMLFrameSetElement.idl: Removed #if and resorted as above.
699
700         * html/HTMLInputElement.cpp:
701         (WebCore::HTMLInputElement::parseAttribute): Moved code to handle
702         onsearch to HTMLElement.
703
704         * html/HTMLMediaElement.cpp:
705         (WebCore::HTMLMediaElement::parseAttribute): Moved code to handle
706         all the event handler attributes to HTMLElement.
707         (WebCore::HTMLMediaElement::updateCaptionContainer): Removed a redundant
708         if statement I noticed while auditing all calls to JSC::call.
709         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added clearException.
710         I noticed this was missing because a flawed earlier version of my patch was
711         causing the script to fail, leaving an exception behind that caused an
712         assertion later. So I audited all calls to JSC::call looking for this mistake.
713
714         * html/HTMLMediaElement.idl: Moved all the event handlers from here to
715         Element. Also changed everything possible to use Conditional instead of #if.
716
717         * html/HTMLPlugInImageElement.cpp:
718         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Added
719         clearException. Noticed it was missing while auditing all calls to JSC::call.
720
721         * html/HTMLVideoElement.cpp:
722         (WebCore::HTMLVideoElement::parseAttribute): Moved event handler code to
723         HTMLElement.
724
725         * html/HTMLVideoElement.idl: Moved event handler to Element.idl and use
726         Conditional instead of #if.
727
728         * page/DOMWindow.idl: Use Conditional instead of #if and tidy up the event
729         handlers section.
730
731         * svg/svgattrs.in: Remove six unused attribute names. Presumably used in
732         some older scheme to implement event handlers but no longer used at all.
733
734 2015-03-10  Brent Fulgham  <bfulgham@apple.com>
735
736         CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
737         https://bugs.webkit.org/show_bug.cgi?id=142411
738
739         Reviewed by Simon Fraser.
740
741         Tested by css3/scroll-snap/scroll-snap-position-values.html.
742
743         Revise the CSSParser to recognize that scroll-snap-coordinates and scroll-snap-destination
744         may be specified as positions, therefore allowing 'top', 'bottom', and 'center' for the Y axis,
745         and 'left', 'right', and 'center' for the X axis.
746
747         Correct implementation to support calculated values for Scroll Snap Point markup. This required the
748         Scroll Snap Point-specific LengthRepeat class to change its internal representation from a CSSPrimitiveValue
749         to a regular CSSValue.
750
751         Add tests that these position labels, as well as combinations with percentages and pixel offsets
752         are parsed properly.
753
754         * css/CSSComputedStyleDeclaration.cpp:
755         (WebCore::scrollSnapDestination): Switch from 'percentageOrZoomAdjustedValue' to 'zoomAdjustedPixelValueForLength'
756         when working with Length values. This is necessary to allow calculated results to be based on the proper default
757         page dimensions.
758         (WebCore::scrollSnapPoints): Ditto.
759         (WebCore::scrollSnapCoordinates): Ditto.
760         * css/CSSParser.cpp:
761         (WebCore::CSSParser::parseScrollSnapPositions): Consolidated code for dealing with snap point
762         positions.
763         (WebCore::CSSParser::parseScrollSnapDestination): Revise to call new helper function.
764         (WebCore::CSSParser::parseScrollSnapCoordinate): Ditto.
765         (WebCore::CSSParser::parseFillPositionX): Rename as parsePositionX.
766         (WebCore::CSSParser::parseFillPositionY): Rename as parsePositionY.
767         (WebCore::CSSParser::parseFillProperty): Update to call renamed parsePosition{X|Y} methods.
768         (WebCore::CSSParser::parseTransformOrigin): Ditto.
769         (WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
770         * css/CSSParser.h:
771         * css/LengthRepeat.h: Revise class to use a CSSValue, rather than a CSSPrimitiveValue, so that we can represent
772         repeat values as calculations.
773
774 2015-03-10  Enrica Casucci  <enrica@apple.com>
775
776         Add support for more emoji with variation.
777         https://bugs.webkit.org/show_bug.cgi?id=142548
778         rdar://problem/20105008
779
780         Reviewed by Tim Horton.
781
782         Update ICU rules to support new emoji with variation.
783
784         Test: editing/selection/extend-by-character-007.html
785
786         * platform/text/TextBreakIterator.cpp:
787         (WebCore::cursorMovementIterator):
788
789 2015-03-10  Alex Christensen  <achristensen@webkit.org>
790
791         Use unsigned for HashSet size.
792         https://bugs.webkit.org/show_bug.cgi?id=142518
793
794         Reviewed by Benjamin Poulain.
795
796         * Modules/websockets/WebSocketDeflateFramer.cpp:
797         (WebCore::WebSocketExtensionDeflateFrame::processResponse):
798         * bindings/js/SerializedScriptValue.cpp:
799         (WebCore::CloneSerializer::checkForDuplicate):
800         (WebCore::CloneSerializer::writeConstantPoolIndex):
801         * dom/ScriptRunner.cpp:
802         (WebCore::ScriptRunner::~ScriptRunner):
803         * loader/ResourceLoadScheduler.h:
804         * platform/graphics/Font.cpp:
805         (WebCore::Font::systemFallbackFontForCharacter):
806         * platform/graphics/FontCache.cpp:
807         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
808         (WebCore::FontCache::purgeInactiveFontData):
809         * platform/graphics/FontCache.h:
810         * platform/graphics/freetype/FontCacheFreeType.cpp:
811         (WebCore::FontCache::systemFallbackForCharacters):
812         * platform/graphics/ios/FontCacheIOS.mm:
813         (WebCore::FontCache::getSystemFontFallbackForCharacters):
814         (WebCore::FontCache::systemFallbackForCharacters):
815         (WebCore::FontCache::similarFont):
816         * platform/graphics/mac/FontCacheMac.mm:
817         (WebCore::shouldAutoActivateFontIfNeeded):
818         (WebCore::FontCache::systemFallbackForCharacters):
819         (WebCore::FontCache::similarFont):
820         * platform/graphics/win/FontCacheWin.cpp:
821         (WebCore::FontCache::systemFallbackForCharacters):
822         * rendering/RenderDeprecatedFlexibleBox.cpp:
823         (WebCore::FlexBoxIterator::next):
824         * rendering/RenderTableSection.cpp:
825         (WebCore::RenderTableSection::computeOverflowFromCells):
826
827 2015-03-10  Eric Carlson  <eric.carlson@apple.com>
828
829         [Mac] Refactor media controls code
830         https://bugs.webkit.org/show_bug.cgi?id=142455
831
832         Reviewed by Dean Jackson.
833
834         No new tests, updated tests/media/hls/video-controls-live-stream-expected.txt.
835
836         * Modules/mediacontrols/mediaControlsApple.js:
837         (Controller):
838         (Controller.prototype.addVideoListeners):
839         (Controller.prototype.removeVideoListeners):
840         (Controller.prototype.createControls):
841         (Controller.prototype.setControlsType):
842         (Controller.prototype.configureInlineControls):
843         (Controller.prototype.updateStatusDisplay):
844         (Controller.prototype.handlePanelMouseDown):
845         (Controller.prototype.showControls):
846         (Controller.prototype.hideControls):
847         (Controller.prototype.handleOptimizedFullscreenButtonClicked):
848         (Controller.prototype.currentPlaybackTargetIsWireless):
849         (Controller.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
850         (Controller.prototype.updateWirelessPlaybackStatus):
851         (Controller.prototype.updateWirelessTargetAvailable):
852         (Controller.prototype.handleWirelessPickerButtonClicked):
853         (Controller.prototype.handleWirelessPlaybackChange):
854         (Controller.prototype.handleWirelessTargetAvailableChange):
855         (Controller.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
856         * Modules/mediacontrols/mediaControlsiOS.js:
857         (ControllerIOS):
858         (ControllerIOS.prototype.addVideoListeners):
859         (ControllerIOS.prototype.removeVideoListeners):
860         (ControllerIOS.prototype.createControls):
861         (ControllerIOS.prototype.setControlsType):
862         (ControllerIOS.prototype.configureInlineControls):
863         (ControllerIOS.prototype.showControls):
864         (ControllerIOS.prototype.handleWirelessPickerButtonTouchEnd):
865         (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
866         (ControllerIOS.prototype.updateStatusDisplay):
867         (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
868         (ControllerIOS.prototype.currentPlaybackTargetIsWireless): Deleted.
869         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Deleted.
870         (ControllerIOS.prototype.updateWirelessTargetAvailable): Deleted.
871         (ControllerIOS.prototype.hideControls): Deleted.
872         (ControllerIOS.prototype.handleWirelessPlaybackChange): Deleted.
873         (ControllerIOS.prototype.handleWirelessTargetAvailableChange): Deleted.
874
875 2015-03-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
876
877         Remove PassRefPtr from svg/properties classes.
878         https://bugs.webkit.org/show_bug.cgi?id=142063.
879
880         Reviewed by Darin Adler.
881         
882         Remove PassRefPtr from svg/properties classes. All the return types and
883         the local variables should be RefPtr. If we are sure the pointer can't
884         be null, we use Ref instead.
885
886         * svg/SVGMarkerElement.cpp:
887         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
888         (WebCore::SVGMarkerElement::orientTypeAnimated):
889         * svg/SVGMarkerElement.h:
890         * svg/SVGPathElement.cpp:
891         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
892         (WebCore::SVGPathElement::pathSegList):
893         (WebCore::SVGPathElement::animatedPathSegList):
894         * svg/SVGPathElement.h:
895         * svg/SVGPolyElement.cpp:
896         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
897         (WebCore::SVGPolyElement::points):
898         (WebCore::SVGPolyElement::animatedPoints):
899         * svg/SVGPolyElement.h:
900         * svg/SVGTextContentElement.cpp:
901         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
902         (WebCore::SVGTextContentElement::textLengthAnimated):
903         * svg/SVGTextContentElement.h:
904         * svg/SVGViewSpec.cpp:
905         (WebCore::SVGViewSpec::transform):
906         (WebCore::SVGViewSpec::viewBoxAnimated):
907         (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
908         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
909         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
910         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
911         * svg/SVGViewSpec.h:
912         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
913         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
914         * svg/properties/SVGAnimatedListPropertyTearOff.h:
915         (WebCore::SVGAnimatedListPropertyTearOff::create):
916         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
917         (WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
918         * svg/properties/SVGAnimatedProperty.h:
919         (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
920         * svg/properties/SVGAnimatedPropertyMacros.h:
921         * svg/properties/SVGAnimatedPropertyTearOff.h:
922         (WebCore::SVGAnimatedPropertyTearOff::create):
923         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
924         (WebCore::SVGAnimatedStaticPropertyTearOff::create):
925         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
926         (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
927         * svg/properties/SVGListProperty.h:
928         (WebCore::SVGListProperty::initializeValuesAndWrappers):
929         (WebCore::SVGListProperty::getItemValuesAndWrappers):
930         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
931         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
932         (WebCore::SVGListProperty::removeItemValuesAndWrappers):
933         (WebCore::SVGListProperty::appendItemValuesAndWrappers):
934         * svg/properties/SVGListPropertyTearOff.h:
935         (WebCore::SVGListPropertyTearOff::create):
936         (WebCore::SVGListPropertyTearOff::initialize):
937         (WebCore::SVGListPropertyTearOff::getItem):
938         (WebCore::SVGListPropertyTearOff::insertItemBefore):
939         (WebCore::SVGListPropertyTearOff::replaceItem):
940         (WebCore::SVGListPropertyTearOff::removeItem):
941         (WebCore::SVGListPropertyTearOff::appendItem):
942         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
943         (WebCore::SVGPathSegListPropertyTearOff::getItem):
944         (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
945         (WebCore::SVGPathSegListPropertyTearOff::removeItem):
946         * svg/properties/SVGPathSegListPropertyTearOff.h:
947         (WebCore::SVGPathSegListPropertyTearOff::create):
948         (WebCore::SVGPathSegListPropertyTearOff::initialize):
949         (WebCore::SVGPathSegListPropertyTearOff::insertItemBefore):
950         (WebCore::SVGPathSegListPropertyTearOff::appendItem):
951         * svg/properties/SVGPropertyInfo.h:
952         * svg/properties/SVGStaticListPropertyTearOff.h:
953         (WebCore::SVGStaticListPropertyTearOff::create):
954         * svg/properties/SVGStaticPropertyTearOff.h:
955         (WebCore::SVGStaticPropertyTearOff::create):
956         * svg/properties/SVGTransformListPropertyTearOff.h:
957         (WebCore::SVGTransformListPropertyTearOff::create):
958         (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
959         (WebCore::SVGTransformListPropertyTearOff::consolidate):
960
961 2015-03-10  Timothy Horton  <timothy_horton@apple.com>
962
963         Fix the build
964
965         * platform/network/cf/ResourceHandleCFNet.cpp:
966         (WebCore::ResourceHandle::createCFURLConnection):
967
968 2015-03-10  Benjamin Poulain  <bpoulain@apple.com>
969
970         Extend URL filter's Term definition to support groups/subpatterns
971         https://bugs.webkit.org/show_bug.cgi?id=142519
972
973         Reviewed by Alex Christensen.
974
975         Pretty simple extension: Term is extended to support holding
976         a Vector of Term. The quantifier of the Term applies to its
977         Vector of term as a whole.
978
979         To avoid exposing too much internal in the API of Term, I moved
980         graph generation from GraphBuilder to Term.
981
982         Sinking a CharacterSet works as usual. Sinking a Group is done
983         by sinking each of its Terms one by one and then apply the quantifier
984         on the whole subgraph. This is done by recursively calling into
985         Term::generateGraph().
986
987         Since groups could be nested, the groups make a stack with the latest
988         open group on top.
989         When sinking a floating Term, it is sunk to the latest open group. If there is no open
990         group, we use the prefix tree and sink the whole subpattern to the graph.
991
992         * contentextensions/URLFilterParser.cpp:
993         (WebCore::ContentExtensions::Term::Term):
994         (WebCore::ContentExtensions::Term::extendGroupSubpattern):
995         (WebCore::ContentExtensions::Term::generateGraph):
996         (WebCore::ContentExtensions::Term::operator==):
997         (WebCore::ContentExtensions::Term::hash):
998         (WebCore::ContentExtensions::Term::isUniversalTransition):
999         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1000         (WebCore::ContentExtensions::Term::destroy):
1001         (WebCore::ContentExtensions::Term::Group::operator==):
1002         (WebCore::ContentExtensions::Term::Group::hash):
1003         (WebCore::ContentExtensions::GraphBuilder::finalize):
1004         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
1005         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
1006         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
1007         (WebCore::ContentExtensions::Term::quantifier): Deleted.
1008         (WebCore::ContentExtensions::Term::visitSimpleTransitions): Deleted.
1009         (WebCore::ContentExtensions::GraphBuilder::addTransitions): Deleted.
1010         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm): Deleted.
1011
1012 2015-03-10  Roger Fong  <roger_fong@apple.com>
1013
1014         Adjustments to media control fonts.
1015         https://bugs.webkit.org/show_bug.cgi?id=142509.
1016         <rdar://problem/20085228>
1017
1018         Reviewed by Darin Adler.
1019
1020         Use system font for controls. Adjust surrounding divs accordingly.
1021         Apply subpixel antialiasing to all media control text.
1022         * Modules/mediacontrols/mediaControlsApple.css:
1023         (::-webkit-media-controls):
1024         (audio::-webkit-media-controls-closed-captions-container .list):
1025         (audio::-webkit-media-controls-status-display):
1026         (audio::-webkit-media-controls-time-remaining-display):
1027         (audio::-webkit-media-controls-current-time-display):
1028         (audio::-webkit-media-controls-time-remaining-display.five-digit-time):
1029         (audio::-webkit-media-controls-current-time-display.five-digit-time):
1030         (audio::-webkit-media-controls-time-remaining-display.six-digit-time):
1031         (audio::-webkit-media-controls-current-time-display.six-digit-time):
1032
1033 2015-03-10  Dan Bernstein  <mitz@apple.com>
1034
1035         Fixed a crash in CertificateInfo::containsNonRootSHA1SignedCertificate when loading a non-HTTPS webapge.
1036
1037         Reviewed by Anders Carlsson.
1038
1039         * platform/network/mac/CertificateInfoMac.mm:
1040         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Null-check the certificate chain.
1041
1042 2015-03-10  Dan Bernstein  <mitz@apple.com>
1043
1044         Fixed the build.
1045
1046         * platform/spi/cocoa/SecuritySPI.h:
1047
1048 2015-03-10  Zalan Bujtas  <zalan@apple.com>
1049
1050         Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
1051         https://bugs.webkit.org/show_bug.cgi?id=142344
1052
1053         Reviewed by Antti Koivisto.
1054
1055         This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
1056         the segment looping and position handling logic are no longer duplicated. It also unifies
1057         the static next*() functions' signature.
1058
1059         No change in functionality.
1060
1061         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1062         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
1063         (WebCore::SimpleLineLayout::nextBreakablePosition):
1064         (WebCore::SimpleLineLayout::nextNonWhitespacePosition):
1065         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1066         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition): Deleted.
1067         (WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
1068         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition): Deleted.
1069         * rendering/SimpleLineLayoutTextFragmentIterator.h:
1070
1071 2015-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1072
1073         [GTK] GL_MAX_VARYING_FLOATS is not defined in OpenGL ES 2
1074         https://bugs.webkit.org/show_bug.cgi?id=142529
1075
1076         Reviewed by Žan Doberšek.
1077
1078         Do not use GL_MAX_VARYING_FLOATS when platform is GTK+ and using
1079         OpenGL ES 2.
1080
1081         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1082         (WebCore::GraphicsContext3D::checkVaryingsPacking):
1083
1084 2015-03-10  José Dapena Paz  <jdapena@igalia.com>
1085
1086         Unreviewed. Fix GTK+ build with OpenGL ES 2 enabled.
1087
1088         Remove USE(OPENGL) ifdef from GLContext.cpp, since there's nothing
1089         specific to OpenGL in that file, and everything depending on
1090         configure options is already protected by USE(GLX) and USE(EGL)
1091         ifdefs. This is causing linking issues when building with OpenGL
1092         ES 2, because the header doesn't have the ifdef, and the cpp file
1093         is not compiled leaving all the interface undefined.
1094
1095         Rubber-stamped by Carlos Garcia Campos.
1096
1097         * platform/graphics/GLContext.cpp:
1098
1099 2015-03-10  Carlos Garcia Campos  <cgarcia@igalia.com> and José Dapena Paz  <jdapena@igalia.com>
1100
1101         [GTK] Add a configure option to build with OpenGL ES 2
1102         https://bugs.webkit.org/show_bug.cgi?id=142498
1103
1104         Reviewed by Martin Robinson.
1105
1106         Build GLES or GL specific files depending on the build options.
1107
1108         * PlatformGTK.cmake:
1109
1110 2015-03-10  Zan Dobersek  <zdobersek@igalia.com>
1111
1112         Shrink the CSSPropertyID enum type
1113         https://bugs.webkit.org/show_bug.cgi?id=142456
1114
1115         Reviewed by Sam Weinig.
1116
1117         Specify uint16_t as the base type for the CSSPropertyID enum.
1118         This is enough to cover all of the CSS properties (429 at this moment,
1119         with static_assert covering future changes). It halves the enum type size,
1120         from 4 bytes to 2, reducing the size of various CSSPropertyID containers.
1121
1122         No new tests -- no change in behavior.
1123
1124         * css/CSSPrimitiveValue.cpp:
1125         (WebCore::propertyName): Remove the unnecessary propertyID < 0 check.
1126         * css/makeprop.pl:
1127
1128 2015-03-10  Dan Bernstein  <mitz@apple.com>
1129
1130         WebCore part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
1131         https://bugs.webkit.org/show_bug.cgi?id=142461
1132
1133         Reviewed by Sam Weinig.
1134
1135         * WebCore.xcodeproj/project.pbxproj: Added reference to SecuritySPI.h and sorted the
1136         spi/cocoa group.
1137
1138         * platform/network/cf/CertificateInfo.h: Declared new member function
1139         containsNonRootSHA1SignedCertificate.
1140
1141         * platform/network/mac/CertificateInfoMac.mm:
1142         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Added. Checks if any but
1143         the last certificate in the chain uses SHA-1 as its signature hash algorithm.
1144
1145         * platform/network/curl/CertificateInfo.h:
1146         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Added notImplemented
1147         implementation.
1148
1149         * platform/network/soup/CertificateInfo.h:
1150         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Ditto.
1151
1152         * platform/spi/cocoa/SecuritySPI.h: Added.
1153
1154 2015-03-09  Chris Dumez  <cdumez@apple.com>
1155
1156         [iOS] Sweep all collected objects on critical memory pressure
1157         https://bugs.webkit.org/show_bug.cgi?id=142457
1158         <rdar://problem/20044440>
1159
1160         Reviewed by Geoffrey Garen.
1161
1162         Do a full sweep of objects marked for destruction on critical memory
1163         pressure to free up memory.
1164
1165         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1166         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1167
1168 2015-03-09  Andy Estes  <aestes@apple.com>
1169
1170         [Content Filtering] Give ContentFilter subclasses private constructors, and make them fast-allocated and non-copyable
1171         https://bugs.webkit.org/show_bug.cgi?id=142515
1172
1173         Reviewed by Andreas Kling.
1174
1175         * platform/cocoa/NetworkExtensionContentFilter.h:
1176         * platform/cocoa/ParentalControlsContentFilter.h:
1177         * testing/MockContentFilter.h:
1178
1179 2015-03-09  Chris Dumez  <cdumez@apple.com>
1180
1181         [CG] Have Canvas use the IOSurfacePool
1182         https://bugs.webkit.org/show_bug.cgi?id=142417
1183         <rdar://problem/20044440>
1184
1185         Reviewed by Darin Adler.
1186
1187         Have ImageBufferDataCG use the IOSurfacePool so that Canvas can
1188         benefit from it. I see a ~75% progression on Canvas/reuse.html
1189         performance test on my Macbook Pro with 1000 different canvas
1190         sizes and ~110% progression with 100 different canvas sizes.
1191
1192         I also see a ~65% cache hit rate on the mobile version of
1193         cnn.com.
1194
1195         Note that ImageData calls CGContextClearRect() after calling
1196         IOSurface::create() so recycling IOSurfaces in this case should
1197         be safe.
1198
1199         Performance test: Canvas/reuse.html
1200
1201         * platform/graphics/ImageBuffer.h:
1202         (WebCore::ImageBuffer::baseTransform):
1203         * platform/graphics/cg/ImageBufferCG.cpp:
1204         (WebCore::ImageBuffer::ImageBuffer):
1205         (WebCore::ImageBuffer::context):
1206         (WebCore::ImageBuffer::copyImage):
1207         (WebCore::ImageBuffer::copyNativeImage):
1208         (WebCore::ImageBuffer::draw):
1209         (WebCore::ImageBuffer::clip):
1210         (WebCore::ImageBuffer::putByteArray):
1211         (WebCore::ImageBuffer::toDataURL):
1212         * platform/graphics/cg/ImageBufferDataCG.cpp:
1213         (WebCore::ImageBufferData::~ImageBufferData):
1214         (WebCore::ImageBufferData::getData):
1215         (WebCore::ImageBufferData::putData):
1216         (WebCore::ImageBufferData::ImageBufferData): Deleted.
1217         * platform/graphics/cg/ImageBufferDataCG.h:
1218         * platform/graphics/cocoa/IOSurface.h:
1219         * platform/graphics/cocoa/IOSurface.mm:
1220         (IOSurface::surfaceFromPool):
1221         (IOSurface::create):
1222         (IOSurface::createFromSendRight):
1223         (IOSurface::createFromImage):
1224         (IOSurface::setContextSize):
1225
1226 2015-03-09  Brent Fulgham  <bfulgham@apple.com>
1227
1228         Assertion in ScrollController::processWheelEventForScrollSnapOnAxis when scrolling with mechanical wheel mouse
1229         https://bugs.webkit.org/show_bug.cgi?id=142517
1230
1231         Reviewed by Simon Fraser.
1232
1233         * platform/cocoa/ScrollController.mm:
1234         (WebCore::toWheelEventStatus): Recognize stateless mechanical wheel events.
1235         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): If a mechanical wheel event is processed while
1236         considering scroll snap logic, end any snap animations and clean up.
1237         (WebCore::ScrollController::updateScrollSnapPoints): Don't begin tracking scroll snap state if there is not
1238         scroll snap point defined in the markup.
1239
1240 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
1241
1242         REGRESSION(r176978): Inline-blocks with overflowing contents have ascents that are too large
1243         https://bugs.webkit.org/show_bug.cgi?id=141783
1244
1245         Reviewed by David Hyatt.
1246
1247         When we have an inline-block element, and we want to find its baseline (to lay out other
1248         elements on the same line) we loop through the element's children and ask them what their
1249         baselines are. The children use the location of the top of their last line to compute this
1250         value. However, if the child has overflow-y, this might not be the correct calculation.
1251
1252         This behavior is in the spec: "The baseline of an 'inline-block' is the baseline of its last
1253         line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow'
1254         property has a computed value other than 'visible', in which case the baseline is the bottom
1255         margin edge."
1256             -- http://www.w3.org/TR/CSS21/visudet.html#leading
1257
1258         However, we believe that a better policy is, when overflow is not "visible," to place the
1259         baseline at the bottom of the block if the contents overflowed in the Y direction, and to place
1260         it at the bottom of the last line if the contents did not overflow in the Y direction. This is
1261         partially consistent with previous behavior, and isn't too far from the spec to cause too many
1262         breakages.
1263
1264         Test: fast/css/inline-block-tricky-baselines.html
1265               fast/text/baseline-inline-block.html
1266
1267         * rendering/RenderBlockFlow.cpp:
1268         (WebCore::RenderBlockFlow::inlineBlockBaseline):
1269
1270 2015-03-09  Andy Estes  <aestes@apple.com>
1271
1272         [Content Filtering] Add tests
1273         https://bugs.webkit.org/show_bug.cgi?id=142475
1274
1275         Reviewed by Andreas Kling.
1276
1277         Added a mock content filter that can be configured by window.internals. A test can control whether the filter
1278         is enabled, what to display when a page is blocked, at what point the allow/block decision is made, and what
1279         decision to make.
1280
1281         Added tests to cover allowing and blocking content at each decision point.
1282
1283         Tests: contentfiltering/allow-after-add-data.html
1284                contentfiltering/allow-after-finished-adding-data.html
1285                contentfiltering/allow-after-response.html
1286                contentfiltering/block-after-add-data.html
1287                contentfiltering/block-after-finished-adding-data.html
1288                contentfiltering/block-after-response.html
1289
1290         * DerivedSources.make: Added MockContentFilterSettings.idl.
1291         * WebCore.xcodeproj/project.pbxproj:
1292         * bindings/js/JSMockContentFilterSettingsCustom.cpp: Added.
1293         (WebCore::JSMockContentFilterSettings::decisionPoint): Returned the decision point's JSValue.
1294         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Set the decision point; threw an exception for invalid values.
1295         (WebCore::JSMockContentFilterSettings::decision): Returned the decision's JSValue.
1296         (WebCore::JSMockContentFilterSettings::setDecision): Set the decision; threw an exception for invalid values.
1297         * platform/ContentFilter.cpp:
1298         (WebCore::ContentFilter::types): Renamed from contentFilterTypes.
1299         (WebCore::ContentFilter::createIfNeeded):
1300         (WebCore::contentFilterType): Deleted.
1301         (WebCore::contentFilterTypes): Deleted.
1302         * platform/ContentFilter.h:
1303         (WebCore::ContentFilter::addType): Used to register a new content filter type.
1304         (WebCore::ContentFilter::type): Renamed from contentFilterType.
1305         * platform/cocoa/NetworkExtensionContentFilter.h: Moved definition of HAVE_NE_FILTER_SOURCE to here.
1306         * testing/Internals.cpp:
1307         (WebCore::Internals::resetToConsistentState): Called MockContentFilterSettings::reset().
1308         (WebCore::Internals::Internals): Called MockContentFilter::ensureInstalled().
1309         (WebCore::Internals::mockContentFilterSettings): Returned a reference to MockContentFilterSettings::singleton().
1310         * testing/Internals.h:
1311         * testing/Internals.idl: Added attribute mockContentFilterSettings.
1312         * testing/MockContentFilter.cpp: Added.
1313         (WebCore::MockContentFilter::ensureInstalled): Called MockContentFilter::addType().
1314         (WebCore::MockContentFilter::canHandleResponse): Returned whether MockContentFilterSettings is enabled.
1315         (WebCore::MockContentFilter::create): Returned a new MockContentFilter.
1316         (WebCore::MockContentFilter::MockContentFilter): Called maybeDetermineStatus().
1317         (WebCore::MockContentFilter::addData): Copied data into m_replacementData and called maybeDetermineStatus().
1318         (WebCore::MockContentFilter::finishedAddingData): Called maybeDetermineStatus().
1319         (WebCore::MockContentFilter::needsMoreData): Returned whether m_status equals NeedsMoreData.
1320         (WebCore::MockContentFilter::didBlockData): Returned whether m_status equals Blocked.
1321         (WebCore::MockContentFilter::getReplacementData): Returned a pointer to the start of m_replacementData.
1322         (WebCore::MockContentFilter::unblockHandler): Returned an empty ContentFilterUnblockHandler.
1323         (WebCore::MockContentFilter::maybeDetermineStatus): If m_status is NeedsMoreData and the current decision point
1324         equals MockContentFilterSettings's decision point, set m_status according to MockContentFilterSettings's
1325         decision. If m_status becomes Blocked, clear the original page data from m_replacementData and copy
1326         MockContentFilterSettings's blocked string instead.
1327         * testing/MockContentFilter.h: Copied from Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h.
1328         * testing/MockContentFilterSettings.cpp: Copied from Source/WebCore/platform/ContentFilter.h.
1329         (WebCore::MockContentFilterSettings::singleton):
1330         (WebCore::MockContentFilterSettings::reset): Reset settings to their initial values.
1331         (WebCore::MockContentFilterSettings::MockContentFilterSettings):
1332         * testing/MockContentFilterSettings.h: Copied from Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h.
1333         (WebCore::MockContentFilterSettings::ref): Added an empty implementation to make the bindings think this is RefCounted.
1334         (WebCore::MockContentFilterSettings::deref): Ditto.
1335         (WebCore::MockContentFilterSettings::enabled):
1336         (WebCore::MockContentFilterSettings::setEnabled):
1337         (WebCore::MockContentFilterSettings::blockedString):
1338         (WebCore::MockContentFilterSettings::setBlockedString):
1339         (WebCore::MockContentFilterSettings::decisionPoint):
1340         (WebCore::MockContentFilterSettings::setDecisionPoint):
1341         (WebCore::MockContentFilterSettings::decision):
1342         (WebCore::MockContentFilterSettings::setDecision):
1343         * testing/MockContentFilterSettings.idl: Copied from Source/WebCore/platform/ContentFilter.h.
1344
1345 2015-03-09  Zalan Bujtas  <zalan@apple.com>
1346
1347         Simple line layout should not be limited to RenderText.
1348         https://bugs.webkit.org/show_bug.cgi?id=142504
1349
1350         Reviewed by Antti Koivisto.
1351
1352         This is in transition to support br element.
1353
1354         No change in functionality.
1355
1356         * rendering/RenderText.cpp:
1357         (WebCore::RenderText::absoluteRects):
1358         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
1359         (WebCore::RenderText::absoluteQuads):
1360         (WebCore::RenderText::firstRunLocation):
1361         (WebCore::RenderText::linesBoundingBox):
1362         (WebCore::RenderText::caretMinOffset):
1363         (WebCore::RenderText::caretMaxOffset):
1364         (WebCore::RenderText::containsCaretOffset):
1365         * rendering/SimpleLineLayoutFlowContents.cpp:
1366         (WebCore::SimpleLineLayout::FlowContents::segmentForRenderer):
1367         * rendering/SimpleLineLayoutFlowContents.h:
1368         * rendering/SimpleLineLayoutFunctions.cpp:
1369         (WebCore::SimpleLineLayout::computeBoundingBox):
1370         (WebCore::SimpleLineLayout::computeFirstRunLocation):
1371         (WebCore::SimpleLineLayout::collectAbsoluteRects):
1372         (WebCore::SimpleLineLayout::collectAbsoluteQuads):
1373         (WebCore::SimpleLineLayout::computeTextBoundingBox): Deleted.
1374         (WebCore::SimpleLineLayout::computeTextFirstRunLocation): Deleted.
1375         (WebCore::SimpleLineLayout::collectTextAbsoluteRects): Deleted.
1376         (WebCore::SimpleLineLayout::collectTextAbsoluteQuads): Deleted.
1377         * rendering/SimpleLineLayoutFunctions.h:
1378         (WebCore::SimpleLineLayout::findCaretMinimumOffset):
1379         (WebCore::SimpleLineLayout::findCaretMaximumOffset):
1380         (WebCore::SimpleLineLayout::containsCaretOffset):
1381         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset): Deleted.
1382         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset): Deleted.
1383         (WebCore::SimpleLineLayout::containsTextCaretOffset): Deleted.
1384         * rendering/SimpleLineLayoutResolver.cpp:
1385         (WebCore::SimpleLineLayout::RunResolver::Run::text):
1386         (WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
1387         * rendering/SimpleLineLayoutResolver.h:
1388         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1389         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
1390
1391 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
1392
1393         svg/custom/svg-fonts-without-missing-glyph.xhtml fails after fonts/font-fallback-prefers-pictographs.html
1394         https://bugs.webkit.org/show_bug.cgi?id=142470
1395
1396         Reviewed by Anders Carlsson.
1397
1398         After each test, reset all internal settings.
1399
1400         Covered by svg/custom/svg-fonts-without-missing-glyph.xhtml
1401
1402         * testing/InternalSettings.cpp:
1403         (WebCore::InternalSettings::Backup::Backup):
1404         (WebCore::InternalSettings::Backup::restoreTo):
1405         * testing/InternalSettings.h:
1406
1407 2015-03-09  Commit Queue  <commit-queue@webkit.org>
1408
1409         Unreviewed, rolling out r181268.
1410         https://bugs.webkit.org/show_bug.cgi?id=142508
1411
1412         Broke tests (Requested by ap on #webkit).
1413
1414         Reverted changeset:
1415
1416         "Simple line layout: Merge
1417         TextFragmentIterator::findNextBreakablePosition() and
1418         TextFragmentIterator::findNextNonWhitespacePosition()."
1419         https://bugs.webkit.org/show_bug.cgi?id=142344
1420         http://trac.webkit.org/changeset/181268
1421
1422 2015-03-09  Benjamin Poulain  <benjamin@webkit.org>
1423
1424         CSS JIT: add aliases between :nth-child()/:nth-last-child() and :first-child/:last-child
1425         https://bugs.webkit.org/show_bug.cgi?id=142472
1426
1427         Reviewed by Andreas Kling.
1428
1429         The pseudo class :first-child has weaker tree marking than :nth-child(1).
1430         This patch aliases :nth-child(1) to :first-child in the CSS JIT to take
1431         advantage of that.
1432
1433         The strength of :last-child and :nth-last-child(1) are pretty much identical
1434         but :last-child is a bit simpler so I changed it too. It is also easier
1435         to handle both the same.
1436
1437         Tests: fast/selectors/nth-child-matching-first-on-root.html
1438                fast/selectors/nth-child-matching-first.html
1439                fast/selectors/nth-last-child-matching-first-on-root.html
1440                fast/selectors/nth-last-child-matching-first.html
1441
1442         * cssjit/SelectorCompiler.cpp:
1443         (WebCore::SelectorCompiler::addNthChildType):
1444         (WebCore::SelectorCompiler::addPseudoClassType):
1445
1446 2015-03-09  Benjamin Poulain  <bpoulain@apple.com>
1447
1448         Merge TrivialAtom and CharacterSet into a Term abstraction, prepare Term for composition
1449         https://bugs.webkit.org/show_bug.cgi?id=142429
1450
1451         Reviewed by Darin Adler.
1452
1453         This patch merges CharacterSet and Trivial atom into a new class: Term. A Term is
1454         a combination of an Atom and one Quantifier.
1455
1456         With term being the basic block, we can use the PrefixTree for any construct,
1457         greatly reducing the size of the NFA graph.
1458
1459         Term is built on top of an union holding the Atom storage. This is done in preparation
1460         for more complicated Atoms like a disjunction.
1461
1462         Everything else is pretty much the same. BuildMode is gone since we use the prefix
1463         tree for everything. FloatingAtomType is gone, a TrivialAtom is now represented
1464         by a single character CharacterSet (or two for case insensitive).
1465
1466         * contentextensions/ContentExtensionParser.cpp:
1467         (WebCore::ContentExtensions::parseRuleList):
1468         * contentextensions/NFA.cpp:
1469         (WebCore::ContentExtensions::NFA::addRuleId):
1470         * contentextensions/URLFilterParser.cpp:
1471         (WebCore::ContentExtensions::Term::Term):
1472         (WebCore::ContentExtensions::Term::~Term):
1473         (WebCore::ContentExtensions::Term::isValid):
1474         (WebCore::ContentExtensions::Term::addCharacter):
1475         (WebCore::ContentExtensions::Term::quantify):
1476         (WebCore::ContentExtensions::Term::quantifier):
1477         (WebCore::ContentExtensions::Term::isUniversalTransition):
1478         (WebCore::ContentExtensions::Term::visitSimpleTransitions):
1479         (WebCore::ContentExtensions::Term::operator=):
1480         (WebCore::ContentExtensions::Term::operator==):
1481         (WebCore::ContentExtensions::Term::hash):
1482         (WebCore::ContentExtensions::Term::isEmptyValue):
1483         (WebCore::ContentExtensions::Term::isDeletedValue):
1484         (WebCore::ContentExtensions::Term::destroy):
1485         (WebCore::ContentExtensions::Term::CharacterSet::operator==):
1486         (WebCore::ContentExtensions::Term::CharacterSet::hash):
1487         (WebCore::ContentExtensions::TermHash::hash):
1488         (WebCore::ContentExtensions::TermHash::equal):
1489         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
1490         (WebCore::ContentExtensions::GraphBuilder::finalize):
1491         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
1492         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
1493         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
1494         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
1495         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
1496         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
1497         (WebCore::ContentExtensions::GraphBuilder::addTransitions):
1498         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm):
1499         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
1500         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
1501         (WebCore::ContentExtensions::URLFilterParser::~URLFilterParser):
1502         (WebCore::ContentExtensions::URLFilterParser::addPattern):
1503         (WebCore::ContentExtensions::trivialAtomFromASCIICharacter): Deleted.
1504         (WebCore::ContentExtensions::quantifyTrivialAtom): Deleted.
1505         (WebCore::ContentExtensions::trivialAtomQuantifier): Deleted.
1506         (WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin): Deleted.
1507         (WebCore::ContentExtensions::GraphBuilder::sinkAtom): Deleted.
1508         (WebCore::ContentExtensions::GraphBuilder::generateTransition): Deleted.
1509         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom): Deleted.
1510         (WebCore::ContentExtensions::GraphBuilder::sinkCharacterSet): Deleted.
1511         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary): Deleted.
1512         * contentextensions/URLFilterParser.h:
1513
1514 2015-03-09  Csaba Osztrogonác  <ossy@webkit.org>
1515
1516         Fix the !ENABLE(WEBGL) build after r180609
1517         https://bugs.webkit.org/show_bug.cgi?id=142057
1518
1519         Reviewed by Darin Adler.
1520
1521         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1522         (WebCore::GraphicsContext3D::forceContextLost):
1523
1524 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
1525
1526         Work around a Cocoa font parsing bug
1527         https://bugs.webkit.org/show_bug.cgi?id=142446
1528         <rdar://problem/20086223>
1529
1530         Reviewed by Simon Fraser.
1531
1532         Work around a bug in Cocoa regarding font parsing.
1533
1534         * svg/SVGToOTFFontConversion.cpp:
1535
1536 2015-03-09  Csaba Osztrogonác  <ossy@webkit.org>
1537
1538         Fix the build after r181153
1539         https://bugs.webkit.org/show_bug.cgi?id=142497
1540
1541         Reviewed by Philippe Normand.
1542
1543         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1544         (WebCore::MediaPlayerPrivateGStreamer::load):
1545
1546 2015-03-09  Roger Fong  <roger_fong@apple.com>
1547
1548         Only call showControls if controls are hidden.
1549         https://bugs.webkit.org/show_bug.cgi?id=142496.
1550         <rdar://problem/20083732>
1551
1552         Reviewed by Dean Jackson.
1553
1554         * Modules/mediacontrols/mediaControlsApple.js:
1555         (Controller.prototype.handleWrapperMouseMove):
1556         (Controller.prototype.controlsAreHidden):
1557         Controls are hidden if the ‘show’ class name is not present,
1558         not if the ‘hidden’ class name is.
1559
1560 2015-03-09  Roger Fong  <roger_fong@apple.com>
1561
1562         Unreviewed. Re-add CSS property that was unintentionally removed in r180893
1563         <rdar://problem/20083715>
1564
1565         * Modules/mediacontrols/mediaControlsApple.css:
1566         (audio::-webkit-media-controls-panel):
1567
1568 2015-03-09  Zalan Bujtas  <zalan@apple.com>
1569
1570         Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
1571         https://bugs.webkit.org/show_bug.cgi?id=142344
1572
1573         Reviewed by Antti Koivisto.
1574
1575         This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
1576         the segment looping and position handling logic are no longer duplicated. It also unifies
1577         the static next*() functions' signature.
1578
1579         No change in functionality.
1580
1581         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1582         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
1583         (WebCore::SimpleLineLayout::nextBreakablePosition):
1584         (WebCore::SimpleLineLayout::nextNonWhitespacePosition):
1585         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
1586         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition): Deleted.
1587         (WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
1588         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition): Deleted.
1589         * rendering/SimpleLineLayoutTextFragmentIterator.h:
1590
1591 2015-03-09  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1592
1593         ReadableStreamJSSource should use JSC::Strong UnspecifiedBoolType operator
1594         https://bugs.webkit.org/show_bug.cgi?id=142397
1595
1596         Reviewed by Benjamin Poulain.
1597
1598         No behavior change. Current tests cover the changes.
1599
1600         * bindings/js/ReadableStreamJSSource.cpp:
1601         * bindings/js/ReadableStreamJSSource.h:
1602
1603 2015-03-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1604
1605         ReadableStream does not not need to pass itself as callback parameter
1606         https://bugs.webkit.org/show_bug.cgi?id=142399
1607
1608         Reviewed by Darin Adler.
1609
1610         No change in behavior.
1611
1612         * Modules/streams/ReadableStream.h: Remove ReadableStream parameter from SuccessCallback definition.
1613         * bindings/js/JSReadableStreamCustom.cpp:
1614         (WebCore::JSReadableStream::ready): Capture JSReadableStream instance instead.
1615         (WebCore::JSReadableStream::closed): Capture JSReadableStream instance instead.
1616
1617 2015-03-08  Dean Jackson  <dino@apple.com>
1618
1619         [iOS Media] Video buffer progress missing on iPhones
1620         https://bugs.webkit.org/show_bug.cgi?id=142462
1621
1622         Reviewed by Eric Carlson.
1623
1624         The fullscreen controller on the iPhone idiom was using
1625         the media duration as its maximum loaded time, meaning the
1626         download progress was missing (it looked like everything
1627         was already downloaded). The fix is to calculate
1628         what the maximum buffered time is from the HTMLMediaElement,
1629         and send that to the fullscreen controller.
1630
1631         * Modules/mediacontrols/mediaControlsiOS.js:
1632         (ControllerIOS.prototype.drawTimelineBackground): While implementing
1633         the native function I noticed that the JS controls forgot that
1634         the buffered time ranges are ordered, and thus they don't need
1635         to search through the array. The last range will be the highest.
1636
1637         * html/HTMLMediaElement.cpp:
1638         (WebCore::HTMLMediaElement::maxBufferedTime): New helper function
1639         to calculate the highest buffered time in the media source.
1640         * html/HTMLMediaElement.h:
1641
1642         * platform/ios/WebVideoFullscreenInterface.h: New setBufferedTime method.
1643         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1644
1645         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1646         (WebVideoFullscreenInterfaceAVKit::setDuration): No longer set
1647         the loadedTimeRanges.
1648         (WebVideoFullscreenInterfaceAVKit::setBufferedTime): Calculate a normalized
1649         value of the maximum loaded/buffered time, and tell the platform controller
1650         to show that range.
1651
1652         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
1653         (WebVideoFullscreenModelVideoElement::updateForEventName): Send the maximum
1654         buffered time.
1655
1656 2015-03-08  Chris Dumez  <cdumez@apple.com>
1657
1658         Crash in WebCore::NotificationCenter::stop()
1659         https://bugs.webkit.org/show_bug.cgi?id=142444
1660         <rdar://problem/20082520>
1661
1662         Reviewed by Darin Adler.
1663
1664         Rework the patch in r181219 so that we do not need a Ref<NotificationCenter> protector
1665         in NotificationCenter::stop(). Instead, we put the client in a local variable and null
1666         out m_client *before* calling NotificationClient::clearNotifications().
1667
1668         No new tests, already covered by:
1669         http/tests/notifications/event-listener-crash.html
1670
1671         * Modules/notifications/NotificationCenter.cpp:
1672         (WebCore::NotificationCenter::stop):
1673
1674 2015-03-08  Simon Fraser  <simon.fraser@apple.com>
1675
1676         Don't call RenderLayerCompositor::needsToBeComposited() so many times
1677         https://bugs.webkit.org/show_bug.cgi?id=142441
1678
1679         Reviewed by Brent Fulgham.
1680
1681         Save one call to needsToBeComposited() per RenderLayer while rebuilding compositing
1682         layers, and a call to isRunningAcceleratedTransformAnimation() in some cases.
1683         
1684         computeCompositingRequirements() already knows if the layer will be composited, so
1685         pass that to updateBacking() in the form of a "yes/no/don't" know enum. However,
1686         since updateBacking() no longer calls needsToBeComposited(), we need to call 
1687         requiresCompositingForPosition() to get the viewportConstrainedNotCompositedReason flags.
1688         
1689         isRunningAcceleratedTransformAnimation() will only be true for a layer which has a
1690         direct compositing reason, so only call isRunningAcceleratedTransformAnimation()
1691         in that case.
1692         
1693         * rendering/RenderLayerCompositor.cpp:
1694         (WebCore::rendererForCompositingTests):
1695         (WebCore::RenderLayerCompositor::updateBacking):
1696         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1697         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Use references.
1698         (WebCore::RenderLayerCompositor::reasonsForCompositing): Use references.
1699         * rendering/RenderLayerCompositor.h:
1700
1701 2015-03-08  Simon Fraser  <simon.fraser@apple.com>
1702
1703         In RenderLayerCompositor, track layer bounds and the haveComputedBounds flag together in a struct
1704         https://bugs.webkit.org/show_bug.cgi?id=142449
1705
1706         Reviewed by Brent Fulgham.
1707         
1708         Rather than tracking 'layerBounds' and 'haveComputedBounds' separately, group them together
1709         in an OverlapExtent struct and add a function to compute the bounds, which removes
1710         a copy of this code. OverlapExtent will be extended in a future patch.
1711
1712         No behavior change.
1713
1714         * rendering/RenderLayerCompositor.cpp:
1715         (WebCore::RenderLayerCompositor::OverlapMap::geometryMap): Allow const access to
1716         the geometryMap, used by computeExtent().
1717         (WebCore::RenderLayerCompositor::computeExtent):
1718         (WebCore::RenderLayerCompositor::addToOverlapMap):
1719         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1720         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1721         * rendering/RenderLayerCompositor.h:
1722
1723 2015-03-07  Chris Dumez  <cdumez@apple.com>
1724
1725         Crash in WebCore::NotificationCenter::stop()
1726         https://bugs.webkit.org/show_bug.cgi?id=142444
1727         <rdar://problem/20082520>
1728
1729         Reviewed by Andreas Kling.
1730
1731         A use-after-free would sometimes cause us to crash in NotificationCenter::stop().
1732         After investigation, it turns out that NotificationCenter::stop() calls
1733         NotificationClient::clearNotifications() which will destroy the Notification
1734         objects, all of which hold a strong reference to the NotificationCenter. If at
1735         this point, only Notifications are ref'ing the NotificationCenter, this means
1736         that the NotificationCenter will get destroyed right after the call to
1737         NotificationClient::clearNotifications(). However, we reset m_client to null
1738         after calling clearNotifications() and it causes us to crash in this case.
1739
1740         The issue is addressed by adding a Ref<NotificationCenter> protector in
1741         NotificationCenter::stop() so that we make sure the NotificationCenter lives
1742         at least until the end of the method execution.
1743
1744         I was able to consistently reproduce the crash by doing:
1745         Tools/Scripts/run-webkit-tests -1 --debug --repeat-each=30 -g http/tests/notifications/event-listener-crash.html
1746
1747         No new tests, already covered by:
1748         http/tests/notifications/event-listener-crash.html
1749
1750         * Modules/notifications/NotificationCenter.cpp:
1751         (WebCore::NotificationCenter::stop):
1752
1753 2015-03-07  Simon Fraser  <simon.fraser@apple.com>
1754
1755         Tidy up RenderLayerCompositor's CompositingState
1756         https://bugs.webkit.org/show_bug.cgi?id=142445
1757
1758         Reviewed by Dan Bernstein.
1759         
1760         Make CompositingState a private struct in RenderLayerCompositor.
1761         Since it's a struct, remove the m_ prefix from its data members.
1762
1763         No behavior change.
1764
1765         * rendering/RenderLayerCompositor.cpp:
1766         (WebCore::RenderLayerCompositor::CompositingState::CompositingState):
1767         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1768         (WebCore::CompositingState::CompositingState): Deleted.
1769         * rendering/RenderLayerCompositor.h:
1770
1771 2015-03-07  Darin Adler  <darin@apple.com>
1772
1773         Unindent EventTarget, EventListener, JSEventLister.h files
1774         https://bugs.webkit.org/show_bug.cgi?id=142440
1775
1776         Reviewed by Alexey Proskuryakov.
1777
1778         * bindings/js/JSEventListener.h:
1779         * dom/EventListener.h:
1780         * dom/EventTarget.h:
1781         Change indentation to match coding style rules.
1782
1783 2015-03-07  Geoffrey Garen  <ggaren@apple.com>
1784
1785         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
1786         https://bugs.webkit.org/show_bug.cgi?id=140900
1787
1788         Reviewed by Mark Hahnenberg.
1789
1790         Re-landing just the removal of BlockAllocator, which is now unused.
1791
1792         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1793         (WebCore::MemoryPressureHandler::install):
1794
1795 2015-03-07  Commit Queue  <commit-queue@webkit.org>
1796
1797         Unreviewed, rolling out r181010.
1798         https://bugs.webkit.org/show_bug.cgi?id=142442
1799
1800         Broke media/video-src-invalid-poster.html (Requested by kling
1801         on #webkit).
1802
1803         Reverted changeset:
1804
1805         "Stale entries in WeakGCMaps are keeping tons of WeakBlocks
1806         alive unnecessarily."
1807         https://bugs.webkit.org/show_bug.cgi?id=142115
1808         http://trac.webkit.org/changeset/181010
1809
1810 2015-03-07  Darin Adler  <darin@apple.com>
1811
1812         Do a bit of EventNames tidying
1813         https://bugs.webkit.org/show_bug.cgi?id=142438
1814
1815         Reviewed by Anders Carlsson.
1816
1817         * dom/EventNames.h: Sorted the event names into a single list instead of
1818         the rudimentary attempts at organizing the list that simply made it hard
1819         to see what is and is not in the list. Removed two unused event names.
1820         I'm sure there are more. Reorganized the EventName class, now a struct,
1821         into a more conventional "public first" order. Got the function bodies
1822         out of the struct so we can see more clearly what is in the struct.
1823         Made more things const.
1824         (WebCore::EventNames::touchEventNames): Changed the return value to a
1825         std::array of reference wrappers rather than a vector of atomic strings.
1826         This should eliminate unnecessary memory allocation and reference count churn.
1827
1828         * dom/EventNames.cpp: Changed initialization based on the above.
1829
1830         * dom/EventTarget.cpp:
1831         (WebCore::EventTarget::getEventListeners): Use NeverDestroyed instead of
1832         DEPRECATED_DEFINE_LOCAL and also just tightened up the function a bit.
1833
1834         * dom/Node.cpp:
1835         (WebCore::Node::didMoveToNewDocument): Streamlined this function with
1836         modern for loops, auto, and also tried to make what it does a bit clearer,
1837         by making loops that are just based on numbers of event listeners look a
1838         bit less like code that actually iterates a vector of listeners. Also used
1839         the type unsigned instead of size_t.
1840
1841         * platform/ThreadGlobalData.h: Updated since it's a struct instead of class now.
1842         (Why is this file in platform!?)
1843
1844 2015-03-07  Brent Fulgham  <bfulgham@apple.com>
1845
1846         [Win] Increase TestWebKitAPI Test Coverage
1847         https://bugs.webkit.org/show_bug.cgi?id=142433
1848
1849         Reviewed by Darin Adler.
1850
1851         Correct some build deficiencies that prevent TestWebKitAPI
1852         from executing certain tests on Windows.
1853
1854         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy the interpreter
1855         headers.
1856         * css/CSSParser.h: Export necessary symbols
1857         * css/CSSParserMode.h: Ditto.
1858         * css/StyleProperties.h: Ditto.
1859
1860 2015-03-07  David Kilzer  <ddkilzer@apple.com>
1861
1862         Rename SOFT_LINK_FRAMEWORK_{HEADER,SOURCE} to SOFT_LINK_FRAMEWORK_FOR_{HEADER,SOURCE}
1863         <http://webkit.org/b/142434>
1864
1865         Reviewed by Darin Adler.
1866
1867         * platform/cf/CoreMediaSoftLink.cpp:
1868         * platform/cf/CoreMediaSoftLink.h:
1869         * platform/cf/MediaAccessibilitySoftLink.cpp:
1870         * platform/cf/MediaAccessibilitySoftLink.h:
1871         * platform/mac/SoftLinking.h:
1872         * platform/win/SoftLinking.h:
1873         - Do the rename.
1874
1875 2015-03-06  Sam Weinig  <sam@webkit.org>
1876
1877         [Content Extensions] Move compiling of content extensions to the UIProcess
1878         https://bugs.webkit.org/show_bug.cgi?id=142402
1879
1880         Reviewed by Benjamin Poulain.
1881
1882         * contentextensions/CompiledContentExtension.cpp:
1883         (WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
1884         (WebCore::ContentExtensions::CompiledContentExtension::create): Deleted.
1885         (WebCore::ContentExtensions::CompiledContentExtension::CompiledContentExtension): Deleted.
1886         * contentextensions/CompiledContentExtension.h:
1887         (WebCore::ContentExtensions::CompiledContentExtension::bytecode): Deleted.
1888         (WebCore::ContentExtensions::CompiledContentExtension::actions): Deleted.
1889         Convert CompiledContentExtension to be an abstract base class so that we can back it however
1890         we like at the WebKit level. Since it doesn't necessarily use Vectors for its backing store
1891         any more, change the interface to use pointer/length.
1892
1893         * contentextensions/ContentExtensionCompiler.cpp:
1894         (WebCore::ContentExtensions::compileRuleList):
1895         * contentextensions/ContentExtensionCompiler.h:
1896         Change compileRuleList to return compiled result as the raw Vectors rather than as
1897         a CompiledContentExtension, since that class is now abstract. It is up to the caller
1898         to copy the data into its final home.
1899
1900         * contentextensions/ContentExtensionRule.cpp:
1901         (WebCore::ContentExtensions::Action::deserialize):
1902         * contentextensions/ContentExtensionRule.h:
1903         Switch Action::deserialize to take pointer/length rather than a Vector.
1904
1905         * contentextensions/ContentExtensionsBackend.cpp:
1906         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
1907         Pull getting the serialized actions from the compiled extension out of the loop
1908         to avoid calling the virtual function multiple times. Pass the bytecode and actions
1909         as pointer/length pairs rather than Vectors.
1910
1911         * contentextensions/DFABytecodeInterpreter.cpp:
1912         (WebCore::ContentExtensions::getBits):
1913         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1914         * contentextensions/DFABytecodeInterpreter.h:
1915         (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
1916         Switch the interpreter to take pointer/length rather than a Vector.
1917
1918         * page/UserContentController.cpp:
1919         (WebCore::UserContentController::addUserContentExtension):
1920         (WebCore::UserContentController::removeUserContentExtension):
1921         (WebCore::UserContentController::removeAllUserContentExtensions):
1922         (WebCore::UserContentController::addUserContentFilter): Deleted.
1923         (WebCore::UserContentController::removeUserContentFilter): Deleted.
1924         (WebCore::UserContentController::removeAllUserContentFilters): Deleted.
1925         * page/UserContentController.h:
1926         Unify terminology to use the term UserContentExtension rather than UserContentFilter.
1927
1928 2015-03-06  Roger Fong  <roger_fong@apple.com>
1929
1930         Create new buttons for media controls on OSX.
1931         https://bugs.webkit.org/show_bug.cgi?id=142415.
1932         <rdar://problem/20019441>
1933
1934         Reviewed by Eric Carlson.
1935
1936         * Modules/mediacontrols/mediaControlsApple.css:
1937         (audio::-webkit-media-controls-wireless-playback-picker-button):
1938         (audio::-webkit-media-controls-wireless-playback-picker-button.playing):
1939         (audio:-webkit-full-screen::-webkit-media-controls-wireless-playback-picker-button):
1940
1941 2015-03-06  Roger Fong  <roger_fong@apple.com>
1942
1943         Redraw timeline background when updating media time.
1944         https://bugs.webkit.org/show_bug.cgi?id=142421.
1945         <rdar://problem/20065104>
1946
1947         Reviewed by Brent Fulgham.
1948
1949         * Modules/mediacontrols/mediaControlsApple.js:
1950         (Controller.prototype.handleTimeUpdate):
1951
1952 2015-03-06  Dhi Aurrahman  <diorahman@rockybars.com>
1953
1954         Enable selectors level 4's :lang() by default
1955         https://bugs.webkit.org/show_bug.cgi?id=142302
1956
1957         Reviewed by Benjamin Poulain.
1958
1959         No behavior change.
1960
1961         * css/CSSGrammar.y.in:
1962         * css/CSSParser.cpp:
1963         (WebCore::CSSParser::detectFunctionTypeToken):
1964         * css/CSSParserValues.cpp:
1965         (WebCore::CSSParserSelector::setLangArgumentList):
1966         * css/CSSParserValues.h:
1967         * css/CSSSelector.cpp:
1968         (WebCore::appendLangArgumentList):
1969         (WebCore::CSSSelector::selectorText):
1970         (WebCore::CSSSelector::setLangArgumentList):
1971         * css/CSSSelector.h:
1972         * css/SelectorChecker.cpp:
1973         (WebCore::SelectorChecker::checkOne):
1974         * css/SelectorCheckerTestFunctions.h:
1975         (WebCore::matchesLangPseudoClass):
1976         (WebCore::matchesLangPseudoClassDeprecated): Deleted.
1977         * cssjit/SelectorCompiler.cpp:
1978         (WebCore::SelectorCompiler::addPseudoClassType):
1979         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1980         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
1981
1982 2015-03-06  Brent Fulgham  <bfulgham@apple.com>
1983
1984         Setting scroll-snap-desination to (100% 100%) locks up WebKit
1985         https://bugs.webkit.org/show_bug.cgi?id=142414
1986         <rdar://problem/20077275>
1987
1988         Reviewed by Dean Jackson.
1989
1990         Tested by css3/scroll-snap/scroll-snap-desination-lock-up.html.
1991
1992         Correct an infinite loop that is triggered when you combine a repeating (100%)
1993         scroll-snap-point-{x,y} along with a 100% scroll-snap-destination value.
1994
1995         * page/scrolling/AxisScrollSnapOffsets.cpp:
1996         (WebCore::updateFromStyle): Make sure we break out of the loop properly when
1997         the scroll-snap-point-{x,y} step is the same as the scroll-snap-destination.
1998
1999 2015-03-06  Dean Jackson  <dino@apple.com>
2000
2001         https://bugs.webkit.org/show_bug.cgi?id=142416
2002
2003         Unreviewed build fix.
2004
2005         * platform/spi/cocoa/QuartzCoreSPI.h: Add kCAFilterPlusL.
2006
2007 2015-03-06  Dean Jackson  <dino@apple.com>
2008
2009         Support "plus-lighter" in mix-blend mode
2010         https://bugs.webkit.org/show_bug.cgi?id=142416
2011         <rdar://problem/19993979>
2012
2013         Reviewed by Darin Adler and Sam Weinig.
2014
2015         Support the "plus-lighter" blending mode to CSS.
2016         See my reply to: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html
2017
2018         Test: css3/blending/svg-blend-plus-lighter.html
2019
2020         * css/CSSParser.cpp:
2021         (WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept the
2022         new keyword.
2023         * css/CSSPrimitiveValueMappings.h: Add the mappings to/from the GraphicsType.
2024         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2025         (WebCore::CSSPrimitiveValue::operator BlendMode):
2026         * css/CSSValueKeywords.in: Add comment to show plus-darker and plus-lighter
2027         are available.
2028         * platform/graphics/GraphicsTypes.cpp: New GraphicsType for PlusLighter.
2029         * platform/graphics/GraphicsTypes.h:
2030         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA filter.
2031         (PlatformCAFilters::setBlendingFiltersOnLayer):
2032         * platform/graphics/cg/GraphicsContextCG.cpp:
2033         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG
2034         blending flag.
2035
2036 2015-03-06  Alex Christensen  <achristensen@webkit.org>
2037
2038         Soft link MediaAccessibility using new macros.
2039         https://bugs.webkit.org/show_bug.cgi?id=142406
2040
2041         Reviewed by David Kilzer.
2042
2043         * Configurations/WebCore.unexp:
2044         * WebCore.vcxproj/WebCore.vcxproj:
2045         * WebCore.vcxproj/WebCore.vcxproj.filters:
2046         * WebCore.xcodeproj/project.pbxproj:
2047         * page/CaptionUserPreferencesMediaAF.cpp:
2048         * platform/cf/MediaAccessibilitySoftLink.cpp: Added.
2049         * platform/cf/MediaAccessibilitySoftLink.h: Added.
2050
2051 2015-03-06  Brent Fulgham  <bfulgham@apple.com>
2052
2053         Add 'initial' keyword support for scroll snap CSS properties
2054         https://bugs.webkit.org/show_bug.cgi?id=136345
2055         <rdar://problem/18162325>
2056
2057         Reviewed by Dean Jackson.
2058
2059         Tested by css3/scroll-snap/scroll-snap-initial.html
2060
2061         The existing implementation already had 'initial' keyword support, but did not fully follow
2062         the CSS specification. In particular, the 'initial' state for the scroll-snap-points-x and
2063         scroll-snap-points-y properties was not handled correctly.
2064
2065         Revise implementation to represent ScrollSnapPoints as a pointer, so that 'none' is a valid
2066         state.
2067
2068         * css/CSSComputedStyleDeclaration.cpp:
2069         (WebCore::scrollSnapPoints): If 'points' is null, return CSSValueNone.
2070         * css/CSSPropertyNames.in: Provide custom initial/inherit handles for snap point x/y sets.
2071         * css/StyleBuilderConverter.h:
2072         (WebCore::StyleBuilderConverter::convertScrollSnapPoints): Update to represent ScrollSnapPoints
2073         as a pointer.
2074         * css/StyleBuilderCustom.h:
2075         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Provide custom pointer-based
2076         implementation for ScrollSnapPoints.
2077         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Ditto.
2078         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Ditto.
2079         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Ditto."
2080         * page/scrolling/AxisScrollSnapOffsets.cpp:
2081         (WebCore::updateFromStyle): Handle ScrollSnapPoints as pointers.
2082         (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
2083         * rendering/style/RenderStyle.cpp:
2084         (WebCore::RenderStyle::scrollSnapPointsX): Update to use pointer-based representation of ScrollSnapPoints.
2085         (WebCore::RenderStyle::scrollSnapPointsY): Ditto.
2086         (WebCore::RenderStyle::setScrollSnapPointsX): Ditto.
2087         (WebCore::RenderStyle::setScrollSnapPointsY): Ditto.
2088         (WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
2089         (WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
2090         * rendering/style/RenderStyle.h:
2091         * rendering/style/StyleScrollSnapPoints.cpp:
2092         (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Revise constructor to handle pointer argument.
2093         * rendering/style/StyleScrollSnapPoints.h:
2094
2095 2015-03-05  Roger Fong  <roger_fong@apple.com>
2096
2097         Reskin Captions button and container on OSX.
2098         https://bugs.webkit.org/show_bug.cgi?id=142383.
2099         <rdar://problem/20061466>
2100
2101         Reviewed by Eric Carlson.
2102
2103         * Modules/mediacontrols/mediaControlsApple.css:
2104         (audio::-webkit-media-controls-toggle-closed-captions-button): Create new captions button icon.
2105         Update caption container to match rest of media controls better.
2106         (audio::-webkit-media-controls-closed-captions-container):
2107         (audio::-webkit-media-controls-closed-captions-container .list):
2108         (audio::-webkit-media-controls-closed-captions-container h3):
2109         (audio::-webkit-media-controls-closed-captions-container ul):
2110         (audio::-webkit-media-controls-closed-captions-container li):
2111         (audio::-webkit-media-controls-closed-captions-container li:focus):
2112         (audio::-webkit-media-controls-closed-captions-container li:hover):
2113         Fix up some fonts to make fonts between captions, status display and time displays consistent.
2114         (audio::-webkit-media-controls-status-display):
2115         (audio::-webkit-media-controls-time-remaining-display):
2116
2117 2015-03-06  Jer Noble  <jer.noble@apple.com>
2118
2119         [Web Audio] Decoding specific .m4a file crashes tab
2120         https://bugs.webkit.org/show_bug.cgi?id=139545
2121
2122         Reviewed by Eric Carlson.
2123
2124         Test: webaudio/decode-audio-data-too-short.html
2125
2126         Bail out early if CoreAudio reports the number of frames in the file to be negative.
2127
2128         * platform/audio/mac/AudioFileReaderMac.cpp:
2129         (WebCore::AudioFileReader::createBus):
2130
2131 2015-03-06  Jeremy Jones  <jeremyj@apple.com>
2132
2133         Scroll to make the video element visible when exiting fullscreen.
2134         https://bugs.webkit.org/show_bug.cgi?id=141439
2135
2136         Reviewed by Simon Fraser.
2137
2138         This patch will scroll the element so it is visible when exiting fullscreen,
2139         but only if the element is completely scrolled off screen.
2140         Also update the element screen rect so exit animation goes to the correct location.
2141
2142         * dom/Element.cpp:
2143         (WebCore::Element::scrollIntoViewIfNotVisible): Added.
2144         * dom/Element.h: Add declaration for scrollIntoViewIfNotVisible.
2145         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2146         (-[WebVideoFullscreenController fullscreenMayReturnToInline]):
2147         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2148         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2149         (-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]):
2150         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]):
2151         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
2152         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal):
2153         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
2154         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
2155         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
2156         (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
2157         * rendering/ScrollBehavior.cpp:
2158         * rendering/ScrollBehavior.h:
2159
2160 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
2161
2162         Crash in -[WebCascadeList objectAtIndex:] + 195
2163         https://bugs.webkit.org/show_bug.cgi?id=141274
2164
2165         Reviewed by David Kilzer.
2166
2167         CTFontDescriptorRefs can live forever in caches inside CoreText, which means our
2168         WebCascadeList can too.
2169
2170         Test: platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list.html
2171
2172         * platform/graphics/FontCascade.cpp:
2173         (WebCore::FontCascade::FontCascade): Initialize WeakPtrFactory.
2174         * platform/graphics/FontCascade.h:
2175         (WebCore::FontCascade::createWeakPtr):
2176         * platform/graphics/mac/ComplexTextControllerCoreText.mm: Migrate the raw pointer
2177         to WeakPtr.
2178         (-[WebCascadeList initWithFont:character:]):
2179         (-[WebCascadeList count]):
2180         (-[WebCascadeList objectAtIndex:]):
2181
2182 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
2183
2184         Rename BreakingContextInlineHeaders.h to BreakingContext.h
2185         https://bugs.webkit.org/show_bug.cgi?id=142404
2186
2187         Reviewed by Simon Fraser.
2188
2189         No point naming it "InlineHeaders" when there are no non-inline-headers files.
2190
2191         No new tests because this is just a rename of a file.
2192
2193         * WebCore.vcxproj/WebCore.vcxproj:
2194         * WebCore.vcxproj/WebCore.vcxproj.filters:
2195         * WebCore.xcodeproj/project.pbxproj:
2196         * rendering/RenderBlockLineLayout.cpp:
2197         * rendering/line/BreakingContext.h: Renamed from Source/WebCore/rendering/line/BreakingContextInlineHeaders.h.
2198         (WebCore::WordMeasurement::WordMeasurement):
2199         (WebCore::BreakingContext::BreakingContext):
2200         (WebCore::BreakingContext::currentObject):
2201         (WebCore::BreakingContext::lineBreak):
2202         (WebCore::BreakingContext::lineWidth):
2203         (WebCore::BreakingContext::atEnd):
2204         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
2205         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
2206         (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory):
2207         (WebCore::BreakingContext::InlineIteratorHistory::push):
2208         (WebCore::BreakingContext::InlineIteratorHistory::update):
2209         (WebCore::BreakingContext::InlineIteratorHistory::renderer):
2210         (WebCore::BreakingContext::InlineIteratorHistory::offset):
2211         (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):
2212         (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode):
2213         (WebCore::BreakingContext::InlineIteratorHistory::get):
2214         (WebCore::BreakingContext::InlineIteratorHistory::current):
2215         (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
2216         (WebCore::BreakingContext::InlineIteratorHistory::moveTo):
2217         (WebCore::BreakingContext::InlineIteratorHistory::increment):
2218         (WebCore::BreakingContext::InlineIteratorHistory::clear):
2219         (WebCore::BreakingContext::initializeForCurrentObject):
2220         (WebCore::BreakingContext::increment):
2221         (WebCore::BreakingContext::handleBR):
2222         (WebCore::borderPaddingMarginStart):
2223         (WebCore::borderPaddingMarginEnd):
2224         (WebCore::shouldAddBorderPaddingMargin):
2225         (WebCore::previousInFlowSibling):
2226         (WebCore::inlineLogicalWidth):
2227         (WebCore::BreakingContext::handleOutOfFlowPositioned):
2228         (WebCore::BreakingContext::handleFloat):
2229         (WebCore::shouldSkipWhitespaceAfterStartObject):
2230         (WebCore::BreakingContext::handleEmptyInline):
2231         (WebCore::BreakingContext::handleReplaced):
2232         (WebCore::firstPositiveWidth):
2233         (WebCore::iteratorIsBeyondEndOfRenderCombineText):
2234         (WebCore::nextCharacter):
2235         (WebCore::updateCounterIfNeeded):
2236         (WebCore::measureHyphenWidth):
2237         (WebCore::textWidth):
2238         (WebCore::ensureCharacterGetsLineBox):
2239         (WebCore::tryHyphenating):
2240         (WebCore::BreakingContext::handleText):
2241         (WebCore::textBeginsWithBreakablePosition):
2242         (WebCore::BreakingContext::canBreakAtThisPosition):
2243         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2244         (WebCore::checkMidpoints):
2245         (WebCore::BreakingContext::handleEndOfLine):
2246         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
2247         * rendering/line/LineBreaker.cpp:
2248
2249 2015-03-06  Dan Bernstein  <mitz@apple.com>
2250
2251         Expose some of the functionality of extract-localizable-strings.pl as a module
2252         https://bugs.webkit.org/show_bug.cgi?id=142038
2253
2254         Reviewed by Sam Weinig.
2255
2256         * LocalizableStrings.pm: Copied from Source/WebCore/extract-localizable-strings.pl.
2257         (setTreatWarningsAsErrors): Added this setter for the variable moved here.
2258         (sawError): Added a getter.
2259         (emitError): Added. Emits the error message and sets $sawError.
2260         (unescapeHexSequence): Moved from extract-localizable-strings.pl and renamed to start with
2261         a lowercase letter.
2262         (keyCollisionCount): Added this getter.
2263         (localizedCount): Added this getter.
2264         (HandleUIString): Moved from extract-localizable-strings.pl and made it increment the
2265         localized string count.
2266         (writeStringsFile): Moved code from extract-localizable-strings.pl into this new subroutine.
2267         (verifyStringsFile): Ditto.
2268
2269         * WebCore.xcodeproj/project.pbxproj: Added LocalizableStrings.pm to the Copy Scripts build
2270         phase.
2271
2272         * extract-localizable-strings.pl:
2273         (emitWarning): Moved to the module.
2274         (UnescapeHexSequence): Ditto.
2275         (HandleUIString): Ditto.
2276
2277 2015-03-06  Darin Adler  <darin@apple.com>
2278
2279         Remove unused C++ DOM event handler attribute functions
2280         https://bugs.webkit.org/show_bug.cgi?id=142398
2281
2282         Reviewed by Anders Carlsson.
2283
2284         * dom/EventTarget.h: Removed now-unneeded macros: DEFINE_ATTRIBUTE_EVENT_LISTENER,
2285         DECLARE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER, DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER,
2286         DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER, DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER,
2287         DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER, DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER.
2288
2289         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2290         (WebCore::AudioScheduledSourceNode::setOnended): Deleted.
2291         (WebCore::AudioScheduledSourceNode::finish): Rewrote this to use dispatchEvent
2292         instead of one-off event-sending code. Also use a lambda to avoid needing two
2293         additional member functions to implement this.
2294         (WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Deleted.
2295         (WebCore::AudioScheduledSourceNode::notifyEnded): Deleted.
2296         * Modules/webaudio/AudioScheduledSourceNode.h: Updated for above.
2297
2298         * Modules/battery/BatteryManager.h: Removed onxxx and setOnxxx functions,
2299         including ones created with macros from EventTarget.h.
2300         * Modules/encryptedmedia/MediaKeySession.h: Ditto.
2301         * Modules/indexeddb/IDBDatabase.h: Ditto.
2302         * Modules/indexeddb/IDBOpenDBRequest.h: Ditto.
2303         * Modules/indexeddb/IDBRequest.h: Ditto.
2304         * Modules/indexeddb/IDBTransaction.h: Ditto.
2305         * Modules/mediastream/MediaStream.h: Ditto.
2306         * Modules/mediastream/MediaStreamTrack.h: Ditto.
2307         * Modules/mediastream/RTCDTMFSender.h: Ditto.
2308         * Modules/mediastream/RTCDataChannel.h: Ditto.
2309         * Modules/mediastream/RTCPeerConnection.h: Ditto.
2310         * Modules/notifications/Notification.h: Ditto.
2311         * Modules/speech/SpeechSynthesisUtterance.h: Ditto.
2312         * Modules/webaudio/AudioContext.h: Ditto.
2313         * Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
2314         * Modules/webaudio/ScriptProcessorNode.h: Ditto.
2315         * Modules/websockets/WebSocket.h: Ditto.
2316         * css/FontLoader.h: Ditto.
2317         * dom/Document.h: Ditto.
2318         * dom/Element.cpp: Ditto.
2319         * dom/Element.h: Ditto.
2320         * dom/MessagePort.h: Ditto.
2321         * fileapi/FileReader.h: Ditto.
2322         * html/HTMLBodyElement.h: Ditto.
2323         * html/HTMLFormElement.h: Ditto.
2324         * html/HTMLFrameSetElement.h: Ditto.
2325         * html/HTMLInputElement.h: Ditto.
2326         * html/HTMLMediaElement.h: Ditto.
2327         * html/HTMLVideoElement.h: Ditto.
2328         * html/track/TextTrack.h: Ditto.
2329         * html/track/TextTrackCue.h: Ditto.
2330         * html/track/TrackListBase.h: Ditto.
2331         * loader/appcache/DOMApplicationCache.h: Ditto.
2332         * page/DOMWindow.h: Ditto.
2333         * page/EventSource.h: Ditto.
2334         * page/Performance.h: Ditto.
2335         * workers/AbstractWorker.h: Ditto.
2336         * workers/DedicatedWorkerGlobalScope.h: Ditto.
2337         * workers/Worker.h: Ditto.
2338         * workers/WorkerGlobalScope.h: Ditto.
2339         * xml/XMLHttpRequest.h: Ditto.
2340         * xml/XMLHttpRequestUpload.h: Ditto.
2341
2342 2015-03-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
2343
2344         Setting any of the <object> element plugin controlling attributes does not have any affect.
2345         https://bugs.webkit.org/show_bug.cgi?id=141936.
2346
2347         Reviewed by Simon Fraser.
2348         
2349         When setting any of the <object> element plugin controlling attributes
2350         dynamically we need to mark the the element to be dirty by calling
2351         setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
2352
2353         Tests: fast/css/image-object-hover-inherit.html
2354                svg/as-object/svg-in-object-dynamic-attribute-change.html
2355
2356         * dom/Element.h: Delete unimplemented function.
2357         
2358         * html/HTMLObjectElement.cpp:
2359         (WebCore::HTMLObjectElement::parseAttribute): Mark the element dirty by
2360         calling setNeedsStyleRecalc() when one of the plugin controlling attributes
2361         gets changed. We have to clear m_useFallbackContent because the attribute's
2362         new value might fix the object rendering.
2363         
2364         * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
2365
2366 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
2367
2368         Test horiz-origin-x and horiz-origin-y in SVG fonts
2369         https://bugs.webkit.org/show_bug.cgi?id=142403
2370
2371         Reviewed by Simon Fraser.
2372
2373         Remove incorrect comment.
2374
2375         Test: svg/fonts/svg-font-horiz-origin.html
2376
2377         * svg/SVGToOTFFontConversion.cpp:
2378         (WebCore::CFFBuilder::CFFBuilder):
2379
2380 2015-03-06  Simon Fraser  <simon.fraser@apple.com>
2381
2382         Allow tree dumping functions to be used in release builds by switching a flag
2383         https://bugs.webkit.org/show_bug.cgi?id=142379
2384
2385         Reviewed by Zalan Bujtas.
2386
2387         There are various tree dumping functions that are useful for debugging, and sometimes
2388         you want to be able to use them in release builds. Currently they are surrounded by
2389         #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
2390         in wtf/Platform.h
2391
2392         * dom/DocumentMarkerController.cpp:
2393         * dom/DocumentMarkerController.h:
2394         * dom/Element.cpp:
2395         * dom/Element.h:
2396         * dom/Node.cpp:
2397         * dom/Node.h:
2398         * dom/Position.cpp:
2399         * dom/Position.h:
2400         * dom/Range.cpp:
2401         * dom/Range.h:
2402         * dom/Text.cpp:
2403         * dom/Text.h:
2404         * editing/FrameSelection.cpp:
2405         * editing/FrameSelection.h:
2406         * editing/VisiblePosition.cpp:
2407         * editing/VisiblePosition.h:
2408         * editing/VisibleSelection.cpp:
2409         * editing/VisibleSelection.h:
2410         * html/parser/HTMLElementStack.cpp:
2411         * html/parser/HTMLFormattingElementList.cpp:
2412         * rendering/CounterNode.cpp:
2413         * rendering/CounterNode.h:
2414         * rendering/InlineBox.cpp:
2415         * rendering/InlineBox.h:
2416         * rendering/InlineFlowBox.cpp:
2417         * rendering/InlineFlowBox.h:
2418         * rendering/InlineTextBox.cpp:
2419         * rendering/InlineTextBox.h:
2420         * rendering/RenderBlockFlow.cpp:
2421         * rendering/RenderBlockFlow.h:
2422         * rendering/RenderCounter.cpp:
2423         * rendering/RenderCounter.h:
2424         * rendering/RenderLayer.cpp:
2425         * rendering/RenderLayer.h:
2426         * rendering/RenderLayerBacking.cpp:
2427         (WebCore::RenderLayerBacking::createGraphicsLayer):
2428         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2429         (WebCore::RenderLayerBacking::updateForegroundLayer):
2430         (WebCore::RenderLayerBacking::updateBackgroundLayer):
2431         * rendering/RenderLayerCompositor.cpp:
2432         (WebCore::CompositingState::CompositingState):
2433         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
2434         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
2435         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2436         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2437         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2438         (WebCore::RenderLayerCompositor::ensureRootLayer):
2439         * rendering/RenderObject.cpp:
2440         * rendering/RenderObject.h:
2441         * rendering/RootInlineBox.cpp:
2442         * rendering/RootInlineBox.h:
2443         * rendering/SimpleLineLayoutFunctions.cpp:
2444         * rendering/SimpleLineLayoutFunctions.h:
2445         * rendering/svg/SVGResources.cpp:
2446         * rendering/svg/SVGResources.h:
2447
2448 2015-03-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
2449
2450         An SVG element without intrinsic size inherits the container size as its viewport instead of inheriting the container viewport.
2451         https://bugs.webkit.org/show_bug.cgi?id=141725.
2452
2453         Reviewed by Darin Adler.
2454
2455         The current viewport of the <svg> element should be retrieved from its
2456         renderer if the renderer is available. If the renderer is not created yet,
2457         this means the viewport is needed to calculate the size of the renderer.
2458         In this case, we should return the element size if it is intrinsic size.
2459         
2460         Test: svg/css/svg-css-different-intrinsic-sizes.html
2461
2462         * svg/SVGSVGElement.cpp:
2463         (WebCore::SVGSVGElement::currentViewportSize): Change the order for
2464         returning the viewport of the <svg> element. We should consider the case
2465         of a valid renderer before considering the case of an intrinsic size.
2466
2467 2015-03-06  Simon Fraser  <simon.fraser@apple.com>
2468
2469         Allow composited clip-path to be updated without a layer repaint
2470         https://bugs.webkit.org/show_bug.cgi?id=142384
2471
2472         Reviewed by Zalan Bujtas.
2473         
2474         When clip-path is mapped to a compositing shape layer mask, we can just
2475         push a new shape to the GraphicsLayer to update the clip path, without
2476         needing to repaint.
2477         
2478         Achieve this by adding ContextSensitivePropertyClipPath. When set, and the
2479         stars are aligned, issue a StyleDifferenceRecompositeLayer rather than
2480         a StyleDifferenceRepaint.
2481         
2482         We ask RenderLayerCompositor whether the clip path can be composited
2483         to hide platform differences related to whether GraphicsLayer supports
2484         shape masks.
2485
2486         Test: compositing/masks/compositing-clip-path-change-no-repaint.html
2487
2488         * rendering/RenderElement.cpp:
2489         (WebCore::RenderElement::adjustStyleDifference): Remove obvious comment
2490         about opacity. Handle ContextSensitivePropertyClipPath.
2491         * rendering/RenderLayerCompositor.cpp:
2492         (WebCore::RenderLayerCompositor::canCompositeClipPath): If we have a mask
2493         we have to paint the mask + clip path into the mask layer (mirrors code in
2494         RenderLayerBacking::updateMaskingLayer but isn't quite similar enough to share).
2495         * rendering/RenderLayerCompositor.h:
2496         * rendering/style/RenderStyle.cpp:
2497         (WebCore::RenderStyle::changeRequiresRepaint): Set ContextSensitivePropertyClipPath
2498         and don't return, as is normal for context-sensitive property handling.
2499         * rendering/style/RenderStyleConstants.h: Line things up to avoid future bit
2500         fumbles, and remove unnecessary braces.
2501
2502 2015-03-06  Alex Christensen  <achristensen@webkit.org>
2503
2504         [Content Extensions] Process all actions when blocking a URL.
2505         https://bugs.webkit.org/show_bug.cgi?id=142363
2506
2507         Reviewed by Darin Adler.
2508
2509         This can only be tested once we implement css selectors.
2510
2511         * contentextensions/ContentExtensionsBackend.cpp:
2512         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
2513         Do not return early when adding a block action.
2514         * loader/cache/CachedResourceLoader.cpp:
2515         (WebCore::CachedResourceLoader::requestResource):
2516         Process all actions before returning.
2517
2518 2015-03-05  Darin Adler  <darin@apple.com>
2519
2520         Make JavaScript binding get and set legacy event listener attributes directly
2521         https://bugs.webkit.org/show_bug.cgi?id=142282
2522
2523         Reviewed by Antti Koivisto.
2524
2525         Test: fast/dom/legacy-event-handler-attributes.html
2526
2527         This patch changes the JavaScript getters and setters for these attributes
2528         to work directly without requiring any functions in the C++ DOM implementation.
2529         A subsequent patch will remove the now-unused C++ DOM implementation.
2530
2531         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2532         (WebCore::AudioScheduledSourceNode::setOnended): Remove code to set
2533         m_hasEndedListener; this was incorrect since it only detected event listeners
2534         set up with the event handler attribute, not with addEventListener.
2535         (WebCore::AudioScheduledSourceNode::addEventListener): Added code to update
2536         m_hasEndedListener after making changes to the event listeners.
2537         (WebCore::AudioScheduledSourceNode::removeEventListener): Ditto.
2538         (WebCore::AudioScheduledSourceNode::removeAllEventListeners): Ditto.
2539         * Modules/webaudio/AudioScheduledSourceNode.h: Added above overrides.
2540
2541         * Modules/webaudio/ScriptProcessorNode.cpp:
2542         (WebCore::ScriptProcessorNode::setOnaudioprocess): Remove code to set
2543         m_hasAudioProcessListener; this was incorrect since it only detected event listeners
2544         set up with the event handler attribute, not with addEventListener.
2545         (WebCore::ScriptProcessorNode::addEventListener): Added code to update
2546         m_hasAudioProcessListener after making changes to the event listeners.
2547         (WebCore::ScriptProcessorNode::removeEventListener): Ditto.
2548         (WebCore::ScriptProcessorNode::removeAllEventListeners): Ditto.
2549         * Modules/webaudio/ScriptProcessorNode.h: Added above overrides.
2550
2551         * bindings/js/JSEventListener.cpp:
2552         (WebCore::legacyEventListenerAttribute): Added.
2553         (WebCore::createEventListenerForLegacyAttribute): Added.
2554         (WebCore::setLegacyEventListenerAttribute): Added.
2555         (WebCore::legacyWindowEventListenerAttribute): Added.
2556         (WebCore::setLegacyWindowEventListenerAttribute): Added.
2557
2558         * bindings/js/JSEventListener.h:
2559         (WebCore::createJSEventListenerForAttribute): Deleted.
2560
2561         * bindings/scripts/CodeGeneratorJS.pm:
2562         (GenerateAttributeEventListenerCall): Deleted.
2563         (LegacyEventListenerAttributeEventName): Added.
2564         (LegacyEventListenerAttributePrefix): Added.
2565         (GenerateImplementation): Use "auto" in lots of places to simplify the code
2566         generation. Replaced the old inlined code to deal with legacy event listener
2567         attributes with code that simply calls the new functions from JSEventLister.h.
2568         (GenerateCallWith): Use "auto".
2569         (GenerateConstructorDefinition): Ditto.
2570
2571         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated expected
2572         results since these now use auto.
2573         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
2574         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
2575         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
2576         * bindings/scripts/test/JS/JSTestException.cpp: Ditto.
2577         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Ditto.
2578         * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
2579         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
2580         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
2581         * bindings/scripts/test/JS/JSTestNode.cpp: Ditto.
2582         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
2583         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
2584         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
2585         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
2586         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
2587         * bindings/scripts/test/JS/JSattribute.cpp: Ditto.
2588         * bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
2589
2590         * dom/MessagePort.cpp:
2591         (WebCore::MessagePort::addEventListener): Moved logic that calls the start
2592         function in here from setOnmessage, since the latter will no longer be called.
2593         * dom/MessagePort.h: Ditto.
2594
2595 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
2596
2597         [iOS] SVG fonts are garbled
2598         https://bugs.webkit.org/show_bug.cgi?id=142377
2599
2600         Reviewed by Simon Fraser.
2601
2602         The C++ spec says that casting a negative floating point number to
2603         an unsigned integer is undefined. Instead, use clamping.
2604
2605         Covered by existing SVG font tests.
2606
2607         * Configurations/FeatureDefines.xcconfig:
2608         * svg/SVGToOTFFontConversion.cpp:
2609         (WebCore::writeCFFEncodedNumber):
2610
2611 2015-03-06  Commit Queue  <commit-queue@webkit.org>
2612
2613         Unreviewed, rolling out r181139.
2614         https://bugs.webkit.org/show_bug.cgi?id=142394
2615
2616         "Caused many crashes in API tests and layout tests in Debug
2617         builds on bots." (Requested by ddkilzer on #webkit).
2618
2619         Reverted changeset:
2620
2621         "Allow tree dumping functions to be used in release builds by
2622         switching a flag"
2623         https://bugs.webkit.org/show_bug.cgi?id=142379
2624         http://trac.webkit.org/changeset/181139
2625
2626 2015-03-05  Philippe Normand  <pnormand@igalia.com>
2627
2628         [MediaStream] new load method for MediaStreamPrivate objects
2629         https://bugs.webkit.org/show_bug.cgi?id=142346
2630
2631         Reviewed by Eric Carlson.
2632
2633         No new tests, existing mediastream tests cover this use-case.
2634
2635         * html/HTMLMediaElement.cpp:
2636         (WebCore::HTMLMediaElement::loadResource): Use new load method for MediaStreams.
2637         * platform/graphics/MediaPlayer.cpp:
2638         (WebCore::NullMediaPlayerPrivate::load): New stub.
2639         (WebCore::MediaPlayer::load): New load method for
2640         MediaStreamPrivate.
2641         (WebCore::MediaPlayer::nextBestMediaEngine): Set a new boolean on
2642         the MediaEngineSupportParameters to differenciate with MSE and
2643         normal video resources.
2644         (WebCore::MediaPlayer::loadWithNextMediaEngine): Defer loading of
2645         the MediaStream to the MediaPlayerPrivate backend.
2646         * platform/graphics/MediaPlayer.h:
2647         (WebCore::MediaEngineSupportParameters::MediaEngineSupportParameters):
2648         * platform/graphics/MediaPlayerPrivate.h:
2649         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2650         (WebCore::MediaPlayerPrivateAVFoundation::load): New empty load
2651         method for MediaStreamPrivate objects.
2652         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2653         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Ditto.
2654         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2655         (WebCore::MediaPlayerPrivateGStreamer::load): Ditto.
2656         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2657         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2658         (WebCore::MediaPlayerPrivateQTKit::load): Ditto.
2659         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
2660
2661 2015-03-05  Philippe Normand  <pnormand@igalia.com>
2662
2663         Rename MediaStreamSource to RealtimeMediaSource
2664         https://bugs.webkit.org/show_bug.cgi?id=142330
2665
2666         Reviewed by Eric Carlson.
2667
2668         MediaStreamSource is a misleading name, it's not the source of a
2669         MediaStream.
2670
2671         The chain from high level to low level is: MediaStream -
2672         MediaStreamTrack - MediaStreamTrackPrivate - RealTimeMediaSource
2673         and a MediaStream can contains several MediaStreamTrack objects of
2674         different types.
2675
2676         MediaStreamSourceStates was also renamed to
2677         RealtimeMediaSourceStates, and MediaStreamSourceCapabilities to
2678         RealtimeMediaSourceCapabilities, for consistency.
2679
2680 2015-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2681
2682         Unreviewed WinCairo port build fix since r181136.
2683
2684         * platform/network/curl/ResourceRequest.h:
2685         (WebCore::ResourceRequest::doPlatformAdopt): Missing ":" in std::unique_ptr.
2686
2687 2015-03-06  David Kilzer  <ddkilzer@apple.com>
2688
2689         Rename SOFT_LINK_{CONSTANT,FUNCTION}_{HEADER,SOURCE} to SOFT_LINK_{CONSTANT,FUNCTION}_FOR_{HEADER,SOURCE}
2690         <http://webkit.org/b/142177>
2691
2692         Reviewed by Alex Christensen.
2693
2694         * platform/cf/CoreMediaSoftLink.cpp:
2695         - Rename SOFT_LINK_{CONSTANT,FUNCTION}_SOURCE() to
2696           SOFT_LINK_{CONSTANT,FUNCTION}_FOR_SOURCE().
2697         * platform/cf/CoreMediaSoftLink.h:
2698         - Rename SOFT_LINK_{CONSTANT,FUNCTION}_HEADER() to
2699           SOFT_LINK_{CONSTANT,FUNCTION}_FOR_HEADER().
2700
2701         * platform/mac/SoftLinking.h:
2702         * platform/win/SoftLinking.h:
2703         - Rename SOFT_LINK_{CONSTANT,FUNCTION}_{HEADER,SOURCE}() to
2704           SOFT_LINK_{CONSTANT,FUNCTION}_FOR_{HEADER,SOURCE}().
2705
2706 2015-03-06  Sergio Villar Senin  <svillar@igalia.com>
2707
2708         [CSS Grid Layout] ASSERTION FAILED !track.growthLimitIsInfinite() in RenderGrid::computeUsedBreadthOfGridTracks
2709         https://bugs.webkit.org/show_bug.cgi?id=142265
2710
2711         Reviewed by Darin Adler.
2712
2713          The problem is that computeUsedBreadthOfGridTracks() could return
2714         -1 for rows because we're calling computeContentLogicalHeight()
2715         which can indeed return -1. In those cases we should clamp the
2716         value to 0 the same as Flexbox does otherwise we could end up with
2717         a negative value in the min track sizing function.
2718
2719         Test: fast/css-grid-layout/grid-indefinite-calculated-height-crash.html
2720
2721         * rendering/RenderGrid.cpp:
2722         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
2723
2724 2015-03-05  Simon Fraser  <simon.fraser@apple.com>
2725
2726         Allow tree dumping functions to be used in release builds by switching a flag
2727         https://bugs.webkit.org/show_bug.cgi?id=142379
2728
2729         Reviewed by Zalan Bujtas.
2730
2731         There are various tree dumping functions that are useful for debugging, and sometimes
2732         you want to be able to use them in release builds. Currently they are surrounded by
2733         #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
2734         in config.h
2735
2736         * config.h:
2737         * dom/DocumentMarkerController.cpp:
2738         * dom/DocumentMarkerController.h:
2739         * dom/Element.cpp:
2740         * dom/Element.h:
2741         * dom/Node.cpp:
2742         * dom/Node.h:
2743         * dom/Position.cpp: Position::debugPosition(const char* msg) was available in release builds, but this changes
2744         is to respect ENABLE_TREE_DEBUGGING, which I think is correct.
2745         * dom/Position.h:
2746         * dom/Range.cpp:
2747         * dom/Range.h:
2748         * dom/Text.cpp:
2749         * dom/Text.h:
2750         * rendering/CounterNode.cpp:
2751         * rendering/CounterNode.h:
2752         * rendering/InlineBox.cpp:
2753         * rendering/InlineBox.h:
2754         * rendering/InlineFlowBox.cpp:
2755         * rendering/InlineFlowBox.h:
2756         * rendering/InlineTextBox.cpp:
2757         * rendering/InlineTextBox.h:
2758         * rendering/RenderBlockFlow.cpp:
2759         * rendering/RenderBlockFlow.h:
2760         * rendering/RenderCounter.cpp:
2761         * rendering/RenderCounter.h:
2762         * rendering/RenderLayer.cpp:
2763         * rendering/RenderLayer.h:
2764         * rendering/RenderLayerBacking.cpp:
2765         (WebCore::RenderLayerBacking::createGraphicsLayer):
2766         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2767         (WebCore::RenderLayerBacking::updateForegroundLayer):
2768         (WebCore::RenderLayerBacking::updateBackgroundLayer):
2769         * rendering/RenderLayerCompositor.cpp:
2770         (WebCore::CompositingState::CompositingState):
2771         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
2772         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
2773         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2774         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2775         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2776         (WebCore::RenderLayerCompositor::ensureRootLayer):
2777         * rendering/RenderObject.cpp:
2778         * rendering/RenderObject.h: showTreeCharacterOffset was unused.
2779         * rendering/RootInlineBox.cpp:
2780         * rendering/RootInlineBox.h:
2781         * rendering/SimpleLineLayoutFunctions.cpp:
2782         * rendering/SimpleLineLayoutFunctions.h:
2783         * rendering/svg/SVGResources.cpp:
2784         * rendering/svg/SVGResources.h:
2785
2786 2015-03-05  Brent Fulgham  <bfulgham@apple.com>
2787
2788         [Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
2789         https://bugs.webkit.org/show_bug.cgi?id=142351
2790         <rdar://problem/20058023>
2791
2792         Reviewed by Dean Jackson.
2793
2794         This problem was caused by incorrectly starting a new snapping animation timer when the
2795         "end momentum" phase event had been received. This caused WebKit to recalculate the
2796         animation curve for the remaining distance, resulting in the bad animation behavior.
2797
2798         Removing this incorrect start animation command when entering the momentum ended state
2799         resolves the problem.
2800
2801         * platform/cocoa/ScrollController.mm:
2802         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Remove the command to
2803         start a new snap animation when entering the "end momentum" state.
2804
2805 2015-03-05  Joonghun Park  <jh718.park@samsung.com>
2806
2807         Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ResourceRequest
2808         https://bugs.webkit.org/show_bug.cgi?id=142349
2809
2810         Reviewed by Darin Adler.
2811
2812         No new tests, no behavior changes.
2813
2814         * loader/WorkerThreadableLoader.cpp:
2815         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2816         * loader/cache/MemoryCache.cpp:
2817         (WebCore::MemoryCache::removeRequestFromSessionCaches):
2818         * platform/CrossThreadCopier.h:
2819         * platform/network/ResourceRequestBase.cpp:
2820         (WebCore::ResourceRequestBase::adopt):
2821         (WebCore::ResourceRequestBase::copyData):
2822         * platform/network/ResourceRequestBase.h:
2823         * platform/network/cf/ResourceRequest.h:
2824         * platform/network/cf/ResourceRequestCFNet.cpp:
2825         (WebCore::ResourceRequest::doPlatformCopyData):
2826         (WebCore::ResourceRequest::doPlatformAdopt):
2827         * platform/network/curl/ResourceRequest.h:
2828         (WebCore::ResourceRequest::doPlatformCopyData):
2829         (WebCore::ResourceRequest::doPlatformAdopt):
2830         * platform/network/soup/ResourceRequest.h:
2831         (WebCore::ResourceRequest::doPlatformCopyData):
2832         (WebCore::ResourceRequest::doPlatformAdopt):
2833
2834 2015-03-05  Oliver Hunt  <oliver@apple.com>
2835
2836         Block mixed mode content
2837         https://bugs.webkit.org/show_bug.cgi?id=142378
2838
2839         Reviewed by Darin Adler.
2840
2841         Switched to blocking mixed mode content by default,
2842         and modify the blocking rules to allow us to match
2843         the behaviours of other browsers.
2844
2845         * loader/DocumentLoader.cpp:
2846         (WebCore::DocumentLoader::willSendRequest):
2847         * loader/MixedContentChecker.cpp:
2848         (WebCore::MixedContentChecker::canDisplayInsecureContent):
2849         (WebCore::MixedContentChecker::canRunInsecureContent):
2850         (WebCore::MixedContentChecker::logWarning):
2851         * loader/MixedContentChecker.h:
2852         * loader/cache/CachedResourceLoader.cpp:
2853         (WebCore::contentTypeFromResourceType):
2854         (WebCore::CachedResourceLoader::checkInsecureContent):
2855         * page/Settings.in:
2856
2857 2015-03-05  Chris Dumez  <cdumez@apple.com>
2858
2859         Document::recalcStyle() shouldn't call viewportContentsChanged() if there is a pending layout
2860         https://bugs.webkit.org/show_bug.cgi?id=142140
2861
2862         Reviewed by Darin Adler.
2863
2864         Stop calling FrameView::viewportContentsChanged() in Document::recalcStyle()
2865         if there is a layout pending to avoid doing unncessary work. If there is a
2866         layout pending, we don't need to do anything because viewportContentsChanged()
2867         will be called after layout.
2868
2869         We only need to call FrameView::viewportContentsChanged() in
2870         Document::recalcStyle() if a style recalc does not cause a layout. For e.g.
2871         a '-webkit-transform' could make an animated GIF visible without causing a
2872         layout, in which case we need to resume the animated GIF after style recalc.
2873
2874         No new tests, already covered by:
2875         fast/images/animated-gif-webkit-transform.html
2876
2877         * dom/Document.cpp:
2878         (WebCore::Document::recalcStyle):
2879
2880 2015-03-05  Dean Jackson  <dino@apple.com>
2881
2882         [iOS Media] Web video on iPad appears black and missing the AirPlay placard when connected to an AirPlay route
2883         https://bugs.webkit.org/show_bug.cgi?id=142373
2884         <rdar://problem/19866072>
2885
2886         Reviewed by Brent Fulgham.
2887
2888         There was no style for the placard, which meant it had
2889         zero height (and thus was invisible).
2890
2891         * Modules/mediacontrols/mediaControlsiOS.css:
2892         (audio::-webkit-media-controls-wireless-playback-status): Added.
2893         (audio::-webkit-media-controls-wireless-playback-status.hidden):
2894
2895 2015-03-05  Roger Fong  <roger_fong@apple.com>
2896
2897         Adjust volume box to not intersect with rest of inline media controls on OSX.
2898         https://bugs.webkit.org/show_bug.cgi?id=142372.
2899         <rdar://problem/20064327>
2900
2901         Reviewed by Brent Fulgham.
2902
2903         * Modules/mediacontrols/mediaControlsApple.css:
2904         (audio::-webkit-media-controls-panel .volume-box):
2905         (audio::-webkit-media-controls-panel .volume-box:active):
2906
2907 2015-03-05  Timothy Horton  <timothy_horton@apple.com>
2908
2909         <attachment> should allow the title property to override its title
2910         https://bugs.webkit.org/show_bug.cgi?id=142369
2911
2912         Reviewed by Anders Carlsson.
2913
2914         Test: fast/attachment/attachment-title.html
2915
2916         * html/HTMLAttachmentElement.cpp:
2917         (WebCore::HTMLAttachmentElement::parseAttribute):
2918         Invalidate the attachment if the title changes.
2919
2920         (WebCore::HTMLAttachmentElement::attachmentTitle):
2921         Use the title attribute for the title, unless it's empty, in which
2922         case we'll use the file's name.
2923
2924         * html/HTMLAttachmentElement.h:
2925         * rendering/RenderThemeMac.mm:
2926         (WebCore::AttachmentLayout::layOutTitle):
2927         Use attachmentTitle() instead of reaching into the file. Also rename
2928         some things from filename to title.
2929
2930 2015-03-05  Timothy Horton  <timothy_horton@apple.com>
2931
2932         Two text carets result when dragging a file into a contentEditable area that preventDefault()s the "drop" event
2933         https://bugs.webkit.org/show_bug.cgi?id=142362
2934         <rdar://problem/20046434>
2935
2936         Reviewed by Simon Fraser.
2937
2938         * page/DragController.h:
2939         * page/DragController.cpp:
2940         (WebCore::DragController::clearDragCaret):
2941         Rename cancelDrag to clearDragCaret, since that's really what it does.
2942
2943         (WebCore::DragController::tryDocumentDrag):
2944         When updating the drag position, if we're now over a <input type="file">,
2945         clear the drag caret. This avoids leaving a caret behind when dragging
2946         over a <input type="file"> inside a contentEditable area.
2947
2948         (WebCore::DragController::performDragOperation):
2949         When the content preventDefault()s while finishing a drag, we should still
2950         clear the drag caret, because it's possible that the client did not
2951         preventDefault() on dragover/etc., so we would have set a cursor, and
2952         now need to clear it so that it doesn't get left behind.
2953
2954         (WebCore::DragController::mouseMovedIntoDocument):
2955         (WebCore::DragController::dragEnteredOrUpdated):
2956         (WebCore::DragController::concludeEditDrag):
2957         Adjust to renamed clearDragCaret.
2958
2959         (WebCore::DragController::dragEnded):
2960         Make use of clearDragCaret (which is equivalent to this line).
2961
2962 2015-03-05  Timothy Horton  <timothy_horton@apple.com>
2963
2964         <attachment> should support indication of download progress
2965         https://bugs.webkit.org/show_bug.cgi?id=142336
2966         <rdar://problem/19982504>
2967
2968         Reviewed by Anders Carlsson.
2969
2970         * html/HTMLAttachmentElement.cpp:
2971         (WebCore::HTMLAttachmentElement::parseAttribute):
2972         Invalidate the attachment if the progress attribute changes.
2973
2974         * platform/graphics/FloatRoundedRect.h:
2975         (WebCore::FloatRoundedRect::Radii::Radii):
2976         Add a Radii constructor that takes a single argument that is used
2977         as the radius for all corners, for convenience.
2978
2979         * rendering/RenderThemeMac.mm:
2980         (WebCore::attachmentProgressBarBackgroundColor):
2981         (WebCore::attachmentProgressBarFillColor):
2982         (WebCore::attachmentProgressBarBorderColor):
2983         Add a bunch of constants for the progress bar.
2984
2985         (WebCore::paintAttachmentIconBackground):
2986         Make use of fillRoundedRect instead of creating a path.
2987
2988         (WebCore::paintAttachmentProgress):
2989         (WebCore::RenderThemeMac::paintAttachment):
2990         Paint a progress bar if the progress attribute exists and
2991         is a valid floating point number.
2992
2993 2015-03-05  Commit Queue  <commit-queue@webkit.org>
2994
2995         Unreviewed, rolling out r180846.
2996         https://bugs.webkit.org/show_bug.cgi?id=142368
2997
2998         Caused missing image banners in iTunes store pages (Requested
2999         by smfr on #webkit).
3000
3001         Reverted changeset:
3002
3003         "FrameView::layoutTimerFired() should update style if needed
3004         before doing layout"
3005         https://bugs.webkit.org/show_bug.cgi?id=141688
3006         http://trac.webkit.org/changeset/180846
3007
3008 2015-03-05  Sandy Perez  <sperez@indaba.es>
3009
3010         Fix the build when NEON_INTRINSICS is enabled
3011         https://bugs.webkit.org/show_bug.cgi?id=142361
3012
3013         Reviewed by Csaba Osztrogonác.
3014
3015         * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
3016         (WebCore::FEBlend::platformApplySoftware):
3017         * platform/graphics/filters/FEGaussianBlur.cpp:
3018         (WebCore::standardBoxBlur):
3019
3020 2015-03-05  Benjamin Poulain  <bpoulain@apple.com>
3021
3022         Add basic support for character sets to the URL Filter parser
3023         https://bugs.webkit.org/show_bug.cgi?id=142257
3024
3025         Reviewed by Alex Christensen.
3026
3027         This patch is a first step toward making the URL filter parser a bit
3028         more powerful: it adds support for character set atom.
3029
3030         I did not attempt to integrate that into the prefix tree in this patch,
3031         instead, the GraphBuilder gets a two modes of generating the NFA:
3032         PrefixTree and DirectGeneration.
3033
3034         As long as we only see trivial atoms, we use the PrefixTree generation
3035         to minimize the number of nodes we need. As soon as we start a character
3036         class, we switch to DirectGeneration and we generate the NFA from the input
3037         without merging with previously seen patterns.
3038
3039         To differentiate between Trivial atoms and CharacterSet, we also gain
3040         an AtomType state.
3041
3042         The character set themself are very simple: each character is represented by
3043         a bit in a 16bytes bit vector.
3044
3045         * contentextensions/URLFilterParser.cpp:
3046         (WebCore::ContentExtensions::quantifyTrivialAtom):
3047         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
3048         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
3049         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
3050         (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
3051         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
3052         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
3053         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
3054         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassEnd):
3055         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
3056         (WebCore::ContentExtensions::GraphBuilder::sinkAtom):
3057         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
3058         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
3059         (WebCore::ContentExtensions::GraphBuilder::sinkCharacterSet):
3060         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
3061
3062 2015-03-05  Roger Fong  <roger_fong@apple.com>
3063
3064         Implement new fullscreen media controls on Mac.
3065         https://bugs.webkit.org/show_bug.cgi?id=142355.
3066         <rdar://problem/16175787>
3067
3068         Reviewed by Dean Jackson.
3069
3070         Adjust sizes and positioning of all fullscreen media control elements.
3071         * Modules/mediacontrols/mediaControlsApple.css:
3072         (audio::-webkit-media-controls-fullscreen-button.exit): Update to match entering fullscreen button.
3073         (video:-webkit-full-screen::-webkit-media-controls-panel):
3074         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
3075         (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
3076         (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
3077         (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
3078         (video:-webkit-full-screen::-webkit-media-controls-play-button):
3079         (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
3080         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
3081         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
3082         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
3083         (video:-webkit-full-screen::-webkit-media-controls-current-time-display):
3084         (video:-webkit-full-screen::-webkit-media-controls-time-remaining-display):
3085         (audio:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button):
3086         (video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb): Deleted.
3087         (video:-webkit-full-screen::-webkit-media-controls-rewind-button): Deleted. Not used in full screen.
3088
3089 2015-03-05  Roger Fong  <roger_fong@apple.com>
3090
3091         Minor touchups to inline media control icons.
3092         https://bugs.webkit.org/show_bug.cgi?id=142354.
3093         <rdar://problem/20058854>.
3094
3095         Reviewed by Brent Fulgham.
3096
3097         Increase sizes of play/pause and fullscreen buttons slightly.
3098         * Modules/mediacontrols/mediaControlsApple.css:
3099         (audio::-webkit-media-controls-play-button):
3100         (audio::-webkit-media-controls-play-button.paused):
3101         (audio::-webkit-media-controls-fullscreen-button):
3102
3103 2015-03-05  Roger Fong  <roger_fong@apple.com>
3104
3105         Update inline media control icons for OSX.
3106         https://bugs.webkit.org/show_bug.cgi?id=142305.
3107         <rdar://problem/19997484>
3108
3109         Reviewed by Dean Jackson.
3110
3111         Changes include: new volume button, new full screen button, new play/pause button.
3112         Repositioning of 30 second and play buttons.
3113         * Modules/mediacontrols/mediaControlsApple.css:
3114         (audio::-webkit-media-controls-panel button):
3115         (audio::-webkit-media-controls-rewind-button):
3116         (audio::-webkit-media-controls-play-button):
3117         (audio::-webkit-media-controls-play-button.paused):
3118         (audio::-webkit-media-controls-panel .mute-box):
3119         (video::-webkit-media-controls-volume-max-button):
3120         (video::-webkit-media-controls-volume-min-button):
3121         (audio::-webkit-media-controls-toggle-closed-captions-button):
3122         (audio::-webkit-media-controls-fullscreen-button):
3123         (audio::-webkit-media-controls-current-time-display):
3124         * Modules/mediacontrols/mediaControlsApple.js:
3125         (Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
3126         (Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
3127         (Controller.prototype.updateVolume): Ditto
3128
3129 2015-03-05  David Hyatt  <hyatt@apple.com>
3130
3131         Caps lock indicator in text fields is laying out in the wrong place.
3132         https://bugs.webkit.org/show_bug.cgi?id=142352
3133
3134         Reviewed by Dean Jackson.
3135
3136         * css/html.css:
3137         (input::-webkit-caps-lock-indicator):
3138         Change the CSS to give the SVG image an intrinsic size, and to use align-self:stretch so that
3139         the image always stretches to fill the height of the text box. Get rid of height:100%, as that
3140         just resolves to auto in strict mode and was not ever going to work there.
3141
3142 2015-03-04  Dean Jackson  <dino@apple.com>
3143
3144         [iOS Media] Use a blurry background for media controls
3145         https://bugs.webkit.org/show_bug.cgi?id=142316
3146         <rdar://problem/14911098>
3147
3148         Reviewed by Eric Carlson.
3149
3150         Start using the -webkit-appearance media-controls-light-bar-background
3151         in order to get the blurry background of media controls.
3152
3153         * Modules/mediacontrols/mediaControlsApple.js: Keep the panel and the
3154         panel background in sync when it comes to hiding and showing. It would
3155         be better if this could be done on a container element in the future.
3156         (Controller.prototype.handlePanelTransitionEnd):
3157         (Controller.prototype.setPlaying):
3158         (Controller.prototype.showControls):
3159         (Controller.prototype.hideControls):
3160
3161         * Modules/mediacontrols/mediaControlsiOS.css: New background container
3162         with the special appearance. I also renamed "composited-parent" to
3163         "container", which makes more sense.
3164         (video::-webkit-media-controls-panel-container):
3165         (audio::-webkit-media-controls-panel-container):
3166         (video::-webkit-media-controls-panel-background):
3167         (audio::-webkit-media-controls-panel-background):
3168         (video::-webkit-media-controls-panel-background.paused):
3169         (video::-webkit-media-controls-panel):
3170         (audio::-webkit-media-controls-panel):
3171         (video::-webkit-media-controls-panel.paused):
3172         (audio::-webkit-media-controls-optimized-fullscreen-button):
3173         (audio::-webkit-media-controls-timeline):
3174         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
3175         (video::-webkit-media-controls-panel-composited-parent): Deleted.
3176         (video::-webkit-media-controls-panel:hover): Deleted.
3177
3178         * Modules/mediacontrols/mediaControlsiOS.js:
3179         (ControllerIOS.prototype.createControls): Create the new background element.
3180         (ControllerIOS.prototype.addControls):
3181         (ControllerIOS.prototype.set pageScaleFactor): Temporarily disable
3182         this because the background disappears when the zoom factor
3183         is too high - we start tiling the background. This will be addressed
3184         by https://bugs.webkit.org/show_bug.cgi?id=142317.
3185
3186 2015-03-05  Myles C. Maxfield  <mmaxfield@apple.com>
3187
3188         Mechanical text-related cleanup
3189         https://bugs.webkit.org/show_bug.cgi?id=142326
3190
3191         Reviewed by Andreas Kling.
3192
3193         Use nullptr instead of 0.
3194         Use references instead of pointers.
3195
3196         No new tests because there is no behavior change.
3197
3198         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3199         (WebCore::FontCascade::adjustSelectionRectForComplexText):
3200         (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
3201         (WebCore::FontCascade::floatWidthForComplexText):
3202         (WebCore::FontCascade::offsetForPositionForComplexText):
3203         * platform/graphics/mac/ComplexTextController.cpp:
3204         (WebCore::TextLayout::TextLayout):
3205         (WebCore::ComplexTextController::ComplexTextController):
3206         * platform/graphics/mac/ComplexTextController.h:
3207         * rendering/InlineIterator.h:
3208         (WebCore::InlineIterator::InlineIterator):
3209         (WebCore::InlineIterator::clear):
3210         (WebCore::bidiNextShared):
3211         (WebCore::bidiNextSkippingEmptyInlines):
3212         (WebCore::bidiNextIncludingEmptyInlines):
3213         (WebCore::InlineWalker::InlineWalker):
3214         (WebCore::InlineIterator::increment):
3215         * rendering/RenderBlockLineLayout.cpp:
3216         (WebCore::setLogicalWidthForTextRun):
3217         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
3218         * rendering/line/BreakingContextInlineHeaders.h:
3219         (WebCore::measureHyphenWidth):
3220         (WebCore::textWidth):
3221         (WebCore::tryHyphenating):
3222         (WebCore::BreakingContext::handleText):
3223         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
3224
3225 2015-03-05  Brent Fulgham  <bfulgham@apple.com>
3226
3227         Move AxisScrollSnapAnimator logic to ScrollController
3228         https://bugs.webkit.org/show_bug.cgi?id=142293
3229         <rdar://problem/20039867>
3230
3231         Reviewed by Dean Jackson.
3232
3233         No change in function.
3234
3235         Move the animation logic out of 'AxisScrollSnapAnimator' into 'ScrollController'. Rename the remaining
3236         bits of 'AxisScrollSnapAnimator' as 'ScrollSnapAnimatorState'. Remove a number of delegate methods required
3237         by 'AxisScrollSnapAnimatorClient' that are no longer needed.
3238
3239         Also, break up some of the Scroll Snap Point math to be a little easier to understand.
3240
3241         * WebCore.xcodeproj/project.pbxproj: Rename 'platform/mac/AxisScrollSnapAnimator.{h,mm}' -> 'platform/cocoa/ScrollSnapAnimatorState.h'
3242         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Mark 'scrollOffsetOnAxis' as const.
3243         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3244         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Make 'const'
3245         * platform/ScrollAnimator.cpp:
3246         (WebCore::ScrollAnimator::scrollOffsetOnAxis): Make 'const'
3247         * platform/ScrollAnimator.h:
3248         * platform/cocoa/ScrollController.h: No longer subclass from AxisScrollSnapAnimatorClient.
3249         * platform/cocoa/ScrollController.mm:
3250         (WebCore::ScrollController::scrollSnapPointState): Added accessors (const and non-const) for the individual
3251         Scroll Snap State of each axis.
3252         (WebCore::toWheelEventStatus): Moved from AxisScrollSnapAnimator.
3253         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Added helper function containing the snap wheel handler code
3254         from AxisScrollSnapAnimator.
3255         (WebCore::ScrollController::shouldOverrideWheelEvent): Moved from AxisScrollSnapAnimator.
3256         (WebCore::ScrollController::processWheelEventForScrollSnap): Update to use new methods moved from AxisScrollSnapAnimator.
3257         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Update for new ScrollSnapAnimatorState class.
3258         (WebCore::ScrollController::updateScrollSnapPoints): Ditto.
3259         (WebCore::ScrollController::startScrollSnapTimer): Call client (delegate) method.
3260         (WebCore::ScrollController::stopScrollSnapTimer): Ditto.
3261         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Call new 'scrollSnapAnimationUpdate' method passing the
3262         correct axis to animate.
3263         (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
3264         (WebCore::ScrollController::scrollSnapAnimationUpdate): Moved from AxisScrollSnapAnimator.
3265         (WebCore::projectedInertialScrollDistance): Moved from AxisScrollSnapAnimator.
3266         (WebCore::ScrollController::initializeGlideParameters): Ditto.
3267         (WebCore::ScrollController::beginScrollSnapAnimation): Ditto.
3268         (WebCore::ScrollController::endScrollSnapAnimation): Ditto.
3269         (WebCore::snapProgress): Created a new function for this calculation to make reasoning about the 'computeSnapDelta' and
3270         'computeGlideDelta' easier.
3271         (WebCore::clampedSnapMagnitude): Ditto.
3272         (WebCore::ScrollController::computeSnapDelta): Moved from AxisScrollSnapAnimator.
3273         (WebCore::snapGlide): Created a new function for this calculation to make reasoning about the 'computeGlideDelta' easier.
3274         (WebCore::ScrollController::computeGlideDelta): Moved from AxisScrollSnapAnimator.
3275         (WebCore::ScrollController::scrollOffsetOnAxis): Deleted.
3276         (WebCore::ScrollController::immediateScrollOnAxis): Deleted.
3277         * platform/cocoa/ScrollSnapAnimatorState.h: Copied from platform/mac/AxisScrollSnapAnimator.h.
3278         (WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient): Deleted.
3279         * platform/cocoa/ScrollSnapAnimatorState.mm: Copied from platform/mac/AxisScrollSnapAnimator.mm.
3280         (WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState):
3281         (WebCore::ScrollSnapAnimatorState::pushInitialWheelDelta):
3282         (WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta):
3283         (WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow):
3284         (WebCore::toWheelEventStatus): Deleted.
3285         (WebCore::projectedInertialScrollDistance): Deleted.
3286         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Deleted.
3287         (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Deleted.
3288         (WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Deleted.
3289         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Deleted.
3290         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Deleted.
3291         (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation): Deleted.
3292         (WebCore::AxisScrollSnapAnimator::computeSnapDelta): Deleted.
3293         (WebCore::AxisScrollSnapAnimator::computeGlideDelta): Deleted.
3294         (WebCore::AxisScrollSnapAnimator::initializeGlideParameters): Deleted.
3295         (WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta): Deleted.
3296         (WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta): Deleted.
3297         (WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow): Deleted.
3298         * platform/mac/AxisScrollSnapAnimator.h: Removed.
3299         * platform/mac/AxisScrollSnapAnimator.mm: Removed.
3300         * platform/mac/ScrollAnimatorMac.h:
3301         * platform/mac/ScrollAnimatorMac.mm:
3302         (WebCore::ScrollAnimatorMac::pinnedInDirection): Removed.
3303
3304 2015-03-04  Dean Jackson  <dino@apple.com>
3305
3306         [iOS Media] Small inline controls can clip the time widgets
3307         https://bugs.webkit.org/show_bug.cgi?id=142319
3308
3309         Reviewed by Eric Carlson.
3310
3311         Start counting the number of digits in a duration so that
3312         we can assign classes to the time widgets that specify
3313         a minimum width.
3314
3315         * Modules/mediacontrols/mediaControlsApple.css: Replace the hour-long and ten-hour-long
3316         classes with number of digits.
3317         (audio::-webkit-media-controls-time-remaining-display.five-digit-time):
3318         (audio::-webkit-media-controls-current-time-display.five-digit-time):
3319         (audio::-webkit-media-controls-time-remaining-display.six-digit-time):
3320         (audio::-webkit-media-controls-current-time-display.six-digit-time):
3321         (audio::-webkit-media-controls-time-remaining-display.hour-long-time): Deleted.
3322         (audio::-webkit-media-controls-current-time-display.hour-long-time): Deleted.
3323         (audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time): Deleted.
3324         (audio::-webkit-media-controls-current-time-display.ten-hour-long-time): Deleted.
3325
3326         * Modules/mediacontrols/mediaControlsApple.js: Add some new class names.
3327         (Controller.prototype.updateDuration): Set the class of the time
3328         widgets when we know how long the media runs.
3329
3330         * Modules/mediacontrols/mediaControlsiOS.css: Values for iOS that
3331         are big enough to avoid clipping.
3332         (video::-webkit-media-controls-current-time-display):
3333         (video::-webkit-media-controls-time-remaining-display):
3334         (video::-webkit-media-controls-current-time-display.three-digit-time):
3335         (video::-webkit-media-controls-time-remaining-display.three-digit-time):
3336         (video::-webkit-media-controls-current-time-display.four-digit-time):
3337         (video::-webkit-media-controls-time-remaining-display.four-digit-time):
3338         (video::-webkit-media-controls-current-time-display.five-digit-time):
3339         (video::-webkit-media-controls-time-remaining-display.five-digit-time):
3340         (video::-webkit-media-controls-current-time-display.six-digit-time):
3341         (video::-webkit-media-controls-time-remaining-display.six-digit-time):
3342         (audio::-webkit-media-controls-timeline-container): Deleted.
3343         (video::-webkit-media-text-track-container): Deleted.
3344
3345 2015-03-05  Csaba Osztrogonác  <ossy@webkit.org>
3346
3347         [cmake] Fix the web replay build
3348         https://bugs.webkit.org/show_bug.cgi?id=142331
3349
3350         Reviewed by Gyuyoung Kim.
3351
3352         * CMakeLists.txt:
3353         * inspector/InspectorReplayAgent.cpp:
3354         (WebCore::buildInspectorObjectForSessionState):
3355         (WebCore::buildInspectorObjectForSegmentState):
3356
3357 2015-03-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3358
3359         [SOUP] Check TLS errors as soon as they are set in the SoupMessage
3360         https://bugs.webkit.org/show_bug.cgi?id=142244
3361
3362         Reviewed by Sergio Villar Senin.
3363
3364         Connect to the notify::tls-errors signal of SoupMessage to cancel
3365         the load earlier in case of TLS failure, preventing any private
3366         data from being sent to the server before the TLS errors are checked.
3367
3368         * platform/network/soup/ResourceHandleSoup.cpp:
3369         (WebCore::tlsErrorsChangedCallback):
3370         (WebCore::gotHeadersCallback):
3371         (WebCore::createSoupMessageForHandleAndRequest):
3372
3373 2015-03-05  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3374
3375         TextCheckingParagraph::isEmpty() is sufficient to check whether paragraph is empty
3376         https://bugs.webkit.org/show_bug.cgi?id=142276
3377
3378         Reviewed by Darin Adler.
3379
3380         TextCheckingParagraph::isEmpty() already calls TextCheckingParagraph::isRangeEmpty().
3381         There is no need to call them both at the caller site.
3382
3383         No new tests. No behavior change.
3384
3385         * editing/Editor.cpp:
3386         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
3387         Update caller site.
3388
3389         * editing/TextCheckingHelper.cpp:
3390         (WebCore::TextCheckingParagraph::isEmpty):
3391         Avoid using helepers here to get rid of them as they are
3392         no longer needed outside TextCheckingParagraph.
3393
3394         * editing/TextCheckingHelper.h:
3395         (WebCore::TextCheckingParagraph::isTextEmpty): Deleted.
3396         (WebCore::TextCheckingParagraph::isRangeEmpty): Deleted.
3397         Do not expose isTextEmpty() and isRangeEmpty().
3398
3399 2015-03-04  Simon Fraser  <simon.fraser@apple.com>
3400
3401         Clarify RenderElement::adjustStyleDifference()
3402         https://bugs.webkit.org/show_bug.cgi?id=142256
3403
3404         Reviewed by David Hyatt.
3405
3406         Make RenderElement::adjustStyleDifference() clearer in two ways.
3407         
3408         First, replace lots of if (diff < X) diff = X with
3409         diff = std::max(diff, X). I did this even in cases where diff was
3410         being set unconditionally, because it's never correct to change the diff
3411         to a lesser value.
3412         
3413         Second the "set at least SimplifiedLayout, but if we have PositionedMovementOnly
3414         set it to SimplifiedLayoutAndPositionedMovement" was confusingly written.
3415
3416         * rendering/RenderElement.cpp:
3417         (WebCore::RenderElement::adjustStyleDifference):
3418
3419 2015-03-04  David Kilzer  <ddkilzer@apple.com>
3420
3421         Switch new soft-linking debug asserts to release asserts
3422         <http://webkit.org/b/142176>
3423
3424         Reviewed by Alex Christensen.
3425
3426         * platform/mac/SoftLinking.h:
3427         (SOFT_LINK_CONSTANT_SOURCE): Switch to release assert.
3428         (SOFT_LINK_FUNCTION_SOURCE): Ditto.
3429         * platform/win/SoftLinking.h:
3430         (SOFT_LINK_CONSTANT_SOURCE): Ditto.
3431         (SOFT_LINK_FUNCTION_SOURCE): Ditto.  Note that this method is
3432         effectively only called once because the function pointer is
3433         replaced after the first time it's called.
3434
3435 2015-03-04  Alex Christensen  <achristensen@webkit.org>
3436
3437         Optimize content extensions.
3438         https://bugs.webkit.org/show_bug.cgi?id=142295
3439
3440         Reviewed by Benjamin Poulain.
3441
3442         * contentextensions/ContentExtensionCompiler.cpp:
3443         (WebCore::ContentExtensions::serializeActions):
3444         There is no need to add duplicate sequential actions.
3445         * contentextensions/ContentExtensionRule.h:
3446         (WebCore::ContentExtensions::Action::operator==):
3447         Added to compare actions.
3448         * contentextensions/ContentExtensionsBackend.cpp:
3449         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
3450         Return early if a block action is found instead of moving to the next extension.
3451
3452 2015-03-04  Commit Queue  <commit-queue@webkit.org>
3453
3454         Unreviewed, rolling out r181046.
3455         https://bugs.webkit.org/show_bug.cgi?id=142318
3456
3457         Broke two layout tests (Requested by sundiamonde on #webkit).
3458
3459         Reverted changeset:
3460
3461         "Update inline media control icons for OSX."
3462         https://bugs.webkit.org/show_bug.cgi?id=142305
3463         http://trac.webkit.org/changeset/181046
3464
3465 2015-03-04  Timothy Horton  <timothy_horton@apple.com>
3466
3467         <attachment> icons are low-resolution when transformed or under page scale
3468         https://bugs.webkit.org/show_bug.cgi?id=142262
3469         <rdar://problem/20035480>
3470
3471         Reviewed by Dean Jackson.
3472
3473         We should use Icon::createIconForFiles, just like <input type="file"> does,
3474         instead of directly talking to IconServices. This results both in less code
3475         and in NSImage's multiresolution magic making the icons sharp even under
3476         the influence of transforms and page scale.
3477
3478         * WebCore.xcodeproj/project.pbxproj:
3479         * platform/spi/mac/IconServicesSPI.h: Removed.
3480         * platform/spi/mac/LaunchServicesSPI.h: Removed.
3481         Get rid of IconServicesSPI.h and LaunchServicesSPI.h.
3482
3483         * platform/graphics/Icon.h:
3484         Include RetainPtr just once.
3485         paint() should take a GraphicsContext reference (null is not an option)
3486         and a FloatRect (after all, it just turns around and converts to NSRect).
3487
3488         * platform/graphics/ios/IconIOS.mm:
3489         (WebCore::Icon::paint):
3490         * platform/graphics/mac/IconMac.mm:
3491         (WebCore::Icon::createIconForFiles):
3492         (WebCore::Icon::paint):
3493         * platform/graphics/efl/IconEfl.cpp:
3494         (WebCore::Icon::paint):
3495         * platform/graphics/gtk/IconGtk.cpp:
3496         (WebCore::Icon::paint):
3497         * platform/graphics/win/IconWin.cpp:
3498         (WebCore::Icon::paint):
3499         Adapt to the paint() signature changes, fix some style, etc.
3500
3501         * rendering/RenderFileUploadControl.cpp:
3502         (WebCore::RenderFileUploadControl::paintObject):
3503         * rendering/RenderThemeIOS.mm:
3504         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
3505         Adapt to the paint() signature changes.
3506
3507         * rendering/RenderThemeMac.mm:
3508         (WebCore::paintAttachmentIcon):
3509         Use Icon::createIconForFiles instead of IconServices.
3510
3511 2015-03-04  Tim Horton  <timothy_horton@apple.com>
3512
3513         <attachment> should not appear selected when the cursor is adjacent to it
3514         https://bugs.webkit.org/show_bug.cgi?id=142311
3515         <rdar://problem/20045862>
3516
3517         Reviewed by Dean Jackson.
3518
3519         * rendering/RenderAttachment.cpp:
3520         (WebCore::RenderAttachment::isSelected): Deleted.
3521         * rendering/RenderAttachment.h:
3522         * rendering/RenderThemeMac.mm:
3523         (WebCore::titleTextColorForAttachment):
3524         (WebCore::RenderThemeMac::paintAttachment):
3525         (WebCore::labelTextColorForAttachment): Deleted.
3526         We were using the wrong (and far too complicated) mechanism to determine
3527         if the attachment is selected (to decide which highlight color to use).
3528         Instead, just check selectionState().
3529
3530 2015-03-04  Timothy Horton  <timothy_horton@apple.com>
3531
3532         <attachment> should show the file size as detail text below the icon
3533         https://bugs.webkit.org/show_bug.cgi?id=142261
3534         <rdar://problem/20009570>
3535
3536         Reviewed by Dean Jackson.
3537
3538         Test: fast/attachment/attachment-subtitle.html
3539
3540         * html/HTMLAttachmentElement.cpp:
3541         (WebCore::HTMLAttachmentElement::setFile):
3542         (WebCore::HTMLAttachmentElement::parseAttribute):
3543         * html/HTMLAttachmentElement.h:
3544         Let RenderAttachment know when the subtitle attribute changes.
3545
3546         * html/HTMLAttributeNames.in:
3547         Add a subtitle attribute.
3548
3549         * rendering/RenderAttachment.cpp:
3550         (WebCore::RenderAttachment::invalidate):
3551         (WebCore::RenderAttachment::representedFileChanged): Deleted.
3552         * rendering/RenderAttachment.h:
3553         Rename representedFileChanged to invalidate; it will cause layout and
3554         repaint of the attachment. Mostly for use from HTMLAttachmentElement,
3555         when properties that affect the display and/or intrinsic size change.
3556
3557         * rendering/RenderThemeMac.mm:
3558         (WebCore::attachmentTitleInactiveBackgroundColor):
3559         (WebCore::attachmentTitleInactiveTextColor):
3560         (WebCore::attachmentSubtitleTextColor):
3561         (WebCore::titleTextColorForAttachment):
3562         (WebCore::AttachmentLayout::addTitleLine):
3563         (WebCore::AttachmentLayout::layOutTitle):
3564         (WebCore::AttachmentLayout::layOutSubtitle):
3565         (WebCore::AttachmentLayout::AttachmentLayout):
3566         (WebCore::addAttachmentTitleBackgroundRightCorner):
3567         (WebCore::addAttachmentTitleBackgroundLeftCorner):
3568         (WebCore::paintAttachmentTitleBackground):
3569         (WebCore::paintAttachmentTitle):
3570         (WebCore::paintAttachmentSubtitle):
3571         (WebCore::RenderThemeMac::paintAttachment):
3572         (WebCore::attachmentLabelInactiveBackgroundColor): Deleted.
3573         (WebCore::attachmentLabelInactiveTextColor): Deleted.
3574         (WebCore::labelTextColorForAttachment): Deleted.
3575         (WebCore::AttachmentLayout::addLine): Deleted.
3576         (WebCore::AttachmentLayout::layOutLabel): Deleted.
3577         (WebCore::addAttachmentLabelBackgroundRightCorner): Deleted.
3578         (WebCore::addAttachmentLabelBackgroundLeftCorner): Deleted.
3579         (WebCore::paintAttachmentLabelBackground): Deleted.
3580         (WebCore::paintAttachmentLabel): Deleted.
3581         Rename everything "label" to "title" (except LabelLine, which is not
3582         specifically about the title). We're going to use "title" for the
3583         main text below the icon, and "subtitle" for the secondary text below that.
3584
3585         Avoid keeping the CTFonts on the AttachmentLayout; there's no need for it.
3586
3587         Add layOutSubtitle and paintAttachmentSubtitle, which orient and paint
3588         the subtitle (below the title, in blue, smaller than the label).
3589
3590 2015-03-04  David Kilzer  <ddkilzer@apple.com>
3591
3592         [Windows] Build fix: Make sure to include <CoreMedia/CoreMedia.h> before redefining CMSampleBuffer
3593
3594         More fallout from:
3595
3596         Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
3597         <http://webkit.org/b/141870>
3598
3599         * platform/cf/CoreMediaSoftLink.cpp:
3600         * platform/cf/CoreMediaSoftLink.h:
3601         - Remove include of <CoreMedia/CoreMedia.h> here.  These already
3602           include CoreMediaSPI.h.
3603         * platform/spi/cf/CoreMediaSPI.h:
3604         - Add include of <CoreMedia/CoreMedia.h> here.
3605         - Remove redundant include of <CoreMedia/CMTime.h> for Windows.
3606
3607 2015-03-04  David Kilzer  <ddkilzer@apple.com>
3608
3609         [iOS] Fix build with newer clang due to duplicate macro definition
3610
3611         Fallout from:
3612
3613         Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
3614         <http://webkit.org/b/141870>
3615
3616         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3617         Remove duplicate kCMTimeIndefinite macro.
3618
3619 2015-03-04  Roger Fong  <roger_fong@apple.com>
3620
3621         Update inline media control icons for OSX.
3622         https://bugs.webkit.org/show_bug.cgi?id=142305.
3623         <rdar://problem/19997484>
3624
3625         Reviewed by Dean Jackson.
3626
3627         Changes include: new volume button, new full screen button, new play/pause button.
3628         Repositioning of 30 second and play buttons.
3629         * Modules/mediacontrols/mediaControlsApple.css:
3630         (audio::-webkit-media-controls-panel button):
3631         (audio::-webkit-media-controls-rewind-button):
3632         (audio::-webkit-media-controls-play-button):
3633         (audio::-webkit-media-controls-play-button.paused):
3634         (audio::-webkit-media-controls-panel .mute-box):
3635         (video::-webkit-media-controls-volume-max-button):
3636         (video::-webkit-media-controls-volume-min-button):
3637         (audio::-webkit-media-controls-toggle-closed-captions-button):
3638         (audio::-webkit-media-controls-fullscreen-button):
3639         (audio::-webkit-media-controls-current-time-display):
3640         * Modules/mediacontrols/mediaControlsApple.js:
3641         (Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
3642         (Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
3643         (Controller.prototype.updateVolume): Ditto
3644
3645 2015-03-04  Andy Estes  <aestes@apple.com>
3646
3647         [Content Filtering] Rename ContentFilterMac.mm to ContentFilter.cpp
3648         https://bugs.webkit.org/show_bug.cgi?id=142313
3649
3650         Reviewed by Anders Carlsson.
3651
3652         ContentFilterMac.mm no longer contains any Objective-C code, so rename it to ContentFilter.cpp. It is also no longer Mac-specific, so move it up to platform/.
3653
3654         * WebCore.xcodeproj/project.pbxproj:
3655         * platform/ContentFilter.cpp: Renamed from Source/WebCore/platform/mac/ContentFilterMac.mm.
3656         * platform/cocoa/NetworkExtensionContentFilter.h: Replaced NSInteger with long.
3657
3658 2015-03-04  Dean Jackson  <dino@apple.com>
3659
3660         REGRESSION (r179597): Can't see power saver banner for plugins
3661         https://bugs.webkit.org/show_bug.cgi?id=142312
3662         <rdar://problem/20040517>
3663
3664         Reviewed by Brent Fulgham.
3665
3666         We were being a bit too restrictive when deciding a child
3667         should not create a renderer. All shadow root children
3668         of the snapshotted plugin need one.
3669
3670         * html/HTMLPlugInImageElement.cpp:
3671         (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
3672         Test if we're part of the shadow tree.
3673
3674 2015-03-03  Andy Estes  <aestes@apple.com>
3675
3676         [Content Filtering] Make it easier to add new content filters
3677         https://bugs.webkit.org/show_bug.cgi?id=142255
3678
3679         Reviewed by Sam Weinig.
3680
3681         ContentFilter was becoming a bit of a mess, with both the WebFilterEvaluator and NEFilterSource implementations
3682         awkwardly living side-by-side. This patch cleans things up by moving these implementations into two separate
3683         classes and turning ContentFilter itself into an abstract interface that each implements. A new class called
3684         ContentFilterCollection, which also inherits from ContentFilter, manages the collection of individual content
3685         filters and is vended to the rest of the system by ContentFilter::createIfNeeded().
3686
3687         This refactoring will make it easier to add a third type of content filter in a follow-on patch, namely a mock
3688         content filter for testing purposes.
3689
3690         * WebCore.xcodeproj/project.pbxproj:
3691         * loader/DocumentLoader.cpp:
3692         (WebCore::DocumentLoader::responseReceived): Called ContentFilter::createIfNeeded() instead of instantiating a ContentFilter directly.
3693         * platform/ContentFilter.h:
3694         (WebCore::ContentFilter::~ContentFilter):
3695         * platform/cocoa/NetworkExtensionContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
3696         * platform/cocoa/NetworkExtensionContentFilter.mm: Added.
3697         (WebCore::NetworkExtensionContentFilter::canHandleResponse): Moved NEFilterSource code from ContentFilterMac.mm to here.
3698         (WebCore::NetworkExtensionContentFilter::create): Ditto.
3699         (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Ditto.
3700         (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Ditto.
3701         (WebCore::NetworkExtensionContentFilter::addData): Ditto.
3702         (WebCore::NetworkExtensionContentFilter::finishedAddingData): Ditto.
3703         (WebCore::NetworkExtensionContentFilter::needsMoreData): Ditto.
3704         (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
3705         (WebCore::NetworkExtensionContentFilter::getReplacementData): Ditto.
3706         (WebCore::NetworkExtensionContentFilter::unblockHandler): Ditto.
3707         * platform/cocoa/ParentalControlsContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
3708         * platform/cocoa/ParentalControlsContentFilter.mm: Added.
3709         (WebCore::ParentalControlsContentFilter::canHandleResponse): Moved WebFilterEvaluator code from ContentFilterMac.mm to here.
3710         (WebCore::ParentalControlsContentFilter::create): Ditto.
3711         (WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Ditto.
3712         (WebCore::ParentalControlsContentFilter::addData): Ditto.
3713         (WebCore::ParentalControlsContentFilter::finishedAddingData): Ditto.
3714         (WebCore::ParentalControlsContentFilter::needsMoreData): Ditto.
3715         (WebCore::ParentalControlsContentFilter::didBlockData): Ditto.
3716         (WebCore::ParentalControlsContentFilter::getReplacementData): Ditto.
3717         (WebCore::ParentalControlsContentFilter::unblockHandler): Ditto.
3718         * platform/mac/ContentFilterMac.mm:
3719         (WebCore::contentFilterType): Added a helper function template that creates a new ContentFilterType.
3720         (WebCore::contentFilterTypes): Registered a ContentFilterType for each type of content filter.
3721         (WebCore::ContentFilter::createIfNeeded): Created a ContentFilterCollection containing each content filter that can handle the given response.
3722         (WebCore::ContentFilterCollection::ContentFilterCollection): Constructs a ContentFilterCollection given a Vector of content filters.
3723         (WebCore::ContentFilterCollection::addData): Forwarded the call to each content filter in m_contentFilters.
3724         (WebCore::ContentFilterCollection::finishedAddingData): Ditto.
3725         (WebCore::ContentFilterCollection::needsMoreData): Ditto.
3726         (WebCore::ContentFilterCollection::didBlockData): Ditto.
3727         (WebCore::ContentFilterCollection::getReplacementData): Returned replacement data for the first filter that blocked the load.
3728         If no filter blocked the load, returned the first filter's replacement data.
3729         (WebCore::ContentFilterCollection::unblockHandler): Returned the unblock handler for the first filter that blocked the load.
3730         (WebCore::ContentFilter::ContentFilter): Deleted.
3731         (WebCore::ContentFilter::~ContentFilter): Deleted.
3732         (WebCore::ContentFilter::canHandleResponse): Deleted.
3733         (WebCore::ContentFilter::addData): Deleted.
3734         (WebCore::ContentFilter::finishedAddingData): Deleted.
3735         (WebCore::ContentFilter::needsMoreData): Deleted.
3736         (WebCore::ContentFilter::didBlockData): Deleted.
3737         (WebCore::ContentFilter::getReplacementData): Deleted.
3738         (WebCore::ContentFilter::unblockHandler): Deleted.
3739
3740 2015-03-04  David Kilzer  <ddkilzer@apple.com>
3741
3742         Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
3743         <http://webkit.org/b/141870>
3744
3745         Reviewed by Alex Christensen.
3746
3747         * Configurations/WebCore.unexp:
3748         - Remove all weak symbols for CoreMedia.framework as they should
3749           no longer appear.
3750
3751         * Modules/plugins/QuickTimePluginReplacement.mm:
3752         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
3753         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3754         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3755         - Clean up headers.
3756
3757         * platform/cf/CoreMediaSoftLink.cpp:
3758         * platform/cf/CoreMediaSoftLink.h:
3759         - Add soft-link functions and constants from remaining source
3760           files.
3761
3762         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3763         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3764         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3765         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
3766         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3767         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3768         * platform/mac/PlatformClockCM.mm:
3769         * platform/mediastream/mac/AVMediaCaptureSource.mm:
3770         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3771         - Switch to using CoreMediaSoftLink.h.
3772
3773         * platform/mac/SoftLinking.h:
3774         * platform/win/SoftLinking.h:
3775         - Remove 'const' from SOFT_LINK_CONSTANT_{HEADER,SOURCE}()
3776           macros since it won't work with const structs.
3777
3778         * platform/spi/cf/CoreMediaSPI.h:
3779         - Add SPI declarations for Windows originally from
3780           InbandTextTrackPrivateAVF.cpp.
3781
3782 2015-03-04  Commit Queue  <commit-queue@webkit.org>
3783
3784         Unreviewed, rolling out r181001 and r181003.
3785         https://bugs.webkit.org/show_bug.cgi?id=142307
3786
3787         Broke many tests (Requested by ap on #webkit).
3788
3789         Reverted changesets:
3790
3791         "Make JavaScript binding get and set legacy event listener
3792         attributes directly"
3793         https://bugs.webkit.org/show_bug.cgi?id=142282
3794         http://trac.webkit.org/changeset/181001
3795
3796         "Update bindings tests after r181001."
3797         http://trac.webkit.org/changeset/181003
3798
3799 2015-03-04  Roger Fong  <roger_fong@apple.com>
3800
3801         Update elapsed/remaining time displays on media inline controls on OSX.
3802         https://bugs.webkit.org/show_bug.cgi?id=142264.
3803         <rdar://problem/19997487>
3804
3805         Reviewed by Dean Jackson.
3806
3807         Div surrounding times are set widths. A larger width is used for times that are
3808         an hour or longer. Time elapsed is right justified. Time remaining is left justified.
3809         Times are displayed in 11pt Helvetica Neue.
3810         * Modules/mediacontrols/mediaControlsApple.css:
3811         (audio::-webkit-media-controls-time-remaining-display):
3812         (audio::-webkit-media-controls-current-time-display):
3813         (audio::-webkit-media-controls-time-remaining-display.hour-long-time):
3814         (audio::-webkit-media-controls-current-time-display.hour-long-time):
3815         (audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time):
3816         (audio::-webkit-media-controls-current-time-display.ten-hour-long-time):
3817         * Modules/mediacontrols/mediaControlsApple.js:
3818         (Controller.prototype.updateDuration):
3819
3820 2015-03-04  Myles C. Maxfield  <mmaxfield@apple.com>
3821
3822         Implement -apple-trailing-word: -apple-partially-balanced
3823         https://bugs.webkit.org/show_bug.cgi?id=142253
3824
3825         Reviewed by David Hyatt.
3826
3827         This patch implements a history mechanism for line breaking. In particular, this patch partitions
3828         the updates to the current line breaking location into two kinds: conceptually new breaking locations,
3829         and fixups to existing locations. Then, this patch remembers all the fixed up breaking locations, up
3830         to a maximum number of remembered locations.
3831
3832         The patch then uses this memory to change the line-breaking selection based on the rules of
3833         -apple-trailing-word.
3834
3835         Test: fast/text/trailing-word.html
3836
3837         * rendering/line/BreakingContextInlineHeaders.h:
3838         Use InlineIteratorHistory as a proxy for the current breaking location. Note that all these functions
3839         are inlined, so the overhead should be next to nothing when -apple-trailing-word is not in use.
3840         (WebCore::BreakingContext::BreakingContext): Use InlineIteratorHistory instead of InlineIterator
3841         (WebCore::BreakingContext::lineBreak): Ditto.
3842         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine): Ditto
3843         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth): Ditto
3844         (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Keeps track of historical
3845         breaking locations
3846         (WebCore::BreakingContext::InlineIteratorHistory::push): Remember a new breaking location
3847         (WebCore::BreakingContext::InlineIteratorHistory::update): Update an existing breaking location
3848         (WebCore::BreakingContext::InlineIteratorHistory::renderer): Forwarded to the current breaking location
3849         (WebCore::BreakingContext::InlineIteratorHistory::offset): Ditto
3850         (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):  Ditto
3851         (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode): Ditto
3852         (WebCore::BreakingContext::InlineIteratorHistory::get): Get one of the remembered breaking locations
3853         (WebCore::BreakingContext::InlineIteratorHistory::current): Get the current breaking location
3854         (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
3855         (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Forwarded to the current breaking location.
3856         (WebCore::BreakingContext::InlineIteratorHistory::increment): Ditto
3857         (WebCore::BreakingContext::InlineIteratorHistory::clear): Ditto
3858         (WebCore::BreakingContext::handleBR): Use InlineIteratorHistory instead of InlineIterator
3859         (WebCore::BreakingContext::handleFloat): Ditto
3860         (WebCore::BreakingContext::handleText): Use InlineIteratorHistory instead of InlineIterator
3861         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): Style
3862         (WebCore::checkMidpoints): Use InlineIteratorHistory instead of InlineIterator
3863         (WebCore::BreakingContext::handleEndOfLine): If -apple-trailing-word is in effect, use
3864         optimalLineBreakLocationForTrailingWord().
3865         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Use the remembered breaking
3866         locations and choose the optimal one.
3867         (WebCore::BreakingContext::lineBreakRef): Deleted.
3868
3869 2015-03-04  Timothy Horton  <timothy_horton@apple.com>
3870
3871         <attachment> title text disappears when dragging
3872         https://bugs.webkit.org/show_bug.cgi?id=142263
3873         <rdar://problem/20035515>
3874
3875         Reviewed by Sam Weinig.
3876
3877         * rendering/RenderThemeMac.mm:
3878         (WebCore::RenderThemeMac::paintAttachment):
3879         We use NSColors with CoreText, which requires that Cocoa knows the current
3880         CGContext out-of-band (through the NSGraphicsContext currentContext mechanism).
3881         Otherwise, sometimes (especially when dragging), it will try to apply the
3882         text foreground color to a null context, complain to the system log, and fail
3883         to render the text.
3884
3885 2015-03-04  Jer Noble  <jer.noble@apple.com>
3886
3887         [Mac] YouTube playback at 1.5x speed has audible distortion
3888         https://bugs.webkit.org/show_bug.cgi?id=142280
3889
3890         Reviewed by Eric Carlson.
3891
3892         Use the high-quality AVAudioTimePitchAlgorithmSpectral algorithm for the 
3893         AVSampleBufferAudioRenderer rather than its default value of 
3894         AVAudioTimePitchAlgorithmTimeDomain.
3895
3896         Drive-by fix:
3897
3898         Might as well add support for MediaPlayer::setPreservesPitch() while we're
3899         changing the audio pitch algorithm. If preservesPitch() is false use the
3900         AVAudioTimePitchAlgorithmVarispeed algorithm in both AVFObjC-based media players
3901         (MediaPlayerPrivateAVFoundationObjC & MediaPlayerPrivateMediaSourceAVFObjC).
3902
3903         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3904         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3905         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
3906         (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch):
3907         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Deleted.
3908         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3909         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3910         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
3911         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
3912
3913 2015-03-04  Jer Noble  <jer.noble@apple.com>
3914
3915         [MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors to be emitted
3916         https://bugs.webkit.org/show_bug.cgi?id=142285
3917
3918         Reviewed by Eric Carlson.
3919
3920         When a MediaKeySession (backed by CDMSessionMediaSourceAVFObjC) is closed and the
3921         underlying AVStreamSession is invalidated, the decryption context for in-flight
3922         CMSampleBuffers is also invalidated, and the AVSampleBufferDisplayLayer will issue
3923         one error for each enqueued and un-displayed sample in its image-queue. -flush-ing
3924         the AVSampleBufferDisplayLayer is not enough, as the flush only takes effect
3925         asynchronously the next time the layer needs new samples.
3926
3927         Add a workaround until framework-level support lands to fully flush enqueued and
3928         encrypted frames.
3929
3930         When the CDMSessionMediaSOurceAVFObjC object recieves an error from the layer,
3931         check to see if the session has been stopped. If so, and if the error in question is
3932         one that indicates that the samples decryption context has been invalidated, suppress
3933         the error and instruct the sender to suppress the error as well. This workaround will
3934         be removed once real support for synchronous flushing lands in <rdar://problem/20027434.>
3935
3936         Still, we'll make our best effort to flush undisplayed frames when our CDM session is
3937         invalidated. Move away from std::map and instead use HashMap to store the set of 
3938         AVSampleBufferAudioRenderers. This allows us to use C++11 style loops against just
3939         the HashMap's set of values.
3940
3941         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3942         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3943         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Flush and set m_stopped.
3944         (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Check m_stopped and the
3945             error code and bail before issuing the error.
3946         (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
3947         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3948         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3949         (-[WebAVSampleBufferErrorListener layerFailedToDecode:]): Drive-by fix. Check whether
3950             the layer is in the set of listened-to layers only back in the main thread; the
3951             listnener may have been unregistered by the time the main thread was called.
3952         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): std::map -> HashMap.
3953         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
3954         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
3955         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
3956         (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
3957         (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
3958         (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
3959         (WebCore::SourceBufferPrivateAVFObjC::flush): Added; call -flush on all the display
3960             layers and audio renderers.
3961         (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Check if any clients
3962             asked to ignore the error, and if so, bail.
3963         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Ditto.
3964
3965 2015-03-04  Alex Christensen  <achristensen@webkit.org>
3966
3967         Update bindings tests after r181001.
3968
3969         * bindings/scripts/test/JS/*.cpp:
3970         Class names changed to auto.
3971
3972 2015-03-04  Brent Fulgham  <bfulgham@apple.com>
3973
3974         [Win] Missing dependency checking in DerivedSources.make for FeatureDefines.props
3975         https://bugs.webkit.org/show_bug.cgi?id=142284
3976
3977         Reviewed by David Kilzer.
3978
3979         Make DerivedSources.make understand its build dependency on FeatureDefines.props
3980         when building on Windows:
3981         1. Modify DerivedSources.make to declare a default dependency (on Windows)
3982            to $(WEBKIT_LIBRARIES)/tools/vsprops/FeatureDefines.props.
3983         2. Update the Windows script 'build-generated-files.pl' to specify the correct
3984            FeatureDefines{Cairo}.props value to use, depending on build environment.
3985
3986         * DerivedSources.make:
3987    &nb