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