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