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