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