The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-30  Ada Chan  <adachan@apple.com>
2
3         The Page's muted setting should not affect the HTMLMediaElement's 'muted' IDL attribute.
4         https://bugs.webkit.org/show_bug.cgi?id=138215
5
6         Reviewed by Eric Carlson.
7
8         Add m_muted in Page to keep track of the Page's muted state. Change AudioProducer::setMuted()
9         to pageMutedStateDidChange(). When that method is called, the AudioProducer is supposed to
10         update its muted state again taking the Page's muted state into account.
11
12         Add HTMLMediaElement::effectiveMuted(), which returns the effective muted state of the
13         HTMLMediaElement, taking the Page's muted state into account.
14
15         Test: media/video-muted-after-setting-page-muted-state.html
16
17         * dom/Document.cpp:
18         (WebCore::Document::pageMutedStateDidChange):
19         (WebCore::Document::setMuted): Deleted.
20         * dom/Document.h:
21         * html/HTMLMediaElement.cpp:
22         (WebCore::HTMLMediaElement::setMuted):
23         Set the MediaPlayer's muted state to the result of effectiveMuted() rather than m_muted.
24         (WebCore::HTMLMediaElement::updateVolume):
25         Ditto, and also make sure the MediaController's muted state does not override the Page's
26         muted state.
27         (WebCore::HTMLMediaElement::updatePlayState):
28         Set the MediaPlayer's muted state to the result of effectiveMuted() rather than muted().
29         (WebCore::HTMLMediaElement::pageMutedStateDidChange):
30         Call updateVolume(), which will update the MediaPlayer's muted state.
31         (WebCore::HTMLMediaElement::effectiveMuted):
32         Figure out the muted value taking Page's muted state into account.
33         * html/HTMLMediaElement.h:
34         * page/AudioProducer.h:
35         * page/Page.cpp:
36         (WebCore::Page::Page):
37         (WebCore::Page::setMuted):
38         Update m_muted, and only iterate through the frames' documents to call pageMutedStateDidChange()
39         if m_muted changes.
40         * page/Page.h:
41         (WebCore::Page::isMuted):
42         * testing/Internals.cpp:
43         (WebCore::Internals::setPageMuted):
44         Expose a way to set the Page's muted state in Internals for testing.
45         * testing/Internals.h:
46         * testing/Internals.idl:
47
48 2014-10-30  Myles C. Maxfield  <mmaxfield@apple.com>
49
50         Use references in calculateMinimumPageHeight() for non-optional arguments
51         https://bugs.webkit.org/show_bug.cgi?id=138231
52
53         Reviewed by Dean Jackson.
54
55         No new tests because there is no behavior change.
56
57         * rendering/RenderBlockFlow.cpp:
58         (WebCore::calculateMinimumPageHeight):
59         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
60
61 2014-10-30  Chris Dumez  <cdumez@apple.com>
62
63         Move -webkit-border-image / -webkit-mask-box-image to the new StyleBuilder
64         https://bugs.webkit.org/show_bug.cgi?id=138207
65
66         Reviewed by Andreas Kling.
67
68         Move -webkit-border-image / -webkit-mask-box-image CSS properties to
69         the new StyleBuilder so that they are now generated from
70         CSSPropertyNames.in.
71
72         No new tests, no behavior change.
73
74         * css/CSSPropertyNames.in:
75         * css/DeprecatedStyleBuilder.cpp:
76         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
77         (WebCore::ApplyPropertyBorderImage::applyValue): Deleted.
78         (WebCore::ApplyPropertyBorderImage::createHandler): Deleted.
79         * css/StyleBuilderConverter.h:
80         (WebCore::StyleBuilderConverter::convertBorderImage):
81         (WebCore::StyleBuilderConverter::convertBorderMask):
82
83 2014-10-30  Chris Dumez  <cdumez@apple.com>
84
85         Optimize HTMLVideoElement / HTMLAudioElement type checks a bit
86         https://bugs.webkit.org/show_bug.cgi?id=138202
87
88         Reviewed by Benjamin Poulain.
89
90         Optimize HTMLVideoElement / HTMLAudioElement type checks a bit by:
91         1. Using is<HTMLMediaElement>() instead of
92            (is<HTMLVideoElement>() || is<HTMLAudioElement>()) if the caller is
93            interested in both video and audio elements. This is faster because
94            it ends up doing:
95                - virtual call to Element::isMediaElement()
96            instead of
97                - Node::isHTMLElement() +
98                  virtual call to HTMLElement::isHTMLUnknownElement() +
99                  2 * HTMLElement::hasTagName()
100         2. Updating HTMLVideoElement / HTMLAudioElement type traits
101            specializations to:
102            - Avoid doing any virtual function call if the input type is an
103              HTMLMediaElement (which is common in the code base).
104            - Speed up check if the input is an Element by doing:
105                - virtual call to Element::isMediaElement() +
106                  HTMLElement::hasTagName()
107              instead of
108                - Node::isHTMLElement() +
109                  virtual call to !HTMLElement::isHTMLUnknownElement() +
110                  HTMLElement::hasTagName()
111              The speed stays the same if the input is a Node or an HTMLElement.
112
113         No new tests, no behavior change.
114
115         * css/CSSDefaultStyleSheets.cpp:
116         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
117         * dom/make_names.pl:
118         (defaultTagPropertyHash):
119         (printTypeHelpers):
120         * html/HTMLAudioElement.h:
121         (isType):
122         * html/HTMLImageLoader.cpp:
123         * html/HTMLTagNames.in:
124         * html/HTMLVideoElement.h:
125         (isType):
126         * page/ChromeClient.h:
127
128 2014-10-30  Myles C. Maxfield  <mmaxfield@apple.com>
129
130         Migrate ComplexTextControllerCoreText to use SPI instead of WKSI
131         https://bugs.webkit.org/show_bug.cgi?id=138228
132
133         Reviewed by Simon Fraser.
134
135         No new tests because there is no behavior change.
136
137         * WebCore.xcodeproj/project.pbxproj:
138         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
139         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
140         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
141         * platform/spi/cocoa/CoreTextSPI.h: Added.
142
143 2014-10-30  Eric Carlson  <eric.carlson@apple.com>
144
145         Add diagnostic logging to track page loads.
146         https://bugs.webkit.org/show_bug.cgi?id=138205
147         <rdar://problem/18173017>
148
149         Reviewed by Jer Noble.
150
151         * loader/FrameLoader.cpp:
152         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Log page load success or failure.
153
154         * page/DiagnosticLoggingKeys.cpp:
155         (WebCore::DiagnosticLoggingKeys::pageLoadedKey): New.
156         * page/DiagnosticLoggingKeys.h:
157
158 2014-10-24  Philippe Normand  <pnormand@igalia.com>
159
160         [GStreamer] Video resolution changes trigger a crash in the TextureMapper
161         https://bugs.webkit.org/show_bug.cgi?id=137065
162
163         Reviewed by Gustavo Noronha Silva.
164
165         Switch to GstSample for buffer+caps communication between the
166         video sink and the player. Using a single object type for this
167         avoid issues where the caps might not correctly describe the
168         buffer contents anymore, for example when the video resolution is
169         changed.
170
171         * platform/graphics/gstreamer/ImageGStreamer.h: Use GstSample
172         instead of GstBuffer+GstCaps.
173         (WebCore::ImageGStreamer::createImage):
174         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: Ditto.
175         (ImageGStreamer::ImageGStreamer):
176         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
177         (WebCore::mediaPlayerPrivateRepaintCallback): The repaint signal
178         now uses a GstSample instead of a GstBuffer.
179         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
180         Store the current sample instead of a buffer. Also renamed the
181         mutex protecting access to the sample.
182         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase): Ditto.
183         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): Return
184         early if no sample is available. The caps used to get the video
185         size are store in the sample.
186         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Use
187         GstSample instead of GstBuffer.
188         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): Ditto.
189         (WebCore::MediaPlayerPrivateGStreamerBase::paint): Ditto.
190         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
191         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: Now store a
192         GstSample internally. Also removed the now useless current-caps property.
193         (_WebKitVideoSinkPrivate::_WebKitVideoSinkPrivate): Renamed the
194         mutex protecting access to the sample.
195         (_WebKitVideoSinkPrivate::~_WebKitVideoSinkPrivate): Ditto.
196         (webkit_video_sink_init): Disable last-sample in basesink since we
197         already store one in our sink anyway.
198         (webkitVideoSinkTimeoutCallback): Switch to GstSample.
199         (webkitVideoSinkRender): Ditto.
200         (unlockSampleMutex): Ditto.
201         (webkitVideoSinkUnlock): Ditto.
202         (webkitVideoSinkUnlockStop): Ditto.
203         (webkitVideoSinkStop): Ditto!
204         (webkitVideoSinkStart): Ditto.
205         (webkit_video_sink_class_init): Drop current-caps property.
206         (webkitVideoSinkGetProperty): Deleted.
207         (unlockBufferMutex): Deleted.
208
209 2014-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
210
211         FormDataBuilder should not use Document
212         https://bugs.webkit.org/show_bug.cgi?id=138172
213
214         Reviewed by Alexey Proskuryakov.
215
216         It's only used by encodingFromAcceptCharset() to fallback to
217         document input encoding. That method is only used by
218         FormSubmission::create(), so it could be moved as a static
219         function to FormSubmission.cpp.
220
221         * loader/FormSubmission.cpp:
222         (WebCore::encodingFromAcceptCharset):
223         (WebCore::FormSubmission::create):
224         * platform/network/FormDataBuilder.cpp:
225         (WebCore::FormDataBuilder::encodingFromAcceptCharset): Deleted.
226         * platform/network/FormDataBuilder.h:
227
228 2014-10-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
229
230         ASSERTION NOT REACHED because RenderStyle::setWordSpacing() does not handle a Length value of type 'Calculated'.
231         https://bugs.webkit.org/show_bug.cgi?id=138054.
232
233         Reviewed by Zalan Bujtas.
234
235         A Length of type 'Calculated' can be generated from blending two lengths of
236         different types. Setting the wordSpacing of the render style should be handled
237         correctly when the type of the new value is 'Calculated'.
238
239         Tests: css3/calculated-word-spacing.html.
240
241         Add a case for setting the render style wordSpacing to a <length> of type 'Calculated'.
242         * rendering/style/RenderStyle.cpp:
243         (WebCore::RenderStyle::setWordSpacing):
244
245 2014-10-29  Hunseop Jeong  <hs85.jeong@samsung.com>
246
247         [CoordinatedGraphics] Use modern for-loops
248         https://bugs.webkit.org/show_bug.cgi?id=138168
249
250         Reviewed by Andreas Kling.
251
252         No new tests as there is no change in functionality.
253
254         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Use a modern for loop.
255         (WebCore::CompositingCoordinator::renderNextFrame):
256         (WebCore::CompositingCoordinator::paintToSurface):
257         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: Use a modern for loop.
258         (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
259         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
260         (WebCore::CoordinatedGraphicsLayer::syncChildren):
261         (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
262         (WebCore::CoordinatedGraphicsLayer::findFirstDescendantWithContentsRecursively):
263         (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
264         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp: Use a modern for loop.
265         (WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded):
266
267 2014-10-29  Chris Dumez  <cdumez@apple.com>
268
269         Final-ize more of TextFieldInputType's virtual functions
270         https://bugs.webkit.org/show_bug.cgi?id=138194
271
272         Reviewed by Andreas Kling.
273
274         Final-ize more of TextFieldInputType's virtual functions for
275         performance.
276
277         No new tests, no behavior change.
278
279         * html/TextFieldInputType.h:
280
281 2014-10-29  Chris Dumez  <cdumez@apple.com>
282
283         Clean up virtual functions in inspector/
284         https://bugs.webkit.org/show_bug.cgi?id=138190
285
286         Reviewed by Andreas Kling.
287
288         Clean up virtual functions in inspector/ by:
289         - Making virtual functions final when possible
290         - Making classes final when possible
291         - Explicitly marking functions / destructors as virtual when they are
292           inherently virtual
293         - Making isXXX() virtual functions private on XXX classes to avoid
294           unnecessary type checks
295
296         No new tests, no behavior change.
297
298         * inspector/InspectorApplicationCacheAgent.h:
299         (WebCore::InspectorApplicationCacheAgent::~InspectorApplicationCacheAgent): Deleted.
300         * inspector/InspectorCSSAgent.h:
301         * inspector/InspectorDOMAgent.h:
302         * inspector/InspectorDOMDebuggerAgent.h:
303         * inspector/InspectorDOMStorageAgent.h:
304         * inspector/InspectorDatabaseAgent.h:
305         * inspector/InspectorFrontendClientLocal.h:
306         * inspector/InspectorIndexedDBAgent.h:
307         * inspector/InspectorLayerTreeAgent.h:
308         * inspector/InspectorPageAgent.h:
309         * inspector/InspectorReplayAgent.h:
310         * inspector/InspectorResourceAgent.h:
311         * inspector/InspectorStyleSheet.h:
312         * inspector/InspectorTimelineAgent.h:
313         * inspector/InspectorWorkerAgent.h:
314         * inspector/PageConsoleAgent.h:
315         * inspector/WorkerInspectorController.h:
316
317 2014-10-29  Andreas Kling  <akling@apple.com>
318
319         Generalize dirtying of parent's line boxes when taking a renderer out of tree.
320         <https://webkit.org/b/138152>
321
322         Reviewed by Antti Koivisto.
323
324         Instead of calling dirtyLinesFromChangedChild() when certain types of renderers
325         are about to be destroyed, always do this in RenderElement::willBeRemovedFromTree().
326
327         This is part of an effort to make render tree teardown less incomprehensible.
328
329         We still don't bother at all if we're in the process of tearing down the entire
330         render tree, since that would be a waste of time.
331
332         * rendering/RenderBlock.cpp:
333         (WebCore::RenderBlock::willBeDestroyed):
334         * rendering/RenderBlockFlow.cpp:
335         (WebCore::RenderBlockFlow::willBeDestroyed):
336         * rendering/RenderElement.cpp:
337         (WebCore::RenderElement::willBeRemovedFromTree):
338         * rendering/RenderInline.cpp:
339         (WebCore::RenderInline::willBeDestroyed):
340         * rendering/RenderReplaced.cpp:
341         (WebCore::RenderReplaced::willBeDestroyed): Deleted.
342         * rendering/RenderReplaced.h:
343
344 2014-10-28  Ada Chan  <adachan@apple.com>
345
346         Implement WKPageSetMuted(bool).
347         https://bugs.webkit.org/show_bug.cgi?id=138158
348
349         Reviewed by Anders Carlsson.
350
351         * WebCore.exp.in:
352         * page/Page.h:
353
354 2014-10-29  Alexey Proskuryakov  <ap@apple.com>
355
356         Notify Settings object when its Page object goes away.
357         https://bugs.webkit.org/show_bug.cgi?id=138183
358         rdar://problem/18786900
359
360         Reviewed by Andreas Kling.
361
362         I could not make a test for this issue.
363
364         * page/Page.cpp:
365         (WebCore::Page::~Page):
366         * page/Settings.cpp:
367         (WebCore::setImageLoadingSettings):
368         (WebCore::Settings::Settings):
369         (WebCore::Settings::setTextAutosizingEnabled):
370         (WebCore::Settings::setTextAutosizingWindowSizeOverride):
371         (WebCore::Settings::setTextAutosizingFontScaleFactor):
372         (WebCore::Settings::setMediaTypeOverride):
373         (WebCore::Settings::setScriptEnabled):
374         (WebCore::Settings::setUserStyleSheetLocation):
375         (WebCore::Settings::setMinDOMTimerInterval):
376         (WebCore::Settings::minDOMTimerInterval):
377         (WebCore::Settings::domTimerAlignmentInterval):
378         (WebCore::Settings::setUsesPageCache):
379         (WebCore::Settings::setScreenFontSubstitutionEnabled):
380         (WebCore::Settings::setFontRenderingMode):
381         (WebCore::Settings::setDNSPrefetchingEnabled):
382         (WebCore::Settings::setStorageBlockingPolicy):
383         (WebCore::Settings::setBackgroundShouldExtendBeyondPage):
384         (WebCore::Settings::setScrollingPerformanceLoggingEnabled):
385         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled):
386         (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled):
387         (WebCore::Settings::setFontFallbackPrefersPictographs):
388         * page/Settings.h:
389         (WebCore::Settings::pageDestroyed):
390
391 2014-10-29  Zalan Bujtas  <zalan@apple.com>
392
393         Remove invalid float from RootInlineBox.
394         https://bugs.webkit.org/show_bug.cgi?id=137707
395
396         Reviewed by Antti Koivisto.
397
398         In certain cases, floating boxes get attached to the last (root) inline box.
399         When this particular floating box gets destroyed, it also needs to be detached
400         from the last inline box.
401         1. Introduce RootInlineBox::removeFloat() (vs. RootInlineBox::appendFloat())
402         2. Ensure that it is called when the floating box is being destroyed.
403
404         Test: fast/inline/crash-when-inline-box-has-invalid-float.html
405
406         * rendering/RenderBlockFlow.cpp:
407         (WebCore::RenderBlockFlow::removeFloatingObject):
408         (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout): During style recalc, while
409         tearing down the render tree, we can get to a state where a block element has both inline and block children.
410         It happens when the style change on an element makes sibling anonymous block wrappers detached.
411         In that case the markAllDescendantsWithFloatsForLayout() call does not get propagated down on the
412         block child elements as we return early at the childrenInline() check.
413         * rendering/RootInlineBox.h:
414         (WebCore::RootInlineBox::removeFloat):
415
416 2014-10-29  Antti Koivisto  <antti@apple.com>
417
418         Factor cache validity computation functions out of CachedResource
419         https://bugs.webkit.org/show_bug.cgi?id=138156
420
421         Reviewed by Andreas Kling.
422
423         These can be used to implement cache logic on WebKit level.
424
425         * CMakeLists.txt:
426         * WebCore.exp.in:
427         * WebCore.vcxproj/WebCore.vcxproj:
428         * WebCore.xcodeproj/project.pbxproj:
429         * loader/CacheValidation.cpp: Added.
430         (WebCore::computeCurrentAge):
431         (WebCore::computeFreshnessLifetimeForHTTPFamily):
432         (WebCore::updateRedirectChainStatus):
433         (WebCore::redirectChainAllowsReuse):
434         * loader/CacheValidation.h: Added.
435         (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
436         * loader/cache/CachedResource.cpp:
437         (WebCore::updateResponseHeadersAfterRevalidation):
438         (WebCore::CachedResource::CachedResource):
439         (WebCore::CachedResource::isExpired):
440         (WebCore::CachedResource::freshnessLifetime):
441         (WebCore::CachedResource::willSendRequest):
442         (WebCore::CachedResource::updateResponseAfterRevalidation):
443         (WebCore::CachedResource::redirectChainAllowsReuse):
444         (WebCore::currentAge): Deleted.
445         * loader/cache/CachedResource.h:
446
447 2014-10-29  Antti Koivisto  <antti@apple.com>
448
449         Unreviewed, rolling out r175342.
450
451         a file ended up in a wrong directory
452
453         Reverted changeset:
454
455         "Factor cache validity computation functions out of
456         CachedResource"
457         https://bugs.webkit.org/show_bug.cgi?id=138156
458         http://trac.webkit.org/changeset/175342
459
460 2014-10-29  Antti Koivisto  <antti@apple.com>
461
462         Factor cache validity computation functions out of CachedResource
463         https://bugs.webkit.org/show_bug.cgi?id=138156
464
465         Reviewed by Andreas Kling.
466
467         These can be used to implement cache logic on WebKit level.
468
469         * CMakeLists.txt:
470         * WebCore.exp.in:
471         * WebCore.vcxproj/WebCore.vcxproj:
472         * WebCore.xcodeproj/project.pbxproj:
473         * loader/CacheValidation.cpp: Added.
474         (WebCore::computeCurrentAge):
475         (WebCore::computeFreshnessLifetimeForHTTPFamily):
476         (WebCore::updateRedirectChainStatus):
477         (WebCore::redirectChainAllowsReuse):
478         * loader/CacheValidation.h: Added.
479         (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
480         * loader/cache/CachedResource.cpp:
481         (WebCore::updateResponseHeadersAfterRevalidation):
482         (WebCore::CachedResource::CachedResource):
483         (WebCore::CachedResource::isExpired):
484         (WebCore::CachedResource::freshnessLifetime):
485         (WebCore::CachedResource::willSendRequest):
486         (WebCore::CachedResource::updateResponseAfterRevalidation):
487         (WebCore::CachedResource::redirectChainAllowsReuse):
488         (WebCore::currentAge): Deleted.
489         * loader/cache/CachedResource.h:
490
491 2014-10-28  Ada Chan  <adachan@apple.com>
492
493         Add API to mute/unmute a page.
494         https://bugs.webkit.org/show_bug.cgi?id=138150
495
496         Reviewed by Eric Carlson.
497
498         No new tests, since it's difficult to test whether the Page has indeed been muted.
499
500         * dom/Document.cpp:
501         (WebCore::Document::setMuted):
502         Go through each AudioProducer and call setMuted() on it.
503         * dom/Document.h:
504         * page/AudioProducer.h:
505         Add setMuted(bool). HTMLMediaElement, the only derived class of AudioProducer so far,
506         has already implemented setMuted().
507         * page/Page.cpp:
508         (WebCore::Page::setMuted):
509         Go through all its frames and call setMuted() on each frame's Document.
510         * page/Page.h:
511
512 2014-10-29  Tim Horton  <timothy_horton@apple.com>
513
514         Implement action menus for data detected items
515         https://bugs.webkit.org/show_bug.cgi?id=138178
516         <rdar://problem/18709436>
517
518         Reviewed by Anders Carlsson.
519
520         * WebCore.exp.in:
521         Export a symbol from Position that we need.
522
523         * WebCore.xcodeproj/project.pbxproj:
524         * platform/spi/mac/DataDetectorsSPI.h:
525         Add a combined SPI header for all of the random bits of DataDetectors that we use.
526
527 2014-10-29  Jer Noble  <jer.noble@apple.com>
528
529         [EME] NULL-dereference crash in MediaKeys::setMediaElement().
530         https://bugs.webkit.org/show_bug.cgi?id=138177
531
532         Reviewed by Eric Carlson.
533
534         NULL-check m_mediaElement->player() before using. It may have been cleared if the HTMLMediaElement
535         has previously had stop() called.
536
537         * Modules/encryptedmedia/MediaKeys.cpp:
538         (WebCore::MediaKeys::setMediaElement):
539
540 2014-10-29  Jer Noble  <jer.noble@apple.com>
541
542         [EME] MediaKeySession resources persist across page reloads
543         https://bugs.webkit.org/show_bug.cgi?id=138176
544
545         Reviewed by Eric Carlson.
546
547         MediaKeySession is an ActiveDOMObject, so when told to stop() by our execution context,
548         close() the session, releasing all our resources.
549
550         * Modules/encryptedmedia/MediaKeySession.h:
551
552 2014-10-29  Jer Noble  <jer.noble@apple.com>
553
554         [EME][Mac] MediaKeySession type "keyrelease" is ignored.
555         https://bugs.webkit.org/show_bug.cgi?id=138175
556
557         Reviewed by Eric Carlson.
558
559         To indicate that they would like to recevie expired session confirmation messages, clients
560         will create a MediaKeySession with a type parameter of "keyrelease". The code which validates
561         this type needs to be updated to recognize "keyrelease" as a valid type.
562
563         Also, the code which validates update() requests needs to allow updates containing the string
564         "acknowledged", so that clients can request the confirmation messages be discarded.
565
566         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
567         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
568         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
569         (WebCore::CDMSessionMediaSourceAVFObjC::update):
570
571 2014-10-28  Ada Chan  <adachan@apple.com>
572
573         Remove MediaSessionClient::hasMediaCharacteristics() and MediaSessionClient::mediaStateDidChange().
574         https://bugs.webkit.org/show_bug.cgi?id=138153
575
576         Reviewed by Jer Noble.
577
578         After http://trac.webkit.org/changeset/175273, Document no longer keeps a set of MediaSessions
579         and it doesn't need to query each MediaSession for its characteristics and play state.
580         MediaSessionClient::hasMediaCharacteristics() is no longer needed and MediaSessionClient::mediaStateDidChange()
581         can be removed if HTMLMediaElement calls Document::updateIsPlayingAudio() after m_playing has changed.
582
583         No new tests, no behavior change.
584
585         * html/HTMLMediaElement.cpp:
586         (WebCore::HTMLMediaElement::updatePlayState):
587         Call setPlaying() rather than setting m_playing directly.
588         (WebCore::HTMLMediaElement::setPlaying):
589         Update m_playing. If it has changed, call Document::updateIsPlayingAudio().
590         (WebCore::HTMLMediaElement::setPausedInternal):
591         Call setPlaying() rather than setting m_playing directly.
592         (WebCore::HTMLMediaElement::isPlayingAudio):
593         Call isPlaying() directly rather than checking the MediaSession's state.
594         * html/HTMLMediaElement.h:
595         * platform/audio/MediaSession.cpp:
596         (WebCore::MediaSession::setState):
597         MediaSessionClient::mediaStateDidChange() has been removed.
598         (WebCore::MediaSession::hasMediaCharacteristics): Deleted.
599         * platform/audio/MediaSession.h:
600         (WebCore::MediaSessionClient::mediaStateDidChange): Deleted.
601         * platform/audio/ios/AudioDestinationIOS.h:
602         * platform/audio/mac/AudioDestinationMac.h:
603
604 2014-10-29  Chris Dumez  <cdumez@apple.com>
605
606         Clean up virtual functions in html/
607         https://bugs.webkit.org/show_bug.cgi?id=138166
608
609         Reviewed by Andreas Kling.
610
611         Clean up virtual functions in html/ by:
612         - Making virtual functions final when possible
613         - Making classes final when possible
614         - Using 'override' when appropriate
615         - Explicitly marking functions / destructors as virtual when they are
616           inherently virtual
617         - Dropping virtual destructors when the class does not have subclasses
618           and mark the class as final, to get rid of unnecessary vtables
619         - Making isXXX() virtual functions private on XXX classes to avoid
620           unnecessary type checks
621         - De-virtualizing some functions that do not need to be virtual
622         - Dropping final for virtual functions in classes already marked as
623           final
624
625         No new tests, no behavior change.
626
627         * html/ButtonInputType.h:
628         * html/CheckboxInputType.h:
629         * html/ColorInputType.h:
630         * html/DOMSettableTokenList.h:
631         * html/DateInputType.h:
632         * html/DateTimeInputType.h:
633         * html/DateTimeLocalInputType.h:
634         * html/EmailInputType.h:
635         * html/FTPDirectoryDocument.h:
636         * html/HTMLAnchorElement.h:
637         * html/HTMLDetailsElement.cpp:
638         * html/HTMLFormControlElement.h:
639         * html/HTMLFormControlsCollection.h:
640         * html/HTMLFrameElement.h:
641         * html/HTMLFrameElementBase.h:
642         * html/HTMLFrameOwnerElement.h:
643         * html/HTMLInputElement.h:
644         * html/HTMLMarqueeElement.h:
645         * html/HTMLMediaElement.h:
646         * html/HTMLMediaSession.h:
647         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Deleted.
648         * html/HTMLMeterElement.h:
649         * html/HTMLNameCollection.h:
650         * html/HTMLObjectElement.h:
651         * html/HTMLOptGroupElement.h:
652         * html/HTMLOptionElement.h:
653         * html/HTMLSpanElement.h:
654         * html/HTMLStyleElement.h:
655         * html/HTMLSummaryElement.cpp:
656         * html/HTMLSummaryElement.h:
657         * html/HTMLUnknownElement.h:
658         * html/HTMLVideoElement.h:
659         * html/HiddenInputType.h:
660         * html/ImageInputType.h:
661         * html/MediaKeyEvent.h:
662         * html/MonthInputType.h:
663         * html/NumberInputType.h:
664         * html/PasswordInputType.h:
665         * html/PublicURLManager.h:
666         * html/RadioInputType.h:
667         * html/ResetInputType.h:
668         * html/SubmitInputType.h:
669         * html/TelephoneInputType.h:
670         * html/TextInputType.h:
671         * html/TimeInputType.h:
672         * html/URLInputType.h:
673         * html/WeekInputType.h:
674         * html/canvas/ANGLEInstancedArrays.h:
675         * html/canvas/CanvasRenderingContext2D.h:
676         * html/canvas/DOMPath.h:
677         * html/canvas/EXTShaderTextureLOD.h:
678         * html/canvas/EXTTextureFilterAnisotropic.h:
679         * html/canvas/OESElementIndexUint.h:
680         * html/canvas/OESStandardDerivatives.h:
681         * html/canvas/OESTextureFloat.h:
682         * html/canvas/OESTextureFloatLinear.h:
683         * html/canvas/OESTextureHalfFloat.h:
684         * html/canvas/OESTextureHalfFloatLinear.h:
685         * html/canvas/OESVertexArrayObject.h:
686         * html/canvas/WebGLBuffer.h:
687         * html/canvas/WebGLCompressedTextureATC.h:
688         * html/canvas/WebGLCompressedTexturePVRTC.h:
689         * html/canvas/WebGLCompressedTextureS3TC.h:
690         * html/canvas/WebGLContextAttributes.h:
691         * html/canvas/WebGLContextEvent.h:
692         * html/canvas/WebGLDebugRendererInfo.h:
693         * html/canvas/WebGLDebugShaders.h:
694         * html/canvas/WebGLDepthTexture.h:
695         * html/canvas/WebGLDrawBuffers.h:
696         * html/canvas/WebGLFramebuffer.h:
697         (WebCore::WebGLFramebuffer::isFramebuffer): Deleted.
698         * html/canvas/WebGLLoseContext.h:
699         * html/canvas/WebGLProgram.h:
700         * html/canvas/WebGLRenderbuffer.h:
701         * html/canvas/WebGLRenderingContext.h:
702         * html/canvas/WebGLShader.h:
703         * html/canvas/WebGLSharedObject.h:
704         (WebCore::WebGLSharedObject::isFramebuffer): Deleted.
705         * html/canvas/WebGLTexture.h:
706         * html/canvas/WebGLVertexArrayObjectOES.h:
707         (WebCore::WebGLVertexArrayObjectOES::isVertexArray): Deleted.
708         * html/shadow/ImageControlsRootElement.h:
709         * html/shadow/InsertionPoint.h:
710         * html/shadow/MediaControlElementTypes.h:
711         * html/shadow/MediaControlElements.h:
712         * html/shadow/MediaControls.h:
713         * html/shadow/MediaControlsApple.h:
714         * html/shadow/SpinButtonElement.h:
715         * html/track/AudioTrack.h:
716         * html/track/AudioTrackList.h:
717         * html/track/DataCue.h:
718         (WebCore::DataCue::cueType): Deleted.
719         * html/track/InbandDataTextTrack.h:
720         * html/track/InbandGenericTextTrack.h:
721         * html/track/InbandTextTrack.h:
722         * html/track/InbandWebVTTTextTrack.h:
723         * html/track/LoadableTextTrack.h:
724         * html/track/TextTrackList.h:
725         * html/track/TrackEvent.h:
726         * html/track/VTTCue.h:
727         (WebCore::VTTCueBox::setFontSizeFromCaptionUserPrefs):
728         * html/track/VTTRegion.h:
729         * html/track/VideoTrack.h:
730         * html/track/VideoTrackList.h:
731         * html/track/WebVTTParser.h:
732         (WebCore::WebVTTCueData::~WebVTTCueData): Deleted.
733
734 2014-10-17  Sergio Villar Senin  <svillar@igalia.com>
735
736         ASSERTION FAILED: growthShare > 0 in WebCore::RenderGrid::distributeSpaceToTracks
737         https://bugs.webkit.org/show_bug.cgi?id=137772
738
739         Reviewed by Andreas Kling.
740
741         We're hitting the ASSERTION because if the number of tracks an
742         item spans does greatly exceed the available logical space, then
743         the result of the division availableLogicalSpace/numberOfTracks is
744         truncated to 0. So the ASSERTION was theoretically right because
745         the result has to be always >0 (as the dividend > 0) but the fact
746         that the result is a LayoutUnit forces us to accept 0 as a valid
747         outcome of the operation.
748
749         Test: fast/css-grid-layout/tracks-number-greatly-exceeding-available-size-crash.html
750
751         * rendering/RenderGrid.cpp:
752         (WebCore::RenderGrid::distributeSpaceToTracks):
753
754 2014-10-29  Chris Dumez  <cdumez@apple.com>
755
756         Crash in CachedRawResource::canReuse() when reloading http://dnd.wizards.com/dungeons-and-dragons/story
757         https://bugs.webkit.org/show_bug.cgi?id=138164
758
759         Reviewed by Andreas Kling.
760
761         This patch fixes a crash when reloading the following URL:
762         http://dnd.wizards.com/dungeons-and-dragons/story
763
764         We were crashing in CachedRawResource::canReuse() because header.key
765         would sometimes be a null String and we would call
766         HashMap::get(nullString).
767
768         The real issue was that header.key was null in the first place, which
769         means that even though the HTTPHeaderMap iterator is valid, it->key
770         is a null String, which should never happen. There was a bug in the
771         HTTPHeaderMapConstIterator() constructor that would cause the
772         iterator key/value pair to not get initialized if the HTTPHeaderMap
773         contained *only* uncommon HTTP headers. This patch updates the
774         constructor so that we fall back to updating the key/value from the
775         uncommon header map, if we failed to initialized from the common
776         header map (because it was empty).
777
778         Test: http/tests/cache/xhr-uncommon-header.html
779
780         * platform/network/HTTPHeaderMap.h:
781         (WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::HTTPHeaderMapConstIterator):
782
783 2014-10-28  Benjamin Poulain  <benjamin@webkit.org>
784
785         CSS4 Selectors: Add the pseudo class :any-link
786         https://bugs.webkit.org/show_bug.cgi?id=138128
787
788         Reviewed by Andreas Kling.
789
790         Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
791
792         After :link and :-webkit-any-link were fixed, :any-link behaves
793         exactly like :-webkit-any-link. All I had left to do here was
794         make them synonyms when evaluating selectors.
795
796         Defined here: http://dev.w3.org/csswg/selectors4/#the-any-link-pseudo
797
798         After :link and :-webkit-any-link were fixed, :any-link behaves
799         exactly like :-webkit-any-link. All I had left to do here was
800         make them synonyms when evaluating selectors.
801
802         Tests: fast/selectors/any-link-basics-2.html
803                fast/selectors/any-link-basics.html
804                fast/selectors/any-link-styling.html
805
806         * css/CSSSelector.cpp:
807         (WebCore::CSSSelector::selectorText):
808         * css/CSSSelector.h:
809         * css/RuleSet.cpp:
810         (WebCore::RuleSet::addRule):
811         * css/SelectorChecker.cpp:
812         (WebCore::SelectorChecker::checkOne):
813         * css/SelectorChecker.h:
814         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
815         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
816         * cssjit/SelectorCompiler.cpp:
817         (WebCore::SelectorCompiler::addPseudoClassType):
818         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
819
820 2014-10-28  Jer Noble  <jer.noble@apple.com>
821
822         [EME][Mac] Adopt new AVStreamSession API: pass storageDirectoryAtURL at creation-time
823         https://bugs.webkit.org/show_bug.cgi?id=138149
824
825         Reviewed by Brent Fulgham.
826
827         AVStreamSession now requires its storage location at creation-time, rather than post-creation. This requires
828         us to move storage location code from CDMSessionMediaSourceAVFObjC to MediaPlayerPrivateMediaSourceAVFObjC.
829
830         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
831         (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Renamed.
832         (WebCore::CDMSessionMediaSourceAVFObjC::update):
833         (WebCore::sessionStorageDirectory): Deleted.
834         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
835         (WebCore::sessionStorageDirectory):
836         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession):
837
838 2014-10-28  Geoffrey Garen  <ggaren@apple.com>
839
840         All networking crashes on Mac 32bit
841         https://bugs.webkit.org/show_bug.cgi?id=138157
842
843         Reviewed by Andy Estes.
844
845         NEFilterSource content filtering is not available on 32bit, so
846         soft-linking fails at runtime. The simplest solution is just to disable
847         it at compile time.
848
849         * platform/ContentFilter.h:
850
851 2014-10-28  Jeremy Jones  <jeremyj@apple.com>
852
853         Add optimized fullscreen mode.
854         https://bugs.webkit.org/show_bug.cgi?id=138044
855
856         Reviewed by Jer Noble.
857
858         Enable different types of fullscreen video behavior.
859         Add an enum parameter to enterVideoFullscreenForVideoElement for alternate types of fullscreen.
860         Add gesture for alternate fullscreen.
861
862         * Modules/mediacontrols/MediaControlsHost.cpp:
863         (WebCore::MediaControlsHost::enterFullscreenOptimized): added
864         * Modules/mediacontrols/MediaControlsHost.h: added enterFullscreenOptimized
865         * Modules/mediacontrols/MediaControlsHost.idl: added enterFullscreenOptimized
866         * Modules/mediacontrols/mediaControlsiOS.js:
867         (ControllerIOS.prototype.handleBaseGestureChange): recognize alternate gesture
868         * WebCore.exp.in: added parameter to setupFullscreen
869         * html/HTMLMediaElement.cpp:
870         (WebCore::HTMLMediaElement::removedFrom) : replace m_isInVideoFullscreen with m_videoFullscreenType
871         (WebCore::HTMLMediaElement::stop) : ditto
872         (WebCore::HTMLMediaElement::isFullscreen) : ditto
873         (WebCore::HTMLMediaElement::enterFullscreen): add parameter to enterVideoFullscreenForVideoElement
874         (WebCore::HTMLMediaElement::exitFullscreen): replace m_isInVideoFullscreen with m_videoFullscreenType
875         (WebCore::HTMLMediaElement::enterFullscreenOptimized): added
876         * html/HTMLMediaElement.h: added enterFullscreenOptimized
877         * page/ChromeClient.h:
878         (WebCore::ChromeClient::enterVideoFullscreenForVideoElement): added parameter
879         * platform/ios/WebVideoFullscreenControllerAVKit.h: add parameter
880         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
881         (-[WebVideoFullscreenController enterFullscreen:type:]): add parameter
882         (-[WebVideoFullscreenController enterFullscreen:]): Deleted.
883         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: reorder protected to after public
884         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
885         (-[WebAVPlayerController player]): this stub is now required
886         (-[WebAVPlayerController layoutSublayersOfLayer:]): this is a better way to update video frames
887         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): implement optimized fullscreen interface 
888         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto
889         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
890         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
891
892 2014-10-28  Chris Dumez  <cdumez@apple.com>
893
894         Clean up virtual functions in accessibility/
895         https://bugs.webkit.org/show_bug.cgi?id=138148
896
897         Reviewed by Chris Fleizach.
898
899         Clean up virtual functions in accessibility/ by:
900         - Marking classes as final when suitable
901         - Marking virtual functions as final when suitable
902         - Dropping final on virtual functions in classes that are already final
903         - Make isXXX() virtual type checking functions in XXX classes to avoid
904           useless type checks
905
906         No new tests, no behavior change.
907
908         * accessibility/AccessibilityARIAGrid.h:
909         * accessibility/AccessibilityARIAGridCell.h:
910         * accessibility/AccessibilityARIAGridRow.h:
911         * accessibility/AccessibilityImageMapLink.h:
912         * accessibility/AccessibilityList.h:
913         * accessibility/AccessibilityListBox.h:
914         * accessibility/AccessibilityListBoxOption.h:
915         * accessibility/AccessibilityMediaControls.h:
916         * accessibility/AccessibilityMenuList.h:
917         * accessibility/AccessibilityMenuListOption.h:
918         * accessibility/AccessibilityMenuListPopup.h:
919         * accessibility/AccessibilityMockObject.h:
920         (WebCore::AccessibilityMockObject::setParent):
921         * accessibility/AccessibilityNodeObject.h:
922         * accessibility/AccessibilityProgressIndicator.h:
923         * accessibility/AccessibilityRenderObject.h:
924         * accessibility/AccessibilitySVGRoot.h:
925         * accessibility/AccessibilityScrollView.h:
926         * accessibility/AccessibilityScrollbar.h:
927         * accessibility/AccessibilitySearchFieldButtons.h:
928         * accessibility/AccessibilitySlider.h:
929         * accessibility/AccessibilitySpinButton.h:
930         * accessibility/AccessibilityTable.h:
931         * accessibility/AccessibilityTableCell.h:
932         * accessibility/AccessibilityTableColumn.h:
933         * accessibility/AccessibilityTableHeaderContainer.h:
934         * accessibility/AccessibilityTableRow.h:
935
936 2014-10-24  Jeffrey Pfau  <jpfau@apple.com>
937
938         FrameProgressTracker expects Page to not have detached
939         https://bugs.webkit.org/show_bug.cgi?id=138061
940
941         Reviewed by Alexey Proskuryakov.
942
943         In some cases, a Page may be detached from a Frame before its
944         FrameLoader is torn down, causing FrameProgressTracker's destructor
945         to hit a null pointer.
946
947         No new tests; it is impossible to reliably simulate the null pointer
948         case without intrusive code changes.
949
950         * loader/FrameLoader.cpp:
951         (WebCore::FrameLoader::FrameProgressTracker::~FrameProgressTracker):
952
953 2014-10-27  Ada Chan  <adachan@apple.com>
954
955         Introduce a new abstract class called AudioProducer and keep a set of AudioProducers
956         rather than the active MediaSessions in Document
957         https://bugs.webkit.org/show_bug.cgi?id=138107
958
959         Reviewed by Eric Carlson.
960
961         No new tests, no behavior change.
962
963         * WebCore.xcodeproj/project.pbxproj:
964         Add AudioProducer.h to the project.
965         * dom/Document.cpp:
966         (WebCore::Document::addAudioProducer):
967         (WebCore::Document::removeAudioProducer):
968         (WebCore::Document::updateIsPlayingAudio):
969         Go through the set of AudioProducers and see if any is playing audio.
970         Now that this method no longer refers to MediaSessions directly, this code
971         does not need to be guarded by #if ENABLE(VIDEO).
972         (WebCore::Document::registerMediaSession): Deleted.
973         (WebCore::Document::unregisterMediaSession): Deleted.
974         * dom/Document.h:
975         * html/HTMLMediaElement.cpp:
976         (WebCore::HTMLMediaElement::registerWithDocument):
977         (WebCore::HTMLMediaElement::unregisterWithDocument):
978         (WebCore::HTMLMediaElement::isPlayingAudio):
979         Return whether this element is playing audio.
980         * html/HTMLMediaElement.h:
981         * page/AudioProducer.h: Added.
982         (WebCore::AudioProducer::~AudioProducer):
983         * page/Page.cpp:
984         (WebCore::Page::updateIsPlayingAudio):
985         This is no longer guarded with #if ENABLE(VIDEO) since the Document methods it calls
986         are no longer guarded.
987         * page/Page.h:
988
989 2014-10-28  Chris Dumez  <cdumez@apple.com>
990
991         Unreviewed comment fix from r175267.
992
993         Fix namespace name in comment.
994
995         * css/StyleBuilderCustom.h:
996
997 2014-10-28  Jer Noble  <jer.noble@apple.com>
998
999         REGRESSION(r171593) [Mac] Media controls create a large (and unnecessary) backing store
1000         https://bugs.webkit.org/show_bug.cgi?id=137757
1001
1002         Reviewed by Eric Carlson.
1003
1004         In r171593, a <div> was added to the media controls which is only ever used on iOS. Instead
1005         of creating and adding this <div> in mediaControlsApple.js (which is used on OS X), this 
1006         <div> should be created and added in mediaControlsiOS.js, which requires overloading
1007         Controller.addControls.
1008
1009         * Modules/mediacontrols/mediaControlsApple.css:
1010         (audio::-webkit-media-controls-panel.hidden): Drive-by fix: allow the panel itself to be hidden.
1011         (video::-webkit-media-controls-panel-composited-parent): Deleted.
1012         * Modules/mediacontrols/mediaControlsApple.js:
1013         (Controller.prototype.createControls): Remove the composited parent.
1014         (Controller.prototype.addControls): Ditto.
1015         * Modules/mediacontrols/mediaControlsiOS.js:
1016         (ControllerIOS.prototype.createControls): Create the composited parent.
1017         (ControllerIOS.prototype.addControls): Copied from (previous) apple.js.
1018
1019 2014-10-28  Chris Dumez  <cdumez@apple.com>
1020
1021         Move "Number" CSS properties to the new StyleBuilder
1022         https://bugs.webkit.org/show_bug.cgi?id=138125
1023
1024         Reviewed by Antti Koivisto.
1025
1026         Move "Number" CSS properties from DeprecatedStyleBuilder to the new
1027         StyleBuilder:
1028         -webkit-hyphenate-limit-after
1029         -webkit-hyphenate-limit-before
1030         -webkit-shape-image-threshold
1031         -webkit-hyphenate-limit-lines
1032
1033         They are now generated from CSSPropertyNames.in
1034
1035         For -webkit-hyphenate-limit-lines, I used custom code instead of
1036         the Number converter as it required special handling for the id
1037         value. This patch thus adds support for [Custom=Value] to
1038         CSSPropertyNames.in and the custom code goes into
1039         css/StyleBuilderCustom.h.
1040
1041         No new tests, no behavior change.
1042
1043         * WebCore.xcodeproj/project.pbxproj:
1044         * css/CSSPropertyNames.in:
1045         * css/DeprecatedStyleBuilder.cpp:
1046         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1047         (WebCore::ApplyPropertyNumber::setValue): Deleted.
1048         (WebCore::ApplyPropertyNumber::applyValue): Deleted.
1049         (WebCore::ApplyPropertyNumber::createHandler): Deleted.
1050         * css/StyleBuilderConverter.h:
1051         (WebCore::StyleBuilderConverter::convertNumber):
1052         * css/StyleBuilderCustom.h: Added.
1053         (WebCore::StyleBuilderFunctions::applyValueWebkitHyphenateLimitLines):
1054         * css/makeprop.pl:
1055
1056 2014-10-28  Zan Dobersek  <zdobersek@igalia.com>
1057
1058         [WebCore] Remove uses of WTF::bind() in the Media Stream module
1059         https://bugs.webkit.org/show_bug.cgi?id=138016
1060
1061         Reviewed by Eric Carlson.
1062
1063         Replace uses of WTF::bind() in the Media Stream module with C++11 lambdas.
1064         Internal helper methods are removed in favor of inlining the code directly
1065         into the lambdas. Range-based for-loops are deployed where appropriate.
1066
1067         * Modules/mediastream/MediaStreamTrack.cpp:
1068         (WebCore::MediaStreamTrack::scheduleEventDispatch):
1069         (WebCore::MediaStreamTrack::dispatchQueuedEvents): Deleted.
1070         * Modules/mediastream/MediaStreamTrack.h:
1071         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
1072         (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
1073         (WebCore::MediaStreamTrackSourcesRequest::callCompletionHandler): Deleted.
1074         * Modules/mediastream/MediaStreamTrackSourcesRequest.h:
1075         * Modules/mediastream/UserMediaRequest.cpp:
1076         (WebCore::UserMediaRequest::constraintsValidated):
1077         (WebCore::UserMediaRequest::userMediaAccessGranted):
1078         (WebCore::UserMediaRequest::didCreateStream):
1079         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
1080         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
1081         (WebCore::UserMediaRequest::requestPermission): Deleted.
1082         (WebCore::UserMediaRequest::createMediaStream): Deleted.
1083         (WebCore::UserMediaRequest::callSuccessHandler): Deleted.
1084         (WebCore::UserMediaRequest::callErrorHandler): Deleted.
1085         * Modules/mediastream/UserMediaRequest.h:
1086
1087 2014-10-28  Pascal Jacquemart  <p.jacquemart@samsung.com>
1088
1089         Abandoned select option is reselected when shift selecting new options
1090         https://bugs.webkit.org/show_bug.cgi?id=137553
1091
1092         Reviewed by Ryosuke Niwa.
1093
1094         Previous active selection is wrongly recorded by HTMLSelectElement after selecting a new item using
1095         typeAhead. Fixed by clearing previously selected options before starting a new active selection.
1096
1097         Test: fast/forms/listbox-selection-after-typeahead.html
1098
1099         * html/HTMLSelectElement.cpp:
1100         (WebCore::HTMLSelectElement::selectOption): Code re-ordering
1101
1102 2014-10-28  Milan Crha  <mcrha@redhat.com>
1103
1104         Use constants from wtf/MathExtras.h
1105         https://bugs.webkit.org/show_bug.cgi?id=137967
1106
1107         Reviewed by Darin Adler.
1108
1109         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1110         (WebCore::rotateCairoMatrixForVerticalOrientation):
1111         * rendering/mathml/RenderMathMLMenclose.cpp:
1112         (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
1113         (WebCore::RenderMathMLMenclose::updateLogicalHeight):
1114         * rendering/mathml/RenderMathMLOperator.cpp:
1115         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
1116
1117 2014-10-28  David Hyatt  <hyatt@apple.com>
1118
1119         Selection gap painting is ugly for ruby bases.
1120         https://bugs.webkit.org/show_bug.cgi?id=138136
1121
1122         Reviewed by Dean Jackson.
1123
1124         * rendering/RenderBlock.cpp:
1125         (WebCore::RenderBlock::selectionGaps):
1126         For ruby bases don't fill to the end of the block (in the block direction),
1127         since ideographic baselines push that end below the text baseline.
1128
1129         (WebCore::RenderBlock::blockSelectionGaps):
1130         * rendering/RenderBlockFlow.cpp:
1131         Skip ruby bases for block selection gap filling.
1132
1133 2014-10-28  Zalan Bujtas  <zalan@apple.com>
1134
1135         Speed up line parsing for simple line layout.
1136         https://bugs.webkit.org/show_bug.cgi?id=137275
1137
1138         Reviewed by Antti Koivisto.
1139         
1140         This patch speeds up the line parsing for simple line layout by
1141         reducing the number of text measurement calls.
1142         The parsing logic hasn't changed. We simply walk over
1143         the whitespace/non-whitespace fragments and measure them to
1144         figure out whether they fit.
1145         The performance gain mainly comes from the more efficient line wrapping
1146         so that we don't re-measure the fragment when it is pushed to
1147         the next line.
1148
1149         No change in behaviour. (except the empty line-break run removal.)
1150
1151         * rendering/SimpleLineLayout.cpp:
1152         (WebCore::SimpleLineLayout::skipWhitespace): 
1153         (WebCore::SimpleLineLayout::computeLineLeft):
1154         (WebCore::SimpleLineLayout::TextFragment::TextFragment):
1155         (WebCore::SimpleLineLayout::TextFragment::isEmpty):
1156         (WebCore::SimpleLineLayout::LineState::LineState):
1157         (WebCore::SimpleLineLayout::LineState::commitAndCreateRun): adds uncommitted text to the line and creates a run out of it. 
1158         (WebCore::SimpleLineLayout::LineState::addUncommitted): appends fragment to the uncommitted text. 
1159         (WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): appends whitespace to the uncommitted text.
1160         (WebCore::SimpleLineLayout::LineState::jumpTo): moves line's current position without committing text. 
1161         (WebCore::SimpleLineLayout::LineState::width): current width of the line including committed and uncommitted text.
1162         (WebCore::SimpleLineLayout::LineState::fits): checks if committed + uncommitted text fits the line. 
1163         (WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): 
1164         (WebCore::SimpleLineLayout::removeTrailingWhitespace): post processing the trailing whitespace.
1165         (WebCore::SimpleLineLayout::initializeLine):
1166         (WebCore::SimpleLineLayout::splitFragmentToFitLine): breaks the fragments into 2 so that the first (sub)fragment fits the line.
1167         (WebCore::SimpleLineLayout::nextFragment): returns the next valid fragment of the text.
1168         (WebCore::SimpleLineLayout::createLineRuns): creates runs for the current line and returns when we can't fit more text on the line.
1169         (WebCore::SimpleLineLayout::updateLineConstrains): updates left/right constrains for the current line.
1170         (WebCore::SimpleLineLayout::createTextRuns): creates runs for the whole text.
1171         (WebCore::SimpleLineLayout::isWhitespace): Deleted.
1172         (WebCore::SimpleLineLayout::skipWhitespaces): Deleted.
1173         (WebCore::SimpleLineLayout::measureWord): Deleted.
1174         (WebCore::SimpleLineLayout::adjustRunOffsets): Deleted.
1175         * rendering/SimpleLineLayout.h:
1176         (WebCore::SimpleLineLayout::Run::Run):
1177
1178 2014-10-28  Alexey Proskuryakov  <ap@apple.com>
1179
1180         Windows build fix.
1181
1182         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1183         (WebCore::NetworkStorageSession::switchToNewTestingSession): Use a WTF function
1184         for getting current process ID instead of getpid().
1185
1186 2014-10-28  Mihnea Ovidenie  <mihnea@adobe.com>
1187
1188         Clean up subtrees selection code
1189         https://bugs.webkit.org/show_bug.cgi?id=137740
1190
1191         Reviewed by David Hyatt.
1192
1193         Clean up subtrees selection code. Add a new class SelectionSubtreeData
1194         that keeps only the selection data. Have SelectionSubtreeRoot class embed
1195         a SelectionSubtreeData member and keep the business logic methods.
1196         No functionality changed therefore no new layout tests.
1197
1198         * rendering/RenderObject.cpp:
1199         (WebCore::RenderObject::selectionStartEnd):
1200         * rendering/RenderView.cpp:
1201         (WebCore::RenderView::subtreeSelectionBounds):
1202         (WebCore::RenderView::repaintSubtreeSelection):
1203         (WebCore::RenderView::setSelection):
1204         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1205         (WebCore::RenderView::updateSelectionForSubtrees):
1206         (WebCore::RenderView::clearSubtreeSelection):
1207         (WebCore::RenderView::applySubtreeSelection):
1208         * rendering/RenderView.h:
1209         * rendering/SelectionSubtreeRoot.cpp:
1210         (WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot):
1211         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
1212         * rendering/SelectionSubtreeRoot.h:
1213         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
1214         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStart):
1215         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos):
1216         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEnd):
1217         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos):
1218         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear):
1219         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartEndPositions):
1220         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart):
1221         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos):
1222         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd):
1223         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos):
1224         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection):
1225         (WebCore::SelectionSubtreeRoot::selectionData):
1226         (WebCore::SelectionSubtreeRoot::setSelectionData):
1227         (WebCore::SelectionSubtreeRoot::selectionStart): Deleted.
1228         (WebCore::SelectionSubtreeRoot::selectionStartPos): Deleted.
1229         (WebCore::SelectionSubtreeRoot::selectionEnd): Deleted.
1230         (WebCore::SelectionSubtreeRoot::selectionEndPos): Deleted.
1231         (WebCore::SelectionSubtreeRoot::selectionStartEndPositions): Deleted.
1232         (WebCore::SelectionSubtreeRoot::selectionClear): Deleted.
1233         (WebCore::SelectionSubtreeRoot::setSelectionStart): Deleted.
1234         (WebCore::SelectionSubtreeRoot::setSelectionStartPos): Deleted.
1235         (WebCore::SelectionSubtreeRoot::setSelectionEnd): Deleted.
1236         (WebCore::SelectionSubtreeRoot::setSelectionEndPos): Deleted.
1237
1238 2014-10-28  Jer Noble  <jer.noble@apple.com>
1239
1240         [Mac] The first software paint of a <video> element takes up to 2.5s.
1241         https://bugs.webkit.org/show_bug.cgi?id=137754
1242
1243         Reviewed by Brent Fulgham.
1244
1245         It turns out that, if you pass nil to -[AVPlayerItemVideoOutput initWithPixelBufferAttributes:]
1246         the video output will not attempt to conform the resulting pixel buffers into a particular format.
1247         This means that adding such a video output to a AVPlayerItem should have almost no performance
1248         penalty, since the video output does not even copy the resulting buffers, but rather just retains
1249         and returns the ones from the AVPlayerLayer.
1250
1251         Create and attach an AVPlayerItemVideoOutput after creating the AVPlayerItem, but before attaching
1252         the player item to the AVPlayer. This eliminates the reconfigure step which occurs after attaching
1253         a video output to an already attached AVPlayerItem.
1254
1255         When creating the AVPlayerItemVideoOutput, pass in `nil` for the pixelBufferAttributes parameter.
1256
1257         Instead of blocking waiting for output from the AVPlayerItemVideoOutput during creating, block and
1258         whait when asked to paint with the video output.
1259
1260         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1261         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
1262         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
1263         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1264
1265 2014-10-28  Chris Dumez  <cdumez@apple.com>
1266
1267         Move text decoration CSS properties to the new StyleBuilder
1268         https://bugs.webkit.org/show_bug.cgi?id=138121
1269
1270         Reviewed by Antti Koivisto.
1271
1272         Move text decoration CSS properties from DeprecatedStyleBuilder to the
1273         new StyleBuilder so that they are generated from CSSPropertyNames.in.
1274
1275         No new tests, no behavior change.
1276
1277         * css/CSSPropertyNames.in:
1278         * css/DeprecatedStyleBuilder.cpp:
1279         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1280         (WebCore::ApplyPropertyTextDecoration::applyValue): Deleted.
1281         (WebCore::ApplyPropertyTextDecoration::createHandler): Deleted.
1282         * css/StyleBuilderConverter.h:
1283         (WebCore::StyleBuilderConverter::convertTextDecoration):
1284
1285 2014-10-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1286
1287         [GTK] Remove GDK dependency from SharedTimerGtk
1288         https://bugs.webkit.org/show_bug.cgi?id=138092
1289
1290         Reviewed by Martin Robinson.
1291
1292         It depends on GDK just to use GDK_PRIORITY_REDRAW constant, we can
1293         use its value directly instead.
1294
1295         * PlatformGTK.cmake:
1296         * platform/gtk/SharedTimerGtk.cpp:
1297         (WebCore::setSharedTimerFireInterval):
1298
1299 2014-10-27  Andreas Kling  <akling@apple.com>
1300
1301         Move RenderBlock::beingDestroyed() to RenderObject.
1302         <https://webkit.org/b/138116>
1303
1304         Reviewed by Antti Koivisto.
1305
1306         Make "is being destroyed" a RenderObject concept instead of restricting
1307         it to RenderBlocks. I'm guessing that this was specific to blocks due to
1308         lack of bitfield space in RenderObject, and that's no longer an issue.
1309
1310         * rendering/RenderBlock.cpp:
1311         (WebCore::RenderBlock::RenderBlock):
1312         (WebCore::RenderBlock::willBeDestroyed):
1313         * rendering/RenderBlock.h:
1314         (WebCore::RenderBlock::beingDestroyed): Deleted.
1315         * rendering/RenderBlockFlow.cpp:
1316         (WebCore::RenderBlockFlow::willBeDestroyed):
1317         * rendering/RenderObject.cpp:
1318         (WebCore::RenderObject::destroy):
1319         * rendering/RenderObject.h:
1320         (WebCore::RenderObject::beingDestroyed):
1321         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
1322
1323 2014-10-27  Chris Fleizach  <cfleizach@apple.com>
1324
1325         AX: input type=hidden is being exposed when aria-hidden=false
1326         https://bugs.webkit.org/show_bug.cgi?id=138106
1327
1328         Reviewed by Benjamin Poulain.
1329
1330         If an input type=hidden was inside an aria-hidden=false, it would appear because
1331         the lack of a RenderObject behind that object was not blocking its adoption into the AX tree.
1332         We should explicity check for whether the type is hidden and then return an appropriate role. 
1333
1334         Test: accessibility/input-type-hidden-in-aria-hidden-false.html
1335
1336         * accessibility/AccessibilityNodeObject.cpp:
1337         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1338         (WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored):
1339
1340 2014-10-27  Alexey Proskuryakov  <ap@apple.com>
1341
1342         https://trac.webkit.org/changeset/175233 broke many tests, fixing an incorrect '!'.
1343
1344         * accessibility/AccessibilityRenderObject.cpp:
1345         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1346
1347 2014-10-24  David Hyatt  <hyatt@apple.com>
1348
1349         text-combine needs to center text within the vertical space using glyph bounds
1350         https://bugs.webkit.org/show_bug.cgi?id=138056
1351         <rdar://problem/15403667>
1352
1353         Reviewed by Dean Jackson.
1354
1355         Added fast/text/tatechuyoko.html
1356
1357         * rendering/RenderCombineText.cpp:
1358         (WebCore::RenderCombineText::RenderCombineText):
1359         (WebCore::RenderCombineText::adjustTextOrigin):
1360         (WebCore::RenderCombineText::combineText):
1361         * rendering/RenderCombineText.h:
1362
1363 2014-10-27  Benjamin Poulain  <benjamin@webkit.org>
1364
1365         Cleanup after r175213: fastGetAttribute().isNull() should be fastHasAttribute()
1366
1367         * accessibility/AccessibilityRenderObject.cpp:
1368         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1369         Darin spotted this mistake.
1370
1371 2014-10-27  Alexey Proskuryakov  <ap@apple.com>
1372
1373         http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
1374         https://bugs.webkit.org/show_bug.cgi?id=138098
1375
1376         Reviewed by Anders Carlsson.
1377
1378         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1379         (WebCore::NetworkStorageSession::switchToNewTestingSession):
1380         Create a separate session for each WKTR/DRT process when testing.
1381
1382 2014-10-27  Chris Dumez  <cdumez@apple.com>
1383
1384         Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
1385         https://bugs.webkit.org/show_bug.cgi?id=138079
1386
1387         Reviewed by Anders Carlsson.
1388
1389         Use separate HashMaps for common and uncommon headers in HTTPHeaderMap:
1390         - a (faster) HashMap<HTTPHeaderMap, String> for common HTTP headers
1391         - a HashMap<String, String, CaseFoldingHash> for uncommon ones
1392
1393         This avoids having to construct Strings from HTTPHeaderMap values for
1394         storing. This also means we have less isolated String copies to do when
1395         creating cross-thread data. The common headers HashMap should also be
1396         a bit more efficient due to faster hashing and faster key comparison in
1397         case of collision.
1398
1399         Some calls sites can also benefit from having direct access to common
1400         headers of the request in HTTPHeaderName type.
1401
1402         This patch adds a new HTTPHeaderMapConstIterator iterator type for
1403         HTTPHeaderMap so that call sites that do not need / want to distinguish
1404         common / uncommon headers still do not need to. They can keep using
1405         modern C++ loops over HTTPHeaderMap objects and get <String, String>
1406         key/value pairs.
1407
1408         No new tests, no behavior change.
1409
1410         * loader/CrossOriginAccessControl.cpp:
1411         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
1412         Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
1413         HTTPHeaderName in argument instead of a String as only common headers
1414         are in the whitelist.
1415
1416         (WebCore::isSimpleCrossOriginAccessRequest):
1417         Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
1418         HTTP headers.
1419
1420         * loader/CrossOriginAccessControl.h:
1421         Have isOnAccessControlSimpleRequestHeaderWhitelist() take a
1422         HTTPHeaderName in argument instead of a String as only common headers
1423         are in the whitelist.
1424
1425         * loader/CrossOriginPreflightResultCache.cpp:
1426         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
1427         Call isOnAccessControlSimpleRequestHeaderWhitelist() only for common
1428         HTTP headers.
1429
1430         * loader/DocumentLoader.cpp:
1431         (WebCore::DocumentLoader::responseReceived):
1432         Call httpHeaderFields().commonHeaders().find() instead of
1433         httpHeaderFields().find() as we are looking for a common header.
1434         HTTPHeaderMap::find(HTTPHeaderName) was removed now that we have a
1435         HashMap dedicated to common headers.
1436
1437         * loader/cache/CachedRawResource.cpp:
1438         (WebCore::shouldIgnoreHeaderForCacheReuse):
1439         Update argument type to be a HTTPHeaderName instead of a String as
1440         only common HTTP headers can be ignored for cache reuse. The
1441         implementation already dealt with HTTPHeaderName type and had to
1442         call findHTTPHeaderName(). This is no longer needed now that the
1443         call site now has direct access to common headers in HTTPHeaderName
1444         type.
1445
1446         (WebCore::CachedRawResource::canReuse):
1447         - Only call shouldIgnoreHeaderForCacheReuse() for common HTTP headers.
1448         - Slightly optimize the second loop (the one over oldHeaderMap) to only
1449           check that the key is present in newHeaderMap, without actually
1450           comparing the String values. If the String values were different, the
1451           first loop would have seen it already and we would have returned
1452           early.
1453
1454 2014-10-27  Andreas Kling  <akling@apple.com>
1455
1456         Devirtualize RenderDeprecatedFlexibleBox::isStretchingChildren().
1457         <https://webkit.org/b/138096>
1458
1459         Reviewed by Chris Dumez.
1460
1461         This function is only ever called on a renderer after we've checked
1462         that it's a RenderDeprecatedFlexibleBox, so make it non-virtual.
1463
1464         * rendering/RenderBox.cpp:
1465         (WebCore::RenderBox::computeLogicalHeight):
1466         * rendering/RenderDeprecatedFlexibleBox.h:
1467         * rendering/RenderObject.h:
1468
1469 2014-10-27  Chris Dumez  <cdumez@apple.com>
1470
1471         Reintroduce null check removed in r175222
1472         https://bugs.webkit.org/show_bug.cgi?id=138087
1473
1474         Reviewed by Andreas Kling.
1475
1476         Reintroduce null check removed in r175222 as several layout tests are
1477         crashing on the bots without them. At least the Pair pointer can be
1478         null according to the assertion hits on the bots.
1479
1480         * css/StyleBuilderConverter.h:
1481         (WebCore::StyleBuilderConverter::convertRadius):
1482
1483 2014-10-27  Chris Dumez  <cdumez@apple.com>
1484
1485         Move radius CSS properties to the new StyleBuilder
1486         https://bugs.webkit.org/show_bug.cgi?id=138087
1487
1488         Reviewed by Andreas Kling.
1489
1490         Move radius CSS properties from DeprecatedStyleBuilder to the new
1491         StyleBuilder so that they are now generated from CSSPropertyNames.in.
1492
1493         No new tests, no behavior change.
1494
1495         * css/CSSPropertyNames.in:
1496         * css/DeprecatedStyleBuilder.cpp:
1497         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1498         (WebCore::ApplyPropertyBorderRadius::setValue): Deleted.
1499         (WebCore::ApplyPropertyBorderRadius::applyValue): Deleted.
1500         (WebCore::ApplyPropertyBorderRadius::createHandler): Deleted.
1501         * css/StyleBuilderConverter.h:
1502         (WebCore::StyleBuilderConverter::convertRadius):
1503
1504 2014-10-27  Zan Dobersek  <zdobersek@igalia.com>
1505
1506         Shrink MathMLOperatorDictionary::dictionary table
1507         https://bugs.webkit.org/show_bug.cgi?id=137914
1508
1509         Reviewed by Darin Adler.
1510
1511         Improve packing of the Entry structure that's used for elements
1512         of the MathMLOperatorDictionary::dictionary table. This drops the
1513         size of the struct from 16 bytes to just 4 bytes, and shrinks the
1514         size of the dictionary table from rougly 16 kB down to 4 kB.
1515
1516         * rendering/mathml/RenderMathMLOperator.cpp:
1517         (WebCore::MathMLOperatorDictionary::ExtractKey):
1518         (WebCore::RenderMathMLOperator::setOperatorProperties):
1519         * rendering/mathml/RenderMathMLOperator.h:
1520
1521 2014-10-27  Andreas Kling  <akling@apple.com>
1522
1523         Move canContainFixedPositionObjects() to RenderElement.
1524         <https://webkit.org/b/138088>
1525
1526         Reviewed by Mihnea Ovidenie.
1527
1528         Only RenderElement can contain other renderers, so it's not really
1529         natural to answer this question on RenderObject anyway.
1530
1531         Moving it to RenderElement lets it access more efficient getters
1532         that don't have to handle the RenderText case.
1533
1534         * rendering/RenderElement.h:
1535         (WebCore::RenderElement::canContainFixedPositionObjects):
1536         * rendering/RenderObject.h:
1537         (WebCore::RenderObject::canContainFixedPositionObjects): Deleted.
1538
1539 2014-10-26  Benjamin Poulain  <benjamin@webkit.org>
1540
1541         Images with usemap should not have a link state
1542         https://bugs.webkit.org/show_bug.cgi?id=138071
1543
1544         Reviewed by Andreas Kling.
1545
1546         Image tags were incorrectly getting a link state if a usemap is defined.
1547         The <area> of the usemap is supposed to get the link state, but never the image.
1548
1549         Unfortunately, the Accessibility code was relying on the wrong behavior
1550         to set the ImageMapRole, most of the patch is updating that code to get
1551         the correct role without the link state.
1552
1553         Test: fast/selectors/images-with-usemap-should-not-match-link.html
1554
1555         The accessibility code is covered by a few tests in accessibility/.
1556         The test accessibility/aria-used-on-image-maps.html ensure the <area>
1557         elements also get the correct role.
1558
1559         * dom/Node.h:
1560         (WebCore::Node::setIsLink):
1561         (WebCore::Node::clearIsLink): Deleted.
1562         Unused code.
1563
1564         (WebCore::Node::isLink):
1565         Move with its setter for clarity.
1566
1567         * html/HTMLImageElement.cpp:
1568         (WebCore::HTMLImageElement::parseAttribute):
1569         This is the bug.
1570
1571         * accessibility/AccessibilityRenderObject.cpp:
1572         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1573         Here the branches for the role ImageMap where behind isLink() which would
1574         never be valid after the fix.
1575
1576         My fix here was to use the same definition previously set by HTMLImageElement::parseAttribute(),
1577         any usemap attribute qualifies the node for ImageMapRole.
1578
1579         (WebCore::AccessibilityRenderObject::anchorElement):
1580         (WebCore::AccessibilityRenderObject::linkedUIElements):
1581         (WebCore::AccessibilityRenderObject::url):
1582
1583         * accessibility/AccessibilityObject.h:
1584         (WebCore::AccessibilityObject::isAnchor): Deleted.
1585         Something funny I discovered is the Accessibility code worked around the bug
1586         by defining isAnchor() that exclude images from isLink().
1587
1588         Since isLink() will no longer be true for images, the hack can be removed.
1589
1590         * accessibility/AccessibilityNodeObject.cpp:
1591         (WebCore::AccessibilityNodeObject::anchorElement):
1592         (WebCore::AccessibilityNodeObject::isAnchor): Deleted.
1593         * accessibility/AccessibilityNodeObject.h:
1594         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1595         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1596
1597 2014-10-26  Benjamin Poulain  <benjamin@webkit.org>
1598
1599         Replace Element::didAffectSelector() by setNeedsStyleRecalc()
1600         https://bugs.webkit.org/show_bug.cgi?id=138080
1601
1602         Reviewed by Andreas Kling.
1603
1604         Element::didAffectSelector() was probably an optimization at some point,
1605         with the current code is does nothing more than setNeedsStyleRecalc().
1606
1607         * dom/Document.cpp:
1608         (WebCore::Document::setCSSTarget):
1609         * dom/Element.cpp:
1610         (WebCore::Element::didAffectSelector): Deleted.
1611         * dom/Element.h:
1612         * html/HTMLAnchorElement.cpp:
1613         (WebCore::HTMLAnchorElement::parseAttribute):
1614         * html/HTMLFormControlElement.cpp:
1615         (WebCore::HTMLFormControlElement::disabledStateChanged):
1616         * html/HTMLInputElement.cpp:
1617         (WebCore::HTMLInputElement::setChecked):
1618         (WebCore::HTMLInputElement::setIndeterminate):
1619         * html/HTMLLinkElement.cpp:
1620         (WebCore::HTMLLinkElement::parseAttribute):
1621         * html/HTMLOptGroupElement.cpp:
1622         (WebCore::HTMLOptGroupElement::parseAttribute):
1623         * html/HTMLOptionElement.cpp:
1624         (WebCore::HTMLOptionElement::parseAttribute):
1625         (WebCore::HTMLOptionElement::setSelectedState):
1626         * html/HTMLProgressElement.cpp:
1627         (WebCore::HTMLProgressElement::didElementStateChange):
1628
1629 2014-10-26  Andreas Kling  <akling@apple.com>
1630
1631         Move some RenderObject member functions to RenderElement.
1632         <https://webkit.org/b/138085>
1633
1634         Reviewed by Chris Dumez.
1635
1636         Move these two functions to RenderElement:
1637
1638             - handleDynamicFloatPositionChange()
1639             - removeAnonymousWrappersForInlinesIfNecessary()
1640
1641         Also make childBecameNonInline() take a RenderElement& since
1642         that's all we ever pass to it.
1643
1644         * rendering/RenderBlock.cpp:
1645         (WebCore::RenderBlock::childBecameNonInline):
1646         * rendering/RenderBlock.h:
1647         * rendering/RenderBoxModelObject.h:
1648         (WebCore::RenderBoxModelObject::childBecameNonInline):
1649         * rendering/RenderElement.cpp:
1650         (WebCore::RenderElement::handleDynamicFloatPositionChange):
1651         (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary):
1652         * rendering/RenderElement.h:
1653         * rendering/RenderInline.cpp:
1654         (WebCore::RenderInline::childBecameNonInline):
1655         * rendering/RenderInline.h:
1656         * rendering/RenderObject.cpp:
1657         (WebCore::RenderObject::handleDynamicFloatPositionChange): Deleted.
1658         (WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
1659         * rendering/RenderObject.h:
1660
1661 2014-10-26  Andreas Kling  <akling@apple.com>
1662
1663         Move continuation teardown from subclasses to RenderBoxModelObject.
1664         <https://webkit.org/b/138081>
1665
1666         Reviewed by Antti Koivisto.
1667
1668         Let RenderBoxModelObject::willBeDestroyed() tear down any continuation
1669         instead of having every subclass do this themselves.
1670
1671         Also added a RenderElement bit tracking whether the renderer has a
1672         continuation. This avoids a hash lookup every time we destroy a
1673         RenderBoxModelObject that didn't have a continuation.
1674
1675         * rendering/RenderBlock.cpp:
1676         (WebCore::RenderBlock::willBeDestroyed):
1677         * rendering/RenderBlockFlow.cpp:
1678         (WebCore::RenderBlockFlow::willBeDestroyed):
1679         * rendering/RenderBoxModelObject.cpp:
1680         (WebCore::continuationMap):
1681         (WebCore::RenderBoxModelObject::willBeDestroyed):
1682         (WebCore::RenderBoxModelObject::continuation):
1683         (WebCore::RenderBoxModelObject::setContinuation):
1684         * rendering/RenderElement.cpp:
1685         (WebCore::RenderElement::RenderElement):
1686         * rendering/RenderElement.h:
1687         (WebCore::RenderElement::setHasContinuation):
1688         (WebCore::RenderElement::hasContinuation):
1689         * rendering/RenderInline.cpp:
1690         (WebCore::RenderInline::willBeDestroyed):
1691
1692 2014-10-25  Benjamin Poulain  <benjamin@webkit.org>
1693
1694         Remove a useless variable from SelectorCodeGenerator::generateElementMatchesSelectorList()
1695         https://bugs.webkit.org/show_bug.cgi?id=138076
1696
1697         Reviewed by Alexey Proskuryakov.
1698
1699         * cssjit/SelectorCompiler.cpp:
1700         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1701         The variable elementAddressRegisterIndex was just needed for debugging, it is useless now.
1702
1703 2014-10-18  Brian J. Burg  <burg@cs.washington.edu>
1704
1705         Web Inspector: timelines should not count time elapsed while paused in the debugger
1706         https://bugs.webkit.org/show_bug.cgi?id=136351
1707
1708         Reviewed by Timothy Hatcher.
1709
1710         To avoid counting time elapsed while the debugger is paused, timeline records should
1711         keep track of time elapsed since the start of timeline capturing, rather than wall clock
1712         timestamps. We can easily compute elapsed time by sharing a Stopwatch instance through the
1713         inspector environment. The stopwatch runs with timelines and is paused with the debugger,
1714         so subsequent time measurements will not include time elapsed while the debugger is paused.
1715
1716         This refactoring is safe because start and end times are only used to graph records; the
1717         timestamp's actual value is irrelevant and is not displayed in the user interface. Date
1718         timestamps are still included with network-related records as part of their header data.
1719
1720         No new tests, because we cannot reliably test timing changes induced by debugger pauses.
1721         It is possible for records to accrue time before the debugger pauses or after it resumes.
1722
1723         * inspector/InspectorCSSAgent.cpp: Remove unnecessary include.
1724         * inspector/InspectorController.cpp:
1725         (WebCore::InspectorController::InspectorController):
1726         (WebCore::InspectorController::executionStopwatch): Add a shared stopwatch.
1727         * inspector/InspectorController.h:
1728         * inspector/InspectorPageAgent.cpp:
1729         (WebCore::InspectorPageAgent::timestamp): Redirect to the shared stopwatch.
1730         (WebCore::InspectorPageAgent::domContentEventFired):
1731         (WebCore::InspectorPageAgent::loadEventFired):
1732         * inspector/InspectorPageAgent.h:
1733         * inspector/InspectorResourceAgent.cpp:
1734         (WebCore::InspectorResourceAgent::timestamp): Redirect to the shared stopwatch.
1735         (WebCore::InspectorResourceAgent::willSendRequest):
1736         (WebCore::InspectorResourceAgent::didReceiveResponse):
1737         (WebCore::InspectorResourceAgent::didReceiveData):
1738         (WebCore::InspectorResourceAgent::didFinishLoading):
1739         (WebCore::InspectorResourceAgent::didFailLoading):
1740         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
1741         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
1742         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
1743         (WebCore::InspectorResourceAgent::didCloseWebSocket):
1744         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
1745         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
1746         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
1747         * inspector/InspectorResourceAgent.h:
1748         * inspector/InspectorTimelineAgent.cpp:
1749         (WebCore::InspectorTimelineAgent::internalStart): Start and stop the stopwatch with timelines.
1750         (WebCore::InspectorTimelineAgent::internalStop):
1751         (WebCore::InspectorTimelineAgent::timestamp): Redirect to the shared stopwatch.
1752         (WebCore::startProfiling):
1753         (WebCore::InspectorTimelineAgent::startFromConsole):
1754         (WebCore::InspectorTimelineAgent::willCallFunction):
1755         (WebCore::InspectorTimelineAgent::willEvaluateScript):
1756         (WebCore::TimelineTimeConverter::reset): Deleted.
1757         * inspector/InspectorTimelineAgent.h:
1758         (WebCore::TimelineTimeConverter::TimelineTimeConverter): Deleted.
1759         (WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime): Deleted.
1760         (WebCore::InspectorTimelineAgent::timeConverter): Deleted.
1761         * inspector/TimelineRecordFactory.cpp:
1762         * inspector/WorkerInspectorController.cpp:
1763         (WebCore::WorkerInspectorController::WorkerInspectorController):
1764         (WebCore::WorkerInspectorController::executionStopwatch): Add a shared stopwatch.
1765         * inspector/WorkerInspectorController.h:
1766
1767 2014-10-25  Dan Bernstein  <mitz@apple.com>
1768
1769         Fix builds using the public SDK.
1770
1771         * platform/spi/cocoa/NSExtensionSPI.h:
1772
1773 2014-10-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
1774
1775         Clamp wordSpacing percentage value.
1776         https://bugs.webkit.org/show_bug.cgi?id=129350.
1777
1778         Reviewed by Zalan Bujtas.
1779
1780         When the CSS wordSpacing property is percentage, its value has to be within the
1781         pre-defined min/max values for the CSS length type. This is done the same way
1782         the wordSpacing of type <length> is handled.
1783
1784         Tests: css3/infinite-word-spacing.html.
1785
1786         Move the definitions of minValueForCssLength and maxValueForCssLength from the
1787         .cpp file to the .h file.
1788         * css/CSSPrimitiveValue.cpp:
1789         * css/CSSPrimitiveValue.h:
1790
1791         Clamp the wordSpacing value to minValueForCssLength and maxValueForCssLength when
1792         its type is percentage.
1793         * css/DeprecatedStyleBuilder.cpp:
1794         (WebCore::ApplyPropertyWordSpacing::applyValue):
1795
1796 2014-10-24  Chris Dumez  <cdumez@apple.com>
1797
1798         [Mac] Use modern loops in ResourceRequestCocoa.mm
1799         https://bugs.webkit.org/show_bug.cgi?id=138052
1800
1801         Reviewed by Darin Adler.
1802
1803         Use modern loops in ResourceRequestCocoa.mm and leverage Objective-C's
1804         fast enumeration.
1805
1806         No new tests, no behavior change.
1807
1808         * platform/network/cocoa/ResourceRequestCocoa.mm:
1809         (WebCore::ResourceRequest::doUpdateResourceRequest):
1810         - Use NSDictionary's block-based enumeration as we enumerate both keys
1811           and values and this is faster than using fast enumeration of the keys
1812           then calling [NSDictionary objectForKey:]
1813         - Use Objective C's fast enumeration for
1814           contentDispositionEncodingFallbackArray as this is faster and shorter
1815           than index based access. Also use reserveCapacity() /
1816           uncheckedAppend() for m_responseContentDispositionEncodingFallbackArray
1817           as we know how many elements were are going to append in the common
1818           case.
1819
1820         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1821         - Use fast enumeration for [nsRequest allHTTPHeaderFields] dictionary
1822           keys instead of calling [NSDictionary allKeys] and then doing
1823           index-based iteration, to avoid copying the keys to a new array.
1824           Also do a forward enumeration instead of a reverse one. I don't see
1825           why a backward enumeration would be necessary here. We are not
1826           modifying the NSDictionary we are iterating over as
1827           [nsRequest allHTTPHeaderFields] makes a copy.
1828         - Use a modern C++ loop for
1829           m_responseContentDispositionEncodingFallbackArray.
1830
1831 2014-10-24  Zalan Bujtas  <zalan@apple.com>
1832
1833         Replace INT_MIN/MAX / kFixedPointDenominator with intMin/MaxForLayoutUnit.
1834         https://bugs.webkit.org/show_bug.cgi?id=138047
1835
1836         Reviewed by Andreas Kling.
1837
1838         No change in functionality.
1839
1840         * css/CSSPrimitiveValue.cpp:
1841
1842 2014-10-24  Alexey Proskuryakov  <ap@apple.com>
1843
1844         REGRESSION(r174877): WebProcess sends an empty Cookies HTTP header
1845         https://bugs.webkit.org/show_bug.cgi?id=138053
1846
1847         Reviewed by Chris Dumez.
1848
1849         Fixes existing tests.
1850
1851         * platform/network/mac/CookieJarMac.mm: (WebCore::cookiesForSession): Restore the 
1852         behavior of returning a null string when there are no cookies.
1853
1854 2014-10-24  Chris Dumez  <cdumez@apple.com>
1855
1856         [Mac] Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
1857         https://bugs.webkit.org/show_bug.cgi?id=138039
1858
1859         Reviewed by Darin Adler.
1860
1861         Use NSString API in QuickLookMac::computeNeedsQuickLookResourceCachingQuirks()
1862         for case-insensitive string comparison instead of converting to UTF-8 and then
1863         using strcasecmp().
1864
1865         No new tests, no behavior change.
1866
1867         * platform/mac/QuickLookMac.mm:
1868         (WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
1869
1870 2014-10-24  Chris Dumez  <cdumez@apple.com>
1871
1872         Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest() / doUpdatePlatformHTTPBody()
1873         https://bugs.webkit.org/show_bug.cgi?id=138049
1874
1875         Reviewed by Alexey Proskuryakov.
1876
1877         Avoid unnecessary NSURLRequest copies in ResourceRequest::doUpdatePlatformRequest()
1878         / doUpdatePlatformHTTPBody(). It turns out that about half the time, the
1879         m_nsRequest member is already mutable so it is unnecessary to call
1880         [NSURLRequest mutableCopy], we can just cast it to an NSMutableURLRequest* and
1881         avoid copying.
1882
1883         This patch also moves the code to a new ensureMutableNSURLRequest() method to
1884         avoid duplicating the logic.
1885
1886         I see that we spend ~21% less time in these 2 functions when loading
1887         http://flickr.com/explore/ (39.6ms -> 31.2ms).
1888
1889         No new tests, no behavior change.
1890
1891         * platform/network/cf/ResourceRequest.h:
1892         * platform/network/cocoa/ResourceRequestCocoa.mm:
1893         (WebCore::ResourceRequest::ensureMutableNSURLRequest):
1894         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1895         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
1896
1897 2014-10-24  Chris Dumez  <cdumez@apple.com>
1898
1899         Move ComputeLength CSS properties to the new StyleBuilder
1900         https://bugs.webkit.org/show_bug.cgi?id=138036
1901
1902         Reviewed by Andreas Kling.
1903
1904         Move ComputeLength CSS properties from DeprecatedStyleBuilder to the
1905         new StyleBuilder so that they are now generated. 3 Converters are
1906         provided for these properties: ComputedLength / LineWidth / Spacing.
1907
1908         This is inspired by the following Blink revision by
1909         <timloh@chromium.org>:
1910         https://src.chromium.org/viewvc/blink?view=rev&revision=154012
1911
1912         No new tests, no behavior change.
1913
1914         * css/CSSPropertyNames.in:
1915         * css/DeprecatedStyleBuilder.cpp:
1916         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1917         (WebCore::ApplyPropertyComputeLength::setValue): Deleted.
1918         (WebCore::ApplyPropertyComputeLength::applyValue): Deleted.
1919         (WebCore::ApplyPropertyComputeLength::createHandler): Deleted.
1920         * css/StyleBuilderConverter.h:
1921         (WebCore::StyleBuilderConverter::convertComputedLength):
1922         (WebCore::StyleBuilderConverter::convertLineWidth):
1923         (WebCore::StyleBuilderConverter::convertSpacing):
1924
1925 2014-10-24  Chris Dumez  <cdumez@apple.com>
1926
1927         Make ScriptWrappable's destructor protected instead of public
1928         https://bugs.webkit.org/show_bug.cgi?id=138037
1929
1930         Reviewed by Andreas Kling.
1931
1932         Make ScriptWrappable's destructor protected instead of public as it is
1933         not virtual and this class is subclassed a lot.
1934
1935         No new tests, no behavior change.
1936
1937         * bindings/js/ScriptWrappable.h:
1938         (WebCore::ScriptWrappable::~ScriptWrappable):
1939
1940 2014-10-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1941
1942         [GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
1943         https://bugs.webkit.org/show_bug.cgi?id=138004
1944
1945         Reviewed by Gustavo Noronha Silva.
1946
1947         Rename all WidgetBackingStore* classes as
1948         BackingStoreBackendCairo* since all of them are actually
1949         BackingStore backends based on cairo, and move them from
1950         platform/cairo and platform/gtk to platform/graphics/cairo.
1951         BackingStoreBackendCairo is the base class that contains common
1952         members like the surface and size. BackingStoreBackendCairoImpl is
1953         the implementation using only cairo, and BackingStoreBackendCairoX11
1954         using xlib. BackingStoreBackendCairoX11 receives all the X11
1955         information it needs as constructor parameters, instead of using a
1956         GtkWidget and GTK+ X11 API. BackingStoreBackendCairoImpl receives
1957         the surface already created as constructor parameter, so that it
1958         doesn't have any platform specific code now.
1959
1960         * PlatformEfl.cmake: Update compilation files.
1961         * PlatformGTK.cmake: Ditto.
1962         * platform/cairo/WidgetBackingStoreCairo.cpp: Removed.
1963         * platform/graphics/cairo/BackingStoreBackendCairo.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStore.h.
1964         (WebCore::BackingStoreBackendCairo::~BackingStoreBackendCairo):
1965         (WebCore::BackingStoreBackendCairo::surface):
1966         (WebCore::BackingStoreBackendCairo::size):
1967         (WebCore::BackingStoreBackendCairo::BackingStoreBackendCairo):
1968         * platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp: Added.
1969         (WebCore::BackingStoreBackendCairoImpl::BackingStoreBackendCairoImpl):
1970         (WebCore::BackingStoreBackendCairoImpl::~BackingStoreBackendCairoImpl):
1971         (WebCore::BackingStoreBackendCairoImpl::scroll):
1972         * platform/graphics/cairo/BackingStoreBackendCairoImpl.h: Renamed from Source/WebCore/platform/cairo/WidgetBackingStoreCairo.h.
1973         * platform/graphics/cairo/BackingStoreBackendCairoX11.cpp: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.cpp.
1974         (WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
1975         (WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
1976         (WebCore::BackingStoreBackendCairoX11::scroll):
1977         * platform/graphics/cairo/BackingStoreBackendCairoX11.h: Renamed from Source/WebCore/platform/gtk/WidgetBackingStoreGtkX11.h.
1978         * platform/graphics/cairo/CairoUtilities.cpp:
1979         (WebCore::cairoSurfaceGetDeviceScale):
1980         * platform/graphics/cairo/CairoUtilities.h:
1981
1982 2014-10-23  Zalan Bujtas  <zalan@apple.com>
1983
1984         WebContent crash at WebCore::RenderTextControl::textFormControlElement const.
1985         https://bugs.webkit.org/show_bug.cgi?id=138035
1986
1987         Reviewed by Antti Koivisto.
1988
1989         NULL-check element().renderer() before using it.
1990
1991         * html/SearchInputType.cpp:
1992         (WebCore::SearchInputType::didSetValueByUserEdit):
1993
1994 2014-10-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1995
1996         Remove HarfBuzzRun::create() factory function
1997         https://bugs.webkit.org/show_bug.cgi?id=137945
1998
1999         Reviewed by Ryosuke Niwa.
2000
2001         As a step to use std::unique_ptr<>, this patch applies std::unique_ptr<> and std::make_unique<>.
2002         Thus HarfBuzzRun::create() is needed no longer.
2003
2004         No new tests, no behavior changes.
2005
2006         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2007         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
2008         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
2009         (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Deleted.
2010
2011 2014-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
2012
2013         Unreviewed iOS build fix
2014
2015         * editing/FrameSelection.cpp:
2016
2017 2014-10-23  Chris Dumez  <cdumez@apple.com>
2018
2019         [Mac] Optimize URL::createCFURL() for the common case
2020         https://bugs.webkit.org/show_bug.cgi?id=138030
2021
2022         Reviewed by Alexey Proskuryakov.
2023
2024         Optimize URL::createCFURL() for the common case by adding a fast path
2025         for when the URL String is already 8-bit (common case).
2026         When the string is 8-bit, we don't need to copy the bytes into a
2027         temporary buffer and we can construct the CFURLRef directly from it.
2028
2029         This makes URL::createCFURL() ~34% faster on my machine.
2030
2031         No new tests, no behavior change.
2032
2033         * platform/mac/URLMac.mm:
2034         (WebCore::URL::createCFURL):
2035
2036 2014-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
2037
2038         Carets in GMail and iCloud compositions are the foreground text color
2039         https://bugs.webkit.org/show_bug.cgi?id=138029
2040
2041         Reviewed by Simon Fraser.
2042
2043         Previously, we were only checking whether the background colors of the foreground and background
2044         elements were the same, rather than taking validity and opacity into consideration.
2045
2046         Test: editing/caret/color-span-inside-editable-background.html
2047
2048         * editing/FrameSelection.cpp:
2049         (WebCore::disappearsIntoBackground):
2050         (WebCore::CaretBase::paintCaret):
2051
2052 2014-10-23  Joseph Pecoraro  <pecoraro@apple.com>
2053
2054         Web Inspector: Provide a way to have alternate inspector agents
2055         https://bugs.webkit.org/show_bug.cgi?id=137901
2056
2057         Reviewed by Brian Burg.
2058
2059         * Configurations/FeatureDefines.xcconfig:
2060
2061 2014-10-23  Simon Fraser  <simon.fraser@apple.com>
2062
2063         Don't assume that style.overflowX() == style.overflowY()
2064         https://bugs.webkit.org/show_bug.cgi?id=138028
2065
2066         Reviewed by Zalan Bujtas.
2067
2068         WebKit doesn't support independent overflow scroll/hidden on different axes,
2069         but the RenderStyle does report the correct values. So check both overflowX()
2070         and overflowY() in a couple of places where we need to.
2071
2072         * rendering/RenderLayerCompositor.cpp:
2073         (WebCore::styleHasTouchScrolling):
2074         (WebCore::styleChangeRequiresLayerRebuild):
2075
2076 2014-10-23  Chris Dumez  <cdumez@apple.com>
2077
2078         Get rid of unnecessary vtables in WebKit
2079         https://bugs.webkit.org/show_bug.cgi?id=138024
2080
2081         Reviewed by Benjamin Poulain.
2082
2083         Get rid of unnecessary vtables in WebKit by de-virtualizing destructors
2084         when possible and marking the class as final to make sure people don't
2085         subclass it.
2086
2087         No new tests, no behavior change.
2088
2089         * WebCore.exp.in:
2090         * css/WebKitCSSMatrix.h:
2091         * css/WebKitCSSMatrix.idl:
2092         * html/canvas/WebGLContextGroup.h:
2093         * html/canvas/WebGLGetInfo.h:
2094         * html/canvas/WebGLUniformLocation.h:
2095         (WebCore::WebGLUniformLocation::~WebGLUniformLocation): Deleted.
2096         * html/canvas/WebGLUniformLocation.idl:
2097         * inspector/DOMPatchSupport.h:
2098         * inspector/InspectorHistory.h:
2099         * inspector/InspectorStyleSheet.h:
2100         * page/WheelEventDeltaTracker.h:
2101         * page/scrolling/ScrollLatchingState.h:
2102         * platform/audio/Biquad.h:
2103         * platform/graphics/Pattern.h:
2104
2105 2014-10-23  Chris Dumez  <cdumez@apple.com>
2106
2107         Clean up virtual functions in dom/
2108         https://bugs.webkit.org/show_bug.cgi?id=138019
2109
2110         Reviewed by Benjamin Poulain.
2111
2112         Clean up virtual functions in dom/ by:
2113         - Making virtual functions final when possible
2114         - Making classes final when possible
2115         - Using 'override' when appropriate
2116         - Explicitly marking functions / destructors as virtual when they are
2117           inherently virtual
2118         - Making isXXX() virtual functions private on XXX classes to avoid
2119           unnecessary type checks
2120         - Dropping final for virtual functions in classes already marked as
2121           final
2122
2123         No new tests, no behavior change.
2124
2125         * WebCore.exp.in:
2126         * dom/AutocompleteErrorEvent.h:
2127         * dom/BeforeLoadEvent.h:
2128         (WebCore::BeforeLoadEventInit::BeforeLoadEventInit):
2129         * dom/BeforeTextInsertedEvent.h:
2130         * dom/ClipboardEvent.h:
2131         * dom/CompositionEvent.h:
2132         * dom/CustomEvent.h:
2133         * dom/DeviceMotionController.h:
2134         (WebCore::DeviceMotionController::~DeviceMotionController): Deleted.
2135         * dom/DeviceMotionEvent.h:
2136         * dom/DeviceOrientationController.h:
2137         (WebCore::DeviceOrientationController::~DeviceOrientationController): Deleted.
2138         * dom/DeviceOrientationEvent.h:
2139         * dom/Document.h:
2140         * dom/DocumentFragment.h:
2141         * dom/ErrorEvent.h:
2142         * dom/FocusEvent.h:
2143         * dom/HashChangeEvent.h:
2144         * dom/KeyboardEvent.h:
2145         * dom/LiveNodeList.h:
2146         * dom/MessageEvent.h:
2147         * dom/MessagePort.h:
2148         * dom/MouseEvent.h:
2149         * dom/MouseRelatedEvent.h:
2150         * dom/MutationEvent.h:
2151         * dom/NamedFlowCollection.h:
2152         * dom/OverflowEvent.h:
2153         * dom/PageTransitionEvent.h:
2154         * dom/PendingScript.h:
2155         * dom/PopStateEvent.h:
2156         * dom/RawDataDocumentParser.h:
2157         (WebCore::RawDataDocumentParser::finish): Deleted.
2158         (WebCore::RawDataDocumentParser::flush): Deleted.
2159         (WebCore::RawDataDocumentParser::insert): Deleted.
2160         (WebCore::RawDataDocumentParser::append): Deleted.
2161         * dom/ScriptableDocumentParser.h:
2162         * dom/SecurityPolicyViolationEvent.h:
2163         * dom/TextEvent.h:
2164         * dom/TouchEvent.h:
2165         * dom/TransitionEvent.h:
2166         * dom/UIEvent.h:
2167         * dom/WebKitAnimationEvent.h:
2168         * dom/WebKitTransitionEvent.h:
2169         * dom/WheelEvent.h:
2170         * page/DeviceController.h:
2171         (WebCore::DeviceController::~DeviceController):
2172
2173 2014-10-23  Tim Horton  <timothy_horton@apple.com>
2174
2175         Add some SPI headers for NSExtension and NSSharingService{Picker}
2176         https://bugs.webkit.org/show_bug.cgi?id=138027
2177
2178         Reviewed by Anders Carlsson.
2179
2180         * WebCore.xcodeproj/project.pbxproj:
2181         * platform/spi/cocoa/NSExtensionSPI.h: Added.
2182         * platform/spi/mac/NSSharingServicePickerSPI.h: Added.
2183         * platform/spi/mac/NSSharingServiceSPI.h: Added.
2184         Add modern SPI headers for NSExtension, and NSSharingService{Picker}.
2185
2186         * rendering/RenderThemeMac.mm:
2187         Replace redefinitions with an SPI header #import.
2188
2189 2014-10-23  Eric Carlson  <eric.carlson@apple.com>
2190
2191         [Mac] don't update caption user style sheet during parsing
2192         https://bugs.webkit.org/show_bug.cgi?id=137983
2193         rdar://problem/18735366
2194
2195         Reviewed by Jer Noble.
2196
2197         No new tests, existing tests cover the changes.
2198
2199         * page/CaptionUserPreferencesMediaAF.cpp:
2200         (WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF): Initialize m_updateStyleSheetTimer.
2201         (WebCore::CaptionUserPreferencesMediaAF::updateTimerFired): Call updateCaptionStyleSheetOveride.
2202         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Prime a timer to update 
2203             the captions style sheet after a slight delay.
2204
2205 2014-10-23  Chris Dumez  <cdumez@apple.com>
2206
2207         Move remaining Length-type properties to the new StyleBuilder
2208         https://bugs.webkit.org/show_bug.cgi?id=138012
2209
2210         Reviewed by Antti Koivisto.
2211
2212         Move remaining Length-type properties from DeprecatedStyleBuilder to
2213         the new StyleBuilder so that they are now generated from
2214         CSSPropertyNames.in as well. The patch introduces a couple of type
2215         converters for those: "LengthSizing / LengthMaxSizing".
2216
2217         No new tests, no behavior change.
2218
2219         * css/CSSPropertyNames.in:
2220         * css/DeprecatedStyleBuilder.cpp:
2221         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2222         * css/StyleBuilderConverter.h:
2223         (WebCore::StyleBuilderConverter::convertLengthSizing):
2224         (WebCore::StyleBuilderConverter::convertLengthMaxSizing):
2225
2226 2014-10-23  Jer Noble  <jer.noble@apple.com>
2227
2228         [Mac] Safari cannot play 'audio/amr' content.
2229         https://bugs.webkit.org/show_bug.cgi?id=137894
2230
2231         Reviewed by Eric Carlson.
2232
2233         Test: media/media-can-play-case-insensitive.html
2234
2235         Sites are returning 'video/amr' for AMR audio content, but the IANA spec says 'audio/AMR', which is also what
2236         AVFoundation claims to support.  However, MIME types are supposed to be case-insensitive. When creating our
2237         mime type cache, case-fold to lower all MIME types given to us by our media frameworks.
2238
2239         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2240         (WebCore::mimeTypeCache):
2241         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2242         (WebCore::addFileTypesToCache):
2243
2244 2014-10-23  Chris Dumez  <cdumez@apple.com>
2245
2246         Move Length-type CSS properties from DeprecatedStyleBuilder to the new Style Builder
2247         https://bugs.webkit.org/show_bug.cgi?id=138000
2248
2249         Reviewed by Andreas Kling.
2250
2251         Move most Length-type CSS properties from DeprecatedStyleBuilder to the
2252         new Style Builder so that they are now generated. This patch adds
2253         support for a "Converter" option in CSSPropertyNames.in that can be
2254         used to specify a type converter function in
2255         css/StyleBuilderConverter.h. This patch adds support for Length and
2256         LengthOrAuto converters so that most Length-type properties can now be
2257         generated.
2258
2259         Another converter (likely called "LengthSizing") will be needed to
2260         generate the remaining Length-type properties. This will be taken care
2261         of in a follow-up patch.
2262
2263         This patch is inspired by the following Blink revision by
2264         <timloh@chromium.org>:
2265         https://src.chromium.org/viewvc/blink?view=rev&revision=150500
2266
2267         No new tests, no behavior change.
2268
2269         * WebCore.xcodeproj/project.pbxproj:
2270         * css/CSSPropertyNames.in:
2271         * css/DeprecatedStyleBuilder.cpp:
2272         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2273         * css/SVGCSSPropertyNames.in:
2274         * css/StyleBuilder.h:
2275         * css/StyleBuilderConverter.h: Added.
2276         (WebCore::StyleBuilderConverter::convertLength):
2277         (WebCore::StyleBuilderConverter::convertLengthOrAuto):
2278         * css/StyleResolver.cpp:
2279         (WebCore::StyleResolver::applyProperty):
2280         * css/makeprop.pl:
2281
2282 2014-10-23  Zan Dobersek  <zdobersek@igalia.com>
2283
2284         Const-ify static s_resourceType members in RenderSVGResource* classes
2285         https://bugs.webkit.org/show_bug.cgi?id=137911
2286
2287         Reviewed by Andreas Kling.
2288
2289         Make s_resourceType static members in RenderSVGResource* classes const.
2290         Also update the resourceType() methods, where necessary, so that they
2291         return the s_resourceType constant.
2292
2293         * rendering/svg/RenderSVGResourceClipper.cpp:
2294         * rendering/svg/RenderSVGResourceClipper.h:
2295         * rendering/svg/RenderSVGResourceFilter.cpp:
2296         * rendering/svg/RenderSVGResourceFilter.h:
2297         * rendering/svg/RenderSVGResourceLinearGradient.cpp:
2298         * rendering/svg/RenderSVGResourceLinearGradient.h:
2299         * rendering/svg/RenderSVGResourceMarker.cpp:
2300         * rendering/svg/RenderSVGResourceMarker.h:
2301         * rendering/svg/RenderSVGResourceMasker.cpp:
2302         * rendering/svg/RenderSVGResourceMasker.h:
2303         * rendering/svg/RenderSVGResourcePattern.cpp:
2304         * rendering/svg/RenderSVGResourcePattern.h:
2305         * rendering/svg/RenderSVGResourceRadialGradient.cpp:
2306         * rendering/svg/RenderSVGResourceRadialGradient.h:
2307         * rendering/svg/RenderSVGResourceSolidColor.cpp:
2308         * rendering/svg/RenderSVGResourceSolidColor.h:
2309
2310 2014-10-23  Zan Dobersek  <zdobersek@igalia.com>
2311
2312         [TexMap] Clean up virtual method declarations in GraphicsLayerTextureMapper
2313         https://bugs.webkit.org/show_bug.cgi?id=137957
2314
2315         Reviewed by Martin Robinson.
2316
2317         Added override notation to the GraphicsLayerTextureMapper methods that are
2318         overriding the base methods from the GraphicsLayer class and don't have it yet.
2319         Also reordered these methods to follow the order of declaration in the
2320         GraphicsLayer class.
2321
2322         Removed ::setName() and ::willBeDestroyed() methods since they just called
2323         the base class' methods.
2324
2325         Also removed the ::solidColor() and ::changeMask() methods. The first one was
2326         only called in one place which can reference the m_solidColor member directly,
2327         and the second one wasn't used at all.
2328
2329         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2330         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
2331         (WebCore::GraphicsLayerTextureMapper::setName): Deleted.
2332         (WebCore::GraphicsLayerTextureMapper::willBeDestroyed): Deleted.
2333         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2334         (WebCore::GraphicsLayerTextureMapper::solidColor): Deleted.
2335         (WebCore::GraphicsLayerTextureMapper::usesContentsLayer): Deleted.
2336         (WebCore::GraphicsLayerTextureMapper::platformLayer): Deleted.
2337         (WebCore::GraphicsLayerTextureMapper::changeMask): Deleted.
2338
2339 2014-10-23  Krzysztof Czech  <k.czech@samsung.com>
2340
2341         AX: Do the early return when role is different than UnknownRole
2342         https://bugs.webkit.org/show_bug.cgi?id=137880
2343
2344         Reviewed by Chris Fleizach.
2345
2346         We do not need to call ariaRoleAttribute() to check whether m_ariaRole is different than UnknownRole.
2347         Just check m_ariaRole instead.
2348
2349         No new tests, no behavior change, just some cleanup
2350
2351         * accessibility/AccessibilityNodeObject.cpp:
2352         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2353         * accessibility/AccessibilityRenderObject.cpp:
2354         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2355         * accessibility/AccessibilityTableRow.cpp:
2356         (WebCore::AccessibilityTableRow::determineAccessibilityRole):
2357
2358 2014-10-23  Yusuke Suzuki  <utatane.tea@gmail.com>
2359
2360         CSS JIT: Implement :matches
2361         https://bugs.webkit.org/show_bug.cgi?id=137947
2362
2363         Reviewed by Benjamin Poulain.
2364
2365         Initial patch for supporting :matches in CSS JIT.
2366         In this patch, we implement :matches
2367         by leveraging the generalized nested backtracking implementation.
2368
2369         Tests: fast/selectors/matches-backtracking.html
2370                fast/selectors/matches-complex.html
2371
2372         * cssjit/SelectorCompiler.cpp:
2373         (WebCore::SelectorCompiler::addPseudoClassType):
2374         (WebCore::SelectorCompiler::hasAnyCombinators):
2375         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
2376         (WebCore::SelectorCompiler::computeBacktrackingInformation):
2377         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2378         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesMatchesPseudoClass):
2379
2380 2014-10-23  Milan Crha  <mcrha@redhat.com>
2381
2382         RenderThemeGtk::mediaControlsScript() is not defined when VIDEO is disabled.
2383         <https://webkit.org/b/137970>.
2384
2385         Reviewed by Carlos Garcia Campos.
2386
2387         * rendering/RenderThemeGtk.cpp:
2388
2389 2014-10-22  Milan Crha  <mcrha@redhat.com>
2390
2391         Do not include GraphicsContext3D.h when 3D_GRAPHICS is not used.
2392         <https://webkit.org/b/137969>.
2393
2394         Reviewed by Carlos Garcia Campos.
2395
2396         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2397
2398 2014-10-22  Milan Crha  <mcrha@redhat.com>
2399
2400         Do not build WidgetBackingStoreGtkX11 when not used.
2401         <https://webkit.org/b/137972>.
2402
2403         Reviewed by Carlos Garcia Campos.
2404
2405         * platform/gtk/WidgetBackingStoreGtkX11.cpp:
2406         * platform/gtk/WidgetBackingStoreGtkX11.h:
2407
2408 2014-10-22  Simon Fraser  <simon.fraser@apple.com>
2409
2410         [iOS] Toggling overflow:scroll to hidden on element with -webkit-overflow-scrolling:touch can cause children to disappear
2411         https://bugs.webkit.org/show_bug.cgi?id=137999
2412         rdar://problem/18425550
2413
2414         Reviewed by Zalan Bujtas.
2415         
2416         When toggling overflow from scroll to hidden on an element with -webkit-overflow-scrolling:touch,
2417         we'd fail to do a compositing layer rebuild, which caused various issues like unparented
2418         descendants, and misplaced and unrepainted content.
2419         
2420         This happened because we'd get to RenderLayerBacking::updateConfiguration() via styleChanged
2421         with the view needing layout, so never hit the updateScrollingLayers() code, and the subsequent
2422         updateCompositingLayers() would be a no-op.
2423         
2424         Fix by explicitly triggering a layer rebuild when style changes such that the touch-scrollability
2425         of an element changes, as we do for changes in clip.
2426
2427         Test: compositing/scrolling/touch-scroll-to-clip.html
2428
2429         * rendering/RenderLayerCompositor.cpp:
2430         (WebCore::isScrollableOverflow):
2431         (WebCore::styleHasTouchScrolling):
2432         (WebCore::styleChangeRequiresLayerRebuild):
2433
2434 2014-10-22  Chris Dumez  <cdumez@apple.com>
2435
2436         Clean up virtual functions in rendering/
2437         https://bugs.webkit.org/show_bug.cgi?id=137984
2438
2439         Reviewed by Darin Adler.
2440
2441         Clean up virtual functions in rendering/ by:
2442         - Making virtual functions final when possible
2443         - Making classes final when possible
2444         - Using 'override' when appropriate
2445         - Explicitly marking functions / destructors as virtual when they are
2446           inherently virtual
2447         - Dropping virtual destructors when the class does not have subclasses
2448           and mark the class as final, to get rid of unnecessary vtables
2449         - Making isXXX() virtual functions private on XXX classes to avoid
2450           unnecessary type checks
2451         - De-virtualizing some functions that do not need to be virtual
2452         - Dropping final for virtual functions in classes already marked as
2453           final
2454
2455         No new tests, no behavior change.
2456
2457         * html/shadow/SliderThumbElement.cpp:
2458         * rendering/AutoTableLayout.h:
2459         * rendering/ClipPathOperation.h:
2460         (WebCore::ClipPathOperation::type):
2461         (WebCore::ClipPathOperation::isSameType):
2462         * rendering/EllipsisBox.h:
2463         * rendering/FixedTableLayout.h:
2464         * rendering/InlineElementBox.h:
2465         * rendering/RenderBlockFlow.h:
2466         * rendering/RenderCombineText.h:
2467         * rendering/RenderCounter.h:
2468         * rendering/RenderDeprecatedFlexibleBox.h:
2469         * rendering/RenderFlexibleBox.h:
2470         * rendering/RenderFullScreen.h:
2471         * rendering/RenderGrid.h:
2472         * rendering/RenderLayer.h:
2473         * rendering/RenderLayerBacking.h:
2474         * rendering/RenderLayerCompositor.h:
2475         * rendering/RenderLayerFilterInfo.h:
2476         * rendering/RenderLineBreak.h:
2477         * rendering/RenderMarquee.h:
2478         * rendering/RenderMediaControlElements.h:
2479         * rendering/RenderMultiColumnFlowThread.h:
2480         * rendering/RenderMultiColumnSet.h:
2481         * rendering/RenderMultiColumnSpannerPlaceholder.h:
2482         * rendering/RenderNamedFlowFragment.h:
2483         * rendering/RenderNamedFlowThread.h:
2484         * rendering/RenderQuote.h:
2485         * rendering/RenderRegion.h:
2486         (WebCore::RenderRegion::renderName): Deleted.
2487         * rendering/RenderReplica.h:
2488         * rendering/RenderRubyBase.h:
2489         * rendering/RenderRubyRun.h:
2490         * rendering/RenderScrollbar.h:
2491         * rendering/RenderScrollbarPart.h:
2492         * rendering/RenderScrollbarTheme.h:
2493         (WebCore::RenderScrollbarTheme::~RenderScrollbarTheme): Deleted.
2494         (WebCore::RenderScrollbarTheme::scrollbarThickness): Deleted.
2495         (WebCore::RenderScrollbarTheme::buttonsPlacement): Deleted.
2496         (WebCore::RenderScrollbarTheme::supportsControlTints): Deleted.
2497         (WebCore::RenderScrollbarTheme::shouldCenterOnThumb): Deleted.
2498         (WebCore::RenderScrollbarTheme::initialAutoscrollTimerDelay): Deleted.
2499         (WebCore::RenderScrollbarTheme::autoscrollTimerDelay): Deleted.
2500         (WebCore::RenderScrollbarTheme::registerScrollbar): Deleted.
2501         (WebCore::RenderScrollbarTheme::unregisterScrollbar): Deleted.
2502         * rendering/RenderSnapshottedPlugIn.h:
2503         * rendering/RenderTextControlMultiLine.h:
2504         * rendering/RenderTextFragment.h:
2505         * rendering/RenderThemeGtk.h:
2506         * rendering/RenderThemeIOS.h:
2507         * rendering/RenderThemeWin.h:
2508         * rendering/RenderVideo.h:
2509         * rendering/TextAutosizer.h:
2510         * rendering/TrailingFloatsRootInlineBox.h:
2511         * rendering/mathml/RenderMathMLBlock.h:
2512         * rendering/mathml/RenderMathMLMenclose.h:
2513         * rendering/mathml/RenderMathMLOperator.h:
2514         * rendering/mathml/RenderMathMLRadicalOperator.h:
2515         * rendering/mathml/RenderMathMLRoot.h:
2516         * rendering/mathml/RenderMathMLRow.h:
2517         * rendering/mathml/RenderMathMLScripts.h:
2518         * rendering/mathml/RenderMathMLToken.h:
2519         * rendering/mathml/RenderMathMLUnderOver.h:
2520         * rendering/shapes/BoxShape.h:
2521         * rendering/shapes/PolygonShape.h:
2522         * rendering/shapes/RasterShape.h:
2523         * rendering/shapes/RectangleShape.h:
2524         * rendering/style/BasicShapes.h:
2525         * rendering/style/StylePendingImage.h:
2526         (WebCore::StylePendingImage::computeIntrinsicDimensions): Deleted.
2527         * rendering/svg/RenderSVGBlock.h:
2528         * rendering/svg/RenderSVGContainer.h:
2529         * rendering/svg/RenderSVGEllipse.h:
2530         * rendering/svg/RenderSVGForeignObject.h:
2531         * rendering/svg/RenderSVGImage.h:
2532         * rendering/svg/RenderSVGPath.h:
2533         * rendering/svg/RenderSVGRect.h:
2534         * rendering/svg/RenderSVGResourceClipper.h:
2535         * rendering/svg/RenderSVGResourceFilter.h:
2536         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
2537         * rendering/svg/RenderSVGResourceLinearGradient.h:
2538         * rendering/svg/RenderSVGResourceMarker.h:
2539         * rendering/svg/RenderSVGResourceMasker.h:
2540         * rendering/svg/RenderSVGResourcePattern.h:
2541         * rendering/svg/RenderSVGResourceRadialGradient.h:
2542         * rendering/svg/RenderSVGRoot.h:
2543         * rendering/svg/RenderSVGTSpan.h:
2544         * rendering/svg/RenderSVGText.h:
2545         * rendering/svg/RenderSVGTransformableContainer.h:
2546         * rendering/svg/RenderSVGViewportContainer.h:
2547         * rendering/svg/SVGInlineTextBox.h:
2548         * rendering/svg/SVGRootInlineBox.h:
2549
2550 2014-10-22  Jer Noble  <jer.noble@apple.com>
2551
2552         REGRESSION(r175000): Crash in SourceBufferPrivateAVFObjC::destroyParser()
2553         https://bugs.webkit.org/show_bug.cgi?id=137990
2554
2555         Reviewed by Alexey Proskuryakov.
2556
2557         NULL-check m_mediaSource before using.
2558
2559         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2560         (WebCore::SourceBufferPrivateAVFObjC::destroyParser):
2561
2562 2014-10-22  Said Abou-Hallawa  <sabouhallawa@apple.com>
2563
2564         SVG loaded through html <img> can't request to load any external resources.
2565         https://bugs.webkit.org/show_bug.cgi?id=137762.
2566
2567         Reviewed by Daniel Bates.
2568
2569         SVG images have unique security rules that prevent them from loading any external
2570         resources. This patch enforces these rules in CachedResourceLoader::canRequest for
2571         all non-data-uri resources.
2572
2573         The fix and the tests are ported but modified a little from the chromium fix:
2574         http://src.chromium.org/viewvc/blink?view=rev&rev=176084
2575
2576         Test: http/tests/security/svg-image-with-cached-remote-image.html
2577               http/tests/security/svg-image-with-css-cross-domain.html
2578
2579         For the SVG image, prevent loading any external sub-resource except for data urls.
2580         * loader/cache/CachedResourceLoader.cpp:
2581         (WebCore::CachedResourceLoader::canRequest):
2582
2583 2014-10-21  Ada Chan  <adachan@apple.com>
2584
2585         MediaPlayerPrivateAVFoundation::hasAudio() returns false even when there is an audible AVMediaSelectionOption selected
2586         https://bugs.webkit.org/show_bug.cgi?id=137935
2587
2588         Reviewed by Eric Carlson.
2589
2590         Set hasAudio to true if there's a selected audible AVMediaSelectionOption
2591         after the call to updateAudioTracks(). Ditto for video.
2592
2593         Test: http/tests/media/hls/hls-audio-tracks-has-audio.html
2594
2595         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2596         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
2597
2598         * testing/Internals.cpp:
2599         (WebCore::Internals::mediaElementHasCharacteristic):
2600         * testing/Internals.h:
2601         * testing/Internals.idl:
2602         Add internals.mediaElementHasCharacteristic for the new test.
2603
2604 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2605
2606         Remove WidgetBackingStoreCairo::create() factory function
2607         https://bugs.webkit.org/show_bug.cgi?id=137943
2608
2609         Reviewed by Darin Adler.
2610
2611         WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
2612         Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.
2613
2614         No new tests, no behavior changes.
2615
2616         * platform/cairo/WidgetBackingStoreCairo.cpp:
2617         (WebCore::WidgetBackingStoreCairo::create): Deleted.
2618         * platform/cairo/WidgetBackingStoreCairo.h:
2619         * platform/gtk/WidgetBackingStoreGtkX11.cpp:
2620         (WebCore::WidgetBackingStoreGtkX11::create): Deleted.
2621         * platform/gtk/WidgetBackingStoreGtkX11.h:
2622
2623 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2624
2625         Remove TextCheckerEnchant::create() factory function
2626         https://bugs.webkit.org/show_bug.cgi?id=137944
2627
2628         Reviewed by Darin Adler.
2629
2630         TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.
2631
2632         No new tests, no behavior change.
2633
2634         * platform/text/enchant/TextCheckerEnchant.h:
2635         (WebCore::TextCheckerEnchant::create): Deleted.
2636
2637 2014-10-22  Chris Dumez  <cdumez@apple.com>
2638
2639         Avoid confusion between AccessibilityObject::isTable() / isAccessibilityTable()
2640         https://bugs.webkit.org/show_bug.cgi?id=137899
2641
2642         Reviewed by Darin Adler.
2643
2644         Avoid confusion between AccessibilityObject::isTable() and
2645         isAccessibilityTable(). isTable() is equivalent to
2646         is<AccessibilityTable>(), while isAccessibilityTable() is an
2647         AccessibilityTable that is exposed as an AccessibilityTable to the
2648         platform.
2649
2650         This patch is renaming isAccessibilityTable() to
2651         isExposableThroughAccessibility(), makes it non-virtual and defines it
2652         on AccessibilityTable only, for clarity.
2653
2654         This patch also renames isTableExposableThroughAccessibility() to
2655         computeIisTableExposableThroughAccessibility() as it is called only
2656         once to initialize the m_isExposableThroughAccessibility data member.
2657
2658         No new tests, no behavior change.
2659
2660         * accessibility/AccessibilityARIAGrid.cpp:
2661         (WebCore::AccessibilityARIAGrid::addChildren):
2662         * accessibility/AccessibilityARIAGrid.h:
2663         * accessibility/AccessibilityARIAGridCell.cpp:
2664         (WebCore::AccessibilityARIAGridCell::parentTable):
2665         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
2666         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
2667         * accessibility/AccessibilityARIAGridRow.cpp:
2668         (WebCore::AccessibilityARIAGridRow::disclosedRows):
2669         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
2670         (WebCore::AccessibilityARIAGridRow::parentTable):
2671         * accessibility/AccessibilityNodeObject.cpp:
2672         (WebCore::shouldUseAccessiblityObjectInnerText):
2673         * accessibility/AccessibilityObject.cpp:
2674         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
2675         (WebCore::appendChildrenToArray):
2676         * accessibility/AccessibilityObject.h:
2677         (WebCore::AccessibilityObject::isAccessibilityTable): Deleted.
2678         * accessibility/AccessibilityRenderObject.cpp:
2679         (WebCore::AccessibilityRenderObject::ariaSelectedRows):
2680         * accessibility/AccessibilityTable.cpp:
2681         (WebCore::AccessibilityTable::AccessibilityTable):
2682         (WebCore::AccessibilityTable::init):
2683         (WebCore::AccessibilityTable::isExposableThroughAccessibility):
2684         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
2685         (WebCore::AccessibilityTable::addChildren):
2686         (WebCore::AccessibilityTable::tableLevel):
2687         (WebCore::AccessibilityTable::roleValue):
2688         (WebCore::AccessibilityTable::computeAccessibilityIsIgnored):
2689         (WebCore::AccessibilityTable::title):
2690         (WebCore::AccessibilityTable::isAccessibilityTable): Deleted.
2691         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility): Deleted.
2692         * accessibility/AccessibilityTable.h:
2693         * accessibility/AccessibilityTableCell.cpp:
2694         (WebCore::AccessibilityTableCell::isTableCell):
2695         * accessibility/AccessibilityTableColumn.cpp:
2696         (WebCore::AccessibilityTableColumn::headerObject):
2697         (WebCore::AccessibilityTableColumn::addChildren):
2698         * accessibility/AccessibilityTableHeaderContainer.cpp:
2699         (WebCore::AccessibilityTableHeaderContainer::addChildren):
2700         * accessibility/AccessibilityTableRow.cpp:
2701         (WebCore::AccessibilityTableRow::isTableRow):
2702         (WebCore::AccessibilityTableRow::parentTable):
2703         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2704         (webkitAccessibleGetNChildren):
2705         (webkitAccessibleRefChild):
2706         (webkitAccessibleGetAttributes):
2707         * accessibility/mac/AXObjectCacheMac.mm:
2708         (WebCore::AXObjectCache::postPlatformNotification):
2709         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2710         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2711         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2712         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2713         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
2714         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2715         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2716
2717 2014-10-22  Chris Dumez  <cdumez@apple.com>
2718
2719         Avoid repeated is<MutableStyleProperties>() checks in StyleProperties
2720         https://bugs.webkit.org/show_bug.cgi?id=137978
2721
2722         Reviewed by Andreas Kling.
2723
2724         Reduce the amount of is<MutableStyleProperties>() checks in
2725         StyleProperties by:
2726         - Removing the checks in each method of StyleProperties::PropertyReference,
2727           and replace them by a single check in StyleProperties::propertyAt().
2728         - Providing faster propertyCount() / propertyAt() / isEmpty() methods on
2729           MutableStyleProperties / ImmutableStyleProperties as a lot of callers use
2730           tight typing.
2731         - Using tighter typing at call sites whenever possible.
2732
2733         Ideally, we could be able to use iterators instead of propertyCount() /
2734         propertyAt() but this is not trivial to do efficiently as the
2735         representation in memory is fundamentally different for MutableStyleProperties
2736         / ImmutableStyleProperties. We may be able to do better longer term, but
2737         this is already more efficient short term at least.
2738
2739         No new tests, no behavior change.
2740
2741         * css/StyleProperties.cpp:
2742         (WebCore::MutableStyleProperties::MutableStyleProperties):
2743         (WebCore::StyleProperties::PropertyReference::cssText):
2744         * css/StyleProperties.h:
2745         (WebCore::StyleProperties::PropertyReference::PropertyReference):
2746         (WebCore::StyleProperties::PropertyReference::id):
2747         (WebCore::StyleProperties::PropertyReference::shorthandID):
2748         (WebCore::StyleProperties::PropertyReference::isImportant):
2749         (WebCore::StyleProperties::PropertyReference::isInherited):
2750         (WebCore::StyleProperties::PropertyReference::isImplicit):
2751         (WebCore::StyleProperties::PropertyReference::value):
2752         (WebCore::StyleProperties::PropertyReference::toCSSProperty):
2753         (WebCore::StyleProperties::isEmpty):
2754         (WebCore::ImmutableStyleProperties::isEmpty):
2755         (WebCore::MutableStyleProperties::isEmpty):
2756         (WebCore::ImmutableStyleProperties::propertyAt):
2757         (WebCore::MutableStyleProperties::propertyAt):
2758         (WebCore::StyleProperties::propertyAt):
2759         (WebCore::StyleProperties::propertyCount):
2760         (WebCore::StyleProperties::PropertyReference::propertyMetadata): Deleted.
2761         (WebCore::StyleProperties::PropertyReference::propertyValue): Deleted.
2762         * editing/EditingStyle.cpp:
2763         (WebCore::removePropertiesInStyle):
2764         (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
2765
2766 2014-10-22  Eric Carlson  <eric.carlson@apple.com>
2767
2768         [Mac][MediaStream] clean up bit rot
2769         https://bugs.webkit.org/show_bug.cgi?id=137976
2770
2771         Reviewed by Jer Noble.
2772
2773         No new tests, this just gets the Mac port compiling again.
2774
2775         * Modules/mediastream/MediaStream.h: Add a virtual destructor to Observer since it has 
2776             a virtual method.
2777
2778         * WebCore.exp.in: Export RTCPeerConnectionHandler::create and RTCPeerConnectionHandlerMock::create(WebCore::RTCPeerConnectionHandlerClient*),
2779             they are both use by Internals for testing.
2780
2781         * WebCore.xcodeproj/project.pbxproj: Add RTC and MediaStream files.
2782
2783         * html/HTMLMediaElement.h: Forward declare MediaStream instead of including MediaStream.h.
2784
2785         * platform/mediastream/RTCPeerConnectionHandler.h: EXPORT the create method.
2786
2787         * platform/mock/MediaConstraintsMock.cpp:
2788         (WebCore::isSupported): Make static.
2789         (WebCore::isValid): Ditto.
2790
2791         * platform/mock/RTCPeerConnectionHandlerMock.h: EXPORT the create method.
2792
2793 2014-10-22  Chris Dumez  <cdumez@apple.com>
2794
2795         [Mac][WK2] Fix applicationIsSafari() detection
2796         https://bugs.webkit.org/show_bug.cgi?id=137893
2797
2798         Reviewed by Alexey Proskuryakov.
2799
2800         I noticed when profiling Safari on Mac that we were exercising a code
2801         path we shouldn't because it is meant for other applications that
2802         Safari.
2803
2804         The detection relies on the applicationIsSafari() function in
2805         RuntimeApplicationChecks.cpp. This was in some cases returning false on
2806         my machine even though I was running Safari so I investigated a bit and
2807         noticed that the check relies on the main bundle identifier string and
2808         is doing:
2809         isSafari = mainBundleIsEqualTo("com.apple.Safari")
2810             || mainBundleIsEqualTo("com.apple.WebProcess");
2811
2812         This WebProcess detection is very unreliable because:
2813         - It matches other apps than Safari's WebProcesses
2814         - The bundle name for the WebProcess is sometimes
2815         "com.apple.WebKit.WebContent" or
2816         "com.apple.WebKit.WebContent.Development".
2817
2818         The solution used in this patch is to move the applicationIsSafari()
2819         check to the UIProcess so that the check actually succeeds reliably.
2820         The call site for applicationIsSafari() was in
2821         ResourceRequest::useQuickLookResourceCachingQuirks(). This match
2822         removes that logic from ResourceRequest and move it to
2823         FrameLoaderClient as only the FrameLoader is interested in this
2824         information. The logic to determine if we should use QuickLook
2825         resource caching quirks is moved to a new QuickLook class under
2826         platform/ as the code needs to be shared between WebKit and WebKit2.
2827         On WebKit2, we make use that code on the UIProcess side and pass
2828         the flag as a parameter when constructing the WebProcess. The flag
2829         is then stored on the WebProcess and queried by WebFrameLoaderClient.
2830
2831         Previously, we would spend ~1% of the WebProcess cpu time (when loading
2832         apple.com) trying to detect if we should use QuickLook resource caching
2833         quirks even though that check was supposed to be disabled and return
2834         early when running Safari.
2835
2836         No new tests, not easily testable.
2837
2838         * WebCore.exp.in:
2839         * WebCore.xcodeproj/project.pbxproj:
2840         * loader/EmptyClients.h:
2841         * loader/FrameLoader.cpp:
2842         (WebCore::FrameLoader::subresourceCachePolicy):
2843         * loader/FrameLoaderClient.h:
2844         * platform/RuntimeApplicationChecks.cpp:
2845         (WebCore::applicationIsSafari):
2846         Remove "com.apple.WebProcess" bundle name matching as this causes false
2847         positives (matches other applications than Safari's WebProcesses) and
2848         it is no longer needed now that applicationIsSafari() is always called
2849         from the UIProcess.
2850
2851         * platform/mac/QuickLookMac.h: Added.
2852         * platform/mac/QuickLookMac.mm: Copied from Source/WebCore/platform/network/mac/ResourceRequestMac.mm.
2853         (WebCore::QuickLookMac::computeNeedsQuickLookResourceCachingQuirks):
2854         * platform/network/cf/ResourceRequest.h:
2855         * platform/network/ios/ResourceRequestIOS.mm:
2856         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
2857         * platform/network/mac/ResourceRequestMac.mm:
2858         (WebCore::initQuickLookResourceCachingQuirks): Deleted.
2859         (WebCore::ResourceRequest::useQuickLookResourceCachingQuirks): Deleted.
2860
2861 2014-10-22  Shivakumar JM  <shiva.jm@samsung.com>
2862
2863         XMLHttpRequest should support attribute responseURL as per latest XHR spec.
2864         https://bugs.webkit.org/show_bug.cgi?id=136938
2865
2866         Reviewed by Alexey Proskuryakov.
2867
2868         Tests: http/tests/xmlhttprequest/basic-auth-responseURL.html
2869                http/tests/xmlhttprequest/cross-origin-redirect-responseURL.html
2870                http/tests/xmlhttprequest/redirect-credentials-responseURL.html
2871                http/tests/xmlhttprequest/xmlhttprequest-responseURL.html
2872
2873         XMLHttpRequest should support attribute responseURL
2874
2875         * xml/XMLHttpRequest.cpp:
2876         (WebCore::XMLHttpRequest::responseURL):
2877         * xml/XMLHttpRequest.h:
2878         * xml/XMLHttpRequest.idl:
2879
2880 2014-10-22  Chris Dumez  <cdumez@apple.com>
2881
2882         Add initial support for generating the StyleBuilder from CSSPropertyNames.in
2883         https://bugs.webkit.org/show_bug.cgi?id=137910
2884
2885         Reviewed by Andreas Kling.
2886
2887         Add initial support for generating the StyleBuilder from
2888         CSSPropertyNames.in. This is a first step towards getting rid of the
2889         legacy DeprecatedStyleBuilder class and having everything defined in one
2890         place (CSSPropertyNames.in).
2891
2892         This patch updates makeprop.pl script to generate a StyleBuilder.cpp
2893         file that generate a the StyleBuilder::applyProperty() method
2894         implementation using a huge switch statement for all the CSS
2895         properties. With this patch, we are now generating the new StyleBuilder
2896         code for all the "simple" CSS properties (i.e. those that were using
2897         ApplyPropertyDefault<> in DeprecatedStyleBuilder.cpp). I am using a
2898         "NewStyleBuilder" option in CSSPropertyNames.in for properties that
2899         we generate to help with improving incrementally the generator. Once
2900         we are able to generate all properties, this transition option will
2901         do away and become the default.
2902
2903         By default, the generator will make an educated guess for the type
2904         name, the getter, the setter and the initial function of each property.
2905         For example, for the border-collapse property, it will use:
2906         - TypeName: EBorderCollapse (i.e. 'E' + PropertyId)
2907         - Getter: borderCollapse() (i.e. PropertyId with first letter lowercased)
2908         - Setter: setBorderCollapse() (i.e. 'set' + PropertyId)
2909         - Initial: initialBorderCollapse() (i.e. 'initial' + PropertyId)
2910
2911         This works for most properties. For properties that need
2912         special-casing, developers can use the following options in
2913         CSSPropertyNames.in:
2914         - TypeName: Overrides the type name
2915         - Getter: Overrides the getter name
2916         - Setter: Overrides the setter name
2917         - Initial: Overrides the initial function name
2918         - NameForMethods: Overrides the Getter / Setter / Initial function
2919           names. For e.g. "NameForMethods=OverflowWrap" will use
2920           "overflowWrap() / setOverflowWrap() / initialOverflowWrap()".
2921
2922         The patch is inspired by the following Blink revision by
2923         <timloh@chromium.org>:
2924         https://src.chromium.org/viewvc/blink?view=rev&revision=150424
2925
2926         No new tests, no behavior change.
2927
2928         * CMakeLists.txt:
2929         * DerivedSources.make:
2930         * WebCore.vcxproj/WebCore.vcxproj:
2931         * WebCore.vcxproj/WebCore.vcxproj.filters:
2932         * WebCore.xcodeproj/project.pbxproj:
2933         * css/CSSPropertyNames.in:
2934         * css/DeprecatedStyleBuilder.cpp:
2935         (WebCore::ApplyPropertyVerticalAlign::createHandler):
2936         (WebCore::ApplyPropertyDisplay::applyInitialValue):
2937         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2938         * css/StyleBuilder.h: Added.
2939         * css/StyleResolver.cpp:
2940         (WebCore::StyleResolver::adjustRenderStyle):
2941         (WebCore::StyleResolver::applyProperty):
2942         * css/makeprop.pl:
2943         * rendering/style/RenderStyle.h:
2944         Move the initialXXX() methods that were in NonInheritedFlags to
2945         RenderStyle class, with the other initialXXX() methods to facilitate
2946         code generation.
2947
2948         * rendering/style/StyleMultiColData.cpp:
2949         (WebCore::StyleMultiColData::StyleMultiColData):
2950         * rendering/style/StyleRareNonInheritedData.cpp:
2951         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2952
2953 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2954
2955         Unreviewed. Fix GStreamer debug build after r175050.
2956
2957         Explicitly include wtf/MainThread.h.
2958
2959         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2960
2961 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2962
2963         [GStreamer] Do not use CachedResourceLoader, SecurityOrigin, ResourceBuffer and other WebCore types
2964         https://bugs.webkit.org/show_bug.cgi?id=137064
2965
2966         Reviewed by Philippe Normand.
2967
2968         Move the media resource loader to a new class in WebCore/loader
2969         that inherits from a PlatformMediaResourceLoader class defined in
2970         the platform layer. The platform specific behaviour is implemented
2971         using a client also defined in the platform layer, implemented by
2972         every media backend, and used by the WebCore MediaResourceLoader.
2973
2974         * CMakeLists.txt: Add new files to compilation.
2975         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2976         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2977         * WebCore.xcodeproj/project.pbxproj: Ditto.
2978         * html/HTMLMediaElement.cpp:
2979         (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
2980         Create a MediaResourceLoader.
2981         (WebCore::HTMLMediaElement::mediaPlayerCORSMode): Deleted. This is
2982         no longer used.
2983         * html/HTMLMediaElement.h:
2984         * loader/MediaResourceLoader.cpp: Added.
2985         (WebCore::MediaResourceLoader::MediaResourceLoader):
2986         (WebCore::MediaResourceLoader::~MediaResourceLoader):
2987         (WebCore::MediaResourceLoader::start): Start a new load for the
2988         given request and load options.
2989         (WebCore::MediaResourceLoader::stop): Stop the load if needed.
2990         (WebCore::MediaResourceLoader::setDefersLoading):
2991         (WebCore::MediaResourceLoader::responseReceived): Handle CORS
2992         access check and notify the client about the response.
2993         (WebCore::MediaResourceLoader::dataReceived): Notify the client.
2994         (WebCore::MediaResourceLoader::notifyFinished): Ditto.
2995         (WebCore::MediaResourceLoader::getOrCreateReadBuffer): Ask the
2996         client to create the read buffer.
2997         * loader/MediaResourceLoader.h: Added.
2998         * platform/graphics/MediaPlayer.cpp:
2999         (WebCore::MediaPlayer::createResourceLoader): Call
3000         mediaPlayerCreateResourceLoader() if there's a client.
3001         * platform/graphics/MediaPlayer.h:
3002         (WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
3003         (WebCore::MediaPlayerClient::mediaPlayerCORSMode): Deleted.
3004         * platform/graphics/PlatformMediaResourceLoader.h: Added.
3005         (WebCore::PlatformMediaResourceLoaderClient::responseReceived):
3006         (WebCore::PlatformMediaResourceLoaderClient::dataReceived):
3007         (WebCore::PlatformMediaResourceLoaderClient::bufferReceived):
3008         (WebCore::PlatformMediaResourceLoaderClient::accessControlCheckFailed):
3009         (WebCore::PlatformMediaResourceLoaderClient::loadFailed):
3010         (WebCore::PlatformMediaResourceLoaderClient::loadFinished):
3011         (WebCore::PlatformMediaResourceLoaderClient::getOrCreateReadBuffer):
3012         (WebCore::PlatformMediaResourceLoader::~PlatformMediaResourceLoader):
3013         (WebCore::PlatformMediaResourceLoader::stop):
3014         (WebCore::PlatformMediaResourceLoader::setDefersLoading):
3015         (WebCore::PlatformMediaResourceLoader::didPassAccessControlCheck):
3016         (WebCore::PlatformMediaResourceLoader::PlatformMediaResourceLoader):
3017         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3018         (webKitWebSrcStop): Also delete the PlatformMediaResourceLoader.
3019         (webKitWebSrcStart): Create a new resource loader using
3020         MediaPlayer::createResourceLoader() with a new
3021         CachedResourceStreamingClient as client.
3022         (webKitWebSrcNeedDataMainCb): Call setDefersLoading() for the
3023         resource loader if there's one.
3024         (webKitWebSrcEnoughDataMainCb): Ditto.
3025         (webKitSrcPassedCORSAccessCheck): Return didPassAccessControlCheck.
3026         (StreamingClient::handleResponseReceived): Remove the CORS check
3027         result parameter since that's now handled by MediaResourceLoader.
3028         (CachedResourceStreamingClient::CachedResourceStreamingClient):
3029         (CachedResourceStreamingClient::~CachedResourceStreamingClient):
3030         (CachedResourceStreamingClient::getOrCreateReadBuffer):
3031         (CachedResourceStreamingClient::responseReceived): Update didPassAccessControlCheck.
3032         (CachedResourceStreamingClient::dataReceived):
3033         (CachedResourceStreamingClient::accessControlCheckFailed): Log the
3034         error and stop the load.
3035         (CachedResourceStreamingClient::loadFailed): Log the error if it
3036         was not a cancellation.
3037         (CachedResourceStreamingClient::loadFinished):
3038         (ResourceHandleStreamingClient::didReceiveResponse):
3039         (CachedResourceStreamingClient::setDefersLoading): Deleted.
3040         (CachedResourceStreamingClient::notifyFinished): Deleted.
3041
3042 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
3043
3044         [GTK] Move GtkInputMethodFilter from Platform to WebKit2
3045         https://bugs.webkit.org/show_bug.cgi?id=137884
3046
3047         Reviewed by Gustavo Noronha Silva.
3048
3049         Remove GtkInputMethodFilter.
3050
3051         * PlatformGTK.cmake:
3052         * platform/gtk/GtkInputMethodFilter.cpp: Removed.
3053         * platform/gtk/GtkInputMethodFilter.h: Removed.
3054
3055 2014-10-22  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
3056
3057         Match spec for font-weight: bolder|lighter
3058         https://bugs.webkit.org/show_bug.cgi?id=137919
3059
3060         Reviewed by Andreas Kling.
3061
3062         This patch is a merge of Blink's
3063         https://chromiumcodereview.appspot.com/15994009
3064         
3065         Currently, bolder and lighter change font-weight in a non-compliant way.
3066         The spec (http://www.w3.org/TR/css3-fonts/#bolderlighter) defines
3067         exactly what the computed values should be given the inherited weight values,
3068         so we should match those.
3069         
3070         The removed FIXME's for selecting the next lightest/heaviest weight from
3071         the used font family seems to refer to behaviour from
3072         CSS1 (http://www.w3.org/TR/CSS1/#font-weight), while this is replaced
3073         with a simpler procedure for resolving bolder and lighter in font weights
3074         in CSS2 (http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight) and CSS3 (link above).
3075         
3076         and https://codereview.chromium.org/137813004
3077         
3078         According to http://dev.w3.org/csswg/css-fonts/#font-weight-prop, the computed
3079         weight of 'lighter' and 'bolder' are based on the inherited 'font-weight', so set
3080         that inherited weight before calculating 'lighter' and 'bolder'.
3081
3082         Tests: css3/font-weight-multiple-selectors.html
3083                css3/font-weight.html
3084
3085         * css/DeprecatedStyleBuilder.cpp:
3086         (WebCore::ApplyPropertyFontWeight::applyValue):
3087         * platform/graphics/FontDescription.cpp:
3088         (WebCore::FontDescription::lighterWeight):
3089         (WebCore::FontDescription::bolderWeight):
3090
3091 2014-10-22  Rohit Kumar  <kumar.rohit@samsung.com>
3092
3093         [GTK]: Fix unused parameter build warnings in WebCore/platform module
3094         https://bugs.webkit.org/show_bug.cgi?id=137921
3095
3096         Reviewed by Carlos Garcia Campos.
3097
3098         * platform/ScrollAnimatorNone.cpp:
3099         (WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData):
3100         (WebCore::ScrollAnimatorNone::animationTimerFired):
3101
3102 2014-10-22  Dhi Aurrahman  <diorahman@rockybars.com>
3103
3104         Add relList to the anchor, area and link elements
3105         https://bugs.webkit.org/show_bug.cgi?id=137860
3106
3107         Reviewed by Darin Adler and Chris Dumez.
3108
3109         Add relList to reflect the rel content attribute for anchor[1],
3110         area[2] and link[3] elements.
3111
3112         [1] https://html.spec.whatwg.org/multipage/semantics.html#dom-a-rellist 
3113         [2] https://html.spec.whatwg.org/multipage/embedded-content.html#dom-area-rellist
3114         [3] https://html.spec.whatwg.org/multipage/semantics.html#dom-link-rellist
3115
3116         Tests: fast/dom/rel-list-gc.html
3117                fast/dom/rel-list.html
3118                perf/rel-list-remove.html
3119
3120         * CMakeLists.txt:
3121         * WebCore.vcxproj/WebCore.vcxproj:
3122         * WebCore.vcxproj/WebCore.vcxproj.filters:
3123         * WebCore.xcodeproj/project.pbxproj:
3124         * dom/SpaceSplitString.cpp:
3125         (WebCore::SpaceSplitString::set):
3126         * html/HTMLAnchorElement.cpp:
3127         (WebCore::HTMLAnchorElement::parseAttribute):
3128         (WebCore::HTMLAnchorElement::relList):
3129         (WebCore::HTMLAnchorElement::setRel): Deleted.
3130         * html/HTMLAnchorElement.h:
3131         * html/HTMLAnchorElement.idl:
3132         * html/HTMLAreaElement.idl:
3133         * html/HTMLLinkElement.cpp:
3134         (WebCore::HTMLLinkElement::parseAttribute):
3135         (WebCore::HTMLLinkElement::relList):
3136         * html/HTMLLinkElement.h:
3137         * html/HTMLLinkElement.idl:
3138         * html/RelList.cpp: Added.
3139         (WebCore::RelList::RelList):
3140         (WebCore::RelList::ref):
3141         (WebCore::RelList::deref):
3142         (WebCore::RelList::length):
3143         (WebCore::RelList::item):
3144         (WebCore::RelList::element):
3145         (WebCore::RelList::updateRelAttribute):
3146         (WebCore::RelList::containsInternal):
3147         (WebCore::RelList::value):
3148         (WebCore::RelList::setValue):
3149         * html/RelList.h: Added.
3150
3151 2014-10-21  Andy Estes  <aestes@apple.com>
3152
3153         One more iOS build fix after r175013.
3154
3155         * platform/graphics/ios/FontCacheIOS.mm:
3156         (WebCore::FontCache::createFontPlatformData):
3157
3158 2014-10-21  Benjamin Poulain  <bpoulain@apple.com>
3159
3160         CSS Rule features are ignored for nested CSS Selector lists
3161         https://bugs.webkit.org/show_bug.cgi?id=137908
3162
3163         Reviewed by Andreas Kling.
3164
3165         When Rule feature sets were collected, any selector list nested inside an other
3166         selector list was ignored when collecting properties of the CSS Selector.
3167
3168         As a result, style was not invalidated properly when any property listed in
3169         the nested selectors.
3170
3171         This patch fixes the issue by make RuleFeatureSet::collectFeaturesFromSelector()
3172         recursive, evaluating every chain of every selector lists.
3173
3174         Tests: fast/css/class-style-invalidation-optimization.html
3175                fast/css/direct-adjacent-style-sharing-1.html
3176                fast/css/direct-adjacent-style-sharing-2.html
3177                fast/css/direct-adjacent-style-sharing-3.html
3178                fast/css/id-style-invalidation-optimization.html
3179                fast/selectors/class-style-update-with-not.html
3180                fast/selectors/class-style-update-with-nth-child-of.html
3181                fast/selectors/class-style-update.html
3182
3183         * css/RuleFeature.cpp:
3184         (WebCore::recursivelyCollectFeaturesFromSelector):
3185         (WebCore::RuleFeatureSet::collectFeaturesFromSelector):
3186         * css/RuleFeature.h:
3187         * css/RuleSet.cpp:
3188         (WebCore::collectFeaturesFromRuleData):
3189
3190 2014-10-21  Tim Horton  <timothy_horton@apple.com>
3191
3192         Try to fix the iOS build after r175013.
3193
3194         * platform/graphics/ios/FontCacheIOS.mm:
3195         (WebCore::FontCache::createFontPlatformData):
3196
3197 2014-10-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3198
3199         Use std::unique_ptr | std::make_unique in FontCacheFoo
3200         https://bugs.webkit.org/show_bug.cgi?id=137905
3201
3202         Reviewed by Darin Adler.
3203
3204         Clean up PassOwnPtr|OwnPtr using std::unique_ptr|std::make_unique.
3205
3206         No new tests, no behavior changes.
3207
3208         * platform/graphics/FontCache.cpp:
3209         (WebCore::FontCache::getCachedFontPlatformData):
3210         * platform/graphics/FontCache.h:
3211         * platform/graphics/freetype/FontCacheFreeType.cpp:
3212         (WebCore::FontCache::createFontPlatformData):
3213         * platform/graphics/ios/FontCacheIOS.mm:
3214         (WebCore::FontCache::createFontPlatformData):
3215         * platform/graphics/mac/FontCacheMac.mm:
3216         (WebCore::FontCache::createFontPlatformData):
3217         * platform/graphics/win/FontCacheWin.cpp:
3218         (WebCore::FontCache::createFontPlatformData):
3219
3220 2014-10-21  Ada Chan  <adachan@apple.com>
3221
3222         Calling WebCore::Page::setMediaVolume(0) does not mute videos as expected.
3223         https://bugs.webkit.org/show_bug.cgi?id=137305
3224
3225         Reviewed by Darin Adler.
3226
3227         This was broken in http://trac.webkit.org/changeset/154970. To fix this (but not break
3228         GStreamer), remove the "if (m_volumeInitialized)" check before updating the MediaPlayer's
3229         volume to the value multiplied with the Page's mediaVolume. This should not affect GStreamer's
3230         behavior because MediaPlayerPrivateGStreamerBase::setStreamVolumeElement does nothing unless
3231         m_volumeInitialized is true.
3232
3233         * html/HTMLMediaElement.cpp:
3234         (WebCore::HTMLMediaElement::updateVolume):
3235
3236 2014-10-21  Jer Noble  <jer.noble@apple.com>
3237
3238         [EME][Mac] Update to match new AVStreamSession API and requirements.
3239         https://bugs.webkit.org/show_bug.cgi?id=137923
3240
3241         Reviewed by Eric Carlson.
3242
3243         The session identifier has moved from AVStreamDataParser to -[AVStreamSession contentProtectionSessionIdentifier]
3244         and the property is no longer KVObservable. A new notification key has been added in place of KVO.
3245
3246         Additionally, the requirements for using AVStreamDataParser with AVStreamSession have changed. It is now
3247         required that AVStreamDataParsers be added to an AVStreamSession before the 
3248         -streamSession:didProvideContentKeyRequestInitializationData:forTrackID delegate method is called. A
3249         -streamParserWillProvideContentKeyRequestInitializationData:forTrackID delegate has been added, and
3250         an AVStreamSession must be created and the AVStreamDataParser added to it during the scope of that delegate
3251         method.
3252
3253         To facilitate this, the MediaPlayerPrivateMediaSourceAVFObjC object will lazily create and own a AVStreamSession
3254         object when requested. The SourceBufferPrivateAVFObjC object will listen for the -willProvide delegate call
3255         and will add its AVStreamDataParser to that AVStreamSession when called.
3256
3257         The CDMSessionMediaSourceAVFObjC object is no longer responsible for creating the AVStreamSession, and because
3258         the session identifier has moved from many AVStreamDataParsers to a single AVStreamSession, the
3259         CDMSessionMediaSourceAVFObjCObserver class can become much simpler, as it only has to observe a single object.
3260
3261         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3262         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3263         (-[CDMSessionMediaSourceAVFObjCObserver dealloc]): Deleted.
3264         (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]): Deleted.
3265         (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]): Deleted.
3266         (-[CDMSessionMediaSourceAVFObjCObserver invalidate]): Deleted.
3267         (-[CDMSessionMediaSourceAVFObjCObserver observeValueForKeyPath:ofObject:change:context:]): Deleted.
3268         (-[CDMSessionMediaSourceAVFObjCObserver contentProtectionSessionIdentifierChanged:]): Added.
3269         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Call setStreamSession(nullptr).
3270         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): The sessionId is now a value in the dictionary, not the key.
3271         (WebCore::CDMSessionMediaSourceAVFObjC::update): No longer create an AVStreamSession.
3272         (WebCore::CDMSessionMediaSourceAVFObjC::setStreamSession): Add and remove observers as appropriate.
3273         (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): No longer add or remove parsers from AVStreamSessions.
3274         (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Ditto.
3275         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3276         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3277         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::hasStreamSession): Simple getter.
3278         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Lazy initializing getter.
3279         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Call setStreamSession().
3280         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3281         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3282         (-[WebAVStreamDataParserListener streamParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Synchronously pass to SourceBufferPrivateAVFObjC.
3283         (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID): Add the parser to an AVStreamSession.
3284         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): Check the trackId.
3285         * platform/mac/SoftLinking.h:
3286
3287 2014-10-21  Jaehun Lim  <ljaehun.lim@samsung.com>
3288
3289         'true' isn't a valid value for justify-self
3290         https://bugs.webkit.org/show_bug.cgi?id=137913
3291
3292         Reviewed by Andreas Kling.
3293
3294         Merged from Blink (patch by dstockwell):
3295         <https://src.chromium.org/viewvc/blink?view=rev&revision=174638>
3296
3297         CSS Box Alignment Module Level 3:
3298         http://dev.w3.org/csswg/css-align/#justify-self-property
3299
3300         No new tests, modify existing test case.
3301
3302         * css/CSSParser.cpp:
3303         (WebCore::CSSParser::parseJustifySelf):
3304
3305 2014-10-21  Michael Saboff  <msaboff@apple.com>
3306
3307         Add operator==(PropertyName, const char*)
3308         https://bugs.webkit.org/show_bug.cgi?id=137925
3309
3310         Reviewed by Mark Lam.
3311
3312         Use new == operator to compare a PropertyName with a string literal.
3313
3314         * bindings/js/JSHTMLDocumentCustom.cpp:
3315         (WebCore::JSHTMLDocument::getOwnPropertySlot):
3316
3317 2014-10-21  Chris Dumez  <cdumez@apple.com>
3318
3319         Unreviewed iOS build fix after r174921.
3320
3321         Export new symbol after function rename.
3322
3323         * WebCore.exp.in:
3324         * WebCore.order:
3325
3326 2014-10-21  Chris Dumez  <cdumez@apple.com>
3327
3328         Unreviewed iOS build fix after r174921.
3329
3330         Remove symbol from export files that no longer exists.
3331
3332         * WebCore.exp.in:
3333         * WebCore.order:
3334
3335 2014-10-21  peavo@outlook.com  <peavo@outlook.com>
3336
3337         [Curl] Optimization; avoid string reallocation.
3338         https://bugs.webkit.org/show_bug.cgi?id=137920
3339
3340         Reviewed by Brent Fulgham.
3341
3342         Profiling reveals that the cookiesForDOM function is spending time on removing a character from a string.
3343
3344         * platform/network/curl/CookieJarCurl.cpp:
3345         (WebCore::domainMatch):
3346         (WebCore::addMatchingCurlCookie):
3347
3348 2014-10-21  Joanmarie Diggs  <jdiggs@igalia.com>
3349
3350         AX: [ATK] CSS-generated text content not exposed to assistive technologies
3351         https://bugs.webkit.org/show_bug.cgi?id=137669
3352
3353         Reviewed by Chris Fleizach.
3354
3355         Do not use a text iterator to get the text for elements which include
3356         pseudo elements.
3357
3358         Test: accessibility/css-content-attribute.html
3359
3360         * accessibility/AccessibilityRenderObject.cpp:
3361         (WebCore::AccessibilityRenderObject::textUnderElement):
3362
3363 2014-10-21  Chris Dumez  <cdumez@apple.com>
3364
3365         REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
3366         https://bugs.webkit.org/show_bug.cgi?id=137916
3367
3368         Reviewed by Csaba Osztrogon√°c.
3369
3370         Fix the !ENABLE(VIDEO) build by adding an #if ENABLE(VIDEO) where
3371         needed.
3372
3373         * rendering/RenderLayerBacking.cpp:
3374         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
3375
3376 2014-10-21  Zalan Bujtas  <zalan@apple.com>
3377
3378         REGRESSION: Google Search (mobile) video thumbnails are too large.
3379         https://bugs.webkit.org/show_bug.cgi?id=137895
3380
3381         Reviewed by Simon Fraser.
3382
3383         This patch fixes layer clipping when an ancestor layer has border-radius clipping.
3384
3385         In cases, where the current layer has non-radius cliprect, while an ancestor layer
3386         has border-radius clipping, we only use the border-radius rect to clip.
3387
3388         Test: fast/clip/overflow-hidden-with-border-radius-overflow-clipping-parent.html
3389
3390         * rendering/RenderLayer.cpp:
3391         (WebCore::RenderLayer::clipToRect):
3392         (WebCore::RenderLayer::restoreClip):
3393         (WebCore::RenderLayer::collectFragments):
3394         (WebCore::RenderLayer::calculateClipRects):
3395         * rendering/RenderLayer.h:
3396         (WebCore::ClipRect::ClipRect):
3397         (WebCore::ClipRect::effectedByRadius):
3398         (WebCore::ClipRect::setEffectedByRadius):
3399         (WebCore::ClipRect::operator==):
3400         (WebCore::ClipRect::operator!=):
3401         (WebCore::ClipRect::intersect):
3402         (WebCore::ClipRect::hasRadius): Deleted.
3403         (WebCore::ClipRect::setHasRadius): Deleted.
3404
3405 2014-10-20  Michael Saboff  <msaboff@apple.com>
3406
3407         Don't create cached functions for HTMLDocument.write*()
3408         https://bugs.webkit.org/show_bug.cgi?id=137906
3409
3410         Reviewed by Darin Adler.
3411
3412         Made it so that JSHTMLDocument::write() and ::writeln() are always created for every prototype.
3413         This is similar to the change in r174847.
3414
3415         This change is alread covered by the tests:
3416         LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-write-lexical.html
3417         LayoutTests/http/tests/security/aboutBlank/security-context-grandchildren-writeln-lexical.html
3418         LayoutTests/http/tests/security/aboutBlank/security-context-write.html
3419         LayoutTests/http/tests/security/aboutBlank/security-context-writeln.html
3420         LayoutTests/http/tests/xmlhttprequest/request-from-popup.html
3421         LayoutTests/http/tests/navigation/new-window-redirect-history.html
3422         LayoutTests/http/tests/misc/window-open-then-write.html
3423
3424         * bindings/js/JSHTMLDocumentCustom.cpp:
3425         (WebCore::JSHTMLDocument::getOwnPropertySlot):
3426         * html/HTMLDocument.idl:
3427
3428 2014-10-21  Chris Dumez  <cdumez@apple.com>
3429
3430         REGRESSION(r174676): It broke the !ENABLE(VIDEO) build
3431         https://bugs.webkit.org/show_bug.cgi?id=137916
3432
3433         Unreviewed build fix. Add missing header include.
3434
3435         * rendering/RenderLayerBacking.cpp:
3436
3437 2014-10-21  Jer Noble  <jer.noble@apple.com>
3438
3439         REGRESSION (r170808): Volume slider in built-in media controls only changes volume when thumb is released, not while dragging
3440         https://bugs.webkit.org/show_bug.cgi?id=137805
3441
3442         Reviewed by Dan Bernstein.
3443
3444         Test: media/video-volume-slider-drag.html
3445
3446         Respond to the 'input' event rather than the 'change' event for the volume slider, so that
3447         volume changes are continuous during drag operations.