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