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